@@ -97,6 +97,8 @@ private:
{
return static_cast<UVCCameraData *>(camera->_d());
}
+
+ static constexpr unsigned int kUVCBufferSlotCount = 16;
};
UVCCameraConfiguration::UVCCameraConfiguration(UVCCameraData *data)
@@ -239,9 +241,8 @@ int PipelineHandlerUVC::exportFrameBuffers(Camera *camera,
int PipelineHandlerUVC::start(Camera *camera, [[maybe_unused]] const ControlList *controls)
{
UVCCameraData *data = cameraData(camera);
- unsigned int count = data->stream_.configuration().bufferCount;
- int ret = data->video_->importBuffers(count);
+ int ret = data->video_->importBuffers(kUVCBufferSlotCount);
if (ret < 0)
return ret;
@@ -106,6 +106,8 @@ private:
{
return static_cast<VimcCameraData *>(camera->_d());
}
+
+ static constexpr unsigned int kVimcBufferSlotCount = 16;
};
namespace {
@@ -334,9 +336,8 @@ int PipelineHandlerVimc::exportFrameBuffers(Camera *camera,
int PipelineHandlerVimc::start(Camera *camera, [[maybe_unused]] const ControlList *controls)
{
VimcCameraData *data = cameraData(camera);
- unsigned int count = data->stream_.configuration().bufferCount;
- int ret = data->video_->importBuffers(count);
+ int ret = data->video_->importBuffers(kVimcBufferSlotCount);
if (ret < 0)
return ret;