DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Friends | List of all members
shaka::media::TrickPlayHandler Class Reference

#include <trick_play_handler.h>

Inheritance diagram for shaka::media::TrickPlayHandler:
shaka::media::MediaHandler

Public Member Functions

void SetHandlerForMainStream (std::shared_ptr< MediaHandler > handler)
 
void SetHandlerForTrickPlay (uint32_t trick_play_rate, std::shared_ptr< MediaHandler > handler)
 
- 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 availble output stream index.
 
Status Initialize ()
 
bool IsConnected ()
 Validate if the handler is connected to its upstream handler.
 

Protected Member Functions

MediaHandler implementation overrides.
Status InitializeInternal () override
 
Status Process (std::unique_ptr< StreamData > stream_data) override
 
bool ValidateOutputStreamIndex (size_t stream_index) const override
 Validate if the stream at the specified index actually exists.
 
Status OnFlushRequest (size_t input_stream_index) override
 Event handler for flush request at the specific input stream index.
 
- Protected Member Functions inherited from shaka::media::MediaHandler
Status Dispatch (std::unique_ptr< StreamData > stream_data)
 
Status DispatchPeriodInfo (size_t stream_index, std::shared_ptr< PeriodInfo > period_info)
 Dispatch the period info to downstream handlers.
 
Status DispatchStreamInfo (size_t stream_index, std::shared_ptr< StreamInfo > stream_info)
 Dispatch the stream info to downstream handlers.
 
Status DispatchMediaSample (size_t stream_index, std::shared_ptr< MediaSample > media_sample)
 Dispatch the media sample to downstream handlers.
 
Status DispatchMediaEvent (size_t stream_index, std::shared_ptr< MediaEvent > media_event)
 Dispatch the media event to downstream handlers.
 
Status DispatchSegmentInfo (size_t stream_index, std::shared_ptr< SegmentInfo > segment_info)
 Dispatch the segment info 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 downstreams.
 
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 ()
 

Friends

class TrickPlayHandlerTest
 

Detailed Description

TrickPlayHandler is a single-input-multiple-output media handler. It creates trick play streams from the input.

Definition at line 23 of file trick_play_handler.h.

Member Function Documentation

Status shaka::media::TrickPlayHandler::InitializeInternal ( )
overrideprotectedvirtual

Internal implementation of initialize. Note that it should only initialize the MediaHandler itself. Downstream handlers are handled in Initialize().

Implements shaka::media::MediaHandler.

Definition at line 36 of file trick_play_handler.cc.

Status shaka::media::TrickPlayHandler::Process ( std::unique_ptr< StreamData stream_data)
overrideprotectedvirtual

Process the incoming stream data. Note that (1) stream_data.stream_index should be the input stream index; (2) The implementation needs to call DispatchXxx to dispatch the processed stream data to the downstream handlers after finishing processing if needed.

Implements shaka::media::MediaHandler.

Definition at line 52 of file trick_play_handler.cc.


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