diff options
Diffstat (limited to 'camera/libcameraservice/CameraService.h')
-rw-r--r-- | camera/libcameraservice/CameraService.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h index 6752f26..ea93789 100644 --- a/camera/libcameraservice/CameraService.h +++ b/camera/libcameraservice/CameraService.h @@ -58,10 +58,8 @@ public: void removeClient(const sp<ICameraClient>& cameraClient); -#if DEBUG_HEAP_LEAKS virtual status_t onTransact( uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags); -#endif private: @@ -134,7 +132,7 @@ private: status_t checkPid(); - static void recordingCallback(const sp<IMemory>& mem, void* user); + static void recordingCallback(nsecs_t timestamp, const sp<IMemory>& mem, void* user); static void previewCallback(const sp<IMemory>& mem, void* user); static void shutterCallback(void *user); static void yuvPictureCallback(const sp<IMemory>& mem, void* user); @@ -146,7 +144,7 @@ private: void postRaw(const sp<IMemory>& mem); void postJpeg(const sp<IMemory>& mem); void postPreviewFrame(const sp<IMemory>& mem); - void postRecordingFrame(const sp<IMemory>& frame); + void postRecordingFrame(nsecs_t timestamp, const sp<IMemory>& frame); void copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size); void postError(status_t error); void postAutoFocus(bool focused); @@ -159,6 +157,8 @@ private: status_t startCameraMode(camera_mode mode); status_t startPreviewMode(); status_t startRecordingMode(); + status_t setOverlay(); + status_t registerPreviewBuffers(); // Ensures atomicity among the public methods mutable Mutex mLock; @@ -196,7 +196,12 @@ private: CameraService(); virtual ~CameraService(); - mutable Mutex mLock; + // We use a count for number of clients (shoule only be 0 or 1). + volatile int32_t mUsers; + virtual void incUsers(); + virtual void decUsers(); + + mutable Mutex mServiceLock; wp<Client> mClient; #if DEBUG_HEAP_LEAKS |