]> git.sesse.net Git - vlc/commitdiff
(new in MAIN)
authorSam Hocevar <sam@videolan.org>
Sun, 2 Jun 2002 23:11:48 +0000 (23:11 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 2 Jun 2002 23:11:48 +0000 (23:11 +0000)
  * ./plugins/spudec/spu_decoder.c: we now use FIND_ANYWHERE to find a vout.
(ported from v0_4_1_branch)
  * ./plugins/dvdread/dvdread.c: disabled the dvdread plugin because it
    currently sucks.
  * ./src/misc/configuration.c, ./src/interface/main.c: we now accept --nofoo
    and --no-foo as negations for --foo. Also, the --help output is nicer.
  * ./plugins/qnx/vout_qnx.c: QNX compilation fix.

ChangeLog
plugins/dvdread/dvdread.c
plugins/qnx/vout_qnx.c
plugins/spudec/spu_decoder.c
src/libvlc.c
src/misc/configuration.c

index b992968dfc27c28b1f3cf5a9866347edc0df5b5d..c064efb0b0ff1402bff579c9eea6c300ba00e1c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,9 +4,10 @@
 
 HEAD
 
+  * ./plugins/spudec/spu_decoder.c: we now use FIND_ANYWHERE to find a vout.
   * ./plugins/dvd/dvd_es.c, ./plugins/satellite/input_satellite.c,
     ./plugins/dvdread/input_dvdread.c: updated outdated variable names.
-  * ./src/playlist/playlist.c, src/input/input.c: added safety checks to
+  * ./src/playlist/playlist.c, ./src/input/input.c: added safety checks to
     prevent crashes on next file.
   * ./src/misc/objects.c: commented all functions.
   * ./src/misc/objects.c: implemented vlc_object_find( , , FIND_ANYWHERE).
@@ -16,8 +17,8 @@ HEAD
   * ./bootstrap.sh, ./src/libvlc.h, ./po/*: fixed bootstrap.sh so that it does
     not include CVS Id lines in automatically created files.
   * ./plugins/dummy/intf_dummy.c, ./plugins/chroma/i420_yuy2.c,
-    src/interface/intf_eject.c, src/misc/threads.c: win32 compilation fix.
-  * ./plugins/directx/aout_directx.c, plugins/directx/vout_directx.c,
+    ./src/interface/intf_eject.c, ./src/misc/threads.c: win32 compilation fix.
+  * ./plugins/directx/aout_directx.c, ./plugins/directx/vout_directx.c,
     ./plugins/directx/vout_events.c: the DirectX notification and event threads
     now use the vlc_thread_create / vlc_thread_ready scheme. Untested.
   * ./configure.in: added a check for inttypes.h and sys/int_types.h.
@@ -36,7 +37,12 @@ HEAD
 0.4.1
 Not released yet
 
-  * ./plugins/macosx: rewrote the net panel for OS X
+  * ./plugins/dvdread/dvdread.c: disabled the dvdread plugin because it
+    currently sucks.
+  * ./src/misc/configuration.c, ./src/interface/main.c: we now accept --nofoo
+    and --no-foo as negations for --foo. Also, the --help output is nicer.
+  * ./plugins/macosx/*: rewrote the net panel for OS X
+  * ./plugins/qnx/vout_qnx.c: QNX compilation fix.
   * ./plugins/spudec/spu_decoder.c: fixed a margin bug in the SPU renderer
     which caused subtitles to appear slanted in odd width windows.
   * ./plugins/gtk/gtk_display.c, ./plugins/win32/mainframe.cpp: we deactivate
index d78c48cc45f2911b15432ee0c6db00f72851a5ab..99730b7086f9e7ab9cab3d25c648a23c024c9f9b 100644 (file)
@@ -2,7 +2,7 @@
  * dvdread.c : DvdRead input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: dvdread.c,v 1.16 2002/06/01 12:31:59 sam Exp $
+ * $Id: dvdread.c,v 1.17 2002/06/02 23:11:48 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -46,7 +46,7 @@ MODULE_INIT_START
     SET_DESCRIPTION( _("DVDRead input module") )
     ADD_CAPABILITY( DEMUX, 0 )
     ADD_CAPABILITY( ACCESS, 110 )
-    ADD_SHORTCUT( "dvd" )
+    //ADD_SHORTCUT( "dvd" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index a33298aa681fe60cc0828f92523b4091ab9d676a..fe794c31bd693a771dbb333aba9399e7de8d87f1 100644 (file)
@@ -167,7 +167,7 @@ static int vout_Create( vout_thread_t *p_vout )
 
     p_vout->b_fullscreen = config_GetInt( p_vout, "fullscreen" );
     p_vout->p_sys->i_mode = config_GetInt( p_vout, "overlay" ) ?
-                                MODE_NORMAL_OVERLAY : MODE_VIDEO_MEM;
+                                MODE_VIDEO_OVERLAY : MODE_VIDEO_MEM;
     p_vout->p_sys->dim.w = p_vout->i_window_width;
     p_vout->p_sys->dim.h = p_vout->i_window_height;
 
index 438b464fc980c17897ad3943a85cccb7ad1bc81e..a0cde65c4defa9933f06ba9bd620e3a6c40f2eab 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.26 2002/06/02 13:49:35 sam Exp $
+ * $Id: spu_decoder.c,v 1.27 2002/06/02 23:11:48 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
@@ -172,7 +172,7 @@ static int InitThread( spudec_thread_t *p_spudec )
         }
 
         p_spudec->p_vout = vlc_object_find( p_spudec->p_fifo, VLC_OBJECT_VOUT,
-                                                              FIND_CHILD );
+                                                              FIND_ANYWHERE );
 
         if( p_spudec->p_vout )
         {
index dadc968c99f625ee3c28d442e02e6af125124951..33951b619cc3608b04deeea98108a28cd76767eb 100644 (file)
@@ -4,7 +4,7 @@
  * and spawns threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: libvlc.c,v 1.5 2002/06/02 09:03:54 sam Exp $
+ * $Id: libvlc.c,v 1.6 2002/06/02 23:11:48 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -822,15 +822,14 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
  *****************************************************************************/
 static void Usage( vlc_t *p_this, const char *psz_module_name )
 {
-#define FORMAT_STRING "      --%s%s%s%s%s%s %s%s\n"
-    /* option name prefix ------' | | | | |  | |
-     * option name ---------------' | | | |  | |
-     * <bra ------------------------' | | |  | |
-     * option type or "" -------------' | |  | |
-     * ket> ----------------------------' |  | |
-     * padding spaces --------------------'  | |
-     * comment ------------------------------' |
-     * comment suffix -------------------------'
+#define FORMAT_STRING "      --%s%s%s%s%s%s%s %s%s\n"
+    /* option name -------------'     | | | |  | |
+     * <bra --------------------------' | | |  | |
+     * option type or "" ---------------' | |  | |
+     * ket> ------------------------------' |  | |
+     * padding spaces ----------------------'  | |
+     * comment --------------------------------' |
+     * comment suffix ---------------------------'
      *
      * The purpose of having bra and ket is that we might i18n them as well.
      */
@@ -859,10 +858,15 @@ static void Usage( vlc_t *p_this, const char *psz_module_name )
 
         if( psz_module_name && strcmp( psz_module_name,
                                        p_module->psz_object_name ) )
+        {
             continue;
+        }
 
         /* Ignore modules without config options */
-        if( !p_module->i_config_items ) continue;
+        if( !p_module->i_config_items )
+        {
+            continue;
+        }
 
         /* Print module name */
         fprintf( stderr, _("%s module options:\n\n"),
@@ -873,7 +877,7 @@ static void Usage( vlc_t *p_this, const char *psz_module_name )
              p_item++ )
         {
             char *psz_bra = NULL, *psz_type = NULL, *psz_ket = NULL;
-            char *psz_suf = "";
+            char *psz_suf = "", *psz_prefix = NULL;
             int i;
 
             switch( p_item->i_type )
@@ -925,7 +929,27 @@ static void Usage( vlc_t *p_this, const char *psz_module_name )
                 if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL
                      && !b_help_module )
                 {
-                    i -= 5;
+                    vlc_bool_t b_dash = 0;
+                    psz_prefix = p_item->psz_name;
+                    while( *psz_prefix )
+                    {
+                        if( *psz_prefix++ == '-' )
+                        {
+                            b_dash = 1;
+                            break;
+                        }
+                    }
+
+                    if( b_dash )
+                    {
+                        psz_prefix = ", --no-";
+                        i -= strlen( p_item->psz_name ) + strlen( ", --no-" );
+                    }
+                    else
+                    {
+                        psz_prefix = ", --no";
+                        i -= strlen( p_item->psz_name ) + strlen( ", --no" );
+                    }
                 }
 
                 if( i < 0 )
@@ -938,11 +962,19 @@ static void Usage( vlc_t *p_this, const char *psz_module_name )
                     psz_spaces[i] = '\0';
                 }
 
-                fprintf( stderr, psz_format,
-                         ( p_item->i_type == MODULE_CONFIG_ITEM_BOOL
-                            && !b_help_module ) ? "(no-)" : "",
-                         p_item->psz_name, psz_bra, psz_type, psz_ket,
-                         psz_spaces, p_item->psz_text, psz_suf );
+                if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL &&
+                    !b_help_module )
+                {
+                    fprintf( stderr, psz_format, p_item->psz_name, psz_prefix,
+                             p_item->psz_name, psz_bra, psz_type, psz_ket,
+                             psz_spaces, p_item->psz_text, psz_suf );
+                }
+                else
+                {
+                    fprintf( stderr, psz_format, p_item->psz_name, "", "",
+                             psz_bra, psz_type, psz_ket, psz_spaces,
+                             p_item->psz_text, psz_suf );
+                }
                 psz_spaces[i] = ' ';
             }
         }
index cc467be9e170b4ee241cc47ec685f9b4ce0f3f88..d7d3bffe27814401ff07bd550ecf25710ec65a49 100644 (file)
@@ -2,7 +2,7 @@
  * configuration.c management of the modules configuration
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.28 2002/06/01 18:04:49 sam Exp $
+ * $Id: configuration.c,v 1.29 2002/06/02 23:11:48 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -877,7 +877,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
         /* count the number of exported configuration options (to allocate
          * longopts). We also need to allocate space for too options when
          * dealing with boolean to allow for --foo and --no-foo */
-        i_opts += (p_module->i_config_items + p_module->i_bool_items);
+        i_opts += (p_module->i_config_items + 2 * p_module->i_bool_items);
     }
 
     p_longopts = malloc( sizeof(struct option) * (i_opts + 1) );
@@ -946,7 +946,18 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
              * option */
             if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL )
             {
-                char *psz_name = malloc( strlen(p_item->psz_name) + 4 );
+                char *psz_name = malloc( strlen(p_item->psz_name) + 3 );
+                if( psz_name == NULL ) continue;
+                strcpy( psz_name, "no" );
+                strcat( psz_name, p_item->psz_name );
+
+                p_longopts[i_index].name = psz_name;
+                p_longopts[i_index].has_arg = no_argument;
+                p_longopts[i_index].flag = &flag;
+                p_longopts[i_index].val = 1;
+                i_index++;
+
+                psz_name = malloc( strlen(p_item->psz_name) + 4 );
                 if( psz_name == NULL ) continue;
                 strcpy( psz_name, "no-" );
                 strcat( psz_name, p_item->psz_name );