[vlc-commits] stream_filter: dash: fix and enable mpd debug print
Francois Cartegnie
git at videolan.org
Mon Nov 17 18:29:43 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov 16 20:37:09 2014 +0100| [3a87d56e3c1e37c0b8615f1c3eb6ab24990d5fd8] | committer: Francois Cartegnie
stream_filter: dash: fix and enable mpd debug print
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a87d56e3c1e37c0b8615f1c3eb6ab24990d5fd8
---
modules/stream_filter/dash/mpd/IsoffMainParser.cpp | 48 ++++++++++----------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/modules/stream_filter/dash/mpd/IsoffMainParser.cpp b/modules/stream_filter/dash/mpd/IsoffMainParser.cpp
index 433e0cb..4d35acc 100644
--- a/modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+++ b/modules/stream_filter/dash/mpd/IsoffMainParser.cpp
@@ -49,6 +49,7 @@ bool IsoffMainParser::parse ()
this->setMPDAttributes();
this->setMPDBaseUrl();
this->setPeriods();
+ this->print();
return true;
}
@@ -198,36 +199,33 @@ void IsoffMainParser::setSegments (dash::xml::Node *segListNode, Segme
}
void IsoffMainParser::print ()
{
- if(this->mpd)
+ if(mpd)
{
- msg_Dbg(this->p_stream, "MPD profile=%d mediaPresentationDuration=%ld minBufferTime=%ld", this->mpd->getProfile(),
- this->mpd->getDuration(),
- this->mpd->getMinBufferTime());
- const std::vector<BaseUrl *> baseurls = this->mpd->getBaseUrls();
-
- for(size_t i = 0; i < baseurls.size(); i++)
- msg_Dbg(this->p_stream, "BaseUrl=%s", baseurls.at(i)->getUrl().c_str());
-
- const std::vector<Period *> periods = this->mpd->getPeriods();
-
- for(size_t i = 0; i < periods.size(); i++)
+ msg_Dbg(p_stream, "MPD profile=%d mediaPresentationDuration=%ld minBufferTime=%ld", mpd->getProfile(),
+ mpd->getDuration(),
+ mpd->getMinBufferTime());
+ std::vector<BaseUrl *>::const_iterator h;
+ for(h = mpd->getBaseUrls().begin(); h != mpd->getBaseUrls().end(); h++)
+ msg_Dbg(p_stream, "BaseUrl=%s", (*h)->getUrl().c_str());
+
+ std::vector<Period *>::const_iterator i;
+ for(i = mpd->getPeriods().begin(); i != mpd->getPeriods().end(); i++)
{
- Period *period = periods.at(i);
- msg_Dbg(this->p_stream, " Period");
- for(size_t j = 0; j < period->getAdaptationSets().size(); j++)
+ msg_Dbg(p_stream, " Period");
+ std::vector<AdaptationSet *>::const_iterator j;
+ for(j = (*i)->getAdaptationSets().begin(); j != (*i)->getAdaptationSets().end(); j++)
{
- AdaptationSet *aset = period->getAdaptationSets().at(j);
- msg_Dbg(this->p_stream, " AdaptationSet");
- for(size_t k = 0; k < aset->getRepresentations().size(); k++)
+ msg_Dbg(p_stream, " AdaptationSet");
+ std::vector<Representation *>::const_iterator k;
+ for(k = (*j)->getRepresentations().begin(); k != (*j)->getRepresentations().begin(); k++)
{
- Representation *rep = aset->getRepresentations().at(k);
- msg_Dbg(this->p_stream, " Representation");
- Segment *initSeg = rep->getSegmentBase()->getInitSegment();
- msg_Dbg(this->p_stream, " InitSeg url=%s", initSeg->getSourceUrl().c_str());
- for(size_t l = 0; l < rep->getSegmentList()->getSegments().size(); l++)
+ msg_Dbg(p_stream, " Representation");
+ msg_Dbg(p_stream, " InitSeg url=%s", (*k)->getSegmentBase()->getInitSegment()->getSourceUrl().c_str());
+ std::vector<Segment *>::const_iterator l;
+ for(l = (*k)->getSegmentList()->getSegments().begin();
+ l < (*k)->getSegmentList()->getSegments().end(); l++)
{
- Segment *seg = rep->getSegmentList()->getSegments().at(l);
- msg_Dbg(this->p_stream, " Segment url=%s", seg->getSourceUrl().c_str());
+ msg_Dbg(p_stream, " Segment url=%s", (*l)->getSourceUrl().c_str());
}
}
}
More information about the vlc-commits
mailing list