[{"id":1325,"web_url":"https://patchwork.libcamera.org/comment/1325/","msgid":"<20190409155006.GP15350@bigcity.dyn.berto.se>","date":"2019-04-09T15:50:06","subject":"Re: [libcamera-devel] [PATCH v4 0/8] libcamera: stream: Add basic\n\tstream usages","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi,\n\nWith Laurents comment fixed pushed to master.\n\nOn 2019-04-08 15:48:09 +0200, Niklas Söderlund wrote:\n> Hi,\n> \n> This series changes how the default configuration is retrieved from a\n> camera. It replaces the current method where applications have to\n> enumerate a cameras streams and pick a set of them to ask for a default\n> configuration and then try to tune them to its use-case.\n> \n> Instead the application asks libcamera for a set of stream usages to fit\n> its use-case and receives in returns a set of streams with a default\n> configuration (which it then can try and fine tune).\n> \n> The goal of this series is to define the API towards the application and\n> not to implement smart choices in the pipeline handlers to actually\n> select streams. The main reason for this limitation in scope are that\n> all upstream pipeline handlers only support one stream so the new API is\n> not really useful for pipeline handlers yet.\n> \n> The code is tested with a modified cam tool (patches posted in a\n> different series) together with out of tree IPU3 patches to extend it to\n> expose more then one stream per camera. So the API is proven to work\n> with multiple streams and can support capturing multiple streams in the\n> same request.\n> \n> * Changes since v1\n> - Renamed StreamRole to StreamUsage\n> - Made geometry.h public header and use Size.\n> - Added CameraConfiguration object to handle mapping of stream usages to\n>   stream configurations.\n> - Added more documentation, thanks all patient reviewers!\n> \n> - Changes since v2\n> - Extend CameraConfiguratio with .valid(), ability use operator[](Stream\n>   *) in a const context and add operator[](unsinged int) to fetch stream\n>   pointers based on insertion index.\n> - Fixed up a lot of documentation.\n> - Added geometry.h to meason.build.\n> - Camera::configureStreams() and PipelineHandler::configureStreams()\n>   take a const CameraConfiguration.\n> - Dropped #include <libcamera/stream.h> from camera.h.\n> \n> - Changes since v3\n> - Add const Stream *CameraConfiguration::front() const.\n> - Rename empty() and valid() to isEmpty() and isValid().\n> - Improved the documentation.\n> \n> Niklas Söderlund (8):\n>   cam: Rework how streams configuration is prepared\n>   test: camera: Remove streams argument from configurationValid()\n>   test: camera: Remove test for bad Stream IDs\n>   libcamera: Make geometry.h a public header\n>   libcamera: stream: Add basic stream usages\n>   libcamera: camera: Add support for stream usages\n>   libcamera: camera: Add CameraConfiguration\n>   libcamera: Switch to CameraConfiguration\n> \n>  include/libcamera/camera.h                    |  36 ++-\n>  .../include => include/libcamera}/geometry.h  |   0\n>  include/libcamera/meson.build                 |   1 +\n>  include/libcamera/stream.h                    |  40 +++\n>  src/cam/main.cpp                              |  34 +--\n>  src/libcamera/camera.cpp                      | 243 +++++++++++++++---\n>  src/libcamera/geometry.cpp                    |   2 +-\n>  src/libcamera/include/formats.h               |   2 +-\n>  src/libcamera/include/pipeline_handler.h      |   8 +-\n>  src/libcamera/include/v4l2_subdevice.h        |   3 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          |  14 +-\n>  src/libcamera/pipeline/uvcvideo.cpp           |  18 +-\n>  src/libcamera/pipeline/vimc.cpp               |  18 +-\n>  src/libcamera/pipeline_handler.cpp            |  16 +-\n>  src/libcamera/stream.cpp                      |  92 +++++++\n>  src/libcamera/v4l2_subdevice.cpp              |   3 +-\n>  src/qcam/main_window.cpp                      |   5 +-\n>  src/qcam/main_window.h                        |   2 +-\n>  test/camera/camera_test.cpp                   |  27 --\n>  test/camera/camera_test.h                     |   3 -\n>  test/camera/capture.cpp                       |  11 +-\n>  test/camera/configuration_default.cpp         |  40 +--\n>  test/camera/configuration_set.cpp             |   9 +-\n>  test/camera/statemachine.cpp                  |   6 +-\n>  test/v4l2_subdevice/list_formats.cpp          |   3 +-\n>  25 files changed, 462 insertions(+), 174 deletions(-)\n>  rename {src/libcamera/include => include/libcamera}/geometry.h (100%)\n> \n> -- \n> 2.21.0\n>","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x143.google.com (mail-lf1-x143.google.com\n\t[IPv6:2a00:1450:4864:20::143])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9ECF860004\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Apr 2019 17:50:08 +0200 (CEST)","by mail-lf1-x143.google.com with SMTP id u24so5813924lfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Apr 2019 08:50:08 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tv11sm6802976ljk.19.2019.04.09.08.50.06\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 09 Apr 2019 08:50:06 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=IJ9PlCOysRaq16Z9tdj8oT0iFRqH3B98PEa2Syo3M+I=;\n\tb=HFCUmVPkVH3VVHqlZfieUUcZv0VvJ9XWsj4Ud5IanmuSYNHXBiWM/9MlYBpGaduMil\n\t9C3tqJwA7EziRo6z6njNR1RDDscZNJf53QkpG7UD3P5GTTkH3UQhJRp7TgBECOutHtVy\n\tHkvvjrm3j+YZWLZ0u70q8CUA6VzCJoSbz4R3j5Ob3Hq+Qh1z8IwPbAP9mUkvqObZ820a\n\twQ4V12yRDsP/8XDqRHW+CkSnPGr2ddNlRhOCu7DtlA6ep6qSdX3JBMmsDsKS+SZFRE0l\n\t8976kTtMzC6wyfks8IXiX7icsSfrG4lK+ASzm9rpbceKYsxU4HWUiDhKeF3gXbjBtqBl\n\txZIw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=IJ9PlCOysRaq16Z9tdj8oT0iFRqH3B98PEa2Syo3M+I=;\n\tb=mo3BXsUnYCTmtwA6XE7RxJMZOv4eItVCCsuk5R7DISiQE4l/NjPxCvLLJrChNm7DLl\n\tyy8ltT3VihSf1ydXOmIQyyR8PHz/TiOxt6ELW5c0qrl8VcbvwEKgxYTwgTMxq8ASQRJ4\n\tYzqqcO0LHJ7WlQkyMbOD+YcEP887TSvYYXdH3du703jyHuckLJ/Siq/scI5DXPvCe4Nt\n\tcxkUVo6ltjCPPJlwRpKP5RJFtn2emGyjg6TCksisqzvk8Uj8azRfJdQ7RGcT39eLJFAd\n\txUB0U3PKaWATvAbjO/mla7LCcWOLpaxUYLtxmUAHKaa4GhmxFt1KvKX7pkr+lHf9+/Jn\n\te4Mw==","X-Gm-Message-State":"APjAAAVRHn93Tl/7HhiwmZ3+BoCtuxxtj85EsLAo4JFxUkugZZAr45oM\n\tkArl/Paq/5L1Kb3PvQXA2F9MgYFn5nE=","X-Google-Smtp-Source":"APXvYqw31OdZy3B8JalZj4Yb5XiDKrx+GfrbNQw2LLRlxJaNBTMbsfl0muGVDf6yeIgL2MswzbiXrQ==","X-Received":"by 2002:a19:7007:: with SMTP id h7mr3015519lfc.23.1554825007624; \n\tTue, 09 Apr 2019 08:50:07 -0700 (PDT)","Date":"Tue, 9 Apr 2019 17:50:06 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190409155006.GP15350@bigcity.dyn.berto.se>","References":"<20190408134817.15247-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190408134817.15247-1-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.11.3 (2019-02-01)","Subject":"Re: [libcamera-devel] [PATCH v4 0/8] libcamera: stream: Add basic\n\tstream usages","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":"Tue, 09 Apr 2019 15:50:08 -0000"}}]