Shaka Packager SDK
|
#include <text_padder.h>
Public Member Functions | |
TextPadder (int64_t zero_start_bias_ms) | |
Public Member Functions inherited from shaka::media::MediaHandler | |
Status | SetHandler (size_t output_stream_index, std::shared_ptr< MediaHandler > handler) |
Connect downstream handler at the specified output stream index. | |
Status | AddHandler (std::shared_ptr< MediaHandler > handler) |
Connect downstream handler to the next available output stream index. | |
Status | Initialize () |
bool | IsConnected () |
Validate if the handler is connected to its upstream handler. | |
Additional Inherited Members | |
Static Public Member Functions inherited from shaka::media::MediaHandler | |
static Status | Chain (const std::vector< std::shared_ptr< MediaHandler >> &list) |
Protected Member Functions inherited from shaka::media::MediaHandler | |
virtual Status | OnFlushRequest (size_t input_stream_index) |
Event handler for flush request at the specific input stream index. | |
virtual bool | ValidateOutputStreamIndex (size_t stream_index) const |
Validate if the stream at the specified index actually exists. | |
Status | Dispatch (std::unique_ptr< StreamData > stream_data) const |
Status | DispatchStreamInfo (size_t stream_index, std::shared_ptr< const StreamInfo > stream_info) const |
Dispatch the stream info to downstream handlers. | |
Status | DispatchMediaSample (size_t stream_index, std::shared_ptr< const MediaSample > media_sample) const |
Dispatch the media sample to downstream handlers. | |
Status | DispatchTextSample (size_t stream_index, std::shared_ptr< const TextSample > text_sample) const |
Dispatch the text sample to downstream handlers. | |
Status | DispatchSegmentInfo (size_t stream_index, std::shared_ptr< const SegmentInfo > segment_info) const |
Dispatch the segment info to downstream handlers. | |
Status | DispatchScte35Event (size_t stream_index, std::shared_ptr< const Scte35Event > scte35_event) const |
Dispatch the scte35 event to downstream handlers. | |
Status | DispatchCueEvent (size_t stream_index, std::shared_ptr< const CueEvent > cue_event) const |
Dispatch the cue event to downstream handlers. | |
Status | FlushDownstream (size_t output_stream_index) |
Flush the downstream connected at the specified output stream index. | |
Status | FlushAllDownstreams () |
Flush all connected downstream handlers. | |
bool | initialized () |
size_t | num_input_streams () const |
size_t | next_output_stream_index () const |
const std::map< size_t, std::pair< std::shared_ptr< MediaHandler >, size_t > > & | output_handlers () |
A media handler that will inject empty text samples to fill any gaps that may appear in the text stream.
Definition at line 17 of file text_padder.h.
|
explicit |
Create a new text padder.
|zero_start_bias_ms| is the threshold used to determine if we should assume that the stream actually starts at time zero. If the first sample comes before the |zero_start_bias_ms|, then the start will be padded as the stream is assumed to start at zero. If the first sample comes after |zero_start_bias_ms| then the start of the stream will not be padded as we cannot assume the start time of the stream.
Definition at line 21 of file text_padder.cc.