[libcamera-devel,v3,25/30] py: MappedFrameBuffer: Add 'fb' property
diff mbox series

Message ID 20220527144447.94891-26-tomi.valkeinen@ideasonboard.com
State Accepted
Headers show
Series
  • More misc Python patches
Related show

Commit Message

Tomi Valkeinen May 27, 2022, 2:44 p.m. UTC
Add 'fb' property to expose the underlying FrameBuffer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 src/py/libcamera/utils/MappedFrameBuffer.py | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Laurent Pinchart May 30, 2022, 9:23 a.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Fri, May 27, 2022 at 05:44:42PM +0300, Tomi Valkeinen wrote:
> Add 'fb' property to expose the underlying FrameBuffer.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/py/libcamera/utils/MappedFrameBuffer.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/py/libcamera/utils/MappedFrameBuffer.py b/src/py/libcamera/utils/MappedFrameBuffer.py
> index 4b20f904..c25371c2 100644
> --- a/src/py/libcamera/utils/MappedFrameBuffer.py
> +++ b/src/py/libcamera/utils/MappedFrameBuffer.py
> @@ -99,3 +99,7 @@ class MappedFrameBuffer:
>              raise RuntimeError('MappedFrameBuffer not mmapped')
>  
>          return self.__planes
> +
> +    @property
> +    def fb(self):
> +        return self.__fb

Patch
diff mbox series

diff --git a/src/py/libcamera/utils/MappedFrameBuffer.py b/src/py/libcamera/utils/MappedFrameBuffer.py
index 4b20f904..c25371c2 100644
--- a/src/py/libcamera/utils/MappedFrameBuffer.py
+++ b/src/py/libcamera/utils/MappedFrameBuffer.py
@@ -99,3 +99,7 @@  class MappedFrameBuffer:
             raise RuntimeError('MappedFrameBuffer not mmapped')
 
         return self.__planes
+
+    @property
+    def fb(self):
+        return self.__fb