diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 18:07:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 18:07:22 +0000 |
commit | c04dcc2e7d834218ef2d4194331e383402495ae1 (patch) | |
tree | 7333e38d10d75386e60f336b80c2443c1166031d /xbmc/utils/IScreenshotSurface.h | |
parent | Initial commit. (diff) | |
download | kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip |
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/utils/IScreenshotSurface.h')
-rw-r--r-- | xbmc/utils/IScreenshotSurface.h | 36 |
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..ba3fa6a --- /dev/null +++ b/xbmc/utils/IScreenshotSurface.h @@ -0,0 +1,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}; +}; |