Commit 6da0f4be authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptative: add description to es

parent 07fb2c88
...@@ -117,7 +117,11 @@ bool PlaylistManager::setupPeriod() ...@@ -117,7 +117,11 @@ bool PlaylistManager::setupPeriod()
if(!languages.empty()) if(!languages.empty())
st->setLanguage(languages.front()); st->setLanguage(languages.front());
if(!set->description.Get().empty())
st->setDescription(set->description.Get());
st->create(logic, tracker, streamOutputFactory); st->create(logic, tracker, streamOutputFactory);
streams.push_back(st); streams.push_back(st);
} catch (int) { } catch (int) {
delete st; delete st;
......
...@@ -87,6 +87,7 @@ void Stream::updateFormat(StreamFormat &newformat) ...@@ -87,6 +87,7 @@ void Stream::updateFormat(StreamFormat &newformat)
if(!output) if(!output)
throw VLC_EGENERIC; throw VLC_EGENERIC;
output->setLanguage(language); output->setLanguage(language);
output->setDescription(description);
} }
void Stream::setLanguage(const std::string &lang) void Stream::setLanguage(const std::string &lang)
...@@ -94,6 +95,11 @@ void Stream::setLanguage(const std::string &lang) ...@@ -94,6 +95,11 @@ void Stream::setLanguage(const std::string &lang)
language = lang; language = lang;
} }
void Stream::setDescription(const std::string &desc)
{
description = desc;
}
bool Stream::isEOF() const bool Stream::isEOF() const
{ {
return false; return false;
...@@ -329,6 +335,11 @@ void AbstractStreamOutput::setLanguage(const std::string &lang) ...@@ -329,6 +335,11 @@ void AbstractStreamOutput::setLanguage(const std::string &lang)
language = lang; language = lang;
} }
void AbstractStreamOutput::setDescription(const std::string &desc)
{
description = desc;
}
const StreamFormat & AbstractStreamOutput::getStreamFormat() const const StreamFormat & AbstractStreamOutput::getStreamFormat() const
{ {
return format; return format;
......
...@@ -69,6 +69,7 @@ namespace adaptative ...@@ -69,6 +69,7 @@ namespace adaptative
const AbstractStreamOutputFactory *); const AbstractStreamOutputFactory *);
void updateFormat(StreamFormat &); void updateFormat(StreamFormat &);
void setLanguage(const std::string &); void setLanguage(const std::string &);
void setDescription(const std::string &);
bool isEOF() const; bool isEOF() const;
mtime_t getPCR() const; mtime_t getPCR() const;
mtime_t getFirstDTS() const; mtime_t getFirstDTS() const;
...@@ -97,6 +98,7 @@ namespace adaptative ...@@ -97,6 +98,7 @@ namespace adaptative
bool disabled; bool disabled;
bool eof; bool eof;
std::string language; std::string language;
std::string description;
const AbstractStreamOutputFactory *streamOutputFactory; const AbstractStreamOutputFactory *streamOutputFactory;
}; };
...@@ -108,6 +110,7 @@ namespace adaptative ...@@ -108,6 +110,7 @@ namespace adaptative
virtual ~AbstractStreamOutput(); virtual ~AbstractStreamOutput();
void setLanguage(const std::string &); void setLanguage(const std::string &);
void setDescription(const std::string &);
const StreamFormat & getStreamFormat() const; const StreamFormat & getStreamFormat() const;
virtual void pushBlock(block_t *, bool) = 0; virtual void pushBlock(block_t *, bool) = 0;
virtual mtime_t getPCR() const; virtual mtime_t getPCR() const;
...@@ -127,6 +130,7 @@ namespace adaptative ...@@ -127,6 +130,7 @@ namespace adaptative
mtime_t pcr; mtime_t pcr;
int group; int group;
std::string language; std::string language;
std::string description;
private: private:
StreamFormat format; StreamFormat format;
......
...@@ -52,6 +52,7 @@ namespace adaptative ...@@ -52,6 +52,7 @@ namespace adaptative
bool getBitstreamSwitching() const; bool getBitstreamSwitching() const;
void addRepresentation( BaseRepresentation *rep ); void addRepresentation( BaseRepresentation *rep );
void debug(vlc_object_t *,int = 0) const; void debug(vlc_object_t *,int = 0) const;
Property<std::string> description;
protected: protected:
std::vector<BaseRepresentation *> representations; std::vector<BaseRepresentation *> representations;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment