Camera NDK library: capture session implementation
Bug: 23012001
Change-Id: I3fd93205dcf1b9ed5a947cb944919eb531f219fc
diff --git a/include/camera/camera2/OutputConfiguration.h b/include/camera/camera2/OutputConfiguration.h
index d6b74a9..137d98c 100644
--- a/include/camera/camera2/OutputConfiguration.h
+++ b/include/camera/camera2/OutputConfiguration.h
@@ -17,14 +17,13 @@
#ifndef ANDROID_HARDWARE_CAMERA2_OUTPUTCONFIGURATION_H
#define ANDROID_HARDWARE_CAMERA2_OUTPUTCONFIGURATION_H
-#include <utils/RefBase.h>
#include <gui/IGraphicBufferProducer.h>
namespace android {
class Surface;
-class OutputConfiguration : public virtual RefBase {
+class OutputConfiguration {
public:
static const int INVALID_ROTATION;
@@ -44,6 +43,22 @@
OutputConfiguration(sp<IGraphicBufferProducer>& gbp, int rotation,
int surfaceSetID = INVALID_SET_ID);
+ bool operator == (const OutputConfiguration& other) const {
+ return (mGbp == other.mGbp &&
+ mRotation == other.mRotation);
+ }
+ bool operator != (const OutputConfiguration& other) const {
+ return !(*this == other);
+ }
+ bool operator < (const OutputConfiguration& other) const {
+ if (*this == other) return false;
+ if (mGbp != other.mGbp) return mGbp < other.mGbp;
+ return mRotation < other.mRotation;
+ }
+ bool operator > (const OutputConfiguration& other) const {
+ return (*this != other && !(*this < other));
+ }
+
private:
sp<IGraphicBufferProducer> mGbp;
int mRotation;