aboutsummaryrefslogtreecommitdiffstats
path: root/Adaptation
diff options
context:
space:
mode:
authorJacques Samain <jsamain+fdio@cisco.com>2017-07-25 15:32:54 +0200
committerJacques Samain <jsamain+fdio@cisco.com>2017-07-25 15:32:54 +0200
commit0e275345e28c34f2c6b91a75f44ac93034ae477c (patch)
tree0b94ec17f395fce7ae1015200d45bd61ce0112a8 /Adaptation
parentce4d018aa8185da0bbf5445eaf54d88700f1a381 (diff)
Handling live MPDs with variable segments duration
Change-Id: I074d8863a9afb47815e47bf663b87e7f663890b9 Signed-off-by: Jacques Samain <jsamain+fdio@cisco.com>
Diffstat (limited to 'Adaptation')
-rw-r--r--Adaptation/Bola.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Adaptation/Bola.cpp b/Adaptation/Bola.cpp
index f7acc72e..470d22e8 100644
--- a/Adaptation/Bola.cpp
+++ b/Adaptation/Bola.cpp
@@ -50,7 +50,8 @@ using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
BolaAdaptation::BolaAdaptation(viper::managers::StreamType type, MPDWrapper *mpdWrapper, struct AdaptationParameters *params) :
AbstractAdaptationLogic (type, mpdWrapper)
{
- this->bufferMaxSizeSeconds =(double) params->segmentBufferSize * params->segmentDuration;
+ this->segmentDuration = params->segmentDuration;
+ this->bufferMaxSizeSeconds =(double) params->segmentBufferSize * this->segmentDuration;
this->alphaRate = params->Bola_Alpha;
this->bufferTargetSeconds = params->Bola_bufferTargetSeconds;
@@ -86,10 +87,9 @@ BolaAdaptation::BolaAdaptation(viper::managers::StreamType type, MPDWrapper *mpd
// return 0; // Check if exit with a message is necessary
}
- // Check if the following is correct XXX Maybe useless
this->totalDuration = TimeResolver::getDurationInSec(this->mpdWrapper->getMediaPresentationDuration());
-// this->segmentDuration = (double) (representations.at(0)->GetSegmentTemplate()->GetDuration() / representations.at(0)->GetSegmentTemplate()->GetTimescale() );
- this->segmentDuration = 2.0;
+ if(!(this->segmentDuration))
+ this->segmentDuration = 2.0;
Debug("Total Duration - BOLA:\t%f\nSegment Duration - BOLA:\t%f\n",this->totalDuration, this->segmentDuration);
// if not correct --> segmentDuration = 2.0;