Shaka Packager SDK
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 (const HlsParams &hls_params)
 
- Public Member Functions inherited from shaka::hls::HlsNotifier
 HlsNotifier (const HlsParams &hls_params)
 
const HlsParamshls_params () 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 NotifySampleDuration (uint32_t stream_id, uint32_t sample_duration) 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 NotifyKeyFrame (uint32_t stream_id, uint64_t timestamp, uint64_t start_byte_offset, uint64_t size) override
 
bool NotifyCueEvent (uint32_t container_id, uint64_t timestamp) 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 38 of file simple_hls_notifier.h.

Constructor & Destructor Documentation

◆ SimpleHlsNotifier()

shaka::hls::SimpleHlsNotifier::SimpleHlsNotifier ( const HlsParams hls_params)
explicit
Parameters
hls_paramscontains parameters for setting up the notifier.

Definition at line 280 of file simple_hls_notifier.cc.

Member Function Documentation

◆ Flush()

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 499 of file simple_hls_notifier.cc.

◆ Init()

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

Intialize the notifier.

Returns
true on sucess, false otherwise.

Implements shaka::hls::HlsNotifier.

Definition at line 298 of file simple_hls_notifier.cc.

◆ NotifyCueEvent()

bool shaka::hls::SimpleHlsNotifier::NotifyCueEvent ( uint32_t  stream_id,
uint64_t  timestamp 
)
overridevirtual
Parameters
stream_idis the value set by NotifyNewStream().
timestampis the timestamp of the CueEvent.
Returns
true on success, false otherwise.

Implements shaka::hls::HlsNotifier.

Definition at line 425 of file simple_hls_notifier.cc.

◆ NotifyEncryptionUpdate()

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 437 of file simple_hls_notifier.cc.

◆ NotifyKeyFrame()

bool shaka::hls::SimpleHlsNotifier::NotifyKeyFrame ( uint32_t  stream_id,
uint64_t  timestamp,
uint64_t  start_byte_offset,
uint64_t  size 
)
overridevirtual

Called on every key frame. For Video only.

Parameters
stream_idis the value set by NotifyNewStream().
timestampis the timesamp of the key frame in timescale units passed in media_info.
start_byte_offsetis the offset of where the keyframe starts.
sizeis the size in bytes.

Implements shaka::hls::HlsNotifier.

Definition at line 410 of file simple_hls_notifier.cc.

◆ NotifyNewSegment()

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 359 of file simple_hls_notifier.cc.

◆ NotifyNewStream()

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 302 of file simple_hls_notifier.cc.

◆ NotifySampleDuration()

bool shaka::hls::SimpleHlsNotifier::NotifySampleDuration ( uint32_t  stream_id,
uint32_t  sample_duration 
)
overridevirtual

Change the sample duration of stream with stream_id.

Parameters
stream_idis the value set by NotifyNewStream().
sample_durationis the duration of a sample in timescale of the media.
Returns
true on success, false otherwise. This may fail if the stream specified by stream_id does not exist.

Implements shaka::hls::HlsNotifier.

Definition at line 346 of file simple_hls_notifier.cc.


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