[vlc-devel] [PATCH 2/3] demuxers: adjust es_out_Control( out, ES_OUT_GET_ES_STATE, ... ) to new protytpe
jpsaman at videolan.org
jpsaman at videolan.org
Sat Feb 15 23:24:05 CET 2014
From: Jean-Paul Saman <jean-paul.saman at m2x.nl>
This patch depends on "input core add status field per elementary stream".
---
modules/access/live555.cpp | 4 ++--
modules/demux/asf/asf.c | 4 ++--
modules/demux/avi/avi.c | 13 ++++++-------
modules/demux/mkv/matroska_segment.cpp | 4 ++--
modules/demux/mkv/mkv.cpp | 4 ++--
modules/demux/mp4/mp4.c | 12 ++++++------
modules/demux/ogg.c | 8 ++++----
modules/demux/rawdv.c | 4 ++--
modules/demux/vobsub.c | 8 ++++----
9 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 88ddc2e..9075fe8 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -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;
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 62795f6..1286bb0 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -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;
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 1de0e12..690d38c 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -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;
}
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index c75eab5..31459f5 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -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 );
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index ac2c977..760d3e2 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -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 )
{
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 4c6b680..b3a448d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -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 )
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 3270b48..20904c8 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -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 )
{
diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c
index 77dc254..3897b39 100644
--- a/modules/demux/rawdv.c
+++ b/modules/demux/rawdv.c
@@ -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 =
diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index 5de3513..98b7c48 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -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 )
--
1.8.3.1
More information about the vlc-devel
mailing list