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
◆ Open()
Create a stream for gameplay data.
- Parameters
-
[in] | properties | The stream properties |
- Returns
- A stream handle, or
nullptr
on failure
◆ Close()
Free the specified stream.
◆ GetBuffer()
Get a buffer for zero-copy stream data.
- Parameters
-
[in] | width | The framebuffer width, or 0 for no width specified |
[in] | height | The framebuffer height, or 0 for no height specified |
[out] | buffer | The 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().
◆ AddData()
Add a data packet to a stream.
- Parameters
-
[in] | packet | The data packet |
◆ ReleaseBuffer()
Free an allocated buffer.
- Parameters
-
[in] | buffer | The buffer returned from GetStreamBuffer() |
◆ IsOpen()
To check stream open was OK, e.g. after use of constructor.
- Returns
- true if stream was successfully opened