[vlc-commits] input: use STREAM_CAN_PAUSE and STREAM_CAN_CONTROL_PACE

Rémi Denis-Courmont git at videolan.org
Tue Apr 16 19:20:00 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 16 20:19:41 2013 +0300| [5426d426ecfbeed1eb928c606925fe48b9fe7228] | committer: Rémi Denis-Courmont

input: use STREAM_CAN_PAUSE and STREAM_CAN_CONTROL_PACE

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

 src/input/input.c |   35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 40f230a..c3f5f09 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2474,8 +2474,6 @@ static int InputSourceInit( input_thread_t *p_input,
         /* Get infos from access */
         if( !p_input->b_preparsing )
         {
-            bool b_can_seek;
-
             in->b_title_demux = false;
             if( access_Control( p_access, ACCESS_GET_TITLE_INFO,
                                 &in->title, &in->i_title,
@@ -2484,18 +2482,6 @@ static int InputSourceInit( input_thread_t *p_input,
             {
                 TAB_INIT( in->i_title, in->title );
             }
-            access_Control( p_access, ACCESS_CAN_CONTROL_PACE,
-                            &in->b_can_pace_control );
-            in->b_can_rate_control = in->b_can_pace_control;
-            in->b_rescale_ts = true;
-
-            access_Control( p_access, ACCESS_CAN_PAUSE, &in->b_can_pause );
-            var_SetBool( p_input, "can-pause", in->b_can_pause || !in->b_can_pace_control ); /* XXX temporary because of es_out_timeshift*/
-            var_SetBool( p_input, "can-rate", !in->b_can_pace_control || in->b_can_rate_control ); /* XXX temporary because of es_out_timeshift*/
-            var_SetBool( p_input, "can-rewind", !in->b_rescale_ts && !in->b_can_pace_control );
-
-            access_Control( p_access, ACCESS_CAN_SEEK, &b_can_seek );
-            var_SetBool( p_input, "can-seek", b_can_seek );
 
             access_Control( p_access, ACCESS_GET_PTS_DELAY, &i_pts_delay );
         }
@@ -2568,6 +2554,27 @@ static int InputSourceInit( input_thread_t *p_input,
                                               var_GetBool( p_input, "input-record-native" ) );
         free( psz_stream_filter );
 
+        if( !p_input->b_preparsing )
+        {
+            bool b;
+
+            stream_Control( in->p_stream, STREAM_CAN_CONTROL_PACE,
+                            &in->b_can_pace_control );
+            in->b_can_rate_control = in->b_can_pace_control;
+            in->b_rescale_ts = true;
+
+            stream_Control( in->p_stream, STREAM_CAN_PAUSE, &in->b_can_pause );
+            var_SetBool( p_input, "can-pause",
+                         in->b_can_pause || !in->b_can_pace_control ); /* XXX temporary because of es_out_timeshift*/
+            var_SetBool( p_input, "can-rate",
+                         !in->b_can_pace_control || in->b_can_rate_control ); /* XXX temporary because of es_out_timeshift*/
+            var_SetBool( p_input, "can-rewind",
+                         !in->b_rescale_ts && !in->b_can_pace_control );
+
+            stream_Control( in->p_stream, STREAM_CAN_SEEK, &b );
+            var_SetBool( p_input, "can-seek", b );
+        }
+
         in->p_demux = demux_New( p_input, p_input, psz_access, psz_demux,
                    /* Take access/stream redirections into account: */
                    in->p_stream->psz_path ? in->p_stream->psz_path : psz_path,



More information about the vlc-commits mailing list