summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2014-04-28 16:31:11 -0700
committerRuben Brunk <rubenbrunk@google.com>2014-05-16 23:25:51 -0700
commitf967a5486a78db244624fde4c105aa5e6fa914b9 (patch)
tree4b4f9cfe09af0e82e625b13f4818af297000dbc3 /core/jni
parent241cdab7597c9f6f203057125c9d629c285d574d (diff)
downloadframeworks_base-f967a5486a78db244624fde4c105aa5e6fa914b9.zip
frameworks_base-f967a5486a78db244624fde4c105aa5e6fa914b9.tar.gz
frameworks_base-f967a5486a78db244624fde4c105aa5e6fa914b9.tar.bz2
camera2: Plumb DngCreator to native library.
Change-Id: Ic58bf6cf5086808b503460ef8e451fc0d6f1f850
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/Android.mk1
-rw-r--r--core/jni/android_hardware_camera2_CameraMetadata.cpp26
2 files changed, 27 insertions, 0 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 0ad2ab2..99bbe39 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -228,6 +228,7 @@ LOCAL_SHARED_LIBRARIES := \
libz \
libaudioutils \
libpdfrenderer \
+ libimg_utils \
ifeq ($(USE_OPENGL_RENDERER),true)
LOCAL_SHARED_LIBRARIES += libhwui
diff --git a/core/jni/android_hardware_camera2_CameraMetadata.cpp b/core/jni/android_hardware_camera2_CameraMetadata.cpp
index fa2cfe3..3312109 100644
--- a/core/jni/android_hardware_camera2_CameraMetadata.cpp
+++ b/core/jni/android_hardware_camera2_CameraMetadata.cpp
@@ -30,6 +30,7 @@
#include "JNIHelp.h"
#include "android_os_Parcel.h"
#include "android_runtime/AndroidRuntime.h"
+#include "android_runtime/android_hardware_camera2_CameraMetadata.h"
#include <binder/IServiceManager.h>
#include <camera/CameraMetadata.h>
@@ -57,6 +58,31 @@ struct fields_t {
static fields_t fields;
+namespace android {
+
+status_t CameraMetadata_getNativeMetadata(JNIEnv* env, jobject thiz,
+ /*out*/CameraMetadata* metadata) {
+ if (!thiz) {
+ ALOGE("%s: Invalid java metadata object.", __FUNCTION__);
+ return BAD_VALUE;
+ }
+
+ if (!metadata) {
+ ALOGE("%s: Invalid output metadata object.", __FUNCTION__);
+ return BAD_VALUE;
+ }
+ CameraMetadata* nativePtr = reinterpret_cast<CameraMetadata*>(env->GetLongField(thiz,
+ fields.metadata_ptr));
+ if (nativePtr == NULL) {
+ ALOGE("%s: Invalid native pointer in java metadata object.", __FUNCTION__);
+ return BAD_VALUE;
+ }
+ *metadata = *nativePtr;
+ return OK;
+}
+
+} /*namespace android*/
+
namespace {
struct Helpers {
static size_t getTypeSize(uint8_t type) {