summaryrefslogtreecommitdiffstats
path: root/cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp')
-rw-r--r--cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp b/cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp
index 9eb1396..227f4fa 100644
--- a/cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp
+++ b/cpcam/jni/com_ti_omap_android_cpcam_CPCamBufferQueue.cpp
@@ -360,6 +360,13 @@ static void CPCamBufferQueue_release(JNIEnv* env, jobject thiz)
env->SetIntField(thiz, fields.context, 0);
}
+static jstring CPCamBufferQueue_getId(JNIEnv* env, jobject thiz)
+{
+ sp<BufferQueue> bufferQueue(CPCamBufferQueue_getCPCamBufferQueue(env, thiz));
+ String8 id = bufferQueue->getId();
+ return env->NewStringUTF(id.string());
+}
+
// ----------------------------------------------------------------------------
static JNINativeMethod gCPCamBufferQueueMethods[] = {
@@ -371,6 +378,7 @@ static JNINativeMethod gCPCamBufferQueueMethods[] = {
{"nativeReleaseBuffer", "(I)V", (void*)CPCamBufferQueue_releaseBuffer },
{"nativeGetTimestamp", "(I)J", (void*)CPCamBufferQueue_getTimestamp },
{"nativeRelease", "()V", (void*)CPCamBufferQueue_release },
+ {"nativeGetId", "()Ljava/lang/String;", (void*)CPCamBufferQueue_getId },
};
struct field {