DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions | Friends | List of all members
edash_packager::DashIopMpdNotifier Class Reference

#include <dash_iop_mpd_notifier.h>

Inheritance diagram for edash_packager::DashIopMpdNotifier:
edash_packager::MpdNotifier

Public Member Functions

 DashIopMpdNotifier (DashProfile dash_profile, const MpdOptions &mpd_options, const std::vector< std::string > &base_urls, const std::string &output_path)
 
MpdNotifier implemetation overrides.

None of the methods write out the MPD file until Flush() is called.

bool Init () override
 
bool NotifyNewContainer (const MediaInfo &media_info, uint32_t *id) override
 
bool NotifySampleDuration (uint32_t container_id, uint32_t sample_duration) override
 
bool NotifyNewSegment (uint32_t id, uint64_t start_time, uint64_t duration, uint64_t size) override
 
bool NotifyEncryptionUpdate (uint32_t container_id, const std::string &drm_uuid, const std::vector< uint8_t > &new_key_id, const std::vector< uint8_t > &new_pssh) override
 
bool AddContentProtectionElement (uint32_t id, const ContentProtectionElement &content_protection_element) override
 
bool Flush () override
 
- Public Member Functions inherited from edash_packager::MpdNotifier
 MpdNotifier (DashProfile dash_profile)
 
DashProfile dash_profile () const
 

Friends

class DashIopMpdNotifierTest
 

Detailed Description

This class is an MpdNotifier which will try its best to generate a DASH IF IOPv3 compliant MPD. e.g. All <ContentProtection> elements must be right under <AdaptationSet> and cannot be under <Representation>. All video Adaptation Sets have Role set to "main".

Definition at line 29 of file dash_iop_mpd_notifier.h.

Member Function Documentation

bool edash_packager::DashIopMpdNotifier::AddContentProtectionElement ( uint32_t  container_id,
const ContentProtectionElement content_protection_element 
)
overridevirtual

Adds content protection information to the MPD.

Parameters
container_idis the nummeric container ID obtained from calling NotifyNewContainer().
content_protection_elementNew ContentProtection element specification.
Returns
true on success, false otherwise.

Implements edash_packager::MpdNotifier.

Definition at line 148 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::Flush ( )
overridevirtual

Call this method to force a flush. Implementations might not write out the MPD to a stream (file, stdout, etc.) when the MPD is updated, this forces a flush.

Implements edash_packager::MpdNotifier.

Definition at line 158 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::Init ( )
overridevirtual

Initializes the notifier. For example, if this notifier uses a network for notification, then this would set up the connection with the remote host.

Returns
true on success, false otherwise.

Implements edash_packager::MpdNotifier.

Definition at line 64 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::NotifyEncryptionUpdate ( uint32_t  container_id,
const std::string &  drm_uuid,
const std::vector< uint8_t > &  new_key_id,
const std::vector< uint8_t > &  new_pssh 
)
overridevirtual

Notifiers MpdBuilder that there is a new PSSH for the container. This may be called whenever the key has to change, e.g. key rotation.

Parameters
container_idContainer ID obtained from calling NotifyNewContainer().
drm_uuidis the UUID of the DRM for encryption.
new_key_idis the new key ID for the key.
new_psshis the new pssh box (including the header).
Attention
This might change or get removed once DASH IF IOP specification writes a clear guideline on how to handle key rotation.

Implements edash_packager::MpdNotifier.

Definition at line 129 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::NotifyNewContainer ( const MediaInfo &  media_info,
uint32_t *  container_id 
)
overridevirtual

Notifies the MpdBuilder that there is a new container along with media_info. Live may have multiple files (segments) but those should be notified via NotifyNewSegment().

Parameters
media_infois the MediaInfo that will be passed to MpdBuilder.
[out]container_idis the numeric ID of the container, possibly for NotifyNewSegment() and AddContentProtectionElement(). Only populated on success.
Returns
true on success, false otherwise.

Implements edash_packager::MpdNotifier.

Definition at line 68 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::NotifyNewSegment ( uint32_t  container_id,
uint64_t  start_time,
uint64_t  duration,
uint64_t  size 
)
overridevirtual

Notifies MpdBuilder that there is a new segment ready. For live, this is usually a new segment, for VOD this is usually a subsegment.

Parameters
container_idContainer ID obtained from calling NotifyNewContainer().
start_timeis the start time of the new segment, in units of the stream's time scale.
durationis the duration of the new segment, in units of the stream's time scale.
sizeis the new segment size in bytes.
Returns
true on success, false otherwise.

Implements edash_packager::MpdNotifier.

Definition at line 115 of file dash_iop_mpd_notifier.cc.

bool edash_packager::DashIopMpdNotifier::NotifySampleDuration ( uint32_t  container_id,
uint32_t  sample_duration 
)
overridevirtual

Change the sample duration of container with container_id.

Parameters
container_idContainer ID obtained from calling NotifyNewContainer().
sample_durationis the duration of a sample in timescale of the media.
Returns
true on success, false otherwise. This may fail if the container specified by container_id does not exist.

Implements edash_packager::MpdNotifier.

Definition at line 103 of file dash_iop_mpd_notifier.cc.


The documentation for this class was generated from the following files: