]> git.sesse.net Git - vlc/blob - modules/stream_filter/dash/mpd/Representation.h
dash: added segmentlist and base to representation
[vlc] / modules / stream_filter / dash / mpd / Representation.h
1 /*
2  * Representation.h
3  *****************************************************************************
4  * Copyright (C) 2010 - 2011 Klagenfurt University
5  *
6  * Created on: Aug 10, 2010
7  * Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
8  *          Christian Timmerer  <christian.timmerer@itec.uni-klu.ac.at>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published
12  * by the Free Software Foundation; either version 2.1 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef REPRESENTATION_H_
26 #define REPRESENTATION_H_
27
28 #include <string>
29
30 #include "mpd/CommonAttributesElements.h"
31 #include "mpd/SegmentInfo.h"
32 #include "mpd/TrickModeType.h"
33 #include "mpd/SegmentBase.h"
34 #include "mpd/SegmentList.h"
35
36 namespace dash
37 {
38     namespace mpd
39     {
40         class Group;
41
42         class Representation : public CommonAttributesElements
43         {
44             public:
45                 Representation();
46                 virtual ~Representation ();
47
48                 const std::string&  getId                   () const;
49                 void                setId                   ( const std::string &id );
50                 /*
51                  *  @return The bitrate required for this representation
52                  *          in Bytes per seconds.
53                  *          Will be a valid value, as the parser refuses Representation
54                  *          without bandwith.
55                  */
56                 int                 getBandwidth            () const;
57                 void                setBandwidth            ( int bandwidth );
58                 int                 getQualityRanking       () const;
59                 void                setQualityRanking       ( int qualityRanking );
60                 const std::list<const Representation*>&     getDependencies() const;
61                 void                addDependency           ( const Representation* dep );
62                 /**
63                  * @return  This SegmentInfo for this Representation.
64                  *          It cannot be NULL, or without any Segments in it.
65                  *          It can however have a NULL InitSegment
66                  */
67                 SegmentInfo*        getSegmentInfo          () const;
68                 TrickModeType*      getTrickModeType        () const;
69
70                 void                setSegmentInfo( SegmentInfo *info );
71                 void                setTrickMode( TrickModeType *trickModeType );
72                 const Group*        getParentGroup() const;
73                 void                setParentGroup( const Group *group );
74
75                 SegmentList*        getSegmentList          () const;
76                 void                setSegmentList          (SegmentList *list);
77                 SegmentBase*        getSegmentBase          () const;
78                 void                setSegmentBase          (SegmentBase *base);
79
80             private:
81                 int                                 bandwidth;
82                 std::string                         id;
83                 int                                 qualityRanking;
84                 std::list<const Representation*>    dependencies;
85                 SegmentInfo                         *segmentInfo;
86                 TrickModeType                       *trickModeType;
87                 const Group                         *parentGroup;
88                 SegmentBase                         *segmentBase;
89                 SegmentList                         *segmentList;
90         };
91     }
92 }
93
94 #endif /* REPRESENTATION_H_ */