Kodi Development  20.0
for Binary and Script based Add-Ons
RenderCapture

Detailed Description

Kodi's render capture.

Class: RenderCapture()


Function Documentation

◆ getWidth()

getWidth ( )

Function: getWidth()


Get width

To get width of captured image as set during RenderCapture.capture(). Returns 0 prior to calling capture.

Returns
Width or 0 prior to calling capture

◆ getHeight()

getHeight ( )

Function: getHeight()


Get height

To get height of captured image as set during RenderCapture.capture(). Returns 0 prior to calling capture.

Returns
height or 0 prior to calling capture

◆ getAspectRatio()

getAspectRatio ( )

Function: getAspectRatio()


Get aspect ratio of currently displayed video.

Returns
Aspect ratio
Warning
This may be called prior to calling RenderCapture.capture().

◆ getImageFormat()

getImageFormat ( )
inline

Function: getImageFormat()


Get image format

Returns
Format of captured image: 'BGRA'

v17 Python API changes:
Image will now always be returned in BGRA

◆ getImage()

getImage (   ...)
inline

Function: getImage([msecs])


Returns captured image as a bytearray.

Parameters
msecs[opt] Milliseconds to wait. Waits 1000ms if not specified
Returns
Captured image as a bytearray
Note
The size of the image is m_width * m_height * 4

v17 Python API changes:
Added the option to specify wait time in msec.

◆ capture()

capture (   ...)
inline

Function: capture(width, height)


Issue capture request.

Parameters
widthWidth capture image should be rendered to
heightHeight capture image should should be rendered to

v17 Python API changes:
Removed the option to pass flags