diff options
author | Dan Stoza <stoza@google.com> | 2014-11-04 11:36:33 -0800 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2014-11-04 11:36:33 -0800 |
commit | 2c34b5e8136eac0332dac294cb06a6a98eac1c14 (patch) | |
tree | 69ae56dd2315d182b238f2759a3f8bf8362bee70 | |
parent | 946863b63c05eb3ea38f422d5a198e95b0cc2aaa (diff) | |
download | frameworks_base-2c34b5e8136eac0332dac294cb06a6a98eac1c14.zip frameworks_base-2c34b5e8136eac0332dac294cb06a6a98eac1c14.tar.gz frameworks_base-2c34b5e8136eac0332dac294cb06a6a98eac1c14.tar.bz2 |
Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.
Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
-rw-r--r-- | core/jni/android/graphics/SurfaceTexture.cpp | 4 | ||||
-rw-r--r-- | media/jni/android_media_ImageReader.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index eea16f1..eaca6d2 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -121,7 +121,7 @@ class JNISurfaceTextureContext : public GLConsumer::FrameAvailableListener public: JNISurfaceTextureContext(JNIEnv* env, jobject weakThiz, jclass clazz); virtual ~JNISurfaceTextureContext(); - virtual void onFrameAvailable(); + virtual void onFrameAvailable(const BufferItem& item); private: static JNIEnv* getJNIEnv(bool* needsDetach); @@ -177,7 +177,7 @@ JNISurfaceTextureContext::~JNISurfaceTextureContext() } } -void JNISurfaceTextureContext::onFrameAvailable() +void JNISurfaceTextureContext::onFrameAvailable(const BufferItem& /* item */) { bool needsDetach = false; JNIEnv* env = getJNIEnv(&needsDetach); diff --git a/media/jni/android_media_ImageReader.cpp b/media/jni/android_media_ImageReader.cpp index aaff9a2..7830c80 100644 --- a/media/jni/android_media_ImageReader.cpp +++ b/media/jni/android_media_ImageReader.cpp @@ -80,7 +80,7 @@ public: virtual ~JNIImageReaderContext(); - virtual void onFrameAvailable(); + virtual void onFrameAvailable(const BufferItem& item); CpuConsumer::LockedBuffer* getLockedBuffer(); @@ -187,7 +187,7 @@ JNIImageReaderContext::~JNIImageReaderContext() { mConsumer.clear(); } -void JNIImageReaderContext::onFrameAvailable() +void JNIImageReaderContext::onFrameAvailable(const BufferItem& /*item*/) { ALOGV("%s: frame available", __FUNCTION__); bool needsDetach = false; |