]> git.sesse.net Git - vlc/blobdiff - modules/stream_filter/dash/mpd/Representation.h
dash: bandwidth is in bits per second
[vlc] / modules / stream_filter / dash / mpd / Representation.h
index 9ee076590748a0a5b68e76ba5a8a93784a12ed26..15cd62d427ac7bb73fd2db91c881b4dfb163bee2 100644 (file)
 #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 );
@@ -55,20 +59,34 @@ namespace dash
                 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;
         };
     }
 }