"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "srcs/api-java/cpp/CleanAperturePropertyJNI.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).

CleanAperturePropertyJNI.cpp  (heif-3.6.0):CleanAperturePropertyJNI.cpp  (heif-3.6.1)
skipping to change at line 24 skipping to change at line 24
#include <jni.h> #include <jni.h>
#include "Helpers.h" #include "Helpers.h"
#include "TransformativeProperty.h" #include "TransformativeProperty.h"
#define CLASS_NAME CleanApertureProperty #define CLASS_NAME CleanApertureProperty
extern "C" extern "C"
{ {
jobject createFraction(JNIEnv *env, jobject obj, int numerator, int denomina jobject createFraction(JNIEnv* env, jobject obj, int numerator, int denomina
tor); tor);
jobject createFraction(JNIEnv *env, jobject obj, int numerator, int denomina jobject createFraction(JNIEnv* env, jobject obj, int numerator, int denomina
tor) tor)
{ {
const jclass javaClass = env->GetObjectClass(obj); const jclass javaClass = env->GetObjectClass(obj);
const jmethodID createMethodId = const jmethodID createMethodId =
env->GetMethodID(javaClass, "createFraction", "(II)Lcom/nokia/heif/C leanApertureProperty$Fraction;"); env->GetMethodID(javaClass, "createFraction", "(II)Lcom/nokia/heif/C leanApertureProperty$Fraction;");
env->DeleteLocalRef(javaClass); env->DeleteLocalRef(javaClass);
return env->CallObjectMethod(obj, createMethodId, numerator, denominator ); return env->CallObjectMethod(obj, createMethodId, numerator, denominator );
} }
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::CleanApertureProperty(nativeHeif); auto* nativeObject = new HEIFPP::CleanApertureProperty(nativeHeif);
return reinterpret_cast<jlong>(nativeObject); return reinterpret_cast<jlong>(nativeObject);
} }
JNI_METHOD(jobject, getWidthNative) JNI_METHOD(jobject, getWidthNative)
{ {
NATIVE_SELF; NATIVE_SELF;
return createFraction(env, self, static_cast<jint>(nativeSelf->mClap.wid thN), return createFraction(env, self, static_cast<jint>(nativeSelf->mClap.wid thN),
static_cast<jint>(nativeSelf->mClap.widthD)); static_cast<jint>(nativeSelf->mClap.widthD));
} }
 End of changes. 2 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)