libcamera: MappedFrameBuffer: Add MappedFrameBuffer::getPlaneFD()
Add MappedFrameBuffer::getPlaneFD() which takes a plane index and returns the file descriptor associated with it. This fd will be used to feed into eglCreateImageKHR for both texture creation on upload and directly render-to-texture where the texture buffer comes from the fd given to eglCreateImageKHR. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
This commit is contained in:
parent
1142f89aae
commit
2929cdcc58
2 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,7 @@ public:
|
||||||
using MapFlags = Flags<MapFlag>;
|
using MapFlags = Flags<MapFlag>;
|
||||||
|
|
||||||
MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);
|
MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);
|
||||||
|
int getPlaneFD(int plane);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const FrameBuffer *buffer_;
|
const FrameBuffer *buffer_;
|
||||||
|
|
|
@ -242,4 +242,9 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)
|
||||||
buffer_ = buffer;
|
buffer_ = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MappedFrameBuffer::getPlaneFD(int plane)
|
||||||
|
{
|
||||||
|
return buffer_->planes()[plane].fd.get();
|
||||||
|
}
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue