Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Various other PVR stream related functions
These apply to all other groups in inputstream and are therefore declared as several.


Various stream parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.

Header parts:

bool CanPauseStream() override;
bool CanSeekStream() override;
void PauseStream(bool paused) override;
bool IsRealTimeStream() override;
PVR_ERROR GetStreamReadChunkSize(int& chunksize) override;
Definition: Stream.h:262
PVR_ERROR
Definition: pvr_general.h:35
virtual PVR_ERROR GetStreamTimes(kodi::addon::PVRStreamTimes &times)
Get stream times.
Definition: PVR.h:2722
virtual bool CanPauseStream()
Check if the backend support pausing the currently playing stream.
Definition: PVR.h:2679
virtual bool IsRealTimeStream()
Check for real-time streaming.
Definition: PVR.h:2712
virtual void PauseStream(bool paused)
Notify the pvr addon that Kodi (un)paused the currently playing stream.
Definition: PVR.h:2703
virtual PVR_ERROR GetStreamReadChunkSize(int &chunksize)
Obtain the chunk size to use when reading streams.
Definition: PVR.h:2739
virtual bool CanSeekStream()
Check if the backend supports seeking for the currently playing stream.
Definition: PVR.h:2693

Source parts:

bool CMyInstance::CanPauseStream()
{
return false;
}
bool CMyInstance::CanSeekStream()
{
return false;
}
void CMyInstance::PauseStream(bool paused)
{
}
bool CMyInstance::IsRealTimeStream()
{
return false;
}
PVR_ERROR CMyInstance::GetStreamTimes(kodi::addon::PVRStreamTimes& times)
{
}
PVR_ERROR CMyInstance::GetStreamReadChunkSize(int& chunksize)
{
}
@ PVR_ERROR_NOT_IMPLEMENTED
-2 : The method that Kodi called is not implemented by the add-on.
Definition: pvr_general.h:43

Modules

 Group header include
 
 Group source include
 

Function Documentation

◆ CanPauseStream()

virtual bool CanPauseStream ( )
inlinevirtual

Check if the backend support pausing the currently playing stream.

This will enable/disable the pause button in Kodi based on the return value.

Returns
false if the PVR addon/backend does not support pausing, true if possible

◆ CanSeekStream()

virtual bool CanSeekStream ( )
inlinevirtual

Check if the backend supports seeking for the currently playing stream.

This will enable/disable the rewind/forward buttons in Kodi based on the return value.

Returns
false if the PVR addon/backend does not support seeking, true if possible

◆ PauseStream()

virtual void PauseStream ( bool  paused)
inlinevirtual

Notify the pvr addon that Kodi (un)paused the currently playing stream.

Parameters
[in]pausedTo inform by true is paused and with false playing

◆ IsRealTimeStream()

virtual bool IsRealTimeStream ( )
inlinevirtual

Check for real-time streaming.

Returns
true if current stream is real-time

◆ GetStreamTimes()

virtual PVR_ERROR GetStreamTimes ( kodi::addon::PVRStreamTimes times)
inlinevirtual

Get stream times.

Parameters
[out]timesA pointer to the data to be filled by the implementation.
Returns
PVR_ERROR_NO_ERROR on success.

◆ GetStreamReadChunkSize()

virtual PVR_ERROR GetStreamReadChunkSize ( int &  chunksize)
inlinevirtual

Obtain the chunk size to use when reading streams.

Parameters
[out]chunksizemust be filled with the chunk size in bytes.
Returns
PVR_ERROR_NO_ERROR if the chunk size has been fetched successfully.
Remarks
Optional, and only used if not reading from demuxer (=> DemuxRead) and PVRCapabilities::SetSupportsRecordings() is true (=> ReadRecordedStream) or PVRCapabilities::SetHandlesInputStream() is true (=> ReadLiveStream).