Commit 8a55f6f4 authored by Rocky Bernstein's avatar Rocky Bernstein

Add configuration options to set default device. For VCD's add

configuration option to specify whether or not to use PBC.
parent 2b015a6e
......@@ -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;
......
......@@ -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),
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment