Commit 06b981f8 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: dash: move debug to playlist

parent a98cee48
......@@ -42,6 +42,7 @@ namespace adaptative
virtual bool isLive() const = 0;
void setType(const std::string &);
virtual void debug() = 0;
void addPeriod (BasePeriod *period);
void addBaseUrl (BaseUrl *url);
......
......@@ -64,7 +64,8 @@ bool IsoffMainParser::parse (Profile profile)
setMPDBaseUrl(root);
parsePeriods(root);
print();
if(mpd)
mpd->debug();
return true;
}
......@@ -430,29 +431,6 @@ void IsoffMainParser::parseProgramInformation(Node * node, MPD *mpd)
}
}
void IsoffMainParser::print ()
{
if(mpd)
{
msg_Dbg(p_stream, "MPD profile=%s mediaPresentationDuration=%ld minBufferTime=%ld",
static_cast<std::string>(mpd->getProfile()).c_str(),
mpd->duration.Get(),
mpd->minBufferTime.Get());
msg_Dbg(p_stream, "BaseUrl=%s", mpd->getUrlSegment().toString().c_str());
std::vector<BasePeriod *>::const_iterator i;
for(i = mpd->getPeriods().begin(); i != mpd->getPeriods().end(); i++)
{
std::vector<std::string> debug = (*i)->toString();
std::vector<std::string>::const_iterator l;
for(l = debug.begin(); l < debug.end(); l++)
{
msg_Dbg(p_stream, "%s", (*l).c_str());
}
}
}
}
IsoTime::IsoTime(const std::string &str)
{
time = str_duration(str.c_str());
......
......@@ -61,7 +61,6 @@ namespace dash
virtual ~IsoffMainParser ();
bool parse (Profile profile);
void print ();
private:
void setMPDAttributes ();
......
......@@ -27,6 +27,10 @@
#include "MPD.h"
#include "ProgramInformation.h"
#include "Period.h"
#include <vlc_common.h>
#include <vlc_stream.h>
using namespace dash::mpd;
......@@ -57,3 +61,23 @@ Profile MPD::getProfile() const
{
return profile;
}
void MPD::debug()
{
msg_Dbg(stream, "MPD profile=%s mediaPresentationDuration=%ld minBufferTime=%ld",
static_cast<std::string>(getProfile()).c_str(),
duration.Get(),
minBufferTime.Get());
msg_Dbg(stream, "BaseUrl=%s", getUrlSegment().toString().c_str());
std::vector<BasePeriod *>::const_iterator i;
for(i = getPeriods().begin(); i != getPeriods().end(); i++)
{
std::vector<std::string> debug = (*i)->toString();
std::vector<std::string>::const_iterator l;
for(l = debug.begin(); l < debug.end(); l++)
{
msg_Dbg(stream, "%s", (*l).c_str());
}
}
}
......@@ -44,6 +44,7 @@ namespace dash
Profile getProfile() const;
virtual bool isLive() const;
virtual void debug();
Property<ProgramInformation *> programInfo;
......
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