diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-11-06 11:29:32 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-11-06 17:16:23 +0200 |
commit | 37a76a53ddf8c740b479f773d7d10ad7ca074d83 (patch) | |
tree | ace80d1d6fc9585f04c54b7fdd02051137a0677c /utils | |
parent | 16e9810d6169f766978c55138f99a7a9cd331ade (diff) |
Split dmabuf support from ExtFramebuffer into DmabufFramebuffer
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/kmscapture.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/kmscapture.cpp b/utils/kmscapture.cpp index 01eac61..f215a65 100644 --- a/utils/kmscapture.cpp +++ b/utils/kmscapture.cpp @@ -38,7 +38,7 @@ public: int fd() const { return m_fd; } void start_streaming(); private: - ExtFramebuffer* GetExtFrameBuffer(Card& card, uint32_t i, PixelFormat pixfmt); + DmabufFramebuffer* GetDmabufFrameBuffer(Card& card, uint32_t i, PixelFormat pixfmt); int m_fd; /* camera file descriptor */ Crtc* m_crtc; Plane* m_plane; @@ -68,7 +68,7 @@ static int buffer_export(int v4lfd, enum v4l2_buf_type bt, uint32_t index, int * return 0; } -ExtFramebuffer* CameraPipeline::GetExtFrameBuffer(Card& card, uint32_t i, PixelFormat pixfmt) +DmabufFramebuffer* CameraPipeline::GetDmabufFrameBuffer(Card& card, uint32_t i, PixelFormat pixfmt) { int r, dmafd; @@ -82,7 +82,7 @@ ExtFramebuffer* CameraPipeline::GetExtFrameBuffer(Card& card, uint32_t i, PixelF vector<uint32_t> pitches { m_in_width * (format_info.planes[0].bitspp / 8) }; vector<uint32_t> offsets { 0 }; - return new ExtFramebuffer(card, m_in_width, m_in_height, pixfmt, + return new DmabufFramebuffer(card, m_in_width, m_in_height, pixfmt, fds, pitches, offsets); } @@ -173,7 +173,7 @@ CameraPipeline::CameraPipeline(int cam_fd, Card& card, Crtc *crtc, Plane* plane, Framebuffer *fb; if (m_buffer_provider == BufferProvider::V4L2) - fb = GetExtFrameBuffer(card, i, pixfmt); + fb = GetDmabufFrameBuffer(card, i, pixfmt); else fb = new DumbFramebuffer(card, m_in_width, m_in_height, pixfmt); |