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

Detailed Description

Class: kodi::addon::CInstanceGame::CStream

Game stream handler

This class will be integrated into the addon, which can then open it if necessary for the processing of an audio or video stream.

Note
Callback to Kodi class

Function Documentation

◆ Open()

bool Open ( const game_stream_properties & properties)
inline

Create a stream for gameplay data.

Parameters
[in]propertiesThe stream properties
Returns
A stream handle, or nullptr on failure
Remarks
Only called from addon itself

◆ Close()

void Close ( )
inline

Free the specified stream.

Remarks
Only called from addon itself

◆ GetBuffer()

bool GetBuffer ( unsigned int width,
unsigned int height,
game_stream_buffer & buffer )
inline

Get a buffer for zero-copy stream data.

Parameters
[in]widthThe framebuffer width, or 0 for no width specified
[in]heightThe framebuffer height, or 0 for no height specified
[out]bufferThe buffer, or unmodified if false is returned
Returns
True if buffer was set, false otherwise
Note
If this returns true, buffer must be freed using ReleaseBuffer().
Remarks
Only called from addon itself

◆ AddData()

void AddData ( const game_stream_packet & packet)
inline

Add a data packet to a stream.

Parameters
[in]packetThe data packet
Remarks
Only called from addon itself

◆ ReleaseBuffer()

void ReleaseBuffer ( game_stream_buffer & buffer)
inline

Free an allocated buffer.

Parameters
[in]bufferThe buffer returned from GetStreamBuffer()
Remarks
Only called from addon itself

◆ IsOpen()

bool IsOpen ( ) const
inline

To check stream open was OK, e.g. after use of constructor.

Returns
true if stream was successfully opened
Remarks
Only called from addon itself