Saturday, June 29, 2013

AbstractMPDElement &



/*


* AbstractMPDElement.cpp


*****************************************************************************


* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved


*

*


* This source code and its use and distribution, is subject to the terms


* and conditions of the applicable license agreement.


*****************************************************************************/






#include "AbstractMPDElement.h"






using namespace dash::mpd;


using namespace dash::xml;






AbstractMPDElement::AbstractMPDElement ()


{


}


AbstractMPDElement::~AbstractMPDElement ()


{


for(size_t i = 0; i < this->additionalSubNodes.size(); i++)


delete(this->additionalSubNodes.at(i));


}






const std::vector<INode *> AbstractMPDElement::GetAdditionalSubNodes () const


{


return this->additionalSubNodes;


}


const std::map<std::string, std::string> AbstractMPDElement::GetRawAttributes () const


{


return this->rawAttributes;


}


void AbstractMPDElement::AddAdditionalSubNode (INode *node)


{


this->additionalSubNodes.push_back(node);


}


void AbstractMPDElement::AddRawAttributes (std::map<std::string, std::string> attributes)


{


this->rawAttributes = attributes;


}


//SegmentURL method






namespace dash




{


namespace mpd


{


class SegmentURL : public ISegmentURL, public AbstractMPDElement


{


public:


SegmentURL ();


virtual ~SegmentURL();






const std::string& GetMediaURI () const;


const std::string& GetMediaRange () const;


const std::string& GetIndexURI () const;


const std::string& GetIndexRange () const;


ISegment* ToMediaSegment (const std::vector<IBaseUrl *>& baseurls) const;


ISegment* ToIndexSegment (const std::vector<IBaseUrl *>& baseurls) const;






void SetMediaURI (const std::string& mediaURI);


void SetMediaRange (const std::string& mediaRange);


void SetIndexURI (const std::string& indexURI);


void SetIndexRange (const std::string& indexRange);






private:


std::string mediaURI;


std::string mediaRange;


std::string indexURI;


std::string indexRange;


};


}


}

1 comment: