videoSegmentOffset (0),
audioSegmentOffset (0),
videoSegmentNumber (0),
- audioSegmentNumber (0)
+ audioSegmentNumber (0),
+ hasReachedEndOfList (false)
+
{
InitializeConditionVariable (&this->mpdUpdate);
InitializeCriticalSection(&this->monitorMutex);
if(this->videoRepresentation)
{
uint32_t time = this->videoRepresentations->find(this->videoRepresentation)->second->getTime(this->videoSegmentNumber);
-
uint32_t id = atoi(this->videoRepresentation->GetId().c_str());
for(size_t i = 0; i < representations.size(); i++)
{
IAdaptationSet *adaptationSet = NULL;
std::map<dash::mpd::IRepresentation *, IRepresentationStream *> *representations = NULL;
EnterCriticalSection(&this->monitorMutex);
-
+
switch(type)
{
case viper::managers::StreamType::AUDIO:
default:
return;
}
-
+
for (size_t i = 0; i < adaptationSet->GetRepresentation().size(); i++)
{
IRepresentation *representation = adaptationSet->GetRepresentation().at(i);
{
urls.push_back(mpd->GetMPDPathBaseUrl());
}
-
+
return urls;
}
while((this->isStopping == false) && segmentNumber >= representationStream->getSize())
{
SleepConditionVariableCS(&this->mpdUpdate, &this->monitorMutex, INFINITE);
+ this->hasReachedEndOfList = true;
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;
}
representationStream = representations->find(representation)->second;
+ if(this->hasReachedEndOfList)
+ segmentNumber += 1;
}
if(this->isStopping)
{
default:
break;
}
+ if(this->hasReachedEndOfList)
+ {
+ segmentNumber += 1;
+ this->hasReachedEndOfList = false;
+ }
}
uint64_t segDuration = 0;
//Returns the segmentDuration in milliseconds
MediaObject *media = new MediaObject(seg, representation, withFeedBack);
media->SetSegmentDuration(segDuration);
segmentNumber++;
+
switch(type)
{
case viper::managers::StreamType::AUDIO:
IRepresentation* representation;
std::map<dash::mpd::IRepresentation *, IRepresentationStream *> *representations;
EnterCriticalSection(&this->monitorMutex);
-
+
switch(type)
{
case viper::managers::StreamType::AUDIO:
IRepresentation* representation;
std::map<dash::mpd::IRepresentation *, IRepresentationStream *> *representations;
EnterCriticalSection(&this->monitorMutex);
-
+
switch(type)
{
case viper::managers::StreamType::AUDIO:
{
std::string id = "";
EnterCriticalSection(&this->monitorMutex);
-
+
switch(type)
{
case viper::managers::StreamType::AUDIO: