@@ -572,7 +572,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
std::unique_ptr<CameraConfiguration> config =
std::make_unique<RPiCameraConfiguration>(data);
V4L2SubdeviceFormat sensorFormat;
- unsigned int bufferCount;
PixelFormat pixelFormat;
V4L2VideoDevice::Formats fmts;
Size size;
@@ -593,7 +592,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
BayerFormat::Packing::CSI2);
ASSERT(pixelFormat.isValid());
colorSpace = ColorSpace::Raw;
- bufferCount = 2;
rawCount++;
break;
@@ -608,7 +606,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
colorSpace = ColorSpace::Sycc;
/* Return the largest sensor resolution. */
size = sensorSize;
- bufferCount = 1;
outCount++;
break;
@@ -629,7 +626,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
*/
colorSpace = ColorSpace::Rec709;
size = { 1920, 1080 };
- bufferCount = 4;
outCount++;
break;
@@ -638,7 +634,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
pixelFormat = formats::ARGB8888;
colorSpace = ColorSpace::Sycc;
size = { 800, 600 };
- bufferCount = 4;
outCount++;
break;
@@ -685,7 +680,6 @@ PipelineHandlerRPi::generateConfiguration(Camera *camera, const StreamRoles &rol
cfg.size = size;
cfg.pixelFormat = pixelFormat;
cfg.colorSpace = colorSpace;
- cfg.bufferCount = bufferCount;
config->addConfiguration(cfg);
}
@@ -1433,7 +1427,7 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)
for (Stream *s : camera->streams()) {
if (isRaw(s->configuration().pixelFormat)) {
- numRawBuffers = s->configuration().bufferCount;
+ numRawBuffers = data->unicam_[Unicam::Image].getBuffers().size();
break;
}
}