Commit 62dd5ef7 authored by François Cartegnie's avatar François Cartegnie 🤞

stream_filter: dash: add representation baseurl

parent 2632d19a
......@@ -87,6 +87,10 @@ void IsoffMainParser::setRepresentations (Node *adaptationSetNode, Adaptation
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()));
......
......@@ -39,6 +39,7 @@ Representation::Representation () :
parentGroup ( NULL ),
segmentBase ( NULL ),
segmentList ( NULL ),
baseUrl ( NULL ),
width (0),
height (0)
......@@ -49,6 +50,7 @@ Representation::~Representation ()
{
delete(this->segmentInfo);
delete(this->trickModeType);
delete baseUrl;
}
const std::string& Representation::getId () const
......@@ -141,6 +143,17 @@ void Representation::setSegmentBase (SegmentBase *base)
{
this->segmentBase = base;
}
BaseUrl* Representation::getBaseUrl() const
{
return baseUrl;
}
void Representation::setBaseUrl(BaseUrl *base)
{
baseUrl = base;
}
void Representation::setWidth (int width)
{
this->width = width;
......
......@@ -32,6 +32,7 @@
#include "mpd/TrickModeType.h"
#include "mpd/SegmentBase.h"
#include "mpd/SegmentList.h"
#include "mpd/BaseUrl.h"
namespace dash
{
......@@ -80,6 +81,8 @@ namespace dash
int getWidth () const;
void setHeight (int height);
int getHeight () const;
BaseUrl* getBaseUrl () const;
void setBaseUrl (BaseUrl *baseUrl);
private:
uint64_t bandwidth;
......@@ -91,6 +94,7 @@ namespace dash
const AdaptationSet *parentGroup;
SegmentBase *segmentBase;
SegmentList *segmentList;
BaseUrl *baseUrl;
int width;
int height;
};
......
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