summaryrefslogtreecommitdiff
path: root/src/ipa/vimc/data
AgeCommit message (Collapse)Author
2023-12-07meson: Tag all installed filesLaurent Pinchart
Meson uses tags to sort installed files in categories, and makes it possible to install a subset of the files using the '--tags' argument to 'meson install'. This is typically used by distributions to split the runtime, development and documentation files into separate packages. By default, meson tries to guess the correct tag for installed files, but can't always do so properly. Mark the install targets that meson can't guess with the correct install_tag. As the feature has been introduced in meson 0.60, bump the minimum meson version. The latest LTS release of all major distributions that libcamera currently targets ship a recent enough meson version. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2021-05-11meson: Replace obselete join_paths() with '/' operatorUmang Jain
Since meson v0.49.0, join_paths() is equivalent to '/' hence, drop and replace it with '/' short-hand in meson files. This commit does not introduce any functional changes. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-09libcamera: Add missing SPDX headers to miscellaneous small filesLaurent Pinchart
Add missing SPDX headers to miscellaneous small files. Use CC0-1.0 for meson.build, .gitignore and the small include/linux/README, and licenses matching the corresponding component for other files. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-13licenses: License all meson files under CC0-1.0Laurent Pinchart
In an attempt to clarify the license terms of all files in the libcamera project, the build system files deserve particular attention. While they describe how the binaries are created, they are not themselves transformed into any part of binary distributions of the software, and thus don't influence the copyright on the binary packages. They are however subject to copyright, and thus influence the distribution terms of the source packages. Most of the meson.build files would not meet the threshold of originality criteria required for copyright protection. Some of the more complex meson.build files may be eligible for copyright protection. To avoid any ambiguity and uncertainty, state our intent to not assert copyrights on the build system files by putting them in the public domain with the CC0-1.0 license. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Naushir Patuck <naush@raspberrypi.com> Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Acked-by: Paul Elder <paul.elder@ideasonboard.com> Acked-by: Show Liu <show.liu@linaro.org>
2020-04-28ipa: vimc: Add a dummy configuration file to the vimc IPALaurent Pinchart
The file will be used to test the corresponding APIs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
#include <libcamera/geometry.h> #include <libcamera/pixel_format.h> #include <libcamera/request.h> #include <libcamera/stream.h> #include "camera_capabilities.h" #include "camera_metadata.h" #include "camera_stream.h" #include "jpeg/encoder.h" class Camera3RequestDescriptor; struct CameraConfigData; class CameraDevice : protected libcamera::Loggable { public: static std::unique_ptr<CameraDevice> create(unsigned int id, std::shared_ptr<libcamera::Camera> cam); ~CameraDevice(); int initialize(const CameraConfigData *cameraConfigData); int open(const hw_module_t *hardwareModule); void close(); void flush(); unsigned int id() const { return id_; } camera3_device_t *camera3Device() { return &camera3Device_; } const CameraCapabilities *capabilities() const { return &capabilities_; } const std::shared_ptr<libcamera::Camera> &camera() const { return camera_; } const std::string &maker() const { return maker_; } const std::string &model() const { return model_; } int facing() const { return facing_; } int orientation() const { return orientation_; } unsigned int maxJpegBufferSize() const; void setCallbacks(const camera3_callback_ops_t *callbacks); const camera_metadata_t *getStaticMetadata(); const camera_metadata_t *constructDefaultRequestSettings(int type); int configureStreams(camera3_stream_configuration_t *stream_list); int processCaptureRequest(camera3_capture_request_t *request); void requestComplete(libcamera::Request *request); void streamProcessingComplete(Camera3RequestDescriptor::StreamBuffer *bufferStream, Camera3RequestDescriptor::Status status); protected: std::string logPrefix() const override; private: LIBCAMERA_DISABLE_COPY_AND_MOVE(CameraDevice) CameraDevice(unsigned int id, std::shared_ptr<libcamera::Camera> camera); enum class State { Stopped, Flushing, Running, }; void stop() LIBCAMERA_TSA_EXCLUDES(stateMutex_); std::unique_ptr<libcamera::FrameBuffer> createFrameBuffer(const buffer_handle_t camera3buffer, libcamera::PixelFormat pixelFormat, const libcamera::Size &size); void abortRequest(Camera3RequestDescriptor *descriptor) const; bool isValidRequest(camera3_capture_request_t *request) const; void notifyShutter(uint32_t frameNumber, uint64_t timestamp); void notifyError(uint32_t frameNumber, camera3_stream_t *stream, camera3_error_msg_code code) const; int processControls(Camera3RequestDescriptor *descriptor); void completeDescriptor(Camera3RequestDescriptor *descriptor) LIBCAMERA_TSA_EXCLUDES(descriptorsMutex_); void sendCaptureResults() LIBCAMERA_TSA_REQUIRES(descriptorsMutex_); void setBufferStatus(Camera3RequestDescriptor::StreamBuffer &buffer, Camera3RequestDescriptor::Status status); std::unique_ptr<CameraMetadata> getResultMetadata( const Camera3RequestDescriptor &descriptor) const; unsigned int id_; camera3_device_t camera3Device_; libcamera::Mutex stateMutex_; /* Protects access to the camera state. */ State state_ LIBCAMERA_TSA_GUARDED_BY(stateMutex_); std::shared_ptr<libcamera::Camera> camera_; std::unique_ptr<libcamera::CameraConfiguration> config_; CameraCapabilities capabilities_; std::map<unsigned int, std::unique_ptr<CameraMetadata>> requestTemplates_; const camera3_callback_ops_t *callbacks_; std::vector<CameraStream> streams_; libcamera::Mutex descriptorsMutex_ LIBCAMERA_TSA_ACQUIRED_AFTER(stateMutex_); std::queue<std::unique_ptr<Camera3RequestDescriptor>> descriptors_ LIBCAMERA_TSA_GUARDED_BY(descriptorsMutex_); std::string maker_; std::string model_; int facing_; int orientation_; CameraMetadata lastSettings_; };