[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / utils / BufferObject.h
blob4603d9bd1f239ae4dddf0d58f11763e8fab53820
1 /*
2 * Copyright (C) 2005-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "IBufferObject.h"
13 #include <memory>
14 #include <stdint.h>
16 /**
17 * @brief base class for using the IBufferObject interface. Derived classes
18 * should be based on this class.
21 class CBufferObject : public IBufferObject
23 public:
24 /**
25 * @brief Get a BufferObject from CBufferObjectFactory
27 * @return std::unique_ptr<CBufferObject>
29 static std::unique_ptr<CBufferObject> GetBufferObject(bool needsCreateBySize);
31 virtual bool CreateBufferObject(uint32_t format, uint32_t width, uint32_t height) override = 0;
32 bool CreateBufferObject(uint64_t size) override { return false; }
34 int GetFd() override;
35 uint32_t GetStride() override;
36 uint64_t GetModifier() override;
38 void SyncStart() override;
39 void SyncEnd() override;
41 protected:
42 int m_fd{-1};
43 uint32_t m_stride{0};