Commit 3a87d56e authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

stream_filter: dash: fix and enable mpd debug print

parent d316ab1a
...@@ -49,6 +49,7 @@ bool IsoffMainParser::parse () ...@@ -49,6 +49,7 @@ bool IsoffMainParser::parse ()
this->setMPDAttributes(); this->setMPDAttributes();
this->setMPDBaseUrl(); this->setMPDBaseUrl();
this->setPeriods(); this->setPeriods();
this->print();
return true; return true;
} }
...@@ -198,36 +199,33 @@ void IsoffMainParser::setSegments (dash::xml::Node *segListNode, Segme ...@@ -198,36 +199,33 @@ void IsoffMainParser::setSegments (dash::xml::Node *segListNode, Segme
} }
void IsoffMainParser::print () void IsoffMainParser::print ()
{ {
if(this->mpd) if(mpd)
{ {
msg_Dbg(this->p_stream, "MPD profile=%d mediaPresentationDuration=%ld minBufferTime=%ld", this->mpd->getProfile(), msg_Dbg(p_stream, "MPD profile=%d mediaPresentationDuration=%ld minBufferTime=%ld", mpd->getProfile(),
this->mpd->getDuration(), mpd->getDuration(),
this->mpd->getMinBufferTime()); mpd->getMinBufferTime());
const std::vector<BaseUrl *> baseurls = this->mpd->getBaseUrls(); std::vector<BaseUrl *>::const_iterator h;
for(h = mpd->getBaseUrls().begin(); h != mpd->getBaseUrls().end(); h++)
for(size_t i = 0; i < baseurls.size(); i++) msg_Dbg(p_stream, "BaseUrl=%s", (*h)->getUrl().c_str());
msg_Dbg(this->p_stream, "BaseUrl=%s", baseurls.at(i)->getUrl().c_str());
std::vector<Period *>::const_iterator i;
const std::vector<Period *> periods = this->mpd->getPeriods(); for(i = mpd->getPeriods().begin(); i != mpd->getPeriods().end(); i++)
for(size_t i = 0; i < periods.size(); i++)
{ {
Period *period = periods.at(i); msg_Dbg(p_stream, " Period");
msg_Dbg(this->p_stream, " Period"); std::vector<AdaptationSet *>::const_iterator j;
for(size_t j = 0; j < period->getAdaptationSets().size(); j++) for(j = (*i)->getAdaptationSets().begin(); j != (*i)->getAdaptationSets().end(); j++)
{ {
AdaptationSet *aset = period->getAdaptationSets().at(j); msg_Dbg(p_stream, " AdaptationSet");
msg_Dbg(this->p_stream, " AdaptationSet"); std::vector<Representation *>::const_iterator k;
for(size_t k = 0; k < aset->getRepresentations().size(); k++) for(k = (*j)->getRepresentations().begin(); k != (*j)->getRepresentations().begin(); k++)
{ {
Representation *rep = aset->getRepresentations().at(k); msg_Dbg(p_stream, " Representation");
msg_Dbg(this->p_stream, " Representation"); msg_Dbg(p_stream, " InitSeg url=%s", (*k)->getSegmentBase()->getInitSegment()->getSourceUrl().c_str());
Segment *initSeg = rep->getSegmentBase()->getInitSegment(); std::vector<Segment *>::const_iterator l;
msg_Dbg(this->p_stream, " InitSeg url=%s", initSeg->getSourceUrl().c_str()); for(l = (*k)->getSegmentList()->getSegments().begin();
for(size_t l = 0; l < rep->getSegmentList()->getSegments().size(); l++) l < (*k)->getSegmentList()->getSegments().end(); l++)
{ {
Segment *seg = rep->getSegmentList()->getSegments().at(l); msg_Dbg(p_stream, " Segment url=%s", (*l)->getSourceUrl().c_str());
msg_Dbg(this->p_stream, " Segment url=%s", seg->getSourceUrl().c_str());
} }
} }
} }
......
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