summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kms++/inc/kms++/dmabufframebuffer.h2
-rw-r--r--kms++/src/dmabufframebuffer.cpp5
-rw-r--r--py/pykms/pykmsbase.cpp2
3 files changed, 9 insertions, 0 deletions
diff --git a/kms++/inc/kms++/dmabufframebuffer.h b/kms++/inc/kms++/dmabufframebuffer.h
index 2596d30..328dd2b 100644
--- a/kms++/inc/kms++/dmabufframebuffer.h
+++ b/kms++/inc/kms++/dmabufframebuffer.h
@@ -12,6 +12,8 @@ namespace kms
class DmabufFramebuffer : public Framebuffer
{
public:
+ DmabufFramebuffer(Card& card, uint32_t width, uint32_t height, const std::string& format,
+ std::vector<int> fds, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets, std::vector<uint64_t> modifiers = {});
DmabufFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format,
std::vector<int> fds, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets, std::vector<uint64_t> modifiers = {});
~DmabufFramebuffer() override;
diff --git a/kms++/src/dmabufframebuffer.cpp b/kms++/src/dmabufframebuffer.cpp
index 1e8c914..991d96c 100644
--- a/kms++/src/dmabufframebuffer.cpp
+++ b/kms++/src/dmabufframebuffer.cpp
@@ -15,6 +15,11 @@ using namespace std;
namespace kms
{
+DmabufFramebuffer::DmabufFramebuffer(Card& card, uint32_t width, uint32_t height, const string& format,
+ vector<int> fds, vector<uint32_t> pitches, vector<uint32_t> offsets, vector<uint64_t> modifiers)
+ : DmabufFramebuffer(card, width, height, FourCCToPixelFormat(format), fds, pitches, offsets, modifiers)
+{
+}
DmabufFramebuffer::DmabufFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format,
vector<int> fds, vector<uint32_t> pitches, vector<uint32_t> offsets, vector<uint64_t> modifiers)
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index a55cf3a..6ed82a0 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -171,6 +171,8 @@ void init_pykmsbase(py::module &m)
;
py::class_<DmabufFramebuffer, Framebuffer>(m, "DmabufFramebuffer")
+ .def(py::init<Card&, uint32_t, uint32_t, const string&, vector<int>, vector<uint32_t>, vector<uint32_t>>(),
+ py::keep_alive<1, 2>()) // Keep Card alive until this is destructed
.def(py::init<Card&, uint32_t, uint32_t, PixelFormat, vector<int>, vector<uint32_t>, vector<uint32_t>>(),
py::keep_alive<1, 2>()) // Keep Card alive until this is destructed
;