From 8a55f6f405697f14d0404925174c5fc93fdf3273 Mon Sep 17 00:00:00 2001 From: Rocky Bernstein <rocky@videolan.org> Date: Sun, 23 Nov 2003 14:34:19 +0000 Subject: [PATCH] Add configuration options to set default device. For VCD's add configuration option to specify whether or not to use PBC. --- modules/access/cddax.c | 13 ++++++++++--- modules/access/vcdx/access.c | 15 ++++++++++----- modules/access/vcdx/vcd.c | 19 ++++++++++++++++++- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/modules/access/cddax.c b/modules/access/cddax.c index 61b12278edbb..366ffd8b3876 100644 --- a/modules/access/cddax.c +++ b/modules/access/cddax.c @@ -2,7 +2,7 @@ * cddax.c : CD digital audio input module for vlc using libcdio ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: cddax.c,v 1.3 2003/10/05 14:51:47 rocky Exp $ + * $Id: cddax.c,v 1.4 2003/11/23 14:34:19 rocky Exp $ * * Authors: Laurent Aimar <fenrir@via.ecp.fr> * Gildas Bazin <gbazin@netcourrier.com> @@ -90,6 +90,11 @@ struct demux_sys_t "libcdio (10) 16\n" \ "seeks (20) 32\n" ) +#define DEV_TEXT N_("CD-ROM device name") +#define DEV_LONGTEXT N_( \ + "Specify the name of the CD-ROM device that will be used by default. " \ + "If you don't specify anything, we'll scan for a suitable CD-ROM device.") + #define INPUT_DEBUG 1 #if INPUT_DEBUG #define dbg_print(mask, s, args...) \ @@ -143,6 +148,8 @@ vlc_module_begin(); add_category_hint( N_("CDX"), NULL, VLC_TRUE ); add_integer ( MODULE_STRING "-debug", 0, debug_callback, DEBUG_TEXT, DEBUG_LONGTEXT, VLC_TRUE ); + add_string( MODULE_STRING "-device", "", NULL, DEV_TEXT, + DEV_LONGTEXT, VLC_TRUE ); add_submodule(); set_description( _("CD Audio demux") ); @@ -252,8 +259,8 @@ static int CDDAOpen( vlc_object_t *p_this ) } psz_source = config_GetPsz( p_input, MODULE_STRING "-device" ); - if( !psz_source ) { - /* Scan for a CD with a CD-DA in it. */ + if( !psz_source || 0==strlen(psz_source) ) { + /* Scan for a CD-ROM drive with a CD-DA in it. */ char **cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (NULL == cd_drives) return -1; diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c index fcb58aaa2bfe..027a4e4f0422 100644 --- a/modules/access/vcdx/access.c +++ b/modules/access/vcdx/access.c @@ -4,7 +4,7 @@ * to go here. ***************************************************************************** * Copyright (C) 2000,2003 VideoLAN - * $Id: access.c,v 1.3 2003/11/20 03:56:22 rocky Exp $ + * $Id: access.c,v 1.4 2003/11/23 14:34:19 rocky Exp $ * * Authors: Rocky Bernstein <rocky@panix.com> * Johan Bilien <jobi@via.ecp.fr> @@ -939,8 +939,13 @@ VCDParse( input_thread_t * p_input, /*out*/ vcdinfo_itemid_t * p_itemid ) char * psz_source; char * psz_next; - p_itemid->type=VCDINFO_ITEM_TYPE_TRACK; - p_itemid->num=1; + if ( config_GetInt( p_input, MODULE_STRING "-PBC" ) ) { + p_itemid->type=VCDINFO_ITEM_TYPE_LID; + p_itemid->num=1; + } else { + p_itemid->type=VCDINFO_ITEM_TYPE_TRACK; + p_itemid->num=1; + } #ifdef WIN32 /* On Win32 we want the VCD access plugin to be explicitly requested, @@ -1008,8 +1013,8 @@ VCDParse( input_thread_t * p_input, /*out*/ vcdinfo_itemid_t * p_itemid ) psz_source = config_GetPsz( p_input, MODULE_STRING "-device" ); - if( !psz_source ) { - /* Scan for a CD with a VCD in it. */ + if( !psz_source || 0==strlen(psz_source) ) { + /* Scan for a CD-ROM drive with a VCD in it. */ char **cd_drives = cdio_get_devices_with_cap(NULL, (CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD |CDIO_FS_ANAL_VIDEOCD|CDIO_FS_UNKNOWN), diff --git a/modules/access/vcdx/vcd.c b/modules/access/vcdx/vcd.c index d69364f6423e..fffcaaa5d3bd 100644 --- a/modules/access/vcdx/vcd.c +++ b/modules/access/vcdx/vcd.c @@ -2,7 +2,7 @@ * vcd.c : VCD input module for vlc ***************************************************************************** * Copyright (C) 2000,2003 VideoLAN - * $Id: vcd.c,v 1.6 2003/11/20 03:56:22 rocky Exp $ + * $Id: vcd.c,v 1.7 2003/11/23 14:34:19 rocky Exp $ * * Authors: Rocky Bernstein <rocky@panix.com> * @@ -62,6 +62,11 @@ int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name, "still (80) 128\n" \ "vcdinfo (100) 256\n" ) +#define DEV_TEXT N_("Video device name") +#define DEV_LONGTEXT N_( \ + "Specify the name of the video device that will be used by default. " \ + "If you don't specify anything, we'll scan for a suitable VCD device.") + /***************************************************************************** * Module descriptor @@ -77,9 +82,21 @@ vlc_module_begin(); /* Configuration options */ add_category_hint( N_("VCDX"), NULL, VLC_TRUE ); + add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), DEBUG_TEXT, DEBUG_LONGTEXT, VLC_TRUE ); + add_string( MODULE_STRING "-device", "", NULL, DEV_TEXT, + DEV_LONGTEXT, VLC_TRUE ); + + add_bool( MODULE_STRING "-PBC", 0, NULL, + "Use playback control?", + "If VCD is authored with playback control, use it. " + "Otherwise we play by tracks.", + VLC_TRUE ); + + + #ifdef FIXED add_submodule(); set_capability( "demux", 0 ); -- GitLab