Commit 1ac11c98 authored by Jean-Paul Saman's avatar Jean-Paul Saman

demuxers: adjust es_out_Control( out, ES_OUT_GET_ES_STATE, ... ) to new protytpe

This patch depends on "input core add status field per elementary stream".
parent d8199d8c
......@@ -1242,8 +1242,8 @@ static int Demux( demux_t *p_demux )
if( tk->p_es )
{
bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
if( !b && tk->b_selected )
{
tk->b_selected = false;
......
......@@ -249,9 +249,9 @@ static void WaitKeyframe( demux_t *p_demux )
asf_track_t *tk = p_sys->track[i];
if ( tk && tk->p_sp && tk->i_cat == VIDEO_ES )
{
bool b_selected = false;
bool b_selected = false, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
tk->p_es, &b_selected );
tk->p_es, &b_selected, &b_error );
if ( b_selected )
{
p_sys->i_seek_track = tk->p_sp->i_stream_number;
......
......@@ -816,18 +816,17 @@ static int Demux_Seekable( demux_t *p_demux )
/* cannot be more than 100 stream (dcXX or wbXX) */
avi_track_toread_t toread[100];
/* detect new selected/unselected streams */
for( i_track = 0; i_track < p_sys->i_track; i_track++ )
{
avi_track_t *tk = p_sys->track[i_track];
bool b;
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
if( tk->p_es_dv_audio )
{
bool b_extra;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra, &b_error );
b |= b_extra;
}
if( b && !tk->b_activated )
......@@ -1175,13 +1174,13 @@ static int Demux_UnSeekable( demux_t *p_demux )
for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
{
avi_track_t *tk = p_sys->track[i_stream];
bool b;
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
if( tk->p_es_dv_audio )
{
bool b_extra;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra, b_error );
b |= b_extra;
}
......
......@@ -937,11 +937,11 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
{
if( tracks[i_track]->i_seek_preroll )
{
bool b_enabled;
bool b_enabled, b_error;
if( es_out_Control( sys.demuxer.out,
ES_OUT_GET_ES_STATE,
tracks[i_track]->p_es,
&b_enabled ) == VLC_SUCCESS &&
&b_enabled, &b_error ) == VLC_SUCCESS &&
b_enabled )
i_seek_preroll = __MAX( i_seek_preroll,
tracks[i_track]->i_seek_preroll );
......
......@@ -502,8 +502,8 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
if ( tk->fmt.i_cat != NAV_ES )
{
bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
if( !b )
{
......
......@@ -660,7 +660,7 @@ static int Demux( demux_t *p_demux )
i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
bool b;
bool b, b_error;
if( !tk->b_ok || tk->b_chapter ||
( tk->b_selected && tk->i_sample >= tk->i_sample_count ) )
......@@ -668,7 +668,7 @@ static int Demux( demux_t *p_demux )
continue;
}
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
if( tk->b_selected && !b )
{
......@@ -2427,7 +2427,7 @@ static int TrackTimeToSampleChunk( demux_t *p_demux, mp4_track_t *p_track,
static int TrackGotoChunkSample( demux_t *p_demux, mp4_track_t *p_track,
unsigned int i_chunk, unsigned int i_sample )
{
bool b_reselect = false;
bool b_reselect = false, b_error = false;
/* now see if actual es is ok */
if( p_track->i_chunk >= p_track->i_chunk_count ||
......@@ -2438,7 +2438,7 @@ static int TrackGotoChunkSample( demux_t *p_demux, mp4_track_t *p_track,
p_track->i_track_ID );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_track->p_es, &b_reselect );
p_track->p_es, &b_reselect, &b_error );
es_out_Del( p_demux->out, p_track->p_es );
......@@ -3674,12 +3674,12 @@ int DemuxFrg( demux_t *p_demux )
for( i_track = 0, i_track_selected = 0; i_track < p_sys->i_tracks; i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
bool b;
bool b, b_error;
if( !tk->b_ok || tk->b_chapter )
continue;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
msg_Dbg( p_demux, "track %u %s!", tk->i_track_ID, b ? "enabled" : "disabled" );
if( tk->b_selected && !b )
......
......@@ -614,9 +614,9 @@ static logical_stream_t * Ogg_GetSelectedStream( demux_t *p_demux )
logical_stream_t *p_candidate = p_sys->pp_stream[i];
if ( !p_candidate->p_es ) continue;
bool b_selected = false;
bool b_selected = false, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_candidate->p_es, &b_selected );
p_candidate->p_es, &b_selected, &b_error );
if ( !b_selected ) continue;
if ( !p_stream && p_candidate->fmt.i_cat == AUDIO_ES )
......@@ -961,7 +961,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
ogg_packet *p_oggpacket )
{
block_t *p_block;
bool b_selected;
bool b_selected, b_error;
int i_header_len = 0;
mtime_t i_pts = VLC_TS_UNKNOWN;
demux_sys_t *p_ogg = p_demux->p_sys;
......@@ -1006,7 +1006,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
b_selected = true;
else
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_stream->p_es, &b_selected );
p_stream->p_es, &b_selected, &b_error );
if( p_stream->b_force_backup )
{
......
......@@ -252,7 +252,7 @@ static int Demux( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block;
bool b_audio = false;
bool b_audio = false, b_error;
if( p_sys->b_hurry_up )
{
......@@ -272,7 +272,7 @@ static int Demux( demux_t *p_demux )
if( p_sys->p_es_audio )
{
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->p_es_audio, &b_audio );
p_sys->p_es_audio, &b_audio, &b_error );
}
p_block->i_dts =
......
......@@ -251,10 +251,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
pi64 = (int64_t*)va_arg( args, int64_t * );
for( i = 0; i < p_sys->i_tracks; i++ )
{
bool b_selected;
bool b_selected, b_error;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected );
p_sys->track[i].p_es, &b_selected, &b_error );
if( b_selected ) break;
}
if( i < p_sys->i_tracks && p_sys->track[i].i_current_subtitle < p_sys->track[i].i_subtitles )
......@@ -284,10 +284,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
pf = (double*)va_arg( args, double * );
for( i = 0; i < p_sys->i_tracks; i++ )
{
bool b_selected;
bool b_selected, b_error;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected );
p_sys->track[i].p_es, &b_selected, &b_error );
if( b_selected ) break;
}
if( p_sys->track[i].i_current_subtitle >= p_sys->track[i].i_subtitles )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment