#include <adaptation_set.h>
|
enum | Role {
kRoleUnknown
, kRoleCaption
, kRoleSubtitle
, kRoleMain
,
kRoleAlternate
, kRoleSupplementary
, kRoleCommentary
, kRoleDub
} |
|
|
class | Period |
|
class | AdaptationSetTest |
|
AdaptationSet class provides methods to add Representations and <ContentProtection> elements to the AdaptationSet element.
Definition at line 33 of file adaptation_set.h.
◆ AdaptationSet()
shaka::AdaptationSet::AdaptationSet |
( |
const std::string & |
language, |
|
|
const MpdOptions & |
mpd_options, |
|
|
uint32_t * |
representation_counter |
|
) |
| |
|
protected |
- Parameters
-
language | is the language of this AdaptationSet. Mainly relevant for audio. |
mpd_options | is the options for this MPD. |
mpd_type | is the type of this MPD. |
representation_counter | is a Counter for assigning ID numbers to Representation. It can not be NULL. |
Definition at line 166 of file adaptation_set.cc.
◆ AddAccessibility()
void shaka::AdaptationSet::AddAccessibility |
( |
const std::string & |
scheme, |
|
|
const std::string & |
value |
|
) |
| |
|
virtual |
Set the Accessibility element for this AdaptationSet. See ISO/IEC 23009-1:2012 section 5.8.4.3.
- Parameters
-
scheme | is the schemeIdUri of the accessibility element. |
value | is the value of the accessibility element. |
Definition at line 225 of file adaptation_set.cc.
◆ AddAdaptationSetSwitching()
void shaka::AdaptationSet::AddAdaptationSetSwitching |
( |
const AdaptationSet * |
adaptation_set | ) |
|
|
virtual |
Adds the adaptation set this adaptation set can switch to.
- Parameters
-
adaptation_set | points to the switchable adaptation set. |
Definition at line 382 of file adaptation_set.cc.
◆ AddContentProtectionElement()
Add a ContenProtection element to the adaptation set. AdaptationSet does not add <ContentProtection> elements automatically to itself even if media_info.protected_content is populated. This is because some MPDs should have the elements at AdaptationSet level and some at Representation level.
- Parameters
-
element | contains the ContentProtection element contents. If element has {value, schemeIdUri} set and has {“value”, “schemeIdUri”} as key for additional_attributes, then the former is used. |
Definition at line 213 of file adaptation_set.cc.
◆ AddRepresentation()
Representation * shaka::AdaptationSet::AddRepresentation |
( |
const MediaInfo & |
media_info | ) |
|
|
virtual |
Create a Representation instance using media_info.
- Parameters
-
media_info | is a MediaInfo object used to initialize the returned Representation instance. It may contain only one of VideoInfo, AudioInfo, or TextInfo, i.e. VideoInfo XOR AudioInfo XOR TextInfo. |
- Returns
- On success, returns a pointer to Representation. Otherwise returns NULL. The returned pointer is owned by the AdaptationSet instance.
Definition at line 179 of file adaptation_set.cc.
◆ AddRole()
void shaka::AdaptationSet::AddRole |
( |
Role |
role | ) |
|
|
virtual |
Set the Role element for this AdaptationSet. The Role element's is schemeIdUri='urn:mpeg:dash:role:2011'. See ISO/IEC 23009-1:2012 section 5.8.5.5.
- Parameters
-
Definition at line 230 of file adaptation_set.cc.
◆ AddTrickPlayReference()
void shaka::AdaptationSet::AddTrickPlayReference |
( |
const AdaptationSet * |
adaptation_set | ) |
|
|
virtual |
Add the adaptation set this trick play adaptation set belongs to.
- Parameters
-
adaptation_set | points to the reference (or main) adapation set. |
Definition at line 410 of file adaptation_set.cc.
◆ codec()
const std::string& shaka::AdaptationSet::codec |
( |
| ) |
const |
|
inline |
◆ CopyRepresentation()
◆ ForceSetSegmentAlignment()
void shaka::AdaptationSet::ForceSetSegmentAlignment |
( |
bool |
segment_alignment | ) |
|
|
virtual |
Forces the (sub)segmentAlignment field to be set to segment_alignment. Use this if you are certain that the (sub)segments are alinged/unaligned for the AdaptationSet.
- Parameters
-
segment_alignment | is the value used for (sub)segmentAlignment attribute. |
Definition at line 376 of file adaptation_set.cc.
◆ GetXml()
base::Optional< xml::XmlNode > shaka::AdaptationSet::GetXml |
( |
| ) |
|
Makes a copy of AdaptationSet xml element with its child Representation and ContentProtection elements.
- Returns
- On success returns a non-NULL scoped_xml_ptr. Otherwise returns a NULL scoped_xml_ptr.
Definition at line 240 of file adaptation_set.cc.
◆ has_id()
bool shaka::AdaptationSet::has_id |
( |
| ) |
const |
|
inline |
◆ IsVideo()
bool shaka::AdaptationSet::IsVideo |
( |
| ) |
const |
◆ OnNewSegmentForRepresentation()
void shaka::AdaptationSet::OnNewSegmentForRepresentation |
( |
uint32_t |
representation_id, |
|
|
uint64_t |
start_time, |
|
|
uint64_t |
duration |
|
) |
| |
◆ OnSetFrameRateForRepresentation()
void shaka::AdaptationSet::OnSetFrameRateForRepresentation |
( |
uint32_t |
representation_id, |
|
|
uint32_t |
frame_duration, |
|
|
uint32_t |
timescale |
|
) |
| |
◆ set_codec()
void shaka::AdaptationSet::set_codec |
( |
const std::string & |
codec | ) |
|
|
inline |
◆ set_id()
void shaka::AdaptationSet::set_id |
( |
uint32_t |
id | ) |
|
|
inline |
◆ UpdateContentProtectionPssh()
void shaka::AdaptationSet::UpdateContentProtectionPssh |
( |
const std::string & |
drm_uuid, |
|
|
const std::string & |
pssh |
|
) |
| |
|
virtual |
Update the 'cenc:pssh' element for drm_uuid ContentProtection element. If the element does not exist, this will add one.
- Parameters
-
drm_uuid | is the UUID of the DRM for encryption. |
pssh | is the content of <cenc:pssh> element. Note that DASH IF IOP mentions that this should be base64 encoded string of the whole pssh box. |
- Attention
- This might get removed once DASH IF IOP specification makes a a clear guideline on how to handle key rotation. Also to get this working with shaka-player, this method DOES NOT update the PSSH element. Instead, it removes the element regardless of the content of pssh.
Definition at line 219 of file adaptation_set.cc.
The documentation for this class was generated from the following files: