1 /*****************************************************************************
2 * vcd.c : VCD input module for vlc
3 *****************************************************************************
4 * Copyright (C) 2000, 2003, 2004, 2005 the VideoLAN team
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 along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * top-level module code - handles options, shortcuts, loads sub-modules.
26 *****************************************************************************/
28 /*****************************************************************************
30 *****************************************************************************/
36 #include <vlc_common.h>
37 #include <vlc_plugin.h>
38 #include <vlc_charset.h>
43 /*****************************************************************************
45 *****************************************************************************/
47 #define DEBUG_LONGTEXT \
48 "This integer when viewed in binary is a debugging mask\n" \
53 "all calls (10) 16\n" \
56 "libcdio (80) 128\n" \
57 "seek-set (100) 256\n" \
58 "seek-cur (200) 512\n" \
59 "still (400) 1024\n" \
60 "vcdinfo (800) 2048\n"
62 #define VCD_TITLE_FMT_LONGTEXT \
63 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
64 "Format specifiers that start with a percent sign. Specifiers are: \n" \
65 " %A : The album information\n" \
66 " %C : The VCD volume count - the number of CDs in the collection\n" \
67 " %c : The VCD volume num - the number of the CD in the collection.\n" \
68 " %F : The VCD Format, e.g. VCD 1.0, VCD 1.1, VCD 2.0, or SVCD\n" \
69 " %I : The current entry/segment/playback type, e.g. ENTRY, TRACK, SEGMENT...\n" \
70 " %L : The playlist ID prefixed with \" LID\" if it exists\n" \
71 " %N : The current number of the %I - a decimal number\n" \
72 " %P : The publisher ID\n" \
73 " %p : The preparer ID\n" \
74 " %S : If we are in a segment (menu), the kind of segment\n" \
75 " %T : The MPEG track number (starts at 1)\n" \
76 " %V : The volume set ID\n" \
77 " %v : The volume ID\n" \
78 " A number between 1 and the volume count.\n" \
81 /*****************************************************************************
83 *****************************************************************************/
86 set_shortname( N_("(Super) Video CD"))
87 set_description( N_("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") )
88 add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") )
89 add_shortcut( "vcdx" )
90 set_category( CAT_INPUT )
91 set_subcategory( SUBCAT_INPUT_ACCESS )
92 set_capability( "access", 55 /* slightly lower than vcd */ )
93 set_callbacks( VCDOpen, VCDClose )
95 /* Configuration options */
96 add_integer ( MODULE_STRING "-debug", 0, NULL,
97 N_("If nonzero, this gives additional debug information."),
98 DEBUG_LONGTEXT, true )
100 add_integer ( MODULE_STRING "-blocks-per-read", 20,
102 N_("Number of CD blocks to get in a single read."),
103 N_("Number of CD blocks to get in a single read."),
106 add_bool( MODULE_STRING "-PBC", false, NULL,
107 N_("Use playback control?"),
108 N_("If VCD is authored with playback control, use it. "
109 "Otherwise we play by tracks."),
112 add_bool( MODULE_STRING "-track-length", true,
114 N_("Use track length as maximum unit in seek?"),
115 N_("If set, the length of the seek bar is the track rather than "
116 "the length of an entry."),
119 add_bool( MODULE_STRING "-extended-info", false, NULL,
120 N_("Show extended VCD info?"),
121 N_("Show the maximum amount of information under Stream and "
122 "Media Info. Shows for example playback control navigation."),
125 add_string( MODULE_STRING "-author-format",
126 "%v - %F disc %c of %C",
128 N_("Format to use in the playlist's \"author\" field."),
129 VCD_TITLE_FMT_LONGTEXT, true )
131 add_string( MODULE_STRING "-title-format",
132 "%I %N %L%S - %M %A %v - disc %c of %C %F",
134 N_("Format to use in the playlist's \"title\" field."),
135 VCD_TITLE_FMT_LONGTEXT, false )