]> git.sesse.net Git - vlc/commitdiff
Support old-style module separators and yell at the user. (Closes #111)
authorClément Stenac <zorglub@videolan.org>
Sun, 22 May 2005 16:18:46 +0000 (16:18 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 22 May 2005 16:18:46 +0000 (16:18 +0000)
src/audio_output/input.c
src/libvlc.c
src/playlist/services_discovery.c
src/video_output/video_output.c

index c39e8cef48195f81a756aba6fc07fe32e263b275..d39fb44bc92160337fde220a56c3208f901b7007 100644 (file)
@@ -202,6 +202,14 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
     {
         char *psz_parser = psz_filters;
         char *psz_next;
+
+        if( strchr( psz_filters, ',' ) && !strchr( psz_filters, ':' ) )
+        {
+            msg_Info( p_aout, "Warning: you are using a deprecated syntax for "
+                              "audio-filter / audio-visual." );
+            msg_Info( p_aout, "You must now use ':' as separator instead of "
+                              "','." );
+        }
         while( psz_parser && *psz_parser )
         {
             aout_filter_t * p_filter;
@@ -212,7 +220,8 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
                 break;
             }
 
-            while( *psz_parser == ' ' && *psz_parser == ':' )
+            while( *psz_parser == ' ' || *psz_parser == ':' ||
+                   *psz_parser == ',')
             {
                 psz_parser++;
             }
@@ -220,6 +229,10 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
             {
                 *psz_next++ = '\0';
             }
+            else if( ( psz_next = strchr( psz_parser , ','  ) ) )
+            {
+                *psz_next++ = '\0';
+            }
             if( *psz_parser =='\0' )
             {
                 break;
index 1840db08db98d12b7b0704f11a4af62daa3d5e0d..56fdcd4793b416d6d63794daf3f7240687bede6a 100644 (file)
@@ -678,11 +678,19 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
     }
 
     psz_parser = psz_modules;
+    if( psz_parser && *psz_parser &&
+       strstr( psz_parser, ",") && !strstr(psz_parser, ":" ) )
+    {
+        msg_Info( p_vlc, "Warning: you are using a deprecated syntax for "
+                         "extraintf / control." );
+        msg_Info( p_vlc, "You must now use ':' as separator instead of ','." );
+    }
     while ( psz_parser && *psz_parser )
     {
         char *psz_module, *psz_temp;
         psz_module = psz_parser;
         psz_parser = strchr( psz_module, ':' );
+        if( !psz_parser ) psz_parser = strchr( psz_module, ',' );
         if ( psz_parser )
         {
             *psz_parser = '\0';
index 109b7278892c5aac54d3291c9e481f7c7bf86891..d57d8273e920ffeb7c43fb01a2d2d2c5eb7484be 100644 (file)
@@ -150,10 +150,18 @@ int playlist_AddSDModules( playlist_t *p_playlist, char *psz_modules )
     {
         char *psz_parser = psz_modules;
         char *psz_next;
-
+        if( psz_parser && *psz_parser &&
+            strstr( psz_parser, ",") && !strstr(psz_parser, ":" ) )
+        {
+            msg_Info( p_playlist, "Warning: you are using a deprecated syntax "
+                                  "for services-discovery." );
+            msg_Info( p_playlist, "You must now use ':' as separator instead "
+                                  "of ','." );
+        }
         while( psz_parser && *psz_parser )
         {
-            while( *psz_parser == ' ' || *psz_parser == ':' )
+            while( *psz_parser == ' ' || *psz_parser == ':' ||
+                   *psz_parser == ',' )
             {
                 psz_parser++;
             }
@@ -162,6 +170,10 @@ int playlist_AddSDModules( playlist_t *p_playlist, char *psz_modules )
             {
                 *psz_next++ = '\0';
             }
+            else if( ( psz_next = strchr( psz_parser, ',' ) ) )
+            {
+                *psz_next++ = '\0';
+            }
             if( *psz_parser == '\0' )
             {
                 break;
index bf5910c8904e14fc5d779f61bb390136caecc304..15289124f205379ef6d581d317669cce11108095 100644 (file)
@@ -357,6 +357,16 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
         var_Create( p_vout, "vout-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
         var_Get( p_vout, "vout-filter", &val );
         p_vout->psz_filter_chain = val.psz_string;
+
+        if( p_vout->psz_filter_chain && *p_vout->psz_filter_chain &&
+            strchr( p_vout->psz_filter_chain, ',' ) &&
+            !strchr( p_vout->psz_filter_chain, ':') )
+        {
+            msg_Info( p_vout, "Warning: you are using a deprecated syntax for "
+                             "vout-filter." );
+            msg_Info( p_vout, "You must now use ':' as separator instead of "
+                             "','." );
+        }
     }
     else
     {
@@ -364,6 +374,8 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
         char *psz_end;
 
         psz_end = strchr( ((vout_thread_t *)p_parent)->psz_filter_chain, ':' );
+        if( !psz_end ) psz_end = strchr(
+                        ((vout_thread_t *)p_parent)->psz_filter_chain, ',' );
         if( psz_end && *(psz_end+1) )
             p_vout->psz_filter_chain = strdup( psz_end+1 );
         else p_vout->psz_filter_chain = NULL;
@@ -383,6 +395,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
         char *psz_end;
 
         psz_end = strchr( p_vout->psz_filter_chain, ':' );
+        if( !psz_end ) psz_end = strchr( p_vout->psz_filter_chain, ',' );
         if( psz_end )
             psz_plugin = strndup( p_vout->psz_filter_chain,
                                   psz_end - p_vout->psz_filter_chain );