#include "mpd/CommonAttributesElements.h"
#include "mpd/SegmentInfo.h"
#include "mpd/TrickModeType.h"
-#include "exceptions/ElementNotPresentException.h"
+#include "mpd/SegmentBase.h"
+#include "mpd/SegmentList.h"
namespace dash
{
namespace mpd
{
+ class Group;
+
class Representation : public CommonAttributesElements
{
public:
- Representation ( const std::map<std::string, std::string>& attributes);
+ Representation();
virtual ~Representation ();
const std::string& getId () const;
void setId ( const std::string &id );
/*
* @return The bitrate required for this representation
- * in Bytes per seconds.
- * -1 if an error occurs.
+ * in bits per seconds.
+ * Will be a valid value, as the parser refuses Representation
+ * without bandwidth.
*/
int getBandwidth () const;
void setBandwidth ( int bandwidth );
void setQualityRanking ( int qualityRanking );
const std::list<const Representation*>& getDependencies() const;
void addDependency ( const Representation* dep );
- SegmentInfo* getSegmentInfo () const throw(dash::exception::ElementNotPresentException);
- TrickModeType* getTrickModeType () const throw(dash::exception::ElementNotPresentException);
+ /**
+ * @return This SegmentInfo for this Representation.
+ * It cannot be NULL, or without any Segments in it.
+ * It can however have a NULL InitSegment
+ */
+ SegmentInfo* getSegmentInfo () const;
+ TrickModeType* getTrickModeType () const;
+
+ void setSegmentInfo( SegmentInfo *info );
+ void setTrickMode( TrickModeType *trickModeType );
+ const Group* getParentGroup() const;
+ void setParentGroup( const Group *group );
- void setSegmentInfo (SegmentInfo *info);
- void setTrickModeType (TrickModeType *trickModeType);
+ SegmentList* getSegmentList () const;
+ void setSegmentList (SegmentList *list);
+ SegmentBase* getSegmentBase () const;
+ void setSegmentBase (SegmentBase *base);
private:
int bandwidth;
std::string id;
int qualityRanking;
std::list<const Representation*> dependencies;
- std::map<std::string, std::string> attributes;
SegmentInfo *segmentInfo;
TrickModeType *trickModeType;
+ const Group *parentGroup;
+ SegmentBase *segmentBase;
+ SegmentList *segmentList;
};
}
}