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

#include <IScreenshotSurface.h>

Inheritance diagram for IScreenshotSurface:
CScreenshotSurfaceGL CScreenshotSurfaceGLES CScreenshotSurfaceWindows

Public Member Functions

virtual ~IScreenshotSurface ()
 frees the buffer only when the caller did not take ownership via TakeBuffer
 
virtual bool Read (const ScreenshotContext &ctx)
 Read back the current framebuffer only; the caller guarantees a fully rendered frame and render-thread context.
 
int GetWidth () const
 
int GetHeight () const
 
int GetStride () const
 signed linesize; negative when the delivered rows are bottom-up
 
AVPixelFormat GetFormat () const
 source coding of the delivered bytes, handed to the consumer's swscale
 
unsigned char * GetBuffer () const
 
unsigned char * TakeBuffer ()
 Transfer buffer ownership to the caller.
 

Protected Attributes

int m_width {0}
 
int m_height {0}
 
int m_stride {0}
 
AVPixelFormat m_format {AV_PIX_FMT_NONE}
 
unsigned char * m_buffer {nullptr}
 

Constructor & Destructor Documentation

◆ ~IScreenshotSurface()

virtual IScreenshotSurface::~IScreenshotSurface ( )
inlinevirtual

frees the buffer only when the caller did not take ownership via TakeBuffer

Member Function Documentation

◆ GetBuffer()

unsigned char * IScreenshotSurface::GetBuffer ( ) const
inline

◆ GetFormat()

AVPixelFormat IScreenshotSurface::GetFormat ( ) const
inline

source coding of the delivered bytes, handed to the consumer's swscale

◆ GetHeight()

int IScreenshotSurface::GetHeight ( ) const
inline

◆ GetStride()

int IScreenshotSurface::GetStride ( ) const
inline

signed linesize; negative when the delivered rows are bottom-up

◆ GetWidth()

int IScreenshotSurface::GetWidth ( ) const
inline

◆ Read()

virtual bool IScreenshotSurface::Read ( const ScreenshotContext & ctx)
inlinevirtual

Read back the current framebuffer only; the caller guarantees a fully rendered frame and render-thread context.

Reimplemented in CScreenshotSurfaceGL, CScreenshotSurfaceGLES, and CScreenshotSurfaceWindows.

◆ TakeBuffer()

unsigned char * IScreenshotSurface::TakeBuffer ( )
inline

Transfer buffer ownership to the caller.

Member Data Documentation

◆ m_buffer

unsigned char* IScreenshotSurface::m_buffer {nullptr}
protected

◆ m_format

AVPixelFormat IScreenshotSurface::m_format {AV_PIX_FMT_NONE}
protected

◆ m_height

int IScreenshotSurface::m_height {0}
protected

◆ m_stride

int IScreenshotSurface::m_stride {0}
protected

◆ m_width

int IScreenshotSurface::m_width {0}
protected

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