]> git.sesse.net Git - vlc/commitdiff
* modules/demux/*: removed useless probing messages.
authorGildas Bazin <gbazin@videolan.org>
Sat, 5 Mar 2005 17:54:19 +0000 (17:54 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 5 Mar 2005 17:54:19 +0000 (17:54 +0000)
22 files changed:
modules/demux/aac.c
modules/demux/aiff.c
modules/demux/asf/asf.c
modules/demux/au.c
modules/demux/avi/avi.c
modules/demux/flac.c
modules/demux/livedotcom.cpp
modules/demux/mkv.cpp
modules/demux/mod.c
modules/demux/mp4/mp4.c
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpgv.c
modules/demux/nsv.c
modules/demux/ogg.c
modules/demux/playlist/old.c
modules/demux/playlist/pls.c
modules/demux/pva.c
modules/demux/real.c
modules/demux/ts.c
modules/demux/util/id3.c
modules/demux/wav.c
modules/services_discovery/sap.c

index 9180e4db2291462c1a3266847678c9484eb25cc3..b7a24f5ecfb05a9b521789f93d89a70ef50208f7 100644 (file)
@@ -123,7 +123,6 @@ static int Open( vlc_object_t * p_this )
         /* I haven't find any sure working aac detection so only forced or
          * extention check
          */
-        msg_Warn( p_demux, "AAC module discarded" );
         return VLC_EGENERIC;
     }
 
index 5dc2ac3c031469f769e3698622828ebd4af19aec..2cafb0566f0ec48910494541d6e03ffd80c852a7 100644 (file)
@@ -103,14 +103,9 @@ static int Open( vlc_object_t *p_this )
 
     uint8_t     *p_peek;
 
-    if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC;
     if( strncmp( &p_peek[0], "FORM", 4 ) || strncmp( &p_peek[8], "AIFF", 4 ) )
     {
-        msg_Warn( p_demux, "AIFF module discarded" );
         return VLC_EGENERIC;
     }
 
index 91402277569a7b330ae1ad1f22e73524765cbc79..e7ae145244735b5f679cf20a05dffc17d0c9b9e2 100644 (file)
@@ -108,18 +108,11 @@ static int Open( vlc_object_t * p_this )
     guid_t      guid;
     uint8_t     *p_peek;
 
-    /* a little test to see if it could be a asf stream */
-    if( stream_Peek( p_demux->s, &p_peek, 16 ) < 16 )
-    {
-        msg_Warn( p_demux, "ASF plugin discarded (cannot peek)" );
-        return VLC_EGENERIC;
-    }
+    /* A little test to see if it could be a asf stream */
+    if( stream_Peek( p_demux->s, &p_peek, 16 ) < 16 ) return VLC_EGENERIC;
+
     ASF_GetGUID( &guid, p_peek );
-    if( !ASF_CmpGUID( &guid, &asf_object_header_guid ) )
-    {
-        msg_Warn( p_demux, "ASF plugin discarded (not a valid file)" );
-        return VLC_EGENERIC;
-    }
+    if( !ASF_CmpGUID( &guid, &asf_object_header_guid ) ) return VLC_EGENERIC;
 
     /* Set p_demux fields */
     p_demux->pf_demux = Demux;
index e3543b8caf4ee95c1fca0e8bcc12e55b9e6fc233..514da8ccc41e0161266474c99d40663ef1a9f414 100644 (file)
@@ -105,14 +105,10 @@ static int Open( vlc_object_t *p_this )
     int          i_cat;
     int          i_samples, i_modulo;
 
-    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
-    {
-        msg_Warn( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
+
     if( strncmp( p_peek, ".snd", 4 ) )
     {
-        msg_Warn( p_demux, "AU module discarded" );
         return VLC_EGENERIC;
     }
 
index 2bec734136886780cb64d944f6ce35a7762a3bfa..17433a0c60b358d85180591d4f24b81f89607abc 100644 (file)
@@ -206,24 +206,17 @@ static int Open( vlc_object_t * p_this )
 
     uint8_t  *p_peek;
 
-
     /* Is it an avi file ? */
-    if( stream_Peek( p_demux->s, &p_peek, 200 ) < 200 )
-    {
-        msg_Dbg( p_demux, "cannot peek()" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 200 ) < 200 ) return VLC_EGENERIC;
+
     for( i_peeker = 0; i_peeker < 188; i_peeker++ )
     {
-        if( !strncmp( &p_peek[0], "RIFF", 4 ) && !strncmp( &p_peek[8], "AVI ", 4 ) )
-        {
-            break;
-        }
+        if( !strncmp( &p_peek[0], "RIFF", 4 ) &&
+            !strncmp( &p_peek[8], "AVI ", 4 ) ) break;
         p_peek++;
     }
     if( i_peeker == 188 )
     {
-        msg_Warn( p_demux, "avi module discarded (invalid header)" );
         return VLC_EGENERIC;
     }
 
index 401089b6045c85886f9e3253eaf7d4c9ede0feab..71aecf90294e263962e8d9a323f2ae94ba22b21a 100644 (file)
@@ -73,18 +73,12 @@ static int Open( vlc_object_t * p_this )
     es_format_t  fmt;
 
     /* Have a peep at the show. */
-    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
-    {
-        /* Stream shorter than 4 bytes... */
-        msg_Err( p_demux, "cannot peek()" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
 
     if( p_peek[0]!='f' || p_peek[1]!='L' || p_peek[2]!='a' || p_peek[3]!='C' )
     {
         if( strncmp( p_demux->psz_demux, "flac", 4 ) )
         {
-            msg_Warn( p_demux, "flac module discarded (no startcode)" );
             return VLC_EGENERIC;
         }
         /* User forced */
index 127eb4ddd7adc59cf39a10026b65a0a85d0099d3..8db98859e1e79659b6c9c4e08d803945da778a18 100644 (file)
@@ -193,16 +193,12 @@ static int  Open ( vlc_object_t *p_this )
     {
         /* See if it looks like a SDP
            v, o, s fields are mandatory and in this order */
-        if( stream_Peek( p_demux->s, &p_peek, 7 ) < 7 )
-        {
-            msg_Err( p_demux, "cannot peek" );
-            return VLC_EGENERIC;
-        }
+        if( stream_Peek( p_demux->s, &p_peek, 7 ) < 7 ) return VLC_EGENERIC;
+
         if( strncmp( (char*)p_peek, "v=0\r\n", 5 ) &&
             strncmp( (char*)p_peek, "v=0\n", 4 ) &&
             ( p_peek[0] < 'a' || p_peek[0] > 'z' || p_peek[1] != '=' ) )
         {
-            msg_Warn( p_demux, "SDP module discarded" );
             return VLC_EGENERIC;
         }
     }
index 438a0f0853e956380d7e777c19329cfaf2a7ed0a..0665a325928f2bf56afe2b3d7f0436a082dcaf75 100644 (file)
@@ -483,21 +483,11 @@ static int Open( vlc_object_t * p_this )
     EbmlElement *el = NULL, *el1 = NULL;
 
     /* peek the begining */
-    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
-    {
-        msg_Warn( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
 
     /* is a valid file */
     if( p_peek[0] != 0x1a || p_peek[1] != 0x45 ||
-        p_peek[2] != 0xdf || p_peek[3] != 0xa3 )
-    {
-        msg_Warn( p_demux, "matroska module discarded "
-                           "(invalid header 0x%.2x%.2x%.2x%.2x)",
-                           p_peek[0], p_peek[1], p_peek[2], p_peek[3] );
-        return VLC_EGENERIC;
-    }
+        p_peek[2] != 0xdf || p_peek[3] != 0xa3 ) return VLC_EGENERIC;
 
     /* Set the demux function */
     p_demux->pf_demux   = Demux;
index 6b081e51d5ba2ff1796bca832ea955b5bdc13536..266d1ce46fa204f9df465195af4146485b9b0684 100644 (file)
@@ -110,11 +110,9 @@ static int Open( vlc_object_t *p_this )
     /* We accept file based on extention match */
     if( strcasecmp( p_demux->psz_demux, "mod" ) )
     {
-        if( ( ext = strchr( p_demux->psz_path, '.' ) ) == NULL || stream_Size( p_demux->s ) == 0 )
-        {
-            msg_Warn( p_demux, "MOD module discarded (path=%s)", p_demux->psz_path );
-            return VLC_EGENERIC;
-        }
+        if( ( ext = strchr( p_demux->psz_path, '.' ) ) == NULL ||
+            stream_Size( p_demux->s ) == 0 ) return VLC_EGENERIC;
+
         ext++;  /* skip . */
         for( i = 0; mod_ext[i] != NULL; i++ )
         {
@@ -123,11 +121,7 @@ static int Open( vlc_object_t *p_this )
                 break;
             }
         }
-        if( mod_ext[i] == NULL )
-        {
-            msg_Warn( p_demux, "MOD module discarded (extention '%s' unknown)", ext );
-            return VLC_EGENERIC;
-        }
+        if( mod_ext[i] == NULL ) return VLC_EGENERIC;
         msg_Dbg( p_demux, "running MOD demuxer (ext=%s)", mod_ext[i] );
     }
 
index ba8dd28dd48ea45cc77053283ab540a74f3f6eaa..d3ef974242bc4caeedd477f701bc1acdc3f97930 100644 (file)
@@ -259,12 +259,9 @@ static int Open( vlc_object_t * p_this )
     unsigned int    i;
     vlc_bool_t      b_seekable;
 
-    /* a little test to see if it could be a mp4 */
-    if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 )
-    {
-        msg_Warn( p_demux, "MP4 plugin discarded (cannot peek)" );
-        return VLC_EGENERIC;
-    }
+    /* A little test to see if it could be a mp4 */
+    if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
+
     switch( VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ) )
     {
         case FOURCC_ftyp:
@@ -279,7 +276,6 @@ static int Open( vlc_object_t * p_this )
         case VLC_FOURCC( 'p', 'n', 'o', 't' ):
             break;
          default:
-            msg_Warn( p_demux, "MP4 plugin discarded (not a valid file)" );
             return VLC_EGENERIC;
     }
 
index d0448e77515dd7b6425a1f35e7404c3c1e9e6bd2..d03880a0bbc45218e7c636204eb2b241dca95446 100644 (file)
@@ -142,7 +142,6 @@ static int Open( vlc_object_t * p_this )
 
     if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
     {
-        msg_Err( p_demux, "cannot peek" );
         if( p_meta ) vlc_meta_Delete( p_meta );
         return VLC_EGENERIC;
     }
@@ -171,7 +170,6 @@ static int Open( vlc_object_t * p_this )
         }
         if( !b_ok && !p_demux->b_force )
         {
-            msg_Warn( p_demux, "mpga module discarded" );
             if( p_meta ) vlc_meta_Delete( p_meta );
             return VLC_EGENERIC;
         }
index 7753265dd2ef76b9cb68c6f4d07f880c25b7fc78..d4a41e8ddcabf5959a928589be3a386cf31fa8ad 100644 (file)
@@ -88,22 +88,14 @@ static int Open( vlc_object_t * p_this )
 
     if( p_peek[0] != 0x00 || p_peek[1] != 0x00 || p_peek[2] != 0x01 )
     {
-        if( !b_forced )
-        {
-            msg_Warn( p_demux, "ES module discarded (no startcode)" );
-            return VLC_EGENERIC;
-        }
+        if( !b_forced ) return VLC_EGENERIC;
 
         msg_Err( p_demux, "this doesn't look like an MPEG ES stream, continuing" );
     }
 
     if( p_peek[3] > 0xb9 )
     {
-        if( !b_forced )
-        {
-            msg_Warn( p_demux, "ES module discarded (system startcode)" );
-            return VLC_EGENERIC;
-        }
+        if( !b_forced ) return VLC_EGENERIC;
         msg_Err( p_demux, "this seems to be a system stream (PS plug-in ?), but continuing" );
     }
 
index 1201b82a14e86deb59fddef80a5478b5c0f4fb9e..0c90a58e10a0d36dad98aa02423d4d59b2a419fd 100644 (file)
@@ -88,17 +88,13 @@ static int Open( vlc_object_t *p_this )
 
     uint8_t     *p_peek;
 
-    if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
+
     if( strncmp( p_peek, "NSVf", 4 ) && strncmp( p_peek, "NSVs", 4 ))
     {
        /* In case we had force this demuxer we try to resynch */
         if( strcmp( p_demux->psz_demux, "nsv" ) || ReSynch( p_demux ) )
         {
-            msg_Warn( p_demux, "NSV module discarded" );
             return VLC_EGENERIC;
         }
     }
index 13ca83fdfd3f989430695bf34e256175e34a3552..f4043000b7ebcbe947f6563c2e7557ad2b491d0a 100644 (file)
@@ -182,14 +182,9 @@ static int Open( vlc_object_t * p_this )
 
 
     /* Check if we are dealing with an ogg stream */
-    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) return VLC_EGENERIC;
     if( strcmp( p_demux->psz_demux, "ogg" ) && strncmp( p_peek, "OggS", 4 ) )
     {
-        msg_Warn( p_demux, "ogg module discarded (invalid header)" );
         return VLC_EGENERIC;
     }
 
index 0e776c55d5a0d0f4ad48aa1c489bd3f44ad8532f..644fecf59cca02acadab15bf33ee11b225f6ae2f 100644 (file)
@@ -49,17 +49,10 @@ int Import_Old( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     uint8_t *p_peek;
 
-    if( stream_Peek( p_demux->s, &p_peek, 31 ) < 31 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 31 ) < 31 ) return VLC_EGENERIC;
+
+    if( strncmp( p_peek, PLAYLIST_FILE_HEADER , 31 ) ) return VLC_EGENERIC;
 
-    if( strncmp( p_peek, PLAYLIST_FILE_HEADER , 31 ) )
-    {
-        msg_Warn(p_demux, "old import module discarded: invalid file");
-        return VLC_EGENERIC;
-    }
     msg_Dbg( p_demux, "found valid old playlist file");
 
     p_demux->pf_control = Control;
index bd33e62054661d4d7489869d9075272b9ad8e48a..4b9e56e31e12fdf85f276aa5f0e70c716760e8fd 100644 (file)
@@ -55,11 +55,7 @@ int Import_PLS( vlc_object_t *p_this )
     uint8_t *p_peek;
     char    *psz_ext;
 
-    if( stream_Peek( p_demux->s , &p_peek, 7 ) < 7 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s , &p_peek, 7 ) < 7 ) return VLC_EGENERIC;
     psz_ext = strrchr ( p_demux->psz_path, '.' );
 
     if( !strncasecmp( p_peek, "[playlist]", 10 ) )
@@ -71,12 +67,8 @@ int Import_PLS( vlc_object_t *p_this )
     {
         ;
     }
-    else
-    {
-        msg_Warn(p_demux, "pls import module discarded");
-        return VLC_EGENERIC;
-        
-    }
+    else return VLC_EGENERIC;
+
     msg_Dbg( p_demux, "found valid PLS playlist file");
 
     p_demux->pf_control = Control;
index b699ea3b65d18cf4c8ae1db36c4beeae8cd6265d..b22df5ee290f9c24314f2031418c163931808c50 100644 (file)
@@ -84,17 +84,12 @@ static int Open( vlc_object_t *p_this )
     es_format_t  fmt;
     uint8_t     *p_peek;
 
-    if( stream_Peek( p_demux->s, &p_peek, 5 ) < 5 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 5 ) < 5 ) return VLC_EGENERIC;
     if( p_peek[0] != 'A' || p_peek[1] != 'V' || p_peek[4] != 0x55 )
     {
         /* In case we had forced this demuxer we try to resynch */
         if( strcasecmp( p_demux->psz_demux, "pva" ) || ReSynch( p_demux ) )
         {
-            msg_Warn( p_demux, "PVA module discarded" );
             return VLC_EGENERIC;
         }
     }
index 01e0cdfb46721f0996137a1758bafba9896a7c52..c9eeb32030af08541ac69d045bcce231f7792f57 100644 (file)
@@ -92,16 +92,8 @@ static int Open( vlc_object_t *p_this )
 
     uint8_t     *p_peek;
 
-    if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
-    if( strncmp( p_peek, ".RMF", 4 ) )
-    {
-        msg_Warn( p_demux, "Real module discarded" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 ) return VLC_EGENERIC;
+    if( strncmp( p_peek, ".RMF", 4 ) ) return VLC_EGENERIC;
 
     /* Fill p_demux field */
     p_demux->pf_demux = Demux;
index 5f6fb25057360de2a2163a16c27676683d81875b..c7ab9f9858fea3a2974caf3250405b6f4f71c314 100644 (file)
@@ -327,11 +327,7 @@ static int Open( vlc_object_t *p_this )
     vlc_value_t  val;
 
     if( stream_Peek( p_demux->s, &p_peek, TS_PACKET_SIZE_MAX ) <
-        TS_PACKET_SIZE_MAX )
-    {
-        msg_Err( p_demux, "cannot peek" );
-        return VLC_EGENERIC;
-    }
+        TS_PACKET_SIZE_MAX ) return VLC_EGENERIC;
 
     /* Search first sync byte */
     for( i_sync = 0; i_sync < TS_PACKET_SIZE_MAX; i_sync++ )
@@ -340,11 +336,7 @@ static int Open( vlc_object_t *p_this )
     }
     if( i_sync >= TS_PACKET_SIZE_MAX )
     {
-        if( strcmp( p_demux->psz_demux, "ts" ) )
-        {
-            msg_Warn( p_demux, "TS module discarded" );
-            return VLC_EGENERIC;
-        }
+        if( strcmp( p_demux->psz_demux, "ts" ) ) return VLC_EGENERIC;
         msg_Warn( p_demux, "this does not look like a TS stream, continuing" );
     }
 
index 241afb20d125ea0f6ed17531f05a8589dd4b2b48..58dfc193217d93c2572de2c88657cf15603014bb 100644 (file)
@@ -60,11 +60,7 @@ static int SkipID3Tag( vlc_object_t *p_this )
     msg_Dbg( p_demux, "checking for ID3 tag" );
 
     /* get 10 byte id3 header */
-    if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 )
-    {
-        msg_Err( p_demux, "cannot peek()" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 ) return VLC_EGENERIC;
 
     if( p_peek[0] != 'I' || p_peek[1] != 'D' || p_peek[2] != '3' )
     {
index d2c6f20985e7f1bc17d698f2af632d9a66d5eb74..5db087f16ec7f9a47e2bd7c420724dcd241c3dc3 100644 (file)
@@ -110,11 +110,8 @@ static int Open( vlc_object_t * p_this )
     WAVEFORMATEX         *p_wf;
 
     /* Is it a wav file ? */
-    if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 )
-    {
-        msg_Warn( p_demux, "WAV module discarded (cannot peek)" );
-        return VLC_EGENERIC;
-    }
+    if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC;
+
     if( strncmp( p_peek, "RIFF", 4 ) || strncmp( &p_peek[8], "WAVE", 4 ) )
     {
         return VLC_EGENERIC;
index 7bf7813e39348117e476858ba0b07b0a82c1370e..56af26b91359b219100cdc278bad0b81c39bd285 100644 (file)
@@ -368,24 +368,17 @@ static int OpenDemux( vlc_object_t *p_this )
     char *psz_sdp = (char *)malloc( i_max_sdp );
     sdp_t *p_sdp = NULL;
 
-    if( !psz_sdp )
-    {
-        return VLC_EGENERIC;
-    }
+    if( !psz_sdp ) return VLC_EGENERIC;
 
     /* Probe for SDP */
     if( p_demux->s )
     {
-        if( stream_Peek( p_demux->s, &p_peek, 7 ) < 7 )
-        {
-            msg_Err( p_demux, "cannot peek" );
-            return VLC_EGENERIC;
-        }
+        if( stream_Peek( p_demux->s, &p_peek, 7 ) < 7 ) return VLC_EGENERIC;
+
         if( strncmp( (char*)p_peek, "v=0\r\n", 5 ) &&
             strncmp( (char*)p_peek, "v=0\n", 4 ) &&
             ( p_peek[0] < 'a' || p_peek[0] > 'z' || p_peek[1] != '=' ) )
         {
-            msg_Warn( p_demux, "SDP (UDP) module discarded" );
             return VLC_EGENERIC;
         }
     }