vlc | branch: master | Christopher Mueller <christopher.muel...@itec.aau.at> | Fri Mar 9 16:07:59 2012 +0100| [121f1710c4798046eb2e83d06ac3c580d1fbaa62] | committer: Hugo Beauzée-Luyssen
dash: fixed warnings in basiccm and isoffmainmanager Signed-off-by: Hugo Beauzée-Luyssen <beauz...@gmail.com> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=121f1710c4798046eb2e83d06ac3c580d1fbaa62 --- modules/stream_filter/dash/mpd/BasicCMManager.cpp | 2 +- modules/stream_filter/dash/mpd/BasicCMParser.cpp | 6 ------ .../stream_filter/dash/mpd/IsoffMainManager.cpp | 4 ++-- modules/stream_filter/dash/mpd/Representation.cpp | 8 ++++---- modules/stream_filter/dash/mpd/Representation.h | 6 +++--- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/modules/stream_filter/dash/mpd/BasicCMManager.cpp b/modules/stream_filter/dash/mpd/BasicCMManager.cpp index b96d2fd..a42da61 100644 --- a/modules/stream_filter/dash/mpd/BasicCMManager.cpp +++ b/modules/stream_filter/dash/mpd/BasicCMManager.cpp @@ -103,7 +103,7 @@ Representation* BasicCMManager::getRepresentation(Period *period, uint64 std::vector<Representation *> reps = groups.at(i)->getRepresentations(); for( size_t j = 0; j < reps.size(); j++ ) { - int currentBitrate = reps.at(j)->getBandwidth(); + uint64_t currentBitrate = reps.at(j)->getBandwidth(); assert( currentBitrate != -1 ); if ( best == NULL || diff --git a/modules/stream_filter/dash/mpd/BasicCMParser.cpp b/modules/stream_filter/dash/mpd/BasicCMParser.cpp index fc0b0ea..86c2fd1 100644 --- a/modules/stream_filter/dash/mpd/BasicCMParser.cpp +++ b/modules/stream_filter/dash/mpd/BasicCMParser.cpp @@ -501,12 +501,6 @@ bool BasicCMParser::resolveUrlTemplates( std::string &url, bool &containRunti } else if ( token == "$Bandwidth$" ) { - if ( this->currentRepresentation->getBandwidth() < 0 ) - { - std::cerr << "Representation doesn't have a valid bandwidth. " - "Can't substitute tag $Bandwidth$" << std::endl; - return false; - } std::ostringstream oss; oss << this->currentRepresentation->getBandwidth(); url.replace( it, token.length(), oss.str() ); diff --git a/modules/stream_filter/dash/mpd/IsoffMainManager.cpp b/modules/stream_filter/dash/mpd/IsoffMainManager.cpp index 0494ea7..2ad4185 100644 --- a/modules/stream_filter/dash/mpd/IsoffMainManager.cpp +++ b/modules/stream_filter/dash/mpd/IsoffMainManager.cpp @@ -102,7 +102,7 @@ Representation* IsoffMainManager::getRepresentation (Period *per std::vector<Representation *> reps = adaptationSets.at(i)->getRepresentations(); for( size_t j = 0; j < reps.size(); j++ ) { - int currentBitrate = reps.at(j)->getBandwidth(); + uint64_t currentBitrate = reps.at(j)->getBandwidth(); if(best == NULL || (currentBitrate > best->getBandwidth() && currentBitrate < bitrate)) { @@ -165,7 +165,7 @@ Representation* IsoffMainManager::getRepresentation (Period *per Representation *best = NULL; for( size_t j = 0; j < resMatchReps.size(); j++ ) { - int currentBitrate = resMatchReps.at(j)->getBandwidth(); + uint64_t currentBitrate = resMatchReps.at(j)->getBandwidth(); if(best == NULL || (currentBitrate > best->getBandwidth() && currentBitrate < bitrate)) { diff --git a/modules/stream_filter/dash/mpd/Representation.cpp b/modules/stream_filter/dash/mpd/Representation.cpp index 9f31f5c..e561cc2 100644 --- a/modules/stream_filter/dash/mpd/Representation.cpp +++ b/modules/stream_filter/dash/mpd/Representation.cpp @@ -32,6 +32,7 @@ using namespace dash::mpd; Representation::Representation () : + bandwidth (0), qualityRanking ( -1 ), segmentInfo ( NULL ), trickModeType ( NULL ), @@ -61,15 +62,14 @@ void Representation::setId(const std::string &id) this->id = id; } -int Representation::getBandwidth () const +uint64_t Representation::getBandwidth () const { return this->bandwidth; } -void Representation::setBandwidth( int bandwidth ) +void Representation::setBandwidth( uint64_t bandwidth ) { - if ( bandwidth >= 0 ) - this->bandwidth = bandwidth; + this->bandwidth = bandwidth; } SegmentInfo* Representation::getSegmentInfo() const diff --git a/modules/stream_filter/dash/mpd/Representation.h b/modules/stream_filter/dash/mpd/Representation.h index 710e2f4..0fef462 100644 --- a/modules/stream_filter/dash/mpd/Representation.h +++ b/modules/stream_filter/dash/mpd/Representation.h @@ -53,8 +53,8 @@ namespace dash * Will be a valid value, as the parser refuses Representation * without bandwidth. */ - int getBandwidth () const; - void setBandwidth ( int bandwidth ); + uint64_t getBandwidth () const; + void setBandwidth ( uint64_t bandwidth ); int getQualityRanking () const; void setQualityRanking ( int qualityRanking ); const std::list<const Representation*>& getDependencies() const; @@ -82,7 +82,7 @@ namespace dash int getHeight () const; private: - int bandwidth; + uint64_t bandwidth; std::string id; int qualityRanking; std::list<const Representation*> dependencies; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits