Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

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

Game stream handler More...

Classes

class  kodi::addon::CInstanceGame::CStream
 

Functions

bool kodi::addon::CInstanceGame::CStream::Open (const game_stream_properties &properties)
 Create a stream for gameplay data.
 
void kodi::addon::CInstanceGame::CStream::Close ()
 Free the specified stream.
 
bool kodi::addon::CInstanceGame::CStream::GetBuffer (unsigned int width, unsigned int height, game_stream_buffer &buffer)
 Get a buffer for zero-copy stream data.
 
void kodi::addon::CInstanceGame::CStream::AddData (const game_stream_packet &packet)
 Add a data packet to a stream.
 
void kodi::addon::CInstanceGame::CStream::ReleaseBuffer (game_stream_buffer &buffer)
 Free an allocated buffer.
 
bool kodi::addon::CInstanceGame::CStream::IsOpen () const
 To check stream open was OK, e.g. after use of constructor.
 

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

◆ AddData()

void kodi::addon::CInstanceGame::CStream::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

◆ Close()

void kodi::addon::CInstanceGame::CStream::Close ( )
inline

Free the specified stream.

Remarks
Only called from addon itself

◆ GetBuffer()

bool kodi::addon::CInstanceGame::CStream::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

◆ IsOpen()

bool kodi::addon::CInstanceGame::CStream::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

◆ Open()

bool kodi::addon::CInstanceGame::CStream::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

◆ ReleaseBuffer()

void kodi::addon::CInstanceGame::CStream::ReleaseBuffer ( game_stream_buffer & buffer)
inline

Free an allocated buffer.

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