Changeset 3a31acccc1b5720c3256c4677ac85282915fc610

Show
Ignore:
Timestamp:
27/06/02 21:05:17 (6 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 1025204717 +0000
git-parent:

[3668622d3373559abad985f796d0f601a08af8b0]

git-author:
Sam Hocevar <sam@videolan.org> 1025204717 +0000
Message:
  • ./src/misc/modules.c: added the --plugin-path option to give vlc an
    extra plugin location.
  • ./plugins/text/rc.c: if stdin/stdout are not connected to a TTY, we
    don't launch the rc interface.
  • ./plugins/access/http.c: fixed a compilation warning.
  • ./src/misc/messages.c: cosmetic enhancements in the message output.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/main.h

    rf60d5d5 r3a31acc  
    44 ***************************************************************************** 
    55 * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN 
    6  * $Id: main.h,v 1.38 2002/06/01 17:09:25 sam Exp $ 
     6 * $Id: main.h,v 1.39 2002/06/27 19:05:17 sam Exp $ 
    77 * 
    88 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    7272    vlc_mutex_t            config_lock;          /* lock for the config file */ 
    7373    vlc_mutex_t            structure_lock;        /* lock for the p_vlc tree */ 
     74    int                    i_unique;                    /* p_vlc occurence # */ 
    7475    int                    i_counter;                      /* object counter */ 
    7576 
     
    7879    void **                pp_global_data; 
    7980 
    80     /* Private data */ 
     81    /* System-specific variables */ 
    8182#if defined( SYS_BEOS ) 
    8283    vlc_object_t *         p_appthread; 
  • plugins/access/http.c

    re405691 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: http.c,v 1.12 2002/06/18 23:18:40 massiot Exp $ 
     5 * $Id: http.c,v 1.13 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    151151                   "%s" 
    152152                   HTTP_USERAGENT HTTP_END, 
    153                    p_access_data->psz_buffer, i_tell ); 
     153                   p_access_data->psz_buffer ); 
    154154    } 
    155155    psz_buffer[sizeof(psz_buffer) - 1] = '\0'; 
  • plugins/avi/avi.c

    rb2b0749 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: avi.c,v 1.23 2002/06/26 23:11:12 fenrir Exp $ 
     5 * $Id: avi.c,v 1.24 2002/06/27 19:05:17 sam Exp $ 
    66 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
    77 *  
     
    3434#include "video.h" 
    3535 
    36 /***************************************************************************** 
    37  * Constants 
    38  *****************************************************************************/ 
     36#include "libioRIFF.h" 
     37#include "avi.h" 
    3938 
    4039/***************************************************************************** 
     
    6362MODULE_DEACTIVATE_START 
    6463MODULE_DEACTIVATE_STOP 
    65  
    66 /***************************************************************************** 
    67  * Definition of structures and libraries for this plugins  
    68  *****************************************************************************/ 
    69 #include "libioRIFF.h" 
    70 #include "avi.h" 
    7164 
    7265/***************************************************************************** 
  • plugins/avi/libioRIFF.c

    r31f4719 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: libioRIFF.c,v 1.8 2002/06/27 18:10:16 fenrir Exp $ 
     5 * $Id: libioRIFF.c,v 1.9 2002/06/27 19:05:17 sam Exp $ 
    66 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
    77 *  
     
    2121 *****************************************************************************/ 
    2222 
    23 #include <stdlib.h> 
     23/***************************************************************************** 
     24 * Preamble 
     25 *****************************************************************************/ 
     26#include <stdlib.h>                                      /* malloc(), free() */ 
     27 
    2428#include <vlc/vlc.h> 
    2529#include <vlc/input.h> 
    26 #include <video.h> 
     30 
     31#include "video.h" 
    2732 
    2833#include "libioRIFF.h" 
  • plugins/text/rc.c

    r5c13c83 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: rc.c,v 1.19 2002/06/07 23:05:03 sam Exp $ 
     5 * $Id: rc.c,v 1.20 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Peter Surda <shurdeek@panorama.sth.ac.at> 
     
    101101static int intf_Open( intf_thread_t *p_intf ) 
    102102{ 
     103#ifdef HAVE_ISATTY 
     104    /* Check that stdin is a TTY */ 
     105    if( !isatty( 0 ) ) 
     106    { 
     107        msg_Warn( p_intf, "fd 0 is not a TTY" ); 
     108        return 1; 
     109    } 
     110#endif 
     111 
    103112    /* Non-buffered stdout */ 
    104113    setvbuf( stdout, (char *)NULL, _IOLBF, 0 ); 
     
    109118    { 
    110119        msg_Err( p_intf, "out of memory" ); 
    111         return( 1 )
     120        return 1
    112121    } 
    113122 
     
    121130 
    122131    printf( "remote control interface initialized, `h' for help\n" ); 
    123     return( 0 )
     132    return 0
    124133} 
    125134 
  • src/input/input.c

    r8fbbb95 r3a31acc  
    55 ***************************************************************************** 
    66 * Copyright (C) 1998-2001 VideoLAN 
    7  * $Id: input.c,v 1.204 2002/06/08 14:08:46 sam Exp $ 
     7 * $Id: input.c,v 1.205 2002/06/27 19:05:17 sam Exp $ 
    88 * 
    99 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    457457    if( p_input->p_access_module == NULL ) 
    458458    { 
    459         msg_Err( p_input, "no suitable access module for `%s/%s:%s'", 
     459        msg_Err( p_input, "no suitable access module for `%s/%s://%s'", 
    460460                 p_input->psz_access, p_input->psz_demux, p_input->psz_name ); 
    461461        return -1; 
     
    500500    if( p_input->p_demux_module == NULL ) 
    501501    { 
    502         msg_Err( p_input, "no suitable demux module for `%s/%s:%s'", 
     502        msg_Err( p_input, "no suitable demux module for `%s/%s://%s'", 
    503503                 p_input->psz_access, p_input->psz_demux, p_input->psz_name ); 
    504504        module_Unneed( p_input->p_access_module ); 
  • src/input/input_ext-plugins.c

    r71ec135 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: input_ext-plugins.c,v 1.12 2002/06/01 18:04:49 sam Exp $ 
     5 * $Id: input_ext-plugins.c,v 1.13 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    668668    input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; 
    669669 
    670     msg_Info( p_input, "closing `%s/%s:%s'",  
     670    msg_Info( p_input, "closing `%s/%s://%s'",  
    671671              p_input->psz_access, p_input->psz_demux, p_input->psz_name ); 
    672672  
     
    682682    input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; 
    683683 
    684     msg_Info( p_input, "closing network `%s/%s:%s'",  
     684    msg_Info( p_input, "closing network `%s/%s://%s'",  
    685685              p_input->psz_access, p_input->psz_demux, p_input->psz_name ); 
    686686  
  • src/libvlc.c

    rcecb7e8 r3a31acc  
    55 ***************************************************************************** 
    66 * Copyright (C) 1998-2001 VideoLAN 
    7  * $Id: libvlc.c,v 1.10 2002/06/11 09:44:22 gbazin Exp $ 
     7 * $Id: libvlc.c,v 1.11 2002/06/27 19:05:17 sam Exp $ 
    88 * 
    99 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    9393/* A list of all the currently allocated vlc objects */ 
    9494static volatile int i_vlc = 0; 
     95static volatile int i_unique = 0; 
    9596static volatile vlc_t **pp_vlc = NULL; 
    9697 
     
    156157    pp_vlc[ i_vlc ] = p_vlc; 
    157158    i_vlc++; 
     159    p_vlc->i_unique = i_unique; 
     160    i_unique++; 
    158161    vlc_mutex_unlock( p_vlc->p_global_lock ); 
    159162 
  • src/libvlc.h

    rcecb7e8 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998-2002 VideoLAN 
    5  * $Id: libvlc.h,v 1.4 2002/06/11 09:44:22 gbazin Exp $ 
     5 * $Id: libvlc.h,v 1.5 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    5656    "open when looking for a file.") 
    5757 
     58#define PLUGIN_PATH_TEXT N_("plugin search path") 
     59#define PLUGIN_PATH_LONGTEXT N_( \ 
     60    "This option allows you to specify an additional path for vlc to look" \ 
     61    "for its plugins.") 
     62 
    5863#define AOUT_TEXT N_("audio output module") 
    5964#define AOUT_LONGTEXT N_( \ 
     
    319324ADD_BOOL            ( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT ) 
    320325ADD_STRING  ( "search-path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT ) 
     326ADD_STRING  ( "plugin-path", NULL, NULL, PLUGIN_PATH_TEXT, PLUGIN_PATH_LONGTEXT ) 
    321327 
    322328/* Audio options */ 
  • src/misc/messages.c

    r71ec135 r3a31acc  
    55 ***************************************************************************** 
    66 * Copyright (C) 1998-2002 VideoLAN 
    7  * $Id: messages.c,v 1.2 2002/06/01 18:04:49 sam Exp $ 
     7 * $Id: messages.c,v 1.3 2002/06/27 19:05:17 sam Exp $ 
    88 * 
    99 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    334334            static const char *ppsz_color[4] = { WHITE, RED, YELLOW, GRAY }; 
    335335 
    336             fprintf( stderr, "[" GREEN "%.8x" GRAY "] " "%s%s" 
    337                      ": %s%s" GRAY "\n", p_this->i_object_id, psz_module, 
    338                      ppsz_type[i_type], ppsz_color[i_type], psz_str ); 
     336            fprintf( stderr, "[" GREEN "%.2x" GRAY ":" GREEN "%.6x" GRAY "] " 
     337                             "%s%s: %s%s" GRAY "\n", p_this->p_vlc->i_unique, 
     338                             p_this->i_object_id, psz_module, 
     339                             ppsz_type[i_type], ppsz_color[i_type], psz_str ); 
    339340        } 
    340341        else 
    341342        { 
    342             fprintf( stderr, "[%.8x] %s%s: %s\n", p_this->i_object_id, 
     343            fprintf( stderr, "[%.2x:%.6x] %s%s: %s\n", 
     344                             p_this->p_vlc->i_unique, p_this->i_object_id, 
    343345                             psz_module, ppsz_type[i_type], psz_str ); 
    344346        } 
  • src/misc/modules.c

    rcecb7e8 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: modules.c,v 1.68 2002/06/11 09:44:22 gbazin Exp $ 
     5 * $Id: modules.c,v 1.69 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    579579static void AllocateAllPlugins( vlc_object_t *p_this ) 
    580580{ 
    581     static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL }; 
     581    /* Yes, there are two NULLs because we replace one with "plugin-path". */ 
     582    char *          path[] = { "plugins", PLUGIN_PATH, NULL, NULL }; 
    582583 
    583584    char **         ppsz_path = path; 
     
    591592    DIR *           dir; 
    592593    struct dirent * file; 
     594 
     595    /* If the user provided a plugin path, we add it to the list */ 
     596    path[ sizeof(path)/sizeof(char*) - 2 ] = config_GetPsz( p_this, 
     597                                                            "plugin-path" ); 
    593598 
    594599    for( ; *ppsz_path != NULL ; ppsz_path++ ) 
  • src/vlc.c

    r9e3ab28 r3a31acc  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998-2001 VideoLAN 
    5  * $Id: vlc.c,v 1.1 2002/06/01 12:32:01 sam Exp $ 
     5 * $Id: vlc.c,v 1.2 2002/06/27 19:05:17 sam Exp $ 
    66 * 
    77 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    6969    /* Add background interfaces */ 
    7070    //{ int i; for( i=10; i--; ) vlc_add_intf( p_vlc, "dummy", 0 ); } 
    71     vlc_add_intf( p_vlc, "dummy", VLC_FALSE ); 
    72     vlc_add_intf( p_vlc, "logger", VLC_FALSE ); 
     71    //vlc_add_intf( p_vlc, "dummy", VLC_FALSE ); 
     72    //vlc_add_intf( p_vlc, "logger", VLC_FALSE ); 
    7373    vlc_add_intf( p_vlc, "rc", VLC_FALSE ); 
    7474