|
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
WebOS media pipeline for audio/video playback. More...
#include <MediaPipelineWebOS.h>
Public Member Functions | |
| CMediaPipelineWebOS (CProcessInfo &processInfo, CRenderManager &renderManager, CDVDClock &clock, CDVDMessageQueue &parent, CDVDOverlayContainer &overlay, bool hasAudio) | |
| Construct the WebOS media pipeline. | |
| ~CMediaPipelineWebOS () override | |
| Destructor, cleans up and unloads streams. | |
| void | FlushVideoMessages () |
| Flush all pending video messages. | |
| void | FlushAudioMessages () |
| Flush all pending audio messages. | |
| bool | OpenAudioStream (CDVDStreamInfo &audioHint) |
| Open an audio stream using provided hints. | |
| bool | OpenVideoStream (CDVDStreamInfo hint) |
| Open a video stream using provided hints. | |
| void | CloseAudioStream (bool waitForBuffers) |
| Close the audio stream. | |
| void | CloseVideoStream (bool waitForBuffers) |
| Close the video stream. | |
| void | Flush (bool sync) |
| Flush both audio and video pipelines. | |
| bool | AcceptsAudioData () const |
| Check if pipeline can accept more audio data. | |
| bool | AcceptsVideoData () const |
| Check if pipeline can accept more video data. | |
| bool | HasAudioData () const |
| Check if there is buffered audio data. | |
| bool | HasVideoData () const |
| Check if there is buffered video data. | |
| bool | IsAudioInited () const |
| Check if audio subsystem is initialized. | |
| bool | IsVideoInited () const |
| Check if video subsystem is initialized. | |
| int | GetAudioLevel () const |
| Get current audio buffer level. | |
| bool | IsStalled () const |
| Check if playback is stalled. | |
| void | SendAudioMessage (const std::shared_ptr< CDVDMsg > &msg, int priority) |
| Send a message to the audio queue. | |
| void | SendVideoMessage (const std::shared_ptr< CDVDMsg > &msg, int priority) |
| Send a message to the video queue. | |
| void | SetSpeed (int speed) |
| Set playback speed. | |
| double | GetCurrentPts () const |
| Get current presentation timestamp in seconds. | |
| int | GetAudioChannels () const |
| Get number of audio channels configured. | |
| void | EnableSubtitle (bool enable) |
| Enable or disable subtitle rendering. | |
| bool | IsSubtitleEnabled () const |
| Check if subtitles are enabled. | |
| double | GetSubtitleDelay () const |
| Get current subtitle display delay. | |
| void | SetSubtitleDelay (double delay) |
| Set subtitle display delay. | |
| int | GetVideoBitrate () const |
| std::string | GetAudioInfo () |
| std::string | GetVideoInfo () |
| void | GetVideoResolution (unsigned int &width, unsigned int &height) const |
| Get the resolution of the video stream. | |
Public Member Functions inherited from CThread | |
| CThread (IRunnable *pRunnable, const char *ThreadName) | |
| virtual | ~CThread () |
| void | Create (bool bAutoDelete=false) |
| template<typename Rep , typename Period > | |
| void | Sleep (std::chrono::duration< Rep, Period > duration) |
| bool | IsAutoDelete () const |
| virtual void | StopThread (bool bWait=true) |
| bool | IsRunning () const |
| bool | IsCurrentThread () const |
| bool | Join (std::chrono::milliseconds duration) |
| bool | SetPriority (const ThreadPriority &priority) |
| Set the threads priority. This uses the platforms native threading library to do so. | |
| virtual void | OnException () |
Static Public Member Functions | |
| static bool | Supports (AVCodecID codec, int profile) |
| Check if a codec is supported by the pipeline. | |
Static Public Member Functions inherited from CThread | |
| static const std::thread::id | GetCurrentThreadId () |
| static CThread * | GetCurrentThread () |
Protected Member Functions | |
| void | Process () override |
| Video processing thread loop. | |
| void | ProcessAudio () |
| Audio processing thread loop. | |
Protected Member Functions inherited from CThread | |
| CThread (const char *ThreadName) | |
| virtual void | OnStartup () |
| virtual void | OnExit () |
| WaitResponse | AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1)) |
Additional Inherited Members | |
Protected Types inherited from CThread | |
| enum | WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 } |
Protected Attributes inherited from CThread | |
| std::atomic< bool > | m_bStop |
WebOS media pipeline for audio/video playback.
|
explicit |
Construct the WebOS media pipeline.
| processInfo | Reference to process information. |
| renderManager | Reference to the render manager. |
| clock | Reference to the clock for timing. |
| parent | Parent message queue for control messages. |
| overlay | Overlay container for subtitle rendering. |
| hasAudio | True if audio stream is present, false otherwise. |
|
override |
Destructor, cleans up and unloads streams.
| bool CMediaPipelineWebOS::AcceptsAudioData | ( | ) | const |
Check if pipeline can accept more audio data.
| bool CMediaPipelineWebOS::AcceptsVideoData | ( | ) | const |
Check if pipeline can accept more video data.
Close the audio stream.
| waitForBuffers | If true, wait until buffers are processed. |
Close the video stream.
| waitForBuffers | If true, wait until buffers are processed. |
Enable or disable subtitle rendering.
| enable | True to enable subtitles. |
Flush both audio and video pipelines.
| sync | If true, flush synchronously. |
| void CMediaPipelineWebOS::FlushAudioMessages | ( | ) |
Flush all pending audio messages.
| void CMediaPipelineWebOS::FlushVideoMessages | ( | ) |
Flush all pending video messages.
|
inline |
Get number of audio channels configured.
| std::string CMediaPipelineWebOS::GetAudioInfo | ( | ) |
| int CMediaPipelineWebOS::GetAudioLevel | ( | ) | const |
Get current audio buffer level.
| double CMediaPipelineWebOS::GetCurrentPts | ( | ) | const |
Get current presentation timestamp in seconds.
| double CMediaPipelineWebOS::GetSubtitleDelay | ( | ) | const |
Get current subtitle display delay.
| int CMediaPipelineWebOS::GetVideoBitrate | ( | ) | const |
| std::string CMediaPipelineWebOS::GetVideoInfo | ( | ) |
Get the resolution of the video stream.
| width | Stream width (output parameter) |
| height | Stream height (output parameter) |
| bool CMediaPipelineWebOS::HasAudioData | ( | ) | const |
Check if there is buffered audio data.
| bool CMediaPipelineWebOS::HasVideoData | ( | ) | const |
Check if there is buffered video data.
| bool CMediaPipelineWebOS::IsAudioInited | ( | ) | const |
Check if audio subsystem is initialized.
| bool CMediaPipelineWebOS::IsStalled | ( | ) | const |
Check if playback is stalled.
| bool CMediaPipelineWebOS::IsSubtitleEnabled | ( | ) | const |
Check if subtitles are enabled.
| bool CMediaPipelineWebOS::IsVideoInited | ( | ) | const |
Check if video subsystem is initialized.
| bool CMediaPipelineWebOS::OpenAudioStream | ( | CDVDStreamInfo & | audioHint | ) |
Open an audio stream using provided hints.
| audioHint | Audio stream information. |
| bool CMediaPipelineWebOS::OpenVideoStream | ( | CDVDStreamInfo | hint | ) |
Open a video stream using provided hints.
| hint | Video stream information. |
Video processing thread loop.
Continuously reads messages and feeds video data to the pipeline.
Reimplemented from CThread.
|
protected |
Audio processing thread loop.
Continuously reads messages and feeds audio data to the pipeline.
Send a message to the audio queue.
| msg | Message to send. |
| priority | Message priority. |
Send a message to the video queue.
| msg | Message to send. |
| priority | Message priority. |
Set playback speed.
| speed | Playback rate (per-mille units). |
| void CMediaPipelineWebOS::SetSubtitleDelay | ( | double | delay | ) |
Set subtitle display delay.
| delay | Delay in seconds. |
Check if a codec is supported by the pipeline.
| codec | AVCodecID to check. |
| profile | profile to check. |