Shaka Packager SDK
|
#include <simple_mpd_notifier.h>
Public Member Functions | |
SimpleMpdNotifier (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 container_id, uint64_t start_time, uint64_t duration, uint64_t size) override |
bool | NotifyCueEvent (uint32_t container_id, uint64_t timestamp) 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 | 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 29 of file simple_mpd_notifier.h.
|
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 149 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 45 of file simple_mpd_notifier.cc.
|
overridevirtual |
Notifies MpdBuilder that there is a new CueEvent.
container_id | Container ID obtained from calling NotifyNewContainer(). |
timestamp | is the timestamp of the CueEvent. |
Implements shaka::MpdNotifier.
Definition at line 97 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 125 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 49 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 83 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 71 of file simple_mpd_notifier.cc.