this->currentRepresentation = new Representation;
Node *repNode = representations.at(i);
+ std::vector<Node *> baseUrls = DOMHelper::getChildElementByTagName(repNode, "BaseURL");
+ if(!baseUrls.empty())
+ currentRepresentation->setBaseUrl( new BaseUrl( baseUrls.front()->getText() ) );
+
if(repNode->hasAttribute("width"))
this->currentRepresentation->setWidth(atoi(repNode->getAttributeValue("width").c_str()));
parentGroup ( NULL ),
segmentBase ( NULL ),
segmentList ( NULL ),
+ baseUrl ( NULL ),
width (0),
height (0)
{
delete(this->segmentInfo);
delete(this->trickModeType);
+ delete baseUrl;
}
const std::string& Representation::getId () const
{
this->segmentBase = base;
}
+
+BaseUrl* Representation::getBaseUrl() const
+{
+ return baseUrl;
+}
+
+void Representation::setBaseUrl(BaseUrl *base)
+{
+ baseUrl = base;
+}
+
void Representation::setWidth (int width)
{
this->width = width;
#include "mpd/TrickModeType.h"
#include "mpd/SegmentBase.h"
#include "mpd/SegmentList.h"
+#include "mpd/BaseUrl.h"
namespace dash
{
int getWidth () const;
void setHeight (int height);
int getHeight () const;
+ BaseUrl* getBaseUrl () const;
+ void setBaseUrl (BaseUrl *baseUrl);
private:
uint64_t bandwidth;
const AdaptationSet *parentGroup;
SegmentBase *segmentBase;
SegmentList *segmentList;
+ BaseUrl *baseUrl;
int width;
int height;
};