Commit e78f7139 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: dash: add IsoTime helper

parent 6ead2bae
......@@ -65,11 +65,11 @@ void IsoffMainParser::setMPDAttributes ()
it = attr.find("mediaPresentationDuration");
if(it != attr.end())
this->mpd->setDuration(str_duration(it->second.c_str()));
this->mpd->setDuration(IsoTime(it->second));
it = attr.find("minBufferTime");
if(it != attr.end())
this->mpd->setMinBufferTime(str_duration( it->second.c_str()));
this->mpd->setMinBufferTime(IsoTime(it->second));
it = attr.find("type");
if(it != attr.end())
......@@ -344,3 +344,13 @@ void IsoffMainParser::print ()
}
}
}
IsoTime::IsoTime(const std::string &str)
{
time = str_duration(str.c_str());
}
IsoTime::operator mtime_t () const
{
return time;
}
......@@ -60,6 +60,16 @@ namespace dash
size_t parseSegmentList (dash::xml::Node *, SegmentInformation *);
size_t parseSegmentTemplate(dash::xml::Node *, SegmentInformation *);
};
class IsoTime
{
public:
IsoTime(const std::string&);
operator mtime_t() const;
private:
mtime_t time;
};
}
}
......
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