diff options
Diffstat (limited to 'Managers')
-rw-r--r-- | Managers/MultimediaManager.cpp | 11 | ||||
-rw-r--r-- | Managers/MultimediaManager.h | 2 | ||||
-rw-r--r-- | Managers/MultimediaStream.cpp | 7 | ||||
-rw-r--r-- | Managers/MultimediaStream.h | 3 |
4 files changed, 16 insertions, 7 deletions
diff --git a/Managers/MultimediaManager.cpp b/Managers/MultimediaManager.cpp index 30f8427a..81c5514e 100644 --- a/Managers/MultimediaManager.cpp +++ b/Managers/MultimediaManager.cpp @@ -99,7 +99,7 @@ bool MultimediaManager::initICN(const std::string& url) { this->url = url; EnterCriticalSection(&this->monitorMutex); - this->icnConn = new libdash::framework::input::ICNConnectionConsumerApi(20.0, this->beta, this->drop); + this->icnConn = new libdash::framework::input::ICNConnectionConsumerApi(20.0, this->beta, this->drop, this->v6FirstWord); icnConn->InitForMPD(url); int ret = 0; char * data = (char *)malloc(4096); @@ -394,14 +394,14 @@ void MultimediaManager::notifyAudioBufferObservers(uint32_t fillstateInPercent) void MultimediaManager::initVideoRendering(uint32_t offset) { - this->videoStream = new MultimediaStream(viper::managers::VIDEO, this->mpdWrapper, this->segmentBufferSize, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop); + this->videoStream = new MultimediaStream(viper::managers::VIDEO, this->mpdWrapper, this->segmentBufferSize, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop, this->v6FirstWord); this->videoStream->attachStreamObserver(this); this->videoStream->setPosition(offset); } void MultimediaManager::initAudioPlayback(uint32_t offset) { - this->audioStream = new MultimediaStream(viper::managers::AUDIO, this->mpdWrapper, this->segmentBufferSize, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop); + this->audioStream = new MultimediaStream(viper::managers::AUDIO, this->mpdWrapper, this->segmentBufferSize, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop, this->v6FirstWord); this->audioStream->attachStreamObserver(this); this->audioStream->setPosition(offset); } @@ -673,6 +673,11 @@ void MultimediaManager::setDrop(float drop) this->drop = drop; } +void MultimediaManager::setV6FirstWord(std::string v6FirstWord) +{ + this->v6FirstWord = v6FirstWord; +} + void MultimediaManager::fetchMPD() { if(this->icn) diff --git a/Managers/MultimediaManager.h b/Managers/MultimediaManager.h index ade2b767..926261a1 100644 --- a/Managers/MultimediaManager.h +++ b/Managers/MultimediaManager.h @@ -73,6 +73,7 @@ public: void setOffset (int offset); void setBeta (float beta); void setDrop (float drop); + void setV6FirstWord (std::string v6FirstWord); bool canPush (); void fetchMPD (); @@ -85,6 +86,7 @@ public: private: float beta; float drop; + std::string v6FirstWord; std::string downloadPath; int segmentBufferSize; ViperGui *viperGui; diff --git a/Managers/MultimediaStream.cpp b/Managers/MultimediaStream.cpp index 86cde35d..4b11da8a 100644 --- a/Managers/MultimediaStream.cpp +++ b/Managers/MultimediaStream.cpp @@ -18,7 +18,7 @@ using namespace libdash::framework::buffer; using namespace libdash::framework::mpd; using namespace dash::mpd; -MultimediaStream::MultimediaStream(StreamType type, MPDWrapper *mpdWrapper, uint32_t bufferSize, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop) : +MultimediaStream::MultimediaStream(StreamType type, MPDWrapper *mpdWrapper, uint32_t bufferSize, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop, std::string v6FirstWord) : type (type), segmentBufferSize (bufferSize), dashManager (NULL), @@ -27,7 +27,8 @@ MultimediaStream::MultimediaStream(StreamType type, MPDWrapper *mpdWrapper, uint icnAlpha (icnAlpha), noDecoding (nodecoding), beta (beta), - drop (drop) + drop (drop), + v6FirstWord (v6FirstWord) { this->init(); } @@ -69,7 +70,7 @@ void MultimediaStream::setPositionInMsec(uint32_t milliSecs) void MultimediaStream::init() { - this->dashManager = new DASHManager(this->type, this->segmentBufferSize, this, this->mpdWrapper, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop); + this->dashManager = new DASHManager(this->type, this->segmentBufferSize, this, this->mpdWrapper, this->isICN(), this->icnAlpha, this->noDecoding, this->beta, this->drop, this->v6FirstWord); } bool MultimediaStream::start() diff --git a/Managers/MultimediaStream.h b/Managers/MultimediaStream.h index 454cca23..e1ab22c1 100644 --- a/Managers/MultimediaStream.h +++ b/Managers/MultimediaStream.h @@ -44,7 +44,7 @@ namespace managers class MultimediaStream : public libdash::framework::input::IDASHManagerObserver, public libdash::framework::buffer::IBufferObserver { public: - MultimediaStream(StreamType type, libdash::framework::mpd::MPDWrapper *mpdWrapper, uint32_t segmentBufferSize, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop); + MultimediaStream(StreamType type, libdash::framework::mpd::MPDWrapper *mpdWrapper, uint32_t segmentBufferSize, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop, std::string v6FirstWord); virtual ~MultimediaStream(); bool start(); @@ -80,6 +80,7 @@ public: private: float beta; float drop; + std::string v6FirstWord; std::vector<IStreamObserver *> observers; libdash::framework::mpd::MPDWrapper *mpdWrapper; libdash::framework::adaptation::IAdaptationLogic *logic; |