summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/camera2/JpegProcessor.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-09-19 17:09:15 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-09-20 09:19:16 -0700
commit52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78 (patch)
treeb219692ff28ae15e1923e08b1cf234202c0e589b /services/camera/libcameraservice/camera2/JpegProcessor.cpp
parenta4247b833599882b23db39e9f773746dc2fd9693 (diff)
downloadframeworks_av-52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78.zip
frameworks_av-52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78.tar.gz
frameworks_av-52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78.tar.bz2
Camera2: State must be STOPPED before JPEG callback is fired.
Move handling of JPEG callback to CaptureSequencer instead of JpegProcessor, so that we can be sure the camera state is updated to STOPPED before the JPEG callback is sent to the application layer. Bug: 7172743 Change-Id: Ie8752d946d3eb8254230c77f10e5c38a83dc5371
Diffstat (limited to 'services/camera/libcameraservice/camera2/JpegProcessor.cpp')
-rw-r--r--services/camera/libcameraservice/camera2/JpegProcessor.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/services/camera/libcameraservice/camera2/JpegProcessor.cpp b/services/camera/libcameraservice/camera2/JpegProcessor.cpp
index b230d2d..7ab9c87 100644
--- a/services/camera/libcameraservice/camera2/JpegProcessor.cpp
+++ b/services/camera/libcameraservice/camera2/JpegProcessor.cpp
@@ -230,11 +230,6 @@ status_t JpegProcessor::processNewCapture(sp<Camera2Client> &client) {
return OK;
}
- sp<CaptureSequencer> sequencer = mSequencer.promote();
- if (sequencer != 0) {
- sequencer->onCaptureAvailable(imgBuffer.timestamp);
- }
-
// TODO: Optimize this to avoid memcopy
void* captureMemory = mCaptureHeap->mHeap->getBase();
size_t size = mCaptureHeap->mHeap->getSize();
@@ -242,16 +237,11 @@ status_t JpegProcessor::processNewCapture(sp<Camera2Client> &client) {
mCaptureConsumer->unlockBuffer(imgBuffer);
- captureHeap = mCaptureHeap;
-
- Camera2Client::SharedCameraClient::Lock l(client->mSharedCameraClient);
- ALOGV("%s: Sending still image to client", __FUNCTION__);
- if (l.mCameraClient != 0) {
- l.mCameraClient->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE,
- captureHeap->mBuffers[0], NULL);
- } else {
- ALOGV("%s: No client!", __FUNCTION__);
+ sp<CaptureSequencer> sequencer = mSequencer.promote();
+ if (sequencer != 0) {
+ sequencer->onCaptureAvailable(imgBuffer.timestamp, mCaptureHeap->mBuffers[0]);
}
+
return OK;
}