]> git.sesse.net Git - vlc/blobdiff - modules/access/vcdx/vcd.c
First attempt to libcdio VCD working under new regime. It is still
[vlc] / modules / access / vcdx / vcd.c
index 30b102e7eca1ff27c4f539709f343d748baecc42..6cd87fa4d0e457c0d4ba546342c769bfaee76afc 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * vcd.c : VCD input module for vlc
  *****************************************************************************
- * Copyright (C) 2000,2003 VideoLAN
- * $Id: vcd.c,v 1.9 2003/11/26 01:28:52 rocky Exp $
+ * Copyright (C) 2000, 2003, 2004 VideoLAN
+ * $Id$
  *
- * Authors: Rocky Bernstein <rocky@panix.com> 
+ * Authors: Rocky Bernstein <rocky@panix.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-int  E_(Open)         ( vlc_object_t * );
-void E_(Close)        ( vlc_object_t * );
+int  E_(VCDOpen)      ( vlc_object_t * );
+void E_(VCDClose)     ( vlc_object_t * );
 int  E_(OpenIntf)     ( vlc_object_t * );
 void E_(CloseIntf)    ( vlc_object_t * );
-int  E_(InitVCD)      ( vlc_object_t * );
-void E_(EndVCD)       ( vlc_object_t * );
+int  E_(VCDInit)      ( vlc_object_t * );
+void E_(VCDEnd)       ( vlc_object_t * );
 
 int  E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
-                        vlc_value_t oldval, vlc_value_t val, 
-                        void *p_data );
+                         vlc_value_t oldval, vlc_value_t val,
+                         void *p_data );
 
 /*****************************************************************************
  * Option help text
  *****************************************************************************/
 
-#define DEBUG_TEXT N_("set debug mask for additional debugging.")
 #define DEBUG_LONGTEXT N_( \
     "This integer when viewed in binary is a debugging mask\n" \
     "meta info         1\n" \
@@ -65,11 +64,24 @@ int  E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
     "still    (400) 1024\n" \
     "vcdinfo  (800) 2048\n" )
 
-#define DEV_TEXT N_("Video device name")
-#define DEV_LONGTEXT N_( \
-    "Specify the name of the video device that will be used by default. " \
-    "If you don't specify anything, we'll scan for a suitable VCD device.")
-
+#define VCD_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 album information\n" \
+"   %C : The VCD volume count - the number of CDs in the collection\n" \
+"   %c : The VCD volume num - the number of the CD in the collection.\n" \
+"   %F : The VCD Format, e.g. VCD 1.0, VCD 1.1, VCD 2.0, or SVCD\n" \
+"   %I : The current entry/segment/playback type, e.g. ENTRY, TRACK, SEGMENT...\n" \
+"   %L : The playlist ID prefixed with \" LID\" if it exists\n" \
+"   %N : The current number of the %I - a decimal number\n" \
+"   %P : The publisher ID\n" \
+"   %p : The preparer I\n" \
+"   %S : If we are in a segment (menu), the kind of segment\n" \
+"   %T : The track number\n" \
+"   %V : The volume set I\n" \
+"   %v : The volume I\n" \
+"       A number between 1 and the volume count.\n" \
+"   %% : a % \n")
 
 /*****************************************************************************
  * Module descriptor
@@ -78,34 +90,41 @@ int  E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
 vlc_module_begin();
     add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") );
     set_description( _("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") );
-    set_capability( "access", 85 /* slightly higher than vcd */ );
-    set_callbacks( E_(Open), E_(Close) );
-    add_shortcut( "vcd" );
+    set_capability( "access2", 55 /* slightly lower than vcd */ );
+    set_callbacks( E_(VCDOpen), E_(VCDClose) );
     add_shortcut( "vcdx" );
 
     /* Configuration options */
-    add_category_hint( N_("VCDX"), NULL, VLC_TRUE );
-
-    add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), DEBUG_TEXT, 
+    add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback),
+                  N_("If nonzero, this gives additional debug information."),
                   DEBUG_LONGTEXT, VLC_TRUE );
 
-    add_string( MODULE_STRING "-device", "", NULL, DEV_TEXT, 
-               DEV_LONGTEXT, VLC_TRUE );
-
     add_bool( MODULE_STRING "-PBC", 0, NULL,
-             "Use playback control?",
-             "If VCD is authored with playback control, use it. "
-             "Otherwise we play by tracks.", 
-             VLC_TRUE );
+              N_("Use playback control?"),
+              N_("If VCD is authored with playback control, use it. "
+                 "Otherwise we play by tracks."),
+              VLC_FALSE );
+
+    add_string( MODULE_STRING "-author-format",
+                "%v - %F disc %c of %C",
+                NULL,
+                N_("Format to use in playlist \"author\""),
+                VCD_TITLE_FMT_LONGTEXT, VLC_TRUE );
+
+    add_string( MODULE_STRING "-title-format",
+                "%I %N%L%S - %M",
+                NULL,
+                N_("Format to use in playlist \"title\" field"),
+                VCD_TITLE_FMT_LONGTEXT, VLC_TRUE );
 
 #ifdef FIXED
     add_submodule();
         set_capability( "demux", 0 );
-        set_callbacks( E_(InitVCD), E_(EndVCD) );
-#endif
-
+        set_callbacks( E_(VCDInit), E_(VCDEnd) );
     add_submodule();
         set_capability( "interface", 0 );
         set_callbacks( E_(OpenIntf), E_(CloseIntf) );
+#endif
+
 vlc_module_end();