[vlc-commits] demux: adaptive: set EsOut stream priority
Francois Cartegnie
git at videolan.org
Mon Mar 30 16:15:38 CEST 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 15 15:50:27 2019 +0200| [02aaf4ba191ee1254d52125e9ab2c611c10e664f] | committer: Francois Cartegnie
demux: adaptive: set EsOut stream priority
(cherry picked from commit 271b64aba1d456a45edabae3c51dc49fc1fac0ef)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=02aaf4ba191ee1254d52125e9ab2c611c10e664f
---
modules/demux/adaptive/SegmentTracker.cpp | 5 +++++
modules/demux/adaptive/SegmentTracker.hpp | 2 ++
modules/demux/adaptive/Streams.cpp | 5 +++++
3 files changed, 12 insertions(+)
diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp
index b4ee755ae3..ed06443f3f 100644
--- a/modules/demux/adaptive/SegmentTracker.cpp
+++ b/modules/demux/adaptive/SegmentTracker.cpp
@@ -117,6 +117,11 @@ StreamFormat SegmentTracker::getCurrentFormat() const
return StreamFormat();
}
+const Role & SegmentTracker::getStreamRole() const
+{
+ return adaptationSet->getRole();
+}
+
bool SegmentTracker::segmentsListReady() const
{
BaseRepresentation *rep = curRepresentation;
diff --git a/modules/demux/adaptive/SegmentTracker.hpp b/modules/demux/adaptive/SegmentTracker.hpp
index 5355967c96..f7c691731e 100644
--- a/modules/demux/adaptive/SegmentTracker.hpp
+++ b/modules/demux/adaptive/SegmentTracker.hpp
@@ -21,6 +21,7 @@
#define SEGMENTTRACKER_HPP
#include "StreamFormat.hpp"
+#include "playlist/Role.hpp"
#include <vlc_common.h>
#include <list>
@@ -118,6 +119,7 @@ namespace adaptive
~SegmentTracker();
StreamFormat getCurrentFormat() const;
+ const Role & getStreamRole() const;
bool segmentsListReady() const;
void reset();
SegmentChunk* getNextChunk(bool, AbstractConnectionManager *);
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index bc4358d7cf..869baf67c3 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -78,6 +78,11 @@ bool AbstractStream::init(const StreamFormat &format_, SegmentTracker *tracker,
{
/* All successfull */
fakeesout->setExtraInfoProvider( this );
+ const Role & streamRole = tracker->getStreamRole();
+ if(streamRole.isDefault() && streamRole.autoSelectable())
+ fakeesout->setPriority(ES_PRIORITY_MIN + 10);
+ else if(!streamRole.autoSelectable())
+ fakeesout->setPriority(ES_PRIORITY_NOT_DEFAULTABLE);
format = format_;
segmentTracker = tracker;
segmentTracker->registerListener(this);
More information about the vlc-commits
mailing list