[vlc-commits] input: always use the demux for titles & seekpoints (fixes #8456)
Rémi Denis-Courmont
git at videolan.org
Mon Aug 26 21:47:58 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 26 21:58:02 2013 +0300| [79e1e221333505e26acb74b9839bc61822ae9e5b] | committer: Rémi Denis-Courmont
input: always use the demux for titles & seekpoints (fixes #8456)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79e1e221333505e26acb74b9839bc61822ae9e5b
---
src/input/input.c | 82 ++++++-----------------------------------------------
1 file changed, 8 insertions(+), 74 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index af7eaac..290ca9e 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -75,8 +75,6 @@ static void ControlRelease( int i_type, vlc_value_t val );
static bool ControlIsSeekRequest( int i_type );
static bool Control( input_thread_t *, int, vlc_value_t );
-static int UpdateTitleSeekpointFromAccess( input_thread_t * );
-
static int UpdateTitleSeekpointFromDemux( input_thread_t * );
static void UpdateGenericFromDemux( input_thread_t * );
static void UpdateTitleListfromDemux( input_thread_t * );
@@ -575,15 +573,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_d
}
UpdateGenericFromDemux( p_input );
}
- else if( p_input->p->input.p_access &&
- p_input->p->input.p_access->info.i_update )
- {
- if( !p_input->p->input.b_title_demux )
- {
- i_ret = UpdateTitleSeekpointFromAccess( p_input );
- *pb_changed = true;
- }
- }
}
if( i_ret == 0 ) /* EOF */
@@ -1902,9 +1891,7 @@ static bool Control( input_thread_t *p_input,
if( p_input->p->input.i_title <= 0 )
break;
- int i_title = p_input->p->input.b_title_demux
- ? p_input->p->input.p_demux->info.i_title
- : p_input->p->input.p_access->info.i_title;
+ int i_title = p_input->p->input.p_demux->info.i_title;
if( i_type == INPUT_CONTROL_SET_TITLE_PREV )
i_title--;
else if( i_type == INPUT_CONTROL_SET_TITLE_NEXT )
@@ -1915,12 +1902,8 @@ static bool Control( input_thread_t *p_input,
break;
es_out_SetTime( p_input->p->p_es_out, -1 );
- if( p_input->p->input.b_title_demux )
- demux_Control( p_input->p->input.p_demux,
- DEMUX_SET_TITLE, i_title );
- else
- stream_Control( p_input->p->input.p_stream,
- STREAM_SET_TITLE, i_title );
+ demux_Control( p_input->p->input.p_demux,
+ DEMUX_SET_TITLE, i_title );
input_SendEventTitle( p_input, i_title );
break;
}
@@ -1936,21 +1919,10 @@ static bool Control( input_thread_t *p_input,
if( p_input->p->input.i_title <= 0 )
break;
- int i_title, i_seekpoint;
- if( p_input->p->input.b_title_demux )
- {
- demux_t *p_demux = p_input->p->input.p_demux;
-
- i_title = p_demux->info.i_title;
- i_seekpoint = p_demux->info.i_seekpoint;
- }
- else
- {
- access_t *p_access = p_input->p->input.p_access;
+ demux_t *p_demux = p_input->p->input.p_demux;
- i_title = p_access->info.i_title;
- i_seekpoint = p_access->info.i_seekpoint;
- }
+ int i_title = p_demux->info.i_title;
+ int i_seekpoint = p_demux->info.i_seekpoint;
if( i_type == INPUT_CONTROL_SET_SEEKPOINT_PREV )
{
@@ -1973,12 +1945,8 @@ static bool Control( input_thread_t *p_input,
break;
es_out_SetTime( p_input->p->p_es_out, -1 );
- if( p_input->p->input.b_title_demux )
- demux_Control( p_input->p->input.p_demux,
- DEMUX_SET_SEEKPOINT, i_seekpoint );
- else
- stream_Control( p_input->p->input.p_stream,
- STREAM_SET_SEEKPOINT, i_seekpoint );
+ demux_Control( p_input->p->input.p_demux,
+ DEMUX_SET_SEEKPOINT, i_seekpoint );
input_SendEventSeekpoint( p_input, i_title, i_seekpoint );
break;
}
@@ -2242,36 +2210,6 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
/*****************************************************************************
- * Update*FromAccess:
- *****************************************************************************/
-static int UpdateTitleSeekpointFromAccess( input_thread_t *p_input )
-{
- access_t *p_access = p_input->p->input.p_access;
-
- if( p_access->info.i_update & INPUT_UPDATE_TITLE )
- {
- input_SendEventTitle( p_input, p_access->info.i_title );
-
- stream_Control( p_input->p->input.p_stream, STREAM_UPDATE_SIZE );
-
- p_access->info.i_update &= ~INPUT_UPDATE_TITLE;
- }
- if( p_access->info.i_update & INPUT_UPDATE_SEEKPOINT )
- {
- input_SendEventSeekpoint( p_input,
- p_access->info.i_title, p_access->info.i_seekpoint );
-
- p_access->info.i_update &= ~INPUT_UPDATE_SEEKPOINT;
- }
- /* Hmmm only works with master input */
- if( p_input->p->input.p_access == p_access )
- return UpdateTitleSeekpoint( p_input,
- p_access->info.i_title,
- p_access->info.i_seekpoint );
- return 1;
-}
-
-/*****************************************************************************
* InputSourceNew:
*****************************************************************************/
static input_source_t *InputSourceNew( input_thread_t *p_input )
@@ -2498,10 +2436,6 @@ static int InputSourceInit( input_thread_t *p_input,
var_SetBool( p_input, "can-seek", b );
in->b_title_demux = false;
- if( stream_Control( in->p_stream, STREAM_GET_TITLE_INFO,
- &in->title, &in->i_title, &in->i_title_offset,
- &in->i_seekpoint_offset ) )
- TAB_INIT( in->i_title, in->title );
}
in->p_demux = demux_New( p_input, p_input, psz_access, psz_demux,
More information about the vlc-commits
mailing list