[vlc-devel] commit: Moved i_cr_average from input_source_t to input_thread_private_t. ( Laurent Aimar )
git version control
git at videolan.org
Thu Dec 4 20:48:03 CET 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Dec 2 19:27:06 2008 +0100| [39868b9241295c62c1004608f267f3d621f52a2a] | committer: Laurent Aimar
Moved i_cr_average from input_source_t to input_thread_private_t.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39868b9241295c62c1004608f267f3d621f52a2a
---
src/input/es_out.c | 2 +-
src/input/input.c | 12 ++++++------
src/input/input_internal.h | 11 ++++++-----
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index feed176..03bd35f 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1004,7 +1004,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
p_pgrm->psz_now_playing = NULL;
p_pgrm->psz_publisher = NULL;
p_pgrm->p_epg = NULL;
- p_pgrm->p_clock = input_clock_New( p_input->p->input.i_cr_average, p_sys->i_rate );
+ p_pgrm->p_clock = input_clock_New( p_input->p->i_cr_average, p_sys->i_rate );
if( !p_pgrm->p_clock )
{
free( p_pgrm );
diff --git a/src/input/input.c b/src/input/input.c
index 5f26d97..6416dbe 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -188,6 +188,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->p_sout = NULL;
p_input->p->b_out_pace_control = false;
p_input->i_pts_delay = 0;
+ p_input->p->i_cr_average = 0;
vlc_gc_incref( p_item ); /* Released in Destructor() */
p_input->p->p_item = p_item;
@@ -204,7 +205,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->input.b_can_rate_control = true;
p_input->p->input.b_rescale_ts = true;
p_input->p->input.b_eof = false;
- p_input->p->input.i_cr_average = 0;
vlc_mutex_lock( &p_item->lock );
@@ -236,7 +236,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
input_ControlVarInit( p_input );
/* */
- p_input->p->input.i_cr_average = var_GetInteger( p_input, "cr-average" );
+ p_input->p->i_cr_average = var_GetInteger( p_input, "cr-average" );
if( !p_input->b_preparsing )
{
@@ -938,10 +938,10 @@ static void InitTitle( input_thread_t * p_input )
p_input->i_pts_delay -= i_desynch * 1000;
/* Update cr_average depending on the caching */
- p_master->i_cr_average *= (10 * p_input->i_pts_delay / 200000);
- p_master->i_cr_average /= 10;
- if( p_master->i_cr_average < 10 )
- p_master->i_cr_average = 10;
+ p_input->p->i_cr_average *= (10 * p_input->i_pts_delay / 200000);
+ p_input->p->i_cr_average /= 10;
+ if( p_input->p->i_cr_average < 10 )
+ p_input->p->i_cr_average = 10;
}
static void StartTitle( input_thread_t * p_input )
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 66a38e0..c698737 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -71,9 +71,6 @@ typedef struct
bool b_eof; /* eof of demuxer */
double f_fps;
- /* Clock average variation */
- int i_cr_average;
-
} input_source_t;
/** Private input fields */
@@ -115,10 +112,14 @@ struct input_thread_private_t
bool b_out_pace_control; /* idem ? */
/* Main input properties */
- input_item_t *p_item;
+ /* Input item */
+ input_item_t *p_item;
+ /* Clock average variation */
+ int i_cr_average;
+ /* Main source */
input_source_t input;
- /* Slave demuxers (subs, and others) */
+ /* Slave sources (subs, and others) */
int i_slave;
input_source_t **slave;
More information about the vlc-devel
mailing list