Shaka Packager SDK
Public Member Functions | List of all members
shaka::hls::HlsNotifier Class Referenceabstract
Inheritance diagram for shaka::hls::HlsNotifier:
shaka::hls::SimpleHlsNotifier

Public Member Functions

 HlsNotifier (const HlsParams &hls_params)
 
virtual bool Init ()=0
 
virtual 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)=0
 
virtual 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)=0
 
virtual bool NotifyKeyFrame (uint32_t stream_id, uint64_t timestamp, uint64_t start_byte_offset, uint64_t size)=0
 
virtual bool NotifyCueEvent (uint32_t stream_id, uint64_t timestamp)=0
 
virtual 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)=0
 
virtual bool Flush ()=0
 
const HlsParamshls_params () const
 

Detailed Description

Definition at line 20 of file hls_notifier.h.

Member Function Documentation

◆ Flush()

virtual bool shaka::hls::HlsNotifier::Flush ( )
pure virtual

Process any current buffered states/resources.

Returns
true on success, false otherwise.

Implemented in shaka::hls::SimpleHlsNotifier.

◆ hls_params()

const HlsParams& shaka::hls::HlsNotifier::hls_params ( ) const
inline
Returns
The HLS parameters.

Definition at line 95 of file hls_notifier.h.

◆ Init()

virtual bool shaka::hls::HlsNotifier::Init ( )
pure virtual

Intialize the notifier.

Returns
true on sucess, false otherwise.

Implemented in shaka::hls::SimpleHlsNotifier.

◆ NotifyCueEvent()

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

Implemented in shaka::hls::SimpleHlsNotifier.

◆ NotifyEncryptionUpdate()

virtual bool shaka::hls::HlsNotifier::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 
)
pure virtual
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.

Implemented in shaka::hls::SimpleHlsNotifier.

◆ NotifyKeyFrame()

virtual bool shaka::hls::HlsNotifier::NotifyKeyFrame ( uint32_t  stream_id,
uint64_t  timestamp,
uint64_t  start_byte_offset,
uint64_t  size 
)
pure virtual

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.

Implemented in shaka::hls::SimpleHlsNotifier.

◆ NotifyNewSegment()

virtual bool shaka::hls::HlsNotifier::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 
)
pure virtual
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.

Implemented in shaka::hls::SimpleHlsNotifier.

◆ NotifyNewStream()

virtual bool shaka::hls::HlsNotifier::NotifyNewStream ( const MediaInfo &  media_info,
const std::string &  playlist_name,
const std::string &  stream_name,
const std::string &  group_id,
uint32_t *  stream_id 
)
pure virtual
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.

Implemented in shaka::hls::SimpleHlsNotifier.


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