X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fvcdx%2Fvcd.c;h=4d94ed0d3ac687de2fec3177eb3fda32c92102e4;hb=HEAD;hp=d69364f6423e436da89b53cedfd2c7af0ef88fe3;hpb=de409e6f596a398a2f89cd40d671a748c539cbd7;p=vlc diff --git a/modules/access/vcdx/vcd.c b/modules/access/vcdx/vcd.c index d69364f642..4d94ed0d3a 100644 --- a/modules/access/vcdx/vcd.c +++ b/modules/access/vcdx/vcd.c @@ -1,10 +1,10 @@ /***************************************************************************** * vcd.c : VCD input module for vlc ***************************************************************************** - * Copyright (C) 2000,2003 VideoLAN - * $Id: vcd.c,v 1.6 2003/11/20 03:56:22 rocky Exp $ + * Copyright (C) 2000, 2003, 2004, 2005 the VideoLAN team + * $Id$ * - * Authors: Rocky Bernstein + * Authors: Rocky Bernstein * * 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 @@ -16,9 +16,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** @@ -29,65 +29,109 @@ * Preamble *****************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif -/***************************************************************************** - * Exported prototypes - *****************************************************************************/ -int E_(VCDOpen) ( vlc_object_t * ); -void E_(VCDClose) ( vlc_object_t * ); -int E_(VCDOpenIntf) ( vlc_object_t * ); -void E_(VCDCloseIntf) ( vlc_object_t * ); -int E_(InitVCD) ( vlc_object_t * ); -void E_(EndVCD) ( vlc_object_t * ); +#include +#include -int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name, - vlc_value_t oldval, vlc_value_t val, - void *p_data ); +#include "vcd.h" +#include "access.h" /***************************************************************************** * Option help text *****************************************************************************/ -#define DEBUG_TEXT N_("set debug mask for additional debugging.") -#define DEBUG_LONGTEXT N_( \ +#define DEBUG_LONGTEXT \ "This integer when viewed in binary is a debugging mask\n" \ - "MRL 1\n" \ - "external call 2\n" \ - "all calls 4\n" \ - "LSN 8\n" \ - "PBC (10) 16\n" \ - "libcdio (20) 32\n" \ - "seeks (40) 64\n" \ - "still (80) 128\n" \ - "vcdinfo (100) 256\n" ) + "meta info 1\n" \ + "event info 2\n" \ + "MRL 4\n" \ + "external call 8\n" \ + "all calls (10) 16\n" \ + "LSN (20) 32\n" \ + "PBC (40) 64\n" \ + "libcdio (80) 128\n" \ + "seek-set (100) 256\n" \ + "seek-cur (200) 512\n" \ + "still (400) 1024\n" \ + "vcdinfo (800) 2048\n" +#define VCD_TITLE_FMT_LONGTEXT \ +"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 ID\n" \ +" %S : If we are in a segment (menu), the kind of segment\n" \ +" %T : The MPEG track number (starts at 1)\n" \ +" %V : The volume set ID\n" \ +" %v : The volume ID\n" \ +" A number between 1 and the volume count.\n" \ +" %% : a % \n" /***************************************************************************** * Module descriptor *****************************************************************************/ -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_(VCDOpen), E_(VCDClose) ); - add_shortcut( "vcd" ); - add_shortcut( "vcdx" ); +vlc_module_begin () + set_shortname( N_("(Super) Video CD")) + set_description( N_("Video CD (VCD 1.0, 1.1, 2.0, SVCD, HQVCD) input") ) + add_usage_hint( N_("vcdx://[device-or-file][@{P,S,T}num]") ) + add_shortcut( "vcdx" ) + set_category( CAT_INPUT ) + set_subcategory( SUBCAT_INPUT_ACCESS ) + set_capability( "access", 55 /* slightly lower than vcd */ ) + set_callbacks( VCDOpen, VCDClose ) /* Configuration options */ - add_category_hint( N_("VCDX"), NULL, VLC_TRUE ); - add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), DEBUG_TEXT, - DEBUG_LONGTEXT, VLC_TRUE ); - -#ifdef FIXED - add_submodule(); - set_capability( "demux", 0 ); - set_callbacks( E_(InitVCD), E_(EndVCD) ); -#endif + add_integer ( MODULE_STRING "-debug", 0, NULL, + N_("If nonzero, this gives additional debug information."), + DEBUG_LONGTEXT, true ) + + add_integer ( MODULE_STRING "-blocks-per-read", 20, + NULL, + N_("Number of CD blocks to get in a single read."), + N_("Number of CD blocks to get in a single read."), + true ) + + add_bool( MODULE_STRING "-PBC", false, NULL, + N_("Use playback control?"), + N_("If VCD is authored with playback control, use it. " + "Otherwise we play by tracks."), + false ) + + add_bool( MODULE_STRING "-track-length", true, + NULL, + N_("Use track length as maximum unit in seek?"), + N_("If set, the length of the seek bar is the track rather than " + "the length of an entry."), + false ) + + add_bool( MODULE_STRING "-extended-info", false, NULL, + N_("Show extended VCD info?"), + N_("Show the maximum amount of information under Stream and " + "Media Info. Shows for example playback control navigation."), + false ) + + add_string( MODULE_STRING "-author-format", + "%v - %F disc %c of %C", + NULL, + N_("Format to use in the playlist's \"author\" field."), + VCD_TITLE_FMT_LONGTEXT, true ) + + add_string( MODULE_STRING "-title-format", + "%I %N %L%S - %M %A %v - disc %c of %C %F", + NULL, + N_("Format to use in the playlist's \"title\" field."), + VCD_TITLE_FMT_LONGTEXT, false ) - add_submodule(); - set_capability( "interface", 0 ); - set_callbacks( E_(VCDOpenIntf), E_(VCDCloseIntf) ); -vlc_module_end(); +vlc_module_end ()