Commit 62dd5ef7 authored by Francois Cartegnie's avatar Francois Cartegnie

stream_filter: dash: add representation baseurl

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