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 /Input/DASHReceiver.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 'Input/DASHReceiver.cpp')
-rw-r--r-- | Input/DASHReceiver.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Input/DASHReceiver.cpp b/Input/DASHReceiver.cpp index 59514e57..74415bfa 100644 --- a/Input/DASHReceiver.cpp +++ b/Input/DASHReceiver.cpp @@ -141,7 +141,7 @@ MediaObject* DASHReceiver::GetInitSegmentWithoutLock () return this->mpdWrapper->getInitSegmentWithoutLock(type); } -MediaObject* DASHReceiver::FindInitSegment (int representation) +MediaObject* DASHReceiver::FindInitSegment (std::string representation) { if (!this->InitSegmentExists(representation)) return NULL; @@ -192,7 +192,7 @@ void DASHReceiver::NotifySegmentDownloaded () void DASHReceiver::DownloadInitSegmentWithoutLock () { - int rep = atoi(this->mpdWrapper->getRepresentationIDWithoutLock(type).c_str()); + std::string rep = this->mpdWrapper->getRepresentationIDWithoutLock(type); if (this->InitSegmentExists(rep)) return; @@ -209,7 +209,7 @@ void DASHReceiver::DownloadInitSegmentWithoutLock () void DASHReceiver::DownloadInitSegment () { - int rep = atoi(this->mpdWrapper->getRepresentationID(type).c_str()); + std::string rep = this->mpdWrapper->getRepresentationID(type); if (this->InitSegmentExists(rep)) return; @@ -224,7 +224,7 @@ void DASHReceiver::DownloadInitSegment () } } -bool DASHReceiver::InitSegmentExists (int rep) +bool DASHReceiver::InitSegmentExists (std::string rep) { if (this->initSegments.find(rep) != this->initSegments.end()) return true; @@ -310,7 +310,6 @@ void* DASHReceiver::DoBuffering (void *recei } m_start_time = std::chrono::system_clock::now(); media->StartDownload(dashReceiver->conn); - media->WaitFinished(); bool canPush = dashReceiver->CanPush(); if (canPush && !dashReceiver->PushBack(media)) |