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

Kodi's render capture. More...

Classes

class  XBMCAddon::xbmc::RenderCapture
 

Functions

 XBMCAddon::xbmc::RenderCapture::RenderCapture ()
 
 XBMCAddon::xbmc::RenderCapture::~RenderCapture () override
 
 XBMCAddon::xbmc::RenderCapture::getWidth ()
 

Function: getWidth()


Get width
 
 XBMCAddon::xbmc::RenderCapture::getHeight ()
 

Function: getHeight()


Get height
 
 XBMCAddon::xbmc::RenderCapture::getAspectRatio ()
 

Function: getAspectRatio()


Get aspect ratio of currently displayed video.
 
 XBMCAddon::xbmc::RenderCapture::getImageFormat ()
 

Function: getImageFormat()


Get image format
 
 XBMCAddon::xbmc::RenderCapture::getImage (...)
 

Function: getImage([msecs])


Returns captured image as a bytearray.
 
 XBMCAddon::xbmc::RenderCapture::capture (...)
 

Function: capture(width, height)


Issue capture request.
 
bool XBMCAddon::xbmc::RenderCapture::GetPixels (unsigned int msec)
 

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
heightHeight 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
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.

◆ getImageFormat()

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

◆ GetPixels()

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

◆ 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

◆ RenderCapture()

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

◆ ~RenderCapture()

XBMCAddon::xbmc::RenderCapture::~RenderCapture ( )
inlineoverride