Tomi Valkeinen and Laurent Pinchart
bf3dbaece9
py: Switch to non-blocking eventfd
...
Blocking wait can be easily implemented on top in Python, so rather than
supporting only blocking reads, or supporting both non-blocking and
blocking reads, let's support only non-blocking reads.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:28 +03:00
Tomi Valkeinen and Laurent Pinchart
de7f1aa591
py: Use libcamera's Mutex classes
...
Use libcamera's Mutex and MutexLocker instead of the std versions to get
thread safety annotations.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:26 +03:00
Tomi Valkeinen and Laurent Pinchart
dfa86000a6
py: Set EFD_CLOEXEC on eventfd to avoid fd leaking
...
Set EFD_CLOEXEC on eventfd to avoid fd leaking.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:24 +03:00
Tomi Valkeinen and Laurent Pinchart
f4933ee77f
py: Use UniqueFD
...
Use UniqueFD to automate the eventfd lifetime management.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:21 +03:00
Tomi Valkeinen and Laurent Pinchart
f814b1b6a9
py: Create PyCameraManager
...
Wrap the CameraManager with a PyCameraManager class and move the related
code inside the new class.
This helps understanding the life times of the used-to-be global
variables, gets rid of static handleRequestCompleted function, and
allows us to simplify the binding code as the more complex pieces are
inside the class.
There should be no user visible functional changes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:18 +03:00
Tomi Valkeinen and Laurent Pinchart
418cbde04b
py: meson: Use libcamera_private dependency
...
We define -DLIBCAMERA_BASE_PRIVATE to get access to libcamera private
headers, but the correct way to do this is to have a meson dependency to
libcamera_private.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-19 15:44:09 +03:00
Tomi Valkeinen and Laurent Pinchart
36ea10a564
py: cam.py: Remove todo comment
...
The comment is no longer valid.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-18 22:02:07 +03:00
Tomi Valkeinen and Laurent Pinchart
4bd2d5191c
py: Move ControlValue helpers to py_helpers.cpp
...
Clean up the py_main.cpp a bit by moving the ControlValue helpers to a
separate file.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-18 22:00:46 +03:00
Tomi Valkeinen and Laurent Pinchart
a7f73dd096
py: Add Python logging category
...
Add Python logging category, and use it in handleRequestCompleted().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-18 22:00:43 +03:00
Tomi Valkeinen and Laurent Pinchart
93629989a9
py: cam.py: Fix multi camera capture without -C
...
-C flag is supposed to affect only the camera that was previously
defined in the arguments. That's not the case, and, e.g.:
cam.py -c2 -C -c3
causes camera 3 to start capturing, but it stops after the initial
Requests have been completed.
Fix the issue by filtering out camera contexts that do not have -C
defined.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-08-18 22:00:39 +03:00
Tomi Valkeinen and Laurent Pinchart
b4d4b78c82
py: examples: Add simple-cam.py
...
Add a Python version of simple-cam from:
https://git.libcamera.org/libcamera/simple-cam.git
Let's keep this in the libcamera repository until the Python API has
stabilized a bit more, and then we could move this to the simple-cam
repo.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-08 20:16:25 +03:00
Tomi Valkeinen and Laurent Pinchart
d6cfb08060
py: examples: Add simple-continuous-capture.py
...
Add a slightly more complex, and I think a more realistic, example,
where the script reacts to events and re-queues the buffers.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-08 20:16:21 +03:00
Tomi Valkeinen and Laurent Pinchart
ab21acb9c0
py: examples: Add simple-capture.py
...
Add an example to showcase the more-or-less minimal capture case.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-08 20:16:19 +03:00
Tomi Valkeinen and Laurent Pinchart
7ef83e0228
py: Merge read_event() and get_ready_requests()
...
We always call CameraManager.read_event() and
CameraManager.get_ready_requests(), so to simplify the use merge the
read_event() into the get_ready_requests().
This has the side effect that get_ready_requests() will now block if
there is no event ready. If we ever need to call get_ready_requests() in
a polling manner we will need a new function which behaves differently.
However, afaics the only sensible way to manage the event loop is to use
select/poll on the eventfd and then call get_ready_requests() once,
which is the use case what the current merged function supports.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-04 02:21:05 +03:00
Tomi Valkeinen and Laurent Pinchart
dfcf638a0a
py: cam: cam_qt: mmap the fbs only once
...
Instead of doing an mmap and munmap every time a Request is complete,
mmap all the buffers once at the start of the program.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:09:10 +03:00
Tomi Valkeinen and Laurent Pinchart
958d9187aa
py: MappedFrameBuffer: Add 'fb' property
...
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 >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:09:07 +03:00
Tomi Valkeinen and Laurent Pinchart
43192f4321
py: MappedFrameBuffer: Support non-contextmanager use
...
Implement non-contextmanager use to MappedFrameBuffer so that we can
either:
with MappedFrameBuffer(fb) as mfb:
...
or
mfb = MappedFrameBuffer(fb)
mfb.mmap()
...
mfb.munmap()
While at it, improve the error handling a bit.
Note that the mmap() returns self. In other words, one can do this:
mfb = MappedFrameBuffer(fb).mmap()
...
mfb.munmap()
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:09:06 +03:00
Tomi Valkeinen and Laurent Pinchart
fbd6c4d1c8
py: Implement FrameBufferPlane
...
Implement FrameBufferPlane class and adjust the methods and uses
accordingly.
Note that we don't expose the fd as a SharedFD, but as an int.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:09:02 +03:00
Tomi Valkeinen and Laurent Pinchart
e8317de05c
py: Add FrameMetadataPlane
...
Add FrameMetadataPlane class and adjust the methods and uses
accordingly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:08:58 +03:00
Tomi Valkeinen and Laurent Pinchart
80e0ff355e
py: Add Request.__str__()
...
Add Request.__str__() which maps directly to Request::toString().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:08:56 +03:00
Tomi Valkeinen and Laurent Pinchart
7330474762
py: cam: Drop PIL dependency
...
We can use Qt directly to accomplish the same as we do with PIL.
A minor downside is that loading MJPEG frame with Qt produces a "Corrupt
JPEG data" warning. The resulting picture looks fine, though. So add a
message handler to ignore that warning.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:08:54 +03:00
Tomi Valkeinen and Laurent Pinchart
0971ea7c8b
py: cam: Move conversion funcs to helpers.py
...
Move conversion functions from cam_qt.py to helpers.py to clean up the
code and so that they can be used from other cam renderers.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-06-01 12:08:51 +03:00
Tomi Valkeinen and Laurent Pinchart
e115a69135
py: Use ln --relative to create symlinks
...
We create symlinks from the Python bindings build dir to the source dir
so that 1) the build dir can be used to use the bindings, and 2) to
allow modifications of the source .py files to be used right away
without rebuilding.
The symlinks were recently fixed and changed to use absolute paths.
However, absolute paths ruin one main use case I have: using the
bindings from the build dir via nfs from an ARM device.
So move back to relative paths, but accomplish this with the --relative
parameter for ln, instead of guessing the right relative path as was
done before the above-mentioned fix.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:46 +03:00
Tomi Valkeinen and Laurent Pinchart
a69b73cc58
py: Generate bindings for properties
...
Generate bindings for properties in a very similar way as done for
controls. We do need to distinguish between the two, and thus I added
--properties flag to gen-py-controls.py.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:44 +03:00
Tomi Valkeinen and Laurent Pinchart
7a0a464dd1
py: Rename 'efd' to 'event_fd'
...
Perhaps it's better to have a more descriptive name here. I also
considered just renaming 'efd' to 'fd', but 'event_fd' won.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:41 +03:00
Tomi Valkeinen and Laurent Pinchart
1698442aa8
py: Re-structure the controls API
...
Add ControlInfo class and change the controls related methods to
resemble the C++ API (e.g. no more string based control methods).
We don't implement ControlList or ControlInfoMap but just expose the
same data via standard Python dict.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:38 +03:00
Tomi Valkeinen and Laurent Pinchart
3c82ae3821
py: Re-implement controls geneneration
...
The Python bindings controls generation was not very good. It only
covered the enums and they were in the main namespace.
This adds the controls somewhat similarly to the C++ side. We will have
e.g.:
libcamera.controls.Brightness
libcamera.controls.AeMeteringModeEnum.CentreWeighted
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:34 +03:00
Tomi Valkeinen and Laurent Pinchart
6eb1143e27
py: cam: Convert ctx and state to classes
...
Convert ctx and state dicts to classes. No functional changes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:03:30 +03:00
Tomi Valkeinen and Laurent Pinchart
bb1cbd53d2
py: cam: Drop WA_ShowWithoutActivating
...
Drop WA_ShowWithoutActivating from the Qt renderers. I added the flag
during development phase as I didn't want the window to take the focus,
but it should be removed now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:47 +03:00
Tomi Valkeinen and Laurent Pinchart
19d870d6d8
py: MappedFrameBuffer: Add type hints & docs
...
Add a few type hints and (minimal) docs to MappedFrameBuffer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:44 +03:00
Tomi Valkeinen and Laurent Pinchart
9e4388cca5
py: Move MappedFrameBuffer to libcamera.utils
...
Move MappedFrameBuffer to libcamera.utils, instead of extending
FrameBuffer class with a new mmap() method. This keeps us more aligned
to the C++ API.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:41 +03:00
Tomi Valkeinen and Laurent Pinchart
210ce547a4
py: Add CameraManager.read_event()
...
Add CameraManager.read_event() so that the user does not need to call
os.read().
We use eventfd, and we must always read 8 bytes. Hiding that inside
read_event() makes sense.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:31 +03:00
Tomi Valkeinen and Laurent Pinchart
ccfcf5f235
py: Fix None value in ControlType enum
...
"None" is not a valid name for an enum value, so change it to "Null".
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:29 +03:00
Tomi Valkeinen and Laurent Pinchart
0381b09f89
py: Fix SceneFlicker enum values
...
Stripping 'SceneFlicker' prefix from the enum value names leads to
'50Hz' and '60Hz', which are not valid names. So add another heuristics
to keep the prefix for SceneFlicker.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:27 +03:00
Tomi Valkeinen and Laurent Pinchart
ed0d3a9d71
py: cam: Cleanups
...
No functional changes. Drop unused variables, reduce typechecker
warnings.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:25 +03:00
Tomi Valkeinen and Laurent Pinchart
56f9de149f
py: cam_qt: Use libcamera.formats
...
Use the new libcamera.formats in cam_qt.py.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:22 +03:00
Tomi Valkeinen and Laurent Pinchart
9ecf311375
py: Generate pixel formats list
...
Generate a list of pixel formats under 'libcamera.formats'.
The 'formats' is a "dummy" container class, the only purpose of which is
to contain the read-only pixel format properties.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-27 22:02:16 +03:00
Tomi Valkeinen and Laurent Pinchart
dc03440cb5
py: Clean up control enums generation
...
Try to be more consistent with the names, and include "control" in all
the names.
Also drop a useless "using namespace libcamera" and only include
"control_ids.h".
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:32 +03:00
Tomi Valkeinen and Laurent Pinchart
b2ada6f3ec
py: Rename pyxyz to py_xyz
...
Having the underscore makes the names more readable, especially when
there are multiple words in the name.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:31 +03:00
Tomi Valkeinen and Laurent Pinchart
2bb6c9fbd2
py: Use geometry classes
...
Now that we have proper geometry classes in the Python bindings, change
the existing bindings and the .py files accordingly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:31 +03:00
Tomi Valkeinen and Laurent Pinchart
e0a8517b27
py: Add geometry classes
...
Add libcamera's geometry classes to the Python bindings.
Note that this commit only adds the classes, but they are not used
anywhere yet.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:31 +03:00
Tomi Valkeinen and Laurent Pinchart
fa7bda46f8
py: Implement PixelFormat class
...
Implement PixelFormat bindings properly with a PixelFormat class. Change
the bindings to use the new class instead of a string.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:30 +03:00
Tomi Valkeinen and Laurent Pinchart
11a271b292
py: cam_qt: Cosmetic cleanups
...
Drop irrelevant or wrong comments, merge separate_components() into
demosaic(), and add mfb_to_rgb().
No functional changes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen and Laurent Pinchart
b7c78879cc
py: cam_kms: Fix multistream display
...
Instead of doing an atomic commit for each stream, do a single commit
for the two planes. This fixes the issue that only the first plane was
actually shown.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen and Laurent Pinchart
a4964c5df1
py: cam_kms: Support multiplanar formats
...
Support multiplanar formats in the kms renderer. Tested with RPi and
NV12.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen and Laurent Pinchart
1384cedf50
py: cam.py: Exit on exception
...
Catch exceptions in the event_handler, as they would get ignored
otherwise. Print the exception and return False so that the main loop
exits.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen and Laurent Pinchart
e40fbdf855
py: pymain: Fix indent
...
Fix two minor mis-indents.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:28 +03:00
Tomi Valkeinen and Laurent Pinchart
4de9539f51
py: Add comment about the symlinks
...
Add comment about the symlinks to clarify the purpose.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:28 +03:00
Tomi Valkeinen and Laurent Pinchart
1d72eca347
py: meson: Fix comment about stubs
...
At least pyright seems to be able to use the stubs from the
libcamera-stubs directory, so no need to copy the generated files.
Adjust the comment accordingly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:27 +03:00
Tomi Valkeinen and Laurent Pinchart
ed3a440177
py: meson: Use files() for custom_target input files
...
Use files() for the input files for the custom_target(). I believe the
current code works, but perhaps it is safer to use files() here.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
2022-05-18 17:52:27 +03:00