[vlc-commits] demux: adaptative: add description to es
Francois Cartegnie
git at videolan.org
Sat Jul 25 22:30:46 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jul 25 22:11:31 2015 +0200| [6da0f4be64b2a04f15308840d46ca360abe624be] | committer: Francois Cartegnie
demux: adaptative: add description to es
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6da0f4be64b2a04f15308840d46ca360abe624be
---
modules/demux/adaptative/PlaylistManager.cpp | 4 ++++
modules/demux/adaptative/Streams.cpp | 11 +++++++++++
modules/demux/adaptative/Streams.hpp | 4 ++++
modules/demux/adaptative/playlist/BaseAdaptationSet.h | 1 +
4 files changed, 20 insertions(+)
diff --git a/modules/demux/adaptative/PlaylistManager.cpp b/modules/demux/adaptative/PlaylistManager.cpp
index 32c251d..93ecb40 100644
--- a/modules/demux/adaptative/PlaylistManager.cpp
+++ b/modules/demux/adaptative/PlaylistManager.cpp
@@ -117,7 +117,11 @@ bool PlaylistManager::setupPeriod()
if(!languages.empty())
st->setLanguage(languages.front());
+ if(!set->description.Get().empty())
+ st->setDescription(set->description.Get());
+
st->create(logic, tracker, streamOutputFactory);
+
streams.push_back(st);
} catch (int) {
delete st;
diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 17b4af6..746c065 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -87,6 +87,7 @@ void Stream::updateFormat(StreamFormat &newformat)
if(!output)
throw VLC_EGENERIC;
output->setLanguage(language);
+ output->setDescription(description);
}
void Stream::setLanguage(const std::string &lang)
@@ -94,6 +95,11 @@ void Stream::setLanguage(const std::string &lang)
language = lang;
}
+void Stream::setDescription(const std::string &desc)
+{
+ description = desc;
+}
+
bool Stream::isEOF() const
{
return false;
@@ -329,6 +335,11 @@ void AbstractStreamOutput::setLanguage(const std::string &lang)
language = lang;
}
+void AbstractStreamOutput::setDescription(const std::string &desc)
+{
+ description = desc;
+}
+
const StreamFormat & AbstractStreamOutput::getStreamFormat() const
{
return format;
diff --git a/modules/demux/adaptative/Streams.hpp b/modules/demux/adaptative/Streams.hpp
index 70af790..972d129 100644
--- a/modules/demux/adaptative/Streams.hpp
+++ b/modules/demux/adaptative/Streams.hpp
@@ -69,6 +69,7 @@ namespace adaptative
const AbstractStreamOutputFactory *);
void updateFormat(StreamFormat &);
void setLanguage(const std::string &);
+ void setDescription(const std::string &);
bool isEOF() const;
mtime_t getPCR() const;
mtime_t getFirstDTS() const;
@@ -97,6 +98,7 @@ namespace adaptative
bool disabled;
bool eof;
std::string language;
+ std::string description;
const AbstractStreamOutputFactory *streamOutputFactory;
};
@@ -108,6 +110,7 @@ namespace adaptative
virtual ~AbstractStreamOutput();
void setLanguage(const std::string &);
+ void setDescription(const std::string &);
const StreamFormat & getStreamFormat() const;
virtual void pushBlock(block_t *, bool) = 0;
virtual mtime_t getPCR() const;
@@ -127,6 +130,7 @@ namespace adaptative
mtime_t pcr;
int group;
std::string language;
+ std::string description;
private:
StreamFormat format;
diff --git a/modules/demux/adaptative/playlist/BaseAdaptationSet.h b/modules/demux/adaptative/playlist/BaseAdaptationSet.h
index 9adb762..e2d3b4b 100644
--- a/modules/demux/adaptative/playlist/BaseAdaptationSet.h
+++ b/modules/demux/adaptative/playlist/BaseAdaptationSet.h
@@ -52,6 +52,7 @@ namespace adaptative
bool getBitstreamSwitching() const;
void addRepresentation( BaseRepresentation *rep );
void debug(vlc_object_t *,int = 0) const;
+ Property<std::string> description;
protected:
std::vector<BaseRepresentation *> representations;
More information about the vlc-commits
mailing list