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()
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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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