]> git.sesse.net Git - vlc/blobdiff - modules/access/cdda/cdda.c
Long device text no longer used.
[vlc] / modules / access / cdda / cdda.c
index 8170d23371882a785fbabfb99d436602639aadf8..2fdf3f1c657c11bac0ce8b63bc9c42e88921b145 100644 (file)
@@ -2,7 +2,7 @@
  * cddax.c : CD digital audio input module for vlc using libcdio
  *****************************************************************************
  * Copyright (C) 2000,2003 VideoLAN
- * $Id: cdda.c,v 1.4 2003/11/30 22:26:48 rocky Exp $
+ * $Id: cdda.c,v 1.12 2003/12/11 13:20:20 rocky Exp $
  *
  * Authors: Rocky Bernstein <rocky@panix.com> 
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -41,9 +41,13 @@ void E_(CloseIntf)    ( vlc_object_t * );
 int  E_(DemuxOpen)    ( vlc_object_t * p_this);
 void E_(DemuxClose)   ( vlc_object_t * p_this);
 
-int  E_(DebugCallback)       ( vlc_object_t *p_this, const char *psz_name,
-                              vlc_value_t oldval, vlc_value_t val, 
-                              void *p_data );
+int  E_(DebugCB)      ( vlc_object_t *p_this, const char *psz_name,
+                       vlc_value_t oldval, vlc_value_t val, 
+                       void *p_data );
+
+int  E_(CDDBEnabledCB)( vlc_object_t *p_this, const char *psz_name,
+                       vlc_value_t oldval, vlc_value_t val, 
+                       void *p_data );
 
 /*****************************************************************************
  * Module descriptor
@@ -65,34 +69,37 @@ int  E_(DebugCallback)       ( vlc_object_t *p_this, const char *psz_name,
     "libcdio   (80) 128\n" \
     "libcddb  (100) 256\n" )
 
-#define DEV_LONGTEXT N_( \
-    "Specify the name of the CD-ROM device that will be used by default. " \
-    "If you don't specify anything, we'll scan for a suitable CD-ROM device.")
-
 #define CACHING_LONGTEXT N_( \
-    "Allows you to modify the default caching value for cdda streams. This " \
+    "Allows you to modify the default caching value for CDDA streams. This " \
     "value should be set in millisecond units." )
 
-#define TITLE_FMT_LONGTEXT N_( \
+#define CDDB_TITLE_FMT_LONGTEXT N_( \
 "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
 "Format specifiers that start with a percent sign. Specifiers are: \n" \
 "   %a : The artist\n" \
-"   %A : The album information \n" \
+"   %A : The album information\n" \
 "   %C : Category\n" \
 "   %I : CDDB disk ID\n" \
 "   %G : Genre\n" \
 "   %M : The current MRL\n" \
 "   %m : The CD-DA Media Catalog Number (MCN)\n" \
+"   %n : The number of tracks on the CD\n" \
+"   %p : The artist/performer/composer in the track\n" \
 "   %T : The track number\n" \
-"   %t : The name\n" \
+"   %s : Number of seconds in this track \n" \
+"   %t : The title\n" \
 "   %Y : The year 19xx or 20xx\n" \
-"   %% : a %\n")
+"   %% : a % \n")
 
-#ifdef HAVE_LIBCDDB
-#define DEFAULT_TITLE_FORMAT "%T %t",
-#else 
-#define DEFAULT_TILTE_FORMAT "%T %M",
-#endif
+#define TITLE_FMT_LONGTEXT N_( \
+"Format used in the GUI Playlist Title. Similar to the Unix date \n" \
+"Format specifiers that start with a percent sign. Specifiers are: \n" \
+"   %M : The current MRL\n" \
+"   %m : The CD-DA Media Catalog Number (MCN)\n" \
+"   %n : The number of tracks on the CD\n" \
+"   %T : The track number\n" \
+"   %s : Number of seconds in this track \n" \
+"   %% : a % \n")
 
 /*****************************************************************************
  * Module descriptor
@@ -109,7 +116,7 @@ vlc_module_begin();
     /* Configuration options */
     add_category_hint( N_("CDX"), NULL, VLC_TRUE );
 
-    add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), 
+    add_integer ( MODULE_STRING "-debug", 0, E_(DebugCB), 
                  N_("set debug mask for additional debugging."),
                   DEBUG_LONGTEXT, VLC_TRUE );
 
@@ -118,16 +125,18 @@ vlc_module_begin();
                 N_("Caching value in ms"), 
                 CACHING_LONGTEXT, VLC_TRUE );
 
-    add_string( MODULE_STRING "-device", "", NULL, 
-               N_("CD-ROM device name"),
-                DEV_LONGTEXT, VLC_FALSE );
-
-    add_string( MODULE_STRING "-title-format", DEFAULT_TITLE_FORMAT, NULL, 
-               N_("Format to use in playlist 'title' field"),
+    add_string( MODULE_STRING "-title-format", 
+               "%T %M", NULL, 
+               N_("Format to use in playlist 'title' field when no CDDB"),
                 TITLE_FMT_LONGTEXT, VLC_TRUE );
 
 #ifdef HAVE_LIBCDDB
-    add_bool( MODULE_STRING "-cddb-enabled", 1, NULL,
+    add_string( MODULE_STRING "-cddb-title-format", 
+               "Track %T. %t - %p", NULL, 
+               N_("Format to use in playlist 'title' field when using CDDB"),
+                CDDB_TITLE_FMT_LONGTEXT, VLC_TRUE );
+
+    add_bool( MODULE_STRING "-cddb-enabled", 1, E_(CDDBEnabledCB),
              N_("Do CDDB lookups?"),
              N_("If set, lookup CD-DA track information using the CDDB "
                 "protocol"),
@@ -178,8 +187,4 @@ vlc_module_begin();
         set_callbacks( E_(DemuxOpen), E_(DemuxClose) );
         add_shortcut( "cdda" );
 
-    add_submodule();
-        set_capability( "interface", 0 );
-        set_callbacks( E_(OpenIntf), E_(CloseIntf) );
-
 vlc_module_end();