DASH Media Packaging SDK
|
#include <simple_mpd_notifier.h>
Public Member Functions | |
SimpleMpdNotifier (const MpdOptions &mpd_options) | |
MpdNotifier implemetation overrides. | |
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 | SimpleMpdNotifierTest |
A simple MpdNotifier implementation which receives muxer listener event and generates an Mpd file.
Definition at line 31 of file simple_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 109 of file simple_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 122 of file simple_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 28 of file simple_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 93 of file simple_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 32 of file simple_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 79 of file simple_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 67 of file simple_mpd_notifier.cc.