Hello community, here is the log from the commit of package vlc for openSUSE:Leap:15.2 checked in at 2020-04-28 20:09:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/vlc (Old) and /work/SRC/openSUSE:Leap:15.2/.vlc.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vlc" Tue Apr 28 20:09:58 2020 rev:49 rq:796442 version:3.0.9.2 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/vlc/vlc.changes 2020-01-15 16:28:20.096750457 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.vlc.new.2738/vlc.changes 2020-04-28 20:09:59.220388485 +0200 @@ -1,0 +2,170 @@ +Thu Apr 16 16:10:19 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org> + +- Update to version 3.0.9.2: + + Misc: Properly bump the version in configure.ac. +- Changes from version 3.0.9.1: + + Misc: Fix VLSub returning 401 for earch request. +- Changes from version 3.0.9: + + Core: Work around busy looping when playing an invalid item + through VLM. + + Access: + * Multiple dvdread and dvdnav crashs fixes + * Fixed DVD glitches on clip change + * Fixed dvdread commands/data sequence inversion in some cases causing + unwanted glitches + * Better handling of authored as corrupted DVD + * Added libsmb2 support for SMB2/3 shares + + Demux: + * Fix TTML entities not passed to decoder + * Fixed some WebVTT styling tags being not applied + * Misc raw H264/HEVC frame rate fixes + * Fix adaptive regression on TS format change (mostly HLS) + * Fixed MP4 regression with twos/sowt PCM audio + * Fixed some MP4 raw quicktime and ms-PCM audio + * Fixed MP4 interlacing handling + * Multiple adaptive stack (DASH/HLS/Smooth) fixes + * Enabled Live seeking for HLS + * Fixed seeking in some cases for HLS + * Improved Live playback for Smooth and DASH + * Fixed adaptive unwanted end of stream in some cases + * Faster adaptive start and new buffering control options + + Packetizers: + * Fixes H264/HEVC incomplete draining in some cases + * packetizer_helper: Fix potential trailing junk on last packet + * Added missing drain in packetizers that was causing missing + last frame or audio + * Improved check to prevent fLAC synchronization drops + + Decoder: + * avcodec: revector video decoder to fix incomplete drain + * spudec: implemented palette updates, fixing missing subtitles + on some DVD + * Fixed WebVTT CSS styling not being applied on Windows/macOS + * Fixed Hebrew teletext pages support in zvbi + * Fixed Dav1d aborting decoding on corrupted picture + * Extract and display of all CEA708 subtitles + * Update libfaad to 2.9.1 + * Add DXVA support for VP9 Profile 2 (10 bits) + * Mediacodec aspect ratio with Amazon devices + + Audio output: + * Added support for iOS audiounit audio above 48KHz + * Added support for amem audio up to 384KHz + + Video output: + * Fix for opengl glitches in some drivers + * Fix GMA950 opengl support on macOS + * YUV to RGB StretchRect fixes with NVIDIA drivers + * Use libpacebo new tone mapping desaturation algorithm + + Text renderer: + * Fix crashes on macOS with SSA/ASS subtitles containing emoji + * Fixed unwanted growing background in Freetype rendering and Y padding + + Mux: Fixed some YUV mappings + + Service Discovery: Update libmicrodns to 0.1.2. + + Misc: + * Update YouTube, SoundCloud and Vocaroo scripts: this restores + playback of YouTube URLs. + * Add missing .wpl & .zpl file associations on Windows + * Improved chromecast audio quality + + Updated translations. +- Drop patches that have been merged upstream: +D 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch +D 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch +D reproducible.patch + + +------------------------------------------------------------------- +Tue Mar 31 08:58:04 UTC 2020 - Bernhard Wiedemann <bwiedem...@suse.com> + +- Make package build reproducible: + * Add reproducible.patch to normalize created tarballs + * Create %ghost file with fixed size + +------------------------------------------------------------------- +Fri Mar 27 09:23:26 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- Add patch to fix missing include with Qt 5.15: + * fix-missing-includes-with-qt-5.15.patch + +------------------------------------------------------------------- +Thu Jan 23 13:06:03 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org> + +- BuildRequire pkgconfig(libudev) instead of libudev-devel: Allow + OBS to shortcut through the -mini flavors. + +------------------------------------------------------------------- +Sun Jan 12 16:47:46 UTC 2020 - Stefan Brüns <stefan.bru...@rwth-aachen.de> + +- Port away from obsolete OpenCV C API, fixes build with OpenCV 3.4.9, + add 0001-Port-OpenCV-facedetect-example-to-C-API.patch +- Move OpenCV plugins to subpackage, as libopencv has a quite large + footprint. +- Remove __DATE__/__TIME__ workaround, current GCC respects + SOURCE_DATE_EPOCH. + +------------------------------------------------------------------- +Wed Sep 25 09:13:24 UTC 2019 - Martin Liška <mli...@suse.cz> + +- Use %make_build macro in order to provide verbose output. + +------------------------------------------------------------------- +Fri Aug 23 06:49:28 UTC 2019 - Bjørn Lie <bjorn....@gmail.com> + +- Add conditional pkgconfig(libmfx) BuildRequires: Build with Intel + Media SDK support. + +------------------------------------------------------------------- +Tue Aug 20 07:55:46 UTC 2019 - Dominique Leuenberger <dims...@opensuse.org> + +- Update to version 3.0.8 'vetinari': + + Fix stuttering for low framerate videos + + Improve adaptive streaming + + Improve audio output for external audio devices on macOS/iOS + + Fix hardware acceleration with Direct3D11 for some AMD drivers + + Fix WebVTT subtitles rendering + + Vetinari is a major release changing a lot in the media engine of VLC. + It is one of the largest release we've ever done. + Notably, it: + - activates hardware decoding on all platforms, of H.264 & H.265, 8 & 10bits, + allowing 4K60 or even 8K decoding with little CPU consumption, + - merges all the code from the mobile ports into the same codebase with + common numbering and releases, + - supports 360 video and 3D audio, and prepares for VR content, + - supports direct HDR and HDR tone-mapping, + - updates the audio passthrough for HD Audio codecs, + - allows browsing of local network drives like SMB, FTP, SFTP, NFS... + - stores the passwords securely, + - brings a new subtitle rendering engine, supporting ComplexTextLayout + and font fallback to support multiple languages and fonts, + - supports ChromeCast with the new renderer framework, + - adds support for numerous new formats and codecs, including WebVTT, + AV1, TTML, HQX, 708, Cineform, and many more, + - improves Bluray support with Java menus, aka BD-J, + - updates the macOS interface with major cleaning and improvements, + - support HiDPI UI on Windows, with the switch to Qt5, + - prepares the experimental support for Wayland on Linux, and + switches to OpenGL by default on Linux. + + Security fixes included: + * Fix a buffer overflow in the MKV demuxer (CVE-2019-14970) + * Fix a read buffer overflow in the avcodec decoder (CVE-2019-13962) + * Fix a read buffer overflow in the FAAD decoder + * Fix a read buffer overflow in the OGG demuxer (CVE-2019-14437, CVE-2019-14438) + * Fix a read buffer overflow in the ASF demuxer (CVE-2019-14776) + * Fix a use after free in the MKV demuxer (CVE-2019-14777, CVE-2019-14778) + * Fix a use after free in the ASF demuxer (CVE-2019-14533) + * Fix a couple of integer underflows in the MP4 demuxer (CVE-2019-13602) + * Fix a null dereference in the dvdnav demuxer + * Fix a null dereference in the ASF demuxer (CVE-2019-14534) + * Fix a null dereference in the AVI demuxer + * Fix a division by zero in the CAF demuxer (CVE-2019-14498) + * Fix a division by zero in the ASF demuxer (CVE-2019-14535) +- Drop vlc-CVE-2019-13962.patch, vlc-CVE-2019-13602_1.patch and + vlc-CVE-2019-13602_2.patch: fixed upstream. +- Disbale mod-plug for the time being: libmodplug 0.8.9 is not yet + available. + +------------------------------------------------------------------- +Sun Aug 4 01:44:44 UTC 2019 - Stefan Brüns <stefan.bru...@rwth-aachen.de> + +- Disable SDL_image (SDL 1.2) based codec. It is only a wrapper around some + image loading libraries (libpng, libjpeg, ...) which are either wrapped + by vlc itself (libpng_plugin.so) or via libavcodec (libavcodec_plugin.so). + +------------------------------------------------------------------- Old: ---- 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch vlc-3.0.7.1.tar.xz vlc-CVE-2019-13602_1.patch vlc-CVE-2019-13602_2.patch vlc-CVE-2019-13962.patch New: ---- 0001-Port-OpenCV-facedetect-example-to-C-API.patch fix-missing-includes-with-qt-5.15.patch vlc-3.0.9.2.tar.xz vlc-3.0.9.2.tar.xz.asc vlc.keyring ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vlc.spec ++++++ --- /var/tmp/diff_new_pack.BeaEQr/_old 2020-04-28 20:09:59.924389947 +0200 +++ /var/tmp/diff_new_pack.BeaEQr/_new 2020-04-28 20:09:59.928389955 +0200 @@ -1,7 +1,7 @@ # # spec file for package vlc # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -33,16 +33,16 @@ %bcond_with faad %bcond_with fdk_aac Name: vlc -Version: 3.0.7.1 +Version: 3.0.9.2 Release: 0 Summary: Graphical media player License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Productivity/Multimedia/Video/Players URL: http://www.videolan.org Source: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz -# Add vlc.changes as source, so we can reproducibly extract the date from it during build -Source1: %{name}.changes Source2: %{name}-rpmlintrc +Source98: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz.asc +Source99: vlc.keyring # PATCH-FIX-UPSTREAM vlc.a52.patch https://trac.videolan.org/vlc/ticket/3731 dims...@opensuse.org -- Support new version of liba52 Patch0: vlc.a52.patch # PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dims...@opensuse.org -- Allow usage of deprecated fribidi functions @@ -51,20 +51,13 @@ Patch2: vlc-lua-5.3.patch # PATCH-FIX-UPSTREAM fix-build-with-fdk-2.0.patch -- Fix building vlc with libfdk-aac v2 Patch3: fix-build-with-fdk-2.0.patch -# PATCH-FIX-UPSTREAM vlc-CVE-2019-13962.patch -- Fix An Integer Underflow in MP4_EIA608_Convert() -Patch4: vlc-CVE-2019-13962.patch -# PATCH-FIX-UPSTREAM vlc-CVE-2019-13602_1.patch -- mp4: fix integer underflow -Patch5: vlc-CVE-2019-13602_1.patch -# PATCH-FIX-UPSTREAM vlc-CVE-2019-13602_2.patch -- mp4: fix integer underflow -Patch6: vlc-CVE-2019-13602_2.patch # PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant Patch100: vlc-projectM-qt5.patch -# PATCH-FIX-UPSTREAM 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch -- Fix some memleaks -Patch101: 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch -# PATCH-FIX-UPSTREAM 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch -- Use Avahi for discovery, microdns is not available -Patch102: 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch +# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API +Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch +# PATCH-FIX-UPSTREAM -- Fix building with Qt 5.15 by adding a missing include +Patch104: fix-missing-includes-with-qt-5.15.patch BuildRequires: Mesa-devel -BuildRequires: SDL-devel >= 1.2.10 BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.24 BuildRequires: avahi-devel >= 0.6 @@ -102,7 +95,6 @@ BuildRequires: libssh2-devel BuildRequires: libtheora-devel >= 1.0 BuildRequires: libtool -BuildRequires: libudev-devel >= 142 BuildRequires: libv4l-devel BuildRequires: libvorbis-devel >= 1.1 BuildRequires: libvpx-devel >= 1.5.0 @@ -115,6 +107,7 @@ BuildRequires: pkgconfig BuildRequires: posix_cc BuildRequires: schroedinger-devel >= 1.0.10 +BuildRequires: pkgconfig(libudev) >= 142 #BuildRequires: slang-devel BuildRequires: speex-devel >= 1.0.5 BuildRequires: update-desktop-files @@ -137,7 +130,7 @@ BuildRequires: pkgconfig(libavutil) >= 52.4.0 BuildRequires: pkgconfig(libbluray) >= 0.6.2 BuildRequires: pkgconfig(libgme) -BuildRequires: pkgconfig(libmodplug) >= 0.8.4 +#BuildRequires: pkgconfig(libmodplug) >= 0.8.9 BuildRequires: pkgconfig(libmpeg2) > 0.3.2 BuildRequires: pkgconfig(libmtp) >= 1.0.0 BuildRequires: pkgconfig(libnfs) @@ -175,6 +168,9 @@ Obsoletes: %{name}-gnome <= %{version} %if 0%{?suse_version} >= 1550 BuildRequires: pkgconfig(dav1d) +%ifarch x86_64 +BuildRequires: pkgconfig(libmfx) +%endif %endif %if 0%{?suse_version} > 1500 && 0%{?is_opensuse} BuildRequires: pkgconfig(srt) @@ -198,7 +194,6 @@ BuildRequires: pkgconfig(xi) %endif %if 0%{?is_opensuse} -BuildRequires: pkgconfig(SDL_image) >= 1.2.10 BuildRequires: pkgconfig(libupnp) BuildRequires: pkgconfig(opencv) > 2.0 %ifarch %{ix86} x86_64 @@ -381,19 +376,33 @@ This subpackage provides a Qt interface for VLC and selects it by default when `vlc` is invoked from an X session. +%package opencv +Summary: OpenCV plugins for VLC media player +Group: Productivity/Multimedia/Video/Players +Requires: %{name}-noX = %{version}-%{release} +# We need the noX package first, as it contains vlc-cache-gen +Requires(post): %{name}-noX +# Package split +Provides: %{name}:%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so +Conflicts: %{name} < %{version}-%{release} +Supplements: packageand(%{name}-noX:opencv3) +# Data required for face detection +Recommends: opencv3 + +%description opencv +This subpackage provides a wrapper plugin for OpenCV for +OpenCV based video filters and a face detection example. + %prep %setup -q %patch0 -p1 %patch1 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 %patch100 -p1 %endif -%patch101 -p1 -%patch102 -p1 +%patch103 -p1 +%patch104 -p1 ### And LUA 5.3.1 has some more API changes if pkg-config --atleast-version 5.3.1 lua; then @@ -404,12 +413,6 @@ # We do not rely on contrib but make use of system libraries rm -rf contrib -# fix builddate info -# Remove build time references so build-compare can do its work -FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE1} '+%%H:%%M') -FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{SOURCE1} '+%%b %%e %%Y') -sed -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" -i modules/gui/qt/dialogs/help.cpp src/config/help.c -sed -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -i modules/gui/qt/dialogs/help.cpp src/config/help.c %build %define _lto_cflags %{nil} @@ -444,7 +447,7 @@ --enable-live555 \ --enable-lua \ --enable-mad \ - --enable-mod \ + --disable-mod \ --enable-ogg \ --enable-optimizations \ --enable-postproc \ @@ -498,7 +501,7 @@ ### ONLY REMOVE THIS IF YOU KNOW WHAT YOU ARE DOING! sed -i 's/^#define.*VLC_COMPILE_HOST.*/#define VLC_COMPILE_HOST "obs-build"/' config.h -make %{?_smp_mflags} +%make_build %install %make_install @@ -527,6 +530,9 @@ done %find_lang vlc +# ensure the ghost file has constant length for reproducibility +dd if=/dev/zero bs=1M count=1 of=%{buildroot}/%{_libdir}/vlc/plugins/plugins.dat + %post %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins @@ -570,6 +576,12 @@ %postun -n %{name}-vdpau %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins +%post -n %{name}-opencv +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins + +%postun -n %{name}-opencv +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins + %files %exclude %{_libdir}/vlc/libcompat.a # The presence of the .desktop file is what gives AppStream the @@ -598,9 +610,6 @@ %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %{_libdir}/vlc/plugins/codec/libavcodec_plugin.so %{_libdir}/vlc/plugins/codec/liblibass_plugin.so -%if 0%{?is_opensuse} -%{_libdir}/vlc/plugins/codec/libsdl_image_plugin.so -%endif %{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so %{_libdir}/vlc/plugins/demux/libavformat_plugin.so %{_libdir}/vlc/plugins/gui/libskins2_plugin.so @@ -615,10 +624,6 @@ %{_libdir}/vlc/plugins/text_renderer/libfreetype_plugin.so %{_libdir}/vlc/plugins/text_renderer/libsvg_plugin.so %{_libdir}/vlc/plugins/video_chroma/libswscale_plugin.so -%if 0%{?is_opensuse} -%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so -%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so -%endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so @@ -836,6 +841,9 @@ %{_libdir}/vlc/plugins/codec/libcvdsub_plugin.so %if 0%{?suse_version} >= 1550 %{_libdir}/vlc/plugins/codec/libdav1d_plugin.so +%ifarch x86_64 +%{_libdir}/vlc/plugins/codec/libqsv_plugin.so +%endif %endif %{_libdir}/vlc/plugins/codec/libddummy_plugin.so %{_libdir}/vlc/plugins/codec/libdvbsub_plugin.so @@ -907,7 +915,7 @@ %{_libdir}/vlc/plugins/demux/libimage_plugin.so %{_libdir}/vlc/plugins/demux/libmjpeg_plugin.so %{_libdir}/vlc/plugins/demux/libmkv_plugin.so -%{_libdir}/vlc/plugins/demux/libmod_plugin.so +#%{_libdir}/vlc/plugins/demux/libmod_plugin.so %{_libdir}/vlc/plugins/demux/libmp4_plugin.so %{_libdir}/vlc/plugins/demux/libmpgv_plugin.so %{_libdir}/vlc/plugins/demux/libnoseek_plugin.so @@ -1132,6 +1140,12 @@ %{_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so %{_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so +%if 0%{?is_opensuse} +%files opencv +%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so +%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so +%endif + %files -n libvlc%{libvlc} %{_libdir}/libvlc.so.%{libvlc}* ++++++ 0001-Port-OpenCV-facedetect-example-to-C-API.patch ++++++ >From f53677bf35c6b0a669d799182d6383f350d1503d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sun, 12 Jan 2020 17:37:53 +0100 Subject: [PATCH] Port OpenCV facedetect example to C++ API Tested with: cvlc --video-filter=opencv_wrapper \ --opencv-filter-name opencv_example \ --opencv-chroma RGB32 \ --opencv-haarcascade-file /tmp/haarcascade_frontalface_default.xml \ v4l2:///dev/video0 --- modules/video_filter/opencv_example.cpp | 117 +++++++++++------------- 1 file changed, 52 insertions(+), 65 deletions(-) diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp index a7a0bd7821..87a3451f1a 100644 --- a/modules/video_filter/opencv_example.cpp +++ b/modules/video_filter/opencv_example.cpp @@ -40,19 +40,16 @@ #include <vlc_image.h> #include "filter_event_info.h" -#include <opencv2/core/core_c.h> -#include <opencv2/core/core.hpp> -#include <opencv2/imgproc/imgproc_c.h> -#include <opencv2/imgproc/imgproc.hpp> -#include <opencv2/objdetect/objdetect.hpp> +#include <opencv2/opencv.hpp> /***************************************************************************** * filter_sys_t : filter descriptor *****************************************************************************/ -struct filter_sys_t +class filter_sys_t { - CvMemStorage* p_storage; - CvHaarClassifierCascade* p_cascade; +public: + cv::CascadeClassifier cascade; + std::vector<video_filter_region_info_t> event_info_storage; video_filter_event_info_t event_info; int i_id; }; @@ -92,15 +89,15 @@ static int OpenFilter( vlc_object_t *p_this ) filter_sys_t *p_sys; /* Allocate the memory needed to store the decoder's structure */ - if( ( p_filter->p_sys = p_sys = - (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL ) + p_filter->p_sys = p_sys = new filter_sys_t; + if(p_sys == nullptr) { return VLC_ENOMEM; } //init the video_filter_event_info_t struct p_sys->event_info.i_region_size = 0; - p_sys->event_info.p_region = NULL; + p_sys->event_info.p_region = nullptr; p_sys->i_id = 0; p_filter->pf_video_filter = Filter; @@ -116,8 +113,9 @@ static int OpenFilter( vlc_object_t *p_this ) //OpenCV init specific to this example char* filename = var_InheritString( p_filter, "opencv-haarcascade-file" ); - p_sys->p_cascade = (CvHaarClassifierCascade*)cvLoad( filename, 0, 0, 0 ); - p_sys->p_storage = cvCreateMemStorage(0); + if (!p_sys->cascade.load(filename)) { + msg_Err( p_filter, "Could not load %s", filename); + } free( filename ); return VLC_SUCCESS; @@ -131,14 +129,7 @@ static void CloseFilter( vlc_object_t *p_this ) filter_t *p_filter = (filter_t*)p_this; filter_sys_t *p_sys = p_filter->p_sys; - if( p_sys->p_cascade ) - cvReleaseHaarClassifierCascade( &p_sys->p_cascade ); - - if( p_sys->p_storage ) - cvReleaseMemStorage( &p_sys->p_storage ); - - free( p_sys->event_info.p_region ); - free( p_sys ); + delete p_sys; var_Destroy( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE); } @@ -148,15 +139,13 @@ static void CloseFilter( vlc_object_t *p_this ) ****************************************************************************/ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) { - IplImage** p_img = NULL; - CvPoint pt1, pt2; - int scale = 1; + IplImage** p_img = nullptr; filter_sys_t *p_sys = p_filter->p_sys; - + if ((!p_pic) ) { msg_Err( p_filter, "no image array" ); - return NULL; + return nullptr; } //(hack) cast the picture_t to array of IplImage* p_img = (IplImage**) p_pic; @@ -165,50 +154,48 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) if ((!p_img[0])) //1st plane is 'I' i.e. greyscale { msg_Err( p_filter, "no image" ); - return NULL; + return nullptr; } + // Wrapper for IplImage* -> cv::Mat (reference, not copy) + cv::Mat gray = cv::cvarrToMat(p_img[0]); //perform face detection - cvClearMemStorage(p_sys->p_storage); - if( p_sys->p_cascade ) + if (p_sys->cascade.empty()) + msg_Err( p_filter, "No cascade - is opencv-haarcascade-file valid?" ); + + //we should make some of these params config variables + std::vector<cv::Rect> faces; + p_sys->cascade.detectMultiScale(gray, faces, + 1.15, 5, + CV_HAAR_DO_CANNY_PRUNING, + cv::Size(20, 20)); + //create the video_filter_region_info_t struct + if (faces.empty()) + return p_pic; + + //msg_Dbg( p_filter, "Found %d face(s)", faces.size()); + p_sys->event_info_storage.resize(faces.size()); + p_sys->event_info.i_region_size = faces.size(); + p_sys->event_info.p_region = p_sys->event_info_storage.data(); + if( !p_sys->event_info.p_region ) + return nullptr; + + //populate the video_filter_region_info_t struct + for( int i = 0; i < faces.size(); i++ ) { - //we should make some of these params config variables - CvSeq *faces = cvHaarDetectObjects( p_img[0], p_sys->p_cascade, - p_sys->p_storage, 1.15, 5, - CV_HAAR_DO_CANNY_PRUNING, - cvSize(20, 20) ); - //create the video_filter_region_info_t struct - if (faces && (faces->total > 0)) - { - //msg_Dbg( p_filter, "Found %d face(s)", faces->total ); - free( p_sys->event_info.p_region ); - p_sys->event_info.p_region = (video_filter_region_info_t*) - calloc( faces->total, sizeof(video_filter_region_info_t)); - if( !p_sys->event_info.p_region ) - return NULL; - p_sys->event_info.i_region_size = faces->total; - } - - //populate the video_filter_region_info_t struct - for( int i = 0; i < (faces ? faces->total : 0); i++ ) - { - CvRect *r = (CvRect*)cvGetSeqElem( faces, i ); - pt1.x = r->x*scale; - pt2.x = (r->x+r->width)*scale; - pt1.y = r->y*scale; - pt2.y = (r->y+r->height)*scale; - cvRectangle( p_img[0], pt1, pt2, CV_RGB(0,0,0), 3, 8, 0 ); - - *(CvRect*)(&(p_sys->event_info.p_region[i])) = *r; - p_sys->event_info.p_region[i].i_id = p_sys->i_id++; - p_sys->event_info.p_region[i].p_description = "Face Detected"; - } - - if (faces && (faces->total > 0)) //raise the video filter event - var_TriggerCallback( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE ); + const cv::Rect& r = faces[i]; + cv::rectangle(gray, r, CV_RGB(0,0,0), 3); + + p_sys->event_info.p_region[i].i_x = r.x; + p_sys->event_info.p_region[i].i_y = r.y; + p_sys->event_info.p_region[i].i_width = r.width; + p_sys->event_info.p_region[i].i_height = r.height; + + p_sys->event_info.p_region[i].i_id = p_sys->i_id++; + p_sys->event_info.p_region[i].p_description = "Face Detected"; } - else - msg_Err( p_filter, "No cascade - is opencv-haarcascade-file valid?" ); + + var_TriggerCallback( p_filter->obj.libvlc, VIDEO_FILTER_EVENT_VARIABLE ); return p_pic; } -- 2.24.1 ++++++ fix-missing-includes-with-qt-5.15.patch ++++++ Index: vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp =================================================================== --- vlc-3.0.8.orig/modules/gui/qt/util/timetooltip.hpp +++ vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp @@ -25,6 +25,7 @@ #include "qt.hpp" #include <QWidget> +#include <QPainterPath> class TimeTooltip : public QWidget { Index: vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp =================================================================== --- vlc-3.0.8.orig/modules/gui/qt/components/playlist/views.cpp +++ vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp @@ -27,6 +27,7 @@ #include "input_manager.hpp" /* THEMIM */ #include <QPainter> +#include <QPainterPath> #include <QRect> #include <QStyleOptionViewItem> #include <QFontMetrics> Index: vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp =================================================================== --- vlc-3.0.8.orig/modules/gui/qt/dialogs/plugins.cpp +++ vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp @@ -53,6 +53,7 @@ #include <QListView> #include <QListWidget> #include <QPainter> +#include <QPainterPath> #include <QStyleOptionViewItem> #include <QKeyEvent> #include <QPushButton> ++++++ vlc-3.0.7.1.tar.xz -> vlc-3.0.9.2.tar.xz ++++++ /work/SRC/openSUSE:Leap:15.2/vlc/vlc-3.0.7.1.tar.xz /work/SRC/openSUSE:Leap:15.2/.vlc.new.2738/vlc-3.0.9.2.tar.xz differ: char 26, line 1