blob: ba3fa6a69074c236db4f4dd1b10ad9b920aa7180 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
class IScreenshotSurface
{
public:
virtual ~IScreenshotSurface() = default;
virtual bool Capture() { return false; }
virtual void CaptureVideo(bool blendToBuffer) {}
int GetWidth() const { return m_width; }
int GetHeight() const { return m_height; }
int GetStride() const { return m_stride; }
unsigned char* GetBuffer() const { return m_buffer; }
void ReleaseBuffer()
{
if (m_buffer)
{
delete m_buffer;
m_buffer = nullptr;
}
};
protected:
int m_width{0};
int m_height{0};
int m_stride{0};
unsigned char* m_buffer{nullptr};
};
|