|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
The browser's Media Source Extensions: each track is muxed into fragmented MP4 and appended to a SourceBuffer of a <video> element. Audio the browser cannot play is converted to FLAC, or to Opus where FLAC does not play. More...
#include <MediaBackendMse.h>
Classes | |
| class | CAudioEncoder |
| Encodes decoded audio as FLAC or Opus. More... | |
| class | CFragmentWriter |
Public Member Functions | |
| CMediaBackendMse () | |
| ~CMediaBackendMse () override | |
| std::string | Name () const override |
| bool | SupportsVideo (const CDVDStreamInfo &hint) override |
| Looks at the codec, profile, bit depth, size and frame rate only. | |
| AudioPath | GetAudioPath (const CDVDStreamInfo &hint) override |
| Looks at the codec, profile, channels and sample rate only. | |
| std::string | Open (const CDVDStreamInfo &video, const CDVDStreamInfo *audio, AudioPath audioPath, double duration) override |
| Creates the media source with its tracks and waits until it takes packets. | |
| void | Close () override |
| std::string | VideoCodecName () const override |
| std::string | AudioCodecName () const override |
| double | MaxAudioAhead () const override |
| How far ahead of the playback position audio can be appended. | |
| bool | PrepareVideo (DemuxPacket &packet, Packet &out) override |
| AppendResult | AppendVideo (const Packet &packet) override |
| AppendResult | AppendAudio (const Packet &packet) override |
| bool | EndVideo () override |
| bool | EndAudio () override |
| void | ConvertAudio (const DVDAudioFrame &frame) override |
| For AudioPath::CONVERTED: takes decoded frames and returns them as packets to append. | |
| void | FinishConvertedAudio () override |
| Turns the frames held back for a bigger packet into one. | |
| bool | PeekConvertedAudio (Packet &out) override |
| void | PopConvertedAudio () override |
| void | Flush () override |
| Drops what the backend holds for the position before a flush. | |
| void | Play () override |
| void | Pause () override |
| void | SetRate (double rate) override |
| bool | HasVolume () const override |
| Whether SetVolume() applies Kodi's volume; otherwise the device's own volume does. | |
| void | SetVolume (float volume) override |
| void | Seek (double seconds) override |
Moves playback to seconds and returns once the tracks take packets for it. | |
| void | SetStartPosition (double seconds) override |
| Where a fresh source reports to be until it plays. | |
| int | Error () const override |
| 0 while playback has no error. | |
| bool | CanPlay () const override |
| bool | Ended () const override |
| double | Position () const override |
Public Member Functions inherited from IMediaBackendWasm | |
| virtual | ~IMediaBackendWasm ()=default |
| virtual bool | IsHardwareVideoDecoder () const |
| Whether the backend confirmed hardware video decoding. | |
| virtual int | Resumes () const |
Additional Inherited Members | |
Public Types inherited from IMediaBackendWasm | |
| enum class | AppendResult { OK , FULL , STALE , NEEDS_KEY_FRAME , FAILED } |
| enum class | AudioPath { NONE , NATIVE , CONVERTED } |
Static Public Member Functions inherited from IMediaBackendWasm | |
| static std::vector< std::unique_ptr< IMediaBackendWasm > > | Create () |
| The backends for this device and settings, the preferred one first. | |
The browser's Media Source Extensions: each track is muxed into fragmented MP4 and appended to a SourceBuffer of a <video> element. Audio the browser cannot play is converted to FLAC, or to Opus where FLAC does not play.
| CMediaBackendMse::CMediaBackendMse | ( | ) |
|
override |
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
inlineoverridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
For AudioPath::CONVERTED: takes decoded frames and returns them as packets to append.
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Ends the track after the data appended so far.
Implements IMediaBackendWasm.
|
overridevirtual |
0 while playback has no error.
Implements IMediaBackendWasm.
|
overridevirtual |
Turns the frames held back for a bigger packet into one.
Implements IMediaBackendWasm.
|
overridevirtual |
Drops what the backend holds for the position before a flush.
Implements IMediaBackendWasm.
|
overridevirtual |
Looks at the codec, profile, channels and sample rate only.
Implements IMediaBackendWasm.
|
inlineoverridevirtual |
Whether SetVolume() applies Kodi's volume; otherwise the device's own volume does.
Implements IMediaBackendWasm.
|
inlineoverridevirtual |
How far ahead of the playback position audio can be appended.
Implements IMediaBackendWasm.
|
inlineoverridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Creates the media source with its tracks and waits until it takes packets.
| audio | nullptr for no audio. |
| duration | infinity when unknown. |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
out stays valid until the next call. Implements IMediaBackendWasm.
|
overridevirtual |
Moves playback to seconds and returns once the tracks take packets for it.
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Where a fresh source reports to be until it plays.
Implements IMediaBackendWasm.
|
overridevirtual |
Implements IMediaBackendWasm.
|
overridevirtual |
Looks at the codec, profile, bit depth, size and frame rate only.
Implements IMediaBackendWasm.
|
inlineoverridevirtual |
Implements IMediaBackendWasm.