Commit 121f1710 authored by Christopher Mueller's avatar Christopher Mueller Committed by Hugo Beauzée-Luyssen

dash: fixed warnings in basiccm and isoffmainmanager

Signed-off-by: default avatarHugo Beauzée-Luyssen <beauze.h@gmail.com>
parent 60ceaa11
......@@ -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 ||
......
......@@ -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() );
......
......@@ -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))
{
......
......@@ -32,6 +32,7 @@
using namespace dash::mpd;
Representation::Representation () :
bandwidth (0),
qualityRanking ( -1 ),
segmentInfo ( NULL ),
trickModeType ( NULL ),
......@@ -61,14 +62,13 @@ 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;
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment