diff options
author | Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr> | 2017-03-29 18:00:06 +0200 |
---|---|---|
committer | Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr> | 2017-03-30 18:58:33 +0200 |
commit | 3137acdd5a45285dab9903f9d41560c63eca8523 (patch) | |
tree | 38bd8525a9e214d848a73fc40e81ddb182cf91b6 /src/libdash/source/mpd/ContentComponent.cpp | |
parent | 9b30fc10fb1cbebe651e5a107e8ca5b24de54675 (diff) |
first commit
Change-Id: I8412b8e7d966c2fbc508b537fd9a9bbcfc628ca8
Signed-off-by: Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr>
Diffstat (limited to 'src/libdash/source/mpd/ContentComponent.cpp')
-rw-r--r-- | src/libdash/source/mpd/ContentComponent.cpp | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/libdash/source/mpd/ContentComponent.cpp b/src/libdash/source/mpd/ContentComponent.cpp new file mode 100644 index 00000000..ce3de857 --- /dev/null +++ b/src/libdash/source/mpd/ContentComponent.cpp @@ -0,0 +1,98 @@ +/* + * ContentComponent.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 "ContentComponent.h" + +using namespace dash::mpd; + +ContentComponent::ContentComponent () : + id(0), + lang(""), + contentType(""), + par("") +{ +} +ContentComponent::~ContentComponent () +{ + for(size_t i = 0; i < this->accessibility.size(); i++) + delete(this->accessibility.at(i)); + for(size_t i = 0; i < this->role.size(); i++) + delete(this->role.at(i)); + for(size_t i = 0; i < this->rating.size(); i++) + delete(this->rating.at(i)); + for(size_t i = 0; i < this->viewpoint.size(); i++) + delete(this->viewpoint.at(i)); +} + +const std::vector<IDescriptor *>& ContentComponent::GetAccessibility () const +{ + return (std::vector<IDescriptor *> &)this->accessibility; +} +void ContentComponent::AddAccessibity (Descriptor *accessibility) +{ + this->accessibility.push_back(accessibility); +} +const std::vector<IDescriptor *>& ContentComponent::GetRole () const +{ + return (std::vector<IDescriptor *> &)this->role; +} +void ContentComponent::AddRole (Descriptor *role) +{ + this->role.push_back(role); +} +const std::vector<IDescriptor *>& ContentComponent::GetRating () const +{ + return (std::vector<IDescriptor *> &)this->rating; +} +void ContentComponent::AddRating (Descriptor *rating) +{ + this->rating.push_back(rating); +} +const std::vector<IDescriptor *>& ContentComponent::GetViewpoint () const +{ + return (std::vector<IDescriptor *> &)this->viewpoint; +} +void ContentComponent::AddViewpoint (Descriptor *viewpoint) +{ + this->viewpoint.push_back(viewpoint); +} +uint32_t ContentComponent::GetId () const +{ + return this->id; +} +void ContentComponent::SetId (uint32_t id) +{ + this->id = id; +} +const std::string& ContentComponent::GetLang () const +{ + return this->lang; +} +void ContentComponent::SetLang (const std::string& lang) +{ + this->lang = lang; +} +const std::string& ContentComponent::GetContentType () const +{ + return this->contentType; +} +void ContentComponent::SetContentType (const std::string& contentType) +{ + this->contentType = contentType; +} +const std::string& ContentComponent::GetPar () const +{ + return this->par; +} +void ContentComponent::SetPar (const std::string& par) +{ + this->par = par; +} |