Shaka Packager SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Member Functions | List of all members
shaka::hls::SimpleHlsNotifier Class Reference

This is thread safe. More...

#include <simple_hls_notifier.h>

Inheritance diagram for shaka::hls::SimpleHlsNotifier:
shaka::hls::HlsNotifier

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
 

Detailed Description

This is thread safe.

Definition at line 39 of file simple_hls_notifier.h.

Constructor & Destructor Documentation

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.

Parameters
playlist_typeis the type of the playlists.
time_shift_buffer_depthdetermines the duration of the time shifting buffer, only for live HLS.
prefixis the used as the prefix for MediaPlaylist URIs. May be empty for relative URI from the playlist.
output_diris the output directory of the playlists. May be empty to write to current directory.
master_playlist_nameis the name of the master playlist.

Definition at line 250 of file simple_hls_notifier.cc.

Member Function Documentation

bool shaka::hls::SimpleHlsNotifier::Flush ( )
overridevirtual

Process any current buffered states/resources.

Returns
true on success, false otherwise.

Implements shaka::hls::HlsNotifier.

Definition at line 412 of file simple_hls_notifier.cc.

bool shaka::hls::SimpleHlsNotifier::Init ( )
overridevirtual

Intialize the notifier.

Returns
true on sucess, false otherwise.

Implements shaka::hls::HlsNotifier.

Definition at line 264 of file simple_hls_notifier.cc.

bool shaka::hls::SimpleHlsNotifier::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 
)
overridevirtual
Parameters
stream_idis the value set by NotifyNewStream().
key_idis the key ID for the stream.
system_idis the DRM system ID in e.g. PSSH boxes. For example this can be used to determine the KEYFORMAT attribute for EXT-X-KEY.
ivis the new initialization vector.
protection_system_specific_datais 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.

bool shaka::hls::SimpleHlsNotifier::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 
)
overridevirtual
Parameters
stream_idis the value set by NotifyNewStream().
segment_nameis the name of the new segment.
start_timeis the start time of the segment in timescale units passed in media_info.
durationis also in terms of timescale.
start_byte_offsetis the offset of where the subsegment starts. This should be 0 if the whole segment is a subsegment.
sizeis the size in bytes.

Implements shaka::hls::HlsNotifier.

Definition at line 306 of file simple_hls_notifier.cc.

bool shaka::hls::SimpleHlsNotifier::NotifyNewStream ( const MediaInfo &  media_info,
const std::string &  playlist_name,
const std::string &  stream_name,
const std::string &  group_id,
uint32_t *  stream_id 
)
overridevirtual
Parameters
media_infospecifies the stream.
playlist_nameis the name of the playlist that this stream should go.
stream_nameis the name of this stream.
group_idis the group ID for this stream.
stream_idis 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.
Returns
true on sucess, false otherwise.

Implements shaka::hls::HlsNotifier.

Definition at line 268 of file simple_hls_notifier.cc.


The documentation for this class was generated from the following files: