[vlc-commits] input: always pass meta data through demux (refs #8456)

Rémi Denis-Courmont git at videolan.org
Mon Aug 26 20:01:28 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 26 20:49:03 2013 +0300| [e74490b32eb931f0d76c45d20e56bf8bb507c04f] | committer: Rémi Denis-Courmont

input: always pass meta data through demux (refs #8456)

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

 modules/access/http.c |    2 +-
 modules/demux/ps.c    |    3 +++
 modules/demux/ts.c    |    3 +++
 src/input/demux.c     |    4 +++-
 src/input/input.c     |   27 ---------------------------
 5 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index b46a8d1..3a465d5 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -878,7 +878,7 @@ static int ReadICYMeta( access_t *p_access )
             p_sys->psz_icy_title = EnsureUTF8( psz_tmp );
             if( !p_sys->psz_icy_title )
                 free( psz_tmp );
-            p_access->info.i_update |= INPUT_UPDATE_META;
+            //p_access->info.i_update |= INPUT_UPDATE_META; FIXME
 
             msg_Dbg( p_access, "New Title=%s", p_sys->psz_icy_title );
         }
diff --git a/modules/demux/ps.c b/modules/demux/ps.c
index 1fd9762..e15e5a1 100644
--- a/modules/demux/ps.c
+++ b/modules/demux/ps.c
@@ -530,6 +530,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             }
             return VLC_EGENERIC;
 
+        case DEMUX_GET_META:
+            return stream_Control( p_demux->s, STREAM_GET_META, args );
+
         case DEMUX_GET_FPS:
         default:
             return VLC_EGENERIC;
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index c9a6dd9..666995a 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -1189,6 +1189,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         return VLC_SUCCESS;
     }
 
+    case DEMUX_GET_META:
+        return stream_Control( p_demux->s, STREAM_GET_META, args );
+
     case DEMUX_CAN_RECORD:
         pb_bool = (bool*)va_arg( args, bool * );
         *pb_bool = true;
diff --git a/src/input/demux.c b/src/input/demux.c
index e6949b6..526a56c 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -307,9 +307,11 @@ int demux_vaControlHelper( stream_t *s,
             }
             return VLC_EGENERIC;
 
+        case DEMUX_GET_META:
+            return stream_Control( s, STREAM_GET_META, args );
+
         case DEMUX_GET_PTS_DELAY:
         case DEMUX_GET_FPS:
-        case DEMUX_GET_META:
         case DEMUX_HAS_UNSUPPORTED_META:
         case DEMUX_SET_NEXT_DEMUX_TIME:
         case DEMUX_GET_TITLE_INFO:
diff --git a/src/input/input.c b/src/input/input.c
index 5153b68..af7eaac 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -76,7 +76,6 @@ static bool       ControlIsSeekRequest( int i_type );
 static bool       Control( input_thread_t *, int, vlc_value_t );
 
 static int  UpdateTitleSeekpointFromAccess( input_thread_t * );
-static void UpdateGenericFromAccess( input_thread_t * );
 
 static int  UpdateTitleSeekpointFromDemux( input_thread_t * );
 static void UpdateGenericFromDemux( input_thread_t * );
@@ -584,7 +583,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_d
                 i_ret = UpdateTitleSeekpointFromAccess( p_input );
                 *pb_changed = true;
             }
-            UpdateGenericFromAccess( p_input );
         }
     }
 
@@ -2026,9 +2024,6 @@ static bool Control( input_thread_t *p_input,
                     p_meta = vlc_meta_New();
                     if( p_meta )
                     {
-                        if( slave->p_stream != NULL )
-                            stream_Control( slave->p_stream,
-                                            STREAM_GET_META, p_meta );
                         demux_Control( slave->p_demux, DEMUX_GET_META, p_meta );
                         InputUpdateMeta( p_input, p_meta );
                     }
@@ -2275,23 +2270,6 @@ static int UpdateTitleSeekpointFromAccess( input_thread_t *p_input )
                                      p_access->info.i_seekpoint );
     return 1;
 }
-static void UpdateGenericFromAccess( input_thread_t *p_input )
-{
-    stream_t *p_stream = p_input->p->input.p_stream;
-    access_t *p_access = p_input->p->input.p_access;
-
-    if( p_access->info.i_update & INPUT_UPDATE_META )
-    {
-        /* TODO maybe multi - access ? */
-        vlc_meta_t *p_meta = vlc_meta_New();
-        if( p_meta )
-        {
-            stream_Control( p_stream, STREAM_GET_META, p_meta );
-            InputUpdateMeta( p_input, p_meta );
-        }
-        p_access->info.i_update &= ~INPUT_UPDATE_META;
-    }
-}
 
 /*****************************************************************************
  * InputSourceNew:
@@ -2666,11 +2644,6 @@ static void InputSourceMeta( input_thread_t *p_input,
 
     bool has_meta = false;
 
-    /* Read access meta */
-    if( p_stream != NULL
-     && !stream_Control( p_stream, STREAM_GET_META, p_meta ) )
-        has_meta = true;
-
     /* Read demux meta */
     if( !demux_Control( p_demux, DEMUX_GET_META, p_meta ) )
         has_meta = true;



More information about the vlc-commits mailing list