Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

PVR Recording stream
Stream processing regarding recordings.

Note
Demuxing is not possible with the recordings.

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

Function Documentation

◆ OpenRecordedStream()

virtual bool OpenRecordedStream ( const kodi::addon::PVRRecording & recording,
int64_t & streamId )
inlinevirtual

Open a stream to a recording on the backend.

Parameters
[in]recordingThe recording to open.
[out]streamIdThe id for the opened stream.
Returns
True if the stream has been opened successfully, false otherwise.
Remarks
Optional, and only used if PVRCapabilities::SetSupportsRecordings() is set to true. If PVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false, CloseRecordedStream() will be called by Kodi prior to calling this function.

◆ CloseRecordedStream()

virtual void CloseRecordedStream ( int64_t streamId)
inlinevirtual

Close an open stream from a recording.

Parameters
[in]streamIdThe id of the stream to close, as returned by OpenRecordedStream(). Can be ignored, if PVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false.
Remarks
Optional, and only used if PVRCapabilities::SetSupportsRecordings() is set to true.

◆ ReadRecordedStream()

virtual int ReadRecordedStream ( int64_t streamId,
unsigned char * buffer,
unsigned int size )
inlinevirtual

Read from a recording.

Parameters
[in]streamIdThe id of the stream to read, as returned by OpenRecordedStream(). Can be ignored, if PVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false.
[in]bufferThe buffer to store the data in.
[in]sizeThe amount of bytes to read.
Returns
The amount of bytes that were actually read from the stream.
Remarks
Optional, and only used if PVRCapabilities::SetSupportsRecordings() is set to true.

◆ SeekRecordedStream()

virtual int64_t SeekRecordedStream ( int64_t streamId,
int64_t position,
int whence )
inlinevirtual

Seek in a recorded stream.

Parameters
[in]streamIdThe id of the stream to seek, as returned by OpenRecordedStream(). Can be ignored, if PVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false.
[in]positionThe position to seek to.
[in]whence[optional] offset relative to You can set the value of whence to one of three things:
Value int Description
SEEK_SET 0 position is relative to the beginning of the file. This is probably what you had in mind anyway, and is the most commonly used value for whence.
SEEK_CUR 1 position is relative to the current file pointer position. So, in effect, you can say, "Move to my current position plus 30 bytes," or, "move to my current position minus 20 bytes."
SEEK_END 2 position is relative to the end of the file. Just like SEEK_SET except from the other end of the file. Be sure to use negative values for offset if you want to back up from the end of the file, instead of going past the end into oblivion.
Returns
The new position.
Remarks
Optional, and only used if PVRCapabilities::SetSupportsRecordings() is set to true.

◆ LengthRecordedStream()

virtual int64_t LengthRecordedStream ( int64_t streamId)
inlinevirtual

Obtain the length of a recorded stream.

Parameters
[in]streamIdThe id of the stream to get the length for, as returned by OpenRecordedStream(). Can be ignored, if PVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false.
Returns
The total length of the stream that's currently being read.
Remarks
Optional, and only used if PVRCapabilities::SetSupportsRecordings() is set to true.

◆ IsRecordedStreamRealTime()

virtual PVR_ERROR IsRecordedStreamRealTime ( int64_t streamId,
bool & isRealTime )
inlinevirtual

Check for real-time streaming.

Parameters
[in]streamIdThe id of the stream to check, as returned by OpenRecordedStream().
[out]isRealTimeTrue if is real-time streaming, false otherwise.
Returns
PVR_ERROR_NO_ERROR on success, respective error code otherwise.
Remarks
Optional, and only called if both PVRCapabilities::SetSupportsRecordings() and PVRCapabilities::SetSupportsMultipleRecordedStreams() are set to true. If @refPVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false, IsRealTimeStream() will be called to check real time status for recorded streams.

◆ PauseRecordedStream()

virtual PVR_ERROR PauseRecordedStream ( int64_t streamId,
bool paused )
inlinevirtual

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

Parameters
[in]streamIdThe id of the stream (un)paused, as returned by OpenRecordedStream().
[in]pausedTo inform by true is paused and with false playing
Returns
PVR_ERROR_NO_ERROR on success, respective error code otherwise.
Remarks
Optional, and only called if both PVRCapabilities::SetSupportsRecordings() and PVRCapabilities::SetSupportsMultipleRecordedStreams() are set to true. If @refPVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false, PauseStream() will be called to pause recorded streams.

◆ GetRecordedStreamTimes()

virtual PVR_ERROR GetRecordedStreamTimes ( int64_t streamId,
kodi::addon::PVRStreamTimes & times )
inlinevirtual

Get stream times.

Parameters
[in]streamIdThe id of the stream to get times for, as returned by OpenRecordedStream().
[out]timesData to be filled by the implementation.
Returns
PVR_ERROR_NO_ERROR on success, respective error code otherwise.
Remarks
Optional, and only called if both PVRCapabilities::SetSupportsRecordings() and PVRCapabilities::SetSupportsMultipleRecordedStreams() are set to true. If @refPVRCapabilities::SetSupportsMultipleRecordedStreams() is set to false, GetStreamTimes() will be called to obtain times for recorded streams.