2014-02-14 23:21:05 +00:00
|
|
|
// Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
//
|
2013-11-18 23:39:20 +00:00
|
|
|
// ContentProtectionElement is shared a structure that can be passed to
|
|
|
|
// MPD generator classes to add ContentProtection element in the resulting MPD
|
|
|
|
// file.
|
|
|
|
// http://goo.gl/UrsSlF
|
|
|
|
|
|
|
|
#ifndef MPD_BASE_CONTENT_PROTECTION_ELEMENT_H_
|
|
|
|
#define MPD_BASE_CONTENT_PROTECTION_ELEMENT_H_
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
2015-07-15 21:57:47 +00:00
|
|
|
#include <vector>
|
2013-11-18 23:39:20 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2013-11-18 23:39:20 +00:00
|
|
|
|
2015-07-15 21:57:47 +00:00
|
|
|
// This is any (XML) element.
|
|
|
|
struct Element {
|
|
|
|
Element();
|
|
|
|
~Element();
|
|
|
|
// Name of this element.
|
|
|
|
std::string name;
|
|
|
|
// attributes for this element.
|
|
|
|
std::map<std::string, std::string> attributes;
|
|
|
|
// Content of this element.
|
|
|
|
std::string content;
|
|
|
|
std::vector<Element> subelements;
|
|
|
|
};
|
|
|
|
|
2014-02-06 21:20:36 +00:00
|
|
|
/// Structure to represent <ContentProtection> element in DASH MPD spec (ISO
|
|
|
|
/// 23009-1:2012 MPD and Segment Formats).
|
2013-11-18 23:39:20 +00:00
|
|
|
struct ContentProtectionElement {
|
2014-01-16 08:12:14 +00:00
|
|
|
ContentProtectionElement();
|
|
|
|
~ContentProtectionElement();
|
|
|
|
|
2013-11-18 23:39:20 +00:00
|
|
|
std::string value; // Will be set for 'value' attribute.
|
|
|
|
std::string scheme_id_uri; // Will be set for 'schemeIdUri' attribute.
|
|
|
|
|
|
|
|
// Other attributes for this element.
|
|
|
|
std::map<std::string, std::string> additional_attributes;
|
|
|
|
|
2015-07-15 21:57:47 +00:00
|
|
|
// The subelements that will be in this element.
|
|
|
|
std::vector<Element> subelements;
|
2013-11-18 23:39:20 +00:00
|
|
|
};
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2013-11-18 23:39:20 +00:00
|
|
|
|
|
|
|
#endif // MPD_BASE_CONTENT_PROTECTION_ELEMENT_H_
|