diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
| commit | b798689749c64baba81f02e10cf2157c747d6b46 (patch) | |
| tree | da394a395ddb1a6cf69193314846b03fe47a397e /camera/libcameraservice/CameraService.h | |
| parent | f013e1afd1e68af5e3b868c26a653bbfb39538f8 (diff) | |
| download | frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.zip frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.gz frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.bz2 | |
auto import from //branches/cupcake/...@125939
Diffstat (limited to 'camera/libcameraservice/CameraService.h')
| -rw-r--r-- | camera/libcameraservice/CameraService.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h index b225aa9..cd8c1e9 100644 --- a/camera/libcameraservice/CameraService.h +++ b/camera/libcameraservice/CameraService.h @@ -73,6 +73,12 @@ private: // connect new client with existing camera remote virtual status_t connect(const sp<ICameraClient>& client); + // prevent other processes from using this ICamera interface + virtual status_t lock(); + + // allow other processes to use this ICamera interface + virtual status_t unlock(); + // pass the buffered ISurface to the camera service virtual status_t setPreviewDisplay(const sp<ISurface>& surface); @@ -86,6 +92,9 @@ private: // stop preview mode virtual void stopPreview(); + // get preview state + virtual bool previewEnabled(); + // auto focus virtual status_t autoFocus(); @@ -103,11 +112,14 @@ private: private: friend class CameraService; - Client( const sp<CameraService>& cameraService, - const sp<ICameraClient>& cameraClient); + Client(const sp<CameraService>& cameraService, + const sp<ICameraClient>& cameraClient, + pid_t clientPid); Client(); virtual ~Client(); + status_t checkPid(); + static void previewCallback(const sp<IMemory>& mem, void* user); static void shutterCallback(void *user); static void yuvPictureCallback(const sp<IMemory>& mem, void* user); @@ -132,7 +144,7 @@ private: // by the CameraHardwareInterface callback, and needs to // access mSurface. It cannot hold mLock, however, because // stopPreview() may be holding that lock while attempting - // top stop preview, and stopPreview itself will block waiting + // to stop preview, and stopPreview itself will block waiting // for a callback from CameraHardwareInterface. If this // happens, it will cause a deadlock. mutable Mutex mSurfaceLock; @@ -146,6 +158,7 @@ private: // they don't need to be protected by a lock sp<ICameraClient> mCameraClient; sp<CameraHardwareInterface> mHardware; + pid_t mClientPid; }; // ---------------------------------------------------------------------------- |
