summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-05-26 15:04:47 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-30 14:01:01 +0200
commitdbe8d271e7959245f64056d26d95e94fe3ff737d (patch)
treed1df43f756460476cf0cd7ae783afc33cc7124b5
parentb83ee94fe21d09f444454cc82e5586e7b196cf05 (diff)
libcamera: stream: Rename StillCaptureRaw to Raw
With the buffer copy removed from all pipelines for raw capture rename StillCaptureRaw to Raw to better describe the role. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
-rw-r--r--include/libcamera/stream.h2
-rw-r--r--src/android/camera_device.cpp4
-rw-r--r--src/cam/stream_options.cpp4
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp2
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
-rw-r--r--src/libcamera/stream.cpp5
-rw-r--r--src/qcam/main_window.cpp2
7 files changed, 10 insertions, 11 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index f502b359..bb47c390 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -59,8 +59,8 @@ private:
};
enum StreamRole {
+ Raw,
StillCapture,
- StillCaptureRaw,
VideoRecording,
Viewfinder,
};
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 70d77a17..751699cd 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -313,7 +313,7 @@ std::vector<Size> CameraDevice::getYUVResolutions(CameraConfiguration *cameraCon
std::vector<Size> CameraDevice::getRawResolutions(const libcamera::PixelFormat &pixelFormat)
{
std::unique_ptr<CameraConfiguration> cameraConfig =
- camera_->generateConfiguration({ StillCaptureRaw });
+ camera_->generateConfiguration({ StreamRole::Raw });
StreamConfiguration &cfg = cameraConfig->at(0);
const StreamFormats &formats = cfg.formats();
std::vector<Size> supportedResolutions = formats.sizes(pixelFormat);
@@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
/* Report if camera supports RAW. */
std::unique_ptr<CameraConfiguration> cameraConfig =
- camera_->generateConfiguration({ StillCaptureRaw });
+ camera_->generateConfiguration({ StreamRole::Raw });
if (cameraConfig && !cameraConfig->empty()) {
const PixelFormatInfo &info =
PixelFormatInfo::info(cameraConfig->at(0).pixelFormat);
diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp
index 4168e5d2..27cc3912 100644
--- a/src/cam/stream_options.cpp
+++ b/src/cam/stream_options.cpp
@@ -119,8 +119,8 @@ bool StreamKeyValueParser::parseRole(StreamRole *role,
} else if (name == "still") {
*role = StreamRole::StillCapture;
return true;
- } else if (name == "stillraw") {
- *role = StreamRole::StillCaptureRaw;
+ } else if (name == "raw") {
+ *role = StreamRole::Raw;
return true;
}
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 4210824b..f5a20d30 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -348,7 +348,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,
break;
- case StreamRole::StillCaptureRaw: {
+ case StreamRole::Raw: {
StreamConfiguration cio2Config =
data->cio2_.generateConfiguration(sensorResolution);
pixelFormat = cio2Config.pixelFormat;
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index d2bee150..d4d04c0d 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -461,7 +461,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,
unsigned int outCount = 0;
for (const StreamRole role : roles) {
switch (role) {
- case StreamRole::StillCaptureRaw:
+ case StreamRole::Raw:
size = data->sensor_->resolution();
fmts = data->unicam_[Unicam::Image].dev()->formats();
sensorFormat = findBestMode(fmts, size);
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index 4d0ab90d..f7bafcf8 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -380,12 +380,11 @@ std::string StreamConfiguration::toString() const
* are specified by applications and passed to cameras, that then select the
* most appropriate streams and their default configurations.
*
+ * \var Raw
+ * The stream is intended to capture raw frames from the sensor.
* \var StillCapture
* The stream is intended to capture high-resolution, high-quality still images
* with low frame rate. The captured frames may be exposed with flash.
- * \var StillCaptureRaw
- * The stream is intended to capture high-resolution, raw still images with low
- * frame rate.
* \var VideoRecording
* The stream is intended to capture video for the purpose of recording or
* streaming. The video stream may produce a high frame rate and may be
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 985743f3..ecb9dd66 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -380,7 +380,7 @@ int MainWindow::startCapture()
break;
case 2:
if (roles[0] != StreamRole::Viewfinder ||
- roles[1] != StreamRole::StillCaptureRaw) {
+ roles[1] != StreamRole::Raw) {
qWarning() << "Only viewfinder + raw supported for dual streams";
return -EINVAL;
}