summaryrefslogtreecommitdiffstats
path: root/xbmc/utils/IScreenshotSurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/utils/IScreenshotSurface.h')
-rw-r--r--xbmc/utils/IScreenshotSurface.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/xbmc/utils/IScreenshotSurface.h b/xbmc/utils/IScreenshotSurface.h
new file mode 100644
index 0000000..3414cbc
--- /dev/null
+++ b/xbmc/utils/IScreenshotSurface.h
@@ -0,0 +1,36 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11class IScreenshotSurface
12{
13public:
14 virtual ~IScreenshotSurface() = default;
15 virtual bool Capture() { return false; }
16 virtual void CaptureVideo(bool blendToBuffer) { };
17
18 int GetWidth() const { return m_width; }
19 int GetHeight() const { return m_height; }
20 int GetStride() const { return m_stride; }
21 unsigned char* GetBuffer() const { return m_buffer; }
22 void ReleaseBuffer()
23 {
24 if (m_buffer)
25 {
26 delete m_buffer;
27 m_buffer = nullptr;
28 }
29 };
30
31protected:
32 int m_width{0};
33 int m_height{0};
34 int m_stride{0};
35 unsigned char* m_buffer{nullptr};
36};