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/Representation.cpp | 116 ++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 src/libdash/source/mpd/Representation.cpp (limited to 'src/libdash/source/mpd/Representation.cpp') diff --git a/src/libdash/source/mpd/Representation.cpp b/src/libdash/source/mpd/Representation.cpp new file mode 100644 index 00000000..fab7b493 --- /dev/null +++ b/src/libdash/source/mpd/Representation.cpp @@ -0,0 +1,116 @@ +/* + * Representation.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 "Representation.h" + +using namespace dash::mpd; + +Representation::Representation () : + segmentBase (NULL), + segmentList (NULL), + segmentTemplate (NULL), + id(""), + bandwidth (0), + qualityRanking (0) +{ +} +Representation::~Representation () +{ + for(size_t i = 0; i < this->baseURLs.size(); i++) + delete(this->baseURLs.at(i)); + for(size_t i = 0; i < this->subRepresentations.size(); i++) + delete(this->subRepresentations.at(i)); + + delete(this->segmentTemplate); + delete(this->segmentBase); + delete(this->segmentList); +} + +const std::vector& Representation::GetBaseURLs () const +{ + return (std::vector &) this->baseURLs; +} +void Representation::AddBaseURL (BaseUrl *baseUrl) +{ + this->baseURLs.push_back(baseUrl); +} +const std::vector& Representation::GetSubRepresentations () const +{ + return (std::vector &) this->subRepresentations; +} +void Representation::AddSubRepresentation (SubRepresentation *subRepresentation) +{ + this->subRepresentations.push_back(subRepresentation); +} +ISegmentBase* Representation::GetSegmentBase () const +{ + return this->segmentBase; +} +void Representation::SetSegmentBase (SegmentBase *segmentBase) +{ + this->segmentBase = segmentBase; +} +ISegmentList* Representation::GetSegmentList () const +{ + return this->segmentList; +} +void Representation::SetSegmentList (SegmentList *segmentList) +{ + this->segmentList = segmentList; +} +ISegmentTemplate* Representation::GetSegmentTemplate () const +{ + return this->segmentTemplate; +} +void Representation::SetSegmentTemplate (SegmentTemplate *segmentTemplate) +{ + this->segmentTemplate = segmentTemplate; +} +const std::string& Representation::GetId () const +{ + return this->id; +} +void Representation::SetId (const std::string &id) +{ + this->id = id; +} +uint32_t Representation::GetBandwidth () const +{ + return this->bandwidth; +} +void Representation::SetBandwidth (uint32_t bandwidth) +{ + this->bandwidth = bandwidth; +} +uint32_t Representation::GetQualityRanking () const +{ + return this->qualityRanking; +} +void Representation::SetQualityRanking (uint32_t qualityRanking) +{ + this->qualityRanking = qualityRanking; +} +const std::vector& Representation::GetDependencyId () const +{ + return this->dependencyId; +} +void Representation::SetDependencyId (const std::string &dependencyId) +{ + dash::helpers::String::Split(dependencyId, ' ', this->dependencyId); +} +const std::vector& Representation::GetMediaStreamStructureId () const +{ + return this->mediaStreamStructureId; +} +void Representation::SetMediaStreamStructureId (const std::string& mediaStreamStructureId) +{ + dash::helpers::String::Split(mediaStreamStructureId, ' ', this->mediaStreamStructureId); +} -- cgit 1.2.3-korg