From 2e126cfa7d1c82a758b14133cc67e0ff7af1f11e Mon Sep 17 00:00:00 2001 From: Jacques Samain Date: Thu, 29 Jun 2017 15:27:40 +0200 Subject: Reinstating adaptation logics that require downloading time Change-Id: I772c67fb7cde42c5a21673fbd7c450e3b51a9959 Signed-off-by: Jacques Samain --- Input/ICNConnectionConsumerApi.cpp | 6 ++++++ Input/ICNConnectionConsumerApi.h | 3 +++ libdash/source/xml/Node.cpp | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp index d5048cba..e6715e68 100644 --- a/Input/ICNConnectionConsumerApi.cpp +++ b/Input/ICNConnectionConsumerApi.cpp @@ -182,6 +182,12 @@ void ICNConnectionConsumerApi::notifyStats(double winSize) Debug("ICNConnection:\tNotificationICPDL\t%f\t%f\n", winSize, speed); } +void ICNConnectionConsumerApi::notifyDownloadTime(double downloadingTime) +{ + //downloadingTime is in microseconds, dnltime should be in seconds + this->dnltime = downloadingTime / 1000000; +} + void ICNConnectionConsumerApi::SetBeta(float beta) { this->beta = beta; diff --git a/Input/ICNConnectionConsumerApi.h b/Input/ICNConnectionConsumerApi.h index 240ebcaa..9a5f8a47 100644 --- a/Input/ICNConnectionConsumerApi.h +++ b/Input/ICNConnectionConsumerApi.h @@ -80,7 +80,10 @@ public: const std::vector &GetHTTPTransactionList() const; virtual void SetBeta(float beta); virtual void SetDrop(float drop); + + //libl4::transport::IcnObserver virtual void notifyStats(double throughput); + virtual void notifyDownloadTime(double downloadingTime); private: libl4::http::HTTPClientConnection *hTTPClientConnection; diff --git a/libdash/source/xml/Node.cpp b/libdash/source/xml/Node.cpp index 0747a8e1..53193207 100644 --- a/libdash/source/xml/Node.cpp +++ b/libdash/source/xml/Node.cpp @@ -209,7 +209,6 @@ dash::mpd::Timeline* Node::ToTimeline () cons if (this->HasAttribute("t")) { - uint64_t yolo = strtoul(this->GetAttributeValue("t").c_str(), NULL, 10); timeline->SetStartTime(strtoul(this->GetAttributeValue("t").c_str(), NULL, 10)); } if (this->HasAttribute("d")) -- cgit 1.2.3-korg