{"id":9251,"url":"https://patchwork.libcamera.org/api/1.1/covers/9251/?format=json","web_url":"https://patchwork.libcamera.org/cover/9251/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200806130937.2991606-1-niklas.soderlund@ragnatech.se>","date":"2020-08-06T13:09:30","name":"[libcamera-devel,0/7] libcamera: Allow for user-friendly names in applications","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"mbox":"https://patchwork.libcamera.org/cover/9251/mbox/","series":[{"id":1205,"url":"https://patchwork.libcamera.org/api/1.1/series/1205/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1205","date":"2020-08-06T13:09:30","name":"libcamera: Allow for user-friendly names in applications","version":1,"mbox":"https://patchwork.libcamera.org/series/1205/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/9251/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C0C54BD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Aug 2020 13:09:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 96D8D60836;\n\tThu,  6 Aug 2020 15:09:46 +0200 (CEST)","from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D73A56038F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Aug 2020 15:09:44 +0200 (CEST)","from bismarck.berto.se (p54ac52a8.dip0.t-ipconnect.de\n\t[84.172.82.168]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 14e50d00-d7e6-11ea-b48b-0050569116f7;\n\tThu, 06 Aug 2020 15:09:41 +0200 (CEST)"],"X-Halon-ID":"14e50d00-d7e6-11ea-b48b-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":"Thu,  6 Aug 2020 15:09:30 +0200","Message-Id":"<20200806130937.2991606-1-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.28.0","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 0/7] libcamera: Allow for user-friendly\n\tnames in applications","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello,\n\nWith the recent change where the camera names where remade into a camera \nid to better model it's original intent it have become necessary to \nadvance the topic of user-friendly names in applications. This series is \nan attempt to do so.\n\nPatch 1/7 adds a new camera property 'Model' that may be used to record \na cameras model. Patch 2/7, 3/7  and 4/7 then implements this new \nproperty for all pipeline handlers.\n\nPatch 5/7 fix a left over bug in the cam utility since the \ntransformation of Camera::name() to Camera::id(). Patch 6/7 introduce \nuser-friendly names to the cam utility.\n\nThe final patch 7/7 records the model information in the DNG files \ncreated by qcam. More work is needed on top of this series to create \nuser-friendly names for qcam. My intention is to do this in a follow up \nseries once this is merged as I fear some bikeshedding on the style of \nthe user-friendly name so lets battle that out in cam first :-)\n\nThis series depends on [1].\n\nExample of listing cameras with and without this series,\n\nWithout:\n    $ cam -l\n    Available cameras:\n    1: \\_SB_.PCI0.RP05.PXSX-2.1.1:1.0-0ac8:3420\n    2: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n    3: platform/vimc.0 Sensor B\n\n    $ cam -l\n    Available cameras:\n    1: \\_SB_.PCI0.I2C2.CAM0\n    2: \\_SB_.PCI0.I2C4.CAM1\n\nWith:\n    $ cam -l\n    Available cameras:\n    1: Venus USB2.0 Camera: Venus USB2 with id \\_SB_.PCI0.RP05.PXSX-2.1.1:1.0-0ac8:3420\n    2: Logitech Webcam C930e with id \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n    3: Sensor B facing front rotated 0 degrees with id platform/vimc.0 Sensor B\n\n    $ cam -l\n    Available cameras:\n    1: ov13858 facing front rotated 0 degrees with id \\_SB_.PCI0.I2C2.CAM0\n    2: ov5670 facing front rotated 0 degrees with id \\_SB_.PCI0.I2C4.CAM1\n\nIt can be observed above that all Cameras that report the Location and \nRotation properties do so by stating they face the front and are not \nrotated. We know this is not true for some devices. This is however not \na fault of this series as it only prints what is reported by the Camera.\nOnce we teach the Camera to report true values for these properties cam \nwill print the correct information.\n\n1. [PATCH 0/3] libcamera: Mark controls and property accessors as const \n   operations\n\nNiklas Söderlund (7):\n  libcamera: properties: Add model property\n  libcamera: camera_sensor: Set sensor model property\n  libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n  libcamera: pipeline: uvcvideo: Set sensor model property\n  cam: Rename cameraName variable\n  cam: Print user-friendly camera names\n  qcam: dng_writer: Record camera model\n\n src/cam/main.cpp                             | 47 +++++++++++++++++---\n src/libcamera/camera_sensor.cpp              |  2 +\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 34 +++++++-------\n src/libcamera/property_ids.yaml              |  5 +++\n src/qcam/dng_writer.cpp                      | 13 ++++--\n 5 files changed, 76 insertions(+), 25 deletions(-)"}