[vlc-commits] demux: adaptive: pass and handle priority in FakeESOut
Francois Cartegnie
git at videolan.org
Fri May 17 20:34:59 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 15 15:49:50 2019 +0200| [f3d0962319fb69c721d0feaa5efe0470001eaadd] | committer: Francois Cartegnie
demux: adaptive: pass and handle priority in FakeESOut
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3d0962319fb69c721d0feaa5efe0470001eaadd
---
modules/demux/adaptive/plumbing/FakeESOut.cpp | 10 +++++++++-
modules/demux/adaptive/plumbing/FakeESOut.hpp | 2 ++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.cpp b/modules/demux/adaptive/plumbing/FakeESOut.cpp
index 42d46f3c34..de0abf3853 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.cpp
@@ -78,6 +78,7 @@ FakeESOut::FakeESOut( es_out_t *es, CommandsQueue *queue )
{
fakeesout->fake = this;
fakeesout->es_out.cbs = &esOutCallbacks;
+ priority = ES_PRIORITY_SELECTABLE_MIN;
vlc_mutex_init(&lock);
}
@@ -133,6 +134,8 @@ FakeESOutID * FakeESOut::createNewID( const es_format_t *p_fmt )
fmtcopy.i_group = 0; /* Always ignore group for adaptive */
fmtcopy.i_id = -1;
+ fmtcopy.i_priority = priority;
+
if( extrainfo )
extrainfo->fillExtraFMTInfo( &fmtcopy );
@@ -179,7 +182,7 @@ void FakeESOut::createOrRecycleRealEsID( FakeESOutID *es_id )
if( b_preexisting && !b_select ) /* was not previously selected on other format */
fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
else
- fmt.i_priority = ES_PRIORITY_SELECTABLE_MIN;
+ fmt.i_priority = priority;//ES_PRIORITY_SELECTABLE_MIN;
realid = es_out_Add( real_es_out, &fmt );
if( b_preexisting && b_select ) /* was previously selected on other format */
es_out_Control( real_es_out, ES_OUT_SET_ES, realid );
@@ -189,6 +192,11 @@ void FakeESOut::createOrRecycleRealEsID( FakeESOutID *es_id )
es_id->setRealESID( realid );
}
+void FakeESOut::setPriority(int p)
+{
+ priority = p;
+}
+
vlc_tick_t FakeESOut::getTimestampOffset() const
{
vlc_tick_t time = timestamps_offset;
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.hpp b/modules/demux/adaptive/plumbing/FakeESOut.hpp
index aefe3f2976..943f33e1b0 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.hpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.hpp
@@ -66,6 +66,7 @@ namespace adaptive
/* Used by FakeES ID */
void recycle( FakeESOutID *id );
void createOrRecycleRealEsID( FakeESOutID * );
+ void setPriority(int);
/**/
void schedulePCRReset();
@@ -92,6 +93,7 @@ namespace adaptive
vlc_tick_t timestamps_offset;
vlc_tick_t timestamps_expected;
bool timestamps_check_done;
+ int priority;
std::list<FakeESOutID *> fakeesidlist;
std::list<FakeESOutID *> recycle_candidates;
};
More information about the vlc-commits
mailing list