Shaka Packager SDK
|
This is thread safe. More...
#include <simple_hls_notifier.h>
Public Member Functions | |
SimpleHlsNotifier (HlsPlaylistType playlist_type, double time_shift_buffer_depth, const std::string &prefix, const std::string &output_dir, const std::string &master_playlist_name) | |
Public Member Functions inherited from shaka::hls::HlsNotifier | |
HlsNotifier (HlsPlaylistType playlist_type) | |
HlsPlaylistType | playlist_type () const |
HlsNotifier implemetation overrides. | |
class | SimpleHlsNotifierTest |
}@ | |
bool | Init () override |
bool | NotifyNewStream (const MediaInfo &media_info, const std::string &playlist_name, const std::string &stream_name, const std::string &group_id, uint32_t *stream_id) override |
bool | NotifyNewSegment (uint32_t stream_id, const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t start_byte_offset, uint64_t size) override |
bool | NotifyEncryptionUpdate (uint32_t stream_id, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &system_id, const std::vector< uint8_t > &iv, const std::vector< uint8_t > &protection_system_specific_data) override |
bool | Flush () override |
This is thread safe.
Definition at line 39 of file simple_hls_notifier.h.
shaka::hls::SimpleHlsNotifier::SimpleHlsNotifier | ( | HlsPlaylistType | playlist_type, |
double | time_shift_buffer_depth, | ||
const std::string & | prefix, | ||
const std::string & | output_dir, | ||
const std::string & | master_playlist_name | ||
) |
prefix is used as hte prefix for all the URIs for Media Playlist. This includes the segment URIs in the Media Playlists.
playlist_type | is the type of the playlists. |
time_shift_buffer_depth | determines the duration of the time shifting buffer, only for live HLS. |
prefix | is the used as the prefix for MediaPlaylist URIs. May be empty for relative URI from the playlist. |
output_dir | is the output directory of the playlists. May be empty to write to current directory. |
master_playlist_name | is the name of the master playlist. |
Definition at line 250 of file simple_hls_notifier.cc.
|
overridevirtual |
Process any current buffered states/resources.
Implements shaka::hls::HlsNotifier.
Definition at line 412 of file simple_hls_notifier.cc.
|
overridevirtual |
Intialize the notifier.
Implements shaka::hls::HlsNotifier.
Definition at line 264 of file simple_hls_notifier.cc.
|
overridevirtual |
stream_id | is the value set by NotifyNewStream(). |
key_id | is the key ID for the stream. |
system_id | is the DRM system ID in e.g. PSSH boxes. For example this can be used to determine the KEYFORMAT attribute for EXT-X-KEY. |
iv | is the new initialization vector. |
protection_system_specific_data | is the DRM specific data. The interpretation of this data is up to the implementation, possibly using system_id to determine how to interpret the data. |
Implements shaka::hls::HlsNotifier.
Definition at line 355 of file simple_hls_notifier.cc.
|
overridevirtual |
stream_id | is the value set by NotifyNewStream(). |
segment_name | is the name of the new segment. |
start_time | is the start time of the segment in timescale units passed in media_info. |
duration | is also in terms of timescale. |
start_byte_offset | is the offset of where the subsegment starts. This should be 0 if the whole segment is a subsegment. |
size | is the size in bytes. |
Implements shaka::hls::HlsNotifier.
Definition at line 306 of file simple_hls_notifier.cc.
|
overridevirtual |
media_info | specifies the stream. |
playlist_name | is the name of the playlist that this stream should go. |
stream_name | is the name of this stream. |
group_id | is the group ID for this stream. |
stream_id | is set to a value so that it can be used to call the other methods. If this returns false, the stream_id may be set to an invalid value. |
Implements shaka::hls::HlsNotifier.
Definition at line 268 of file simple_hls_notifier.cc.