Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
RenderCapture

Kodi's render capture. More...

Classes

class  XBMCAddon::xbmc::RenderCapture
 

Functions

 XBMCAddon::xbmc::RenderCapture::getWidth ()
 

Function: getWidth()


Get width More...

 
 XBMCAddon::xbmc::RenderCapture::getHeight ()
 

Function: getHeight()


Get height More...

 
 XBMCAddon::xbmc::RenderCapture::getAspectRatio ()
 

Function: getAspectRatio()


Get aspect ratio of currently displayed video. More...

 
 XBMCAddon::xbmc::RenderCapture::getImageFormat ()
 

Function: getImageFormat()


Get image format More...

 
 XBMCAddon::xbmc::RenderCapture::getImage (...)
 

Function: getImage([msecs])


Returns captured image as a bytearray. More...

 
 XBMCAddon::xbmc::RenderCapture::capture (...)
 

Function: capture(width, height)


Issue capture request. More...

 
bool XBMCAddon::xbmc::RenderCapture::GetPixels (unsigned int msec)
 

Function: getCaptureState()


More...
 

Detailed Description

Kodi's render capture.

Class: RenderCapture()


Function Documentation

§ capture()

XBMCAddon::xbmc::RenderCapture::capture (   ...)
inline

Function: capture(width, height)


Issue capture request.

Parameters
widthWidth capture image should be rendered to

height Height capture image should should be rendered to

v17 Python API changes:
Removed the option to pass flags

§ getAspectRatio()

XBMCAddon::xbmc::RenderCapture::getAspectRatio ( )

Function: getAspectRatio()


Get aspect ratio of currently displayed video.

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

§ getHeight()

XBMCAddon::xbmc::RenderCapture::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

§ getImage()

XBMCAddon::xbmc::RenderCapture::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

The size of the image is m_width * m_height * 4

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

§ getImageFormat()

XBMCAddon::xbmc::RenderCapture::getImageFormat ( )
inline

Function: getImageFormat()


Get image format

Format of captured image: 'BGRA'

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

§ GetPixels()

bool XBMCAddon::xbmc::RenderCapture::GetPixels ( unsigned int  msec)
inline

Function: getCaptureState()


v17 Python API changes:
Removed function completely.

Function: waitForCaptureStateChangeEvent()


v17 Python API changes:
Removed function completely.

§ getWidth()

XBMCAddon::xbmc::RenderCapture::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