Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ANDROID_SERVERS_CAMERA_CAMERA2CLIENT_H |
| 18 | #define ANDROID_SERVERS_CAMERA_CAMERA2CLIENT_H |
| 19 | |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 20 | #include "CameraService.h" |
Eino-Ville Talvala | 7b82efe | 2013-07-25 17:12:35 -0700 | [diff] [blame] | 21 | #include "common/CameraDeviceBase.h" |
| 22 | #include "common/Camera2ClientBase.h" |
| 23 | #include "api1/client2/Parameters.h" |
| 24 | #include "api1/client2/FrameProcessor.h" |
| 25 | //#include "api1/client2/StreamingProcessor.h" |
| 26 | //#include "api1/client2/JpegProcessor.h" |
Eino-Ville Talvala | d309fb9 | 2015-11-25 12:12:45 -0800 | [diff] [blame] | 27 | //#include "api1/client2/ZslProcessor.h" |
Eino-Ville Talvala | 7b82efe | 2013-07-25 17:12:35 -0700 | [diff] [blame] | 28 | //#include "api1/client2/CaptureSequencer.h" |
| 29 | //#include "api1/client2/CallbackProcessor.h" |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 30 | |
| 31 | namespace android { |
| 32 | |
Eino-Ville Talvala | 7b82efe | 2013-07-25 17:12:35 -0700 | [diff] [blame] | 33 | namespace camera2 { |
| 34 | |
| 35 | class StreamingProcessor; |
| 36 | class JpegProcessor; |
Eino-Ville Talvala | d309fb9 | 2015-11-25 12:12:45 -0800 | [diff] [blame] | 37 | class ZslProcessor; |
Eino-Ville Talvala | 7b82efe | 2013-07-25 17:12:35 -0700 | [diff] [blame] | 38 | class CaptureSequencer; |
| 39 | class CallbackProcessor; |
| 40 | |
| 41 | } |
| 42 | |
Eino-Ville Talvala | 73bbd1f | 2012-09-26 10:45:47 -0700 | [diff] [blame] | 43 | class IMemory; |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 44 | /** |
Eino-Ville Talvala | b99c5b8 | 2013-02-06 17:20:07 -0800 | [diff] [blame] | 45 | * Interface between android.hardware.Camera API and Camera HAL device for versions |
Eino-Ville Talvala | d309fb9 | 2015-11-25 12:12:45 -0800 | [diff] [blame] | 46 | * CAMERA_DEVICE_API_VERSION_3_0 and above. |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 47 | */ |
Eino-Ville Talvala | 8ce89d9 | 2012-08-10 08:40:26 -0700 | [diff] [blame] | 48 | class Camera2Client : |
Igor Murashkin | 44cfcf0 | 2013-03-01 16:22:28 -0800 | [diff] [blame] | 49 | public Camera2ClientBase<CameraService::Client> |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 50 | { |
| 51 | public: |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 52 | /** |
| 53 | * ICamera interface (see ICamera for details) |
| 54 | */ |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 55 | |
Eino-Ville Talvala | d56db1d | 2015-12-17 16:50:35 -0800 | [diff] [blame] | 56 | virtual binder::Status disconnect(); |
| 57 | virtual status_t connect(const sp<hardware::ICameraClient>& client); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 58 | virtual status_t lock(); |
| 59 | virtual status_t unlock(); |
Eino-Ville Talvala | 1ce7c34 | 2013-08-21 13:57:21 -0700 | [diff] [blame] | 60 | virtual status_t setPreviewTarget( |
Andy McFadden | 8ba0102 | 2012-12-18 09:46:54 -0800 | [diff] [blame] | 61 | const sp<IGraphicBufferProducer>& bufferProducer); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 62 | virtual void setPreviewCallbackFlag(int flag); |
Eino-Ville Talvala | 3ee3550 | 2013-04-02 15:45:11 -0700 | [diff] [blame] | 63 | virtual status_t setPreviewCallbackTarget( |
| 64 | const sp<IGraphicBufferProducer>& callbackProducer); |
| 65 | |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 66 | virtual status_t startPreview(); |
| 67 | virtual void stopPreview(); |
| 68 | virtual bool previewEnabled(); |
Chien-Yu Chen | 8cca075 | 2015-11-13 15:28:48 -0800 | [diff] [blame] | 69 | virtual status_t setVideoBufferMode(int32_t videoBufferMode); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 70 | virtual status_t startRecording(); |
| 71 | virtual void stopRecording(); |
| 72 | virtual bool recordingEnabled(); |
| 73 | virtual void releaseRecordingFrame(const sp<IMemory>& mem); |
Chien-Yu Chen | 2d13b1d | 2016-04-28 12:11:20 -0700 | [diff] [blame] | 74 | virtual void releaseRecordingFrameHandle(native_handle_t *handle); |
Yin-Chia Yeh | b5df547 | 2017-03-20 19:32:19 -0700 | [diff] [blame] | 75 | virtual void releaseRecordingFrameHandleBatch( |
| 76 | const std::vector<native_handle_t*>& handles); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 77 | virtual status_t autoFocus(); |
| 78 | virtual status_t cancelAutoFocus(); |
| 79 | virtual status_t takePicture(int msgType); |
| 80 | virtual status_t setParameters(const String8& params); |
| 81 | virtual String8 getParameters() const; |
| 82 | virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2); |
Eino-Ville Talvala | d56db1d | 2015-12-17 16:50:35 -0800 | [diff] [blame] | 83 | virtual void notifyError(int32_t errorCode, |
Ruben Brunk | a485dfe | 2015-04-14 13:43:47 -0700 | [diff] [blame] | 84 | const CaptureResultExtras& resultExtras); |
Chien-Yu Chen | 8cca075 | 2015-11-13 15:28:48 -0800 | [diff] [blame] | 85 | virtual status_t setVideoTarget(const sp<IGraphicBufferProducer>& bufferProducer); |
Yin-Chia Yeh | cfab4e1 | 2019-09-09 13:08:28 -0700 | [diff] [blame] | 86 | virtual status_t setAudioRestriction(int mode); |
| 87 | virtual int32_t getGlobalAudioRestriction(); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 88 | |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 89 | /** |
| 90 | * Interface used by CameraService |
| 91 | */ |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 92 | |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 93 | Camera2Client(const sp<CameraService>& cameraService, |
Eino-Ville Talvala | d56db1d | 2015-12-17 16:50:35 -0800 | [diff] [blame] | 94 | const sp<hardware::ICameraClient>& cameraClient, |
Eino-Ville Talvala | ceb388d | 2013-02-19 10:40:14 -0800 | [diff] [blame] | 95 | const String16& clientPackageName, |
Philip P. Moltmann | 9e648f6 | 2019-11-04 12:52:45 -0800 | [diff] [blame] | 96 | const std::unique_ptr<String16>& clientFeatureId, |
Yin-Chia Yeh | c3e9d6f | 2018-02-06 10:56:32 -0800 | [diff] [blame] | 97 | const String8& cameraDeviceId, |
| 98 | int api1CameraId, |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 99 | int cameraFacing, |
Igor Murashkin | ecf17e8 | 2012-10-02 16:05:11 -0700 | [diff] [blame] | 100 | int clientPid, |
Eino-Ville Talvala | ceb388d | 2013-02-19 10:40:14 -0800 | [diff] [blame] | 101 | uid_t clientUid, |
Shuzhen Wang | 06fcfb0 | 2018-07-30 18:23:31 -0700 | [diff] [blame] | 102 | int servicePid); |
Eino-Ville Talvala | b99c5b8 | 2013-02-06 17:20:07 -0800 | [diff] [blame] | 103 | |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 104 | virtual ~Camera2Client(); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 105 | |
Emilian Peev | bd8c503 | 2018-02-14 23:05:40 +0000 | [diff] [blame] | 106 | virtual status_t initialize(sp<CameraProviderManager> manager, |
| 107 | const String8& monitorTags) override; |
Eino-Ville Talvala | f69c70d | 2012-05-20 15:59:14 -0700 | [diff] [blame] | 108 | |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 109 | virtual status_t dump(int fd, const Vector<String16>& args); |
| 110 | |
Eino-Ville Talvala | c400396 | 2016-01-13 10:07:04 -0800 | [diff] [blame] | 111 | virtual status_t dumpClient(int fd, const Vector<String16>& args); |
| 112 | |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 113 | /** |
Eino-Ville Talvala | b99c5b8 | 2013-02-06 17:20:07 -0800 | [diff] [blame] | 114 | * Interface used by CameraDeviceBase |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 115 | */ |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 116 | |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 117 | virtual void notifyAutoFocus(uint8_t newState, int triggerId); |
| 118 | virtual void notifyAutoExposure(uint8_t newState, int triggerId); |
Yin-Chia Yeh | 216db74 | 2015-05-18 15:03:35 -0700 | [diff] [blame] | 119 | virtual void notifyShutter(const CaptureResultExtras& resultExtras, |
| 120 | nsecs_t timestamp); |
Eino-Ville Talvala | 160d4af | 2012-08-03 09:40:16 -0700 | [diff] [blame] | 121 | |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 122 | /** |
| 123 | * Interface used by independent components of Camera2Client. |
| 124 | */ |
Eino-Ville Talvala | a16733e | 2012-08-27 23:41:56 -0700 | [diff] [blame] | 125 | |
Eino-Ville Talvala | a16733e | 2012-08-27 23:41:56 -0700 | [diff] [blame] | 126 | camera2::SharedParameters& getParameters(); |
| 127 | |
Emilian Peev | 2a8e283 | 2019-08-23 13:00:31 -0700 | [diff] [blame] | 128 | void notifyRequestId(int32_t requestId); |
| 129 | |
Eino-Ville Talvala | da6665c | 2012-08-29 17:37:16 -0700 | [diff] [blame] | 130 | int getPreviewStreamId() const; |
| 131 | int getCaptureStreamId() const; |
| 132 | int getCallbackStreamId() const; |
| 133 | int getRecordingStreamId() const; |
| 134 | int getZslStreamId() const; |
| 135 | |
Eino-Ville Talvala | 4865c52 | 2012-10-02 13:30:28 -0700 | [diff] [blame] | 136 | status_t registerFrameListener(int32_t minId, int32_t maxId, |
Chih-Hung Hsieh | 8b0b971 | 2016-08-09 14:25:53 -0700 | [diff] [blame] | 137 | const wp<camera2::FrameProcessor::FilteredListener>& listener, |
Zhijun He | 25a0aef | 2014-06-25 11:40:02 -0700 | [diff] [blame] | 138 | bool sendPartials = true); |
Eino-Ville Talvala | 4865c52 | 2012-10-02 13:30:28 -0700 | [diff] [blame] | 139 | status_t removeFrameListener(int32_t minId, int32_t maxId, |
Chih-Hung Hsieh | 8b0b971 | 2016-08-09 14:25:53 -0700 | [diff] [blame] | 140 | const wp<camera2::FrameProcessor::FilteredListener>& listener); |
Eino-Ville Talvala | 4865c52 | 2012-10-02 13:30:28 -0700 | [diff] [blame] | 141 | |
| 142 | status_t stopStream(); |
Eino-Ville Talvala | da6665c | 2012-08-29 17:37:16 -0700 | [diff] [blame] | 143 | |
Yin-Chia Yeh | 355d9c6 | 2015-02-24 15:51:43 -0800 | [diff] [blame] | 144 | // For the slowJpegMode to create jpeg stream when precapture sequence is done |
| 145 | status_t createJpegStreamL(camera2::Parameters ¶ms); |
| 146 | |
Eino-Ville Talvala | ea0d51b | 2012-08-28 01:25:43 -0700 | [diff] [blame] | 147 | static size_t calculateBufferSize(int width, int height, |
| 148 | int format, int stride); |
| 149 | |
Eino-Ville Talvala | 4865c52 | 2012-10-02 13:30:28 -0700 | [diff] [blame] | 150 | static const int32_t kPreviewRequestIdStart = 10000000; |
| 151 | static const int32_t kPreviewRequestIdEnd = 20000000; |
| 152 | |
| 153 | static const int32_t kRecordingRequestIdStart = 20000000; |
| 154 | static const int32_t kRecordingRequestIdEnd = 30000000; |
| 155 | |
| 156 | static const int32_t kCaptureRequestIdStart = 30000000; |
| 157 | static const int32_t kCaptureRequestIdEnd = 40000000; |
Eino-Ville Talvala | da6665c | 2012-08-29 17:37:16 -0700 | [diff] [blame] | 158 | |
Eino-Ville Talvala | 2b07e02 | 2013-10-10 15:13:09 -0700 | [diff] [blame] | 159 | // Constant strings for ATRACE logging |
| 160 | static const char* kAutofocusLabel; |
| 161 | static const char* kTakepictureLabel; |
| 162 | |
Yin-Chia Yeh | 355d9c6 | 2015-02-24 15:51:43 -0800 | [diff] [blame] | 163 | // Used with stream IDs |
| 164 | static const int NO_STREAM = -1; |
| 165 | |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 166 | private: |
Eino-Ville Talvala | 3cca136 | 2012-06-07 10:07:18 -0700 | [diff] [blame] | 167 | /** ICamera interface-related private members */ |
Eino-Ville Talvala | 2e19c3c | 2012-08-26 09:29:28 -0700 | [diff] [blame] | 168 | typedef camera2::Parameters Parameters; |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 169 | |
Eino-Ville Talvala | 36cdfb1 | 2012-08-02 17:34:15 -0700 | [diff] [blame] | 170 | status_t setPreviewWindowL(const sp<IBinder>& binder, |
Chih-Hung Hsieh | 8b0b971 | 2016-08-09 14:25:53 -0700 | [diff] [blame] | 171 | const sp<Surface>& window); |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 172 | status_t startPreviewL(Parameters ¶ms, bool restart); |
| 173 | void stopPreviewL(); |
| 174 | status_t startRecordingL(Parameters ¶ms, bool restart); |
| 175 | bool recordingEnabledL(); |
James Dong | 8da4cd7 | 2012-08-04 19:58:07 -0700 | [diff] [blame] | 176 | |
Eino-Ville Talvala | 36cdfb1 | 2012-08-02 17:34:15 -0700 | [diff] [blame] | 177 | // Individual commands for sendCommand() |
| 178 | status_t commandStartSmoothZoomL(); |
| 179 | status_t commandStopSmoothZoomL(); |
| 180 | status_t commandSetDisplayOrientationL(int degrees); |
| 181 | status_t commandEnableShutterSoundL(bool enable); |
| 182 | status_t commandPlayRecordingSoundL(); |
| 183 | status_t commandStartFaceDetectionL(int type); |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 184 | status_t commandStopFaceDetectionL(Parameters ¶ms); |
Eino-Ville Talvala | 36cdfb1 | 2012-08-02 17:34:15 -0700 | [diff] [blame] | 185 | status_t commandEnableFocusMoveMsgL(bool enable); |
| 186 | status_t commandPingL(); |
| 187 | status_t commandSetVideoBufferCountL(size_t count); |
Eino-Ville Talvala | d46a6b9 | 2015-05-14 17:26:24 -0700 | [diff] [blame] | 188 | status_t commandSetVideoFormatL(int format, android_dataspace dataSpace); |
Eino-Ville Talvala | d4bcfde | 2012-06-07 17:12:38 -0700 | [diff] [blame] | 189 | |
Eino-Ville Talvala | 2e19c3c | 2012-08-26 09:29:28 -0700 | [diff] [blame] | 190 | // Current camera device configuration |
| 191 | camera2::SharedParameters mParameters; |
Eino-Ville Talvala | 8ce89d9 | 2012-08-10 08:40:26 -0700 | [diff] [blame] | 192 | |
Eino-Ville Talvala | 3cca136 | 2012-06-07 10:07:18 -0700 | [diff] [blame] | 193 | /** Camera device-related private members */ |
| 194 | |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 195 | void setPreviewCallbackFlagL(Parameters ¶ms, int flag); |
Eino-Ville Talvala | 5a4f93e | 2012-08-29 18:06:32 -0700 | [diff] [blame] | 196 | status_t updateRequests(Parameters ¶ms); |
Eino-Ville Talvala | 8ce89d9 | 2012-08-10 08:40:26 -0700 | [diff] [blame] | 197 | |
Igor Murashkin | dca254a | 2013-05-13 14:53:44 -0700 | [diff] [blame] | 198 | template <typename ProcessorT> |
| 199 | status_t updateProcessorStream(sp<ProcessorT> processor, Parameters params); |
Igor Murashkin | 82db9e6 | 2013-05-21 11:38:49 -0700 | [diff] [blame] | 200 | template <typename ProcessorT, |
| 201 | status_t (ProcessorT::*updateStreamF)(const Parameters &)> |
| 202 | status_t updateProcessorStream(sp<ProcessorT> processor, Parameters params); |
Igor Murashkin | dca254a | 2013-05-13 14:53:44 -0700 | [diff] [blame] | 203 | |
Eino-Ville Talvala | a16733e | 2012-08-27 23:41:56 -0700 | [diff] [blame] | 204 | sp<camera2::FrameProcessor> mFrameProcessor; |
Eino-Ville Talvala | 8ce89d9 | 2012-08-10 08:40:26 -0700 | [diff] [blame] | 205 | |
Eino-Ville Talvala | 73bbd1f | 2012-09-26 10:45:47 -0700 | [diff] [blame] | 206 | /* Preview/Recording related members */ |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 207 | |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 208 | sp<IBinder> mPreviewSurface; |
Chien-Yu Chen | 8cca075 | 2015-11-13 15:28:48 -0800 | [diff] [blame] | 209 | sp<IBinder> mVideoSurface; |
Eino-Ville Talvala | 73bbd1f | 2012-09-26 10:45:47 -0700 | [diff] [blame] | 210 | sp<camera2::StreamingProcessor> mStreamingProcessor; |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 211 | |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 212 | /** Preview callback related members */ |
| 213 | |
Eino-Ville Talvala | d86a688 | 2012-08-28 11:34:14 -0700 | [diff] [blame] | 214 | sp<camera2::CallbackProcessor> mCallbackProcessor; |
Eino-Ville Talvala | 228a538 | 2012-08-13 12:16:06 -0700 | [diff] [blame] | 215 | |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 216 | /* Still image capture related members */ |
| 217 | |
Eino-Ville Talvala | da6665c | 2012-08-29 17:37:16 -0700 | [diff] [blame] | 218 | sp<camera2::CaptureSequencer> mCaptureSequencer; |
| 219 | sp<camera2::JpegProcessor> mJpegProcessor; |
Eino-Ville Talvala | d309fb9 | 2015-11-25 12:12:45 -0800 | [diff] [blame] | 220 | sp<camera2::ZslProcessor> mZslProcessor; |
Eino-Ville Talvala | 174181e | 2012-08-03 13:53:39 -0700 | [diff] [blame] | 221 | |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 222 | /** Utility members */ |
Igor Murashkin | a858ea0 | 2014-08-19 14:53:08 -0700 | [diff] [blame] | 223 | bool mLegacyMode; |
Eino-Ville Talvala | 9cca4c6 | 2012-06-15 15:41:44 -0700 | [diff] [blame] | 224 | |
Eino-Ville Talvala | 4865c52 | 2012-10-02 13:30:28 -0700 | [diff] [blame] | 225 | // Wait until the camera device has received the latest control settings |
| 226 | status_t syncWithDevice(); |
Yin-Chia Yeh | a53021f | 2014-09-12 14:50:27 -0700 | [diff] [blame] | 227 | |
| 228 | // Video snapshot jpeg size overriding helper function |
| 229 | status_t overrideVideoSnapshotSize(Parameters ¶ms); |
Yin-Chia Yeh | dce65c8 | 2017-01-06 15:03:53 -0800 | [diff] [blame] | 230 | |
| 231 | template<typename TProviderPtr> |
Emilian Peev | bd8c503 | 2018-02-14 23:05:40 +0000 | [diff] [blame] | 232 | status_t initializeImpl(TProviderPtr providerPtr, const String8& monitorTags); |
Chien-Yu Chen | fa52c0f | 2017-08-22 17:50:54 -0700 | [diff] [blame] | 233 | |
| 234 | bool isZslEnabledInStillTemplate(); |
Emilian Peev | 2a8e283 | 2019-08-23 13:00:31 -0700 | [diff] [blame] | 235 | |
| 236 | mutable Mutex mLatestRequestMutex; |
| 237 | Condition mLatestRequestSignal; |
| 238 | int32_t mLatestRequestId = -1; |
| 239 | status_t waitUntilRequestIdApplied(int32_t requestId, nsecs_t timeout); |
| 240 | status_t waitUntilCurrentRequestIdLocked(); |
Eino-Ville Talvala | 61ab9f9 | 2012-05-17 10:30:54 -0700 | [diff] [blame] | 241 | }; |
| 242 | |
| 243 | }; // namespace android |
| 244 | |
| 245 | #endif |