1 /*****************************************************************************
2 * vcd.c : VCD input module for vlc
3 *****************************************************************************
4 * Copyright (C) 2000,2003 VideoLAN
5 * $Id: vcd.c,v 1.9 2003/11/26 01:28:52 rocky Exp $
7 * Authors: Rocky Bernstein <rocky@panix.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * top-level module code - handles options, shortcuts, loads sub-modules.
26 *****************************************************************************/
28 /*****************************************************************************
30 *****************************************************************************/
34 /*****************************************************************************
36 *****************************************************************************/
37 int E_(Open) ( vlc_object_t * );
38 void E_(Close) ( vlc_object_t * );
39 int E_(OpenIntf) ( vlc_object_t * );
40 void E_(CloseIntf) ( vlc_object_t * );
41 int E_(InitVCD) ( vlc_object_t * );
42 void E_(EndVCD) ( vlc_object_t * );
44 int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
45 vlc_value_t oldval, vlc_value_t val,
48 /*****************************************************************************
50 *****************************************************************************/
52 #define DEBUG_TEXT N_("set debug mask for additional debugging.")
53 #define DEBUG_LONGTEXT N_( \
54 "This integer when viewed in binary is a debugging mask\n" \
59 "all calls (10) 16\n" \
62 "libcdio (80) 128\n" \
63 "seek-set (100) 256\n" \
64 "seek-cur (200) 512\n" \
65 "still (400) 1024\n" \
66 "vcdinfo (800) 2048\n" )
68 #define DEV_TEXT N_("Video device name")
69 #define DEV_LONGTEXT N_( \
70 "Specify the name of the video device that will be used by default. " \
71 "If you don't specify anything, we'll scan for a suitable VCD device.")
74 /*****************************************************************************
76 *****************************************************************************/
79 add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") );
80 set_description( _("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") );
81 set_capability( "access", 85 /* slightly higher than vcd */ );
82 set_callbacks( E_(Open), E_(Close) );
83 add_shortcut( "vcd" );
84 add_shortcut( "vcdx" );
86 /* Configuration options */
87 add_category_hint( N_("VCDX"), NULL, VLC_TRUE );
89 add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), DEBUG_TEXT,
90 DEBUG_LONGTEXT, VLC_TRUE );
92 add_string( MODULE_STRING "-device", "", NULL, DEV_TEXT,
93 DEV_LONGTEXT, VLC_TRUE );
95 add_bool( MODULE_STRING "-PBC", 0, NULL,
96 "Use playback control?",
97 "If VCD is authored with playback control, use it. "
98 "Otherwise we play by tracks.",
103 set_capability( "demux", 0 );
104 set_callbacks( E_(InitVCD), E_(EndVCD) );
108 set_capability( "interface", 0 );
109 set_callbacks( E_(OpenIntf), E_(CloseIntf) );