#include <mpd_notifier.h>
|
| MpdNotifier (const MpdOptions &mpd_options) |
|
virtual bool | Init ()=0 |
|
virtual bool | NotifyNewContainer (const MediaInfo &media_info, uint32_t *container_id)=0 |
|
virtual bool | NotifySampleDuration (uint32_t container_id, uint32_t sample_duration)=0 |
|
virtual bool | NotifyNewSegment (uint32_t container_id, uint64_t start_time, uint64_t duration, uint64_t size)=0 |
|
virtual bool | NotifyCueEvent (uint32_t container_id, uint64_t timestamp)=0 |
|
virtual 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)=0 |
|
virtual bool | NotifyMediaInfoUpdate (uint32_t container_id, const MediaInfo &media_info)=0 |
|
virtual bool | Flush ()=0 |
|
DashProfile | dash_profile () const |
|
MpdType | mpd_type () const |
|
Interface for publish/subscribe publisher class which notifies MpdBuilder of media-related events.
Definition at line 27 of file mpd_notifier.h.
◆ dash_profile()
DashProfile shaka::MpdNotifier::dash_profile |
( |
| ) |
const |
|
inline |
- Returns
- The dash profile for this object.
Definition at line 108 of file mpd_notifier.h.
◆ Flush()
virtual bool shaka::MpdNotifier::Flush |
( |
| ) |
|
|
pure virtual |
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.
Implemented in shaka::SimpleMpdNotifier.
◆ Init()
virtual bool shaka::MpdNotifier::Init |
( |
| ) |
|
|
pure virtual |
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.
Implemented in shaka::SimpleMpdNotifier.
◆ mpd_type()
MpdType shaka::MpdNotifier::mpd_type |
( |
| ) |
const |
|
inline |
◆ NotifyCueEvent()
virtual bool shaka::MpdNotifier::NotifyCueEvent |
( |
uint32_t |
container_id, |
|
|
uint64_t |
timestamp |
|
) |
| |
|
pure virtual |
◆ NotifyEncryptionUpdate()
virtual bool shaka::MpdNotifier::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 |
|
) |
| |
|
pure virtual |
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_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). |
- Attention
- This might change or get removed once DASH IF IOP specification writes a clear guideline on how to handle key rotation.
Implemented in shaka::SimpleMpdNotifier.
◆ NotifyMediaInfoUpdate()
virtual bool shaka::MpdNotifier::NotifyMediaInfoUpdate |
( |
uint32_t |
container_id, |
|
|
const MediaInfo & |
media_info |
|
) |
| |
|
pure virtual |
◆ NotifyNewContainer()
virtual bool shaka::MpdNotifier::NotifyNewContainer |
( |
const MediaInfo & |
media_info, |
|
|
uint32_t * |
container_id |
|
) |
| |
|
pure virtual |
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_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. |
- Returns
- true on success, false otherwise.
Implemented in shaka::SimpleMpdNotifier.
◆ NotifyNewSegment()
virtual bool shaka::MpdNotifier::NotifyNewSegment |
( |
uint32_t |
container_id, |
|
|
uint64_t |
start_time, |
|
|
uint64_t |
duration, |
|
|
uint64_t |
size |
|
) |
| |
|
pure virtual |
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_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. |
- Returns
- true on success, false otherwise.
Implemented in shaka::SimpleMpdNotifier.
◆ NotifySampleDuration()
virtual bool shaka::MpdNotifier::NotifySampleDuration |
( |
uint32_t |
container_id, |
|
|
uint32_t |
sample_duration |
|
) |
| |
|
pure virtual |
Change the sample duration of container with container_id.
- Parameters
-
container_id | Container ID obtained from calling NotifyNewContainer(). |
sample_duration | is 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.
Implemented in shaka::SimpleMpdNotifier.
The documentation for this class was generated from the following file: