Shaka Player Embedded
|
#include <pipeline_manager.h>
Public Member Functions | |
PipelineManager (std::function< void(VideoPlaybackState)> on_status_changed, std::function< void()> on_seek, const util::Clock *clock) | |
virtual | ~PipelineManager () |
virtual void | Reset () |
virtual void | DoneInitializing () |
virtual VideoPlaybackState | GetPlaybackState () const |
virtual double | GetDuration () const |
virtual void | SetDuration (double duration) |
virtual double | GetCurrentTime () const |
virtual void | SetCurrentTime (double time) |
virtual double | GetPlaybackRate () const |
virtual void | SetPlaybackRate (double rate) |
virtual void | Play () |
virtual void | Pause () |
virtual void | Buffering () |
virtual void | CanPlay () |
virtual void | OnEnded () |
virtual void | OnError () |
Tracks the current playhead time and tracks the pipeline status. This handles playback rate, pause/play, and tracking current time. The caller is in charge of tracking the amount of content that is buffered and whether playback is actually possible.
This type is thread safe; however if calls are made to this from multiple threads at once, it is unspecified what order the changes will happen including the order of the calls to |on_status_changed|. The callback is invoked without the lock held, which allows for calls back into this object; but this means that another thread could make a state change before the callback is completed. This also means that the callback can be invoked multiple times concurrently.
Definition at line 42 of file pipeline_manager.h.
shaka::media::PipelineManager::PipelineManager | ( | std::function< void(VideoPlaybackState)> | on_status_changed, |
std::function< void()> | on_seek, | ||
const util::Clock * | clock | ||
) |
Definition at line 26 of file pipeline_manager.cc.
|
virtual |
Definition at line 36 of file pipeline_manager.cc.
|
virtual |
Called when the video stalls due to lack of content.
Definition at line 195 of file pipeline_manager.cc.
|
virtual |
Called when the video has enough content to play forward.
Definition at line 209 of file pipeline_manager.cc.
|
virtual |
Tells the manager that we have gotten all the initialization data.
Definition at line 48 of file pipeline_manager.cc.
|
virtual |
Definition at line 106 of file pipeline_manager.cc.
|
virtual |
Definition at line 69 of file pipeline_manager.cc.
|
virtual |
Definition at line 145 of file pipeline_manager.cc.
|
virtual |
Definition at line 64 of file pipeline_manager.cc.
|
virtual |
Called when the video should end. Note that the current time is always clamped to duration, so this only raises the event.
Definition at line 227 of file pipeline_manager.cc.
|
virtual |
Called when an error occurs and the pipeline should stop forever.
Definition at line 244 of file pipeline_manager.cc.
|
virtual |
Pauses the video.
Definition at line 179 of file pipeline_manager.cc.
|
virtual |
Starts playing the video.
Definition at line 156 of file pipeline_manager.cc.
|
virtual |
Resets the state to the initial state; this doesn't raise events.
Definition at line 38 of file pipeline_manager.cc.
|
virtual |
Seeks to the given video time.
Definition at line 111 of file pipeline_manager.cc.
|
virtual |
Sets the video duration.
Definition at line 74 of file pipeline_manager.cc.
|
virtual |
Sets the current playback rate.
Definition at line 150 of file pipeline_manager.cc.