{"id":9681,"url":"https://patchwork.libcamera.org/api/1.1/patches/9681/?format=json","web_url":"https://patchwork.libcamera.org/patch/9681/","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":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>","date":"2020-09-21T18:23:25","name":"[libcamera-devel] libcamera: stream: Rename StillCaptureRaw to Raw","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"fcbfc06c47c01bdcb105109c72477f24708948fa","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9681/mbox/","series":[{"id":1303,"url":"https://patchwork.libcamera.org/api/1.1/series/1303/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1303","date":"2020-09-21T18:23:25","name":"[libcamera-devel] libcamera: stream: Rename StillCaptureRaw to Raw","version":1,"mbox":"https://patchwork.libcamera.org/series/1303/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9681/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9681/checks/","tags":{},"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 C5D3FC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Sep 2020 18:23:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 37E0E62FD3;\n\tMon, 21 Sep 2020 20:23:38 +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 7960362B90\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Sep 2020 20:23:36 +0200 (CEST)","from bismarck.berto.se (p54ac52a8.dip0.t-ipconnect.de\n\t[84.172.82.168]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 8cd0b5cb-fc37-11ea-a39b-005056917f90;\n\tMon, 21 Sep 2020 20:23:35 +0200 (CEST)"],"X-Halon-ID":"8cd0b5cb-fc37-11ea-a39b-005056917f90","Authorized-sender":"niklas.soderlund@fsdn.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 21 Sep 2020 20:23:25 +0200","Message-Id":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.28.0","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH] libcamera: stream: Rename StillCaptureRaw\n\tto Raw","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":"With the buffer copy removed from all pipelines for the raw capture\nrename the StillCaptureRaw to Raw to better represent the role.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/stream.h                         | 2 +-\n src/android/camera_device.cpp                      | 4 ++--\n src/cam/stream_options.cpp                         | 4 ++--\n src/libcamera/pipeline/ipu3/ipu3.cpp               | 2 +-\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n src/libcamera/stream.cpp                           | 5 ++---\n src/qcam/main_window.cpp                           | 2 +-\n 7 files changed, 10 insertions(+), 11 deletions(-)","diff":"diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex f502b35957fc250c..bb47c390f8a12387 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -59,8 +59,8 @@ private:\n };\n \n enum StreamRole {\n+\tRaw,\n \tStillCapture,\n-\tStillCaptureRaw,\n \tVideoRecording,\n \tViewfinder,\n };\ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 70d77a17ef43cf48..751699cd21138245 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -313,7 +313,7 @@ std::vector<Size> CameraDevice::getYUVResolutions(CameraConfiguration *cameraCon\n std::vector<Size> CameraDevice::getRawResolutions(const libcamera::PixelFormat &pixelFormat)\n {\n \tstd::unique_ptr<CameraConfiguration> cameraConfig =\n-\t\tcamera_->generateConfiguration({ StillCaptureRaw });\n+\t\tcamera_->generateConfiguration({ StreamRole::Raw });\n \tStreamConfiguration &cfg = cameraConfig->at(0);\n \tconst StreamFormats &formats = cfg.formats();\n \tstd::vector<Size> supportedResolutions = formats.sizes(pixelFormat);\n@@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \n \t/* Report if camera supports RAW. */\n \tstd::unique_ptr<CameraConfiguration> cameraConfig =\n-\t\tcamera_->generateConfiguration({ StillCaptureRaw });\n+\t\tcamera_->generateConfiguration({ StreamRole::Raw });\n \tif (cameraConfig && !cameraConfig->empty()) {\n \t\tconst PixelFormatInfo &info =\n \t\t\tPixelFormatInfo::info(cameraConfig->at(0).pixelFormat);\ndiff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\nindex 4168e5d2d1deff9b..27cc39122989f256 100644\n--- a/src/cam/stream_options.cpp\n+++ b/src/cam/stream_options.cpp\n@@ -119,8 +119,8 @@ bool StreamKeyValueParser::parseRole(StreamRole *role,\n \t} else if (name == \"still\") {\n \t\t*role = StreamRole::StillCapture;\n \t\treturn true;\n-\t} else if (name == \"stillraw\") {\n-\t\t*role = StreamRole::StillCaptureRaw;\n+\t} else if (name == \"raw\") {\n+\t\t*role = StreamRole::Raw;\n \t\treturn true;\n \t}\n \ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 221259c7fe61df03..17ffed2b0e2ff0a6 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -343,7 +343,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \n \t\t\tbreak;\n \n-\t\tcase StreamRole::StillCaptureRaw: {\n+\t\tcase StreamRole::Raw: {\n \t\t\tStreamConfiguration cio2Config =\n \t\t\t\tdata->cio2_.generateConfiguration(sensorResolution);\n \t\t\tpixelFormat = cio2Config.pixelFormat;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 50f07182457046ff..fe46dbd386d2a5ea 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -376,7 +376,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n \tunsigned int outCount = 0;\n \tfor (const StreamRole role : roles) {\n \t\tswitch (role) {\n-\t\tcase StreamRole::StillCaptureRaw:\n+\t\tcase StreamRole::Raw:\n \t\t\tsize = data->sensor_->resolution();\n \t\t\tfmts = data->unicam_[Unicam::Image].dev()->formats();\n \t\t\tsensorFormat = findBestMode(fmts, size);\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex 4d0ab90d73f96e0f..6d51e5da794f9f87 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -380,12 +380,11 @@ std::string StreamConfiguration::toString() const\n  * are specified by applications and passed to cameras, that then select the\n  * most appropriate streams and their default configurations.\n  *\n+ * \\var Raw\n+ * The stream is intended to capture high-resolution raw images.\n  * \\var StillCapture\n  * The stream is intended to capture high-resolution, high-quality still images\n  * with low frame rate. The captured frames may be exposed with flash.\n- * \\var StillCaptureRaw\n- * The stream is intended to capture high-resolution, raw still images with low\n- * frame rate.\n  * \\var VideoRecording\n  * The stream is intended to capture video for the purpose of recording or\n  * streaming. The video stream may produce a high frame rate and may be\ndiff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 985743f3233405d0..ecb9dd6642400697 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -380,7 +380,7 @@ int MainWindow::startCapture()\n \t\tbreak;\n \tcase 2:\n \t\tif (roles[0] != StreamRole::Viewfinder ||\n-\t\t    roles[1] != StreamRole::StillCaptureRaw) {\n+\t\t    roles[1] != StreamRole::Raw) {\n \t\t\tqWarning() << \"Only viewfinder + raw supported for dual streams\";\n \t\t\treturn -EINVAL;\n \t\t}\n","prefixes":["libcamera-devel"]}