1 /*****************************************************************************
2 * vcd.c : VCD input module for vlc
3 *****************************************************************************
4 * Copyright (C) 2000,2003 VideoLAN
5 * $Id: vcd.c,v 1.14 2004/01/25 14:42:18 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_LONGTEXT N_( \
53 "This integer when viewed in binary is a debugging mask\n" \
58 "all calls (10) 16\n" \
61 "libcdio (80) 128\n" \
62 "seek-set (100) 256\n" \
63 "seek-cur (200) 512\n" \
64 "still (400) 1024\n" \
65 "vcdinfo (800) 2048\n" )
67 #define VCD_TITLE_FMT_LONGTEXT N_( \
68 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
69 "Format specifiers that start with a percent sign. Specifiers are: \n" \
70 " %A : The album information\n" \
71 " %C : The VCD volume count - the number of CDs in the collection\n" \
72 " %c : The VCD volume num - the number of the CD in the collection.\n" \
73 " %F : The VCD Format, e.g. VCD 1.0, VCD 1.1, VCD 2.0, or SVC\n" \
74 " %I : The current entry/segment/playback type, e.g. ENTRY, TRACK, SEGMENT...\n" \
75 " %L : The playlist ID prefixed with \" LID\" if it exists\n" \
76 " %N : The current number of the %I - a decimal number\n" \
77 " %P : The publisher ID\n" \
78 " %p : The preparer I\n" \
79 " %S : If we are in a segment (menu), the kind of segment\n" \
80 " %T : The track number\n" \
81 " %V : The volume set I\n" \
82 " %v : The volume I\n" \
83 " A number between 1 and the volume count.\n" \
86 /*****************************************************************************
88 *****************************************************************************/
91 add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") );
92 set_description( _("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") );
93 set_capability( "access", 85 /* slightly higher than vcd */ );
94 set_callbacks( E_(Open), E_(Close) );
95 add_shortcut( "vcd" );
96 add_shortcut( "vcdx" );
98 /* Configuration options */
99 add_category_hint( N_("VCDX"), NULL, VLC_TRUE );
101 add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback),
102 N_("If nonzero, this gives additional debug information."),
103 DEBUG_LONGTEXT, VLC_TRUE );
105 add_bool( MODULE_STRING "-PBC", 0, NULL,
106 N_("Use playback control?"),
107 N_("If VCD is authored with playback control, use it. "
108 "Otherwise we play by tracks."),
111 add_string( MODULE_STRING "-author-format",
112 "%v - %F disc %c of %C",
114 N_("Format to use in playlist \"author\""),
115 VCD_TITLE_FMT_LONGTEXT, VLC_TRUE );
117 add_string( MODULE_STRING "-title-format",
120 N_("Format to use in playlist \"title\" field"),
121 VCD_TITLE_FMT_LONGTEXT, VLC_TRUE );
125 set_capability( "demux", 0 );
126 set_callbacks( E_(InitVCD), E_(EndVCD) );
130 set_capability( "interface", 0 );
131 set_callbacks( E_(OpenIntf), E_(CloseIntf) );