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 |
Hardware streams are reset once after their handle is installed. Reset may use GetBuffer(); reset failure releases that stream.
- Returns
- True if the stream is ready, false otherwise
◆ 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 |
Hardware packets carry the current frame size, display aspect ratio and rotation. Rotation affects presentation geometry; it does not change the framebuffer contents or the context's bottom-left-origin setting.
◆ ReleaseBuffer()
Free an allocated buffer.
- Parameters
-
| [in] | buffer | The buffer returned from GetStreamBuffer() |
◆ IsOpen()
Check if the stream opened correctly, e.g. after calling the constructor.
- Returns
- True if stream was successfully opened, false otherwise