|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
A media player of the browser or the device that CMediaPipelineWasm feeds: it decodes, keeps audio and video in sync and shows the video in a <video> element under the GUI canvas. More...
#include <MediaBackendWasm.h>
Classes | |
| struct | Packet |
Public Types | |
| enum class | AppendResult { OK , FULL , STALE , NEEDS_KEY_FRAME , FAILED } |
| enum class | AudioPath { NONE , NATIVE , CONVERTED } |
Public Member Functions | |
| virtual | ~IMediaBackendWasm ()=default |
| virtual std::string | Name () const =0 |
| virtual bool | SupportsVideo (const CDVDStreamInfo &hint)=0 |
| Looks at the codec, profile, bit depth, size and frame rate only. | |
| virtual AudioPath | GetAudioPath (const CDVDStreamInfo &hint)=0 |
| Looks at the codec, profile, channels and sample rate only. | |
| virtual std::string | Open (const CDVDStreamInfo &video, const CDVDStreamInfo *audio, AudioPath audioPath, double duration)=0 |
| Creates the media source with its tracks and waits until it takes packets. | |
| virtual void | Close ()=0 |
| virtual std::string | VideoCodecName () const =0 |
| virtual std::string | AudioCodecName () const =0 |
| virtual bool | IsHardwareVideoDecoder () const |
| Whether the backend confirmed hardware video decoding. | |
| virtual double | MaxAudioAhead () const =0 |
| How far ahead of the playback position audio can be appended. | |
| virtual bool | PrepareVideo (DemuxPacket &packet, Packet &out)=0 |
| virtual AppendResult | AppendVideo (const Packet &packet)=0 |
| virtual AppendResult | AppendAudio (const Packet &packet)=0 |
| virtual bool | EndVideo ()=0 |
| virtual bool | EndAudio ()=0 |
| virtual void | ConvertAudio (const DVDAudioFrame &frame)=0 |
| For AudioPath::CONVERTED: takes decoded frames and returns them as packets to append. | |
| virtual void | FinishConvertedAudio ()=0 |
| Turns the frames held back for a bigger packet into one. | |
| virtual bool | PeekConvertedAudio (Packet &out)=0 |
| virtual void | PopConvertedAudio ()=0 |
| virtual void | Flush ()=0 |
| Drops what the backend holds for the position before a flush. | |
| virtual void | Play ()=0 |
| virtual void | Pause ()=0 |
| virtual void | SetRate (double rate)=0 |
| virtual bool | HasVolume () const =0 |
| Whether SetVolume() applies Kodi's volume; otherwise the device's own volume does. | |
| virtual void | SetVolume (float volume)=0 |
| virtual void | Seek (double seconds)=0 |
Moves playback to seconds and returns once the tracks take packets for it. | |
| virtual void | SetStartPosition (double seconds)=0 |
| Where a fresh source reports to be until it plays. | |
| virtual int | Error () const =0 |
| 0 while playback has no error. | |
| virtual bool | CanPlay () const =0 |
| virtual bool | Ended () const =0 |
| virtual double | Position () const =0 |
| virtual int | Resumes () const |
Static Public Member Functions | |
| static std::vector< std::unique_ptr< IMediaBackendWasm > > | Create () |
| The backends for this device and settings, the preferred one first. | |
A media player of the browser or the device that CMediaPipelineWasm feeds: it decodes, keeps audio and video in sync and shows the video in a <video> element under the GUI canvas.
Timestamps are in seconds. Every call comes from one of the pipeline's threads.
|
strong |
|
strong |
|
virtualdefault |
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
For AudioPath::CONVERTED: takes decoded frames and returns them as packets to append.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
static |
The backends for this device and settings, the preferred one first.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Ends the track after the data appended so far.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
0 while playback has no error.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Turns the frames held back for a bigger packet into one.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Drops what the backend holds for the position before a flush.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Looks at the codec, profile, channels and sample rate only.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Whether SetVolume() applies Kodi's volume; otherwise the device's own volume does.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
inlinevirtual |
Whether the backend confirmed hardware video decoding.
Reimplemented in CMediaBackendEmss.
|
pure virtual |
How far ahead of the playback position audio can be appended.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Creates the media source with its tracks and waits until it takes packets.
| audio | nullptr for no audio. |
| duration | infinity when unknown. |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
out stays valid until the next call. Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
inlinevirtual |
Times the platform resumed playback on its own, which drops what was appended. The backend takes packets again from Position().
Reimplemented in CMediaBackendEmss.
|
pure virtual |
Moves playback to seconds and returns once the tracks take packets for it.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Where a fresh source reports to be until it plays.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Looks at the codec, profile, bit depth, size and frame rate only.
Implemented in CMediaBackendEmss, and CMediaBackendMse.
|
pure virtual |
Implemented in CMediaBackendEmss, and CMediaBackendMse.