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

#include <Screenshot.h>

Static Public Member Functions

static void Register (const std::function< std::unique_ptr< IScreenshotSurface >()> &createFunc)
 
static std::unique_ptr< IScreenshotSurfaceCreateSurface ()
 Create the platform's capture readback surface, null when none registered.
 
static void TakeScreenshot ()
 
static void TakeScreenshot (KODI::RENDERING::CAPTURE::CaptureContent content)
 Screenshot of the given content into the configured folder.
 
static void TakeScreenshot (const std::string &filename, KODI::RENDERING::CAPTURE::CaptureContent content=KODI::RENDERING::CAPTURE::CaptureContent::COMPOSITE)
 
static void TakeScreenshotBoth ()
 Capture the video-only image and the full composite from the same rendered frame into two files in the configured folder (screenshotNNNNN.png and screenshotNNNNN-video.png).
 
static bool PumpForCapture (KODI::RENDERING::CAPTURE::CCaptureHandle &handle, std::chrono::milliseconds timeout)
 Block until a one-shot capture is delivered, returning true on success. On the render/process thread the wait pumps real frames (a plain wait there would starve the frame the capture needs); off-thread it waits passively. Returns false as soon as the request fails. Pumping calls the private CGUIWindowManager::ProcessRenderLoop; other waiters (the bookmarks dialog) call this instead of becoming friends.
 

Member Function Documentation

◆ CreateSurface()

std::unique_ptr< IScreenshotSurface > CScreenShot::CreateSurface ( )
static

Create the platform's capture readback surface, null when none registered.

◆ PumpForCapture()

bool CScreenShot::PumpForCapture ( KODI::RENDERING::CAPTURE::CCaptureHandle & handle,
std::chrono::milliseconds timeout )
static

Block until a one-shot capture is delivered, returning true on success. On the render/process thread the wait pumps real frames (a plain wait there would starve the frame the capture needs); off-thread it waits passively. Returns false as soon as the request fails. Pumping calls the private CGUIWindowManager::ProcessRenderLoop; other waiters (the bookmarks dialog) call this instead of becoming friends.

◆ Register()

void CScreenShot::Register ( const std::function< std::unique_ptr< IScreenshotSurface >()> & createFunc)
static

◆ TakeScreenshot() [1/3]

void CScreenShot::TakeScreenshot ( )
static

◆ TakeScreenshot() [2/3]

void CScreenShot::TakeScreenshot ( const std::string & filename,
KODI::RENDERING::CAPTURE::CaptureContent content = KODI::RENDERING::CAPTURE::CaptureContent::COMPOSITE )
static

◆ TakeScreenshot() [3/3]

void CScreenShot::TakeScreenshot ( KODI::RENDERING::CAPTURE::CaptureContent content)
static

Screenshot of the given content into the configured folder.

◆ TakeScreenshotBoth()

void CScreenShot::TakeScreenshotBoth ( )
static

Capture the video-only image and the full composite from the same rendered frame into two files in the configured folder (screenshotNNNNN.png and screenshotNNNNN-video.png).


The documentation for this class was generated from the following files: