Skip to content

Commit

Permalink
Revert "demuxers: adjust es_out_Control( out, ES_OUT_GET_ES_STATE, ..…
Browse files Browse the repository at this point in the history
…. ) to new protytpe"

This reverts commit 1ac11c9.
  • Loading branch information
jpsaman committed Feb 15, 2014
1 parent b177679 commit b4b99ec
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 30 deletions.
4 changes: 2 additions & 2 deletions modules/access/live555.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,8 @@ static int Demux( demux_t *p_demux )

if( tk->p_es )
{
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
if( !b && tk->b_selected )
{
tk->b_selected = false;
Expand Down
4 changes: 2 additions & 2 deletions modules/demux/asf/asf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, b_error;
bool b_selected = false;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
tk->p_es, &b_selected, &b_error );
tk->p_es, &b_selected );
if ( b_selected )
{
p_sys->i_seek_track = tk->p_sp->i_stream_number;
Expand Down
13 changes: 7 additions & 6 deletions modules/demux/avi/avi.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,17 +816,18 @@ 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, b_error;
bool b;

es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
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, &b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra );
b |= b_extra;
}
if( b && !tk->b_activated )
Expand Down Expand Up @@ -1174,13 +1175,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, b_error;
bool b;

es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
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, b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es_dv_audio, &b_extra );
b |= b_extra;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/demux/mkv/matroska_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, b_error;
bool b_enabled;
if( es_out_Control( sys.demuxer.out,
ES_OUT_GET_ES_STATE,
tracks[i_track]->p_es,
&b_enabled, &b_error ) == VLC_SUCCESS &&
&b_enabled ) == VLC_SUCCESS &&
b_enabled )
i_seek_preroll = __MAX( i_seek_preroll,
tracks[i_track]->i_seek_preroll );
Expand Down
4 changes: 2 additions & 2 deletions modules/demux/mkv/mkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock

if ( tk->fmt.i_cat != NAV_ES )
{
bool b, b_error;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
bool b;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );

if( !b )
{
Expand Down
12 changes: 6 additions & 6 deletions modules/demux/mp4/mp4.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,15 @@ static int Demux( demux_t *p_demux )
i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
bool b, b_error;
bool b;

if( !tk->b_ok || tk->b_chapter ||
( tk->b_selected && tk->i_sample >= tk->i_sample_count ) )
{
continue;
}

es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );

if( tk->b_selected && !b )
{
Expand Down Expand Up @@ -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, b_error = false;
bool b_reselect = false;

/* now see if actual es is ok */
if( p_track->i_chunk >= p_track->i_chunk_count ||
Expand All @@ -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, &b_error );
p_track->p_es, &b_reselect );

es_out_Del( p_demux->out, p_track->p_es );

Expand Down Expand Up @@ -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, b_error;
bool b;

if( !tk->b_ok || tk->b_chapter )
continue;

es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b, &b_error );
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
msg_Dbg( p_demux, "track %u %s!", tk->i_track_ID, b ? "enabled" : "disabled" );

if( tk->b_selected && !b )
Expand Down
8 changes: 4 additions & 4 deletions modules/demux/ogg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, b_error;
bool b_selected = false;
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_candidate->p_es, &b_selected, &b_error );
p_candidate->p_es, &b_selected );
if ( !b_selected ) continue;

if ( !p_stream && p_candidate->fmt.i_cat == AUDIO_ES )
Expand Down Expand Up @@ -961,7 +961,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
ogg_packet *p_oggpacket )
{
block_t *p_block;
bool b_selected, b_error;
bool b_selected;
int i_header_len = 0;
mtime_t i_pts = VLC_TS_UNKNOWN;
demux_sys_t *p_ogg = p_demux->p_sys;
Expand Down Expand Up @@ -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, &b_error );
p_stream->p_es, &b_selected );

if( p_stream->b_force_backup )
{
Expand Down
4 changes: 2 additions & 2 deletions modules/demux/rawdv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, b_error;
bool b_audio = false;

if( p_sys->b_hurry_up )
{
Expand All @@ -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, &b_error );
p_sys->p_es_audio, &b_audio );
}

p_block->i_dts =
Expand Down
8 changes: 4 additions & 4 deletions modules/demux/vobsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, b_error;
bool b_selected;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected, &b_error );
p_sys->track[i].p_es, &b_selected );
if( b_selected ) break;
}
if( i < p_sys->i_tracks && p_sys->track[i].i_current_subtitle < p_sys->track[i].i_subtitles )
Expand Down Expand Up @@ -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, b_error;
bool b_selected;
/* Check the ES is selected */
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
p_sys->track[i].p_es, &b_selected, &b_error );
p_sys->track[i].p_es, &b_selected );
if( b_selected ) break;
}
if( p_sys->track[i].i_current_subtitle >= p_sys->track[i].i_subtitles )
Expand Down

0 comments on commit b4b99ec

Please sign in to comment.