0001-core-Update-checks-for-disable_rpi_features-option.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd@kuhls.net>
  3. Date: Sat, 21 Jun 2025 18:12:18 +0200
  4. Subject: [PATCH] core: Update checks for disable_rpi_features option
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Based on the original commit that added the sync feature there
  9. were a few more options that needed the disable_rpi_features
  10. code conditionals to ensure compilation against upstream
  11. libcamera so add them in to ensure this works.
  12. Fixes:
  13. ../core/rpicam_app.cpp: In member function ‘void RPiCamApp::StartCamera()’:
  14. ../core/rpicam_app.cpp:642:78: error: ‘controls::rpi’ has not been declared
  15. 642 | if (!controls_.get(controls::ScalerCrop) && !controls_.get(controls::rpi::ScalerCrops))
  16. | ^~~
  17. ../core/rpicam_app.cpp:673:49: error: ‘controls::rpi’ has not been declared
  18. 673 | controls_.set(controls::rpi::ScalerCrops, libcamera::Span<const Rectangle>(crops.data(), crops.size()));
  19. | ^~~
  20. Upstream: https://github.com/raspberrypi/rpicam-apps/pull/827
  21. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  22. ---
  23. core/rpicam_app.cpp | 2 ++
  24. 1 file changed, 2 insertions(+)
  25. diff --git a/core/rpicam_app.cpp b/core/rpicam_app.cpp
  26. index bed69c0..1db784f 100644
  27. --- a/core/rpicam_app.cpp
  28. +++ b/core/rpicam_app.cpp
  29. @@ -637,6 +637,7 @@ void RPiCamApp::StartCamera()
  30. // This makes all the Request objects that we shall need.
  31. makeRequests();
  32. +#ifndef DISABLE_RPI_FEATURES
  33. // Build a list of initial controls that we must set in the camera before starting it.
  34. // We don't overwrite anything the application may have set before calling us.
  35. if (!controls_.get(controls::ScalerCrop) && !controls_.get(controls::rpi::ScalerCrops))
  36. @@ -672,6 +673,7 @@ void RPiCamApp::StartCamera()
  37. else
  38. controls_.set(controls::rpi::ScalerCrops, libcamera::Span<const Rectangle>(crops.data(), crops.size()));
  39. }
  40. +#endif
  41. if (!controls_.get(controls::AfWindows) && !controls_.get(controls::AfMetering) &&
  42. options_->Get().afWindow_width != 0 && options_->Get().afWindow_height != 0)
  43. --
  44. 2.39.5