Commit 47af7ca1 authored by François Cartegnie's avatar François Cartegnie 🤞

stream_filter: dash: have vlc_object accessible from, at least, segments

parent 9227c871
......@@ -63,7 +63,7 @@ BasicCMParser::~BasicCMParser ()
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");
......
......@@ -45,7 +45,7 @@ IsoffMainParser::~IsoffMainParser ()
bool IsoffMainParser::parse ()
{
mpd = new MPD();
mpd = new MPD(p_stream);
setMPDAttributes();
setMPDBaseUrl(root);
setPeriods(root);
......
......@@ -26,11 +26,14 @@
#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 ),
......@@ -170,3 +173,8 @@ std::string MPD::getUrlSegment() const
else
return std::string();
}
vlc_object_t * MPD::getVLCObject() const
{
return VLC_OBJECT(stream);
}
......@@ -42,7 +42,7 @@ namespace dash
class MPD : public ICanonicalUrl
{
public:
MPD();
MPD(stream_t *);
virtual ~MPD();
Profile getProfile() const;
......@@ -69,8 +69,10 @@ namespace dash
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;
......
......@@ -32,8 +32,9 @@
using namespace dash::mpd;
Representation::Representation ( MPD *mpd ) :
ICanonicalUrl ( mpd ),
Representation::Representation ( MPD *mpd_ ) :
ICanonicalUrl ( mpd_ ),
mpd ( mpd_ ),
bandwidth (0),
qualityRanking ( -1 ),
segmentInfo ( NULL ),
......@@ -223,3 +224,8 @@ std::string Representation::getUrlSegment() const
ret.append(baseUrl->getUrl());
return ret;
}
MPD * Representation::getMPD() const
{
return mpd;
}
......@@ -84,11 +84,13 @@ namespace dash
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;
......
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