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 | NotifyAvailabilityTimeOffset (uint32_t container_id) override |
bool | NotifySampleDuration (uint32_t container_id, int32_t sample_duration) override |
bool | NotifySegmentDuration (uint32_t container_id) override |
bool | NotifyNewSegment (uint32_t container_id, int64_t start_time, int64_t duration, uint64_t size, int64_t segment_number) override |
bool | NotifyCompletedSegment (uint32_t container_id, int64_t duration, uint64_t size) override |
bool | NotifyCueEvent (uint32_t container_id, int64_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 | NotifyMediaInfoUpdate (uint32_t container_id, const MediaInfo &media_info) override |
bool | Flush () override |
Public Member Functions inherited from shaka::MpdNotifier | |
MpdNotifier (const MpdOptions &mpd_options) | |
bool | include_mspr_pro () const |
DashProfile | dash_profile () const |
MpdType | mpd_type () const |
bool | use_segment_list () const |
Friends | |
class | SimpleMpdNotifierTest |
A simple MpdNotifier implementation which receives muxer listener event and generates an Mpd file.
Definition at line 30 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 221 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 33 of file simple_mpd_notifier.cc.
|
overridevirtual |
Record the availailityTimeOffset for Low Latency DASH streaming.
container_id | Container ID obtained from calling NotifyNewContainer(). |
Reimplemented from shaka::MpdNotifier.
Definition at line 75 of file simple_mpd_notifier.cc.
|
overridevirtual |
Notifies MpdBuilder that a segment is fully written and provides the segment's complete duration and size. For Low Latency only. Note, size and duration are not known when the low latency segment is first registered with the MPD, so we must update these values after the segment is complete.
container_id | Container ID obtained from calling NotifyNewContainer(). |
duration | is the duration of the complete segment, in units of the stream's time scale. |
size | is the complete segment size in bytes. |
Reimplemented from shaka::MpdNotifier.
Definition at line 124 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 137 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 181 of file simple_mpd_notifier.cc.
|
overridevirtual |
container_id | Container ID obtained from calling NotifyNewContainer(). |
media_info | is the new MediaInfo. Note that codec related information cannot be updated. |
Implements shaka::MpdNotifier.
Definition at line 205 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 37 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, for low latency this is the first chunk.
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. |
segment_number | is the segment number. |
Implements shaka::MpdNotifier.
Definition at line 109 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 86 of file simple_mpd_notifier.cc.
|
overridevirtual |
Record the duration of a segment for Low Latency DASH streaming.
container_id | Container ID obtained from calling NotifyNewContainer(). |
Reimplemented from shaka::MpdNotifier.
Definition at line 98 of file simple_mpd_notifier.cc.