"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "srcs/api-java/cpp/ExifItemJNI.cpp" between
heif-3.6.0.tar.gz and heif-3.6.1.tar.gz

About: HEIF (High Efficiency Image File Format) is a visual media container format for images and image sequences (MPEG-standard). This HEIF engine demonstrates its powerful features and capabilities (under Nokia HEIF license).

ExifItemJNI.cpp  (heif-3.6.0):ExifItemJNI.cpp  (heif-3.6.1)
skipping to change at line 26 skipping to change at line 26
#include "ExifItem.h" #include "ExifItem.h"
#include "Helpers.h" #include "Helpers.h"
#define CLASS_NAME ExifItem #define CLASS_NAME ExifItem
extern "C" extern "C"
{ {
JNI_METHOD_ARG(jlong, createContextNative, jobject javaHEIF) JNI_METHOD_ARG(jlong, createContextNative, jobject javaHEIF)
{ {
UNUSED(self); UNUSED(self);
NATIVE_HEIF(nativeHeif, javaHEIF); NATIVE_HEIF(nativeHeif, javaHEIF);
auto *nativeObject = new HEIFPP::ExifItem(nativeHeif); auto* nativeObject = new HEIFPP::ExifItem(nativeHeif);
return reinterpret_cast<jlong>(nativeObject); return reinterpret_cast<jlong>(nativeObject);
} }
JNI_METHOD(jobject, getItemDataNative) JNI_METHOD(jobject, getItemDataNative)
{ {
return env->NewDirectByteBuffer(const_cast<uint8_t *>(nativeSelf->getDat a()), return env->NewDirectByteBuffer(const_cast<uint8_t*>(nativeSelf->getData ()),
static_cast<jlong>(nativeSelf->getDataSi ze())); static_cast<jlong>(nativeSelf->getDataSi ze()));
} }
JNI_METHOD_ARG(void, setItemDataNative, jbyteArray data) JNI_METHOD_ARG(void, setItemDataNative, jbyteArray data)
{ {
jbyte *nativeData = env->GetByteArrayElements(data, nullptr); jbyte* nativeData = env->GetByteArrayElements(data, nullptr);
nativeSelf->setData((uint8_t *) nativeData, static_cast<uint64_t>(env->G nativeSelf->setData((uint8_t*) nativeData, static_cast<uint64_t>(env->Ge
etArrayLength(data))); tArrayLength(data)));
env->ReleaseByteArrayElements(data, nativeData, 0); env->ReleaseByteArrayElements(data, nativeData, 0);
} }
} }
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)