diff options
author | Jacques Samain <jsamain+fdio@cisco.com> | 2017-07-25 15:32:54 +0200 |
---|---|---|
committer | Jacques Samain <jsamain+fdio@cisco.com> | 2017-07-25 15:32:54 +0200 |
commit | 0e275345e28c34f2c6b91a75f44ac93034ae477c (patch) | |
tree | 0b94ec17f395fce7ae1015200d45bd61ce0112a8 /MPD/MPDWrapper.cpp | |
parent | ce4d018aa8185da0bbf5445eaf54d88700f1a381 (diff) |
Handling live MPDs with variable segments duration
Change-Id: I074d8863a9afb47815e47bf663b87e7f663890b9
Signed-off-by: Jacques Samain <jsamain+fdio@cisco.com>
Diffstat (limited to 'MPD/MPDWrapper.cpp')
-rw-r--r-- | MPD/MPDWrapper.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/MPD/MPDWrapper.cpp b/MPD/MPDWrapper.cpp index 20d4aa5e..c7bdee9f 100644 --- a/MPD/MPDWrapper.cpp +++ b/MPD/MPDWrapper.cpp @@ -645,10 +645,13 @@ MediaObject* MPDWrapper::getNextSegment (viper::managers::StreamType type, bool representationStream = representations->find(representation)->second; } } - seg = representationStream->getMediaSegment(segmentNumber); + uint64_t segDuration = 0; + //Returns the segmentDuration in milliseconds + seg = representationStream->getMediaSegment(segmentNumber, segDuration); if(seg != NULL) { MediaObject *media = new MediaObject(seg, representation, withFeedBack); + media->SetSegmentDuration(segDuration); segmentNumber++; switch(type) { @@ -696,10 +699,12 @@ MediaObject* MPDWrapper::getSegment (viper::managers::StreamType type, uint32_t LeaveCriticalSection(&this->monitorMutex); return NULL; } - seg = representationStream->getMediaSegment(segNum); + uint64_t segDuration =0; + seg = representationStream->getMediaSegment(segNum, segDuration); if(seg != NULL) { MediaObject *media = new MediaObject(seg, representation); + media->SetSegmentDuration(segDuration); LeaveCriticalSection(&this->monitorMutex); return media; } |