Hello community, here is the log from the commit of package libmlt for openSUSE:Factory checked in at 2019-11-21 12:59:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libmlt (Old) and /work/SRC/openSUSE:Factory/.libmlt.new.26869 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmlt" Thu Nov 21 12:59:44 2019 rev:47 rq:750045 version:6.18.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libmlt/libmlt.changes 2019-05-08 15:17:34.113135875 +0200 +++ /work/SRC/openSUSE:Factory/.libmlt.new.26869/libmlt.changes 2019-11-21 12:59:47.014507241 +0100 @@ -1,0 +2,122 @@ +Tue Nov 12 11:50:26 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 6.18.0 + Framework: + * Fixed some data races in mlt_consumer, mlt_deque, and + mlt_property. + * Fixed the mlt_events listener incorrect owner argument. + * Added support for the LC_ALL environmant variable on Windows. + * Fixed the argument to mlt_factory_init() not working on + Windows. + * Fixed mlt_service_identify() not reliable in some use cases. + * Added some default and copy constructors and assignment + operators to mlt++ + + Filter() + + Filter( const Filter &filter ) + + Filter& operator=( const Filter &filter ) + + Producer( const Producer &producer ) + + Producer& operator=( const Producer &producer ) + + Properties( const Properties &properties ) + + Properties& operator=( const Properties &properties ) + + Service( const Service &service ) + + Service& operator=( const Service &service ) + + Transition() + + Transition( const Transition &transition ) + + Transition& operator=( const Transition &transition ) + * Added mlt_luma_map: + + mlt_luma_map_init + + mlt_luma_map_new + + mlt_luma_map_render + + mlt_luma_map_from_pgm + + mlt_luma_map_from_yuv422 + * Fixed preset overrides depend on the XML attribute order. + * Fixed serializing an animated property with a new length. + Modules: + * Fixed interpolation in rotoscoping filter. + * Fixed crop filter not working with color producer. + * Fixed some data races in the sdl and sdl2 consumers. + * Fixed some data races in the avformat producer. + * Added a movit.flip filter to the opengl module. + * Fixed using filters on frei0r producers. + * Added support for in and out attributes on the "consumer" + xml element. + * Fixed using an in point with the multi consumer. + * Fixed avfilter fails if the image size changes. + * Fixed showing superfluous decimals for seconds in the timer + filter. + * Stop serializing an invalid producer as an "INVALID" text + producer in xml. + * Fixed an access violation crash in wave filter. + * Added the meta.media.color_range property to the avformat + producer. + * Fixed full range yuv422p not converted correctly in the + avformat producer. + * Fixed the text filter not working with pango. + * Fixed a regression using dynamictext with pango. + * Added a position property to avfilter for filters that need + position info. + * Fixed avfilter.subtitles not using the source position. + * Added an analyze property to vidstab filter. When set, + analysis only starts and the results file written if true. + * Fixed crash combining affine the affine filter with the + shape filter. + * Added interlace detection from AVCodecContext.field_order. + * Changed the avformat producer to not use the rescale.interp + frame property. + Previously, when interp == nearest, it would relax seeking. + Now, seek accuracy is reduced during trick play (rewind or + fast forward). + * Fixed sws flags for auto-inserted scalers in avfilter. + * Fixed a double free crash in ladspa filter on channel count + mismatch. + * Refactored the composite and luma transitions to use + mlt_luma_map. + * Refactored the pgm producer and shape filter to use + mlt_luma_map. + * Refactored the lumas module to use mlt_luma_map. + * The lumas module is now disabled by default and must be + explicitly enabled. + * Added property animation to the threshold filter. + * Added a cairoblend_mode filter to the frei0r module to + affect a frei0r.cairoblend transition used to + composite/blend tracks. + * Added support for new vaapi options to the avformat consumer: + + connection_type: x11 or drm + + driver + + kernel_driver + * Fixed the timewarp producer with a colon in the filename. + * Fixed a relative file name with a colon in it in the xml + producer. + * Fixed defaulting to album or poster art if there is another + video stream. + * Fixed parameter animation in frei0r plugins when using frame + threads. + This change also enables frame-threading for more plugins. + * Improved the qtblend filter to not process alpha if no + transparency. + * Added a background_color property to the qtblend filter. + * Fixed the opencv.tracker incorrect behavior on cut clips. + * Changed opencv.tracker to store absolute frame numbers. + * Fixed incorrect frame offset on render in opencv.tracker. + * Add an alpha_over property to luma transition. This + addresses a behavior regression in version 6.14.0. + * Fixed noimagecache not working in the avformat producer. + Other: + * Mlt++ now requires C11 compiler support. + * Fixed closing melt SDL2 window from window manager (i.e. + close button). + * Added -repository option to the melt command. + * Added unit tests for Mlt::Event. + * Fixed returning image data for Python 3. + * Switch to python3 by default. + * Updated the prores encoding presets to set vendor ID and + colr atom. + * Added a CMake build system. This is not yet prefered over + the existing configure script and Makefiles and has less + flexibility. It is a start and has limited support. + +- Use python 3 + +- Added libmlt-fixluma.patch + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/libmlt/webvfx.changes 2019-01-11 14:06:37.783731185 +0100 +++ /work/SRC/openSUSE:Factory/.libmlt.new.26869/webvfx.changes 2019-11-21 12:59:47.958506950 +0100 @@ -1,0 +2,19 @@ +Tue Nov 12 12:02:29 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 1.1.0 + * Added support for alpha channels in MLT video for input and + output. + * Added a transparent property to the MLT filter. When the + property is set to 1, this gives a filter a transparent white + canvas for drawing while the MLT video image is still + available through the JavaScript extension. This facilitates + using WebVfx to draw the alpha channel independently of the + MLT alpha channel. + * Added support for getting a MLT rectangle property + (mlt_rect) as a JavaScript object with properties: x, y, + width, height, and opacity. + +- Refreshed webvfx-versioned-libdir.patch and + webvfx-nobrowser.patch + +------------------------------------------------------------------- Old: ---- mlt-6.16.0.tar.gz webvfx-1.0.0.tar.gz New: ---- libmlt-fixluma.patch mlt-6.18.0.tar.gz webvfx-1.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libmlt.spec ++++++ --- /var/tmp/diff_new_pack.Runboq/_old 2019-11-21 12:59:48.694506724 +0100 +++ /var/tmp/diff_new_pack.Runboq/_new 2019-11-21 12:59:48.694506724 +0100 @@ -1,7 +1,7 @@ # # spec file for package libmlt # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,23 +21,24 @@ %define _name mlt %define libname lib%{_name} -%define lversion 6.16.0 +%define lversion 6.18.0 %define soname 6 %define _name_pp %{_name}++ %define libname_pp lib%{_name_pp} %define soname_pp 3 Name: %{libname} -Version: 6.16.0 +Version: 6.18.0 Release: 0 Summary: Multimedia framework for television broadcasting License: GPL-3.0-or-later Group: Development/Libraries/C and C++ -Url: http://www.mltframework.org +URL: http://www.mltframework.org Source0: https://github.com/mltframework/mlt/archive/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE libmlt-0.8.2-vdpau.patch [email protected] -- Make VDPAU support work without the devel package Patch1: libmlt-0.8.2-vdpau.patch - +# PATCH-FIX-UPSTREAM libmlt-fixluma.patch [email protected] -- add LD_LIBRARY_PATH so that luma can run +Patch2: libmlt-fixluma.patch BuildRequires: fdupes %if 0%{?suse_version} >= 1500 BuildRequires: gcc-c++ @@ -48,6 +49,7 @@ %endif BuildRequires: ladspa-devel BuildRequires: pkg-config +BuildRequires: python3-devel BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5OpenGL) @@ -185,17 +187,16 @@ provides a toolkit for broadcasters, video editors, media players, transcoders and web streamers. -%package -n python-%{_name} +%package -n python3-%{_name} Summary: Python bindings for the MLT multimedia framework Group: Development/Languages/Python -BuildRequires: python-devel +BuildRequires: python3-devel BuildRequires: swig Requires: %{libname_pp}%{soname_pp} >= %{version} Requires: %{libname}%{soname} >= %{version} -%{py_requires} -Provides: python-%{_name}%{soname} +Provides: python3-%{_name}%{soname} -%description -n python-%{_name} +%description -n python3-%{_name} MLT is a multimedia framework for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders and web streamers. @@ -204,6 +205,7 @@ %prep %setup -q -n %{_name}-%{version} %patch1 +%patch2 -p1 # To complement libmlt-0.8.0-vdpau.patch. # When vdpau support is not compiled it will break the code. Doesn't matter because the code will not be used anyway. @@ -224,6 +226,7 @@ %endif --enable-debug \ --enable-gpl --enable-gpl3 \ +--enable-lumas \ %ifarch i586 --disable-mmx \ %endif @@ -238,8 +241,8 @@ %make_install install -Dpm 0644 docs/melt.1 %{buildroot}%{_mandir}/man1/melt%{soname}.1 ln -s melt%{soname}.1 %{buildroot}%{_mandir}/man1/melt.1 -install -Dpm 0644 src/swig/python/_%{_name}.so '%{buildroot}%{python_sitearch}/_%{_name}.so' -install -Dpm 0644 src/swig/python/%{_name}.py '%{buildroot}%{python_sitearch}/%{_name}.py' +install -Dpm 0644 src/swig/python/_%{_name}.so '%{buildroot}%{python3_sitearch}/_%{_name}.so' +install -Dpm 0644 src/swig/python/%{_name}.py '%{buildroot}%{python3_sitearch}/%{_name}.py' # Get the modules that need data for MODULE in %{buildroot}%{_libdir}/mlt-%{soname}/libmlt*.so; do @@ -316,9 +319,9 @@ %{_datadir}/%{_name}-%{soname}/presets/ %{_datadir}/%{_name}-%{soname}/vid.stab/ -%files -n python-%{_name} +%files -n python3-%{_name} %defattr(0644, root, root, 0755) -%{python_sitearch}/_%{_name}.so -%{python_sitearch}/%{_name}.py +%{python3_sitearch}/_%{_name}.so +%{python3_sitearch}/%{_name}.py %changelog ++++++ webvfx.spec ++++++ --- /var/tmp/diff_new_pack.Runboq/_old 2019-11-21 12:59:48.710506718 +0100 +++ /var/tmp/diff_new_pack.Runboq/_new 2019-11-21 12:59:48.710506718 +0100 @@ -1,7 +1,7 @@ # # spec file for package webvfx # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,19 @@ %define _name mlt -%define mltversion 6.16.0 -%define mltsoversion 6.16.0 +%define mltversion 6.18.0 +%define mltsoversion 6.18.0 %define sover 1 %define mltmaj %(echo %{mltversion} |cut -d "." -f 1) # Find qt version used to build %define qt5version %(pkg-config --modversion Qt5Core) -%define _rev 5ef18121b8765ecbc6a90094b1d51059fc7e7f66 Name: webvfx -Version: 1.0.0 +Version: 1.1.0 Release: 0 Summary: Video effects engine based on web technologies License: BSD-3-Clause Group: Productivity/Multimedia/Video/Editors and Convertors -Url: https://github.com/mltframework/webvfx +URL: https://github.com/mltframework/webvfx Source0: %{_name}-%{mltversion}.tar.gz # This is needed by shotcut and will only build within the mlt sources. Source1: https://github.com/mltframework/webvfx/archive/%{version}.tar.gz#/webvfx-%{version}.tar.gz ++++++ libmlt-fixluma.patch ++++++ Index: mlt-6.18.0/src/modules/lumas/create_lumas =================================================================== --- mlt-6.18.0.orig/src/modules/lumas/create_lumas +++ mlt-6.18.0/src/modules/lumas/create_lumas @@ -1,5 +1,7 @@ #!/bin/sh +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../framework + [ \( -d PAL \) -a \( ! $0 -nt .executed \) ] && exit 0 bpp=16 ++++++ mlt-6.16.0.tar.gz -> mlt-6.18.0.tar.gz ++++++ ++++ 8310 lines of diff (skipped) ++++++ webvfx-1.0.0.tar.gz -> webvfx-1.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/all.pro new/webvfx-1.1.0/all.pro --- old/webvfx-1.0.0/all.pro 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/all.pro 2019-06-09 07:22:59.000000000 +0200 @@ -8,6 +8,11 @@ isEqual(QT_MAJOR_VERSION, 5):cache() include(common.pri) +!minQtVersion(5, 2, 0) { + message("Cannot build WebVfx with Qt version $${QT_VERSION}.") + error("Use at least Qt 5.2.0.") +} + TEMPLATE = subdirs CONFIG += ordered diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/common.pri new/webvfx-1.1.0/common.pri --- old/webvfx-1.0.0/common.pri 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/common.pri 2019-06-09 07:22:59.000000000 +0200 @@ -24,3 +24,26 @@ exists(mlt/qmelt/mlt/README) { MLT_SOURCE = mlt } + +defineTest(minQtVersion) { + maj = $$1 + min = $$2 + patch = $$3 + isEqual(QT_MAJOR_VERSION, $$maj) { + isEqual(QT_MINOR_VERSION, $$min) { + isEqual(QT_PATCH_VERSION, $$patch) { + return(true) + } + greaterThan(QT_PATCH_VERSION, $$patch) { + return(true) + } + } + greaterThan(QT_MINOR_VERSION, $$min) { + return(true) + } + } + greaterThan(QT_MAJOR_VERSION, $$maj) { + return(true) + } + return(false) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/mlt/service_manager.cpp new/webvfx-1.1.0/mlt/service_manager.cpp --- old/webvfx-1.0.0/mlt/service_manager.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/mlt/service_manager.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -11,6 +11,7 @@ #include <mlt/framework/mlt_consumer.h> } #include "service_manager.h" +#include <QVariantMap> namespace MLTWebVfx { @@ -35,6 +36,17 @@ return QString::fromUtf8(mlt_properties_anim_get(properties, name.toLatin1().constData(), position, length)); } + QVariantMap getRectParameter(const QString& name) { + mlt_rect rect = mlt_properties_anim_get_rect(properties, name.toLatin1().constData(), position, length); + QVariantMap map; + map["x"] = rect.x; + map["y"] = rect.y; + map["width"] = rect.w; + map["height"] = rect.h; + map["opacity"] = rect.o; + return map; + } + void setPositionAndLength(mlt_position newPosition, mlt_position newLength) { position = newPosition; @@ -140,7 +152,9 @@ mlt_log(service, MLT_LOG_ERROR, "No 'resource' property found\n"); return false; } - bool isTransparent = mlt_properties_get_int(properties, "transparent") || mlt_service_identify(service) == filter_type; + bool isTransparent = mlt_properties_get_int(properties, "transparent") || + mlt_service_identify(service) == filter_type || + mlt_service_identify(service) == transition_type ; parameters = new ServiceParameters(service); effects = WebVfx::createEffects(fileName, width, height, parameters, isTransparent); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/mlt/webvfx_filter.cpp new/webvfx-1.1.0/mlt/webvfx_filter.cpp --- old/webvfx-1.0.0/mlt/webvfx_filter.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/mlt/webvfx_filter.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -9,6 +9,7 @@ #include <mlt/framework/mlt_consumer.h> } #include <webvfx/image.h> +#include <memory> #include "factory.h" #include "service_locker.h" #include "service_manager.h" @@ -24,7 +25,7 @@ mlt_position length = mlt_filter_get_length2(filter, frame); // Get the source image, we will also write our output to it - *format = mlt_image_rgb24; + *format = mlt_image_rgb24a; if ((error = mlt_frame_get_image(frame, image, format, width, height, 1)) != 0) return error; @@ -33,10 +34,32 @@ if (!locker.initialize(*width, *height)) return 1; + bool hasAlpha = (*format == mlt_image_rgb24a); + std::unique_ptr<WebVfx::Image> sourceImage; + std::unique_ptr<WebVfx::Image> renderedImage; + uint8_t* buffer = nullptr; + + if (mlt_properties_get_int(MLT_FILTER_PROPERTIES(filter), "transparent")) { + int size = mlt_image_format_size(*format, *width, *height, NULL); + // Create a new buffer for the source image. + buffer = (uint8_t*) mlt_pool_alloc(size); + memcpy(buffer, *image, size); + // Make the background white. + memset(*image, 255 , size); + size = *width * *height * (hasAlpha? 4 : 3); + // Make the background transparent. + for (int i = 0; i < *width * *height; i++) + (*image)[4 * i + 3] = 0; + sourceImage.reset(new WebVfx::Image(buffer, *width, *height, size, hasAlpha)); + renderedImage.reset(new WebVfx::Image(*image, *width, *height, size, hasAlpha)); + } else { + int size = *width * *height * (hasAlpha? 4 : 3); + sourceImage.reset(new WebVfx::Image(*image, *width, *height, size, hasAlpha)); + renderedImage.reset(new WebVfx::Image(*image, *width, *height, size, hasAlpha)); + } + MLTWebVfx::ServiceManager* manager = locker.getManager(); - WebVfx::Image renderedImage(*image, *width, *height, - *width * *height * WebVfx::Image::BytesPerPixel); - manager->setImageForName(manager->getSourceImageName(), &renderedImage); + manager->setImageForName(manager->getSourceImageName(), sourceImage.get()); manager->setupConsumerListener(frame); // If there is a consumer set on the frame and the consumer is stopped, @@ -46,7 +69,8 @@ mlt_consumer consumer = static_cast<mlt_consumer>( mlt_properties_get_data(MLT_FRAME_PROPERTIES(frame), "consumer", NULL)); if (!consumer || !mlt_consumer_is_stopped(consumer)) - manager->render(&renderedImage, position, length); + manager->render(renderedImage.get(), position, length, hasAlpha); + mlt_pool_release(buffer); } return error; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/mlt/webvfx_producer.cpp new/webvfx-1.1.0/mlt/webvfx_producer.cpp --- old/webvfx-1.0.0/mlt/webvfx_producer.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/mlt/webvfx_producer.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -22,7 +22,7 @@ mlt_properties producer_props = MLT_PRODUCER_PROPERTIES(producer); int size; int bpp; - bool hasTransparency = false; + bool hasAlpha = false; { MLTWebVfx::ServiceLocker locker(MLT_PRODUCER_SERVICE(producer)); if (!locker.initialize(*width, *height)) @@ -30,7 +30,7 @@ if (mlt_properties_get_int( producer_props, "transparent") ) { *format = mlt_image_rgb24a; - hasTransparency = true; + hasAlpha = true; } else { *format = mlt_image_rgb24; @@ -40,10 +40,15 @@ *buffer = (uint8_t*)mlt_pool_alloc(size); mlt_frame_set_image(frame, *buffer, size, mlt_pool_release); - // When not using transparency, this will make the background white. + // Make the background white. memset(*buffer, 255, size); size = *width * *height * bpp; - WebVfx::Image outputImage(*buffer, *width, *height, size, hasTransparency); + if (hasAlpha) { + // Make the background transparent. + for (int i = 0; i < *width * *height; i++) + (*buffer)[4 * i + 3] = 0; + } + WebVfx::Image outputImage(*buffer, *width, *height, size, hasAlpha); locker.getManager()->setupConsumerListener(frame); // If there is a consumer set on the frame and the consumer is stopped, @@ -55,15 +60,7 @@ if (!consumer || !mlt_consumer_is_stopped(consumer)) locker.getManager()->render(&outputImage, mlt_properties_get_position(properties, kWebVfxPositionPropertyName), - mlt_producer_get_length(producer), hasTransparency); - } - if (hasTransparency) { - // Create the alpha channel - int alpha_size = *width * *height; - uint8_t *alpha = (uint8_t *)mlt_pool_alloc( alpha_size ); - // Initialise the alpha - memset( alpha, 255, alpha_size ); - mlt_frame_set_alpha(frame, alpha, alpha_size, mlt_pool_release); + mlt_producer_get_length(producer), hasAlpha); } mlt_properties_set_int(properties, "meta.media.width", *width); mlt_properties_set_int(properties, "meta.media.height", *height); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/mlt/webvfx_transition.cpp new/webvfx-1.1.0/mlt/webvfx_transition.cpp --- old/webvfx-1.0.0/mlt/webvfx_transition.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/mlt/webvfx_transition.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -39,12 +39,13 @@ if (!locker.initialize(*width, *height)) return 1; + bool hasAlpha = (*format == mlt_image_rgb24a); + int size = *width * *height * (hasAlpha? 4 : 3); MLTWebVfx::ServiceManager* manager = locker.getManager(); - WebVfx::Image renderedImage(*image, *width, *height, - *width * *height * WebVfx::Image::BytesPerPixel); + WebVfx::Image renderedImage(*image, *width, *height, size, hasAlpha); manager->setImageForName(manager->getSourceImageName(), &renderedImage); - WebVfx::Image targetImage(bImage, bWidth, bHeight, - bWidth * bHeight * WebVfx::Image::BytesPerPixel); + size = bWidth * bHeight * (hasAlpha? 4 : 3); + WebVfx::Image targetImage(bImage, bWidth, bHeight, size, hasAlpha); manager->setImageForName(manager->getTargetImageName(), &targetImage); manager->setupConsumerListener(aFrame); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/tools/browser/browser.ui new/webvfx-1.1.0/tools/browser/browser.ui --- old/webvfx-1.0.0/tools/browser/browser.ui 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/tools/browser/browser.ui 2019-06-09 07:22:59.000000000 +0200 @@ -59,7 +59,7 @@ <customwidget> <class>QWebView</class> <extends>QWidget</extends> - <header>QtWebKit/QWebView</header> + <header>QWebView</header> </customwidget> </customwidgets> <resources/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/tools/render/render.cpp new/webvfx-1.1.0/tools/render/render.cpp --- old/webvfx-1.0.0/tools/render/render.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/tools/render/render.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -125,6 +125,27 @@ double getNumberParameter(const QString& name) { return map[name].toDouble(); } + QVariantMap getRectParameter(const QString& name) { + QStringList parts = map[name].split(' '); + QVariantMap map; + int i = 0; + if (parts.size() > i) { + map["x"] = parts[i++].toDouble(); + if (parts.size() > i) { + map["y"] = parts[i++].toDouble(); + if (parts.size() > i) { + map["width"] = parts[i++].toDouble(); + if (parts.size() > i) { + map["height"] = parts[i++].toDouble(); + if (parts.size() > i) { + map["opacity"] = parts[i++].toDouble(); + } + } + } + } + } + return map; + } private: std::map<const QString, const QString>& map; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/content_context.cpp new/webvfx-1.1.0/webvfx/content_context.cpp --- old/webvfx-1.0.0/webvfx/content_context.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/content_context.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -34,7 +34,7 @@ // Create a QImage wrapper for the image data QImage qimage((uchar*)image->pixels(), image->width(), image->height(), - image->bytesPerLine(), image->hasAlpha() ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB888); + image->bytesPerLine(), image->hasAlpha() ? QImage::Format_RGBA8888 : QImage::Format_RGB888); imageMap.insert(name, qimage); } @@ -54,6 +54,14 @@ return QString(); } +QVariantMap ContentContext::getRectParameter(const QString& name) +{ + if (parameters) + return parameters->getRectParameter(name); + else + return QVariantMap(); +} + void ContentContext::setImageTypeMap(const QVariantMap& variantMap) { // Convert QVariantMap to ImageTypeMap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/content_context.h new/webvfx-1.1.0/webvfx/content_context.h --- old/webvfx-1.0.0/webvfx/content_context.h 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/content_context.h 2019-06-09 07:22:59.000000000 +0200 @@ -10,12 +10,11 @@ #include <QMap> #include <QObject> #include <QUrl> +#include <QVariantMap> #include "webvfx/effects.h" class QSize; class QString; -class QVariant; -typedef QMap<QString, QVariant> QVariantMap; namespace WebVfx { @@ -55,6 +54,7 @@ // JS: var title = webvfx.getStringParameter("title"); Q_INVOKABLE double getNumberParameter(const QString& name); Q_INVOKABLE QString getStringParameter(const QString& name); + Q_INVOKABLE QVariantMap getRectParameter(const QString& name); // Page contents can retrieve named images. // JS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/image.h new/webvfx-1.1.0/webvfx/image.h --- old/webvfx-1.0.0/webvfx/image.h 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/image.h 2019-06-09 07:22:59.000000000 +0200 @@ -12,7 +12,7 @@ * @brief Lightweight class for passing around a reference to a buffer of * raw image data. * - * Image is a wrapper around a buffer of RGB image data, + * Image is a wrapper around a buffer of RGB(A) image data, * along with metadata about it (width, height, bytes per row etc.). * The underlying image data buffer is not owned by Image and * its lifetime must exceed that of the referencing Image instance. @@ -20,7 +20,7 @@ class Image { public: - //! Number of bytes per pixel. + //! @deprecated Number of bytes per pixel. static const int BytesPerPixel = 3; Image() @@ -31,7 +31,7 @@ , hasAlpha_(false) {} /*! - * @param pixels 24 bit RGB image data. Must be valid for the lifetime + * @param pixels 24-bit RGB or 32-bit RGBA image data. Must be valid for the lifetime * of the Image. * @param width Width of the image in pixels * @param height Height of the image in pixels diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/parameters.cpp new/webvfx-1.1.0/webvfx/parameters.cpp --- old/webvfx-1.0.0/webvfx/parameters.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/parameters.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -14,3 +14,8 @@ { return QString(); } + +QVariantMap WebVfx::Parameters::getRectParameter(const QString&) +{ + return QVariantMap(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/parameters.h new/webvfx-1.1.0/webvfx/parameters.h --- old/webvfx-1.0.0/webvfx/parameters.h 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/parameters.h 2019-06-09 07:22:59.000000000 +0200 @@ -5,6 +5,7 @@ #ifndef WEBVFX_PARAMETERS_H_ #define WEBVFX_PARAMETERS_H_ +#include <QVariantMap> class QString; @@ -34,6 +35,18 @@ * @param name Parameter name */ virtual QString getStringParameter(const QString& name); + /*! + * @brief Return a rectangle value for parameter @c name. + * + * Rectangle is a map of doubles with the following keys: + * - x + * - y + * - width + * - height + * - opacity + * @param name Parameter name + */ + virtual QVariantMap getRectParameter(const QString& name); }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/render_strategy.cpp new/webvfx-1.1.0/webvfx/render_strategy.cpp --- old/webvfx-1.0.0/webvfx/render_strategy.cpp 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/render_strategy.cpp 2019-06-09 07:22:59.000000000 +0200 @@ -175,34 +175,17 @@ { if (!renderImage || !renderImage->pixels() || !renderImage->width() || !renderImage->height()) return false; - if ( renderImage->hasAlpha() ) { - // we need to swap r and b channels - QImage image(renderImage->width(), renderImage->height(), QImage::Format_ARGB32); - image.fill(Qt::transparent); - // Paint into image - QPainter painter(&image); - painter.setRenderHints(QPainter::Antialiasing | + // QImage referencing our Image bits + QImage image((uchar*)renderImage->pixels(), renderImage->width(), + renderImage->height(), renderImage->bytesPerLine(), + renderImage->hasAlpha()? QImage::Format_RGBA8888 : QImage::Format_RGB888); + // Paint into image + QPainter painter(&image); + painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, true); - content->paintContent(&painter); - painter.end(); - QImage swapped = image.rgbSwapped(); - WebVfx::Image sourceImage(const_cast<uchar*>(swapped.constBits()), - swapped.width(), swapped.height(), swapped.byteCount(), swapped.hasAlphaChannel()); - renderImage->copyPixelsFrom(sourceImage); - } else { - // QImage referencing our Image bits - QImage image((uchar*)renderImage->pixels(), renderImage->width(), - renderImage->height(), renderImage->bytesPerLine(), - QImage::Format_RGB888); - // Paint into image - QPainter painter(&image); - painter.setRenderHints(QPainter::Antialiasing | - QPainter::TextAntialiasing | - QPainter::SmoothPixmapTransform, true); - content->paintContent(&painter); - painter.end(); - } + content->paintContent(&painter); + painter.end(); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/webvfx-1.0.0/webvfx/webvfx.pro new/webvfx-1.1.0/webvfx/webvfx.pro --- old/webvfx-1.0.0/webvfx/webvfx.pro 2018-11-26 01:25:07.000000000 +0100 +++ new/webvfx-1.1.0/webvfx/webvfx.pro 2019-06-09 07:22:59.000000000 +0200 @@ -4,7 +4,7 @@ include(../common.pri) TEMPLATE = lib -VERSION = 1.0.0 +VERSION = 1.1.0 HEADERS += content.h HEADERS += content_context.h ++++++ webvfx-nobrowser.patch ++++++ --- /var/tmp/diff_new_pack.Runboq/_old 2019-11-21 12:59:49.090506602 +0100 +++ /var/tmp/diff_new_pack.Runboq/_new 2019-11-21 12:59:49.090506602 +0100 @@ -1,8 +1,8 @@ -Index: webvfx-1.0.0/all.pro +Index: webvfx-1.1.0/all.pro =================================================================== ---- webvfx-1.0.0/all.pro.orig 2018-11-26 02:25:07.000000000 +0200 -+++ webvfx-1.0.0/all.pro 2019-01-10 15:28:26.062060871 +0200 -@@ -14,7 +14,7 @@ CONFIG += ordered +--- webvfx-1.1.0/all.pro.orig ++++ webvfx-1.1.0/all.pro +@@ -19,7 +19,7 @@ CONFIG += ordered SUBDIRS += webvfx SUBDIRS += viewer SUBDIRS += tools/render ++++++ webvfx-versioned-libdir.patch ++++++ --- /var/tmp/diff_new_pack.Runboq/_old 2019-11-21 12:59:49.094506600 +0100 +++ /var/tmp/diff_new_pack.Runboq/_new 2019-11-21 12:59:49.094506600 +0100 @@ -1,7 +1,7 @@ -Index: webvfx-d65a42d25a887d11fd5cf5e485c1561dc802b671/webvfx/webvfx.pro +Index: webvfx-1.1.0/webvfx/webvfx.pro =================================================================== ---- webvfx-1.0.0/webvfx/webvfx.pro.orig 2018-02-24 21:17:19.000000000 +0200 -+++ webvfx-1.0.0/webvfx/webvfx.pro 2018-05-06 12:24:57.399644007 +0200 +--- webvfx-1.1.0/webvfx/webvfx.pro.orig 2018-02-24 21:17:19.000000000 +0200 ++++ webvfx-1.1.0/webvfx/webvfx.pro 2018-05-06 12:24:57.399644007 +0200 @@ -47,5 +47,5 @@ QT += opengl quick TARGET = webvfx
