Cover Letter Detail
Show a cover letter.
GET /api/1.1/covers/95/?format=api
{ "id": 95, "url": "https://patchwork.libcamera.org/api/1.1/covers/95/?format=api", "web_url": "https://patchwork.libcamera.org/cover/95/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20181229032855.26249-1-niklas.soderlund@ragnatech.se>", "date": "2018-12-29T03:28:43", "name": "[libcamera-devel,v2,00/12] Add basic camera enumeration", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "mbox": "https://patchwork.libcamera.org/cover/95/mbox/", "series": [ { "id": 41, "url": "https://patchwork.libcamera.org/api/1.1/series/41/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=41", "date": "2018-12-29T03:28:43", "name": "Add basic camera enumeration", "version": 2, "mbox": "https://patchwork.libcamera.org/series/41/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/95/comments/", "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B9CD60B31\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Dec 2018 04:29:52 +0100 (CET)", "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid f6828fbf-0b19-11e9-911a-0050569116f7;\n\tSat, 29 Dec 2018 04:29:38 +0100 (CET)" ], "X-Halon-ID": "f6828fbf-0b19-11e9-911a-0050569116f7", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 29 Dec 2018 04:28:43 +0100", "Message-Id": "<20181229032855.26249-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 00/12] Add basic camera enumeration", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Sat, 29 Dec 2018 03:29:52 -0000" }, "content": "Hi,\n\nThis series adds basic camera enumeration to libcamera. The idea is to\nprovide something which can server as a starting point to solve other\nproblems around and enhance the enumeration process once the overall\ndesign is properly reviewed and requirements on the features missing\nbecomes a bit more clear. The code in this series is fully functional\nand allows to add more pipeline handlers and enumerate cameras.\n\nIn this series there are however a few known limitations which I find\nacceptable to get started and which can be solved one by one once the\nbasic structure of enumeration is reviewed and hopefully upstream. The\nknown limitations are:\n\n- No sysfs based device enumerator. This will be needed so libcamera\n have something to fallback on if udev enumeration fails or is not\n available at all. The rational to focus on udev first is that it's\n more complex and will support more features then sysfs (most notably\n hot-(un)plug support.\n\n- The camera object (1/12) in this series is a mix of Jacopo's and\n Laurent's previous patches with modifications by me. By no means would\n I like to claim authorship of all work in this patch but as I modified\n it I did claim authorship of it. If any of you wish to be claim\n authorship for it let me know, I don't want you to be unprepared when\n you get (git) blamed for my mistakes :-)\n\n- The DeviceInfo class should probably down the road be replaced by a\n more comprehensive MediaDevice class. For now i feel this solution\n works as it allows us to move forward with a MediaDevice class focused\n on the needs of the Camera class and later extend it with the limited\n features needed to replace DeviceInfo. For this reason I chose the\n name DeciceInfo to not cause conflicts and allow the two to live in\n parallel for a short wile if needed.\n\n- There is no support for hot-plug or hot-unplug. The state of the\n system is assumed to be static for the entire execution. Some care\n have been taken to facilitate addition of hot-plug support.\n\n- There is only one pipeline handler included in this series for the\n vimc driver. It should be fairly trivial to add one for the Soraka, I\n chose not to do so to reduce the number of patches and to increase the\n number of potential testers as anyone can do 'modprobe vimc' and have\n the test case for this series passing.\n\nPatch 1/12 adds a mock for a Camera class and stubs in lifetime\nmanagement features needed to allow the camera manger to try and control\nthe lifetime of objects. Patch 2/12 adds a build requirement on libudev.\n\nPatch 3/12 -- 7/12 adds the device enumerator and accompanying classes\nto allow storing and searching for media devices by a pipeline handler.\nPatch 8/12 adds the documentation for all enumerator related classes. I\nchose to split this in multiple patches to ease review, I'm open to\nsquashing them together if someone feels it's better for some reason or\nother.\n\nPatch 9/12 adds a base class for pipeline handlers and a global list of\npipe handlers in the system which each pipeline implementation can\nregister it self with to be included in the enumeration of cameras. This\napproach allows the pipeline implementations to be self contained in a\nsingle .cpp file, thanks Kieran for pointing me in the right direction\nfor how to do this in C++ ;-)\n\nPatch 10/12 adds the camera manger which tracks lifetime management of\ncameras in the system and is the interface to applications to list and\nget cameras out of the library. Patch 11/12 adds a pipeline handler for\nthe vimc driver and lastly 12/12 adds a test case which simply uses most\nfeatures of the series to list all cameras in the system.\n\nThis series is based on top of the current master branch and the test\ncase have been run under valgrind and no memory issues are found.\n\nvalgrind --tool=memcheck --leak-check=full ./test/list\n==25960== Memcheck, a memory error detector\n==25960== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.\n==25960== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info\n==25960== Command: ./test/list\n==25960== \n[273:11:28.468815052] INFO device_enumerator.cpp:71 Device: /dev/media1 Entity: 'Venus USB2.0 Camera: Venus USB2' -> /dev/video4\n[273:11:28.502392360] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Debayer A' -> /dev/v4l-subdev2\n[273:11:28.502798125] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Debayer B' -> /dev/v4l-subdev3\n[273:11:28.502964381] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'RGB/YUV Capture' -> /dev/video2\n[273:11:28.503035373] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'RGB/YUV Input' -> /dev/v4l-subdev4\n[273:11:28.503255023] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Raw Capture 0' -> /dev/video0\n[273:11:28.503457774] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Raw Capture 1' -> /dev/video1\n[273:11:28.503527816] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Scaler' -> /dev/v4l-subdev5\n[273:11:28.503621969] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Sensor A' -> /dev/v4l-subdev0\n[273:11:28.503729366] INFO device_enumerator.cpp:71 Device: /dev/media0 Entity: 'Sensor B' -> /dev/v4l-subdev1\n- Venus USB2.0 Camera: Venus USB2\n- Dummy VIMC Camera\n==25960== \n==25960== HEAP SUMMARY:\n==25960== in use at exit: 0 bytes in 0 blocks\n==25960== total heap usage: 822 allocs, 822 frees, 426,836 bytes allocated\n==25960== \n==25960== All heap blocks were freed -- no leaks are possible\n==25960== \n==25960== For counts of detected and suppressed errors, rerun with: -v\n==25960== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\n\nNiklas Söderlund (12):\n libcamera: Add Camera class\n libcamera: add dependency on libudev\n libcamera: device_enumerator: add DeviceInfo class\n libcamera: device_enumerator: add DeviceMatch class\n libcamera: device_enumerator: add DeviceEnumerator class\n libcamera: device_enumerator: add DeviceEnumeratorUdev class\n libcamera: device_enumerator: add factory for DeviceEnumerators\n libcamera: device_enumerator: add documentation\n libcamera: pipeline_handler: add PipelineHandler class\n libcamera: camera_manager: add CameraManager class\n libcamera: pipeline: vimc: add pipeline handler for vimc\n tests: add test to list all cameras in the system\n\n include/libcamera/camera.h | 31 ++\n include/libcamera/camera_manager.h | 38 ++\n include/libcamera/libcamera.h | 3 +\n include/libcamera/meson.build | 2 +\n src/libcamera/camera.cpp | 89 ++++\n src/libcamera/camera_manager.cpp | 166 ++++++\n src/libcamera/device_enumerator.cpp | 594 ++++++++++++++++++++++\n src/libcamera/include/device_enumerator.h | 97 ++++\n src/libcamera/include/pipeline_handler.h | 62 +++\n src/libcamera/meson.build | 13 +-\n src/libcamera/pipeline/meson.build | 3 +\n src/libcamera/pipeline/vimc.cpp | 91 ++++\n src/libcamera/pipeline_handler.cpp | 138 +++++\n test/list.cpp | 54 ++\n test/meson.build | 5 +\n 15 files changed, 1385 insertions(+), 1 deletion(-)\n create mode 100644 include/libcamera/camera.h\n create mode 100644 include/libcamera/camera_manager.h\n create mode 100644 src/libcamera/camera.cpp\n create mode 100644 src/libcamera/camera_manager.cpp\n create mode 100644 src/libcamera/device_enumerator.cpp\n create mode 100644 src/libcamera/include/device_enumerator.h\n create mode 100644 src/libcamera/include/pipeline_handler.h\n create mode 100644 src/libcamera/pipeline/meson.build\n create mode 100644 src/libcamera/pipeline/vimc.cpp\n create mode 100644 src/libcamera/pipeline_handler.cpp\n create mode 100644 test/list.cpp" }