From 3137acdd5a45285dab9903f9d41560c63eca8523 Mon Sep 17 00:00:00 2001 From: "Angelo Mantellini (manangel)" Date: Wed, 29 Mar 2017 18:00:06 +0200 Subject: first commit Change-Id: I8412b8e7d966c2fbc508b537fd9a9bbcfc628ca8 Signed-off-by: Angelo Mantellini (manangel) --- src/libdash/source/mpd/Period.cpp | 137 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 src/libdash/source/mpd/Period.cpp (limited to 'src/libdash/source/mpd/Period.cpp') diff --git a/src/libdash/source/mpd/Period.cpp b/src/libdash/source/mpd/Period.cpp new file mode 100644 index 00000000..291677ea --- /dev/null +++ b/src/libdash/source/mpd/Period.cpp @@ -0,0 +1,137 @@ +/* + * Period.cpp + ***************************************************************************** + * Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved + * + * Email: libdash-dev@vicky.bitmovin.net + * + * This source code and its use and distribution, is subject to the terms + * and conditions of the applicable license agreement. + *****************************************************************************/ + +#include "Period.h" + +using namespace dash::mpd; + +Period::Period () : + segmentBase(NULL), + segmentList(NULL), + segmentTemplate(NULL), + xlinkActuate("onRequest"), + xlinkHref(""), + id(""), + start(""), + duration(""), + isBitstreamSwitching(false) +{ +} +Period::~Period () +{ + for(size_t i = 0; i < this->baseURLs.size(); i++) + delete(this->baseURLs.at(i)); + for(size_t i = 0; i < this->adaptationSets.size(); i++) + delete(this->adaptationSets.at(i)); + for(size_t i = 0; i < this->subsets.size(); i++) + delete(this->subsets.at(i)); + delete(segmentBase); + delete(segmentList); + delete(segmentTemplate); +} + +const std::vector& Period::GetBaseURLs () const +{ + return (std::vector &) this->baseURLs; +} +void Period::AddBaseURL (BaseUrl *baseUrl) +{ + this->baseURLs.push_back(baseUrl); +} +ISegmentBase* Period::GetSegmentBase () const +{ + return this->segmentBase; +} +void Period::SetSegmentBase (SegmentBase *segmentBase) +{ + this->segmentBase = segmentBase; +} +ISegmentList* Period::GetSegmentList () const +{ + return this->segmentList; +} +void Period::SetSegmentList (SegmentList *segmentList) +{ + this->segmentList = segmentList; +} +ISegmentTemplate* Period::GetSegmentTemplate () const +{ + return this->segmentTemplate; +} +void Period::SetSegmentTemplate (SegmentTemplate *segmentTemplate) +{ + this->segmentTemplate = segmentTemplate; +} +const std::vector& Period::GetAdaptationSets () const +{ + return (std::vector &) this->adaptationSets; +} +void Period::AddAdaptationSet (AdaptationSet *adaptationSet) +{ + if(adaptationSet != NULL) + this->adaptationSets.push_back(adaptationSet); +} +const std::vector& Period::GetSubsets () const +{ + return (std::vector &) this->subsets; +} +void Period::AddSubset (Subset *subset) +{ + this->subsets.push_back(subset); +} +const std::string& Period::GetXlinkHref () const +{ + return this->xlinkHref; +} +void Period::SetXlinkHref (const std::string& xlinkHref) +{ + this->xlinkHref = xlinkHref; +} +const std::string& Period::GetXlinkActuate () const +{ + return this->xlinkActuate; +} +void Period::SetXlinkActuate (const std::string& xlinkActuate) +{ + this->xlinkActuate = xlinkActuate; +} +const std::string& Period::GetId () const +{ + return this->id; +} +void Period::SetId (const std::string& id) +{ + this->id = id; +} +const std::string& Period::GetStart () const +{ + return this->start; +} +void Period::SetStart (const std::string& start) +{ + this->start = start; +} +const std::string& Period::GetDuration () const +{ + return this->duration; +} +void Period::SetDuration (const std::string& duration) +{ + this->duration = duration; +} +bool Period::GetBitstreamSwitching () const +{ + return this->isBitstreamSwitching; +} +void Period::SetBitstreamSwitching (bool value) +{ + this->isBitstreamSwitching = value; +} -- cgit 1.2.3-korg