diff options
author | Iliyan Malchev <malchev@google.com> | 2011-03-28 16:10:12 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-03-28 16:28:57 -0700 |
commit | 40c364136f09e82602692f359bcf8aa9b0df18d3 (patch) | |
tree | 0f4c13679a5dca5199c38285c5e85455e794e9b5 /services/camera | |
parent | 45538666db67a3fd528765b22bd4da30280128ef (diff) | |
download | frameworks_base-40c364136f09e82602692f359bcf8aa9b0df18d3.zip frameworks_base-40c364136f09e82602692f359bcf8aa9b0df18d3.tar.gz frameworks_base-40c364136f09e82602692f359bcf8aa9b0df18d3.tar.bz2 |
frameworks/base: some camera-interface cleanup
Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)
Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 20 | ||||
-rw-r--r-- | services/camera/libcameraservice/CameraService.h | 4 |
2 files changed, 3 insertions, 21 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index a09e16b..f3c9959 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -666,20 +666,6 @@ void CameraService::Client::releaseRecordingFrame(const sp<IMemory>& mem) { mHardware->releaseRecordingFrame(mem); } -int32_t CameraService::Client::getNumberOfVideoBuffers() const { - LOG1("getNumberOfVideoBuffers"); - Mutex::Autolock lock(mLock); - if (checkPidAndHardware() != NO_ERROR) return 0; - return mHardware->getNumberOfVideoBuffers(); -} - -sp<IMemory> CameraService::Client::getVideoBuffer(int32_t index) const { - LOG1("getVideoBuffer: %d", index); - Mutex::Autolock lock(mLock); - if (checkPidAndHardware() != NO_ERROR) return 0; - return mHardware->getVideoBuffer(index); -} - status_t CameraService::Client::storeMetaDataInBuffers(bool enabled) { LOG1("storeMetaDataInBuffers: %s", enabled? "true": "false"); @@ -938,7 +924,7 @@ void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, switch (msgType) { case CAMERA_MSG_SHUTTER: // ext1 is the dimension of the yuv picture. - client->handleShutter((image_rect_type *)ext1); + client->handleShutter(); break; default: client->handleGenericNotify(msgType, ext1, ext2); @@ -997,9 +983,7 @@ void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp, } // snapshot taken callback -// "size" is the width and height of yuv picture for registerBuffer. -// If it is NULL, use the picture size from parameters. -void CameraService::Client::handleShutter(image_rect_type *size) { +void CameraService::Client::handleShutter(void) { if (mPlayShutterSound) { mCameraService->playSound(SOUND_SHUTTER); } diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h index 1c43b00..28e8cc0 100644 --- a/services/camera/libcameraservice/CameraService.h +++ b/services/camera/libcameraservice/CameraService.h @@ -99,8 +99,6 @@ private: virtual status_t startPreview(); virtual void stopPreview(); virtual bool previewEnabled(); - virtual int32_t getNumberOfVideoBuffers() const; - virtual sp<IMemory> getVideoBuffer(int32_t index) const; virtual status_t storeMetaDataInBuffers(bool enabled); virtual status_t startRecording(); virtual void stopRecording(); @@ -152,7 +150,7 @@ private: // convert client from cookie static sp<Client> getClientFromCookie(void* user); // handlers for messages - void handleShutter(image_rect_type *size); + void handleShutter(void); void handlePreviewData(const sp<IMemory>& mem); void handlePostview(const sp<IMemory>& mem); void handleRawPicture(const sp<IMemory>& mem); |