diff options
-rw-r--r-- | kms++/inc/kms++/omap/omapframebuffer.h | 1 | ||||
-rw-r--r-- | kms++/src/omap/omapframebuffer.cpp | 5 | ||||
-rw-r--r-- | py/pykms/pykmsomap.cpp | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/kms++/inc/kms++/omap/omapframebuffer.h b/kms++/inc/kms++/omap/omapframebuffer.h index b39ede6..16d6cf8 100644 --- a/kms++/inc/kms++/omap/omapframebuffer.h +++ b/kms++/inc/kms++/omap/omapframebuffer.h @@ -12,6 +12,7 @@ class OmapCard; class OmapFramebuffer : public MappedFramebuffer { public: + OmapFramebuffer(OmapCard& card, uint32_t width, uint32_t height, const std::string& fourcc); OmapFramebuffer(OmapCard& card, uint32_t width, uint32_t height, PixelFormat format); virtual ~OmapFramebuffer(); diff --git a/kms++/src/omap/omapframebuffer.cpp b/kms++/src/omap/omapframebuffer.cpp index a3a696d..e1e2234 100644 --- a/kms++/src/omap/omapframebuffer.cpp +++ b/kms++/src/omap/omapframebuffer.cpp @@ -22,6 +22,11 @@ using namespace std; namespace kms { +OmapFramebuffer::OmapFramebuffer(OmapCard& card, uint32_t width, uint32_t height, const string& fourcc) + : OmapFramebuffer(card, width, height, FourCCToPixelFormat(fourcc)) +{ +} + OmapFramebuffer::OmapFramebuffer(OmapCard& card, uint32_t width, uint32_t height, PixelFormat format) : MappedFramebuffer(card, width, height), m_omap_card(card), m_format(format) { diff --git a/py/pykms/pykmsomap.cpp b/py/pykms/pykmsomap.cpp index 525834b..a749f76 100644 --- a/py/pykms/pykmsomap.cpp +++ b/py/pykms/pykmsomap.cpp @@ -15,6 +15,8 @@ void init_pykmsomap(py::module &m) ; py::class_<OmapFramebuffer>(m, "OmapFramebuffer", py::base<MappedFramebuffer>()) + .def(py::init<OmapCard&, uint32_t, uint32_t, const string&>(), + py::keep_alive<1, 2>()) // Keep Card alive until this is destructed .def(py::init<OmapCard&, uint32_t, uint32_t, PixelFormat>(), py::keep_alive<1, 2>()) // Keep OmapCard alive until this is destructed ; |