/** * @class dash::mpd::IPeriod * @brief This interface is needed for accessing the attributes and elements of the Period element * as specified in ISO/IEC 23009-1, Part 1, 2012, section 5.3.2.2, table 4 * @details A Media Presentation consists of one or more Periods. A Period is defined by a Period element in the MPD element. \n * The type of the Period, either a regular Period or an Early Available Period, as well as the \em PeriodStart time of a regular Period is determined as follows: * * For any regular Period the following holds: \em PeriodStart reflects the actual time that should elapse after playing the media of all prior Periods in this Media Presentation * relative to the \em PeriodStart time of the first Period in the Media Presentation. The Period extends until the \em PeriodStart of the next Period, or until the end of the * Media Presentation in the case of the last Period. More specifically, the difference between the \em PeriodStart time of a Period and * either the \em PeriodStart time of the following Period, if this is not the last Period, or the value of the MPD\@mediaPresentationDuration if this is the last one, * is the presentation duration in Media Presentation time of the media content represented by the Representations in this Period. \n\n * Early Available Periods may be used to advertise initialization of other non-media data before the media data itself is available. * Period elements documenting early available Periods shall not occur before any Period element documenting a regular Period. For Early Available Periods, * any resources that are announced in such a Period element shall be available. Such a Period element shall not contain URLs to Media Segments. * The data contained in such a Period element does not represent a Period in the Media Presentation. Only when the \em PeriodStart time becomes known * through an update of the MPD, such a Period element represents a regular Period. However, an update of the MPD may even remove a Period element * representing an Early Available Period in later updates of the MPD as long as no \em PeriodStart time is associated with the Period. \n\n * To avoid dereferencing of a remote element containing a Period element solely to determine the Period timeline, e.g. in case of seeking, * Period\@start or previous Period's Period\@duration should be present in the MPD. * @see dash::mpd::IMPDElement dash::mpd::BaseUrl dash::mpd::IAdaptationSet dash::mpd::ISegmentBase dash::mpd::ISegmentList dash::mpd::ISegmentTemplate dash::mpd::ISubset * * @author bitmovin Softwareentwicklung OG \n * Email: libdash-dev@vicky.bitmovin.net * @version 2.1 * @date 2013 * @copyright bitmovin Softwareentwicklung OG, All Rights Reserved \n\n * This source code and its use and distribution, is subject to the terms * and conditions of the applicable license agreement. */ #ifndef IPERIOD_H_ #define IPERIOD_H_ #include "config.h" #include "IMPDElement.h" #include "IBaseUrl.h" #include "ISegmentBase.h" #include "ISegmentList.h" #include "ISegmentTemplate.h" #include "IAdaptationSet.h" #include "ISubset.h" namespace dash { namespace mpd { class IPeriod : public virtual IMPDElement { public: virtual ~IPeriod(){} /** * Returns a reference to a vector of pointers to dash::mpd::IBaseUrl objects that specify base URLs that can be used for reference resolution and alternative URL selection.\n * For more details refer to the description in section 5.6. of ISO/IEC 23009-1, Part 1, 2012. * @return a reference to a vector of pointers to dash::mpd::IBaseUrl objects */ virtual const std::vector& GetBaseURLs () const = 0; /** * Returns a pointer to a dash::mpd::ISegmentBase object that specifies default Segment Base information.\n * Information in this element is overridden by information in AdapationSet.SegmentBase and Representation.SegmentBase, if present.\n * For more details see section 5.3.9. of ISO/IEC 23009-1, Part 1, 2012. * @return a pointer to a dash::mpd::ISegmentBase object */ virtual ISegmentBase* GetSegmentBase () const = 0; /** * Returns a pointer to a dash::mpd::ISegmentList object that specifies default Segment List information.\n * Information in this element is overridden by information in AdapationSet.SegmentList and Representation.SegmentList, if present.\n * For more details see section 5.3.9. of ISO/IEC 23009-1, Part 1, 2012. * @return a pointer to a dash::mpd::ISegmentList object */ virtual ISegmentList* GetSegmentList () const = 0; /** * Returns a pointer to a dash::mpd::ISegmentTemplate object that specifies default Segment Template information.\n * Information in this element is overridden by information in AdapationSet.SegmentTemplate and Representation.SegmentTemplate, if present. * For more details see section 5.3.9. of ISO/IEC 23009-1, Part 1, 2012. * @return a pointer to a dash::mpd::ISegmentTemplate object */ virtual ISegmentTemplate* GetSegmentTemplate () const = 0; /** * Returns a reference to a vector of pointers to dash::mpd::IAdaptationSet objects that specify Adapatation Sets.\n * At least one Adaptation Set shall be present in each Period. However, the actual element may be present only in a remote element if xlink is in use.\n * For more details see section 5.3.3. of ISO/IEC 23009-1, Part 1, 2012. * @return a reference to a vector of pointers to dash::mpd::IAdaptationSet objects */ virtual const std::vector& GetAdaptationSets () const = 0; /** * Returns a reference to a vector of pointers to dash::mpd::ISubset objects that specify Subsets.\n * For more details see section 5.3.8. of ISO/IEC 23009-1, Part 1, 2012. * @return a reference to a vector of pointers to dash::mpd::ISubset objects */ virtual const std::vector& GetSubsets () const = 0; /** * Returns a reference to a string that specifies a reference to an external Period element. * @return a reference to a string */ virtual const std::string& GetXlinkHref () const = 0; /** * Returns a reference to a string that specifies the processing instructions, which can be either \c \"onLoad\" or \c \"onRequest\".\n * This attribute shall not be present if the \c \@xlink:href attribute is not present. * @return a reference to a string */ virtual const std::string& GetXlinkActuate () const = 0; /** * Returns an reference to a string that specifies an identifier for this Period. * The attribute shall be unique in the scope of the Media Presentation. * @return a reference to a string */ virtual const std::string& GetId () const = 0; /** * Returns a reference to a string that specifies the \em PeriodStart time of the Period.The \em PeriodStart time is used as an anchor to determine the MPD start * time of each Media Segment as well as to determine the presentation time of each each access unit in the Media Presentation timeline.\n * If not present, refer to the details in section 5.3.2.1. of ISO/IEC 23009-1, Part 1, 2012 * @return a reference to a string */ virtual const std::string& GetStart () const = 0; /** * Returns a reference to a string that specifies the duration of the Period to determine the \em PeriodStart time of the next Period.\n * If not present, refer to the details in section 5.3.2.1. of ISO/IEC 23009-1, Part 1, 2012 * @return a reference to a string */ virtual const std::string& GetDuration () const = 0; /** * When set to \c 'true', this is equivalent as if the AdaptationSet\@bitstreamSwitching for each Adaptation Set contained in this Period is set to \c 'true'. * In this case, the AdaptationSet\@bitstreamSwitching attribute shall not be set to \c 'false' for any Adaptation Set in this Period. * @return a bool value */ virtual bool GetBitstreamSwitching () const = 0; }; } } #endif /* IPERIOD_H_ */