}
void MPDWrapper::updateMPD (IMPD* mpd)
-{
-//Assumptions here:
-// *only one period in the MPD
+{
+//Assumptions here:
+// *only one period in the MPD
// *only triggered if using SegmentTimeline dynamic MPD
EnterCriticalSection(&this->monitorMutex);
this->period = mpd->GetPeriods().at(0);
return;
}
}
- //Not found in the new set of adaptation logc => select the first one
- this->videoAdaptationSet = adaptationSets.at(0);
+ //Not found in the new set of adaptation logc => select the first one
+ this->videoAdaptationSet = adaptationSets.at(0);
}
else
{
{
IRepresentation* representation;
std::map<dash::mpd::IRepresentation *, IRepresentationStream *> *representations;
-
+
EnterCriticalSection(&this->monitorMutex);
switch(type)
{
LeaveCriticalSection(&this->monitorMutex);
return NULL;
}
-
+
//Need to update representationStream here as it was updated with the mpd:
switch(type)
{
case viper::managers::StreamType::AUDIO:
representation = this->audioRepresentation;
representations = this->audioRepresentations;
+ segmentNumber = this->audioSegmentNumber;
break;
case viper::managers::StreamType::VIDEO:
representation = this->videoRepresentation;
representations = this->videoRepresentations;
+ segmentNumber = this->videoSegmentNumber;
break;
default:
break;
seg = representationStream->getMediaSegment(segmentNumber);
if(seg != NULL)
{
- MediaObject *media = new MediaObject(seg, representation, withFeedBack);
+ MediaObject *media = new MediaObject(seg, representation, withFeedBack);
segmentNumber++;
switch(type)
{