#include <adaptation_set.h>
|
enum | Role {
kRoleUnknown
, kRoleCaption
, kRoleSubtitle
, kRoleMain
,
kRoleAlternate
, kRoleSupplementary
, kRoleCommentary
, kRoleDub
,
kRoleDescription
, kRoleSign
, kRoleMetadata
, kRoleEnhancedAudioIntelligibility
,
kRoleEmergency
, kRoleForcedSubtitle
, kRoleEasyreader
, kRoleKaraoke
} |
|
|
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 187 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 309 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 503 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 297 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 260 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 314 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 539 of file adaptation_set.cc.
◆ codec()
const std::string& shaka::AdaptationSet::codec |
( |
| ) |
const |
|
inline |
◆ color_primaries()
uint32_t shaka::AdaptationSet::color_primaries |
( |
| ) |
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 497 of file adaptation_set.cc.
◆ ForceStartwithSAP()
void shaka::AdaptationSet::ForceStartwithSAP |
( |
uint32_t |
sap_value | ) |
|
|
virtual |
Forces the StartswithSAP field to be set to sap_value. Use this if you are certain with stream access point value of the segment.
- Parameters
-
sap_value | is the value used for startWithSAP attribute. |
Definition at line 512 of file adaptation_set.cc.
◆ ForceSubsegmentStartswithSAP()
void shaka::AdaptationSet::ForceSubsegmentStartswithSAP |
( |
uint32_t |
sap_value | ) |
|
|
virtual |
Forces the subsegmentStartswithSAP field to be set to sap_value. Use this if you are certain with stream access point value of the subsegment.
- Parameters
-
sap_value | is the value used for subsegmentstartsWithSAP attribute. |
Definition at line 508 of file adaptation_set.cc.
◆ GetXml()
std::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 324 of file adaptation_set.cc.
◆ has_id()
bool shaka::AdaptationSet::has_id |
( |
| ) |
const |
|
inline |
◆ IsVideo()
bool shaka::AdaptationSet::IsVideo |
( |
| ) |
const |
◆ MatchAdaptationSet()
bool shaka::AdaptationSet::MatchAdaptationSet |
( |
const MediaInfo & |
media_info, |
|
|
bool |
content_protection_in_adaptation_set |
|
) |
| |
Check if the protected content associated with this AdaptationSet matches with the one in |media_info|.
- Parameters
-
media_info | to extract ProtectedContent from. |
content_protection_in_adaptation_set | to indicate if there is protected content in AdaptationSet. |
- Returns
- true if there is a match.
Definition at line 216 of file adaptation_set.cc.
◆ matrix_coefficients()
uint32_t shaka::AdaptationSet::matrix_coefficients |
( |
| ) |
const |
|
inline |
◆ OnNewSegmentForRepresentation()
void shaka::AdaptationSet::OnNewSegmentForRepresentation |
( |
uint32_t |
representation_id, |
|
|
int64_t |
start_time, |
|
|
int64_t |
duration |
|
) |
| |
◆ OnSetFrameRateForRepresentation()
void shaka::AdaptationSet::OnSetFrameRateForRepresentation |
( |
uint32_t |
representation_id, |
|
|
int32_t |
frame_duration, |
|
|
int32_t |
timescale |
|
) |
| |
◆ set_codec()
void shaka::AdaptationSet::set_codec |
( |
const std::string & |
codec | ) |
|
|
inline |
◆ set_color_primaries()
void shaka::AdaptationSet::set_color_primaries |
( |
const uint32_t & |
color_primaries | ) |
|
|
inline |
◆ set_id()
void shaka::AdaptationSet::set_id |
( |
uint32_t |
id | ) |
|
|
inline |
◆ set_matrix_coefficients()
void shaka::AdaptationSet::set_matrix_coefficients |
( |
const uint32_t & |
matrix_coefficients | ) |
|
|
inline |
◆ set_protected_content()
void shaka::AdaptationSet::set_protected_content |
( |
const MediaInfo & |
media_info | ) |
|
◆ set_transfer_characteristics()
void shaka::AdaptationSet::set_transfer_characteristics |
( |
const uint32_t & |
transfer_characteristics | ) |
|
|
inline |
Set AdaptationSet's video transfer characteristics.
- Parameters
-
transfer_characteristics | is the video transfer characteristics. |
Definition at line 231 of file adaptation_set.h.
◆ SortIndex()
std::optional<uint32_t> shaka::AdaptationSet::SortIndex |
( |
| ) |
const |
|
inline |
◆ SwitchableAdaptationSet()
bool shaka::AdaptationSet::SwitchableAdaptationSet |
( |
const AdaptationSet & |
adaptation_set | ) |
|
Check if the adaptation sets are switchable.
- Parameters
-
- Returns
- true if AdaptationSets are switchable.
Definition at line 243 of file adaptation_set.cc.
◆ transfer_characteristics()
uint32_t shaka::AdaptationSet::transfer_characteristics |
( |
| ) |
const |
|
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 303 of file adaptation_set.cc.
The documentation for this class was generated from the following files: