Shaka Packager SDK
|
#include <dash_iop_mpd_notifier.h>
Public Member Functions | |
DashIopMpdNotifier (const MpdOptions &mpd_options) | |
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 shaka::MpdNotifier | |
MpdNotifier (const MpdOptions &mpd_options) | |
DashProfile | dash_profile () const |
MpdType | mpd_type () const |
Friends | |
class | DashIopMpdNotifierTest |
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 30 of file dash_iop_mpd_notifier.h.
|
overridevirtual |
Adds content protection information to the MPD.
container_id | is the nummeric container ID obtained from calling NotifyNewContainer(). |
content_protection_element | New ContentProtection element specification. |
Implements shaka::MpdNotifier.
Definition at line 136 of file dash_iop_mpd_notifier.cc.
|
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 shaka::MpdNotifier.
Definition at line 146 of file dash_iop_mpd_notifier.cc.
|
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.
Implements shaka::MpdNotifier.
Definition at line 51 of file dash_iop_mpd_notifier.cc.
|
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.
container_id | Container ID obtained from calling NotifyNewContainer(). |
drm_uuid | is the UUID of the DRM for encryption. |
new_key_id | is the new key ID for the key. |
new_pssh | is the new pssh box (including the header). |
Implements shaka::MpdNotifier.
Definition at line 117 of file dash_iop_mpd_notifier.cc.
|
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().
media_info | is the MediaInfo that will be passed to MpdBuilder. | |
[out] | container_id | is the numeric ID of the container, possibly for NotifyNewSegment() and AddContentProtectionElement(). Only populated on success. |
Implements shaka::MpdNotifier.
Definition at line 55 of file dash_iop_mpd_notifier.cc.
|
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.
container_id | Container ID obtained from calling NotifyNewContainer(). |
start_time | is the start time of the new segment, in units of the stream's time scale. |
duration | is the duration of the new segment, in units of the stream's time scale. |
size | is the new segment size in bytes. |
Implements shaka::MpdNotifier.
Definition at line 103 of file dash_iop_mpd_notifier.cc.
|
overridevirtual |
Change the sample duration of container with container_id.
container_id | Container ID obtained from calling NotifyNewContainer(). |
sample_duration | is the duration of a sample in timescale of the media. |
Implements shaka::MpdNotifier.
Definition at line 91 of file dash_iop_mpd_notifier.cc.