]> git.sesse.net Git - vlc/commitdiff
access2_New really does not need to know about preparsing.
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 20:16:47 +0000 (22:16 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 20:16:47 +0000 (22:16 +0200)
The input already does the job.

Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
src/input/access.c
src/input/input.c
src/input/input_internal.h
src/input/stream.c

index 4121a840549bb125d242249edd4c0a89c2a369b7..fef95d0a23d7e5d6d31a1782dba73573f667849a 100644 (file)
@@ -34,7 +34,7 @@
  *****************************************************************************/
 static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_access,
                                       const char *psz_demux, const char *psz_path,
-                                      access_t *p_source, vlc_bool_t b_quick )
+                                      access_t *p_source )
 {
     access_t *p_access = vlc_object_create( p_obj, VLC_OBJECT_ACCESS );
 
@@ -55,22 +55,11 @@ static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_acces
     }
     else
     {
+        msg_Dbg( p_obj, "creating access '%s' path='%s'",
+                 psz_access, psz_path );
         p_access->psz_path   = strdup( psz_path );
-        if( b_quick )
-        {
-            if( strncmp( psz_path, "file://", 7 ) == 0 )
-                p_access->psz_access = strdup( "" );
-            else
-                p_access->psz_access = strdup( "file" );
-        }
-        else
-            p_access->psz_access = strdup( psz_access );
-
+        p_access->psz_access = strdup( psz_access );
         p_access->psz_demux  = strdup( psz_demux );
-
-        if( !b_quick )
-            msg_Dbg( p_obj, "creating access '%s' path='%s'",
-                     psz_access, psz_path );
     }
 
     p_access->pf_read    = NULL;
@@ -119,10 +108,10 @@ static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_acces
  * access2_New:
  *****************************************************************************/
 access_t *__access2_New( vlc_object_t *p_obj, const char *psz_access,
-                         const char *psz_demux, const char *psz_path, vlc_bool_t b_quick )
+                         const char *psz_demux, const char *psz_path )
 {
     return access2_InternalNew( p_obj, psz_access, psz_demux,
-                                psz_path, NULL, b_quick );
+                                psz_path, NULL );
 }
 
 /*****************************************************************************
@@ -131,7 +120,7 @@ access_t *__access2_New( vlc_object_t *p_obj, const char *psz_access,
 access_t *access2_FilterNew( access_t *p_source, const char *psz_access_filter )
 {
     return access2_InternalNew( VLC_OBJECT(p_source), psz_access_filter,
-                                NULL, NULL, p_source, VLC_FALSE );
+                                NULL, NULL, p_source );
 }
 
 /*****************************************************************************
index 6490e6d008fdc3c91400f160c3dee20bcee8ba19..9725ed8dbbf151863ba3767a3f96e24ef0e9c242 100644 (file)
@@ -2289,8 +2289,7 @@ static int InputSourceInit( input_thread_t *p_input,
         input_ChangeState( p_input, OPENING_S );
 
         /* Now try a real access */
-        in->p_access = access2_New( p_input, psz_access, psz_demux, psz_path,
-                                    p_input->b_preparsing );
+        in->p_access = access2_New( p_input, psz_access, psz_demux, psz_path );
 
         /* Access failed, URL encoded ? */
         if( in->p_access == NULL && strchr( psz_path, '%' ) )
@@ -2301,8 +2300,7 @@ static int InputSourceInit( input_thread_t *p_input,
                      psz_access, psz_demux, psz_path );
 
             in->p_access = access2_New( p_input,
-                                        psz_access, psz_demux, psz_path,
-                                        p_input->b_preparsing );
+                                        psz_access, psz_demux, psz_path );
         }
         if( in->p_access == NULL )
         {
index 93c67d1565561ae60779544798ab9db40623658c..0e707f199e4fc3f019c933d0899fbd0a32fe308e 100644 (file)
@@ -422,10 +422,9 @@ static inline void input_ChangeState( input_thread_t *p_input, int state )
 
 /* Access */
 
-#define access2_New( a, b, c, d, e ) __access2_New(VLC_OBJECT(a), b, c, d, e )
+#define access2_New( a, b, c, d ) __access2_New(VLC_OBJECT(a), b, c, d )
 access_t * __access2_New( vlc_object_t *p_obj, const char *psz_access,
-                          const char *psz_demux, const char *psz_path,
-                          vlc_bool_t b_quick );
+                          const char *psz_demux, const char *psz_path );
 access_t * access2_FilterNew( access_t *p_source,
                               const char *psz_access_filter );
 void access2_Delete( access_t * );
index 8449a09fafb5a5891a09fc9b18e1037041c28b11..de02047197bc3911e7c4ba03a9395262746b1cd1 100644 (file)
@@ -206,7 +206,7 @@ stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
     MRLSplit( psz_dup, &psz_access, &psz_demux, &psz_path );
 
     /* Now try a real access */
-    p_access = access2_New( p_parent, psz_access, psz_demux, psz_path, 0 );
+    p_access = access2_New( p_parent, psz_access, psz_demux, psz_path );
 
     if( p_access == NULL )
     {
@@ -305,7 +305,7 @@ stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t b_quick )
             if( psz_name )
             {
                 access_t *p_tmp = access2_New( p_access, p_access->psz_access,
-                                               "", psz_name, 0 );
+                                               "", psz_name );
 
                 if( !p_tmp )
                 {
@@ -1711,7 +1711,7 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
 
         msg_Dbg( s, "opening input `%s'", psz_name );
 
-        p_list_access = access2_New( s, p_access->psz_access, "", psz_name, 0 );
+        p_list_access = access2_New( s, p_access->psz_access, "", psz_name );
 
         if( !p_list_access ) return 0;
 
@@ -1783,7 +1783,7 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
 
         msg_Dbg( s, "opening input `%s'", psz_name );
 
-        p_list_access = access2_New( s, p_access->psz_access, "", psz_name, 0 );
+        p_list_access = access2_New( s, p_access->psz_access, "", psz_name );
 
         if( !p_list_access ) return 0;
 
@@ -1840,7 +1840,7 @@ static int ASeek( stream_t *s, int64_t i_pos )
         if( i != p_sys->i_list_index && i != 0 )
         {
             p_list_access =
-                access2_New( s, p_access->psz_access, "", psz_name, 0 );
+                access2_New( s, p_access->psz_access, "", psz_name );
         }
         else if( i != p_sys->i_list_index )
         {