summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Expand)Author
2020-03-23Revert "libcamera: controls: Don't over-optimize ControlValue layout"Laurent Pinchart
2020-03-21libcamera: device_enumerator: Remove '\todo' as it is completedKaaira Gupta
2020-03-20libcamera: controls: Don't over-optimize ControlValue layoutLaurent Pinchart
2020-03-20libcamera: controls: Move ControlValue size check to controls.cppLaurent Pinchart
2020-03-20libcamera: controls: Add support for string controlsLaurent Pinchart
2020-03-20libcamera: controls: Rename ControlRange to ControlInfoLaurent Pinchart
2020-03-20libcamera: controls: Name all ControlInfoMap instance variables infoMapLaurent Pinchart
2020-03-20cam: Print one property per lineJacopo Mondi
2020-03-20libcamera: v4l2_controls: Fix usage of strerror()Jacopo Mondi
2020-03-20libcamera: pipeline: rkisp1: Don't enable immutable linkHelen Koike
2020-03-20libcamera: pipeline: rkisp1: Use correct buffer count when importing buffersNiklas Söderlund
2020-03-19libcamera: utils: Adapt libcameraPath to match use casesKaaira Gupta
2020-03-19libcamera: v4l2_videodevice: Make V4L2PixelFormat constructor explicitLaurent Pinchart
2020-03-19libcamera: v4l2_videodevice: Rename toV4L2Fourcc to toV4L2PixelFormatLaurent Pinchart
2020-03-19libcamera: v4l2_videodevice: Add V4L2PixelFormat classLaurent Pinchart
2020-03-19qcam: saveImageAs: Set image quality explicitlyKieran Bingham
2020-03-19libcamera: geometry: Construct SizeRange from SizeLaurent Pinchart
2020-03-18libcamera: framebuffer_allocator: Lift camera restrictions on allocatorLaurent Pinchart
2020-03-18libcamera: pipeline_handler: Fold buffer management with start/stopLaurent Pinchart
2020-03-18libcamera: pipeline_handler: Decouple buffer import and exportLaurent Pinchart
2020-03-18libcamera: camera: Propagate error value from importFrameBufferLaurent Pinchart
2020-03-18libcamera: v4l2_videodevice: Add standalone buffer export supportLaurent Pinchart
2020-03-18libcamera: v4l2_videodevice: Refactor allocateBuffers()Laurent Pinchart
2020-03-18libcamera: v4l2_videodevice: Pass memory type to reqbufs()Laurent Pinchart
2020-03-18libcamera: v4l2_videodevice: Rename exportBuffers() to allocateBuffers()Laurent Pinchart
2020-03-18libcamera: PixelFormat: Mark all function arguments of type PixelFormat as co...Niklas Söderlund
2020-03-18libcamera: PixelFormat: Make constructor explicitLaurent Pinchart
2020-03-18libcamera: PixelFormat: Turn into a classNiklas Söderlund
2020-03-18libcamera: pipeline: uvcvideo: Translate from V4L2 to DRM pixel formatsNiklas Söderlund
2020-03-18libcamera: pipeline: vimc: Remove internal usage of ImageFormatsNiklas Söderlund
2020-03-18libcamera: pixelformats: include linux/drm_fourcc.hNiklas Söderlund
2020-03-18libcamera: Use PixelFormat instead of unsigned int where appropriateNiklas Söderlund
2020-03-18libcamera: ipa_proxy: search for proxy in build treeKaaira Gupta
2020-03-18libcamera: utils: Move libcamera build path lookup to utilsKaaira Gupta
2020-03-18libcamera: ipa_proxy: rearrange proxies precedenceKaaira Gupta
2020-03-18libcamera: ipa_proxy: use utils::split()Kaaira Gupta
2020-03-18cam: Create stream names after configuring the cameraNiklas Söderlund
2020-03-16qcam: format_convertor: Extend 32 bit ARGB format combinationsKieran Bingham
2020-03-08libcamera: controls: Fix strict aliasing violationLaurent Pinchart
2020-03-08v4l2: v4l2_camera_proxy: Fix sign compare compilation errorLaurent Pinchart
2020-03-08v4l2: v4l2_compat: Use correct libcamera_dep dependencyLaurent Pinchart
2020-03-08cam: Link against libatomic if neededLaurent Pinchart
2020-03-08libcamera: meson: Make libatomic and libdl dependencies reusableLaurent Pinchart
2020-03-08include: libcamera: meson: Add libcamera.h to the libcamera_api arrayLaurent Pinchart
2020-03-07gst: Fix GLib detectionLaurent Pinchart
2020-03-07gst: Turn the top-level plugin file gstlibcamera.c into a C++ fileLaurent Pinchart
2020-03-07gst: libcamerasrc: Prevent src task deadlock on exhausted buffer poolJakub Adam
2020-03-07gst: utils: Factor-out the task resume helperJakub Adam
2020-03-07gst: libcamerasrc: Add a TODO commentNicolas Dufresne
2020-03-07gst: libcamerasrc: Implement timestamp supportNicolas Dufresne
() { if (enumerator_) return -EBUSY; enumerator_ = DeviceEnumerator::create(); if (!enumerator_ || enumerator_->enumerate()) return -ENODEV; /* * TODO: Try to read handlers and order from configuration * file and only fallback on all handlers if there is no * configuration file. */ std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories(); for (PipelineHandlerFactory *factory : factories) { /* * Try each pipeline handler until it exhaust * all pipelines it can provide. */ while (1) { std::shared_ptr<PipelineHandler> pipe = factory->create(this); if (!pipe->match(enumerator_.get())) break; LOG(Camera, Debug) << "Pipeline handler \"" << factory->name() << "\" matched"; pipes_.push_back(std::move(pipe)); } } /* TODO: register hot-plug callback here */ return 0; } /** * \brief Stop the camera manager * * Before stopping the camera manager the caller is responsible for making * sure all cameras provided by the manager are returned to the manager. * * After the manager has been stopped no resource provided by the camera * manager should be consider valid or functional even if they for one * reason or another have yet to be deleted. */ void CameraManager::stop() { /* TODO: unregister hot-plug callback here */ /* * Release all references to cameras and pipeline handlers to ensure * they all get destroyed before the device enumerator deletes the * media devices. */ pipes_.clear(); cameras_.clear(); enumerator_.reset(nullptr); } /** * \fn CameraManager::cameras() * \brief Retrieve all available cameras * * Before calling this function the caller is responsible for ensuring that * the camera manger is running. * * \return List of all available cameras */ /** * \brief Get a camera based on name * \param[in] name Name of camera to get * * Before calling this function the caller is responsible for ensuring that * the camera manger is running. * * \return Shared pointer to Camera object or nullptr if camera not found */ std::shared_ptr<Camera> CameraManager::get(const std::string &name) { for (std::shared_ptr<Camera> camera : cameras_) { if (camera->name() == name) return camera; } return nullptr; } /** * \brief Add a camera to the camera manager * \param[in] camera The camera to be added * * This function is called by pipeline handlers to register the cameras they * handle with the camera manager. Registered cameras are immediately made * available to the system. */ void CameraManager::addCamera(std::shared_ptr<Camera> camera) { for (std::shared_ptr<Camera> c : cameras_) { if (c->name() == camera->name()) { LOG(Camera, Warning) << "Registering camera with duplicate name '" << camera->name() << "'"; break; } } cameras_.push_back(std::move(camera)); } /** * \brief Remove a camera from the camera manager * \param[in] camera The camera to be removed * * This function is called by pipeline handlers to unregister cameras from the * camera manager. Unregistered cameras won't be reported anymore by the * cameras() and get() calls, but references may still exist in applications. */ void CameraManager::removeCamera(Camera *camera) { for (auto iter = cameras_.begin(); iter != cameras_.end(); ++iter) { if (iter->get() == camera) { LOG(Camera, Debug) << "Unregistering camera '" << camera->name() << "'"; cameras_.erase(iter); return; } } } /** * \brief Retrieve the camera manager instance * * The CameraManager is a singleton and can't be constructed manually. This * function shall instead be used to retrieve the single global instance of the * manager. * * \return The camera manager instance */ CameraManager *CameraManager::instance() { static CameraManager manager; return &manager; } /** * \brief Set the event dispatcher * \param[in] dispatcher Pointer to the event dispatcher * * libcamera requires an event dispatcher to integrate event notification and * timers with the application event loop. Applications that want to provide * their own event dispatcher shall call this function once and only once before * the camera manager is started with start(). If no event dispatcher is * provided, a default poll-based implementation will be used. * * The CameraManager takes ownership of the event dispatcher and will delete it * when the application terminates. */ void CameraManager::setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher) { if (dispatcher_) { LOG(Camera, Warning) << "Event dispatcher is already set"; return; } dispatcher_ = std::move(dispatcher); } /** * \brief Retrieve the event dispatcher * * This function retrieves the event dispatcher set with setEventDispatcher(). * If no dispatcher has been set, a default poll-based implementation is created * and returned, and no custom event dispatcher may be installed anymore.