Camera: Various offline processing fixes
Notable fixes:
- Rework FrameProcessorBase so it accept and work with
offline sessions.
- Erase internal composite streams from offline stream list.
Bug: 135142453
Test: Camera CTS
Change-Id: I9dbc01e62fa94c1e0bfb84a8ddaa9e39ab4a7e34
diff --git a/services/camera/libcameraservice/common/CameraDeviceBase.h b/services/camera/libcameraservice/common/CameraDeviceBase.h
index 2aa1207..3662a65 100644
--- a/services/camera/libcameraservice/common/CameraDeviceBase.h
+++ b/services/camera/libcameraservice/common/CameraDeviceBase.h
@@ -34,6 +34,7 @@
#include "gui/IGraphicBufferProducer.h"
#include "device3/Camera3StreamInterface.h"
#include "binder/Status.h"
+#include "FrameProducer.h"
#include "CameraOfflineSessionBase.h"
@@ -48,16 +49,11 @@
* Base interface for version >= 2 camera device classes, which interface to
* camera HAL device versions >= 2.
*/
-class CameraDeviceBase : public virtual RefBase {
+class CameraDeviceBase : public virtual FrameProducer {
public:
virtual ~CameraDeviceBase();
/**
- * The device's camera ID
- */
- virtual const String8& getId() const = 0;
-
- /**
* The device vendor tag ID
*/
virtual metadata_vendor_id_t getVendorTagId() const = 0;
@@ -68,13 +64,9 @@
virtual status_t dump(int fd, const Vector<String16> &args) = 0;
/**
- * The device's static characteristics metadata buffer
- */
- virtual const CameraMetadata& info() const = 0;
- /**
* The physical camera device's static characteristics metadata buffer
*/
- virtual const CameraMetadata& info(const String8& physicalId) const = 0;
+ virtual const CameraMetadata& infoPhysical(const String8& physicalId) const = 0;
struct PhysicalCameraSettings {
std::string cameraId;
@@ -278,21 +270,6 @@
virtual bool willNotify3A() = 0;
/**
- * Wait for a new frame to be produced, with timeout in nanoseconds.
- * Returns TIMED_OUT when no frame produced within the specified duration
- * May be called concurrently to most methods, except for getNextFrame
- */
- virtual status_t waitForNextFrame(nsecs_t timeout) = 0;
-
- /**
- * Get next capture result frame from the result queue. Returns NOT_ENOUGH_DATA
- * if the queue is empty; caller takes ownership of the metadata buffer inside
- * the capture result object's metadata field.
- * May be called concurrently to most methods, except for waitForNextFrame.
- */
- virtual status_t getNextResult(CaptureResult *frame) = 0;
-
- /**
* Trigger auto-focus. The latest ID used in a trigger autofocus or cancel
* autofocus call will be returned by the HAL in all subsequent AF
* notifications.