diff options
Diffstat (limited to 'Input')
-rw-r--r-- | Input/DASHManager.cpp | 23 | ||||
-rw-r--r-- | Input/DASHManager.h | 3 | ||||
-rw-r--r-- | Input/DASHReceiver.cpp | 7 | ||||
-rw-r--r-- | Input/DASHReceiver.h | 3 | ||||
-rw-r--r-- | Input/ICNConnectionConsumerApi.cpp | 7 | ||||
-rw-r--r-- | Input/ICNConnectionConsumerApi.h | 3 |
6 files changed, 26 insertions, 20 deletions
diff --git a/Input/DASHManager.cpp b/Input/DASHManager.cpp index b3ff8305..5317b207 100644 --- a/Input/DASHManager.cpp +++ b/Input/DASHManager.cpp @@ -19,22 +19,23 @@ using namespace dash::network; using namespace dash::mpd; using namespace libdash::framework::mpd; -DASHManager::DASHManager(viper::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver* stream, MPDWrapper* mpdWrapper, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop) : - readSegmentCount (0), - receiver (NULL), - multimediaStream (stream), - isRunning (false), - icn (icnEnabled), - icnAlpha (icnAlpha), - noDecoding (nodecoding), - beta (beta), - drop (drop) +DASHManager::DASHManager(viper::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver* stream, MPDWrapper* mpdWrapper, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop, std::string v6FirstWord) : + readSegmentCount (0), + receiver (NULL), + multimediaStream (stream), + isRunning (false), + icn (icnEnabled), + icnAlpha (icnAlpha), + noDecoding (nodecoding), + beta (beta), + drop (drop), + v6FirstWord (v6FirstWord) { this->buffer = new Buffer<MediaObject>(maxCapacity,libdash::framework::buffer::VIDEO); this->buffer->attachObserver(this); - this->receiver = new DASHReceiver(type, mpdWrapper, this, this->buffer, maxCapacity, this->isICN(), this->icnAlpha, this->beta, this->drop); + this->receiver = new DASHReceiver(type, mpdWrapper, this, this->buffer, maxCapacity, this->isICN(), this->icnAlpha, this->beta, this->drop, this->v6FirstWord); } DASHManager::~DASHManager() { diff --git a/Input/DASHManager.h b/Input/DASHManager.h index 4bd301e7..62c4bff0 100644 --- a/Input/DASHManager.h +++ b/Input/DASHManager.h @@ -36,7 +36,7 @@ namespace input class DASHManager : public IDASHReceiverObserver, public IBufferObserver { public: - DASHManager (viper::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver *multimediaStream, libdash::framework::mpd::MPDWrapper *mpdWrapper, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop); + DASHManager (viper::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver *multimediaStream, libdash::framework::mpd::MPDWrapper *mpdWrapper, bool icnEnabled, double icnAlpha, bool nodecoding, float beta, float drop, std::string v6FirstWord); virtual ~DASHManager (); bool start(); @@ -66,6 +66,7 @@ public: private: float beta; float drop; + std::string v6FirstWord; buffer::Buffer<MediaObject> *buffer; DASHReceiver *receiver; uint32_t readSegmentCount; diff --git a/Input/DASHReceiver.cpp b/Input/DASHReceiver.cpp index 0d77bdf2..c5769b16 100644 --- a/Input/DASHReceiver.cpp +++ b/Input/DASHReceiver.cpp @@ -19,7 +19,7 @@ using namespace dash::mpd; using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >; -DASHReceiver::DASHReceiver (viper::managers::StreamType type, MPDWrapper *mpdWrapper, IDASHReceiverObserver *obs, Buffer<MediaObject> *buffer, uint32_t bufferSize, bool icnEnabled, double icnAlpha, float beta, float drop) : +DASHReceiver::DASHReceiver (viper::managers::StreamType type, MPDWrapper *mpdWrapper, IDASHReceiverObserver *obs, Buffer<MediaObject> *buffer, uint32_t bufferSize, bool icnEnabled, double icnAlpha, float beta, float drop, std::string v6FirstWord) : type (type), mpdWrapper (mpdWrapper), adaptationSetStream (NULL), @@ -42,6 +42,7 @@ DASHReceiver::DASHReceiver (viper::managers::StreamType type, MPDWrappe isLooping (false), beta (beta), drop (drop), + v6FirstWord (v6FirstWord), bufferingThread (NULL), mpdFetcherThread (NULL) { @@ -57,8 +58,8 @@ DASHReceiver::DASHReceiver (viper::managers::StreamType type, MPDWrappe if(icn) { - this->conn = new ICNConnectionConsumerApi(this->icnAlpha, this->beta, this->drop); - this->initConn = new ICNConnectionConsumerApi(this->icnAlpha, this->beta, this->drop); + this->conn = new ICNConnectionConsumerApi(this->icnAlpha, this->beta, this->drop, this->v6FirstWord); + this->initConn = new ICNConnectionConsumerApi(this->icnAlpha, this->beta, this->drop, this->v6FirstWord); } InitializeCriticalSection(&this->monitorMutex); InitializeCriticalSection(&this->monitorPausedMutex); diff --git a/Input/DASHReceiver.h b/Input/DASHReceiver.h index e5b48adf..545ecb70 100644 --- a/Input/DASHReceiver.h +++ b/Input/DASHReceiver.h @@ -48,7 +48,7 @@ class MediaObject; class DASHReceiver { public: - DASHReceiver(viper::managers::StreamType type, libdash::framework::mpd::MPDWrapper *mpdWrapper, IDASHReceiverObserver *obs, buffer::Buffer<MediaObject> *buffer, uint32_t bufferSize, bool icnEnabled, double icnAlpha, float beta, float drop); + DASHReceiver(viper::managers::StreamType type, libdash::framework::mpd::MPDWrapper *mpdWrapper, IDASHReceiverObserver *obs, buffer::Buffer<MediaObject> *buffer, uint32_t bufferSize, bool icnEnabled, double icnAlpha, float beta, float drop, std::string v6FirstWord); virtual ~DASHReceiver(); bool Start(); @@ -84,6 +84,7 @@ public: private: float beta; float drop; + std::string v6FirstWord; bool withFeedBack; bool isBufferBased; std::map<std::string, MediaObject*> initSegments; diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp index a7f52b44..c93e9ed4 100644 --- a/Input/ICNConnectionConsumerApi.cpp +++ b/Input/ICNConnectionConsumerApi.cpp @@ -36,14 +36,15 @@ using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >; namespace libdash { namespace framework { namespace input { -ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, float drop) : +ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, float drop, std::string v6FirstWord) : m_first(1), m_isFinished(false), sizeDownloaded (0), cumulativeBytesReceived(0), icnAlpha(alpha), beta(beta), - drop(drop) + drop(drop), + v6FirstWord(v6FirstWord) { gamma = 1; this->speed = 0.0; @@ -146,7 +147,7 @@ int ICNConnectionConsumerApi::Read(uint8_t *data, size_t len) {"User-Agent", "higet/1.0"}, {"Connection", "Keep-Alive"}}; std::string s(m_name.c_str()); - hTTPClientConnection->get(s, headers); + hTTPClientConnection->get(s, headers, {}, nullptr, nullptr, this->v6FirstWord); response = hTTPClientConnection->response(); this->res = true; this->dataPos = 0; diff --git a/Input/ICNConnectionConsumerApi.h b/Input/ICNConnectionConsumerApi.h index c05c5244..c12e215f 100644 --- a/Input/ICNConnectionConsumerApi.h +++ b/Input/ICNConnectionConsumerApi.h @@ -64,7 +64,7 @@ class ICNConnectionConsumerApi : public IICNConnection, public libl4::transport: public: - ICNConnectionConsumerApi(double alpha, float beta, float drop); + ICNConnectionConsumerApi(double alpha, float beta, float drop, std::string v6FirstWord); virtual ~ICNConnectionConsumerApi(); virtual void Init(dash::network::IChunk *chunk); @@ -95,6 +95,7 @@ private: libl4::http::HTTPResponse response; float beta; float drop; + std::string v6FirstWord; uint64_t i_chunksize; int i_lifetime; int i_missed_co; |