Changeset 3a31acccc1b5720c3256c4677ac85282915fc610
- 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
| rf60d5d5 |
r3a31acc |
|
| 4 | 4 | ***************************************************************************** |
|---|
| 5 | 5 | * 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 $ |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 72 | 72 | vlc_mutex_t config_lock; /* lock for the config file */ |
|---|
| 73 | 73 | vlc_mutex_t structure_lock; /* lock for the p_vlc tree */ |
|---|
| | 74 | int i_unique; /* p_vlc occurence # */ |
|---|
| 74 | 75 | int i_counter; /* object counter */ |
|---|
| 75 | 76 | |
|---|
| … | … | |
| 78 | 79 | void ** pp_global_data; |
|---|
| 79 | 80 | |
|---|
| 80 | | /* Private data */ |
|---|
| | 81 | /* System-specific variables */ |
|---|
| 81 | 82 | #if defined( SYS_BEOS ) |
|---|
| 82 | 83 | vlc_object_t * p_appthread; |
|---|
| re405691 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 151 | 151 | "%s" |
|---|
| 152 | 152 | HTTP_USERAGENT HTTP_END, |
|---|
| 153 | | p_access_data->psz_buffer, i_tell ); |
|---|
| | 153 | p_access_data->psz_buffer ); |
|---|
| 154 | 154 | } |
|---|
| 155 | 155 | psz_buffer[sizeof(psz_buffer) - 1] = '\0'; |
|---|
| rb2b0749 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| 7 | 7 | * |
|---|
| … | … | |
| 34 | 34 | #include "video.h" |
|---|
| 35 | 35 | |
|---|
| 36 | | /***************************************************************************** |
|---|
| 37 | | * Constants |
|---|
| 38 | | *****************************************************************************/ |
|---|
| | 36 | #include "libioRIFF.h" |
|---|
| | 37 | #include "avi.h" |
|---|
| 39 | 38 | |
|---|
| 40 | 39 | /***************************************************************************** |
|---|
| … | … | |
| 63 | 62 | MODULE_DEACTIVATE_START |
|---|
| 64 | 63 | MODULE_DEACTIVATE_STOP |
|---|
| 65 | | |
|---|
| 66 | | /***************************************************************************** |
|---|
| 67 | | * Definition of structures and libraries for this plugins |
|---|
| 68 | | *****************************************************************************/ |
|---|
| 69 | | #include "libioRIFF.h" |
|---|
| 70 | | #include "avi.h" |
|---|
| 71 | 64 | |
|---|
| 72 | 65 | /***************************************************************************** |
|---|
| r31f4719 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| 7 | 7 | * |
|---|
| … | … | |
| 21 | 21 | *****************************************************************************/ |
|---|
| 22 | 22 | |
|---|
| 23 | | #include <stdlib.h> |
|---|
| | 23 | /***************************************************************************** |
|---|
| | 24 | * Preamble |
|---|
| | 25 | *****************************************************************************/ |
|---|
| | 26 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| | 27 | |
|---|
| 24 | 28 | #include <vlc/vlc.h> |
|---|
| 25 | 29 | #include <vlc/input.h> |
|---|
| 26 | | #include <video.h> |
|---|
| | 30 | |
|---|
| | 31 | #include "video.h" |
|---|
| 27 | 32 | |
|---|
| 28 | 33 | #include "libioRIFF.h" |
|---|
| r5c13c83 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Peter Surda <shurdeek@panorama.sth.ac.at> |
|---|
| … | … | |
| 101 | 101 | static int intf_Open( intf_thread_t *p_intf ) |
|---|
| 102 | 102 | { |
|---|
| | 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 | |
|---|
| 103 | 112 | /* Non-buffered stdout */ |
|---|
| 104 | 113 | setvbuf( stdout, (char *)NULL, _IOLBF, 0 ); |
|---|
| … | … | |
| 109 | 118 | { |
|---|
| 110 | 119 | msg_Err( p_intf, "out of memory" ); |
|---|
| 111 | | return( 1 ); |
|---|
| | 120 | return 1; |
|---|
| 112 | 121 | } |
|---|
| 113 | 122 | |
|---|
| … | … | |
| 121 | 130 | |
|---|
| 122 | 131 | printf( "remote control interface initialized, `h' for help\n" ); |
|---|
| 123 | | return( 0 ); |
|---|
| | 132 | return 0; |
|---|
| 124 | 133 | } |
|---|
| 125 | 134 | |
|---|
| r8fbbb95 |
r3a31acc |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * 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 $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 457 | 457 | if( p_input->p_access_module == NULL ) |
|---|
| 458 | 458 | { |
|---|
| 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'", |
|---|
| 460 | 460 | p_input->psz_access, p_input->psz_demux, p_input->psz_name ); |
|---|
| 461 | 461 | return -1; |
|---|
| … | … | |
| 500 | 500 | if( p_input->p_demux_module == NULL ) |
|---|
| 501 | 501 | { |
|---|
| 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'", |
|---|
| 503 | 503 | p_input->psz_access, p_input->psz_demux, p_input->psz_name ); |
|---|
| 504 | 504 | module_Unneed( p_input->p_access_module ); |
|---|
| r71ec135 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 668 | 668 | input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; |
|---|
| 669 | 669 | |
|---|
| 670 | | msg_Info( p_input, "closing `%s/%s:%s'", |
|---|
| | 670 | msg_Info( p_input, "closing `%s/%s://%s'", |
|---|
| 671 | 671 | p_input->psz_access, p_input->psz_demux, p_input->psz_name ); |
|---|
| 672 | 672 | |
|---|
| … | … | |
| 682 | 682 | input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; |
|---|
| 683 | 683 | |
|---|
| 684 | | msg_Info( p_input, "closing network `%s/%s:%s'", |
|---|
| | 684 | msg_Info( p_input, "closing network `%s/%s://%s'", |
|---|
| 685 | 685 | p_input->psz_access, p_input->psz_demux, p_input->psz_name ); |
|---|
| 686 | 686 | |
|---|
| rcecb7e8 |
r3a31acc |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * 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 $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 93 | 93 | /* A list of all the currently allocated vlc objects */ |
|---|
| 94 | 94 | static volatile int i_vlc = 0; |
|---|
| | 95 | static volatile int i_unique = 0; |
|---|
| 95 | 96 | static volatile vlc_t **pp_vlc = NULL; |
|---|
| 96 | 97 | |
|---|
| … | … | |
| 156 | 157 | pp_vlc[ i_vlc ] = p_vlc; |
|---|
| 157 | 158 | i_vlc++; |
|---|
| | 159 | p_vlc->i_unique = i_unique; |
|---|
| | 160 | i_unique++; |
|---|
| 158 | 161 | vlc_mutex_unlock( p_vlc->p_global_lock ); |
|---|
| 159 | 162 | |
|---|
| rcecb7e8 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 56 | 56 | "open when looking for a file.") |
|---|
| 57 | 57 | |
|---|
| | 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 | |
|---|
| 58 | 63 | #define AOUT_TEXT N_("audio output module") |
|---|
| 59 | 64 | #define AOUT_LONGTEXT N_( \ |
|---|
| … | … | |
| 319 | 324 | ADD_BOOL ( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT ) |
|---|
| 320 | 325 | ADD_STRING ( "search-path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT ) |
|---|
| | 326 | ADD_STRING ( "plugin-path", NULL, NULL, PLUGIN_PATH_TEXT, PLUGIN_PATH_LONGTEXT ) |
|---|
| 321 | 327 | |
|---|
| 322 | 328 | /* Audio options */ |
|---|
| r71ec135 |
r3a31acc |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * 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 $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 334 | 334 | static const char *ppsz_color[4] = { WHITE, RED, YELLOW, GRAY }; |
|---|
| 335 | 335 | |
|---|
| 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 ); |
|---|
| 339 | 340 | } |
|---|
| 340 | 341 | else |
|---|
| 341 | 342 | { |
|---|
| 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, |
|---|
| 343 | 345 | psz_module, ppsz_type[i_type], psz_str ); |
|---|
| 344 | 346 | } |
|---|
| rcecb7e8 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 579 | 579 | static void AllocateAllPlugins( vlc_object_t *p_this ) |
|---|
| 580 | 580 | { |
|---|
| 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 }; |
|---|
| 582 | 583 | |
|---|
| 583 | 584 | char ** ppsz_path = path; |
|---|
| … | … | |
| 591 | 592 | DIR * dir; |
|---|
| 592 | 593 | 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" ); |
|---|
| 593 | 598 | |
|---|
| 594 | 599 | for( ; *ppsz_path != NULL ; ppsz_path++ ) |
|---|
| r9e3ab28 |
r3a31acc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 69 | 69 | /* Add background interfaces */ |
|---|
| 70 | 70 | //{ 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 ); |
|---|
| 73 | 73 | vlc_add_intf( p_vlc, "rc", VLC_FALSE ); |
|---|
| 74 | 74 | |
|---|