delete baseUrl;
}
-const std::string& Representation::getId () const
-{
- return this->id;
-}
-
-void Representation::setId(const std::string &id)
-{
- if ( id.empty() == false )
- this->id = id;
-}
-
uint64_t Representation::getBandwidth () const
{
return this->bandwidth;
class MPD;
class Representation : public CommonAttributesElements,
- public SegmentInformation
+ public SegmentInformation,
+ public UniqueNess<Representation>
{
public:
Representation( AdaptationSet *, MPD *mpd );
virtual ~Representation ();
- const std::string& getId () const;
- void setId ( const std::string &id );
/*
* @return The bitrate required for this representation
* in bits per seconds.
MPD *mpd;
AdaptationSet *adaptationSet;
uint64_t bandwidth;
- std::string id;
int qualityRanking;
std::list<const Representation*> dependencies;
TrickModeType *trickModeType;
Property<SegmentTimeline *> segmentTimeline;
};
+ template<class T> class UniqueNess
+ {
+ public:
+ UniqueNess(){}
+ ~UniqueNess() {}
+ void setId(const std::string &id_) {id = id_;}
+ const std::string & getId() const {return id;}
+ bool sameAs(const T &other) const
+ {
+ return (!id.empty() && id == other.id);
+ }
+ private:
+ std::string id;
+ };
+
class SegmentInfoCommon : public ICanonicalUrl,
public Initializable<Segment>
{