summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-08-28package: gentoo: Add dependencies on openssl and gnutlsLaurent Pinchart
2021-08-28package: gentoo: Update Python versionsLaurent Pinchart
2021-08-27utils: checkstyle.py: Use single-quoted strings when possibleLaurent Pinchart
2021-08-27clang-format: Remove unsupported optionKieran Bingham
2021-08-27Documentation: Explicitly enable DotKieran Bingham
2021-08-27Documentation: Remove obsoleted configKieran Bingham
2021-08-27base: class: Remove undesired semi-colon from LIBCAMERA_O_PTRKieran Bingham
2021-08-27libcamera: camera configuration: Add at() function in docJacopo Mondi
2021-08-27android: camera_buffer: Add stride/offset/size functionHirokazu Honda
2021-08-27android: camera_buffer: Map buffer in the first plane() callHirokazu Honda
2021-08-27android: generic_camera_buffer: Correct buffer mappingHirokazu Honda
2021-08-26gstreamer: Fix usage of default size for fixationNicolas Dufresne
2021-08-26libcamerasrc: Fix deadlock on EOSNicolas Dufresne
2021-08-26gstreamer: Fix concurrent access issues to CameraManagerNicolas Dufresne
2021-08-26gstreamer: Fix deadlock when last allocator ref is held by bufferNicolas Dufresne
2021-08-26test: gstreamer: Disable gstreamer registry forksVedant Paranjape
2021-08-26test: gstreamer: Clean up memory managementVedant Paranjape
2021-08-25Documentation: application-developer: Fix up spelling errorKieran Bingham
2021-08-25Documentation: application-developer: Fix reference to cam BufferWriterKieran Bingham
2021-08-25Documentation: application-developer: Recommend unique_ptr for CameraManagerKieran Bingham
2021-08-25Documentation: application-developer: Clean up build instructionsKieran Bingham
2021-08-25Documentation: application-developer: Remove irrelevant TODOKieran Bingham
2021-08-25README.rst: Update gstreamer element guidanceKieran Bingham
2021-08-23libcamera: controls: Initialize ControlInfoMap::idmap_Jacopo Mondi
2021-08-23ipa: ipu3: awb: remove local storage of the gridJean-Michel Hautbois
2021-08-23ipa: ipu3: agc: remove local storage of the gridJean-Michel Hautbois
2021-08-21Documentation: Drop deprecated Doxygen optionsLaurent Pinchart
2021-08-21qcam: Replace MappedBuffer with Span<uint8_t>Laurent Pinchart
2021-08-20ipa: ipu3: Move IPU3 agc into algorithmsJean-Michel Hautbois
2021-08-20ipa: ipu3: Move IPU3 awb into algorithmsJean-Michel Hautbois
2021-08-20ipa: ipu3: convert AGC to the new algorithm interfaceJean-Michel Hautbois
2021-08-20ipa: ipu3: convert AWB to the new algorithm interfaceJean-Michel Hautbois
2021-08-20ipa: ipu3: Introduce a modular tone mapping algorithmJean-Michel Hautbois
2021-08-20ipa: ipu3: Introduce modular algorithmJean-Michel Hautbois
2021-08-20ipa: ipu3: Add the functions to the Algorithm classJean-Michel Hautbois
2021-08-20ipa: ipu3: Introduce a Context structureJean-Michel Hautbois
2021-08-20ipa: move libipa::Algorithm to ipa/ipu3/algorithmsJean-Michel Hautbois
2021-08-19libcamera: ipc_pipe: Do not run memcpy with null argumentsUmang Jain
2021-08-19libcamera: ipc_unixsocket: Do not run memcpy with null argumentsUmang Jain
2021-08-19ipa: Use FileDescriptor instead of int in layers above IPC payloadPaul Elder
2021-08-19test: camera: Camera reconfiguration and fd-leak testUmang Jain
2021-08-19libtest: camera_test: Plumb constructor to set LIBCAMERA_IPA_FORCE_ISOLATIONUmang Jain
2021-08-18utils: ipc: ipa_proxy_worker: Log IPCUnixSocket::send() failuresLaurent Pinchart
2021-08-17ipa: raspberrypi: Fix bcm2835-isp inclusion type.Kieran Bingham
2021-08-17pipeline: ipu3: Skip recording timestamp for cancelled buffersUmang Jain
2021-08-17libcamera: pipeline: Cast to derived pipeline handler with helpersLaurent Pinchart
2021-08-17libcamera: pipeline_handler: Drop controls() and properties() functionsLaurent Pinchart
2021-08-17Documentation: guides: pipeline-handler: Migrate to Camera::PrivateLaurent Pinchart
2021-08-17libcamera: pipeline_handler: Drop CameraData classLaurent Pinchart
2021-08-17libcamera: pipeline: ipu3: Migrate to Camera::PrivateLaurent Pinchart
wc">V4L2Camera::requestComplete); } V4L2Camera::~V4L2Camera() { close(); } int V4L2Camera::open(StreamConfiguration *streamConfig) { if (camera_->acquire() < 0) { LOG(V4L2Compat, Error) << "Failed to acquire camera"; return -EINVAL; } config_ = camera_->generateConfiguration({ StreamRole::Viewfinder }); if (!config_) { camera_->release(); return -EINVAL; } bufferAllocator_ = new FrameBufferAllocator(camera_); *streamConfig = config_->at(0); return 0; } void V4L2Camera::close() { requestPool_.clear(); delete bufferAllocator_; bufferAllocator_ = nullptr; camera_->release(); } void V4L2Camera::bind(int efd) { efd_ = efd; } void V4L2Camera::unbind() { efd_ = -1; } std::vector<V4L2Camera::Buffer> V4L2Camera::completedBuffers() { std::vector<Buffer> v; bufferLock_.lock(); for (std::unique_ptr<Buffer> &metadata : completedBuffers_) v.push_back(*metadata.get()); completedBuffers_.clear(); bufferLock_.unlock(); return v; } void V4L2Camera::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; /* We only have one stream at the moment. */ bufferLock_.lock(); FrameBuffer *buffer = request->buffers().begin()->second; std::unique_ptr<Buffer> metadata = std::make_unique<Buffer>(request->cookie(), buffer->metadata()); completedBuffers_.push_back(std::move(metadata)); bufferLock_.unlock(); uint64_t data = 1; int ret = ::write(efd_, &data, sizeof(data)); if (ret != sizeof(data)) LOG(V4L2Compat, Error) << "Failed to signal eventfd POLLIN"; request->reuse(); { MutexLocker locker(bufferMutex_); bufferAvailableCount_++; } bufferCV_.notify_all(); } int V4L2Camera::configure(StreamConfiguration *streamConfigOut, const Size &size, const PixelFormat &pixelformat, unsigned int bufferCount) { StreamConfiguration &streamConfig = config_->at(0); streamConfig.size.width = size.width; streamConfig.size.height = size.height; streamConfig.pixelFormat = pixelformat; streamConfig.bufferCount = bufferCount; /* \todo memoryType (interval vs external) */ CameraConfiguration::Status validation = config_->validate(); if (validation == CameraConfiguration::Invalid) { LOG(V4L2Compat, Debug) << "Configuration invalid"; return -EINVAL; } if (validation == CameraConfiguration::Adjusted) LOG(V4L2Compat, Debug) << "Configuration adjusted"; LOG(V4L2Compat, Debug) << "Validated configuration is: " << streamConfig.toString(); int ret = camera_->configure(config_.get()); if (ret < 0) return ret; *streamConfigOut = config_->at(0); return 0; } int V4L2Camera::validateConfiguration(const PixelFormat &pixelFormat, const Size &size, StreamConfiguration *streamConfigOut) { std::unique_ptr<CameraConfiguration> config = camera_->generateConfiguration({ StreamRole::Viewfinder }); StreamConfiguration &cfg = config->at(0); cfg.size = size; cfg.pixelFormat = pixelFormat; cfg.bufferCount = 1; CameraConfiguration::Status validation = config->validate(); if (validation == CameraConfiguration::Invalid) return -EINVAL; *streamConfigOut = cfg; return 0; } int V4L2Camera::allocBuffers(unsigned int count) { Stream *stream = config_->at(0).stream(); int ret = bufferAllocator_->allocate(stream); if (ret < 0) return ret; for (unsigned int i = 0; i < count; i++) { std::unique_ptr<Request> request = camera_->createRequest(i); if (!request) { requestPool_.clear(); return -ENOMEM;