]> git.sesse.net Git - vlc/blob - modules/access/vcdx/vcd.c
Minor name-change tidying up.
[vlc] / modules / access / vcdx / vcd.c
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 $
6  *
7  * Authors: Rocky Bernstein <rocky@panix.com> 
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 /*****************************************************************************
25  * top-level module code - handles options, shortcuts, loads sub-modules.
26  *****************************************************************************/
27
28 /*****************************************************************************
29  * Preamble
30  *****************************************************************************/
31
32 #include <vlc/vlc.h>
33
34 /*****************************************************************************
35  * Exported prototypes
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 * );
43
44 int  E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
45                          vlc_value_t oldval, vlc_value_t val, 
46                          void *p_data );
47
48 /*****************************************************************************
49  * Option help text
50  *****************************************************************************/
51
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" \
55     "meta info         1\n" \
56     "event info        2\n" \
57     "MRL               4\n" \
58     "external call     8\n" \
59     "all calls (10)   16\n" \
60     "LSN       (20)   32\n" \
61     "PBC       (40)   64\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" )
67
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.")
72
73
74 /*****************************************************************************
75  * Module descriptor
76  *****************************************************************************/
77
78 vlc_module_begin();
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" );
85
86     /* Configuration options */
87     add_category_hint( N_("VCDX"), NULL, VLC_TRUE );
88
89     add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), DEBUG_TEXT, 
90                   DEBUG_LONGTEXT, VLC_TRUE );
91
92     add_string( MODULE_STRING "-device", "", NULL, DEV_TEXT, 
93                 DEV_LONGTEXT, VLC_TRUE );
94
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.", 
99               VLC_TRUE );
100
101 #ifdef FIXED
102     add_submodule();
103         set_capability( "demux", 0 );
104         set_callbacks( E_(InitVCD), E_(EndVCD) );
105 #endif
106
107     add_submodule();
108         set_capability( "interface", 0 );
109         set_callbacks( E_(OpenIntf), E_(CloseIntf) );
110 vlc_module_end();
111