"Fossies" - the Fresh Open Source Software Archive  

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

SampleJNI.cpp  (heif-3.6.0):SampleJNI.cpp  (heif-3.6.1)
skipping to change at line 52 skipping to change at line 52
JNI_METHOD(jint, getSampleDataSizeNative) JNI_METHOD(jint, getSampleDataSizeNative)
{ {
NATIVE_SELF; NATIVE_SELF;
return static_cast<jint>(nativeSelf->getSampleDataSize()); return static_cast<jint>(nativeSelf->getSampleDataSize());
} }
JNI_METHOD(jobject, getSampleDataNative) JNI_METHOD(jobject, getSampleDataNative)
{ {
NATIVE_SELF; NATIVE_SELF;
return env->NewDirectByteBuffer(const_cast<uint8_t *>(nativeSelf->getSam pleData()), return env->NewDirectByteBuffer(const_cast<uint8_t*>(nativeSelf->getSamp leData()),
static_cast<jlong>(nativeSelf->getSample DataSize())); static_cast<jlong>(nativeSelf->getSample DataSize()));
} }
JNI_METHOD_ARG(void, setSampleDataNative, jbyteArray data) JNI_METHOD_ARG(void, setSampleDataNative, jbyteArray data)
{ {
NATIVE_SELF; NATIVE_SELF;
jbyte *nativeData = env->GetByteArrayElements(data, nullptr); jbyte* nativeData = env->GetByteArrayElements(data, nullptr);
nativeSelf->setItemData((uint8_t *) nativeData, static_cast<uint64_t>(en nativeSelf->setItemData((uint8_t*) nativeData, static_cast<uint64_t>(env
v->GetArrayLength(data))); ->GetArrayLength(data)));
env->ReleaseByteArrayElements(data, nativeData, 0); env->ReleaseByteArrayElements(data, nativeData, 0);
} }
JNI_METHOD(jlong, getDurationNative) JNI_METHOD(jlong, getDurationNative)
{ {
NATIVE_SELF; NATIVE_SELF;
return static_cast<jlong>(nativeSelf->getDuration()); return static_cast<jlong>(nativeSelf->getDuration());
} }
JNI_METHOD_ARG(void, setDurationNative, jlong duration) JNI_METHOD_ARG(void, setDurationNative, jlong duration)
skipping to change at line 179 skipping to change at line 179
} }
JNI_METHOD(jint, getSampleTypeNative) JNI_METHOD(jint, getSampleTypeNative)
{ {
NATIVE_SELF; NATIVE_SELF;
return static_cast<jint>(nativeSelf->getSampleType()); return static_cast<jint>(nativeSelf->getSampleType());
} }
JNI_METHOD(jstring, getTypeNative) JNI_METHOD(jstring, getTypeNative)
{ {
auto *instance = (HEIFPP::Sample *) getNativeHandle(env, self); auto* instance = (HEIFPP::Sample*) getNativeHandle(env, self);
return env->NewStringUTF(instance->getType().value); return env->NewStringUTF(instance->getType().value);
} }
} }
 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)