]> git.sesse.net Git - vlc/blob - modules/access/cdda/cdda.c
Remove most stray semi-colons in module descriptions
[vlc] / modules / access / cdda / cdda.c
1 /*****************************************************************************
2  * cdda.c : CD digital audio input module for vlc using libcdio
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
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27
28 #include "callback.h"
29 #include "access.h"
30 #include <cdio/version.h>
31 #include <vlc_plugin.h>
32
33 /*****************************************************************************
34  * Module descriptor
35  *****************************************************************************/
36
37 /*****************************************************************************
38  * Option help text
39  *****************************************************************************/
40
41 #if LIBCDIO_VERSION_NUM >= 72
42 static const char *const psz_paranoia_list[] = { "none", "overlap", "full" };
43 static const char *const psz_paranoia_list_text[] = { N_("none"), N_("overlap"),
44                                           N_("full") };
45 #endif
46
47 #define DEBUG_LONGTEXT N_( \
48     "This integer when viewed in binary is a debugging mask\n" \
49     "meta info          1\n" \
50     "events             2\n" \
51     "MRL                4\n" \
52     "external call      8\n" \
53     "all calls (0x10)  16\n" \
54     "LSN       (0x20)  32\n" \
55     "seek      (0x40)  64\n" \
56     "libcdio   (0x80) 128\n" \
57     "libcddb  (0x100) 256\n" )
58
59 #define CACHING_LONGTEXT N_( \
60     "Caching value for CDDA streams. This " \
61     "value should be set in millisecond units." )
62
63 #define BLOCKS_PER_READ_LONGTEXT N_( \
64     "How many CD blocks to get on a single CD read. " \
65     "Generally on newer/faster CDs, this increases throughput at the " \
66     "expense of a little more memory usage and initial delay. SCSI-MMC " \
67     "limitations generally don't allow for more than 25 blocks per access.")
68
69 #define CDDB_TITLE_FMT_LONGTEXT N_( \
70 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
71 "Format specifiers that start with a percent sign. Specifiers are: \n" \
72 "   %a : The artist (for the album)\n" \
73 "   %A : The album information\n" \
74 "   %C : Category\n" \
75 "   %e : The extended data (for a track)\n" \
76 "   %I : CDDB disk ID\n" \
77 "   %G : Genre\n" \
78 "   %M : The current MRL\n" \
79 "   %m : The CD-DA Media Catalog Number (MCN)\n" \
80 "   %n : The number of tracks on the CD\n" \
81 "   %p : The artist/performer/composer in the track\n" \
82 "   %T : The track number\n" \
83 "   %s : Number of seconds in this track\n" \
84 "   %S : Number of seconds in the CD\n" \
85 "   %t : The track title or MRL if no title\n" \
86 "   %Y : The year 19xx or 20xx\n" \
87 "   %% : a % \n")
88
89 #define TITLE_FMT_LONGTEXT N_( \
90 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
91 "Format specifiers that start with a percent sign. Specifiers are: \n" \
92 "   %M : The current MRL\n" \
93 "   %m : The CD-DA Media Catalog Number (MCN)\n" \
94 "   %n : The number of tracks on the CD\n" \
95 "   %T : The track number\n" \
96 "   %s : Number of seconds in this track\n" \
97 "   %S : Number of seconds in the CD\n" \
98 "   %t : The track title or MRL if no title\n" \
99 "   %% : a % \n")
100
101 #define PARANOIA_TEXT N_("Enable CD paranoia?")
102 #define PARANOIA_LONGTEXT N_( \
103         "Select whether to use CD Paranoia for jitter/error correction.\n" \
104         "none: no paranoia - fastest.\n" \
105         "overlap: do only overlap detection - not generally recommended.\n" \
106         "full: complete jitter and error correction detection - slowest.\n" )
107
108 /*****************************************************************************
109  * Module descriptor
110  *****************************************************************************/
111
112 vlc_module_begin ()
113     add_usage_hint( N_("cddax://[device-or-file][@[T]track]") )
114     set_description( N_("Compact Disc Digital Audio (CD-DA) input") )
115     set_capability( "access", 10 /* compare with priority of cdda */ )
116     set_shortname( N_("Audio Compact Disc"))
117     set_callbacks( CDDAOpen, CDDAClose )
118     add_shortcut( "cddax" )
119     add_shortcut( "cd" )
120     set_category( CAT_INPUT )
121     set_subcategory( SUBCAT_INPUT_ACCESS )
122
123     /* Configuration options */
124     add_integer ( MODULE_STRING "-debug", 0, CDDADebugCB,
125                   N_("Additional debug"),
126                   DEBUG_LONGTEXT, true );
127
128     add_integer( MODULE_STRING "-caching",
129                  DEFAULT_PTS_DELAY / MILLISECONDS_PER_SEC, NULL,
130                  N_("Caching value in microseconds"),
131                  CACHING_LONGTEXT, true );
132
133     add_integer( MODULE_STRING "-blocks-per-read",
134                  DEFAULT_BLOCKS_PER_READ, CDDABlocksPerReadCB,
135                  N_("Number of blocks per CD read"),
136                  BLOCKS_PER_READ_LONGTEXT, true );
137
138     add_string( MODULE_STRING "-title-format",
139                 "Track %T. %t", NULL,
140                 N_("Format to use in playlist \"title\" field when no CDDB"),
141                 TITLE_FMT_LONGTEXT, true );
142
143 #if LIBCDIO_VERSION_NUM >= 73
144     add_bool( MODULE_STRING "-analog-output", false, NULL,
145               N_("Use CD audio controls and output?"),
146               N_("If set, audio controls and audio jack output are used"),
147               false );
148 #endif
149
150     add_bool( MODULE_STRING "-cdtext-enabled", true, CDTextEnabledCB,
151               N_("Do CD-Text lookups?"),
152               N_("If set, get CD-Text information"),
153               false );
154
155     add_bool( MODULE_STRING "-navigation-mode", true,
156 #if FIXED
157           CDDANavModeCB,
158 #else
159           NULL,
160 #endif
161               N_("Use Navigation-style playback?"),
162               N_("Tracks are navigated via Navagation rather than "
163          "a playlist entries"),
164               false );
165
166 #if LIBCDIO_VERSION_NUM >= 72
167       add_string( MODULE_STRING "-paranoia", NULL, NULL,
168         PARANOIA_TEXT,
169         PARANOIA_LONGTEXT,
170         false );
171       change_string_list( psz_paranoia_list, psz_paranoia_list_text, 0 );
172 #endif /* LIBCDIO_VERSION_NUM >= 72 */
173
174 #ifdef HAVE_LIBCDDB
175     set_section( N_("CDDB" ), 0 )
176     add_string( MODULE_STRING "-cddb-title-format",
177                 "Track %T. %t - %p %A", NULL,
178                 N_("Format to use in playlist \"title\" field when using CDDB"),
179                 CDDB_TITLE_FMT_LONGTEXT, true );
180
181     add_bool( MODULE_STRING "-cddb-enabled", true, CDDBEnabledCB,
182               N_("CDDB lookups"),
183               N_("If set, lookup CD-DA track information using the CDDB "
184                  "protocol"),
185               false );
186
187     add_string( MODULE_STRING "-cddb-server", "freedb.freedb.org", NULL,
188                 N_("CDDB server"),
189                 N_( "Contact this CDDB server look up CD-DA information"),
190         true );
191
192     add_integer( MODULE_STRING "-cddb-port", 8880, NULL,
193                  N_("CDDB server port"),
194                  N_("CDDB server uses this port number to communicate on"),
195                  true );
196
197     add_string( MODULE_STRING "-cddb-email", "me@home", NULL,
198                 N_("email address reported to CDDB server"),
199                 N_("email address reported to CDDB server"),
200         true );
201
202     add_bool( MODULE_STRING "-cddb-enable-cache", true, NULL,
203               N_("Cache CDDB lookups?"),
204               N_("If set cache CDDB information about this CD"),
205               false );
206
207     add_bool( MODULE_STRING "-cddb-httpd", false, NULL,
208               N_("Contact CDDB via the HTTP protocol?"),
209               N_("If set, the CDDB server gets information via the CDDB HTTP "
210                  "protocol"),
211               true );
212
213     add_integer( MODULE_STRING "-cddb-timeout", 10, NULL,
214                  N_("CDDB server timeout"),
215                  N_("Time (in seconds) to wait for a response from the "
216                     "CDDB server"),
217                  false );
218
219     add_string( MODULE_STRING "-cddb-cachedir", "~/.cddbslave", NULL,
220                 N_("Directory to cache CDDB requests"),
221                 N_("Directory to cache CDDB requests"),
222         true );
223
224     add_bool( MODULE_STRING "-cdtext-prefer", true, CDTextPreferCB,
225               N_("Prefer CD-Text info to CDDB info?"),
226               N_("If set, CD-Text information will be preferred "
227          "to CDDB information when both are available"),
228               false );
229 #endif /*HAVE_LIBCDDB*/
230
231 vlc_module_end ()