[vlc-devel] commit: Privatized p_input->b_can_pace_control. (Laurent Aimar )

git version control git at videolan.org
Sat Jan 17 12:44:08 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jan 16 22:04:30 2009 +0100| [0051f028570ac4ad22f7303fa86f2b76fd186258] | committer: Laurent Aimar 

Privatized p_input->b_can_pace_control.

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

 include/vlc_input.h          |    2 --
 src/input/es_out.c           |    6 +++---
 src/input/es_out_timeshift.c |    6 +++---
 src/input/input.c            |   10 +++++-----
 src/input/input_internal.h   |    1 +
 5 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 1f5777b..ce4f8d6 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -411,8 +411,6 @@ struct input_thread_t
     bool b_preparsing;
     bool b_dead;
 
-    bool b_can_pace_control;
-
     /* All other data is input_thread is PRIVATE. You can't access it
      * outside of src/input */
     input_thread_private_t *p;
diff --git a/src/input/es_out.c b/src/input/es_out.c
index d736f63..da7000c 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -384,8 +384,8 @@ static mtime_t EsOutGetWakeup( es_out_t *out )
     /* We do not have a wake up date if the input cannot have its speed
      * controlled or sout is imposing its own or while buffering
      *
-     * FIXME for !p_input->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */
-    if( !p_input->b_can_pace_control ||
+     * FIXME for !p_input->p->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */
+    if( !p_input->p->b_can_pace_control ||
         p_input->p->b_out_pace_control ||
         p_sys->b_buffering )
         return 0;
@@ -2181,7 +2181,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
             /* search program
              * TODO do not use mdate() but proper stream acquisition date */
             input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input),
-                                p_sys->p_input->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() );
+                                p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() );
             /* Check buffering state on master clock update */
             if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm )
                 EsOutDecodersStopBuffering( out, false );
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index a1de481..02cb819 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -457,7 +457,7 @@ static int ControlLockedGetWakeup( es_out_t *p_out, mtime_t *pi_wakeup )
 
     if( p_sys->b_delayed )
     {
-        assert( !p_sys->p_input->b_can_pace_control );
+        assert( !p_sys->p_input->p->b_can_pace_control );
         *pi_wakeup = 0;
     }
     else
@@ -490,7 +490,7 @@ static int ControlLockedSetPauseState( es_out_t *p_out, bool b_source_paused, bo
     else
     {
         i_ret = VLC_EGENERIC;
-        if( !p_sys->p_input->b_can_pace_control )
+        if( !p_sys->p_input->p->b_can_pace_control )
         {
             if( !p_sys->b_delayed )
                 TsStart( p_out );
@@ -525,7 +525,7 @@ static int ControlLockedSetRate( es_out_t *p_out, int i_src_rate, int i_rate )
     else
     {
         i_ret = VLC_EGENERIC;
-        if( !p_sys->p_input->b_can_pace_control )
+        if( !p_sys->p_input->p->b_can_pace_control )
         {
             if( !p_sys->b_delayed )
                 TsStart( p_out );
diff --git a/src/input/input.c b/src/input/input.c
index e4e1d64..53dcdbe 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -165,7 +165,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
 
     /* Init Common fields */
     p_input->b_eof = false;
-    p_input->b_can_pace_control = true;
+    p_input->p->b_can_pace_control = true;
     p_input->p->i_start = 0;
     p_input->p->i_time  = 0;
     p_input->p->i_stop  = 0;
@@ -901,7 +901,7 @@ static void InitTitle( input_thread_t * p_input )
     }
 
     /* Global flag */
-    p_input->b_can_pace_control    = p_master->b_can_pace_control;
+    p_input->p->b_can_pace_control    = p_master->b_can_pace_control;
     p_input->p->b_can_pause        = p_master->b_can_pause;
     p_input->p->b_can_rate_control = p_master->b_can_rate_control;
 
@@ -1181,7 +1181,7 @@ static int Init( input_thread_t * p_input )
     {
         p_input->p->b_out_pace_control = (p_input->p->p_sout->i_out_pace_nocontrol > 0);
 
-        if( p_input->b_can_pace_control && p_input->p->b_out_pace_control )
+        if( p_input->p->b_can_pace_control && p_input->p->b_out_pace_control )
         {
             /* We don't want a high input priority here or we'll
              * end-up sucking up all the CPU time */
@@ -1773,7 +1773,7 @@ static bool Control( input_thread_t *p_input, int i_type,
                 i_rate = INPUT_RATE_DEFAULT;
             }
             if( i_rate != p_input->p->i_rate &&
-                !p_input->b_can_pace_control && p_input->p->b_can_rate_control )
+                !p_input->p->b_can_pace_control && p_input->p->b_can_rate_control )
             {
                 int i_ret;
                 if( p_input->p->input.p_access )
@@ -1803,7 +1803,7 @@ static bool Control( input_thread_t *p_input, int i_type,
 
                 if( p_input->p->input.b_rescale_ts )
                 {
-                    const int i_rate_source = (p_input->b_can_pace_control || p_input->p->b_can_rate_control ) ? i_rate : INPUT_RATE_DEFAULT;
+                    const int i_rate_source = (p_input->p->b_can_pace_control || p_input->p->b_can_rate_control ) ? i_rate : INPUT_RATE_DEFAULT;
                     es_out_SetRate( p_input->p->p_es_out, i_rate_source, i_rate );
                 }
 
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 4acdac4..f98ed42 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -78,6 +78,7 @@ struct input_thread_private_t
     /* Global properties */
     bool        b_can_pause;
     bool        b_can_rate_control;
+    bool        b_can_pace_control;
     double      f_fps;
     int         i_state;
 




More information about the vlc-devel mailing list