From: Angelo Mantellini Date: Wed, 12 Jun 2019 16:02:19 +0000 (+0200) Subject: Correct android issues for libdash and viper X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=6fe18f6a466dbae611bbe1e4fa33b352cc4ef6df;p=cicn.git Correct android issues for libdash and viper Change-Id: Ia5b95bda6336b6544c881c416f852069662f5e3f Signed-off-by: Angelo Mantellini --- diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp index c93e9ed4..59330852 100644 --- a/Input/ICNConnectionConsumerApi.cpp +++ b/Input/ICNConnectionConsumerApi.cpp @@ -160,8 +160,8 @@ int ICNConnectionConsumerApi::Read(uint8_t *data, size_t len) } else { memcpy(data, (char*)response.getPayload().data() + this->dataPos, response.getPayload().size() - this->dataPos); - int length = response.getPayload().size() - this->dataPos; - if (length == 0) + int length = response.getPayload().size() - this->dataPos; + if (length == 0) { this->res = false; } diff --git a/Managers/MultimediaManager.cpp b/Managers/MultimediaManager.cpp index 81c5514e..1bbb2c65 100644 --- a/Managers/MultimediaManager.cpp +++ b/Managers/MultimediaManager.cpp @@ -112,7 +112,6 @@ bool MultimediaManager::initICN(const std::string& url) { pos = pos + 1; } - std::string downloadFile(this->downloadPath + url.substr(pos).c_str()); FILE *fp; fp = fopen(downloadFile.c_str(), "w"); @@ -131,6 +130,7 @@ bool MultimediaManager::initICN(const std::string& url) } fclose(fp); IMPD* mpd = this->manager->Open(const_cast(downloadFile.c_str()), url); + qDebug("downloadFile %s", downloadFile.c_str()); remove(downloadFile.c_str()); free(data); if(mpd == NULL) @@ -143,11 +143,10 @@ bool MultimediaManager::initICN(const std::string& url) this->mpdWrapper->updateMPD(mpd); for (size_t i = 0; i < this->managerObservers.size(); i++) this->managerObservers.at(i)->setMPDWrapper(this->mpdWrapper); - if( !strcmp(this->mpdWrapper->getType().c_str(), "static") ) + if( this->mpdWrapper->getType().compare("static") ) { delete icnConn; } - LeaveCriticalSection(&this->monitorMutex); return true; } diff --git a/UI/DASHPlayer.cpp b/UI/DASHPlayer.cpp index c53cbed7..63debc12 100644 --- a/UI/DASHPlayer.cpp +++ b/UI/DASHPlayer.cpp @@ -216,7 +216,7 @@ bool DASHPlayer::downloadMPD(const QString &adaptationLogic, bool icn) this->segmentDuration = this->mpdWrapper->onFirstDownloadMPD(this->gui); this->multimediaManager->setSegmentDuration(this->segmentDuration); - this->parametersAdaptation->segmentDuration = this->segmentDuration / 1000.0; //to have it in seconds + this->parametersAdaptation->segmentDuration = this->segmentDuration / 1000.0; //to have it in seconds this->onSettingsChanged(0,0,0,0,0); int j =0; std::string temp = adaptationLogic.toStdString(); diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index aaac206d..f8e00c3a 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,7 +1,7 @@ - + - + @@ -69,7 +69,7 @@ - +