aboutsummaryrefslogtreecommitdiffstats
path: root/Input
diff options
context:
space:
mode:
Diffstat (limited to 'Input')
-rw-r--r--Input/DASHManager.cpp1
-rw-r--r--Input/DASHManager.h25
-rw-r--r--Input/DASHReceiver.cpp11
-rw-r--r--Input/DASHReceiver.h17
4 files changed, 18 insertions, 36 deletions
diff --git a/Input/DASHManager.cpp b/Input/DASHManager.cpp
index 3377c1a8..a771572a 100644
--- a/Input/DASHManager.cpp
+++ b/Input/DASHManager.cpp
@@ -160,7 +160,6 @@ void DASHManager::onBufferStateChanged(BufferType type, uint32_t fillstateInPerc
if(this->adaptationLogic->isBufferBased())
this->receiver->OnSegmentBufferStateChanged(fillstateInPercent, maxC);
}
-
void DASHManager::fetchMPD()
{
this->multimediaStream->fetchMPD();
diff --git a/Input/DASHManager.h b/Input/DASHManager.h
index c2b4a88b..4bd301e7 100644
--- a/Input/DASHManager.h
+++ b/Input/DASHManager.h
@@ -42,11 +42,10 @@ public:
bool start();
void stop();
uint32_t getPosition();
- void setPosition(uint32_t segmentNumber); // to implement
+ void setPosition(uint32_t segmentNumber);
void setLooping(bool looping);
void setPositionInMsec(uint32_t millisec);
void clear();
-// void setRepresentation(dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
void setRepresentation();
void enqueueRepresentation(dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
@@ -65,17 +64,17 @@ public:
void fetchMPD();
private:
- float beta;
- float drop;
- buffer::Buffer<MediaObject> *buffer;
- DASHReceiver *receiver;
- uint32_t readSegmentCount;
- IDASHManagerObserver *multimediaStream;
- bool isRunning;
- bool icn;
- double icnAlpha;
- bool noDecoding;
- libdash::framework::adaptation::IAdaptationLogic *adaptationLogic;
+ float beta;
+ float drop;
+ buffer::Buffer<MediaObject> *buffer;
+ DASHReceiver *receiver;
+ uint32_t readSegmentCount;
+ IDASHManagerObserver *multimediaStream;
+ bool isRunning;
+ bool icn;
+ double icnAlpha;
+ bool noDecoding;
+ libdash::framework::adaptation::IAdaptationLogic *adaptationLogic;
};
}
}
diff --git a/Input/DASHReceiver.cpp b/Input/DASHReceiver.cpp
index c6dafb93..c1f1acc6 100644
--- a/Input/DASHReceiver.cpp
+++ b/Input/DASHReceiver.cpp
@@ -22,11 +22,7 @@ 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) :
type (type),
mpdWrapper (mpdWrapper),
-// period (NULL),
-// adaptationSet (NULL),
-// representation (NULL),
adaptationSetStream (NULL),
-// representationStream (NULL),
segmentNumber (0),
observer (obs),
buffer (buffer),
@@ -51,14 +47,8 @@ DASHReceiver::DASHReceiver (viper::managers::StreamType type, MPDWrappe
{
readMax = 32768;
readBuffer = (uint8_t*)malloc(sizeof(uint8_t)*readMax);
-// this->period = this->mpd->GetPeriods().at(0);
-// this->adaptationSet = this->period->GetAdaptationSets().at(0);
-// this->representation = this->adaptationSet->GetRepresentation().at(0);
-
this->adaptationSetStream = new AdaptationSetStream(type, mpdWrapper);
-// this->representationStream = adaptationSetStream->getRepresentationStream(this->representation);
this->segmentOffset = CalculateSegmentOffset();
-// this->representationStream->setSegmentOffset(this->segmentOffset);
this->mpdWrapper->setSegmentOffset(type, this->segmentOffset);
this->conn = NULL;
this->initConn = NULL;
@@ -408,3 +398,4 @@ void DASHReceiver::SetDrop (float drop)
this->drop = drop;
}
+
diff --git a/Input/DASHReceiver.h b/Input/DASHReceiver.h
index ed98b9e1..9d221ec5 100644
--- a/Input/DASHReceiver.h
+++ b/Input/DASHReceiver.h
@@ -62,7 +62,7 @@ public:
void SetPosition(uint32_t segmentNumber);
void SetLooping(bool isLoopinp);
void SetPositionInMsecs(uint32_t milliSecs);
-
+ dash::mpd::IRepresentation* GetRepresentation();
void SetRepresentation();
void SetAdaptationLogic(adaptation::IAdaptationLogic *_adaptationLogic);
libdash::framework::adaptation::IAdaptationLogic* GetAdaptationLogic();
@@ -86,17 +86,11 @@ private:
float drop;
bool withFeedBack;
bool isBufferBased;
-// std::map<dash::mpd::IRepresentation*, MediaObject*> initSegments;
- std::map<int, MediaObject*> initSegments;
+ std::map<int, MediaObject*> initSegments;
libdash::framework::buffer::Buffer<MediaObject> *buffer;
IDASHReceiverObserver *observer;
- libdash::framework::mpd::MPDWrapper *mpdWrapper;
-// dash::mpd::IMPD *mpd;
-// dash::mpd::IPeriod *period;
-// dash::mpd::IAdaptationSet *adaptationSet;
-// dash::mpd::IRepresentation *representation;
+ libdash::framework::mpd::MPDWrapper *mpdWrapper;
mpd::AdaptationSetStream *adaptationSetStream;
-// mpd::IRepresentationStream *representationStream;
uint32_t segmentNumber;
uint32_t positionInMsecs;
uint32_t segmentOffset;
@@ -121,13 +115,12 @@ private:
int bufferLevelAtUpdate;
int readMax;
uint8_t *readBuffer;
- viper::managers::StreamType type;
+ viper::managers::StreamType type;
+
uint32_t CalculateSegmentOffset();
void NotifySegmentDownloaded();
-// void DownloadInitSegment(dash::mpd::IRepresentation* rep);
void DownloadInitSegment();
void DownloadInitSegmentWithoutLock();
-// bool InitSegmentExists(dash::mpd::IRepresentation* rep);
bool InitSegmentExists(int rep);
static void* DoBuffering(void *receiver);
static void* DoMPDFetching(void * data);