Camera2: Break out individual commands
- List all commands that need implementing in sendCommand
- Write skeleton methods for each one
- Implements playRecordingSound command
- Partially implements enableShutterSound command
Bug: 6243944
Change-Id: I7866df75adca09483f407d3a4f630e847dbc7721
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h
index 9bea8f1..6651507 100644
--- a/services/camera/libcameraservice/Camera2Client.h
+++ b/services/camera/libcameraservice/Camera2Client.h
@@ -86,16 +86,28 @@
/** ICamera interface-related private members */
// Mutex that must be locked by methods implementing the ICamera interface.
- // Ensures serialization between incoming ICamera calls
+ // Ensures serialization between incoming ICamera calls. All methods below
+ // that append 'L' to the name assume that mICameraLock is locked when
+ // they're called
mutable Mutex mICameraLock;
- // The following must be called with mICameraLock already locked
-
- status_t setPreviewWindowLocked(const sp<IBinder>& binder,
+ status_t setPreviewWindowL(const sp<IBinder>& binder,
sp<ANativeWindow> window);
- void stopPreviewLocked();
- status_t startPreviewLocked();
+ void stopPreviewL();
+ status_t startPreviewL();
+
+ // Individual commands for sendCommand()
+ status_t commandStartSmoothZoomL();
+ status_t commandStopSmoothZoomL();
+ status_t commandSetDisplayOrientationL(int degrees);
+ status_t commandEnableShutterSoundL(bool enable);
+ status_t commandPlayRecordingSoundL();
+ status_t commandStartFaceDetectionL(int type);
+ status_t commandStopFaceDetectionL();
+ status_t commandEnableFocusMoveMsgL(bool enable);
+ status_t commandPingL();
+ status_t commandSetVideoBufferCountL(size_t count);
// Current camera state; this is the contents of the CameraParameters object
// in a more-efficient format. The enum values are mostly based off the
@@ -169,9 +181,12 @@
bool recordingHint;
bool videoStabilization;
- bool storeMetadataInBuffers;
-
String8 paramsFlattened;
+
+ // These parameters are also part of the camera API-visible state, but not directly
+ // listed in Camera.Parameters
+ bool storeMetadataInBuffers;
+ bool playShutterSound;
};
class LockedParameters {