|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
Plays audio and video through a media player of the browser or the device. More...
#include <MediaPipelineWasm.h>
Public Member Functions | |
| CMediaPipelineWasm (std::unique_ptr< IMediaBackendWasm > backend, CProcessInfo &processInfo, CRenderManager &renderManager, CDVDClock &clock, CDVDMessageQueue &parent, CDVDOverlayContainer &overlay, bool hasAudio, std::function< int()> streamLength, std::function< double()> seekTarget) | |
| ~CMediaPipelineWasm () override | |
| IMediaBackendWasm & | Backend () const |
| void | SetHasAudio (bool hasAudio) |
| void | FlushVideoMessages () |
| void | FlushAudioMessages () |
| bool | OpenVideoStream (const CDVDStreamInfo &hint) |
| bool | OpenAudioStream (const CDVDStreamInfo &hint) |
| void | CloseVideoStream () |
| void | CloseAudioStream () |
| void | Flush () |
| bool | AcceptsVideoData () const |
| bool | AcceptsAudioData () const |
| bool | HasVideoData () const |
| bool | HasAudioData () const |
| bool | IsVideoInited () const |
| bool | IsAudioInited () const |
| int | GetAudioLevel () const |
| bool | IsStalled () const |
| The backend buffers on its own. | |
| void | SendVideoMessage (const std::shared_ptr< CDVDMsg > &msg, int priority) |
| void | SendAudioMessage (const std::shared_ptr< CDVDMsg > &msg, int priority) |
| void | SetSpeed (int speed) |
| double | GetCurrentPts () const |
| int | GetAudioChannels () const |
| void | EnableSubtitle (bool enable) |
| bool | IsSubtitleEnabled () const |
| double | GetSubtitleDelay () const |
| void | SetSubtitleDelay (double delay) |
| int | GetVideoBitrate () const |
| std::string | GetVideoInfo () const |
| std::string | GetAudioInfo () const |
| void | GetVideoResolution (unsigned int &width, unsigned int &height) const |
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. | |
| bool | SetTask (const ThreadTask &task) |
| Assign the current thread a task for OS scheduling (platform dependent) | |
| bool | RevertTask () |
| Revert the current thread to normal scheduling (platform dependent) | |
| virtual void | OnException () |
Static Public Member Functions | |
| static bool | SupportsVideo (IMediaBackendWasm &backend, const CDVDStreamInfo &hint) |
Whether backend can play the video stream through a pipeline. | |
Static Public Member Functions inherited from CThread | |
| static const std::thread::id | GetCurrentThreadId () |
| static CThread * | GetCurrentThread () |
Protected Member Functions | |
| void | Process () override |
Protected Member Functions inherited from CThread | |
| CThread (const char *ThreadName) | |
| virtual void | OnStartup () |
| virtual void | OnExit () |
| CEvent & | GetStopEvent () |
| Set by StopThread(), i.e. once the owner may be blocked waiting for this thread. | |
| 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 |
Plays audio and video through a media player of the browser or the device.
The backend decodes both streams, keeps them in sync and shows the video in a <video> element under the GUI. This thread appends video packets and drives playback, m_audioThread appends audio; VideoPlayer's clock and RenderManager follow the backend's position.
| CMediaPipelineWasm::CMediaPipelineWasm | ( | std::unique_ptr< IMediaBackendWasm > | backend, |
| CProcessInfo & | processInfo, | ||
| CRenderManager & | renderManager, | ||
| CDVDClock & | clock, | ||
| CDVDMessageQueue & | parent, | ||
| CDVDOverlayContainer & | overlay, | ||
| bool | hasAudio, | ||
| std::function< int()> | streamLength, | ||
| std::function< double()> | seekTarget ) |
| streamLength | Length of the stream in milliseconds, 0 when unknown. |
| seekTarget | The pts an accurate seek shows first, DVD_NOPTS_VALUE for other seeks. |
|
override |
| bool CMediaPipelineWasm::AcceptsAudioData | ( | ) | const |
| bool CMediaPipelineWasm::AcceptsVideoData | ( | ) | const |
|
inline |
| void CMediaPipelineWasm::CloseAudioStream | ( | ) |
| void CMediaPipelineWasm::CloseVideoStream | ( | ) |
| void CMediaPipelineWasm::Flush | ( | ) |
| void CMediaPipelineWasm::FlushAudioMessages | ( | ) |
| void CMediaPipelineWasm::FlushVideoMessages | ( | ) |
|
inline |
| std::string CMediaPipelineWasm::GetAudioInfo | ( | ) | const |
| int CMediaPipelineWasm::GetAudioLevel | ( | ) | const |
| double CMediaPipelineWasm::GetCurrentPts | ( | ) | const |
|
inline |
| int CMediaPipelineWasm::GetVideoBitrate | ( | ) | const |
| std::string CMediaPipelineWasm::GetVideoInfo | ( | ) | const |
| bool CMediaPipelineWasm::HasAudioData | ( | ) | const |
| bool CMediaPipelineWasm::HasVideoData | ( | ) | const |
| bool CMediaPipelineWasm::IsAudioInited | ( | ) | const |
|
inline |
The backend buffers on its own.
|
inline |
| bool CMediaPipelineWasm::IsVideoInited | ( | ) | const |
| bool CMediaPipelineWasm::OpenAudioStream | ( | const CDVDStreamInfo & | hint | ) |
| bool CMediaPipelineWasm::OpenVideoStream | ( | const CDVDStreamInfo & | hint | ) |
|
inline |
|
static |
Whether backend can play the video stream through a pipeline.