|
28 | 28 | #include "hardware/camera2.h"
|
29 | 29 | #include "system/camera_metadata.h"
|
30 | 30 | #include "EmulatedBaseCamera.h"
|
| 31 | +#include <utils/Thread.h> |
| 32 | +#include <utils/Mutex.h> |
31 | 33 |
|
32 | 34 | namespace android {
|
33 | 35 |
|
@@ -128,7 +130,7 @@ class EmulatedCamera2 : public camera2_device, public EmulatedBaseCamera {
|
128 | 130 |
|
129 | 131 | /** 3A action triggering */
|
130 | 132 | virtual int triggerAction(uint32_t trigger_id,
|
131 |
| - int ext1, int ext2); |
| 133 | + int32_t ext1, int32_t ext2); |
132 | 134 |
|
133 | 135 | /** Custom tag definitions */
|
134 | 136 | virtual const char* getVendorSectionName(uint32_t tag);
|
@@ -232,21 +234,27 @@ class EmulatedCamera2 : public camera2_device, public EmulatedBaseCamera {
|
232 | 234 | * Data members shared with implementations
|
233 | 235 | ***************************************************************************/
|
234 | 236 | protected:
|
| 237 | + /** Mutex for calls through camera2 device interface */ |
| 238 | + Mutex mMutex; |
| 239 | + |
235 | 240 | const camera2_request_queue_src_ops *mRequestQueueSrc;
|
236 | 241 | const camera2_frame_queue_dst_ops *mFrameQueueDst;
|
237 |
| - camera2_notify_callback mNotifyCb; |
238 |
| - void* mNotifyUserPtr; |
239 | 242 |
|
240 | 243 | struct TagOps : public vendor_tag_query_ops {
|
241 | 244 | EmulatedCamera2 *parent;
|
242 | 245 | };
|
243 | 246 | TagOps mVendorTagOps;
|
244 | 247 |
|
| 248 | + void sendNotification(int32_t msgType, |
| 249 | + int32_t ext1, int32_t ext2, int32_t ext3); |
| 250 | + |
245 | 251 | /****************************************************************************
|
246 | 252 | * Data members
|
247 | 253 | ***************************************************************************/
|
248 | 254 | private:
|
249 | 255 | static camera2_device_ops_t sDeviceOps;
|
| 256 | + camera2_notify_callback mNotifyCb; |
| 257 | + void* mNotifyUserPtr; |
250 | 258 | };
|
251 | 259 |
|
252 | 260 | }; /* namespace android */
|
|
0 commit comments