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())
}
}
}
+
+IsoTime::IsoTime(const std::string &str)
+{
+ time = str_duration(str.c_str());
+}
+
+IsoTime::operator mtime_t () const
+{
+ return time;
+}
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;
+ };
}
}