summaryrefslogtreecommitdiff
path: root/src/libcamera
AgeCommit message (Collapse)Author
2021-08-03libcamera: camera: Move Camera::Private to header fileLaurent Pinchart
The Camera::Private class is defined in camera.cpp. To prepare for allowing it to be subclassed by pipeline handlers, move it to a new internal/camera.h header. The \file comment block in camera.cpp now needs to explicitly tell which camera.h file it refers to. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: frame_buffer: Document the FrameBuffer::Private classLaurent Pinchart
The FrameBuffer::Private class is exposed to pipeline handlers, and is thus part of the internal libcamera API. As such, it should be documented. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: base: class: Don't pass Extensible pointer to Private constructorLaurent Pinchart
The Extensible and Extensible::Private classes contain pointers to each other. These pointers are initialized in the respective class's constructor, by passing a pointer to the other class to each constructor. This particular construct reduces the flexibility of the Extensible pattern, as the Private class instance has to be allocated and constructed in the members initializer list of the Extensible class's constructor. It is thus impossible to perform any operation on the Private class between its construction and the construction of the Extensible class, or to subclass the Private class without subclassing the Extensible class. To make the design pattern more flexible, don't pass the pointer to the Extensible class to the Private class's constructor, but initialize the pointer manually in the Extensible class's constructor. This requires a const_cast as the o_ member of the Private class is const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: base: class: Link LIBCAMERA_O_PTR to Extensible documentationLaurent Pinchart
The LIBCAMERA_O_PTR macro is part of the Extensible class infrastructure, but doesn't link to it. This makes the generated documentation unclear. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: base: class: Document Extensible::_d() functionsLaurent Pinchart
The Extensible::_d() functions are meant to be called by users of the class. Document them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: file: Turn MapFlag and OpenModeFlag into enum classLaurent Pinchart
Add type safety by turning the MapFlag and OpenModeFlag enum into enum class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: file: Use Flags<> class for open flagsLaurent Pinchart
Use the newly introduced Flags<> class to store a bitfield of File::OpenMode in a type-safe way. The existing File::OpenMode enum is renamed to File::OpenModeFlag to free the File::OpenMode for the Flags<> type alias. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: file: Use Flags<> class for map flagsLaurent Pinchart
Use the newly introduced Flags<> class to store a bitfield of File::MapFlag in a type-safe way. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-03libcamera: flags: Add type-safe enum-based flagsLaurent Pinchart
Add a Flags template class that provide type-safe bitwise operators on enum values. This allows using enum types for bit fields, without giving away type-safety as usually done when storing combined flags in integer variables. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-02android, controls: Add and plumb MaxLatency controlPaul Elder
Add a MaxLatency control, and plumb it into the HAL accordingly. Bug: https://bugs.libcamera.org/show_bug.cgi?id=50 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-08-02controls: Add boolean constructors for ControlInfoPaul Elder
It would be convenient to be able to iterate over available boolean values, for example for controls that designate if some function can be enabled/disabled. The current min/max/def constructor is insufficient, as .values() is empty, so the values cannot be easily iterated over, and creating a Span of booleans does not work for the values constructor. Add new constructors to ControlInfo that takes a set of booleans (if both booleans are valid values) plus a default, and another that takes only one boolean (if only one boolean is a valid value). Update the ControlInfo test accordingly. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-07-28pipeline: raspberrypi: Fix a bug when clearing out Request buffers on stopNaushir Patuck
When RPiCameraData::clearIncompleteRequests() clears out the request queue during a stop condition, it unconditionally calls completeBuffer() on all buffers in each request. This is wrong, as a buffer could have already been completed as part of the current request, but the request itself may not yet have completed. Fix this by checking if the buffers in the request have been completed before cancelling them. Fixes: d372aaa10ddb ("pipeline: raspberrypi: Simplify RPiCameraData::clearIncompleteRequests()") Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-07-26libcamera: CameraSensorProperties: Sort entriesLaurent Pinchart
Keep entries sorted by sensor name to ensure the file stays readable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-07-25libcamera: Add OV8865 sensor propertiesDaniel Scally
Add camera sensor properties for the OV8865 sensor. This is the world facing camera on most MS Surface platforms. Signed-off-by: Daniel Scally <djrscally@gmail.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-07-19libcamera: v4l2_videodevice: Avoid extra construction of FramebufferUmang Jain
While populating the V4L2BufferCache, avoid the extra construction of FrameBuffer, which is currently done by passing the vector of FrameBuffer::Planes. It is not wrong per se, but futile to have another construction of FrameBuffer from a copy of buffer->planes() for the corresponding Entry. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-07-19libcamera: ipa_manager: Allow forcing IPA module isolationLaurent Pinchart
For test purpose it's useful to run open-source IPA modules in isolation. This can already be done by deleting the corresponding signature file, but that method can be inconvenient. Add a way to force IPA module isolation through a new LIBCAMERA_IPA_FORCE_ISOLATION environment variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-07-19libcamera: ipa_manager: Split common code out of createIPA()Laurent Pinchart
The createIPA() template function starts with code that doesn't depend on the template parameters. Split it to a non-template function to avoid code duplication in the binary. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-07-16libcamera: controls: Fix minor error in documentationJacopo Mondi
Fix a small spelling mistake in the ControlInfoMap documentation. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-07-16libcamera: Add pixel format BGRX8888Vedant Paranjape
This patch adds pixel format BGRX8888 to libcamera. Additionally adds mapping of V4L2 pixel format (V4L2_PIX_FMT_XRGB32) to BGRX8888. Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-07-16libcamera: Fix the V4L2 pixel format for formats::XBGR8888Vedant Paranjape
This patch fixes V4L2 pixel format for formats::XBGR8888 by updating the existing matching to V4L2_PIX_FMT_RGBX32 Fixes: 4fd6bb33 ("libcamera: Add support for XRGB8888 and XBGR8888") Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-07-12libcamera: raspberrypi: Allow the tuning file to be set by an environment ↵David Plowman
variable The configuration (camera tuning) file used by the Raspberry Pi comes by default from the sensor name. However, we now allow this to be overridden by the LIBCAMERA_RPI_TUNING_FILE environment variable. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net> Reviewed-by: Naushir Patuck <naush@raspberrypi.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>
2021-07-12libcamera: framebuffer: Make FrameBuffer class ExtensibleLaurent Pinchart
Implement the D-Pointer design pattern in the FrameBuffer class to allow changing internal data without affecting the public ABI. Move the request_ field and the setRequest() function to the FrameBuffer::Private class. This allows hiding the setRequest() function from the public API, removing one todo item. More fields may be moved later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-07-12libcamera: Drop the LIBCAMERA_D_PTR macro in favour of the _d() functionLaurent Pinchart
Now that all Extensible classes expose a _d() function that performs appropriate casts, the LIBCAMERA_D_PTR brings no real additional value. Replace it with direct calls to the _d() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-07-12pipeline: raspberrypi: Use priority write for vblank when writing sensor ctrlsNaushir Patuck
When directly writing controls to the sensor device, ensure that VBLANK is written ahead of and before the EXPOSURE control. This is the same priority write mechanism used in DelayedControls. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@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>
2021-07-11libcamera: buffer: Rename buffer.h to framebuffer.hLaurent Pinchart
libcamera names header files based on the classes they define. The buffer.h file is an exception. Rename it to framebuffer.h. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-07-11base: thread: Fix recursive calls to dispatchMessages()Laurent Pinchart
There are use cases for calling the dispatchMessages() function recursively, from within a message handler. This can be used, for instance, to force delivery of messages posted to a thread concurrently to stopping the thread. This currently causes access, in the outer dispatchMessages() call, to iterators that have been invalidated by erasing list elements in the recursive call, leading to undefined behaviour (most likely double-free or other crashes). Fix it by only erasing messages from the list at the end of the outer call, identified using a recursion counter. Bug: https://bugs.libcamera.org/show_bug.cgi?id=26 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-07-11base: thread: Document the postMessage() function as thread-safeLaurent Pinchart
The Thread::postMessage() function is thread-safe, document it as such. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-07-06libcamera: transform: Document Transform enumerators as suchLaurent Pinchart
Due to a bug in Doxygen that didn't properly handle enum class enumerators when defined in a namespace, the Transform enumerators were documented with free-formed text. The issue has been fixed in Doxygen commit 309b397be106 ("issue #8281: Out-of-line documentation of scoped enums in the same namespace"). We can now fix the documentation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2021-07-06libcamera: media_device: Rename valid() function to isValid()Laurent Pinchart
We use isValid() instead of valid() through the code base, make MediaDevice consistent. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2021-07-06libcamera: camera: Make stop() idempotentNícolas F. R. A. Prado
Make Camera::stop() idempotent so that it can be called in any state and consecutive times. When called in any state other than CameraRunning, it is a no-op. This simplifies the cleanup path for applications. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2021-06-30libcamera: pipeline_handler: Hide implementation detail comment from doxygenJean-Michel Hautbois
The comment is a implementation detail and does not belong to API documentation. Move it inside the function. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-29libcamera: pipeline: simple: converter: Improve error messageLaurent Pinchart
When the configuration of the converter fails due to format mismatch, the error messages only indicates that a failure occurred. Improve it to ease debugging by printing the requested and obtained formats. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-06-29libcamera: pipeline: simple: Log pipeline topologyLaurent Pinchart
Log the topology for each valid discovered pipeline to aid debugging. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-06-28libcamera: Add support for monochrome sensorsDavid Plowman
This commit adds support for monochrome (greyscale) raw sensors. These are sensors that have no colour filter array, so all pixels are the same and there are no distinct colour channels. These sensors still require many of an ISP's processing stages, such as denoise, tone mapping, but not those that involve colours (such as demosaic, or colour matrices). Signed-off-by: David Plowman <david.plowman@raspberrypi.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>
2021-06-28libcamera: device_enumerator: Fix include order for internal headersLaurent Pinchart
The device_enumerator_sysfs.h and device_enumerator_udev.h internal headers are not at the correct location. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2021-06-26libcamera: CameraSensorProperties: Add test pattern mode of IMX258Hirokazu Honda
Add supported test pattern modes of IMX258 in CameraSensorProperties. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-06-25libcamera: rename public libcamera dependencyKieran Bingham
Now that we have a libcamera_private, make the public only dependency libcamera_public so that it is clear which interface is being linked. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera: Move generated headers to private depKieran Bingham
The libcamera_generated_ipa_headers are only a dependency to internal components, and should not form part of the public API. Now that we have a private dependency, move the generated headers there. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Validate internal headers as privateKieran Bingham
Headers which must not be exposed as part of the public libcamera API should include base/private.h. Any interface which includes the private.h header will only be able to build if the libcamera_private dependency is used (or the libcamera_base_private dependency directly). Build targets which are intended to use the private API's will use the libcamera_private to handle the automatic definition of the inclusion guard. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move span to base libraryKieran Bingham
Move span, and adjust the Doxygen exclusion as well. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move event_notifier to baseKieran Bingham
Move the event notifier, and associated header updates. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move File to base libraryKieran Bingham
The File abstraction is a base helper and not part of the libcamera API. Move it to to allow usage by users of the base library. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move extended base functionalityKieran Bingham
Move the functionality for the following components to the new base support library: - BoundMethod - EventDispatcher - EventDispatcherPoll - Log - Message - Object - Signal - Semaphore - Thread - Timer While it would be preferable to see these split to move one component per commit, these components are all interdependent upon each other, which leaves us with one big change performing the move for all of them. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move class helpers to the base libraryKieran Bingham
Move the class support infrastructure to the base library. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Move utils to the base libraryKieran Bingham
Move the utils functionality to the libcamera/base library. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera/base: Introduce new base libraryKieran Bingham
The libcamera-base.so will feature internal support functionality that is utilised by libcamera, and can be shared in other places. This new library provides a layer beneath libcamera which provides common abstractions to internal objects. A pkg-config file is generated and named libcamera-base.pc which allows components such as external IPA modules to link directly to this library if they need. Normal applications will reference this library through the Requires: statement provided by the libcamera.pc package configuration, and linkage will be handled automatically through the pkg-config mechanisms. No code is moved to this library yet, this patch only introduces the framework, construction and linkage. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera: Separate source and build path helpersKieran Bingham
The libcameraSourcePath and libcameraBuildPath helper functions are internal and specific to libcamera needs while operating with the meson build system. In preparation for the upcoming move of utils to a common library, move these helpers out of utils and into their own build unit. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda<hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera: Rename libcamera pkg-config generationKieran Bingham
The libcamera library is moved to the first positional argument of the pkg-config generator to automatically populate the name and filebase values for the package. As part of this, the shared library name is adjusted to the full library name 'libcamera', without relying upon the automatic 'lib' prefix which better represents the component and naming of the library. As a result of this, the pkgconfig file is now named 'libcamera.pc' as opposed to 'camera.pc', and applications desiring to reference libcamera will need to search for 'libcamera' as a dependency rather than 'camera'. The library itself is still created and installed as 'libcamera.so'. An example meson.build file would need to be adjusted as the following: - dependency('camera', required : true), + dependency('libcamera', required : true), Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25libcamera: Move libcamera.so pkg-config file generationKieran Bingham
The pkg-config file for the main libcamera.so is generated at the top level meson.build. Move this to the actual core libcamera build structure to be consistent and keep it next to the library construction. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25android: Split HAL to its own shared libraryKieran Bingham
The libcamera Android HAL implementation should not be an integral part of libcamera, but a support library that utilises the libcamera public API. Move the implementation to its own distinct library. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>