From 13102c3ca3cbf30e3a68f66958b854b08177fd8e Mon Sep 17 00:00:00 2001 From: "Dr. Peter Droste" Date: Mon, 15 May 2023 14:52:23 +0200 Subject: [PATCH] QtJambi 6.5.1 pre-release issue #155 --- src/cpp/QtJambi/javainvalidate.cpp | 2 +- src/cpp/QtJambiGenerator/cppimplgenerator.cpp | 74 ++-- src/cpp/QtJambiGenerator/cppimplgenerator.h | 4 +- src/cpp/QtJambiGenerator/javagenerator.cpp | 19 +- .../typesystem/qml/QtMultimedia.qml | 417 +++++++----------- 5 files changed, 216 insertions(+), 300 deletions(-) diff --git a/src/cpp/QtJambi/javainvalidate.cpp b/src/cpp/QtJambi/javainvalidate.cpp index b9758b5e..f62468ec 100644 --- a/src/cpp/QtJambi/javainvalidate.cpp +++ b/src/cpp/QtJambi/javainvalidate.cpp @@ -116,7 +116,7 @@ struct InvalidateNativeIDAfterUsePrivate : InvalidateAfterUsePrivate{ QtJambiExceptionInhibitor __exnHandler; try{ if(QSharedPointer link = m_link.toStrongRef()){ - if(link->isShell() && !link->isQObject()){ + if(!link->isShell() && !link->isQObject()){ link->invalidate(m_env); } } diff --git a/src/cpp/QtJambiGenerator/cppimplgenerator.cpp b/src/cpp/QtJambiGenerator/cppimplgenerator.cpp index 732977f8..d56bfe88 100644 --- a/src/cpp/QtJambiGenerator/cppimplgenerator.cpp +++ b/src/cpp/QtJambiGenerator/cppimplgenerator.cpp @@ -10677,25 +10677,29 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f pps.removeDuplicates(); } QString tsId = priGenerator->subDirectoryForClass(function->declaringClass(), PriGenerator::CppDirectory); - if(javaToQtConverterInfos[tsId].contains(mangledTypeName)){ + bool resetObjectAfterUse = function->resetObjectAfterUse(index); + QString _mangledTypeName = mangledTypeName; + if(resetObjectAfterUse) + _mangledTypeName += QLatin1String("_InvalidateAfterUse"); + if(nativeToJavaConverterInfos[tsId].contains(_mangledTypeName)){ if(!type->typeEntry()->ppCondition().isEmpty()){ QString strg; QTextStream stream(&strg); stream << "#if " << type->typeEntry()->ppCondition() << Qt::endl - << QString("bool javaToQtConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool); // declared in %2").arg(mangledTypeName, javaToQtConverterInfos[tsId][mangledTypeName]->qualifiedCppName()) + << QString("bool nativeToJavaConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool); // declared in %2").arg(_mangledTypeName, nativeToJavaConverterInfos[tsId][_mangledTypeName]->qualifiedCppName()) << Qt::endl << "#endif // " << type->typeEntry()->ppCondition() << Qt::endl; forwardDeclarations.insert(strg); }else{ - forwardDeclarations.insert(QString("bool javaToQtConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool); // declared in %2").arg(mangledTypeName, javaToQtConverterInfos[tsId][mangledTypeName]->qualifiedCppName())); + forwardDeclarations.insert(QString("bool nativeToJavaConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool); // declared in %2").arg(_mangledTypeName, nativeToJavaConverterInfos[tsId][_mangledTypeName]->qualifiedCppName())); } - s << INDENT << "&javaToQtConverter_" << mangledTypeName << "," << Qt::endl; + s << INDENT << "&nativeToJavaConverter_" << _mangledTypeName << "," << Qt::endl; }else{ - QString qtToJavaConverter; + QString nativeToJavaConverter; bool isCustomized = false; { INDENTATIONRESET(INDENT) - QTextStream s(&qtToJavaConverter); + QTextStream s(&nativeToJavaConverter); s << INDENT << "Q_UNUSED(env)" << Qt::endl; QString _in; { @@ -10767,7 +10771,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f ""); } bool checkedScope = false; - if (function->resetObjectAfterUse(index)){ + if (resetObjectAfterUse){ s << INDENT << "if(!scope)" << Qt::endl << INDENT << " return false;" << Qt::endl; checkedScope = true; @@ -10779,7 +10783,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << INDENT << "if(!scope)" << Qt::endl << INDENT << " return false;" << Qt::endl; checkedScope = true; - }else if(!function->resetObjectAfterUse(index)){ + }else if(!resetObjectAfterUse){ s << INDENT << "Q_UNUSED(scope)" << Qt::endl; } } @@ -10830,14 +10834,18 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << INDENT << "if(forceBoxedType)" << Qt::endl; s << INDENT << " " << outBoxing << Qt::endl; } - if (function->resetObjectAfterUse(index)){ - isCustomized = true; + if (resetObjectAfterUse){ + //isCustomized = true; + QString checkJavaOwnership; + if(type->isConstant() && type->getReferenceType()==MetaType::Reference){ + checkJavaOwnership = ", false"; + } if (type->isContainer()){ - s << INDENT << "InvalidateContainerAfterUse* __invalidate_out_after_use = new InvalidateContainerAfterUse(env, out->l);" << Qt::endl; + s << INDENT << "InvalidateContainerAfterUse* __invalidate_out_after_use = new InvalidateContainerAfterUse(env, out->l" << checkJavaOwnership << ");" << Qt::endl; }else if (type->isArray()){ - s << INDENT << "InvalidateArrayAfterUse* __invalidate_out_after_use = new InvalidateArrayAfterUse(env, out->l);" << Qt::endl; + s << INDENT << "InvalidateArrayAfterUse* __invalidate_out_after_use = new InvalidateArrayAfterUse(env, out->l" << checkJavaOwnership << ");" << Qt::endl; }else{ - s << INDENT << "InvalidateAfterUse* __invalidate_out_after_use = new InvalidateAfterUse(env, out->l);" << Qt::endl; + s << INDENT << "InvalidateAfterUse* __invalidate_out_after_use = new InvalidateAfterUse(env, out->l" << checkJavaOwnership << ");" << Qt::endl; } s << INDENT << "scope->addDeletion(__invalidate_out_after_use);" << Qt::endl; } @@ -10849,7 +10857,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << " forceBoxedType"; } s << ")->bool{"; - for(const QString& line : qtToJavaConverter.split("\n")){ + for(const QString& line : nativeToJavaConverter.split("\n")){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10864,23 +10872,23 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f QTextStream stream(&strg); stream << "#if " << type->typeEntry()->ppCondition() << Qt::endl - << QString("bool javaToQtConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool);").arg(mangledTypeName) + << QString("bool nativeToJavaConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool);").arg(_mangledTypeName) << Qt::endl << "#endif // " << type->typeEntry()->ppCondition() << Qt::endl; forwardDeclarations.insert(strg); }else{ - forwardDeclarations.insert(QString("bool javaToQtConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool);").arg(mangledTypeName)); + forwardDeclarations.insert(QString("bool nativeToJavaConverter_%1(JNIEnv*, QtJambiScope*, const void*, jvalue*, bool);").arg(_mangledTypeName)); } QString functionCode; { QTextStream s(&functionCode); if(!type->typeEntry()->ppCondition().isEmpty()) s << "#if " << type->typeEntry()->ppCondition() << Qt::endl; - s << "bool javaToQtConverter_" << mangledTypeName << "(JNIEnv* env, QtJambiScope* scope, const void* in, jvalue* out, bool"; + s << "bool nativeToJavaConverter_" << _mangledTypeName << "(JNIEnv* env, QtJambiScope* scope, const void* in, jvalue* out, bool"; if(type->typeEntry()->isPrimitive() && type->indirections().isEmpty()){ s << " forceBoxedType"; } s << ") {"; - for(const QString& line : qtToJavaConverter.split("\n")){ + for(const QString& line : nativeToJavaConverter.split("\n")){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10893,29 +10901,29 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << "#endif // " << type->typeEntry()->ppCondition() << Qt::endl; } converterFunctions << functionCode; - s << INDENT << "&javaToQtConverter_" << mangledTypeName << "," << Qt::endl; - javaToQtConverterInfos[tsId].insert(mangledTypeName, function->ownerClass()); + s << INDENT << "&nativeToJavaConverter_" << _mangledTypeName << "," << Qt::endl; + nativeToJavaConverterInfos[tsId].insert(_mangledTypeName, function->ownerClass()); } } - if(qtToJavaConverterInfos[tsId].contains(mangledTypeName)){ + if(javaToNativeConverterInfos[tsId].contains(mangledTypeName)){ if(type->typeEntry()->ppCondition().isEmpty()){ - forwardDeclarations.insert(QString("bool qtToJavaConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType); // declared in %2").arg(mangledTypeName, qtToJavaConverterInfos[tsId][mangledTypeName]->qualifiedCppName())); + forwardDeclarations.insert(QString("bool javaToNativeConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType); // declared in %2").arg(mangledTypeName, javaToNativeConverterInfos[tsId][mangledTypeName]->qualifiedCppName())); }else{ QString strg; QTextStream stream(&strg); stream << "#if " << type->typeEntry()->ppCondition() << Qt::endl - << QString("bool qtToJavaConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType); // declared in %2").arg(mangledTypeName, qtToJavaConverterInfos[tsId][mangledTypeName]->qualifiedCppName()) + << QString("bool javaToNativeConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType); // declared in %2").arg(mangledTypeName, javaToNativeConverterInfos[tsId][mangledTypeName]->qualifiedCppName()) << Qt::endl << "#endif // " << type->typeEntry()->ppCondition() << Qt::endl; forwardDeclarations.insert(strg); } - s << INDENT << "&qtToJavaConverter_" << mangledTypeName; + s << INDENT << "&javaToNativeConverter_" << mangledTypeName; }else{ - QString javaToQtConverter; + QString javaToNativeConverter; bool isCustomized = false; { - QTextStream s(&javaToQtConverter); + QTextStream s(&javaToNativeConverter); INDENTATIONRESET(INDENT) s << INDENT << "Q_UNUSED(env)" << Qt::endl; QString javaIn = QLatin1String("in.l"); @@ -11024,7 +11032,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << ") -> bool {"; { INDENTATION(INDENT) - for(const QString& line : javaToQtConverter.split("\n")){ + for(const QString& line : javaToNativeConverter.split("\n")){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -11036,13 +11044,13 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << Qt::endl << INDENT << "}"; }else{ if(type->typeEntry()->ppCondition().isEmpty()){ - forwardDeclarations.insert(QString("bool qtToJavaConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType);").arg(mangledTypeName)); + forwardDeclarations.insert(QString("bool javaToNativeConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType);").arg(mangledTypeName)); }else{ QString strg; QTextStream stream(&strg); stream << "#if " << type->typeEntry()->ppCondition() << Qt::endl - << QString("bool qtToJavaConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType);").arg(mangledTypeName) + << QString("bool javaToNativeConverter_%1(JNIEnv*, QtJambiScope*, const jvalue&, void* &, jValueType);").arg(mangledTypeName) << Qt::endl << "#endif // " << type->typeEntry()->ppCondition() << Qt::endl; forwardDeclarations.insert(strg); } @@ -11051,12 +11059,12 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f QTextStream s(&functionCode); if(!type->typeEntry()->ppCondition().isEmpty()) s << "#if " << type->typeEntry()->ppCondition() << Qt::endl; - s << "bool qtToJavaConverter_" << mangledTypeName << "(JNIEnv* env, QtJambiScope* scope, const jvalue& in, void* &out, jValueType"; + s << "bool javaToNativeConverter_" << mangledTypeName << "(JNIEnv* env, QtJambiScope* scope, const jvalue& in, void* &out, jValueType"; if(type->typeEntry()->isPrimitive() && type->indirections().isEmpty()){ s << " valueType"; } s << ") {"; - for(const QString& line : javaToQtConverter.split("\n")){ + for(const QString& line : javaToNativeConverter.split("\n")){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -11069,8 +11077,8 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << "#endif //" << type->typeEntry()->ppCondition() << Qt::endl; } converterFunctions << functionCode; - s << INDENT << "&qtToJavaConverter_" << mangledTypeName; - qtToJavaConverterInfos[tsId].insert(mangledTypeName, function->ownerClass()); + s << INDENT << "&javaToNativeConverter_" << mangledTypeName; + javaToNativeConverterInfos[tsId].insert(mangledTypeName, function->ownerClass()); } } } diff --git a/src/cpp/QtJambiGenerator/cppimplgenerator.h b/src/cpp/QtJambiGenerator/cppimplgenerator.h index bda5a318..48458fff 100644 --- a/src/cpp/QtJambiGenerator/cppimplgenerator.h +++ b/src/cpp/QtJambiGenerator/cppimplgenerator.h @@ -254,8 +254,8 @@ class CppImplGenerator : public CppGenerator { private: QByteArray callXxxMethod(const QString &name) const; QByteArray callXxxMethod(const MetaType *java_type) const; - QMap> javaToQtConverterInfos; - QMap> qtToJavaConverterInfos; + QMap> nativeToJavaConverterInfos; + QMap> javaToNativeConverterInfos; }; #endif // CPPIMPLGENERATOR_H diff --git a/src/cpp/QtJambiGenerator/javagenerator.cpp b/src/cpp/QtJambiGenerator/javagenerator.cpp index ef80ef5c..ca9aa4fd 100644 --- a/src/cpp/QtJambiGenerator/javagenerator.cpp +++ b/src/cpp/QtJambiGenerator/javagenerator.cpp @@ -268,6 +268,9 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, .replace("*/", "*/") << "

" << Qt::endl; } +// if(hasCodeInjections(field, {CodeSnip::Comment})){ +// writeInjectedCode(commentStream, field, CodeSnip::Comment); +// } if(field->getter()->isDeprecated() && !field->getter()->deprecatedComment().isEmpty()){ if(!comment.isEmpty()) commentStream << Qt::endl; @@ -2530,7 +2533,12 @@ void JavaGenerator::writeInjectedCode(QTextStream &s, const MetaFunction *java_f } code = code.replace("%this", "this"); QStringList lines = code.split("\n"); - printExtraCode(lines, s); + if(position==CodeSnip::Comment){ + INDENTATIONRESET(INDENT) + printExtraCode(lines, s); + }else{ + printExtraCode(lines, s); + } } } } @@ -3052,6 +3060,9 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio .replace("*/", "*/") << "

" << Qt::endl; } + if(hasCodeInjections(java_function, {CodeSnip::Comment})){ + writeInjectedCode(commentStream, java_function, CodeSnip::Comment); + } if(java_function->isDeprecated() && !java_function->deprecatedComment().isEmpty()){ if(!comment.isEmpty()) commentStream << Qt::endl; @@ -3458,6 +3469,9 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig } if(!comment.isEmpty()) commentStream << Qt::endl; + if(hasCodeInjections(java_function, {CodeSnip::Comment})){ + writeInjectedCode(commentStream, java_function, CodeSnip::Comment); + } if(java_function->isDeprecated() && !java_function->deprecatedComment().isEmpty()){ writeDeprecatedComment(commentStream, java_function); } @@ -4098,6 +4112,9 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct } } } + if(hasCodeInjections(java_function, {CodeSnip::Comment})){ + writeInjectedCode(commentStream, java_function, CodeSnip::Comment); + } if(java_function->isDeprecated() && !java_function->deprecatedComment().isEmpty()){ if(!comment.isEmpty()) commentStream << Qt::endl; diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml index 8420fbf4..71dc995d 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml @@ -55,18 +55,6 @@ TypeSystem{ since: 6 } - Rejection{ - className: "QVideoFrame" - functionName: "videoBuffer" - since: 6 - } - - Rejection{ - className: "QCamera" - functionName: "platformCamera" - since: [6, 3] - } - Rejection{ className: "QImageCapture" functionName: "platformImageCapture" @@ -115,78 +103,33 @@ TypeSystem{ fileName: "qaudio.h" location: Include.Global } + EnumType{ + name: "Error" + } + + EnumType{ + name: "Mode" + } + + EnumType{ + name: "State" + } + + EnumType{ + name: "Role" + } + + EnumType{ + name: "VolumeScale" + } } NamespaceType{ name: "QMultimedia" - until: 5 - } - - - EnumType{ - name: "QAudio::Error" - } - - EnumType{ - name: "QAudio::Mode" - } - - EnumType{ - name: "QAudio::State" - } - - EnumType{ - name: "QAudio::Role" - } - - EnumType{ - name: "QAudio::VolumeScale" - } - - EnumType{ - name: "QMultimedia::AvailabilityStatus" - until: 5 - } - - EnumType{ - name: "QMultimedia::EncodingMode" - until: 5 - } - - EnumType{ - name: "QMultimedia::EncodingQuality" - until: 5 - } - - EnumType{ - name: "QMultimedia::SupportEstimate" - until: 5 - } - - EnumType{ - name: "QVideoFrame::FieldType" - } - - EnumType{ - name: "QVideoFrame::PixelFormat" - } - - EnumType{ - name: "QVideoFrame::RotationAngle" - } - - EnumType{ - name: "QAbstractVideoBuffer::HandleType" - until: 5 - } - - EnumType{ - name: "QAbstractVideoBuffer::MapMode" - until: 5 - } - - EnumType{ - name: "QAbstractVideoSurface::Error" + EnumType{name: "AvailabilityStatus"} + EnumType{name: "EncodingMode"} + EnumType{name: "EncodingQuality"} + EnumType{name: "SupportEstimate"} until: 5 } @@ -208,62 +151,6 @@ TypeSystem{ name: "QAudioDecoder::State" } - EnumType{ - name: "QCamera::CaptureMode" - } - - EnumType{ - name: "QCamera::Error" - } - - EnumType{ - name: "QCamera::LockChangeReason" - } - - EnumType{ - name: "QCamera::LockStatus" - } - - EnumType{ - name: "QCamera::LockType" - } - - EnumType{ - name: "QCamera::State" - } - - EnumType{ - name: "QCamera::Status" - } - - EnumType{ - name: "QCamera::Position" - } - - EnumType{ - name: "QCamera::ExposureMode" - } - - EnumType{ - name: "QCamera::Feature" - } - - EnumType{ - name: "QCamera::FlashMode" - } - - EnumType{ - name: "QCamera::FocusMode" - } - - EnumType{ - name: "QCamera::WhiteBalanceMode" - } - - EnumType{ - name: "QCamera::TorchMode" - } - EnumType{ name: "QCameraExposure::ExposureMode" until: 5 @@ -437,14 +324,6 @@ TypeSystem{ until: 5 } - EnumType{ - name: "QVideoFrame::HandleType" - } - - EnumType{ - name: "QVideoFrame::MapMode" - } - EnumType{ name: "QSound::Loop" until: 5 @@ -463,18 +342,38 @@ TypeSystem{ until: 5 } - EnumType{ - name: "QVideoFrame::PaintOptions::PaintFlag" - since: [6, 2] - } - - ValueType{ - name: "QVideoFrame::PaintOptions" - since: [6, 2] - } - ValueType{ name: "QVideoFrame" + EnumType{ + name: "HandleType" + } + + EnumType{ + name: "MapMode" + } + + Rejection{ + functionName: "videoBuffer" + since: 6 + } + + EnumType{ + name: "FieldType" + } + + EnumType{ + name: "PixelFormat" + } + + EnumType{ + name: "RotationAngle" + } + + ValueType{ + name: "PaintOptions" + EnumType{name: "PaintFlag"} + since: [6, 2] + } ModifyFunction{ signature: "operator=(const QVideoFrame &)" Delegate{ @@ -623,6 +522,8 @@ TypeSystem{ ObjectType{ name: "QAbstractVideoBuffer" + EnumType{name: "HandleType"} + EnumType{name: "MapMode"} ExtraIncludes{ Include{ fileName: "utils_p.h" @@ -1044,12 +945,9 @@ TypeSystem{ name: "QCameraViewfinderSettings" } - ValueType{ - name: "QCamera::FrameRateRange" - } - ObjectType{ name: "QAbstractVideoSurface" + EnumType{name: "Error"} until: 5 } @@ -1223,6 +1121,25 @@ TypeSystem{ ObjectType{ name: "QCamera" + Rejection{ + functionName: "platformCamera" + since: [6, 3] + } + EnumType{name: "CaptureMode"} + EnumType{name: "Error"} + EnumType{name: "LockChangeReason"} + EnumType{name: "LockStatus"} + EnumType{name: "LockType"} + EnumType{name: "State"} + EnumType{name: "Status"} + EnumType{name: "Position"} + EnumType{name: "ExposureMode"} + EnumType{name: "Feature"} + EnumType{name: "FlashMode"} + EnumType{name: "FocusMode"} + EnumType{name: "WhiteBalanceMode"} + EnumType{name: "TorchMode"} + ValueType{name: "FrameRateRange"} ModifyFunction{ signature: "setViewfinder(QAbstractVideoSurface*)" ModifyArgument{ @@ -2436,18 +2353,11 @@ TypeSystem{ name: "QMediaServiceDefaultDeviceInterface" } - EnumType{ - name: "QAudioDevice::Mode" - since: [6, 2] - } - ValueType{ name: "QCameraFormat" - since: [6, 2] - } - - EnumType{ - name: "QCameraDevice::Position" + EnumType{ + name: "Position" + } since: [6, 2] } @@ -2458,6 +2368,7 @@ TypeSystem{ ValueType{ name: "QAudioDevice" + EnumType{name: "Mode"} since: [6, 2] } @@ -2478,40 +2389,26 @@ TypeSystem{ read: false write: false } - since: [6, 2] - } - - EnumType{ - name: "QMediaFormat::FileFormat" - RejectEnumValue{ - name: "LastFileFormat" + EnumType{ + name: "FileFormat" + RejectEnumValue{ + name: "LastFileFormat" + } } - since: [6, 2] - } - - EnumType{ - name: "QMediaFormat::AudioCodec" - RejectEnumValue{ - name: "LastAudioCodec" + EnumType{ + name: "AudioCodec" + RejectEnumValue{ + name: "LastAudioCodec" + } } - since: [6, 2] - } - - EnumType{ - name: "QMediaFormat::VideoCodec" - RejectEnumValue{ - name: "LastVideoCodec" + EnumType{ + name: "VideoCodec" + RejectEnumValue{ + name: "LastVideoCodec" + } } - since: [6, 2] - } - - EnumType{ - name: "QMediaFormat::ConversionMode" - since: [6, 2] - } - - EnumType{ - name: "QMediaFormat::ResolveFlags" + EnumType{name: "ConversionMode"} + EnumType{name: "ResolveFlags"} since: [6, 2] } @@ -2525,26 +2422,34 @@ TypeSystem{ since: [6, 2] } - EnumType{ - name: "QImageCapture::Error" - since: [6, 2] - } - - EnumType{ - name: "QImageCapture::Quality" - since: [6, 2] - } - - EnumType{ - name: "QImageCapture::FileFormat" - RejectEnumValue{ - name: "LastFileFormat" - } - since: [6, 2] - } - ObjectType{ name: "QImageCapture" + EnumType{ + name: "Error" + } + EnumType{ + name: "Quality" + } + EnumType{ + name: "FileFormat" + RejectEnumValue{ + name: "LastFileFormat" + } + } + ModifyFunction{ + signature: "imageAvailable(int,QVideoFrame)" + ModifyArgument{ + index: 2 + invalidateAfterUse: true + } + InjectCode{ + target: CodeClass.Java + position: Position.Comment + Text{ + content: "

Make sure to dispose frame object at the end of the slot!

" + } + } + } since: [6, 2] } @@ -2560,11 +2465,7 @@ TypeSystem{ } } } - since: [6, 5] - } - - EnumType{ - name: "QScreenCapture::Error" + EnumType{name: "Error"} since: [6, 5] } @@ -2656,6 +2557,20 @@ TypeSystem{ ObjectType{ name: "QVideoSink" + ModifyFunction{ + signature: "videoFrameChanged(QVideoFrame)const" + ModifyArgument{ + index: 1 + invalidateAfterUse: true + } + InjectCode{ + target: CodeClass.Java + position: Position.Comment + Text{ + content: "

Make sure to dispose frame object at the end of the slot!

" + } + } + } since: [6, 2] } @@ -2672,17 +2587,8 @@ TypeSystem{ } } } - since: [6, 2] - } - - Rejection{ - className: "QWaveDecoder::chunk" - since: [6, 2] - } - - Rejection{ - className: "QWaveDecoder" - functionName: "peekChunk" + Rejection{className: "chunk"} + Rejection{functionName: "peekChunk"} since: [6, 2] } @@ -2701,39 +2607,24 @@ TypeSystem{ ValueType{ name: "QVideoFrameFormat" + EnumType{name: "PixelFormat"} + EnumType{name: "Direction"} + EnumType{name: "YCbCrColorSpace"} + EnumType{ + name: "ColorTransfer" + since: [6, 4] + } + EnumType{ + name: "ColorRange" + since: [6, 4] + } + EnumType{ + name: "ColorSpace" + since: [6, 4] + } since: [6, 2] } - EnumType{ - name: "QVideoFrameFormat::PixelFormat" - since: [6, 2] - } - - EnumType{ - name: "QVideoFrameFormat::Direction" - since: [6, 2] - } - - EnumType{ - name: "QVideoFrameFormat::YCbCrColorSpace" - since: [6, 2] - } - - EnumType{ - name: "QVideoFrameFormat::ColorTransfer" - since: [6, 4] - } - - EnumType{ - name: "QVideoFrameFormat::ColorRange" - since: [6, 4] - } - - EnumType{ - name: "QVideoFrameFormat::ColorSpace" - since: [6, 4] - } - SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QAudioBuffer::QAudioBuffer', unmatched parameter type 'QAbstractAudioBuffer*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QMediaService::requestControl', unmatched return type 'T'"} SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type QAudioBuffer."}