[vlc-devel] commit: access2_New really does not need to know about preparsing. ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Mar 4 21:21:38 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue Mar  4 22:16:47 2008 +0200| [7137515698fcfdc6b5db4338b8024abdb0f81b8a]

access2_New really does not need to know about preparsing.

The input already does the job.

Signed-off-by: Rémi Denis-Courmont <rem at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7137515698fcfdc6b5db4338b8024abdb0f81b8a
---

 src/input/access.c         |   25 +++++++------------------
 src/input/input.c          |    6 ++----
 src/input/input_internal.h |    5 ++---
 src/input/stream.c         |   10 +++++-----
 4 files changed, 16 insertions(+), 30 deletions(-)

diff --git a/src/input/access.c b/src/input/access.c
index 4121a84..fef95d0 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -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 );
 }
 
 /*****************************************************************************
diff --git a/src/input/input.c b/src/input/input.c
index 6490e6d..9725ed8 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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 )
         {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 93c67d1..0e707f1 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -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 * );
diff --git a/src/input/stream.c b/src/input/stream.c
index 8449a09..de02047 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -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 )
         {




More information about the vlc-devel mailing list