]> git.sesse.net Git - vlc/blob - modules/access/vcdx/vcd.c
Merge branch 'master' into lpcm_encoder
[vlc] / modules / access / vcdx / vcd.c
1 /*****************************************************************************
2  * vcd.c : VCD input module for vlc
3  *****************************************************************************
4  * Copyright (C) 2000, 2003, 2004, 2005 the VideoLAN team
5  * $Id$
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 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  *****************************************************************************/
23
24 /*****************************************************************************
25  * top-level module code - handles options, shortcuts, loads sub-modules.
26  *****************************************************************************/
27
28 /*****************************************************************************
29  * Preamble
30  *****************************************************************************/
31
32 #ifdef HAVE_CONFIG_H
33 # include "config.h"
34 #endif
35
36 #include <vlc_common.h>
37 #include <vlc_plugin.h>
38
39 #include "vcd.h"
40 #include "access.h"
41
42 /*****************************************************************************
43  * Option help text
44  *****************************************************************************/
45
46 #define DEBUG_LONGTEXT \
47     "This integer when viewed in binary is a debugging mask\n" \
48     "meta info         1\n" \
49     "event info        2\n" \
50     "MRL               4\n" \
51     "external call     8\n" \
52     "all calls (10)   16\n" \
53     "LSN       (20)   32\n" \
54     "PBC       (40)   64\n" \
55     "libcdio   (80)  128\n" \
56     "seek-set (100)  256\n" \
57     "seek-cur (200)  512\n" \
58     "still    (400) 1024\n" \
59     "vcdinfo  (800) 2048\n"
60
61 #define VCD_TITLE_FMT_LONGTEXT \
62 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
63 "Format specifiers that start with a percent sign. Specifiers are: \n" \
64 "   %A : The album information\n" \
65 "   %C : The VCD volume count - the number of CDs in the collection\n" \
66 "   %c : The VCD volume num - the number of the CD in the collection.\n" \
67 "   %F : The VCD Format, e.g. VCD 1.0, VCD 1.1, VCD 2.0, or SVCD\n" \
68 "   %I : The current entry/segment/playback type, e.g. ENTRY, TRACK, SEGMENT...\n" \
69 "   %L : The playlist ID prefixed with \" LID\" if it exists\n" \
70 "   %N : The current number of the %I - a decimal number\n" \
71 "   %P : The publisher ID\n" \
72 "   %p : The preparer ID\n" \
73 "   %S : If we are in a segment (menu), the kind of segment\n" \
74 "   %T : The MPEG track number (starts at 1)\n" \
75 "   %V : The volume set ID\n" \
76 "   %v : The volume ID\n" \
77 "       A number between 1 and the volume count.\n" \
78 "   %% : a % \n"
79
80 /*****************************************************************************
81  * Module descriptor
82  *****************************************************************************/
83
84 vlc_module_begin ()
85     set_shortname( N_("(Super) Video CD"))
86     set_description( N_("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") )
87     add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") )
88     add_shortcut( "vcdx" )
89     set_category( CAT_INPUT )
90     set_subcategory( SUBCAT_INPUT_ACCESS )
91     set_capability( "access", 55 /* slightly lower than vcd */ )
92     set_callbacks( VCDOpen, VCDClose )
93
94     /* Configuration options */
95     add_integer ( MODULE_STRING "-debug", 0, NULL,
96                   N_("If nonzero, this gives additional debug information."),
97                   DEBUG_LONGTEXT, true )
98
99     add_integer ( MODULE_STRING "-blocks-per-read", 20,
100           NULL,
101                   N_("Number of CD blocks to get in a single read."),
102                   N_("Number of CD blocks to get in a single read."),
103           true )
104
105     add_bool( MODULE_STRING "-PBC", false, NULL,
106               N_("Use playback control?"),
107               N_("If VCD is authored with playback control, use it. "
108                  "Otherwise we play by tracks."),
109               false )
110
111     add_bool( MODULE_STRING "-track-length", true,
112           NULL,
113               N_("Use track length as maximum unit in seek?"),
114               N_("If set, the length of the seek bar is the track rather than "
115          "the length of an entry."),
116               false )
117
118     add_bool( MODULE_STRING "-extended-info", false, NULL,
119               N_("Show extended VCD info?"),
120               N_("Show the maximum amount of information under Stream and "
121                  "Media Info. Shows for example playback control navigation."),
122               false )
123
124     add_string( MODULE_STRING "-author-format",
125                 "%v - %F disc %c of %C",
126                 NULL,
127                 N_("Format to use in the playlist's \"author\" field."),
128                 VCD_TITLE_FMT_LONGTEXT, true )
129
130     add_string( MODULE_STRING "-title-format",
131                 "%I %N %L%S - %M %A %v - disc %c of %C %F",
132                 NULL,
133                 N_("Format to use in the playlist's \"title\" field."),
134                 VCD_TITLE_FMT_LONGTEXT, false )
135
136 vlc_module_end ()
137