From patchwork Wed Apr 3 15:07:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 905 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 88E6060DB2 for ; Wed, 3 Apr 2019 17:06:55 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 16578FF816; Wed, 3 Apr 2019 15:06:54 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 3 Apr 2019 17:07:27 +0200 Message-Id: <20190403150735.27580-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/8] libcamera: ipu3: Multiple streams support 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, 03 Apr 2019 15:06:55 -0000 Hello, based on latest master, which includes ImgU support, this series adds support for multiple streams (viewfinder and output ones) to the IPU3 pipeline handler. The implementation supports 2 streams per camera, captured from the main and the secondary output of an ImgU unit. To test the series, I have applied on top of this patches on the mailing list from Niklas that extend the cam application to support multiple streams, and add support for stream roles: The result is available in the "jmondi/imgu-multi-v3-roles" private branch and I've validated it capturing the two streams singularly and the together. As an example, the following command line captures from viewfinder and main output at the same time, with different resolutions: ./src/cam/cam -c "ov5670 4-0036 1" -C --file=/tmp/frame-# -s role=viewfinder,width=640,height=480 -s role=still,width=2560,height=1920 More testing is of course welcome. Thanks j Jacopo Mondi (8): libcamera: utils: Define BIT() macro libcamera: ipu3: Create camera with 2 streams libcamera: camera: allocateBuffers: Pass the stream set libcamera: ipu3: Add multiple stream memory management libcamera: request: Add streams() method libcamera: ipu3: Queue request for multiple streams libcamera: pipeline: Add method to retrieve Request from Buffer libcamera: ipu3: Connect viewfinder's BufferReady signal include/libcamera/request.h | 5 + src/libcamera/camera.cpp | 15 +- src/libcamera/include/pipeline_handler.h | 9 +- src/libcamera/include/utils.h | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 346 +++++++++++++++++------ src/libcamera/pipeline/uvcvideo.cpp | 18 +- src/libcamera/pipeline/vimc.cpp | 18 +- src/libcamera/pipeline_handler.cpp | 37 ++- src/libcamera/request.cpp | 22 ++ src/libcamera/utils.cpp | 5 + 10 files changed, 366 insertions(+), 110 deletions(-) --- 2.21.0