summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-10-18 20:42:51 -0700
committerJames Dong <jdong@google.com>2010-10-19 23:07:08 -0700
commite2ad6734eccc4b9ea7857c747ff9469a9c11ba09 (patch)
treeadefb903549a218f19eb6f8a624bf532e6fa7580 /services/camera/libcameraservice/CameraService.cpp
parentf705b5aa8c3b319f7b49f9ea46207187278076f9 (diff)
downloadframeworks_av-e2ad6734eccc4b9ea7857c747ff9469a9c11ba09.zip
frameworks_av-e2ad6734eccc4b9ea7857c747ff9469a9c11ba09.tar.gz
frameworks_av-e2ad6734eccc4b9ea7857c747ff9469a9c11ba09.tar.bz2
Camera framework change required for 0-memcpy recording
bug - 3042125 Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
Diffstat (limited to 'services/camera/libcameraservice/CameraService.cpp')
-rw-r--r--services/camera/libcameraservice/CameraService.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index d09dfff..2bfdc29 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -304,7 +304,6 @@ CameraService::Client::Client(const sp<CameraService>& cameraService,
mClientPid = clientPid;
mUseOverlay = mHardware->useOverlay();
mMsgEnabled = 0;
-
mHardware->setCallbacks(notifyCallback,
dataCallback,
dataCallbackTimestamp,
@@ -706,6 +705,30 @@ 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");
+ Mutex::Autolock lock(mLock);
+ if (checkPidAndHardware() != NO_ERROR) {
+ return UNKNOWN_ERROR;
+ }
+ return mHardware->storeMetaDataInBuffers(enabled);
+}
+
bool CameraService::Client::previewEnabled() {
LOG1("previewEnabled (pid %d)", getCallingPid());