cameraserver: Add support for session specific hal buffer manager switches
With ICameraDeviceSession V3, it is possible for HALs to toggle HAL
buffer manager on and off depending on the session configuration.
Add support to cameraserver to switch HAL buffer manager behavior
for the session - depending on what the HAL decides.
Bug: 311263114
Test: Use GCA on device not advertising session hal buffer manager
Test: Camera CTS on cuttlefish
Change-Id: Ie7948a24e54bb920f49cf0c0ce61f42a4c8d09f7
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.h b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.h
index c2ff20e..90914d4 100644
--- a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.h
+++ b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.h
@@ -51,6 +51,8 @@
virtual ~Camera3SharedOutputStream();
+ void setHalBufferManager(bool enabled) override;
+
virtual status_t notifyBufferReleased(ANativeWindowBuffer *buffer);
virtual bool isConsumerConfigurationDeferred(size_t surface_id) const;
@@ -85,7 +87,7 @@
// Whether HAL is in control for buffer management. Surface sharing behavior
// depends on this flag.
- const bool mUseHalBufManager;
+ bool mUseHalBufManager;
// Pair of an output Surface and its unique ID
typedef std::pair<sp<Surface>, size_t> SurfaceUniqueId;