From patchwork Wed Feb 13 15:10:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 569 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 95BEB6101F for ; Wed, 13 Feb 2019 16:10:32 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EB3E285; Wed, 13 Feb 2019 16:10:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1550070632; bh=DT0GKAZtGOJEUZiQ5QT75rOQlWX4pFdaqXHz+bHSyFk=; h=From:To:Cc:Subject:Date:From; b=aH85oLDRy1vClPE85HGqH2rTmEjxyM1ZoZCxSeUIPQjwgd3QHjxaWes6plpe+CNe3 9oVAiAMm9spYjHM48QkRUamUK0QJBFPuPHRTwnNU7ZvNOrUvNNEngQ7YqJcyZX/x2Z ISWobgorUvXC+uzl8ml4n0Jm3JGrwvYD7yq3H7KQ= From: Kieran Bingham To: LibCamera Devel Date: Wed, 13 Feb 2019 15:10:19 +0000 Message-Id: <20190213151027.6376-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/8] libcamera: v4l2_device buffer sharing X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 15:10:32 -0000 Extend the V4L2Device to support buffers provided by other V4L2Devices and externally provided BufferPools, as well as This update has highlighted that the exportBuffers function was being passed the bufferCount redundantly as we expect the BufferPool to provide this sizing information for us, and so it was simplified. This series also converts the v4l2_device tests to use VIVID capture and output devices, and the tests will be skipped if the vivid kernel module is not loaded. Kieran Bingham (8): test: v4l2_device: Use VIVID capture stream test: v4l2_device: capture_async: End test at 30 frames libcamera: v4l2_device: streamOff() when releasing buffers libcamera: v4l2_device: Support queueing buffers to an output device libcamera: v4l2_device: Use non-interlaced frames libcamera: v4l2_device: Simplify exportBuffers() libcamera: v4l2_device: importBuffers support test: v4l2_device: Provide buffer sharing test src/libcamera/include/v4l2_device.h | 3 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +- src/libcamera/pipeline/uvcvideo.cpp | 2 +- src/libcamera/pipeline/vimc.cpp | 2 +- src/libcamera/v4l2_device.cpp | 84 ++++++++++-- test/v4l2_device/buffer_sharing.cpp | 179 ++++++++++++++++++++++++++ test/v4l2_device/capture_async.cpp | 11 +- test/v4l2_device/meson.build | 1 + test/v4l2_device/request_buffers.cpp | 4 +- test/v4l2_device/stream_on_off.cpp | 4 +- test/v4l2_device/v4l2_device_test.cpp | 18 +-- test/v4l2_device/v4l2_device_test.h | 2 - 12 files changed, 278 insertions(+), 35 deletions(-) create mode 100644 test/v4l2_device/buffer_sharing.cpp