]> git.sesse.net Git - vlc/commitdiff
Make the global b_can_pace_control flag public
authorClément Stenac <zorglub@videolan.org>
Sun, 26 Nov 2006 17:27:16 +0000 (17:27 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 26 Nov 2006 17:27:16 +0000 (17:27 +0000)
include/vlc_input.h
modules/gui/macosx/controls.m
src/input/clock.c
src/input/input.c
src/input/input_internal.h

index f366b18774cf5afdfba995df5849ecacaf576ddd..a6825f30e82292b46314b3494289587fc4924e75 100644 (file)
@@ -351,8 +351,11 @@ struct input_thread_t
 
     vlc_bool_t  b_eof;
     vlc_bool_t b_preparsing;
+
     int i_state;
+    vlc_bool_t b_can_pace_control;
     int64_t     i_time;     /* Current time */
+
     /* Internal caching common to all inputs */
     int i_pts_delay;
 
index fe53d299c56361af9a9cd7ba5304aa155e89dd32..0f53bff28c4054067873b462de31bbf933473650 100644 (file)
 #import "playlist.h"
 #include <vlc_osd.h>
 
-/* UGLY UGLY UGLY FIXME FIXME FIXME. Need solution for b_can_pace_control.
- * Put it public ? Is it needed here ?*/
-#include "../../../src/input/input_internal.h"
-
 /*****************************************************************************
  * VLCControls implementation 
  *****************************************************************************/
     {
         if( p_input != NULL )
         {
-            bEnabled = p_input->p->input.b_can_pace_control;
+            bEnabled = p_input->b_can_pace_control;
         }
         else
         {
index 8632faac928a960234362cae8bdfb6bb2ca0d76f..9f10c7d04fb34fcaa629ed391d7a1a11955f1b23 100644 (file)
@@ -247,7 +247,7 @@ void input_ClockSetPCR( input_thread_t *p_input,
                      cl->last_pts + CR_MEAN_PTS_GAP : mdate() );
         cl->i_synchro_state = SYNCHRO_OK;
 
-        if( p_input->p->b_can_pace_control && cl->b_master )
+        if( p_input->b_can_pace_control && cl->b_master )
         {
             cl->last_cr = i_clock;
             if( !p_input->p->b_out_pace_control )
@@ -288,7 +288,7 @@ void input_ClockSetPCR( input_thread_t *p_input,
 
         cl->last_cr = i_clock;
 
-        if( p_input->p->b_can_pace_control && cl->b_master )
+        if( p_input->b_can_pace_control && cl->b_master )
         {
             /* Wait a while before delivering the packets to the decoder.
              * In case of multiple programs, we arbitrarily follow the
index 482fffd7d1818d1d987ad4e42a475e141b5bff7b..9e121264764007ed3c72e5a340741915753f1746 100644 (file)
@@ -137,7 +137,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
 
     /* Init Common fields */
     p_input->b_eof = VLC_FALSE;
-    p_input->p->b_can_pace_control = VLC_TRUE;
+    p_input->b_can_pace_control = VLC_TRUE;
     p_input->p->i_start = 0;
     p_input->i_time  = 0;
     p_input->p->i_stop  = 0;
@@ -809,7 +809,7 @@ static int Init( input_thread_t * p_input )
         }
 
         /* Global flag */
-        p_input->p->b_can_pace_control = p_input->p->input.b_can_pace_control;
+        p_input->b_can_pace_control = p_input->p->input.b_can_pace_control;
         p_input->p->b_can_pause        = p_input->p->input.b_can_pause;
 
         /* Fix pts delay */
@@ -1044,7 +1044,7 @@ static int Init( input_thread_t * p_input )
                 p_input->p->b_out_pace_control = VLC_TRUE;
             }
 
-            if( p_input->p->b_can_pace_control && p_input->p->b_out_pace_control )
+            if( p_input->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 */
@@ -1498,7 +1498,7 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type,
                 i_rate = INPUT_RATE_MAX;
             }
             if( i_rate != INPUT_RATE_DEFAULT &&
-                ( !p_input->p->b_can_pace_control ||
+                ( !p_input->b_can_pace_control ||
                   ( p_input->p->p_sout && !p_input->p->b_out_pace_control ) ) )
             {
                 msg_Dbg( p_input, "cannot change rate" );
index 1ef106c18d5ea5e94a299d45f78e601006839504..b59df10bc5d7441f160147ccfe921d2f169c2365 100644 (file)
@@ -69,7 +69,6 @@ typedef struct
 struct input_thread_private_t
 {
     /* Global properties */
-    vlc_bool_t  b_can_pace_control;
     vlc_bool_t  b_can_pause;
 
     int         i_rate;