Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CMediaPipelineWebOS Class Referencefinal

WebOS media pipeline for audio/video playback. More...

#include <MediaPipelineWebOS.h>

Inheritance diagram for CMediaPipelineWebOS:
CThread

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, bool includeSecure=false)
 Check if a codec is supported by the pipeline.
 
- Static Public Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
static CThreadGetCurrentThread ()
 

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< boolm_bStop
 

Detailed Description

WebOS media pipeline for audio/video playback.

Constructor & Destructor Documentation

◆ CMediaPipelineWebOS()

CMediaPipelineWebOS::CMediaPipelineWebOS ( CProcessInfo & processInfo,
CRenderManager & renderManager,
CDVDClock & clock,
CDVDMessageQueue & parent,
CDVDOverlayContainer & overlay,
bool hasAudio )
explicit

Construct the WebOS media pipeline.

Parameters
processInfoReference to process information.
renderManagerReference to the render manager.
clockReference to the clock for timing.
parentParent message queue for control messages.
overlayOverlay container for subtitle rendering.
hasAudioTrue if audio stream is present, false otherwise.

◆ ~CMediaPipelineWebOS()

CMediaPipelineWebOS::~CMediaPipelineWebOS ( )
override

Destructor, cleans up and unloads streams.

Member Function Documentation

◆ AcceptsAudioData()

bool CMediaPipelineWebOS::AcceptsAudioData ( ) const

Check if pipeline can accept more audio data.

Returns
True if accepting audio data.

◆ AcceptsVideoData()

bool CMediaPipelineWebOS::AcceptsVideoData ( ) const

Check if pipeline can accept more video data.

Returns
True if accepting video data.

◆ CloseAudioStream()

void CMediaPipelineWebOS::CloseAudioStream ( bool waitForBuffers)

Close the audio stream.

Parameters
waitForBuffersIf true, wait until buffers are processed.

◆ CloseVideoStream()

void CMediaPipelineWebOS::CloseVideoStream ( bool waitForBuffers)

Close the video stream.

Parameters
waitForBuffersIf true, wait until buffers are processed.

◆ EnableSubtitle()

void CMediaPipelineWebOS::EnableSubtitle ( bool enable)

Enable or disable subtitle rendering.

Parameters
enableTrue to enable subtitles.

◆ Flush()

void CMediaPipelineWebOS::Flush ( bool sync)

Flush both audio and video pipelines.

Parameters
syncIf true, flush synchronously.

◆ FlushAudioMessages()

void CMediaPipelineWebOS::FlushAudioMessages ( )

Flush all pending audio messages.

◆ FlushVideoMessages()

void CMediaPipelineWebOS::FlushVideoMessages ( )

Flush all pending video messages.

◆ GetAudioChannels()

int CMediaPipelineWebOS::GetAudioChannels ( ) const
inline

Get number of audio channels configured.

Returns
Channel count.

◆ GetAudioInfo()

std::string CMediaPipelineWebOS::GetAudioInfo ( )
Returns
Audio stream debug info

◆ GetAudioLevel()

int CMediaPipelineWebOS::GetAudioLevel ( ) const

Get current audio buffer level.

Returns
Buffer level percentage.

◆ GetCurrentPts()

double CMediaPipelineWebOS::GetCurrentPts ( ) const

Get current presentation timestamp in seconds.

Returns
Current PTS (seconds).

◆ GetSubtitleDelay()

double CMediaPipelineWebOS::GetSubtitleDelay ( ) const

Get current subtitle display delay.

Returns
Delay in seconds.

◆ GetVideoBitrate()

int CMediaPipelineWebOS::GetVideoBitrate ( ) const
Returns
Video bitrate in bits per second.

◆ GetVideoInfo()

std::string CMediaPipelineWebOS::GetVideoInfo ( )
Returns
Video stream debug info

◆ GetVideoResolution()

void CMediaPipelineWebOS::GetVideoResolution ( unsigned int & width,
unsigned int & height ) const

Get the resolution of the video stream.

Parameters
widthStream width (output parameter)
heightStream height (output parameter)

◆ HasAudioData()

bool CMediaPipelineWebOS::HasAudioData ( ) const

Check if there is buffered audio data.

Returns
True if audio data buffered.

◆ HasVideoData()

bool CMediaPipelineWebOS::HasVideoData ( ) const

Check if there is buffered video data.

Returns
True if video data buffered.

◆ IsAudioInited()

bool CMediaPipelineWebOS::IsAudioInited ( ) const

Check if audio subsystem is initialized.

Returns
True if initialized.

◆ IsStalled()

bool CMediaPipelineWebOS::IsStalled ( ) const

Check if playback is stalled.

Returns
True if stalled.

◆ IsSubtitleEnabled()

bool CMediaPipelineWebOS::IsSubtitleEnabled ( ) const

Check if subtitles are enabled.

Returns
True if enabled.

◆ IsVideoInited()

bool CMediaPipelineWebOS::IsVideoInited ( ) const

Check if video subsystem is initialized.

Returns
True if initialized.

◆ OpenAudioStream()

bool CMediaPipelineWebOS::OpenAudioStream ( CDVDStreamInfo & audioHint)

Open an audio stream using provided hints.

Parameters
audioHintAudio stream information.
Returns
True on success.

◆ OpenVideoStream()

bool CMediaPipelineWebOS::OpenVideoStream ( CDVDStreamInfo hint)

Open a video stream using provided hints.

Parameters
hintVideo stream information.
Returns
True on success.

◆ Process()

void CMediaPipelineWebOS::Process ( void )
overrideprotectedvirtual

Video processing thread loop.

Continuously reads messages and feeds video data to the pipeline.

Reimplemented from CThread.

◆ ProcessAudio()

void CMediaPipelineWebOS::ProcessAudio ( )
protected

Audio processing thread loop.

Continuously reads messages and feeds audio data to the pipeline.

◆ SendAudioMessage()

void CMediaPipelineWebOS::SendAudioMessage ( const std::shared_ptr< CDVDMsg > & msg,
int priority )

Send a message to the audio queue.

Parameters
msgMessage to send.
priorityMessage priority.

◆ SendVideoMessage()

void CMediaPipelineWebOS::SendVideoMessage ( const std::shared_ptr< CDVDMsg > & msg,
int priority )

Send a message to the video queue.

Parameters
msgMessage to send.
priorityMessage priority.

◆ SetSpeed()

void CMediaPipelineWebOS::SetSpeed ( int speed)

Set playback speed.

Parameters
speedPlayback rate (per-mille units).

◆ SetSubtitleDelay()

void CMediaPipelineWebOS::SetSubtitleDelay ( double delay)

Set subtitle display delay.

Parameters
delayDelay in seconds.

◆ Supports()

bool CMediaPipelineWebOS::Supports ( AVCodecID codec,
bool includeSecure = false )
static

Check if a codec is supported by the pipeline.

Parameters
codecAVCodecID to check.
includeSecureIf true, include secure codecs in the check.
Returns
True if supported, false otherwise.

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