#include <adaptation_set.h>
|
enum | Role {
kRoleCaption,
kRoleSubtitle,
kRoleMain,
kRoleAlternate,
kRoleSupplementary,
kRoleCommentary,
kRoleDub
} |
|
|
| AdaptationSet (uint32_t adaptation_set_id, const std::string &lang, const MpdOptions &mpd_options, base::AtomicSequenceNumber *representation_counter) |
|
|
class | Period |
|
class | AdaptationSetTest |
|
AdaptationSet class provides methods to add Representations and <ContentProtection> elements to the AdaptationSet element.
Definition at line 37 of file adaptation_set.h.
◆ AdaptationSet()
shaka::AdaptationSet::AdaptationSet |
( |
uint32_t |
adaptation_set_id, |
|
|
const std::string & |
lang, |
|
|
const MpdOptions & |
mpd_options, |
|
|
base::AtomicSequenceNumber * |
representation_counter |
|
) |
| |
|
protected |
- Parameters
-
adaptation_set_id | is an ID number for this AdaptationSet. |
lang | 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 170 of file adaptation_set.cc.
◆ AddAdaptationSetSwitching()
void shaka::AdaptationSet::AddAdaptationSetSwitching |
( |
uint32_t |
adaptation_set_id | ) |
|
|
virtual |
Adds the id of the adaptation set this adaptation set can switch to.
- Parameters
-
adaptation_set_id | is the id of the switchable adaptation set. |
Definition at line 347 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 220 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 185 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 232 of file adaptation_set.cc.
◆ AddTrickPlayReferenceId()
void shaka::AdaptationSet::AddTrickPlayReferenceId |
( |
uint32_t |
id | ) |
|
|
virtual |
Add the id of the adaptation set this trick play adaptation set belongs to.
- Parameters
-
id | the id of the reference (or main) adapation set. |
Definition at line 375 of file adaptation_set.cc.
◆ CopyRepresentationWithTimeOffset()
Representation * shaka::AdaptationSet::CopyRepresentationWithTimeOffset |
( |
const Representation & |
representation, |
|
|
uint64_t |
presentation_time_offset |
|
) |
| |
|
virtual |
◆ 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 341 of file adaptation_set.cc.
◆ GetXml()
xml::scoped_xml_ptr< 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 242 of file adaptation_set.cc.
◆ 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_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 226 of file adaptation_set.cc.
The documentation for this class was generated from the following files: