PVR stream demuxing
Read TV streams with own demux within addon.
More...
PVR stream demuxing
Read TV streams with own demux within addon.
This is only on Live TV streams and only if PVRCapabilities::SetHandlesDemuxing() has been set to "true".
Stream demuxing parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ AllocateDemuxPacket()
DEMUX_PACKET * kodi::addon::CInstancePVRClient::AllocateDemuxPacket |
( |
int | iDataSize | ) |
|
|
inline |
Callback to Kodi Function
Allocate a demux packet. Free with FreeDemuxPacket().
- Parameters
-
[in] | iDataSize | The size of the data that will go into the packet |
- Returns
- The allocated packet
◆ DemuxAbort()
virtual void kodi::addon::CInstancePVRClient::DemuxAbort |
( |
| ) |
|
|
inlinevirtual |
Abort the demultiplexer thread in the add-on.
◆ DemuxFlush()
virtual void kodi::addon::CInstancePVRClient::DemuxFlush |
( |
| ) |
|
|
inlinevirtual |
Flush all data that's currently in the demultiplexer buffer in the add-on.
◆ DemuxRead()
virtual DEMUX_PACKET * kodi::addon::CInstancePVRClient::DemuxRead |
( |
| ) |
|
|
inlinevirtual |
Read the next packet from the demultiplexer, if there is one.
- Returns
- The next packet. If there is no next packet, then the add-on should return the packet created by calling AllocateDemuxPacket(0) on the callback. If the stream changed and Kodi's player needs to be reinitialised, then, the add-on should call AllocateDemuxPacket(0) on the callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and return the value. The add-on should return
nullptr
if an error occurred.
◆ DemuxReset()
virtual void kodi::addon::CInstancePVRClient::DemuxReset |
( |
| ) |
|
|
inlinevirtual |
Reset the demultiplexer in the add-on.
◆ FillBuffer()
virtual void kodi::addon::CInstancePVRClient::FillBuffer |
( |
bool | mode | ) |
|
|
inlinevirtual |
Notify the pvr addon/demuxer that Kodi wishes to fill demux queue.
- Parameters
-
[in] | mode | The requested filling mode |
◆ FreeDemuxPacket()
Callback to Kodi Function
Free a packet that was allocated with AllocateDemuxPacket().
- Parameters
-
[in] | pPacket | The packet to free |
◆ GetCodecByName()
PVRCodec kodi::addon::CInstancePVRClient::GetCodecByName |
( |
const std::string & | codecName | ) |
const |
|
inline |
Callback to Kodi Function
Get the codec id used by Kodi.
- Parameters
-
[in] | codecName | The name of the codec |
- Returns
- The codec_id, or a codec_id with 0 values when not supported
◆ GetStreamProperties()
Get the stream properties of the stream that's currently being read.
- Parameters
-
[in] | properties | The properties of the currently playing stream. |
- Returns
- PVR_ERROR_NO_ERROR if the properties have been fetched successfully.
◆ SeekTime()
virtual bool kodi::addon::CInstancePVRClient::SeekTime |
( |
double | time, |
|
|
bool | backwards, |
|
|
double & | startpts ) |
|
inlinevirtual |
Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time.
- Parameters
-
[in] | time | The absolute time since stream start |
[in] | backwards | True to seek to keyframe BEFORE time, else AFTER |
[in] | startpts | can be updated to point to where display should start |
- Returns
- True if the seek operation was possible
◆ SetSpeed()
virtual void kodi::addon::CInstancePVRClient::SetSpeed |
( |
int | speed | ) |
|
|
inlinevirtual |
Notify the pvr addon/demuxer that Kodi wishes to change playback speed.
- Parameters
-
[in] | speed | The requested playback speed |
◆ StreamClosed()
virtual PVR_ERROR kodi::addon::CInstancePVRClient::StreamClosed |
( |
| ) |
|
|
inlinevirtual |
The currently playing stream has been closed.
- Returns
- PVR_ERROR_NO_ERROR if the properties have been fetched successfully.