bool BasicCMParser::parse ()
{
const std::map<std::string, std::string> attr = this->root->getAttributes();
- this->mpd = new MPD;
+ this->mpd = new MPD(p_stream);
std::map<std::string, std::string>::const_iterator it;
it = attr.find("mediaPresentationDuration");
bool IsoffMainParser::parse ()
{
- mpd = new MPD();
+ mpd = new MPD(p_stream);
setMPDAttributes();
setMPDBaseUrl(root);
setPeriods(root);
#endif
#include "MPD.h"
+#include "Helper.h"
+#include "dash.hpp"
using namespace dash::mpd;
-MPD::MPD () :
+MPD::MPD (stream_t *stream_) :
ICanonicalUrl(),
+ stream(stream_),
profile( dash::mpd::Profile::Unknown ),
live( false ),
availabilityStartTime( -1 ),
else
return std::string();
}
+
+vlc_object_t * MPD::getVLCObject() const
+{
+ return VLC_OBJECT(stream);
+}
class MPD : public ICanonicalUrl
{
public:
- MPD();
+ MPD(stream_t *);
virtual ~MPD();
Profile getProfile() const;
void setProgramInformation (ProgramInformation *progInfo);
virtual std::string getUrlSegment() const; /* impl */
+ vlc_object_t * getVLCObject() const;
private:
+ stream_t *stream;
Profile profile;
bool live;
time_t availabilityStartTime;
using namespace dash::mpd;
-Representation::Representation ( MPD *mpd ) :
- ICanonicalUrl ( mpd ),
+Representation::Representation ( MPD *mpd_ ) :
+ ICanonicalUrl ( mpd_ ),
+ mpd ( mpd_ ),
bandwidth (0),
qualityRanking ( -1 ),
segmentInfo ( NULL ),
ret.append(baseUrl->getUrl());
return ret;
}
+
+MPD * Representation::getMPD() const
+{
+ return mpd;
+}
void setHeight (int height);
int getHeight () const;
void setBaseUrl (BaseUrl *baseUrl);
+ MPD* getMPD () const;
std::vector<std::string> toString() const;
virtual std::string getUrlSegment () const; /* impl */
private:
+ MPD *mpd;
uint64_t bandwidth;
std::string id;
int qualityRanking;