diff options
author | Jacques Samain <jsamain+fdio@cisco.com> | 2017-06-23 18:47:47 +0200 |
---|---|---|
committer | Jacques Samain <jsamain+fdio@cisco.com> | 2017-06-23 18:47:47 +0200 |
commit | 65bb20ba5cf4ede70026142d61e728c44cc78f9c (patch) | |
tree | 56a9305c0985d0abbe831675f286dfd70c67a17a /UI | |
parent | ea99c36cadfab26fe4bf523931f87132c01a54a2 (diff) |
clean up: removed useless functions
Change-Id: If55237df9f9bc67b97912321b86273588f7bedd6
Signed-off-by: Jacques Samain <jsamain+fdio@cisco.com>
Diffstat (limited to 'UI')
-rw-r--r-- | UI/DASHPlayer.cpp | 2 | ||||
-rw-r--r-- | UI/ViperGui.cpp | 64 | ||||
-rw-r--r-- | UI/ViperGui.h | 66 |
3 files changed, 34 insertions, 98 deletions
diff --git a/UI/DASHPlayer.cpp b/UI/DASHPlayer.cpp index cdad7d5a..d83e4020 100644 --- a/UI/DASHPlayer.cpp +++ b/UI/DASHPlayer.cpp @@ -159,7 +159,7 @@ bool DASHPlayer::onDownloadMPDPressed (const std::string &url) } } this->setSettings(-1, -1, -1, -1, -1); - this->gui->setGuiFields(this->mpdWrapper->getMPD()); + this->gui->setMPDDuration(this->mpdWrapper->getMPD()); return true; } diff --git a/UI/ViperGui.cpp b/UI/ViperGui.cpp index 24dcfad2..e23bd308 100644 --- a/UI/ViperGui.cpp +++ b/UI/ViperGui.cpp @@ -54,25 +54,8 @@ ViperGui::~ViperGui() pthread_mutex_destroy(&(this->monitorMutex)); } -void ViperGui::setGuiFields(dash::mpd::IMPD* mpd) -{ -//USELESS CALLS -// this->setPeriodComboBox(mpd); -// if (mpd->GetPeriods().size() > 0) -// { -// IPeriod *period = mpd->GetPeriods().at(0); -// this->setVideoAdaptationSetComboBox(period); -// if (!AdaptationSetHelper::getVideoAdaptationSets(period).empty()) -// { -// IAdaptationSet *adaptationSet = AdaptationSetHelper::getVideoAdaptationSets(period).at(0); -// this->setRepresentationComoboBox(adaptationSet); -// } -// if (!AdaptationSetHelper::getAudioAdaptationSets(period).empty()) -// { -// IAdaptationSet *adaptationSet = AdaptationSetHelper::getAudioAdaptationSets(period).at(0); -// this->setRepresentationComoboBox(adaptationSet); -// } -// } +void ViperGui::setMPDDuration(dash::mpd::IMPD* mpd) +{ if(!strcmp(mpd->GetType().c_str(),"static")) { parse8601(mpd->GetMediaPresentationDuration()); @@ -90,49 +73,6 @@ void ViperGui::parse8601(std::string durationISO8601) this->durationString.assign(timeStamp); } -void ViperGui::setRepresentationComoboBox(dash::mpd::IAdaptationSet *adaptationSet) -{ - std::vector<IRepresentation *> represenations = adaptationSet->GetRepresentation(); - for(size_t i = 0; i < represenations.size(); i++) - { - IRepresentation *representation = represenations.at(i); - } -} -void ViperGui::setAdaptationSetComboBox(dash::mpd::IPeriod *period) -{ - std::vector<IAdaptationSet *> adaptationSets = period->GetAdaptationSets(); - for(size_t i = 0; i < adaptationSets.size(); i++) - { - IAdaptationSet *adaptationSet = adaptationSets.at(i); - } -} - -void ViperGui::setAudioAdaptationSetComboBox(dash::mpd::IPeriod *period) -{ - std::vector<IAdaptationSet *> adaptationSets = AdaptationSetHelper::getAudioAdaptationSets(period); - for(size_t i = 0; i < adaptationSets.size(); i++) - { - IAdaptationSet *adaptationSet = adaptationSets.at(i); - } -} - -void ViperGui::setVideoAdaptationSetComboBox(dash::mpd::IPeriod *period) -{ - std::vector<IAdaptationSet *> adaptationSets = AdaptationSetHelper::getVideoAdaptationSets(period); - for(size_t i = 0; i < adaptationSets.size(); i++) - { - IAdaptationSet *adaptationSet = adaptationSets.at(i); - } -} -void ViperGui::setPeriodComboBox(dash::mpd::IMPD *mpd) -{ - std::vector<IPeriod *> periods = mpd->GetPeriods(); - for(size_t i = 0; i < periods.size(); i++) - { - IPeriod *period = periods.at(i); - } -} - ViperBuffer* ViperGui::getStreamBuffer() { return this->streamBuffer; diff --git a/UI/ViperGui.h b/UI/ViperGui.h index 1ce8e574..6431257d 100644 --- a/UI/ViperGui.h +++ b/UI/ViperGui.h @@ -48,7 +48,7 @@ public: void setListSegmentSize(int listSegmentSize); ViperBuffer* getStreamBuffer(); QtAV::AVPlayer* getVideoPlayer(); - void setGuiFields(dash::mpd::IMPD* mpd); + void setMPDDuration(dash::mpd::IMPD* mpd); void setLifeLabel(QObject *lifeLabel); void setNowLabel(QObject *nowLabel); void setPlayButton(QObject *playButton); @@ -87,41 +87,37 @@ public: void resetGraphValues(); private: - pthread_mutex_t monitorMutex; - GraphDataSource *graphDataSource; - managers::MultimediaStream *videoStream; - int64_t offset; - int64_t durationMilliseconds; - qint64 position; - std::string durationString; - QtAV::AVPlayer *videoPlayer; - ViperBuffer *streamBuffer; - std::map<std::string, std::string> keyValues; - std::map<std::string, int> keyIndices; - std::map<std::string, std::vector<std::string>> video; - std::map<std::string, std::vector<std::string>> audio; - QObject *lifeLabel; - QObject *nowLabel; - QObject *progressBar; - QObject *playButton; - std::vector<IDASHPlayerGuiObserver *> observers; - dash::mpd::IMPD *mpd; - void setPeriodComboBox(dash::mpd::IMPD *mpd); - void setAdaptationSetComboBox(dash::mpd::IPeriod *period); - void setVideoAdaptationSetComboBox(dash::mpd::IPeriod *period); - void setAudioAdaptationSetComboBox(dash::mpd::IPeriod *period); - void setRepresentationComoboBox(dash::mpd::IAdaptationSet *adaptationSet); + pthread_mutex_t monitorMutex; + GraphDataSource *graphDataSource; + managers::MultimediaStream *videoStream; + int64_t offset; + int64_t durationMilliseconds; + qint64 position; + std::string durationString; + QtAV::AVPlayer *videoPlayer; + ViperBuffer *streamBuffer; + std::map<std::string, std::string> keyValues; + std::map<std::string, int> keyIndices; + std::map<std::string, std::vector<std::string>> video; + std::map<std::string, std::vector<std::string>> audio; + QObject *lifeLabel; + QObject *nowLabel; + QObject *progressBar; + QObject *playButton; + std::vector<IDASHPlayerGuiObserver *> observers; + dash::mpd::IMPD *mpd; + int listSegmentSize; + int segment; + int64_t bufferDuration; + int64_t segmentDuration; + int64_t lastSegmentDuration; + bool play; + bool stop; + bool pause; + bool repeat; + QObject *rootObject; + void parse8601(std::string durationISO8601); - int listSegmentSize; - int segment; - int64_t bufferDuration; - int64_t segmentDuration; - int64_t lastSegmentDuration; - bool play; - bool stop; - bool pause; - bool repeat; - QObject *rootObject; }; } |