From 30399bbcb6620d781d306603c11c4c44e2630f22 Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis Date: Tue, 22 Jul 2008 16:56:04 +0000 Subject: [PATCH 001/671] Setup of module vlc --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From e4fb5a5dfa0d135c455caa0c51f04583e9c05dc3 Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis Date: Sat, 9 Aug 2008 10:01:16 +0000 Subject: [PATCH 002/671] initial import from livna --- .gitignore | 2 + sources | 2 + vlc-git-opencvfix.patch | 12 + vlc-trunk-default_font.patch | 12 + vlc.spec | 1095 ++++++++++++++++++++++++++++++++++ 5 files changed, 1123 insertions(+) create mode 100644 vlc-git-opencvfix.patch create mode 100644 vlc-trunk-default_font.patch create mode 100644 vlc.spec diff --git a/.gitignore b/.gitignore index e69de29..e97f681 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +live.2008.07.25.tar.gz +vlc-snapshot-20080802.tar.bz2 diff --git a/sources b/sources index e69de29..ce0b8c5 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +32e7bd2fdb04d0b05462b24d42409ec7 live.2008.07.25.tar.gz +d8884f1b2db22a01e81ff53edef1b063 vlc-snapshot-20080802.tar.bz2 diff --git a/vlc-git-opencvfix.patch b/vlc-git-opencvfix.patch new file mode 100644 index 0000000..ca087b4 --- /dev/null +++ b/vlc-git-opencvfix.patch @@ -0,0 +1,12 @@ +diff -up vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c.fix vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c +--- vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c.fix 2008-08-02 12:36:38.000000000 +0200 ++++ vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c 2008-08-02 12:36:48.000000000 +0200 +@@ -395,7 +395,7 @@ static void End( vout_thread_t *p_vout ) + p_vout->p_sys->p_opencv = NULL; + } + +- vout_CloseAndRelease( p_vout->p_sys->p_vout ) ++ vout_CloseAndRelease( p_vout->p_sys->p_vout ); + } + + /***************************************************************************** diff --git a/vlc-trunk-default_font.patch b/vlc-trunk-default_font.patch new file mode 100644 index 0000000..df7e8c5 --- /dev/null +++ b/vlc-trunk-default_font.patch @@ -0,0 +1,12 @@ +diff -up vlc-0.9.0-svn/modules/misc/freetype.c.default_font vlc-0.9.0-svn/modules/misc/freetype.c +--- vlc-0.9.0-svn/modules/misc/freetype.c.default_font 2007-11-21 22:58:06.000000000 +0100 ++++ vlc-0.9.0-svn/modules/misc/freetype.c 2007-11-21 23:00:54.000000000 +0100 +@@ -61,7 +61,7 @@ + #define DEFAULT_FONT "" /* Default font found at run-time */ + #define FC_DEFAULT_FONT "Arial" + #else +-#define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf" ++#define DEFAULT_FONT "/usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf" + #define FC_DEFAULT_FONT "Serif Bold" + #endif + diff --git a/vlc.spec b/vlc.spec new file mode 100644 index 0000000..c7fa035 --- /dev/null +++ b/vlc.spec @@ -0,0 +1,1095 @@ +# TODO: libdc1394(juju), modularization (vlc-plugin-foo) + +%define with_internal_live555 1 +%define with_shared_live555 0 +%define live555_date 2008.07.25 +%define vlc_git 1 +%define vlc_date 20080802 +%define with_mozilla 1 +%define with_dc1394 0 +%define with_directfb 1 +%define with_dirac 1 + +Summary: Multi-platform MPEG, DVD, and DivX player +Name: vlc +Version: 0.9.0 +%define release_tag 0.5 +%if %vlc_git +%define _version %{version}-test3 +Release: %{release_tag}.%{vlc_date}git%{?dist}.1 +%else +%define _version %{version} +Release: %{release_tag}%{?dist} +%endif +License: GPLv2+ +Group: Applications/Multimedia +URL: http://www.videolan.org/ +%if %vlc_git +Source0: http://nightlies.videolan.org/build/source/trunk-%{vlc_date}-0012/vlc-snapshot-%{vlc_date}.tar.bz2 +%else +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}.tar.bz2 +%endif +%if %with_internal_live555 +Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz +%endif +Patch0: vlc-trunk-default_font.patch +Patch1: vlc-git-opencvfix.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: desktop-file-utils +%if 0 +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif + +BuildRequires: a52dec-devel +BuildRequires: aalib-devel +BuildRequires: alsa-lib-devel +BuildRequires: avahi-devel +BuildRequires: cdparanoia-devel +BuildRequires: dbus-devel +%if %with_dirac +BuildRequires: dirac-devel >= 0.6.0 +%endif +%if %with_directfb +BuildRequires: directfb-devel +%endif +BuildRequires: faac-devel +BuildRequires: faad2-devel +BuildRequires: ffmpeg-devel >= 0.4.9-0 +BuildRequires: flac-devel +BuildRequires: fluidsynth-devel +BuildRequires: fribidi-devel +BuildRequires: gnome-vfs2-devel +BuildRequires: gnutls-devel >= 1.0.17 +BuildRequires: gsm-devel +BuildRequires: hal-devel +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: libavc1394-devel +BuildRequires: libcaca-devel +BuildRequires: libcddb-devel +BuildRequires: libcdio-devel >= 0.77-3 +BuildRequires: libdca-devel +BuildRequires: libdv-devel +BuildRequires: libdvbpsi-devel +BuildRequires: libdvdnav-devel +BuildRequires: libebml-devel +BuildRequires: libid3tag-devel +BuildRequires: libmad-devel +BuildRequires: libmatroska-devel >= 0.7.6 +BuildRequires: libmodplug-devel +BuildRequires: libmp4v2-devel +BuildRequires: libmpcdec-devel +BuildRequires: libnotify-devel +BuildRequires: librsvg2-devel >= 2.5.0 +BuildRequires: libsysfs-devel +BuildRequires: libshout-devel +BuildRequires: libtar-devel +BuildRequires: libtheora-devel +BuildRequires: libtiff-devel +BuildRequires: libupnp-devel +BuildRequires: libvorbis-devel +BuildRequires: libxml2-devel +BuildRequires: lirc-devel +%if %with_internal_live555 +BuildConflicts: live-devel +BuildConflicts: live555-devel +%else +%if %with_shared_live555 +BuildRequires: live555-devel >= 0-0.19.2008.04.03 +%else +BuildRequires: live-devel >= 0-0.11.2006.08.07 +%endif +%endif +BuildRequires: kernel-headers >= 2.6.20 +BuildRequires: libGL-devel +BuildRequires: libGLU-devel +BuildRequires: libmusicbrainz-devel +BuildRequires: lua-devel +BuildRequires: mpeg2dec-devel >= 0.3.2 +BuildRequires: ncurses-devel +BuildRequires: opencv-devel +BuildRequires: openslp-devel +BuildRequires: qt4-devel +BuildRequires: schroedinger-devel +#Workaround for ^^ +BuildRequires: liboil-devel +BuildRequires: SDL_image-devel +BuildRequires: speex-devel >= 1.1.5 +%ifarch %{ix86} x86_64 +BuildRequires: svgalib-devel +%endif +BuildRequires: taglib-devel +BuildRequires: twolame-devel +BuildRequires: vcdimager-devel >= 0.7.21 +BuildRequires: x264-devel >= 0-0.8.20061028 +BuildRequires: xosd-devel +BuildRequires: xvidcore-devel +BuildRequires: zlib-devel + +# X-libs +BuildRequires: libXt-devel +BuildRequires: libXv-devel +BuildRequires: libXxf86vm-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXpm-devel +%ifarch %{ix86} x86_64 +BuildRequires: libXvMC-devel +%endif +BuildRequires: xorg-x11-proto-devel + +%if 0%{?fedora} > 6 +BuildRequires: libsmbclient-devel +%else +BuildRequires: samba-common +%endif + +%if 0%{?fedora} > 7 +BuildRequires: pulseaudio-libs-devel >= 0.9.8 +BuildRequires: portaudio-devel +%endif + +%if %with_mozilla +BuildRequires: gecko-devel +BuildRequires: nspr-devel +%else +Obsoletes: mozilla-vlc < %{version}-%{release} +%endif + + +# Now obsoleted as it will be built externally +Obsoletes: java-vlc < %{version} +Obsoletes: python-vlc < %{version} + +%if 0 +BuildRequires: libgoom2-devel +BuildRequires: libggi-devel +%endif + +%if %with_dc1394 +BuildRequires: compat-libdc1394-devel +BuildRequires: compat-libraw1394-devel +%else +BuildRequires: libraw1394-devel +%endif + + +Requires: vlc-core = %{version}-%{release} +Requires: dejavu-fonts + + +%package devel +Summary: Development package for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + + +%description +VLC (initially VideoLAN Client) is a highly portable multimedia player +for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, +mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. +It can also be used as a server to stream in unicast or multicast in +IPv4 or IPv6 on a high-bandwidth network. + + +%description devel +This package contains development files for VLC Media Player. + +VLC (initially VideoLAN Client) is a highly portable multimedia player +for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, +mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. +It can also be used as a server to stream in unicast or multicast in +IPv4 or IPv6 on a high-bandwidth network. + +%if %with_mozilla +%package -n mozilla-vlc +Summary: VLC Media Player plugin for Mozilla compatible web browsers +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: %{_libdir}/mozilla/plugins + +%description -n mozilla-vlc +This package contains a VLC Media Player plugin for Mozilla compatible +web browsers. + +VLC (initially VideoLAN Client) is a highly portable multimedia player +for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, +mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. +It can also be used as a server to stream in unicast or multicast in +IPv4 or IPv6 on a high-bandwidth network. +%endif + +%package core +Summary: VLC Media Player without Xorg +Group: Applications/Multimedia +Provides: vlc-nox = %{version}-%{release} + +%description core +VLC Media Player without X.org for server + +%if %with_dc1394 +%package plugins-dc1394 +Summary: VLC Media Player Plugins for dc1394 +Group: Applications/Multimedia +Requires: %{name}-core = %{version} +Requires: compat-libdc1394-tools + +%description plugins-dc1394 +VLC plugins for libdc1394 +%endif + +%prep +%setup -q -n %{name}-%{_version} +%if %with_internal_live555 +%setup -q -D -T -a 2 -n %{name}-%{_version} +%endif +%patch0 -p1 -b .default_font +%patch1 -p1 -b .opencvfix + + +%build +%if %with_internal_live555 +# Then bundled live555 - not needed +pushd live +# Force the use of our CFLAGS +%{__perl} -pi -e 's|-O2|%{optflags} -fPIC -DPIC|g' config.linux +# Configure and build +./genMakefiles linux && make +popd +%endif + + +%configure \ + --disable-dependency-tracking \ + --disable-rpath \ + --enable-release \ + --with-PIC \ + --enable-switcher \ + --enable-shout \ + --enable-live555 \ + --enable-musicbrainz \ +%if %with_internal_live555 + --with-live555-tree=live \ +%endif +%if %with_dc1394 + --enable-dc1394 \ + --enable-dv \ +%endif + --enable-opencv \ + --enable-v4l \ + --enable-pvr \ + --enable-gnomevfs \ + --enable-cddax \ +%if 0%{?fedora} < 9 + --disable-swscale \ + --enable-imgresample \ +%endif + --enable-faad \ + --enable-twolame \ + --enable-real \ + --enable-realrtsp \ + --enable-flac \ + --enable-tremor \ + --enable-speex \ + --enable-tarkin \ + --enable-theora \ +%if %with_dirac + --enable-dirac \ +%endif + --enable-svg \ + --enable-snapshot \ +%ifarch %{ix86} x86_64 + --enable-svgalib \ + --enable-xvmc \ +%endif +%if %with_directfb + --enable-directfb \ +%endif + --enable-aa \ + --enable-caca \ +%if 0%{?fedora} < 9 + --enable-esd \ + --enable-arts \ +%endif + --enable-jack \ +%if 0%{?fedora} > 7 + --enable-portaudio \ + --enable-pulse \ +%endif + --enable-ncurses \ + --enable-xosd \ + --enable-fbosd \ + --enable-galaktos \ + --enable-lirc \ +%ifarch %{ix86} + --enable-loader \ +%else + --without-contrib \ +%endif +%if %with_mozilla + --enable-mozilla \ +%endif + + +# remove rpath from libtool +sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%if 0 +# clean unused-direct-shlib-dependencies +sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool +%endif + + + +make %{?_smp_mflags} + + + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' + +install -dm 755 $RPM_BUILD_ROOT%{_mandir}/man1 +install -pm 644 doc/vlc*.1 $RPM_BUILD_ROOT%{_mandir}/man1 + +for i in 16x16 32x32 48x48 128x128 ; do + mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps + install -pm 0644 share/vlc${i}.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps/vlc.png +done + +desktop-file-install --vendor livna \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --delete-original \ + --mode 644 \ + $RPM_BUILD_ROOT%{_datadir}/applications/vlc.desktop + +# Remove installed fonts for skin2 - needs +rm -rf $RPM_BUILD_ROOT%{_datadir}/vlc/skin2/fonts/*.ttf +ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ + $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSans.ttf +ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ + $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf + + +%find_lang %{name} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +touch --no-create %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor +fi +%{_bindir}/update-desktop-database %{_datadir}/applications || : + +%post core -p /sbin/ldconfig + +%postun +%{_bindir}/update-desktop-database %{_datadir}/applications +touch --no-create %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor +fi || : + +%postun core -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README THANKS +%doc %{_docdir}/vlc/* +%{_datadir}/applications/*%{name}.desktop +%{_datadir}/icons/hicolor/*/apps/vlc.png +%{_datadir}/vlc/skins2/ +%{_bindir}/cvlc +%{_bindir}/nvlc +%{_bindir}/qvlc +%{_bindir}/rvlc +%{_bindir}/svlc +%{_bindir}/vlc-wrapper +%{_libdir}/vlc/gui/libqt4_plugin.so +%{_libdir}/vlc/access/libscreen_plugin.so +%{_libdir}/vlc/misc/libsvg_plugin.so +%{_libdir}/vlc/misc/libnotify_plugin.so +%{_libdir}/vlc/video_output/libaa_plugin.so +%{_libdir}/vlc/video_output/libcaca_plugin.so +%{_libdir}/vlc/video_output/libglx_plugin.so +%{_libdir}/vlc/video_output/libopengl_plugin.so +%{_libdir}/vlc/video_output/libx11_plugin.so +%{_libdir}/vlc/video_output/libxvideo_plugin.so +%{_libdir}/vlc/visualization/libgalaktos_plugin.so +%{_libdir}/vlc/misc/libxosd_plugin.so +%ifarch %{ix86} x86_64 +%{_libdir}/vlc/codec/libxvmc_plugin.so +%{_libdir}/vlc/video_output/libxvmc_plugin.so +%endif +%{_libdir}/vlc/gui/libskins2_plugin.so +%{_libdir}/vlc/video_filter/libopencv_example_plugin.so +%{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so +%{_libdir}/vlc/video_filter/libpanoramix_plugin.so +%{_libdir}/vlc/audio_output/libpulse_plugin.so + +%files core -f %{name}.lang +%defattr(-,root,root,-) +%{_bindir}/vlc +%exclude %{_datadir}/vlc/skins2 +%{_datadir}/vlc/ +%{_libdir}/*.so.* +%exclude %{_libdir}/vlc/gui/libqt4_plugin.so +%exclude %{_libdir}/vlc/access/libscreen_plugin.so +%exclude %{_libdir}/vlc/misc/libsvg_plugin.so +%exclude %{_libdir}/vlc/misc/libnotify_plugin.so +%exclude %{_libdir}/vlc/video_output/libaa_plugin.so +%exclude %{_libdir}/vlc/video_output/libcaca_plugin.so +%exclude %{_libdir}/vlc/video_output/libglx_plugin.so +%exclude %{_libdir}/vlc/video_output/libopengl_plugin.so +%exclude %{_libdir}/vlc/video_output/libx11_plugin.so +%exclude %{_libdir}/vlc/video_output/libxvideo_plugin.so +%exclude %{_libdir}/vlc/visualization/libgalaktos_plugin.so +%exclude %{_libdir}/vlc/misc/libxosd_plugin.so +%ifarch %{ix86} x86_64 +%exclude %{_libdir}/vlc/codec/libxvmc_plugin.so +%exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so +%endif +%exclude %{_libdir}/vlc/gui/libskins2_plugin.so +%exclude %{_libdir}/vlc/video_filter/libopencv_example_plugin.so +%exclude %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so +%exclude %{_libdir}/vlc/video_filter/libpanoramix_plugin.so +%exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so +%if %with_dc1394 +%exclude %{_libdir}/vlc/access/libdc1394_plugin.so +%endif +%{_libdir}/vlc/ +%{_mandir}/man1/vlc.1* + +%if %with_dc1394 +%files plugins-dc1394 +%defattr(-,root,root,-) +%{_libdir}/vlc/access/libdc1394_plugin.so +%endif + +%files devel +%defattr(-,root,root,-) +%doc HACKING +%dir %{_includedir}/vlc +%{_includedir}/vlc/* +%{_mandir}/man1/vlc-config.1* +%{_libdir}/*.so +%{_libdir}/pkgconfig/vlc-plugin.pc +%{_libdir}/pkgconfig/libvlc.pc + +%if %with_mozilla +%files -n mozilla-vlc +%defattr(-,root,root,-) +%{_libdir}/mozilla/plugins/libvlcplugin.so +%endif + + + +%changelog +* Sat Aug 09 2008 Thorsten Leemhuis - 0.9.0-0.5.20080802git +- Update to 0.9.0-20080802git + +* Sun Jul 13 2008 kwizart < kwizart at gmail.com > - 0.9.0-0.4.20080713git +- Update to 0.9.0-20080713git + +* Thu Jul 3 2008 kwizart < kwizart at gmail.com > - 0.9.0-0.3.20080703git +- Update to 0.9.0-20080703git + http://mailman.videolan.org/pipermail/vlc-devel/2008-July/045911.html +- Conditionalize xvmc to exclude ppc + +* Thu Jun 12 2008 kwizart < kwizart at gmail.com > - 0.8.6h-2 +- Fix libdvdnav (only) use. + +* Fri Jun 6 2008 kwizart < kwizart at gmail.com > - 0.8.6h-1 +- Update to 0.8.6h +- Use hicolor icons +- Add patch for new_x-content + http://bugzilla.livna.org/show_bug.cgi?id=2003 +- Fix VLC: HTTP access: cannot seek AVI + http://bugzilla.livna.org/show_bug.cgi?id=2014 + +* Sun May 18 2008 kwizart < kwizart at gmail.com > - 0.8.6g-2 +- Bump for official release + +* Wed May 14 2008 kwizart < kwizart at gmail.com > - 0.8.6g-1 +- Update to 0.8.6g +Security updates: + * Removed VLC variable settings from Mozilla and ActiveX (CVE-2007-6683) + * Removed loading plugins from the current directory (CVE-2008-2147) + +Various bugfixes: + * Fixed various memory leaks, improving stability when running as a server + * Fixed compilation with recent versions of FFmpeg + * Correctly parses SAP announcements from MPEG-TS + * Fixed AAC resampling + * The Fullscreen Controller appears correctly on Mac OS X, + if the 'Always-on-top' video option was selected. + +* Tue May 13 2008 kwizart < kwizart at gmail.com > - 0.8.6f-6 +- Fix ffmpeg-compat with newest ffmpeg interaction + +* Mon May 12 2008 kwizart < kwizart at gmail.com > - 0.8.6f-5 +- Introduce 180_all_faad.patch +- Re-enable ffmpeg-compat for F-9 + +* Mon May 12 2008 Thorsten Leemhuis < fedora at leemhuis dot info > - 0.8.6f-4 +- disable patch82 temporary + +* Fri May 9 2008 kwizart < kwizart at gmail.com > - 0.8.6f-3 +- Bugfixes patches for post f version +- Add vlvc 0.8 plugin support +- Add textrel fix from gentoo patch +- Improve libxul patch + +* Mon Apr 7 2008 kwizart < kwizart at gmail.com > - 0.8.6f-2 +- Fix for wxGTK28 compatibility. + Patch from Dominique Leuenberger - 0.8.6f-1 +- Update to 0.8.6f (Final) +Security updates: + * Really fixed subtitle buffer overflow (CVE-2007-6681) + * Fixed Real RTSP code execution problem (CVE-2008-0073) + * Fixed MP4 integer overflows (CVE-2008-1489) + * Fixed cinepak integer overflow +Various bugfixes: + * Fixed crashes in H264 packetizer + * Close MMS access on network timeout + * Fix some problems with AAC decoder & packetizer +- Remove java-vlc (will be built externally) +- Add clinkcc conditional/experimental support. + +* Mon Feb 25 2008 kwizart < kwizart at gmail.com > - 0.8.6e-1 +- Update to 0.8.6e (Final) +Security updates: + * Subtitle demuxers overflow (CVE-2007-6681) + * HTTP listener format string injection (CVE-2007-6682) + * Fixed buffer overflow in the SDL_image library (CVE-2006-4484) + * Real RTSP overflows (CVE-2008-0225, CVE-2008-0295, + CVE-2008-0296, VideoLAN-SA-0801) + * Arbitrary memory overwrite in the MP4 demuxer (CORE-2008-0130, + VideoLAN-SA-0802) + + +* Mon Feb 25 2008 kwizart < kwizart at gmail.com > - 0.8.6e-0.3 +- Update to svn20080225 from bugfix (pre 0.8.6e) + +* Thu Feb 21 2008 kwizart < kwizart at gmail.com > - 0.8.6e-0.2 +- Update to svn20080221 from bugfix (pre 0.8.6e) +- Updated merged pulseaudio patch +- Raise PA to be used by default. + +* Mon Feb 18 2008 kwizart < kwizart at gmail.com > - 0.8.6e-0.1 +- Update to pre0.8.6e +- Add pre PA patch (not merged yet) + +* Sat Jan 19 2008 kwizart < kwizart at gmail.com > - 0.8.6d-4 +- Patches from Jens Petersen +- Add wxGTK28 wip patch +- Conditionalize directfb and dirac +- Change the default font to DejaVuSerif.ttf (dejavu-fonts) +- Add BR missing libmpeg4v2 + +* Thu Jan 10 2008 kwizart < kwizart at gmail.com > - 0.8.6d-3.1 +- Remove BR portaudio arts +- Move skin2 to main vlc package +- Enable libopendaap (included within Fedora) + +* Mon Dec 3 2007 kwizart < kwizart at gmail.com > - 0.8.6d-3 +- Enable java-vlc (developer use only - java-icedtea). +- Fix arch detection for java headers + +* Sat Dec 1 2007 kwizart < kwizart at gmail.com > - 0.8.6d-2 +- Improve core/nox split + +* Thu Nov 29 2007 kwizart < kwizart at gmail.com > - 0.8.6d-1 +- Update to vlc 0.8.6d + +* Tue Nov 6 2007 kwizart < kwizart at gmail.com > - 0.8.6c-10 +- Split to core/nox package for server use. + +* Tue Nov 6 2007 kwizart < kwizart at gmail.com > - 0.8.6c-9 +- Raise ESD audio_output to be tried by default + (used by pulseaudio-esound-compat ) + +* Tue Nov 6 2007 kwizart < kwizart at gmail.com > - 0.8.6c-8 +- Rebuild for libdca and faad2 + +* Mon Oct 22 2007 kwizart < kwizart at gmail.com > - 0.8.6c-7 +- Rebuild for new libdvbpsi5-0.1.6 + +* Fri Oct 19 2007 kwizart < kwizart at gmail.com > - 0.8.6c-6 +- Rebuild with the GPL compatible faad2 +- Update the Dirac patch +- Fix livna #1668 + +* Sun Sep 23 2007 kwizart < kwizart at gmail.com > - 0.8.6c-5 +- Prepare svn version +- Drop the python switch default +- Add BR directfb-devel +- Improve timestamp +- Allow faad2 to be 2.5 (license change is known GPL compatible). + +* Thu Aug 23 2007 kwizart < kwizart at gmail.com > - 0.8.6c-4 +- Change default font to dejavu-lgc/DejaVuLGCSerif.ttf + http://bugzilla.livna.org/show_bug.cgi?id=1605 +- Remove unneeded fonts provided by skin2 + +* Tue Aug 14 2007 kwizart < kwizart at gmail.com > - 0.8.6c-3.2 +- clean-up with svn +- patch smb.c for call_open (from rdieter advice) +- Update license field to GPLv2 + +* Sun Aug 12 2007 kwizart < kwizart at gmail.com > - 0.8.6c-3.1 +- Fix libtool with shared libs when python-vlc is used + http://bugzilla.livna.org/show_bug.cgi?id=1590 +- Fix desktop file to be GNOME HIG compliant + http://bugzilla.livna.org/show_bug.cgi?id=1591 + +* Tue Jul 31 2007 kwizart < kwizart at gmail.com > - 0.8.6c-3 +- Switch for python-vlc +- Add bugfix patch pre_d +- Fix version field for desktop file. +- Fix ivtv support with updated patch for new videodev2.h +- Clean old Obsoletes/Provides for name 8.1 +- Rebuild with firefox-devel 2.0.0.5 +- Patch/rebuild with libcdio 0.78.2 +- Add mesa's BR +- Add BR libXvMC-devel for svn + +* Tue Jun 26 2007 kwizart < kwizart at gmail.com > - 0.8.6c-2 +- Update to new libupnp + +* Sat Jun 16 2007 kwizart < kwizart at gmail.com > - 0.8.6c-1 +- Update to 0.8.6c (final) +- Add patch to uses v4l2 header for new v4l2 encoder API. + +* Sat Jun 16 2007 kwizart < kwizart at gmail.com > - 0.8.6c-0.1 +- Update to 0.8.6c (bugfix) 20060616 +- Drop FLAC, automake110, wxGTK for 2.8, faad2 +- Uses shared ffmpeg. + +* Thu Jun 7 2007 kwizart < kwizart at gmail.com > - 0.8.6b-6 +- Rebuild for F-7 (compat-wxGTK26) + +* Mon Jun 4 2007 kwizart < kwizart at gmail.com > - 0.8.6b-5.3 +- Uses only -fPIC to prevent Selinux context problems... +- Uses compat-wxGTK26-devel on Fedora 7 +- Leave libcorba for now... + (libquicktime_plugin seems also broken - confirmed by upstream) +- Change static_live555 to internal_live555. + needed for testing - uses live-devel for livna releases. + +* Sat May 19 2007 kwizart < kwizart at gmail.com > - 0.8.6b-5 +- Removed no more needed Selinux Context: + fixed in http://bugzilla.redhat.com/237473 + +* Sun May 13 2007 kwizart < kwizart at gmail.com > - 0.8.6b-4 +- Disabled pth (broken) and... +- Build ffmpeg static (since shared ffmpeg is pth enabled). +- Add post & postun update-desktop-database +- Update static ffmpeg to 20070503 (same as shared version) + +* Sun May 13 2007 kwizart < kwizart at gmail.com > - 0.8.6b-3.3 +- Test static updated live555 + +* Sat May 12 2007 kwizart < kwizart at gmail.com > - 0.8.6b-3.2 +- Update to the new ffmpeg with pth (testing - wip ) + +* Fri May 4 2007 kwizart < kwizart at gmail.com > - 0.8.6b-3.1 +- Add BR libebml-devel +- Add BR Glide3-devel +- Add BR gnome-vfs2-devel +- Add BR libxml2-devel +- Fix BR faad2-devel < 2.5 +- Add rpmfusion BR libopendaap-devel +- Add rpmfusion BR libgoom2-devel +- Add rpmfusion BR libdc1394-devel +- Exclude corba plugin (broken) +- Add relatives %%configure options +- Comment Glide3 (don't work now - wip) + +* Thu May 3 2007 kwizart < kwizart at gmail.com > - 0.8.6b-3 +- Enable --enable-pth with ffmpeg + bump release in case testing take much time. + +* Thu May 3 2007 kwizart < kwizart at gmail.com > - 0.8.6b-1.3 +- Fix Selinux remain quiet with semanage + +* Tue May 1 2007 kwizart < kwizart at gmail.com > - 0.8.6b-1.2 +- Few improvements for svn version +- Add missing BR ORBit2-devel and pyorbit-devel +- Improved post preun postun section with help from Anvil. + +* Mon Apr 30 2007 kwizart < kwizart at gmail.com > - 0.8.6b-1.1 +- Add missing BR libtiff-devel +- Fix Selinux buglet when Selinux is not activated + was https://bugzilla.livna.org/show_bug.cgi?id=1484 + +* Sat Apr 21 2007 kwizart < kwizart at gmail.com > - 0.8.6b-1 +- Update to Final 8.6b +- Enable Dirac codec +- Fix mozilla-vlc libXt.so loading + (removing mozilla-sdk since using firefox sdk >= 1.5) +- Fix SeLinux context for dmo plugin. Was: + https://bugzilla.livna.org/show_bug.cgi?id=1404 +- Enabled cddax only for x86_64 (broken type). + +* Wed Apr 18 2007 kwizart < kwizart at gmail.com > - 0.8.6b-0.3 +- Fix BR for libsmbclient-devel for Fedora 7 +- Update to 0.8.6-bugfix-20070418 +- Add BR libraw1394-devel +- Add BR libavc1394-devel + +* Mon Apr 16 2007 kwizart < kwizart at gmail.com > - 0.8.6b-0.2 +- Fix svgalib-devel only for x86 x86_64 +- Fix firefox-devel headers presence/usability. This remains: + npapi.h: accepted by the compiler, rejected by the preprocessor! + npapi.h: proceeding with the compiler's result + +* Sat Apr 14 2007 kwizart < kwizart at gmail.com > - 0.8.6b-0.1 +- Update to rc 0.8.6b (bugfix) +- Hack configure.ac script (it didn't detect firefox headers) +- Add BR libshout-devel +- Add BR svgalib-devel +- Add BR gtk2-devel +- Add BR directfb-devel (wip) +- Add BR libnotify-devel +- Enabled --enable-speex +- Testing --enable-portaudio not usefull (oss is deprecated) +- Enabled --enable-pda +- Testing --enable-directfb (wip) +- Removed patch5 (was format.c) + +* Thu Apr 5 2007 kwizart < kwizart at gmail.com > - 0.8.6a-5 +- Use system ffmpeg lib (pth and libtool seems to be incompatible with it) +- Dirac seem to compile fine but testing usability for now. +- Cache isn't usefull for now (and won't be since using system libs) +- Exclude %%{_bindir}/vlcwrapper.py? since this is the guideline about python for now. + +* Mon Apr 2 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.6 +- Fix %%{_libdir}/advene directory ownership from: #1458 +- Fix .py? presence and perm (644) +- Remove .la after make install +- Add --disable-pth (broken for release and svn) + +* Sat Mar 24 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.5 +- Test dirac (disabled mozilla ) +- Test Updated static live555 to 2007.02.22 +- Clean up svn to release changes + +* Tue Mar 22 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.4 +- WIP changes - ld.conf is unusefull... + +* Wed Mar 21 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.3 +- Revert back to the static vlc version + ( will explore this with ld.conf later ) + +* Wed Mar 21 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.2 +- Fix .desktop file +- Disable broken libtool +- Quick fixes for svn/cache prepare +- Patch format_c +- Fix rpmlint error with python-vlc + +* Tue Mar 20 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.1 +- Enable cache for static compilation - wip + +* Fri Mar 9 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4 +- Enable conditionnal build for + * mozilla-vlc, java-vlc, dirac + * ffmpeg and live static +- Enable pth +- Enable gnu_ld + +* Thu Mar 8 2007 kwizart < kwizart at gmail.com > - 0.8.6a-3.1 +- Fix firefox-devel detection when avaible both i386 and x86_64 + http://bugzilla.livna.org/show_bug.cgi?id=1442 + +* Thu Mar 8 2007 kwizart < kwizart at gmail.com > - 0.8.6a-3 +- Recover patch3 from Ville Skyttä +- Fix FLAC api change see + http://bugzilla.livna.org/show_bug.cgi?id=1433 + +* Thu Mar 8 2007 kwizart < kwizart at gmail.com > - 0.8.6a-2 +- Update ffmpeg to 20070308 +- Enabled static build for internal ffmpeg (x264 vlc modules) +- Fixed: some configure options has changed for ffmpeg + +* Sat Mar 3 2007 Thorsten Leemhuis - 0.8.6a-1.2 +- Rebuild + +* Sun Feb 4 2007 Ville Skyttä - 0.8.6a-1.1 +- Fix aclocal/automake fix for automake 1.10 without breaking it for earlier. + +* Sun Feb 4 2007 Ville Skyttä - 0.8.6a-1 +- Build internal copy of ffmpeg with $RPM_OPT_FLAGS. +- Don't hardcode path to firefox headers. +- Drop Application and X-Livna categories from desktop entry. +- Clean up some unneeded cruft from specfile. +- Fix aclocal/automake calls during bootstrap. +- Let rpmbuild strip MediaControl.so. + +* Sat Feb 3 2007 kwizart < kwizart at gmail.com > - 0.8.6a-0.4.static +- Internal static build of ffmpeg from Matthias version. + +* Fri Jan 19 2007 kwizart < kwizart at gmail.com > - 0.8.6a-0.3 +- Re-enabled mozilla-vlc +- use ifarch ix86 + +* Sat Jan 13 2007 kwizart < kwizart at gmail.com > - 0.8.6a-0.2 +- Import patches from Matthias version +- try to fix firefox includes for mozilla-vlc -> disabled + +* Wed Jan 10 2007 kwizart < kwizart at gmail.com > - 0.8.6a-0.1 +- Try to Fix run with libavformat.so.51 +- disabled + +* Mon Jan 8 2007 kwizart < kwizart at gmail.com > - 0.8.6-5 +- Update to BR bugzilla infos. +- Fix perms with python and debug headers. +- Cleaned obsolete-not-provided + +* Fri Jan 5 2007 kwizart < kwizart at gmail.com > - 0.8.6-4 +- Use BuildConflics with libcdio +- Enabled --enable-cddax +- Enabled --enable-vcdx +- waiting --enable-quicktime (build fails) + +* Fri Jan 5 2007 kwizart < kwizart at gmail.com > - 0.8.6-3 + with help from Rathan +- Update to 0.8.6a (security update!) + from http://www.videolan.org/sa0701.html - #1342 +- Add version to desktop file +- Fix dual shortcuts / Add MimeType + +* Wed Jan 3 2007 kwizart < kwizart at gmail.com > - 0.8.6-2 + with help from Rathan +- Enabled --enable-shout +- Enabled --enable-quicktime (x86 only !) +- Enabled --enable-loader (x86 only !) +- Enabled --with-wine-sdk-path (x86 only !) +- Enabled --enable-corba +- testing --enable-dirac (libdirac-devel reviewing in extra) + http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=221405 +- Enabled --enable-mediacontrol-python-bindings +- Cosmetic changes in BR + +* Mon Dec 11 2006 kwizart < kwizart at gmail.com > - 0.8.6-1.fc6 +- Update to 8.6 final +- Change deprecated livdotcom to live555 +- build shared librairies is default since 8.6 +- Enabled --enable-dvdread +- Enabled --enable-faad +- Enabled --enable-twolame +- waiting --enable-quicktime (problem finding xqtsdk ) +- Enabled --enable-real +- Enabled --enable-realrtsp +- Enabled --enable-tremor +- Enabled --enable-tarkin +- waiting --enable-dirac (TODO libdirac-devel ) +- Enabled --enable-snapshot +- Enabled --enable-portaudio +- Enabled --enable-jack +- Enabled --enable-galaktos +- waiting --enable-mediacontrol-python-bindings (default install error) +- waiting --enable-cddax (new version of libcdio 0.78.2) +- waiting --enable-vcdx (new version of libcdio 0.78.2) + +* Mon Dec 04 2006 kwizart < kwizart at gmail.com > - 0.8.6-rc1.1.fc6 +- Update to 8.6rc1 +- disable components in mozilla-vlc +- disable libvlc_pic.a in devel +- Enable x264-devel for static linking. + +* Fri Oct 06 2006 Thorsten Leemhuis 0.8.5-6 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Mon Sep 25 2006 Dams - 0.8.5-5 +- BuildReq:libtool + +* Sun Sep 24 2006 Dams - 0.8.5-4 +- Fixed the mozilla plugin damn build + +* Sat Sep 9 2006 Dams - 0.8.5-3 +- sysfsutils-devel -> libsysfs-devel + +* Sat Sep 9 2006 Dams - 0.8.5-1 +- Updated to 0.8.5 +- Fixed MOZVER value in case more than one mozilla is installed. +- Dropped patches 1, 2 and 3 + +* Wed Aug 16 2006 Ville Skyttä - 0.8.4a-2 +- Adjust for new live package, enable it on all archs. + +* Fri Apr 14 2006 Ville Skyttä - 0.8.4a-1 +- Apply upstream patch to fix linking with newer ffmpeg/postproc. +- Drop no longer needed build conditionals and build dependencies. +- Enable Avahi, Musepack, SLP and sysfs support, fix SDL and Xv. +- Install icon to %%{_datadir}/icons/hicolor. +- Drop zero Epoch remainders. +- Fix -devel obsoletes. +- Specfile cleanups. + +* Fri Mar 24 2006 Thorsten Leemhuis 0.8.4-9.a +- rebuild + +* Tue Mar 21 2006 Andreas Bierfert +0.8.4-8.a +- fix #775 + +* Mon Mar 20 2006 Andreas Bierfert +0.8.4-7.a +- add -fPIC for all arches + +* Mon Mar 20 2006 Andreas Bierfert +0.8.4-6.a +- fix build on ppc/i386 + +* Thu Mar 16 2006 Andreas Bierfert +0.8.4-5.a +- fix BR + +* Wed Mar 15 2006 Andreas Bierfert +0.8.4-4.a +- make vlc build again + +* Tue Mar 14 2006 Thorsten Leemhuis 0.8.4-3.a +- drop "0.lvn" from release + +* Tue Feb 28 2006 Andreas Bierfert +- add dist + +* Mon Jan 09 2006 Thorsten Leemhuis - 0.8.4-0.lvn.3.a +- add all BRs the new ffmpeg needs + +* Fri Jan 06 2006 Thorsten Leemhuis - 0.8.4-0.lvn.2.a +- add buildoption "--without mkv" -- ebml in FC3 is to old +- add buildoption "--without svg" -- does not build with svg on FC3-x86-64 + +* Thu Jan 05 2006 Thorsten Leemhuis - 0.8.4-0.lvn.1.a +- Update to 0.8.4a [with help from che (Rudolf Kastl)] +- Fix x64 +- drop Epoch +- drop vlc-0.8.2-test2-altivec.patch, seems they worked on this +- use " --disable-libcdio" until we update to wxGTK2 2.6 +- use "--disable-livedotcom" on x86_64 (does not build) + +* Sat Aug 6 2005 Ville Skyttä - 0:0.8.2-0.lvn.4 +- Fix "--without cddb" build when libcddb-devel is installed. +- BuildRequire live-devel instead of live. + +* Wed Aug 3 2005 Dams - 0:0.8.2-0.lvn.3 +- Rebuilt *without* libcddb +- Rebuilt against new libdvbpsi + +* Thu Jul 28 2005 Dams - 0:0.8.2-0.lvn.2 +- Rebuilt against new libcddb/libcdio + +* Sat Jul 9 2005 Dams - 0:0.8.2-0.lvn.1 +- Updated to final 0.8.2 + +* Mon Jun 6 2005 Ville Skyttä 0:0.8.2-0.lvn.0.1.test2 +- Update to 0.8.2-test2, rename to vlc, improve summaries and descriptions. +- Enable many more modules, many small improvements and cleanups here and there +- Use unversioned install dir for the Mozilla plugin, rename to mozilla-vlc. +- Drop < FC3 compatiblity due to unavailability of required lib versions. +- Fold wx and ncurses to the main package (upstream has retired the + VLC Gnome and KDE UI's, so separate UI packages don't have a purpose + any more). + +* Sat Sep 11 2004 Ville Skyttä - 0:0.7.2-0.lvn.7 +- Remove dependency on libpostproc-devel, it's now in ffmpeg-devel (bug 255). + +* Thu Sep 2 2004 Ville Skyttä - 0:0.7.2-0.lvn.6 +- BuildRequire alsa-lib-devel, was lost in previous update (bug 258). +- Add libcdio and libmodplug build dependencies. +- Tweak descriptions, remove unnecessary conditional sections. +- Disable dependency tracking to speed up the build. + +* Sun Aug 29 2004 Ville Skyttä - 0:0.7.2-0.lvn.5 +- Use system ffmpeg (>= 0.4.9), and make it, ALSA, and fribidi unconditional. +- Build with theora by default. +- Change default font to Vera serif bold. +- Enable pvr support for Hauppauge card users (thanks to Gabriel L. Somlo). + +* Mon Jul 5 2004 Dams 0:0.7.2-0.lvn.4 +- Enabled libcddb support + +* Wed Jun 30 2004 Dams 0:0.7.2-0.lvn.3 +- speex now conditional and default disabled since vlc requires + development version. + +* Wed Jun 30 2004 Dams 0:0.7.2-0.lvn.2 +- Optional Fribidi and libtheora support (default disabled) + +* Tue May 25 2004 Dams 0:0.7.2-0.lvn.1 +- Updated to 0.7.2 + +* Fri May 7 2004 Dams 0:0.7.1-0.lvn.1 +- BuildConflicts:ffmpeg +- Build against private ffmpeg snapshot + +* Tue Mar 9 2004 Dams 0:0.7.1-0.lvn.1 +- Updated to 0.7.1 +- Added live.com libraries support +- Added matroska support + +* Sun Jan 4 2004 Dams 0:0.7.0-0.lvn.1 +- Updated to 0.7.0 +- s/fdr/lvn + +* Wed Dec 10 2003 Dams 0:0.6.2-0.fdr.7 +- Conditional ffmpeg build option (default enabled) + +* Fri Sep 5 2003 Dams 0:0.6.2-0.fdr.6 +- pth support now default disabled + +* Fri Sep 5 2003 Dams 0:0.6.2-0.fdr.5 +- slp support can now be not-build with '--without slp' + +* Thu Sep 4 2003 Dams 0:0.6.2-0.fdr.4 +- Added missing defattr for subpackages +- Fixed permissions on mozilla plugin +- fixed build failure due to typos in ncurses changes +- Removed useless explicit 'Requires:' in subpackages declarations + +* Tue Sep 2 2003 Dams 0:0.6.2-0.fdr.3 +- Added builddep for libpng-devel and openslp-devel +- Added gnome (default:enabled) and ncurses (default:disabled) + subpackages +- Removed macros (mkdir/install/perl) +- Modified descriptions +- Removed gtk/gnome2 build deps +- Added conditionnal (default-disabled) build option for alsa +- Added conditionnal builddep for pth-devel + +* Fri Aug 22 2003 Dams 0:0.6.2-0.fdr.2 +- Added missing BuildRequires for gtk+-devel + +* Thu Aug 14 2003 Dams 0:0.6.2-0.fdr.1 +- Updated to 0.6.2 +- Hopefully fixed 'if' conditions for optional buildrequires + +* Tue Jul 8 2003 Dams 0:0.6.0-0.fdr.3 +- Providing vlc + +* Tue Jul 8 2003 Dams 0:0.6.0-0.fdr.2 +- Moved desktop entry from devel to main package (stupid me) + +* Mon Apr 28 2003 Dams +- Initial build. From 6636419053fe412bc1403300efd722f9bf70acdd Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis Date: Sun, 14 Sep 2008 17:49:25 +0000 Subject: [PATCH 003/671] * Sun Sep 14 2008 Thorsten Leemhuis Date: Sun, 14 Sep 2008 17:50:20 +0000 Subject: [PATCH 004/671] now for real --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7780d7a..bd585a0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -16,7 +16,7 @@ Version: 0.9.0 %define release_tag 0.5 %if %vlc_git %define _version %{version}-test3 -Release: %{release_tag}.%{vlc_date}git%{?dist}.1 +Release: %{release_tag}.%{vlc_date}git%{?dist}.2 %else %define _version %{version} Release: %{release_tag}%{?dist} From a1072a9af0e233f0c9102144b13fcd6e45ec54f2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 15 Sep 2008 08:34:46 +0000 Subject: [PATCH 005/671] Cleaning --- vlc-git-opencvfix.patch | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 vlc-git-opencvfix.patch diff --git a/vlc-git-opencvfix.patch b/vlc-git-opencvfix.patch deleted file mode 100644 index ca087b4..0000000 --- a/vlc-git-opencvfix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c.fix vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c ---- vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c.fix 2008-08-02 12:36:38.000000000 +0200 -+++ vlc-0.9.0-test3/modules/video_filter/opencv_wrapper.c 2008-08-02 12:36:48.000000000 +0200 -@@ -395,7 +395,7 @@ static void End( vout_thread_t *p_vout ) - p_vout->p_sys->p_opencv = NULL; - } - -- vout_CloseAndRelease( p_vout->p_sys->p_vout ) -+ vout_CloseAndRelease( p_vout->p_sys->p_vout ); - } - - /***************************************************************************** From cc3601a95bc17663c1e47d9730f6cec430553cb9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 15 Sep 2008 09:24:28 +0000 Subject: [PATCH 006/671] Update to 0.9.2 (final) --- .gitignore | 3 +-- sources | 3 +-- vlc-0.9.2-pulse_default.patch | 12 +++++++++ vlc.spec | 50 ++++++++++++++++------------------- 4 files changed, 37 insertions(+), 31 deletions(-) create mode 100644 vlc-0.9.2-pulse_default.patch diff --git a/.gitignore b/.gitignore index e97f681..df29c40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -live.2008.07.25.tar.gz -vlc-snapshot-20080802.tar.bz2 +vlc-0.9.2.tar.bz2 diff --git a/sources b/sources index ce0b8c5..c74368f 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -32e7bd2fdb04d0b05462b24d42409ec7 live.2008.07.25.tar.gz -d8884f1b2db22a01e81ff53edef1b063 vlc-snapshot-20080802.tar.bz2 +f7d843d0725abb57196c4012eeb0e636 vlc-0.9.2.tar.bz2 diff --git a/vlc-0.9.2-pulse_default.patch b/vlc-0.9.2-pulse_default.patch new file mode 100644 index 0000000..f3d541f --- /dev/null +++ b/vlc-0.9.2-pulse_default.patch @@ -0,0 +1,12 @@ +diff -up vlc-0.9.2/modules/audio_output/pulse.c.pulse_default vlc-0.9.2/modules/audio_output/pulse.c +--- vlc-0.9.2/modules/audio_output/pulse.c.pulse_default 2008-09-15 11:05:23.000000000 +0200 ++++ vlc-0.9.2/modules/audio_output/pulse.c 2008-09-15 11:05:52.000000000 +0200 +@@ -95,7 +95,7 @@ static void uninit(aout_instance_t *p_ao + vlc_module_begin(); + set_shortname( "Pulse Audio" ); + set_description( N_("Pulseaudio audio output") ); +- set_capability( "audio output", 40 ); ++ set_capability( "audio output", 200 ); + set_category( CAT_AUDIO ); + set_subcategory( SUBCAT_AUDIO_AOUT ); + add_shortcut( "pulseaudio" ); diff --git a/vlc.spec b/vlc.spec index bd585a0..66d93f6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,44 +1,45 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) +%define _default_patch_fuzz 2 -%define with_internal_live555 1 -%define with_shared_live555 0 +%define with_internal_live555 0 %define live555_date 2008.07.25 -%define vlc_git 1 -%define vlc_date 20080802 +%define vlc_git 0 +%define vlc_date 20080915 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 -%define with_dirac 1 +%define with_dirac 0 + Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 0.9.0 -%define release_tag 0.5 %if %vlc_git -%define _version %{version}-test3 -Release: %{release_tag}.%{vlc_date}git%{?dist}.2 +Version: 1.0.0 +%define _version %{version}-git +%define release_tag 0.1.%{vlc_date}git %else +Version: 0.9.2 %define _version %{version} -Release: %{release_tag}%{?dist} +%define release_tag 1 %endif +Release: %{release_tag}.%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ %if %vlc_git -Source0: http://nightlies.videolan.org/build/source/trunk-%{vlc_date}-0012/vlc-snapshot-%{vlc_date}.tar.bz2 +Source0: http://nightlies.videolan.org/build/source/trunk-%{vlc_date}-0024/vlc-snapshot-%{vlc_date}.tar.bz2 %else -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}.tar.bz2 +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{_version}.tar.bz2 %endif %if %with_internal_live555 Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-trunk-default_font.patch -Patch1: vlc-git-opencvfix.patch +Patch1: vlc-0.9.2-pulse_default.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils %if 0 -BuildRequires: automake BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -96,17 +97,13 @@ BuildRequires: lirc-devel BuildConflicts: live-devel BuildConflicts: live555-devel %else -%if %with_shared_live555 BuildRequires: live555-devel >= 0-0.19.2008.04.03 -%else -BuildRequires: live-devel >= 0-0.11.2006.08.07 -%endif %endif BuildRequires: kernel-headers >= 2.6.20 BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel -BuildRequires: lua-devel +%{?_with_lua:BuildRequires: lua-devel} BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel @@ -160,8 +157,8 @@ Obsoletes: mozilla-vlc < %{version}-%{release} # Now obsoleted as it will be built externally -Obsoletes: java-vlc < %{version} -Obsoletes: python-vlc < %{version} +Obsoletes: java-vlc < 0.9.0 +Obsoletes: python-vlc < 0.9.0 %if 0 BuildRequires: libgoom2-devel @@ -246,7 +243,8 @@ VLC plugins for libdc1394 %setup -q -D -T -a 2 -n %{name}-%{_version} %endif %patch0 -p1 -b .default_font -%patch1 -p1 -b .opencvfix +%patch1 -p1 -b .pulse_default + %build @@ -268,6 +266,7 @@ popd --with-PIC \ --enable-switcher \ --enable-shout \ + %{?_with_lua:--enable-lua --enable-lua} \ --enable-live555 \ --enable-musicbrainz \ %if %with_internal_live555 @@ -497,11 +496,8 @@ fi || : %changelog -* Sun Sep 14 2008 Thorsten Leemhuis - 0.9.2-1 +- Update to 0.9.2 (final) * Sat Aug 2 2008 kwizart < kwizart at gmail.com > - 0.9.0-0.5.20080802git - Update to 0.9.0-20080802git From 25585b2e08bcbd925ee95ea7348bd1df820fe2aa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 15 Sep 2008 09:29:22 +0000 Subject: [PATCH 007/671] Fix tag --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 66d93f6..48508d1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Version: 0.9.2 %define _version %{version} %define release_tag 1 %endif -Release: %{release_tag}.%{?dist} +Release: %{release_tag}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ From 9fcc4031bf1f1deadc53a791b8337074370418b2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 26 Sep 2008 16:22:27 +0000 Subject: [PATCH 008/671] Update to 0.9.3 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index df29c40..6691eb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.2.tar.bz2 +vlc-0.9.3.tar.bz2 diff --git a/sources b/sources index c74368f..50fb503 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f7d843d0725abb57196c4012eeb0e636 vlc-0.9.2.tar.bz2 +f38aa41ad3ac8b411f2d4a12e3525120 vlc-0.9.3.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 48508d1..02f55c9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -18,7 +18,7 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.2 +Version: 0.9.3 %define _version %{version} %define release_tag 1 %endif @@ -417,7 +417,9 @@ fi || : %{_bindir}/svlc %{_bindir}/vlc-wrapper %{_libdir}/vlc/gui/libqt4_plugin.so +%{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so %{_libdir}/vlc/access/libscreen_plugin.so +%{_libdir}/vlc/codec/libfluidsynth_plugin.so %{_libdir}/vlc/misc/libsvg_plugin.so %{_libdir}/vlc/misc/libnotify_plugin.so %{_libdir}/vlc/video_output/libaa_plugin.so @@ -445,7 +447,9 @@ fi || : %{_datadir}/vlc/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/gui/libqt4_plugin.so +%exclude %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so %exclude %{_libdir}/vlc/access/libscreen_plugin.so +%exclude %{_libdir}/vlc/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/misc/libsvg_plugin.so %exclude %{_libdir}/vlc/misc/libnotify_plugin.so %exclude %{_libdir}/vlc/video_output/libaa_plugin.so @@ -496,6 +500,10 @@ fi || : %changelog +* Fri Sep 26 2008 kwizart < kwizart at gmail.com > - 0.9.3-1 +- Update to 0.9.3 (final) +- Few others move from core to main + * Mon Sep 15 2008 kwizart < kwizart at gmail.com > - 0.9.2-1 - Update to 0.9.2 (final) From 6c914e05c297f5c9e6d40c01f41dc389281b3d21 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 29 Sep 2008 08:30:12 +0000 Subject: [PATCH 009/671] - Add libv4l2 patch from Hans de Goede --- vlc-0.9.3-libv4l2.patch | 617 ++++++++++++++++++++++++++++++++++++++++ vlc.spec | 10 +- 2 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 vlc-0.9.3-libv4l2.patch diff --git a/vlc-0.9.3-libv4l2.patch b/vlc-0.9.3-libv4l2.patch new file mode 100644 index 0000000..4b40e7d --- /dev/null +++ b/vlc-0.9.3-libv4l2.patch @@ -0,0 +1,617 @@ +diff -up vlc-0.9.3/configure.ac.libv4l2 vlc-0.9.3/configure.ac +--- vlc-0.9.3/configure.ac.libv4l2 2008-09-25 20:23:10.000000000 +0200 ++++ vlc-0.9.3/configure.ac 2008-09-27 19:43:30.000000000 +0200 +@@ -2421,6 +2421,7 @@ then + AC_DEFINE(HAVE_ALSA, 1, Define if ALSA is present.) + fi + ++ VLC_ADD_LDFLAGS([v4l2],[-lv4l2]) + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" + AC_CHECK_HEADERS(linux/videodev2.h, [ + VLC_ADD_PLUGIN([v4l2]) +diff -up vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 vlc-0.9.3/modules/access/v4l2/v4l2.c +--- vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 2008-09-18 23:03:35.000000000 +0200 ++++ vlc-0.9.3/modules/access/v4l2/v4l2.c 2008-09-27 19:45:58.000000000 +0200 +@@ -67,6 +67,8 @@ + + #include + ++#include ++ + /***************************************************************************** + * Module descriptior + *****************************************************************************/ +@@ -1108,11 +1110,11 @@ static void DemuxClose( vlc_object_t *p_ + buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + buf.memory = ( p_sys->io == IO_METHOD_USERPTR ) ? + V4L2_MEMORY_USERPTR : V4L2_MEMORY_MMAP; +- ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ); /* ignore result */ ++ v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ); /* ignore result */ + } + + buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- if( ioctl( p_sys->i_fd_video, VIDIOC_STREAMOFF, &buf_type ) < 0 ) { ++ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_STREAMOFF, &buf_type ) < 0 ) { + msg_Err( p_this, "VIDIOC_STREAMOFF failed" ); + } + +@@ -1131,7 +1133,7 @@ static void DemuxClose( vlc_object_t *p_ + case IO_METHOD_MMAP: + for( i = 0; i < p_sys->i_nbuffers; ++i ) + { +- if( munmap( p_sys->p_buffers[i].start, p_sys->p_buffers[i].length ) ) ++ if( v4l2_munmap( p_sys->p_buffers[i].start, p_sys->p_buffers[i].length ) ) + { + msg_Err( p_this, "munmap failed" ); + } +@@ -1155,7 +1157,7 @@ static void CommonClose( vlc_object_t *p + { + (void)p_this; + /* Close */ +- if( p_sys->i_fd_video >= 0 ) close( p_sys->i_fd_video ); ++ if( p_sys->i_fd_video >= 0 ) v4l2_close( p_sys->i_fd_video ); + #ifdef HAVE_ALSA + if( p_sys->p_alsa_pcm ) + { +@@ -1350,7 +1352,7 @@ static ssize_t AccessRead( access_t * p_ + return -1; + } + +- i_ret = read( p_sys->i_fd_video, p_buffer, i_len ); ++ i_ret = v4l2_read( p_sys->i_fd_video, p_buffer, i_len ); + if( i_ret == 0 ) + { + p_access->info.b_eof = true; +@@ -1419,7 +1421,7 @@ static block_t* GrabVideo( demux_t *p_de + switch( p_sys->io ) + { + case IO_METHOD_READ: +- i_ret = read( p_sys->i_fd_video, p_sys->p_buffers[0].start, p_sys->p_buffers[0].length ); ++ i_ret = v4l2_read( p_sys->i_fd_video, p_sys->p_buffers[0].start, p_sys->p_buffers[0].length ); + if( i_ret == -1 ) + { + switch( errno ) +@@ -1446,7 +1448,7 @@ static block_t* GrabVideo( demux_t *p_de + buf.memory = V4L2_MEMORY_MMAP; + + /* Wait for next frame */ +- if (ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) ++ if (v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) + { + switch( errno ) + { +@@ -1470,7 +1472,7 @@ static block_t* GrabVideo( demux_t *p_de + if( !p_block ) return 0; + + /* Unlock */ +- if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) ++ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) + { + msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)"); + return 0; +@@ -1484,7 +1486,7 @@ static block_t* GrabVideo( demux_t *p_de + buf.memory = V4L2_MEMORY_USERPTR; + + /* Wait for next frame */ +- if (ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) ++ if (v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) + { + switch( errno ) + { +@@ -1517,7 +1519,7 @@ static block_t* GrabVideo( demux_t *p_de + if( !p_block ) return 0; + + /* Unlock */ +- if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) ++ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) + { + msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)"); + return 0; +@@ -1705,7 +1707,7 @@ static int InitMmap( demux_t *p_demux, i + req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + req.memory = V4L2_MEMORY_MMAP; + +- if( ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) + { + msg_Err( p_demux, "device does not support mmap i/o" ); + goto open_failed; +@@ -1733,7 +1735,7 @@ static int InitMmap( demux_t *p_demux, i + buf.memory = V4L2_MEMORY_MMAP; + buf.index = p_sys->i_nbuffers; + +- if( ioctl( i_fd, VIDIOC_QUERYBUF, &buf ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYBUF, &buf ) < 0 ) + { + msg_Err( p_demux, "VIDIOC_QUERYBUF" ); + goto open_failed; +@@ -1741,7 +1743,7 @@ static int InitMmap( demux_t *p_demux, i + + p_sys->p_buffers[p_sys->i_nbuffers].length = buf.length; + p_sys->p_buffers[p_sys->i_nbuffers].start = +- mmap( NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, i_fd, buf.m.offset ); ++ v4l2_mmap( NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, i_fd, buf.m.offset ); + + if( p_sys->p_buffers[p_sys->i_nbuffers].start == MAP_FAILED ) + { +@@ -1774,7 +1776,7 @@ static int InitUserP( demux_t *p_demux, + req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + req.memory = V4L2_MEMORY_USERPTR; + +- if( ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) + { + msg_Err( p_demux, "device does not support user pointer i/o" ); + return VLC_EGENERIC; +@@ -1830,6 +1832,7 @@ static int OpenVideoDev( vlc_object_t *p + enum v4l2_buf_type buf_type; + char *psz_device = p_sys->psz_vdev; + es_format_t es_fmt; ++ int libv4l2_fd; + + if( ( i_fd = open( psz_device, O_RDWR ) ) < 0 ) + { +@@ -1837,6 +1840,16 @@ static int OpenVideoDev( vlc_object_t *p + goto open_failed; + } + ++ /* Note the v4l2_xxx functions are designed so that if they get passed an ++ unknown fd, the will behave exactly as their regular xxx counterparts, ++ so if v4l2_fd_open fails, we continue as normal (missing the libv4l2 ++ custom cam format to normal formats conversion). Chances are big we will ++ still fail then though, as normally v4l2_fd_open only fails if the ++ device is not a v4l2 device. */ ++ libv4l2_fd = v4l2_fd_open(i_fd, V4L2_ENABLE_ENUM_FMT_EMULATION); ++ if (libv4l2_fd != -1) ++ i_fd = libv4l2_fd; ++ + /* Tune the tuner */ + if( p_sys->i_frequency >= 0 ) + { +@@ -1850,7 +1863,7 @@ static int OpenVideoDev( vlc_object_t *p + frequency.tuner = p_sys->i_cur_tuner; + frequency.type = p_sys->p_tuners[p_sys->i_cur_tuner].type; + frequency.frequency = p_sys->i_frequency / 62.5; +- if( ioctl( i_fd, VIDIOC_S_FREQUENCY, &frequency ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_FREQUENCY, &frequency ) < 0 ) + { + msg_Err( p_obj, "cannot set tuner frequency (%m)" ); + goto open_failed; +@@ -1870,7 +1883,7 @@ static int OpenVideoDev( vlc_object_t *p + memset( &tuner, 0, sizeof( tuner ) ); + tuner.index = p_sys->i_cur_tuner; + tuner.audmode = p_sys->i_audio_mode; +- if( ioctl( i_fd, VIDIOC_S_TUNER, &tuner ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_TUNER, &tuner ) < 0 ) + { + msg_Err( p_obj, "cannot set tuner audio mode (%m)" ); + goto open_failed; +@@ -1882,7 +1895,7 @@ static int OpenVideoDev( vlc_object_t *p + + if( p_sys->i_selected_standard_id != V4L2_STD_UNKNOWN ) + { +- if( ioctl( i_fd, VIDIOC_S_STD, &p_sys->i_selected_standard_id ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_STD, &p_sys->i_selected_standard_id ) < 0 ) + { + msg_Err( p_obj, "cannot set standard (%m)" ); + goto open_failed; +@@ -1898,7 +1911,7 @@ static int OpenVideoDev( vlc_object_t *p + p_sys->i_selected_input = 0; + } + +- if( ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 ) + { + msg_Err( p_obj, "cannot set input (%m)" ); + goto open_failed; +@@ -1915,7 +1928,7 @@ static int OpenVideoDev( vlc_object_t *p + p_sys->i_selected_audio_input = 0; + } + +- if( ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_selected_audio_input] ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_selected_audio_input] ) < 0 ) + { + msg_Err( p_obj, "cannot set audio input (%m)" ); + goto open_failed; +@@ -1964,11 +1977,11 @@ static int OpenVideoDev( vlc_object_t *p + /* Reset Cropping */ + memset( &cropcap, 0, sizeof(cropcap) ); + cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- if( ioctl( i_fd, VIDIOC_CROPCAP, &cropcap ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_CROPCAP, &cropcap ) >= 0 ) + { + crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + crop.c = cropcap.defrect; /* reset to default */ +- if( ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) + { + switch( errno ) + { +@@ -1988,7 +2001,7 @@ static int OpenVideoDev( vlc_object_t *p + + if( p_sys->i_width <= 0 || p_sys->i_height <= 0 ) + { +- if( ioctl( i_fd, VIDIOC_G_FMT, &fmt ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_G_FMT, &fmt ) < 0 ) + { + msg_Err( p_demux, "Cannot get default width and height." ); + goto open_failed; +@@ -2031,7 +2044,7 @@ static int OpenVideoDev( vlc_object_t *p + } + } + /* Try and set user chroma */ +- if( !IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) || ( fmt.fmt.pix.pixelformat && ioctl( i_fd, VIDIOC_S_FMT, &fmt ) < 0 ) ) ++ if( !IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) || ( fmt.fmt.pix.pixelformat && v4l2_ioctl( i_fd, VIDIOC_S_FMT, &fmt ) < 0 ) ) + { + msg_Warn( p_demux, "Driver is unable to use specified chroma %s. Trying defaults.", p_sys->psz_requested_chroma ); + fmt.fmt.pix.pixelformat = 0; +@@ -2047,7 +2060,7 @@ static int OpenVideoDev( vlc_object_t *p + { + fmt.fmt.pix.pixelformat = p_chroma_fallbacks[i]; + if( IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) +- && ioctl( i_fd, VIDIOC_S_FMT, &fmt ) >= 0 ) ++ && v4l2_ioctl( i_fd, VIDIOC_S_FMT, &fmt ) >= 0 ) + break; + } + if( i == ARRAY_SIZE( p_chroma_fallbacks ) ) +@@ -2092,7 +2105,7 @@ static int OpenVideoDev( vlc_object_t *p + frmival.pixel_format = fmt.fmt.pix.pixelformat; + frmival.width = p_sys->i_width; + frmival.height = p_sys->i_height; +- if( ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ) + { + char psz_fourcc[5]; + memset( &psz_fourcc, 0, sizeof( psz_fourcc ) ); +@@ -2108,7 +2121,7 @@ static int OpenVideoDev( vlc_object_t *p + frmival.discrete.numerator, + frmival.discrete.denominator ); + frmival.index++; +- } while( ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ); ++ } while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ); + break; + case V4L2_FRMIVAL_TYPE_STEPWISE: + msg_Dbg( p_demux, " supported frame intervals: %d/%d to " +@@ -2175,7 +2188,7 @@ static int OpenVideoDev( vlc_object_t *p + buf.memory = V4L2_MEMORY_MMAP; + buf.index = i; + +- if( ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) + { + msg_Err( p_demux, "VIDIOC_QBUF failed" ); + goto open_failed; +@@ -2183,7 +2196,7 @@ static int OpenVideoDev( vlc_object_t *p + } + + buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- if( ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) + { + msg_Err( p_demux, "VIDIOC_STREAMON failed" ); + goto open_failed; +@@ -2203,7 +2216,7 @@ static int OpenVideoDev( vlc_object_t *p + buf.m.userptr = (unsigned long)p_sys->p_buffers[i].start; + buf.length = p_sys->p_buffers[i].length; + +- if( ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) + { + msg_Err( p_demux, "VIDIOC_QBUF failed" ); + goto open_failed; +@@ -2211,7 +2224,7 @@ static int OpenVideoDev( vlc_object_t *p + } + + buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- if( ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) + { + msg_Err( p_demux, "VIDIOC_STREAMON failed" ); + goto open_failed; +@@ -2229,7 +2242,7 @@ static int OpenVideoDev( vlc_object_t *p + return i_fd; + + open_failed: +- if( i_fd >= 0 ) close( i_fd ); ++ if( i_fd >= 0 ) v4l2_close( i_fd ); + return -1; + + } +@@ -2548,6 +2561,7 @@ static bool ProbeVideoDev( vlc_object_t + int i_standard; + + int i_fd; ++ int libv4l2_fd; + + if( ( i_fd = open( psz_device, O_RDWR ) ) < 0 ) + { +@@ -2555,9 +2569,19 @@ static bool ProbeVideoDev( vlc_object_t + goto open_failed; + } + ++ /* Note the v4l2_xxx functions are designed so that if they get passed an ++ unknown fd, the will behave exactly as their regular xxx counterparts, ++ so if v4l2_fd_open fails, we continue as normal (missing the libv4l2 ++ custom cam format to normal formats conversion). Chances are big we will ++ still fail then though, as normally v4l2_fd_open only fails if the ++ device is not a v4l2 device. */ ++ libv4l2_fd = v4l2_fd_open(i_fd, V4L2_ENABLE_ENUM_FMT_EMULATION); ++ if (libv4l2_fd != -1) ++ i_fd = libv4l2_fd; ++ + /* Get device capabilites */ + +- if( ioctl( i_fd, VIDIOC_QUERYCAP, &p_sys->dev_cap ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCAP, &p_sys->dev_cap ) < 0 ) + { + msg_Err( p_obj, "cannot get video capabilities (%m)" ); + goto open_failed; +@@ -2593,7 +2617,7 @@ static bool ProbeVideoDev( vlc_object_t + { + struct v4l2_input t_input; + t_input.index = 0; +- while( ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) + { + p_sys->i_input++; + t_input.index = p_sys->i_input; +@@ -2606,7 +2630,7 @@ static bool ProbeVideoDev( vlc_object_t + { + p_sys->p_inputs[i_index].index = i_index; + +- if( ioctl( i_fd, VIDIOC_ENUMINPUT, &p_sys->p_inputs[i_index] ) ) ++ if( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &p_sys->p_inputs[i_index] ) ) + { + msg_Err( p_obj, "cannot get video input characteristics (%m)" ); + goto open_failed; +@@ -2627,7 +2651,7 @@ static bool ProbeVideoDev( vlc_object_t + { + struct v4l2_standard t_standards; + t_standards.index = 0; +- while( ioctl( i_fd, VIDIOC_ENUMSTD, &t_standards ) >=0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_ENUMSTD, &t_standards ) >=0 ) + { + p_sys->i_standard++; + t_standards.index = p_sys->i_standard; +@@ -2640,7 +2664,7 @@ static bool ProbeVideoDev( vlc_object_t + { + p_sys->p_standards[i_standard].index = i_standard; + +- if( ioctl( i_fd, VIDIOC_ENUMSTD, &p_sys->p_standards[i_standard] ) ) ++ if( v4l2_ioctl( i_fd, VIDIOC_ENUMSTD, &p_sys->p_standards[i_standard] ) ) + { + msg_Err( p_obj, "cannot get video input standards (%m)" ); + goto open_failed; +@@ -2662,9 +2686,9 @@ static bool ProbeVideoDev( vlc_object_t + if( p_sys->dev_cap.capabilities & V4L2_CAP_AUDIO ) + { + while( p_sys->i_audio < 32 && +- ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_audio] ) >= 0 ) ++ v4l2_ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_audio] ) >= 0 ) + { +- if( ioctl( i_fd, VIDIOC_G_AUDIO, &p_sys->p_audios[ p_sys->i_audio] ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_G_AUDIO, &p_sys->p_audios[ p_sys->i_audio] ) < 0 ) + { + msg_Err( p_obj, "cannot get audio input characteristics (%m)" ); + goto open_failed; +@@ -2690,7 +2714,7 @@ static bool ProbeVideoDev( vlc_object_t + { + struct v4l2_tuner tuner; + memset( &tuner, 0, sizeof(tuner) ); +- while( ioctl( i_fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) + { + p_sys->i_tuner++; + memset( &tuner, 0, sizeof(tuner) ); +@@ -2704,7 +2728,7 @@ static bool ProbeVideoDev( vlc_object_t + { + p_sys->p_tuners[i_index].index = i_index; + +- if( ioctl( i_fd, VIDIOC_G_TUNER, &p_sys->p_tuners[i_index] ) ) ++ if( v4l2_ioctl( i_fd, VIDIOC_G_TUNER, &p_sys->p_tuners[i_index] ) ) + { + msg_Err( p_obj, "cannot get tuner characteristics (%m)" ); + goto open_failed; +@@ -2727,7 +2751,7 @@ static bool ProbeVideoDev( vlc_object_t + + struct v4l2_frequency frequency; + memset( &frequency, 0, sizeof( frequency ) ); +- if( ioctl( i_fd, VIDIOC_G_FREQUENCY, &frequency ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_G_FREQUENCY, &frequency ) < 0 ) + { + msg_Err( p_obj, "cannot get tuner frequency (%m)" ); + goto open_failed; +@@ -2752,7 +2776,7 @@ static bool ProbeVideoDev( vlc_object_t + codec.index = i_index; + codec.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + +- while( ioctl( i_fd, VIDIOC_ENUM_FMT, &codec ) >= 0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FMT, &codec ) >= 0 ) + { + i_index++; + codec.index = i_index; +@@ -2767,7 +2791,7 @@ static bool ProbeVideoDev( vlc_object_t + p_sys->p_codecs[i_index].index = i_index; + p_sys->p_codecs[i_index].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + +- if( ioctl( i_fd, VIDIOC_ENUM_FMT, &p_sys->p_codecs[i_index] ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FMT, &p_sys->p_codecs[i_index] ) < 0 ) + { + msg_Err( p_obj, "cannot get codec description (%m)" ); + goto open_failed; +@@ -2800,7 +2824,7 @@ static bool ProbeVideoDev( vlc_object_t + struct v4l2_frmsizeenum frmsize; + frmsize.index = 0; + frmsize.pixel_format = p_sys->p_codecs[i_index].pixelformat; +- if( ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) < 0 ) + { + /* Not all devices support this ioctl */ + msg_Warn( p_obj, "Unable to query for frame sizes" ); +@@ -2816,7 +2840,7 @@ static bool ProbeVideoDev( vlc_object_t + " device supports size %dx%d", + frmsize.discrete.width, frmsize.discrete.height ); + frmsize.index++; +- } while( ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 ); ++ } while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 ); + break; + case V4L2_FRMSIZE_TYPE_STEPWISE: + msg_Dbg( p_obj, +@@ -2848,12 +2872,12 @@ static bool ProbeVideoDev( vlc_object_t + } + + +- if( i_fd >= 0 ) close( i_fd ); ++ if( i_fd >= 0 ) v4l2_close( i_fd ); + return true; + + open_failed: + +- if( i_fd >= 0 ) close( i_fd ); ++ if( i_fd >= 0 ) v4l2_close( i_fd ); + return false; + + } +@@ -3019,7 +3043,7 @@ static void ControlListPrint( vlc_object + { + querymenu.index = i_mid; + querymenu.id = queryctrl.id; +- if( ioctl( i_fd, VIDIOC_QUERYMENU, &querymenu ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYMENU, &querymenu ) >= 0 ) + { + msg_Dbg( p_obj, " %d: %s", + querymenu.index, querymenu.name ); +@@ -3056,7 +3080,7 @@ static void ControlListPrint( vlc_object + queryctrl.default_value ); + memset( &control, 0, sizeof( control ) ); + control.id = queryctrl.id; +- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ) + { + msg_Dbg( p_obj, " current value: %d", control.value ); + } +@@ -3153,13 +3177,13 @@ static int ControlList( vlc_object_t *p_ + var_AddCallback( p_obj, "controls-reset", AccessControlResetCallback, NULL ); + + queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + msg_Dbg( p_obj, "Extended control API supported by v4l2 driver" ); + + /* List extended controls */ + queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; +- while( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + if( queryctrl.type == V4L2_CTRL_TYPE_CTRL_CLASS ) + { +@@ -3197,7 +3221,7 @@ static int ControlList( vlc_object_t *p_ + i_cid ++ ) + { + queryctrl.id = i_cid; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) + continue; +@@ -3213,7 +3237,7 @@ static int ControlList( vlc_object_t *p_ + i_cid ++ ) + { + queryctrl.id = i_cid; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) + continue; +@@ -3312,11 +3336,11 @@ static int ControlReset( vlc_object_t *p + memset( &queryctrl, 0, sizeof( queryctrl ) ); + + queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + /* Extended control API supported */ + queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; +- while( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ while( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + if( queryctrl.type == V4L2_CTRL_TYPE_CTRL_CLASS + || V4L2_CTRL_ID2CLASS( queryctrl.id ) == V4L2_CTRL_CLASS_MPEG ) +@@ -3327,7 +3351,7 @@ static int ControlReset( vlc_object_t *p + struct v4l2_control control; + memset( &control, 0, sizeof( control ) ); + control.id = queryctrl.id; +- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ++ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 + && queryctrl.default_value != control.value ) + { + int i; +@@ -3350,14 +3374,14 @@ static int ControlReset( vlc_object_t *p + i_cid ++ ) + { + queryctrl.id = i_cid; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + struct v4l2_control control; + if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) + continue; + memset( &control, 0, sizeof( control ) ); + control.id = queryctrl.id; +- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ++ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 + && queryctrl.default_value != control.value ) + { + int i; +@@ -3377,14 +3401,14 @@ static int ControlReset( vlc_object_t *p + i_cid ++ ) + { + queryctrl.id = i_cid; +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) + { + struct v4l2_control control; + if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) + continue; + memset( &control, 0, sizeof( control ) ); + control.id = queryctrl.id; +- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ++ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 + && queryctrl.default_value != control.value ) + { + name2var( queryctrl.name ); +@@ -3417,7 +3441,7 @@ static int Control( vlc_object_t *p_obj, + + queryctrl.id = i_cid; + +- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) < 0 ++ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) < 0 + || queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) + { + msg_Dbg( p_obj, "%s (%x) control is not supported.", psz_name, i_cid ); +@@ -3438,20 +3462,20 @@ static int Control( vlc_object_t *p_obj, + if( i_value >= 0 ) + { + ext_control.value = i_value; +- if( ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 ) + { + control.value = i_value; +- if( ioctl( i_fd, VIDIOC_S_CTRL, &control ) < 0 ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_CTRL, &control ) < 0 ) + { + msg_Err( p_obj, "unable to set %s (%x) to %d (%m)", + psz_name, i_cid, i_value ); + return VLC_EGENERIC; + } +- i_ret = ioctl( i_fd, VIDIOC_G_CTRL, &control ); ++ i_ret = v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ); + } + else + { +- i_ret = ioctl( i_fd, VIDIOC_G_EXT_CTRLS, &ext_controls ); ++ i_ret = v4l2_ioctl( i_fd, VIDIOC_G_EXT_CTRLS, &ext_controls ); + control.value = ext_control.value; + } + } diff --git a/vlc.spec b/vlc.spec index 02f55c9..ad75c54 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,7 @@ Version: 1.0.0 %else Version: 0.9.3 %define _version %{version} -%define release_tag 1 +%define release_tag 2 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -36,6 +36,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-trunk-default_font.patch Patch1: vlc-0.9.2-pulse_default.patch +Patch2: vlc-0.9.3-libv4l2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -90,6 +91,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiff-devel BuildRequires: libupnp-devel +BuildRequires: libv4l-devel BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel @@ -244,6 +246,9 @@ VLC plugins for libdc1394 %endif %patch0 -p1 -b .default_font %patch1 -p1 -b .pulse_default +%if 0%{?fedora} > 8 +%patch2 -p1 -b .libv4l2 +%endif @@ -500,6 +505,9 @@ fi || : %changelog +* Mon Sep 29 2008 kwizart < kwizart at gmail.com > - 0.9.3-2 +- Add libv4l2 patch from Hans de Goede + * Fri Sep 26 2008 kwizart < kwizart at gmail.com > - 0.9.3-1 - Update to 0.9.3 (final) - Few others move from core to main From 2339bbc4d358c64c0455826fcd356cd00b60ceb9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 29 Sep 2008 13:14:03 +0000 Subject: [PATCH 010/671] - Prevent the needs to re-run autotools --- vlc-0.9.3-libv4l2.patch | 17 +++++++++++++++++ vlc.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/vlc-0.9.3-libv4l2.patch b/vlc-0.9.3-libv4l2.patch index 4b40e7d..c44e188 100644 --- a/vlc-0.9.3-libv4l2.patch +++ b/vlc-0.9.3-libv4l2.patch @@ -9,6 +9,23 @@ diff -up vlc-0.9.3/configure.ac.libv4l2 vlc-0.9.3/configure.ac CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" AC_CHECK_HEADERS(linux/videodev2.h, [ VLC_ADD_PLUGIN([v4l2]) +diff -up vlc-0.9.3/configure.libv4l2 vlc-0.9.3/configure +--- vlc-0.9.3/configure.libv4l2 2008-09-29 15:00:35.000000000 +0200 ++++ vlc-0.9.3/configure 2008-09-29 15:00:51.000000000 +0200 +@@ -45416,6 +45416,12 @@ _ACEOF + + fi + ++ ++ for element in v4l2; do ++ eval "LDFLAGS_${element}="'"'"-lv4l2 "'$'"{LDFLAGS_${element}} "'"' ++ am_modules_with_ldflags="${am_modules_with_ldflags} ${element}" ++ done ++ + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" + + for ac_header in linux/videodev2.h + diff -up vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 vlc-0.9.3/modules/access/v4l2/v4l2.c --- vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 2008-09-18 23:03:35.000000000 +0200 +++ vlc-0.9.3/modules/access/v4l2/v4l2.c 2008-09-27 19:45:58.000000000 +0200 diff --git a/vlc.spec b/vlc.spec index ad75c54..4c1c464 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,7 @@ Version: 1.0.0 %else Version: 0.9.3 %define _version %{version} -%define release_tag 2 +%define release_tag 3 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -91,7 +91,9 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiff-devel BuildRequires: libupnp-devel +%if 0%{?fedora} > 8 BuildRequires: libv4l-devel +%endif BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel @@ -248,6 +250,8 @@ VLC plugins for libdc1394 %patch1 -p1 -b .pulse_default %if 0%{?fedora} > 8 %patch2 -p1 -b .libv4l2 +touch -r configure.ac.libv4l2 configure.ac +touch -r configure.libv4l2 configure %endif @@ -505,6 +509,9 @@ fi || : %changelog +* Mon Sep 29 2008 kwizart < kwizart at gmail.com > - 0.9.3-3 +- Prevent the needs to re-run autotools + * Mon Sep 29 2008 kwizart < kwizart at gmail.com > - 0.9.3-2 - Add libv4l2 patch from Hans de Goede From 3709e0dc1d634d9b719a0f429add4bb72da2ca16 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 8 Oct 2008 02:55:07 +0000 Subject: [PATCH 011/671] - Update to 0.9.4 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 6691eb2..229afff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.3.tar.bz2 +vlc-0.9.4.tar.bz2 diff --git a/sources b/sources index 50fb503..26da044 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f38aa41ad3ac8b411f2d4a12e3525120 vlc-0.9.3.tar.bz2 +786628aaf8f30a9b812975b67c88b971 vlc-0.9.4.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 4c1c464..e75eda3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -18,9 +18,9 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.3 +Version: 0.9.4 %define _version %{version} -%define release_tag 3 +%define release_tag 1 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -509,8 +509,8 @@ fi || : %changelog -* Mon Sep 29 2008 kwizart < kwizart at gmail.com > - 0.9.3-3 -- Prevent the needs to re-run autotools +* Wed Oct 8 2008 kwizart < kwizart at gmail.com > - 0.9.4-1 +- Update to 0.9.4 * Mon Sep 29 2008 kwizart < kwizart at gmail.com > - 0.9.3-2 - Add libv4l2 patch from Hans de Goede From 9c406f6a19a29a200136c2ba668ae272d80e7b3f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 26 Oct 2008 10:49:02 +0000 Subject: [PATCH 012/671] -Hans patch is merged upstream --- vlc-0.9.3-libv4l2.patch | 634 ---------------------------------------- 1 file changed, 634 deletions(-) delete mode 100644 vlc-0.9.3-libv4l2.patch diff --git a/vlc-0.9.3-libv4l2.patch b/vlc-0.9.3-libv4l2.patch deleted file mode 100644 index c44e188..0000000 --- a/vlc-0.9.3-libv4l2.patch +++ /dev/null @@ -1,634 +0,0 @@ -diff -up vlc-0.9.3/configure.ac.libv4l2 vlc-0.9.3/configure.ac ---- vlc-0.9.3/configure.ac.libv4l2 2008-09-25 20:23:10.000000000 +0200 -+++ vlc-0.9.3/configure.ac 2008-09-27 19:43:30.000000000 +0200 -@@ -2421,6 +2421,7 @@ then - AC_DEFINE(HAVE_ALSA, 1, Define if ALSA is present.) - fi - -+ VLC_ADD_LDFLAGS([v4l2],[-lv4l2]) - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" - AC_CHECK_HEADERS(linux/videodev2.h, [ - VLC_ADD_PLUGIN([v4l2]) -diff -up vlc-0.9.3/configure.libv4l2 vlc-0.9.3/configure ---- vlc-0.9.3/configure.libv4l2 2008-09-29 15:00:35.000000000 +0200 -+++ vlc-0.9.3/configure 2008-09-29 15:00:51.000000000 +0200 -@@ -45416,6 +45416,12 @@ _ACEOF - - fi - -+ -+ for element in v4l2; do -+ eval "LDFLAGS_${element}="'"'"-lv4l2 "'$'"{LDFLAGS_${element}} "'"' -+ am_modules_with_ldflags="${am_modules_with_ldflags} ${element}" -+ done -+ - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}" - - for ac_header in linux/videodev2.h - -diff -up vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 vlc-0.9.3/modules/access/v4l2/v4l2.c ---- vlc-0.9.3/modules/access/v4l2/v4l2.c.libv4l2 2008-09-18 23:03:35.000000000 +0200 -+++ vlc-0.9.3/modules/access/v4l2/v4l2.c 2008-09-27 19:45:58.000000000 +0200 -@@ -67,6 +67,8 @@ - - #include - -+#include -+ - /***************************************************************************** - * Module descriptior - *****************************************************************************/ -@@ -1108,11 +1110,11 @@ static void DemuxClose( vlc_object_t *p_ - buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf.memory = ( p_sys->io == IO_METHOD_USERPTR ) ? - V4L2_MEMORY_USERPTR : V4L2_MEMORY_MMAP; -- ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ); /* ignore result */ -+ v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ); /* ignore result */ - } - - buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- if( ioctl( p_sys->i_fd_video, VIDIOC_STREAMOFF, &buf_type ) < 0 ) { -+ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_STREAMOFF, &buf_type ) < 0 ) { - msg_Err( p_this, "VIDIOC_STREAMOFF failed" ); - } - -@@ -1131,7 +1133,7 @@ static void DemuxClose( vlc_object_t *p_ - case IO_METHOD_MMAP: - for( i = 0; i < p_sys->i_nbuffers; ++i ) - { -- if( munmap( p_sys->p_buffers[i].start, p_sys->p_buffers[i].length ) ) -+ if( v4l2_munmap( p_sys->p_buffers[i].start, p_sys->p_buffers[i].length ) ) - { - msg_Err( p_this, "munmap failed" ); - } -@@ -1155,7 +1157,7 @@ static void CommonClose( vlc_object_t *p - { - (void)p_this; - /* Close */ -- if( p_sys->i_fd_video >= 0 ) close( p_sys->i_fd_video ); -+ if( p_sys->i_fd_video >= 0 ) v4l2_close( p_sys->i_fd_video ); - #ifdef HAVE_ALSA - if( p_sys->p_alsa_pcm ) - { -@@ -1350,7 +1352,7 @@ static ssize_t AccessRead( access_t * p_ - return -1; - } - -- i_ret = read( p_sys->i_fd_video, p_buffer, i_len ); -+ i_ret = v4l2_read( p_sys->i_fd_video, p_buffer, i_len ); - if( i_ret == 0 ) - { - p_access->info.b_eof = true; -@@ -1419,7 +1421,7 @@ static block_t* GrabVideo( demux_t *p_de - switch( p_sys->io ) - { - case IO_METHOD_READ: -- i_ret = read( p_sys->i_fd_video, p_sys->p_buffers[0].start, p_sys->p_buffers[0].length ); -+ i_ret = v4l2_read( p_sys->i_fd_video, p_sys->p_buffers[0].start, p_sys->p_buffers[0].length ); - if( i_ret == -1 ) - { - switch( errno ) -@@ -1446,7 +1448,7 @@ static block_t* GrabVideo( demux_t *p_de - buf.memory = V4L2_MEMORY_MMAP; - - /* Wait for next frame */ -- if (ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) -+ if (v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) - { - switch( errno ) - { -@@ -1470,7 +1472,7 @@ static block_t* GrabVideo( demux_t *p_de - if( !p_block ) return 0; - - /* Unlock */ -- if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) -+ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) - { - msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)"); - return 0; -@@ -1484,7 +1486,7 @@ static block_t* GrabVideo( demux_t *p_de - buf.memory = V4L2_MEMORY_USERPTR; - - /* Wait for next frame */ -- if (ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) -+ if (v4l2_ioctl( p_sys->i_fd_video, VIDIOC_DQBUF, &buf ) < 0 ) - { - switch( errno ) - { -@@ -1517,7 +1519,7 @@ static block_t* GrabVideo( demux_t *p_de - if( !p_block ) return 0; - - /* Unlock */ -- if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) -+ if( v4l2_ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) - { - msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)"); - return 0; -@@ -1705,7 +1707,7 @@ static int InitMmap( demux_t *p_demux, i - req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - req.memory = V4L2_MEMORY_MMAP; - -- if( ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) - { - msg_Err( p_demux, "device does not support mmap i/o" ); - goto open_failed; -@@ -1733,7 +1735,7 @@ static int InitMmap( demux_t *p_demux, i - buf.memory = V4L2_MEMORY_MMAP; - buf.index = p_sys->i_nbuffers; - -- if( ioctl( i_fd, VIDIOC_QUERYBUF, &buf ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYBUF, &buf ) < 0 ) - { - msg_Err( p_demux, "VIDIOC_QUERYBUF" ); - goto open_failed; -@@ -1741,7 +1743,7 @@ static int InitMmap( demux_t *p_demux, i - - p_sys->p_buffers[p_sys->i_nbuffers].length = buf.length; - p_sys->p_buffers[p_sys->i_nbuffers].start = -- mmap( NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, i_fd, buf.m.offset ); -+ v4l2_mmap( NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, i_fd, buf.m.offset ); - - if( p_sys->p_buffers[p_sys->i_nbuffers].start == MAP_FAILED ) - { -@@ -1774,7 +1776,7 @@ static int InitUserP( demux_t *p_demux, - req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - req.memory = V4L2_MEMORY_USERPTR; - -- if( ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_REQBUFS, &req ) < 0 ) - { - msg_Err( p_demux, "device does not support user pointer i/o" ); - return VLC_EGENERIC; -@@ -1830,6 +1832,7 @@ static int OpenVideoDev( vlc_object_t *p - enum v4l2_buf_type buf_type; - char *psz_device = p_sys->psz_vdev; - es_format_t es_fmt; -+ int libv4l2_fd; - - if( ( i_fd = open( psz_device, O_RDWR ) ) < 0 ) - { -@@ -1837,6 +1840,16 @@ static int OpenVideoDev( vlc_object_t *p - goto open_failed; - } - -+ /* Note the v4l2_xxx functions are designed so that if they get passed an -+ unknown fd, the will behave exactly as their regular xxx counterparts, -+ so if v4l2_fd_open fails, we continue as normal (missing the libv4l2 -+ custom cam format to normal formats conversion). Chances are big we will -+ still fail then though, as normally v4l2_fd_open only fails if the -+ device is not a v4l2 device. */ -+ libv4l2_fd = v4l2_fd_open(i_fd, V4L2_ENABLE_ENUM_FMT_EMULATION); -+ if (libv4l2_fd != -1) -+ i_fd = libv4l2_fd; -+ - /* Tune the tuner */ - if( p_sys->i_frequency >= 0 ) - { -@@ -1850,7 +1863,7 @@ static int OpenVideoDev( vlc_object_t *p - frequency.tuner = p_sys->i_cur_tuner; - frequency.type = p_sys->p_tuners[p_sys->i_cur_tuner].type; - frequency.frequency = p_sys->i_frequency / 62.5; -- if( ioctl( i_fd, VIDIOC_S_FREQUENCY, &frequency ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_FREQUENCY, &frequency ) < 0 ) - { - msg_Err( p_obj, "cannot set tuner frequency (%m)" ); - goto open_failed; -@@ -1870,7 +1883,7 @@ static int OpenVideoDev( vlc_object_t *p - memset( &tuner, 0, sizeof( tuner ) ); - tuner.index = p_sys->i_cur_tuner; - tuner.audmode = p_sys->i_audio_mode; -- if( ioctl( i_fd, VIDIOC_S_TUNER, &tuner ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_TUNER, &tuner ) < 0 ) - { - msg_Err( p_obj, "cannot set tuner audio mode (%m)" ); - goto open_failed; -@@ -1882,7 +1895,7 @@ static int OpenVideoDev( vlc_object_t *p - - if( p_sys->i_selected_standard_id != V4L2_STD_UNKNOWN ) - { -- if( ioctl( i_fd, VIDIOC_S_STD, &p_sys->i_selected_standard_id ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_STD, &p_sys->i_selected_standard_id ) < 0 ) - { - msg_Err( p_obj, "cannot set standard (%m)" ); - goto open_failed; -@@ -1898,7 +1911,7 @@ static int OpenVideoDev( vlc_object_t *p - p_sys->i_selected_input = 0; - } - -- if( ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 ) - { - msg_Err( p_obj, "cannot set input (%m)" ); - goto open_failed; -@@ -1915,7 +1928,7 @@ static int OpenVideoDev( vlc_object_t *p - p_sys->i_selected_audio_input = 0; - } - -- if( ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_selected_audio_input] ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_selected_audio_input] ) < 0 ) - { - msg_Err( p_obj, "cannot set audio input (%m)" ); - goto open_failed; -@@ -1964,11 +1977,11 @@ static int OpenVideoDev( vlc_object_t *p - /* Reset Cropping */ - memset( &cropcap, 0, sizeof(cropcap) ); - cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- if( ioctl( i_fd, VIDIOC_CROPCAP, &cropcap ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_CROPCAP, &cropcap ) >= 0 ) - { - crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - crop.c = cropcap.defrect; /* reset to default */ -- if( ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) - { - switch( errno ) - { -@@ -1988,7 +2001,7 @@ static int OpenVideoDev( vlc_object_t *p - - if( p_sys->i_width <= 0 || p_sys->i_height <= 0 ) - { -- if( ioctl( i_fd, VIDIOC_G_FMT, &fmt ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_G_FMT, &fmt ) < 0 ) - { - msg_Err( p_demux, "Cannot get default width and height." ); - goto open_failed; -@@ -2031,7 +2044,7 @@ static int OpenVideoDev( vlc_object_t *p - } - } - /* Try and set user chroma */ -- if( !IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) || ( fmt.fmt.pix.pixelformat && ioctl( i_fd, VIDIOC_S_FMT, &fmt ) < 0 ) ) -+ if( !IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) || ( fmt.fmt.pix.pixelformat && v4l2_ioctl( i_fd, VIDIOC_S_FMT, &fmt ) < 0 ) ) - { - msg_Warn( p_demux, "Driver is unable to use specified chroma %s. Trying defaults.", p_sys->psz_requested_chroma ); - fmt.fmt.pix.pixelformat = 0; -@@ -2047,7 +2060,7 @@ static int OpenVideoDev( vlc_object_t *p - { - fmt.fmt.pix.pixelformat = p_chroma_fallbacks[i]; - if( IsPixelFormatSupported( p_demux, fmt.fmt.pix.pixelformat ) -- && ioctl( i_fd, VIDIOC_S_FMT, &fmt ) >= 0 ) -+ && v4l2_ioctl( i_fd, VIDIOC_S_FMT, &fmt ) >= 0 ) - break; - } - if( i == ARRAY_SIZE( p_chroma_fallbacks ) ) -@@ -2092,7 +2105,7 @@ static int OpenVideoDev( vlc_object_t *p - frmival.pixel_format = fmt.fmt.pix.pixelformat; - frmival.width = p_sys->i_width; - frmival.height = p_sys->i_height; -- if( ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ) - { - char psz_fourcc[5]; - memset( &psz_fourcc, 0, sizeof( psz_fourcc ) ); -@@ -2108,7 +2121,7 @@ static int OpenVideoDev( vlc_object_t *p - frmival.discrete.numerator, - frmival.discrete.denominator ); - frmival.index++; -- } while( ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ); -+ } while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival ) >= 0 ); - break; - case V4L2_FRMIVAL_TYPE_STEPWISE: - msg_Dbg( p_demux, " supported frame intervals: %d/%d to " -@@ -2175,7 +2188,7 @@ static int OpenVideoDev( vlc_object_t *p - buf.memory = V4L2_MEMORY_MMAP; - buf.index = i; - -- if( ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) - { - msg_Err( p_demux, "VIDIOC_QBUF failed" ); - goto open_failed; -@@ -2183,7 +2196,7 @@ static int OpenVideoDev( vlc_object_t *p - } - - buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- if( ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) - { - msg_Err( p_demux, "VIDIOC_STREAMON failed" ); - goto open_failed; -@@ -2203,7 +2216,7 @@ static int OpenVideoDev( vlc_object_t *p - buf.m.userptr = (unsigned long)p_sys->p_buffers[i].start; - buf.length = p_sys->p_buffers[i].length; - -- if( ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QBUF, &buf ) < 0 ) - { - msg_Err( p_demux, "VIDIOC_QBUF failed" ); - goto open_failed; -@@ -2211,7 +2224,7 @@ static int OpenVideoDev( vlc_object_t *p - } - - buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- if( ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_STREAMON, &buf_type ) < 0 ) - { - msg_Err( p_demux, "VIDIOC_STREAMON failed" ); - goto open_failed; -@@ -2229,7 +2242,7 @@ static int OpenVideoDev( vlc_object_t *p - return i_fd; - - open_failed: -- if( i_fd >= 0 ) close( i_fd ); -+ if( i_fd >= 0 ) v4l2_close( i_fd ); - return -1; - - } -@@ -2548,6 +2561,7 @@ static bool ProbeVideoDev( vlc_object_t - int i_standard; - - int i_fd; -+ int libv4l2_fd; - - if( ( i_fd = open( psz_device, O_RDWR ) ) < 0 ) - { -@@ -2555,9 +2569,19 @@ static bool ProbeVideoDev( vlc_object_t - goto open_failed; - } - -+ /* Note the v4l2_xxx functions are designed so that if they get passed an -+ unknown fd, the will behave exactly as their regular xxx counterparts, -+ so if v4l2_fd_open fails, we continue as normal (missing the libv4l2 -+ custom cam format to normal formats conversion). Chances are big we will -+ still fail then though, as normally v4l2_fd_open only fails if the -+ device is not a v4l2 device. */ -+ libv4l2_fd = v4l2_fd_open(i_fd, V4L2_ENABLE_ENUM_FMT_EMULATION); -+ if (libv4l2_fd != -1) -+ i_fd = libv4l2_fd; -+ - /* Get device capabilites */ - -- if( ioctl( i_fd, VIDIOC_QUERYCAP, &p_sys->dev_cap ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCAP, &p_sys->dev_cap ) < 0 ) - { - msg_Err( p_obj, "cannot get video capabilities (%m)" ); - goto open_failed; -@@ -2593,7 +2617,7 @@ static bool ProbeVideoDev( vlc_object_t - { - struct v4l2_input t_input; - t_input.index = 0; -- while( ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) - { - p_sys->i_input++; - t_input.index = p_sys->i_input; -@@ -2606,7 +2630,7 @@ static bool ProbeVideoDev( vlc_object_t - { - p_sys->p_inputs[i_index].index = i_index; - -- if( ioctl( i_fd, VIDIOC_ENUMINPUT, &p_sys->p_inputs[i_index] ) ) -+ if( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &p_sys->p_inputs[i_index] ) ) - { - msg_Err( p_obj, "cannot get video input characteristics (%m)" ); - goto open_failed; -@@ -2627,7 +2651,7 @@ static bool ProbeVideoDev( vlc_object_t - { - struct v4l2_standard t_standards; - t_standards.index = 0; -- while( ioctl( i_fd, VIDIOC_ENUMSTD, &t_standards ) >=0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_ENUMSTD, &t_standards ) >=0 ) - { - p_sys->i_standard++; - t_standards.index = p_sys->i_standard; -@@ -2640,7 +2664,7 @@ static bool ProbeVideoDev( vlc_object_t - { - p_sys->p_standards[i_standard].index = i_standard; - -- if( ioctl( i_fd, VIDIOC_ENUMSTD, &p_sys->p_standards[i_standard] ) ) -+ if( v4l2_ioctl( i_fd, VIDIOC_ENUMSTD, &p_sys->p_standards[i_standard] ) ) - { - msg_Err( p_obj, "cannot get video input standards (%m)" ); - goto open_failed; -@@ -2662,9 +2686,9 @@ static bool ProbeVideoDev( vlc_object_t - if( p_sys->dev_cap.capabilities & V4L2_CAP_AUDIO ) - { - while( p_sys->i_audio < 32 && -- ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_audio] ) >= 0 ) -+ v4l2_ioctl( i_fd, VIDIOC_S_AUDIO, &p_sys->p_audios[p_sys->i_audio] ) >= 0 ) - { -- if( ioctl( i_fd, VIDIOC_G_AUDIO, &p_sys->p_audios[ p_sys->i_audio] ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_G_AUDIO, &p_sys->p_audios[ p_sys->i_audio] ) < 0 ) - { - msg_Err( p_obj, "cannot get audio input characteristics (%m)" ); - goto open_failed; -@@ -2690,7 +2714,7 @@ static bool ProbeVideoDev( vlc_object_t - { - struct v4l2_tuner tuner; - memset( &tuner, 0, sizeof(tuner) ); -- while( ioctl( i_fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_G_TUNER, &tuner ) >= 0 ) - { - p_sys->i_tuner++; - memset( &tuner, 0, sizeof(tuner) ); -@@ -2704,7 +2728,7 @@ static bool ProbeVideoDev( vlc_object_t - { - p_sys->p_tuners[i_index].index = i_index; - -- if( ioctl( i_fd, VIDIOC_G_TUNER, &p_sys->p_tuners[i_index] ) ) -+ if( v4l2_ioctl( i_fd, VIDIOC_G_TUNER, &p_sys->p_tuners[i_index] ) ) - { - msg_Err( p_obj, "cannot get tuner characteristics (%m)" ); - goto open_failed; -@@ -2727,7 +2751,7 @@ static bool ProbeVideoDev( vlc_object_t - - struct v4l2_frequency frequency; - memset( &frequency, 0, sizeof( frequency ) ); -- if( ioctl( i_fd, VIDIOC_G_FREQUENCY, &frequency ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_G_FREQUENCY, &frequency ) < 0 ) - { - msg_Err( p_obj, "cannot get tuner frequency (%m)" ); - goto open_failed; -@@ -2752,7 +2776,7 @@ static bool ProbeVideoDev( vlc_object_t - codec.index = i_index; - codec.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - -- while( ioctl( i_fd, VIDIOC_ENUM_FMT, &codec ) >= 0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FMT, &codec ) >= 0 ) - { - i_index++; - codec.index = i_index; -@@ -2767,7 +2791,7 @@ static bool ProbeVideoDev( vlc_object_t - p_sys->p_codecs[i_index].index = i_index; - p_sys->p_codecs[i_index].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - -- if( ioctl( i_fd, VIDIOC_ENUM_FMT, &p_sys->p_codecs[i_index] ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FMT, &p_sys->p_codecs[i_index] ) < 0 ) - { - msg_Err( p_obj, "cannot get codec description (%m)" ); - goto open_failed; -@@ -2800,7 +2824,7 @@ static bool ProbeVideoDev( vlc_object_t - struct v4l2_frmsizeenum frmsize; - frmsize.index = 0; - frmsize.pixel_format = p_sys->p_codecs[i_index].pixelformat; -- if( ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) < 0 ) - { - /* Not all devices support this ioctl */ - msg_Warn( p_obj, "Unable to query for frame sizes" ); -@@ -2816,7 +2840,7 @@ static bool ProbeVideoDev( vlc_object_t - " device supports size %dx%d", - frmsize.discrete.width, frmsize.discrete.height ); - frmsize.index++; -- } while( ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 ); -+ } while( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 ); - break; - case V4L2_FRMSIZE_TYPE_STEPWISE: - msg_Dbg( p_obj, -@@ -2848,12 +2872,12 @@ static bool ProbeVideoDev( vlc_object_t - } - - -- if( i_fd >= 0 ) close( i_fd ); -+ if( i_fd >= 0 ) v4l2_close( i_fd ); - return true; - - open_failed: - -- if( i_fd >= 0 ) close( i_fd ); -+ if( i_fd >= 0 ) v4l2_close( i_fd ); - return false; - - } -@@ -3019,7 +3043,7 @@ static void ControlListPrint( vlc_object - { - querymenu.index = i_mid; - querymenu.id = queryctrl.id; -- if( ioctl( i_fd, VIDIOC_QUERYMENU, &querymenu ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYMENU, &querymenu ) >= 0 ) - { - msg_Dbg( p_obj, " %d: %s", - querymenu.index, querymenu.name ); -@@ -3056,7 +3080,7 @@ static void ControlListPrint( vlc_object - queryctrl.default_value ); - memset( &control, 0, sizeof( control ) ); - control.id = queryctrl.id; -- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 ) - { - msg_Dbg( p_obj, " current value: %d", control.value ); - } -@@ -3153,13 +3177,13 @@ static int ControlList( vlc_object_t *p_ - var_AddCallback( p_obj, "controls-reset", AccessControlResetCallback, NULL ); - - queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - msg_Dbg( p_obj, "Extended control API supported by v4l2 driver" ); - - /* List extended controls */ - queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; -- while( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - if( queryctrl.type == V4L2_CTRL_TYPE_CTRL_CLASS ) - { -@@ -3197,7 +3221,7 @@ static int ControlList( vlc_object_t *p_ - i_cid ++ ) - { - queryctrl.id = i_cid; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) - continue; -@@ -3213,7 +3237,7 @@ static int ControlList( vlc_object_t *p_ - i_cid ++ ) - { - queryctrl.id = i_cid; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) - continue; -@@ -3312,11 +3336,11 @@ static int ControlReset( vlc_object_t *p - memset( &queryctrl, 0, sizeof( queryctrl ) ); - - queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - /* Extended control API supported */ - queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; -- while( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ while( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - if( queryctrl.type == V4L2_CTRL_TYPE_CTRL_CLASS - || V4L2_CTRL_ID2CLASS( queryctrl.id ) == V4L2_CTRL_CLASS_MPEG ) -@@ -3327,7 +3351,7 @@ static int ControlReset( vlc_object_t *p - struct v4l2_control control; - memset( &control, 0, sizeof( control ) ); - control.id = queryctrl.id; -- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 -+ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 - && queryctrl.default_value != control.value ) - { - int i; -@@ -3350,14 +3374,14 @@ static int ControlReset( vlc_object_t *p - i_cid ++ ) - { - queryctrl.id = i_cid; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - struct v4l2_control control; - if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) - continue; - memset( &control, 0, sizeof( control ) ); - control.id = queryctrl.id; -- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 -+ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 - && queryctrl.default_value != control.value ) - { - int i; -@@ -3377,14 +3401,14 @@ static int ControlReset( vlc_object_t *p - i_cid ++ ) - { - queryctrl.id = i_cid; -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) >= 0 ) - { - struct v4l2_control control; - if( queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) - continue; - memset( &control, 0, sizeof( control ) ); - control.id = queryctrl.id; -- if( ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 -+ if( v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ) >= 0 - && queryctrl.default_value != control.value ) - { - name2var( queryctrl.name ); -@@ -3417,7 +3441,7 @@ static int Control( vlc_object_t *p_obj, - - queryctrl.id = i_cid; - -- if( ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) < 0 -+ if( v4l2_ioctl( i_fd, VIDIOC_QUERYCTRL, &queryctrl ) < 0 - || queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ) - { - msg_Dbg( p_obj, "%s (%x) control is not supported.", psz_name, i_cid ); -@@ -3438,20 +3462,20 @@ static int Control( vlc_object_t *p_obj, - if( i_value >= 0 ) - { - ext_control.value = i_value; -- if( ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 ) - { - control.value = i_value; -- if( ioctl( i_fd, VIDIOC_S_CTRL, &control ) < 0 ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_CTRL, &control ) < 0 ) - { - msg_Err( p_obj, "unable to set %s (%x) to %d (%m)", - psz_name, i_cid, i_value ); - return VLC_EGENERIC; - } -- i_ret = ioctl( i_fd, VIDIOC_G_CTRL, &control ); -+ i_ret = v4l2_ioctl( i_fd, VIDIOC_G_CTRL, &control ); - } - else - { -- i_ret = ioctl( i_fd, VIDIOC_G_EXT_CTRLS, &ext_controls ); -+ i_ret = v4l2_ioctl( i_fd, VIDIOC_G_EXT_CTRLS, &ext_controls ); - control.value = ext_control.value; - } - } From 758952addeeb99792d264a544a52e38705e7527a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 26 Oct 2008 11:42:50 +0000 Subject: [PATCH 013/671] *** empty log message *** --- .gitignore | 2 +- 300_all_pic.patch | 209 ++++++++++++++++++++++++++++++++++++++++ 310_all_mmx_pic.patch | 154 +++++++++++++++++++++++++++++ sources | 2 +- vlc-embeddedvideo.patch | 22 +++++ vlc.spec | 79 ++++++++++----- 6 files changed, 442 insertions(+), 26 deletions(-) create mode 100644 300_all_pic.patch create mode 100644 310_all_mmx_pic.patch create mode 100644 vlc-embeddedvideo.patch diff --git a/.gitignore b/.gitignore index 229afff..bb427f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.4.tar.bz2 +vlc-0.9.5.tar.bz2 diff --git a/300_all_pic.patch b/300_all_pic.patch new file mode 100644 index 0000000..2129efa --- /dev/null +++ b/300_all_pic.patch @@ -0,0 +1,209 @@ +Index: vlc-0.9.0-svn/libs/loader/Makefile.am +=================================================================== +--- vlc-0.9.0-svn.orig/libs/loader/Makefile.am ++++ vlc-0.9.0-svn/libs/loader/Makefile.am +@@ -16,7 +16,7 @@ endif + # TODO: real check for vsscanf() and + AM_CPPFLAGS = -D__WINE__ -DHAVE_SYS_MMAN_H=1 -DHAVE_VSSCANF=1 \ + -DWIN32_PATH=\"\" -DTRACE\(...\)=\(void\)0 +-AM_CFLAGS = -fno-PIC `$(top_builddir)/vlc-config --cflags` -U_FILE_OFFSET_BITS \ ++AM_CFLAGS = -fPIC `$(top_builddir)/vlc-config --cflags` -U_FILE_OFFSET_BITS \ + -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer + + noinst_HEADERS = com.h driver.h ext.h ldt_keeper.h loader.h registry.h \ +Index: vlc-0.9.0-svn/libs/loader/module.c +=================================================================== +--- vlc-0.9.0-svn.orig/libs/loader/module.c ++++ vlc-0.9.0-svn/libs/loader/module.c +@@ -63,8 +63,8 @@ + + #ifdef EMU_QTX_API + #include "wrapper.h" +-static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); +-static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); ++int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); ++int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); + #endif + + //#undef TRACE +@@ -572,8 +572,6 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR lib + fprintf(stderr,"QuickTime.qts patched!!! old entry=%p\n",ptr[0]); + + #ifdef EMU_QTX_API +- report_entry = report_func; +- report_ret = report_func_ret; + wrapper_target=ptr[0]; + ptr[0]=wrapper; + #endif +@@ -754,7 +752,7 @@ static int dump_component(char* name,int + static uint32_t ret_array[4096]; + static int ret_i=0; + +-static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) ++int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) + { + #ifdef DEBUG_QTX_API + int i; +@@ -953,7 +951,7 @@ static int report_func(void *stack_base, + return 0; + } + +-static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) ++int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) + { + int i; + short err; +@@ -1066,8 +1064,6 @@ FARPROC MODULE_GetProcAddress( + // || !strcmp(function,"_CallComponent") + ){ + fprintf(stderr,"theQuickTimeDispatcher catched -> %p\n",retproc); +- report_entry = report_func; +- report_ret = report_func_ret; + wrapper_target=(void(*)(void))retproc; + retproc=(FARPROC)wrapper; + } +Index: vlc-0.9.0-svn/libs/loader/stubs.s +=================================================================== +--- vlc-0.9.0-svn.orig/libs/loader/stubs.s ++++ vlc-0.9.0-svn/libs/loader/stubs.s +@@ -33,3 +33,6 @@ exp_EH_prolog: + leal 12(%esp), %ebp + pushl %eax + ret ++ ++.section .note.GNU-stack,"",@progbits ++ +Index: vlc-0.9.0-svn/libs/loader/wrapper.S +=================================================================== +--- vlc-0.9.0-svn.orig/libs/loader/wrapper.S ++++ vlc-0.9.0-svn/libs/loader/wrapper.S +@@ -1,17 +1,19 @@ + .section .data +-.globl caller_return + caller_return: + .long 0 +-.globl report_entry +-report_entry: +- .long null_call +-.globl report_ret +-report_ret: +- .long null_call + .global wrapper_target + wrapper_target: + .long null_call + ++#undef __i686 /* gcc define gets in our way */ ++ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits ++.globl __i686.get_pc_thunk.bx ++ .hidden __i686.get_pc_thunk.bx ++ .type __i686.get_pc_thunk.bx,@function ++__i686.get_pc_thunk.bx: ++ movl (%esp), %ebx ++ ret ++ + .section .text + .globl null_call + .type null_call, @function +@@ -22,46 +24,60 @@ null_call: + .type wrapper, @function + .balign 16,0x90 + wrapper: ++ pushl $0 + pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI) + pushf # store flags + + push %ebp # set up a stack frame + movl %esp, %ebp + ++ call __i686.get_pc_thunk.bx ++ addl $_GLOBAL_OFFSET_TABLE_, %ebx ++ + leal 4(%ebp), %eax # push flags addr + push %eax + leal 8(%ebp), %eax # push registers addr + push %eax +- +- leal 40(%ebp), %edx ++ ++ leal 44(%ebp), %edx + movl (%ebp), %eax + subl %edx, %eax + push %eax + push %edx +- +- call *report_entry # report entry +- ++ ++ call report_func@PLT # report entry ++ + test %eax, %eax + jnz .Ldone + ++ movl 44(%ebp), %eax # switch return addresses ++ movl %eax, caller_return@GOTOFF(%ebx) ++ leal .Lwrapper_return@GOTOFF(%ebx), %eax ++ movl %eax, 40(%ebp) ++ ++ movl wrapper_target@GOTOFF(%ebx), %eax ++ mov %eax, 40(%ebp) # wrapper_target should return at .Lwrapper_return ++ + leave # restore %esp, %ebp + popf # restore flags + popa # restore registers +- +- popl caller_return # switch return addresses +- pushl $.Lwrapper_return +- +- jmp *wrapper_target # wrapper_target should return at .Lwrapper_return ++ ++ ret + + .balign 16, 0x90 + .Lwrapper_return: +- pushl caller_return # restore the original return address ++ pushl $0 # restore the original return address + pusha # more for reference sake here + pushf + + push %ebp # set up a stack frame + movl %esp, %ebp + ++ call __i686.get_pc_thunk.bx ++ addl $_GLOBAL_OFFSET_TABLE_, %ebx ++ movl caller_return@GOTOFF(%ebx), %eax ++ movl %eax, 40(%ebp) # restore the original return address ++ + leal 4(%ebp), %eax # push flags addr + push %eax + leal 8(%ebp), %eax # push registers addr +@@ -73,11 +89,13 @@ wrapper: + push %eax + push %edx + +- call *report_ret # report the return information (same args) ++ call report_func_ret@PLT# report the return information (same args) + .Ldone: + + leave + popf + popa + ret +- ++ ++.section .note.GNU-stack,"",@progbits ++ +Index: vlc-0.9.0-svn/libs/loader/wrapper.h +=================================================================== +--- vlc-0.9.0-svn.orig/libs/loader/wrapper.h ++++ vlc-0.9.0-svn/libs/loader/wrapper.h +@@ -7,10 +7,6 @@ typedef struct { + uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; + } reg386_t; + +-typedef int (*wrapper_func_t)(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); +- +-extern wrapper_func_t report_entry, report_ret; +- + extern void (*wrapper_target)(void); + + extern int wrapper(void); diff --git a/310_all_mmx_pic.patch b/310_all_mmx_pic.patch new file mode 100644 index 0000000..2079370 --- /dev/null +++ b/310_all_mmx_pic.patch @@ -0,0 +1,154 @@ +Index: vlc-0.9.0-svn/modules/video_chroma/i420_rgb_mmx.h +=================================================================== +--- vlc-0.9.0-svn.orig/modules/video_chroma/i420_rgb_mmx.h ++++ vlc-0.9.0-svn/modules/video_chroma/i420_rgb_mmx.h +@@ -34,18 +34,18 @@ + #define USED_U64(foo) \ + static const uint64_t foo __asm__ (#foo) __attribute__((unused)) + #endif +-USED_U64(mmx_80w) = 0x0080008000800080ULL; +-USED_U64(mmx_10w) = 0x1010101010101010ULL; +-USED_U64(mmx_00ffw) = 0x00ff00ff00ff00ffULL; +-USED_U64(mmx_Y_coeff) = 0x253f253f253f253fULL; +- +-USED_U64(mmx_U_green) = 0xf37df37df37df37dULL; +-USED_U64(mmx_U_blue) = 0x4093409340934093ULL; +-USED_U64(mmx_V_red) = 0x3312331233123312ULL; +-USED_U64(mmx_V_green) = 0xe5fce5fce5fce5fcULL; ++USED_U64(mmx_80w) = 0x0080008000800080ULL; /* Will be referenced as %4 in inline asm */ ++USED_U64(mmx_10w) = 0x1010101010101010ULL; /* -- as %5 */ ++USED_U64(mmx_00ffw) = 0x00ff00ff00ff00ffULL; /* -- as %6 */ ++USED_U64(mmx_Y_coeff) = 0x253f253f253f253fULL; /* -- as %7 */ ++ ++USED_U64(mmx_U_green) = 0xf37df37df37df37dULL; /* -- as %8 */ ++USED_U64(mmx_U_blue) = 0x4093409340934093ULL; /* -- as %9 */ ++USED_U64(mmx_V_red) = 0x3312331233123312ULL; /* -- as %10 */ ++USED_U64(mmx_V_green) = 0xe5fce5fce5fce5fcULL; /* -- as %11 */ + +-USED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8ULL; +-USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfcULL; ++USED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8ULL; /* -- as %12 */ ++USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfcULL; /* -- as %13 */ + #undef USED_U64 + + #if defined(CAN_COMPILE_MMX) +@@ -59,18 +59,16 @@ USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfc + MMX_INSTRUCTIONS \ + : \ + : "r" (p_y), "r" (p_u), \ +- "r" (p_v), "r" (p_buffer) ); \ ++ "r" (p_v), "r" (p_buffer), \ ++ "m" (mmx_80w), "m" (mmx_10w), \ ++ "m" (mmx_00ffw), "m" (mmx_Y_coeff), \ ++ "m" (mmx_U_green), "m" (mmx_U_blue), \ ++ "m" (mmx_V_red), "m" (mmx_V_green), \ ++ "m" (mmx_mask_f8), "m" (mmx_mask_fc) ); \ + } while(0) + + #define MMX_END __asm__ __volatile__ ( "emms" ) + +-/* Use RIP-relative code in PIC mode on amd64 */ +-#if defined(__x86_64__) && defined(__PIC__) +-# define G "(%%rip)" +-#else +-# define G +-#endif +- + #define MMX_INIT_16 " \n\ + movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\ + movd (%2), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\ +@@ -103,27 +101,27 @@ movq (%0), %%mm6 # Load 8 Y + # convert the chroma part \n\ + punpcklbw %%mm4, %%mm0 # scatter 4 Cb 00 u3 00 u2 00 u1 00 u0 \n\ + punpcklbw %%mm4, %%mm1 # scatter 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\ +-psubsw mmx_80w"G", %%mm0 # Cb -= 128 \n\ +-psubsw mmx_80w"G", %%mm1 # Cr -= 128 \n\ ++psubsw %4, %%mm0 # Cb -= 128 \n\ ++psubsw %4, %%mm1 # Cr -= 128 \n\ + psllw $3, %%mm0 # Promote precision \n\ + psllw $3, %%mm1 # Promote precision \n\ + movq %%mm0, %%mm2 # Copy 4 Cb 00 u3 00 u2 00 u1 00 u0 \n\ + movq %%mm1, %%mm3 # Copy 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\ +-pmulhw mmx_U_green"G", %%mm2 # Mul Cb with green coeff -> Cb green \n\ +-pmulhw mmx_V_green"G", %%mm3 # Mul Cr with green coeff -> Cr green \n\ +-pmulhw mmx_U_blue"G", %%mm0 # Mul Cb -> Cblue 00 b3 00 b2 00 b1 00 b0 \n\ +-pmulhw mmx_V_red"G", %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 r0 \n\ ++pmulhw %8, %%mm2 # Mul Cb with green coeff -> Cb green \n\ ++pmulhw %11, %%mm3 # Mul Cr with green coeff -> Cr green \n\ ++pmulhw %9, %%mm0 # Mul Cb -> Cblue 00 b3 00 b2 00 b1 00 b0 \n\ ++pmulhw %10, %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 r0 \n\ + paddsw %%mm3, %%mm2 # Cb green + Cr green -> Cgreen \n\ + \n\ + # convert the luma part \n\ +-psubusb mmx_10w"G", %%mm6 # Y -= 16 \n\ ++psubusb %5, %%mm6 # Y -= 16 \n\ + movq %%mm6, %%mm7 # Copy 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ +-pand mmx_00ffw"G", %%mm6 # get Y even 00 Y6 00 Y4 00 Y2 00 Y0 \n\ ++pand %6, %%mm6 # get Y even 00 Y6 00 Y4 00 Y2 00 Y0 \n\ + psrlw $8, %%mm7 # get Y odd 00 Y7 00 Y5 00 Y3 00 Y1 \n\ + psllw $3, %%mm6 # Promote precision \n\ + psllw $3, %%mm7 # Promote precision \n\ +-pmulhw mmx_Y_coeff"G", %%mm6 # Mul 4 Y even 00 y6 00 y4 00 y2 00 y0 \n\ +-pmulhw mmx_Y_coeff"G", %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\ ++pmulhw %7, %%mm6 # Mul 4 Y even 00 y6 00 y4 00 y2 00 y0 \n\ ++pmulhw %7, %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\ + " + + /* +@@ -168,14 +166,14 @@ punpcklbw %%mm5, %%mm2 # + + #define MMX_YUV_GRAY " \n\ + # convert the luma part \n\ +-psubusb mmx_10w"G", %%mm6 \n\ ++psubusb %5, %%mm6 \n\ + movq %%mm6, %%mm7 \n\ +-pand mmx_00ffw"G", %%mm6 \n\ ++pand %6, %%mm6 \n\ + psrlw $8, %%mm7 \n\ + psllw $3, %%mm6 \n\ + psllw $3, %%mm7 \n\ +-pmulhw mmx_Y_coeff"G", %%mm6 \n\ +-pmulhw mmx_Y_coeff"G", %%mm7 \n\ ++pmulhw %7, %%mm6 \n\ ++pmulhw %7, %%mm7 \n\ + packuswb %%mm6, %%mm6 \n\ + packuswb %%mm7, %%mm7 \n\ + punpcklbw %%mm7, %%mm6 \n\ +@@ -183,8 +181,8 @@ punpcklbw %%mm7, %%mm6 + + #define MMX_UNPACK_16_GRAY " \n\ + movq %%mm6, %%mm5 \n\ +-pand mmx_mask_f8"G", %%mm6 \n\ +-pand mmx_mask_fc"G", %%mm5 \n\ ++pand %12, %%mm6 \n\ ++pand %13, %%mm5 \n\ + movq %%mm6, %%mm7 \n\ + psrlw $3, %%mm7 \n\ + pxor %%mm3, %%mm3 \n\ +@@ -213,10 +211,10 @@ movq %%mm2, 8(%3) + + #define MMX_UNPACK_15 " \n\ + # mask unneeded bits off \n\ +-pand mmx_mask_f8"G", %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ ++pand %12, %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ + psrlw $3,%%mm0 # ______b7 b6b5b4b3 ______b7 b6b5b4b3 \n\ +-pand mmx_mask_f8"G", %%mm2 # g7g6g5g4 g3______ g7g6g5g4 g3______ \n\ +-pand mmx_mask_f8"G", %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ ++pand %12, %%mm2 # g7g6g5g4 g3______ g7g6g5g4 g3______ \n\ ++pand %12, %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ + psrlw $1,%%mm1 # __r7r6r5 r4r3____ __r7r6r5 r4r3____ \n\ + pxor %%mm4, %%mm4 # zero mm4 \n\ + movq %%mm0, %%mm5 # Copy B7-B0 \n\ +@@ -249,9 +247,9 @@ movq %%mm5, 8(%3) # store + + #define MMX_UNPACK_16 " \n\ + # mask unneeded bits off \n\ +-pand mmx_mask_f8"G", %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ +-pand mmx_mask_fc"G", %%mm2 # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____ \n\ +-pand mmx_mask_f8"G", %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ ++pand %12, %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ ++pand %13, %%mm2 # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____ \n\ ++pand %12, %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ + psrlw $3,%%mm0 # ______b7 b6b5b4b3 ______b7 b6b5b4b3 \n\ + pxor %%mm4, %%mm4 # zero mm4 \n\ + movq %%mm0, %%mm5 # Copy B7-B0 \n\ diff --git a/sources b/sources index 26da044..0966404 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -786628aaf8f30a9b812975b67c88b971 vlc-0.9.4.tar.bz2 +e5be36243e75fff5476c01cc6083d43d vlc-0.9.5.tar.bz2 diff --git a/vlc-embeddedvideo.patch b/vlc-embeddedvideo.patch new file mode 100644 index 0000000..821a9a6 --- /dev/null +++ b/vlc-embeddedvideo.patch @@ -0,0 +1,22 @@ +Re-enable the embedded video; Patch ported from this commit: + +commit 9c26b8e2a04468aa4b4a158f072d760a991932db +Author: Rémi Denis-Courmont +Date: Thu Oct 9 23:06:21 2008 +0300 + + Enable embedded video with Qt >= 4.3 - hopefully fixes #2136 + +Index: vlc-0.9.4/modules/gui/qt4/qt4.cpp +=================================================================== +--- vlc-0.9.4.orig/modules/gui/qt4/qt4.cpp ++++ vlc-0.9.4/modules/gui/qt4/qt4.cpp +@@ -213,7 +213,7 @@ vlc_module_begin(); + + set_callbacks( OpenDialogs, Close ); + +-#ifdef WIN32 ++#if !defined (Q_WS_X11) || HAS_QT43 + add_submodule(); + set_capability( "vout window", 50 ); + set_callbacks( WindowOpen, WindowClose ); + diff --git a/vlc.spec b/vlc.spec index e75eda3..8216df4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,6 @@ %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 -%define with_dirac 0 Summary: Multi-platform MPEG, DVD, and DivX player @@ -18,7 +17,7 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.4 +Version: 0.9.5 %define _version %{version} %define release_tag 1 %endif @@ -36,7 +35,9 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-trunk-default_font.patch Patch1: vlc-0.9.2-pulse_default.patch -Patch2: vlc-0.9.3-libv4l2.patch +Patch2: vlc-embeddedvideo.patch +Patch3: 300_all_pic.patch +Patch4: 310_all_mmx_pic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -51,11 +52,9 @@ BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: dbus-devel -%if %with_dirac -BuildRequires: dirac-devel >= 0.6.0 -%endif +%{?_with_dirac: BuildRequires: dirac-devel >= 1.0.0} %if %with_directfb -BuildRequires: directfb-devel +BuildRequires: directfb-devel >= 1.2.6 %endif BuildRequires: faac-devel BuildRequires: faad2-devel @@ -78,6 +77,7 @@ BuildRequires: libdvbpsi-devel BuildRequires: libdvdnav-devel BuildRequires: libebml-devel BuildRequires: libid3tag-devel +%{?_with_kate: BuildRequires: libkate-devel} BuildRequires: libmad-devel BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel @@ -91,7 +91,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiff-devel BuildRequires: libupnp-devel -%if 0%{?fedora} > 8 +%if 0%{?fedora} > 9 BuildRequires: libv4l-devel %endif BuildRequires: libvorbis-devel @@ -112,10 +112,9 @@ BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel BuildRequires: openslp-devel +BuildRequires: preload BuildRequires: qt4-devel BuildRequires: schroedinger-devel -#Workaround for ^^ -BuildRequires: liboil-devel BuildRequires: SDL_image-devel BuildRequires: speex-devel >= 1.1.5 %ifarch %{ix86} x86_64 @@ -128,6 +127,7 @@ BuildRequires: x264-devel >= 0-0.8.20061028 BuildRequires: xosd-devel BuildRequires: xvidcore-devel BuildRequires: zlib-devel +BuildRequires: zvbi-devel # X-libs BuildRequires: libXt-devel @@ -194,6 +194,11 @@ mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network. +Non-default rpmbuild options: +--with dirac: Enable dirac codec support +--with kate: Enable kate codec support +--with lua: Enable lua support + %description devel This package contains development files for VLC Media Player. @@ -223,12 +228,20 @@ IPv4 or IPv6 on a high-bandwidth network. %endif %package core -Summary: VLC Media Player without Xorg +Summary: VLC Media Player core Group: Applications/Multimedia -Provides: vlc-nox = %{version}-%{release} %description core -VLC Media Player without X.org for server +VLC Media Player core components + +%package nox +Summary: VLC Media Player without Xorg +Group: Applications/Multimedia +Requires: vlc-core = %{version}-%{release} + +%description nox +VLC Media Player with framebuffer support for X-less server. + %if %with_dc1394 %package plugins-dc1394 @@ -248,12 +261,14 @@ VLC plugins for libdc1394 %endif %patch0 -p1 -b .default_font %patch1 -p1 -b .pulse_default -%if 0%{?fedora} > 8 -%patch2 -p1 -b .libv4l2 -touch -r configure.ac.libv4l2 configure.ac -touch -r configure.libv4l2 configure -%endif +%patch2 -p1 -b .embedded +#http://trac.videolan.org/vlc/ticket/1383 +%patch3 -p1 -b .dmo_pic +sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in +%patch4 -p1 -b .mmx_pic +chmod -x modules/gui/qt4/qt4* +#./bootstrap %build @@ -272,12 +287,11 @@ popd --disable-dependency-tracking \ --disable-rpath \ --enable-release \ - --with-PIC \ + --with-tuning=no \ --enable-switcher \ --enable-shout \ %{?_with_lua:--enable-lua --enable-lua} \ --enable-live555 \ - --enable-musicbrainz \ %if %with_internal_live555 --with-live555-tree=live \ %endif @@ -290,7 +304,7 @@ popd --enable-pvr \ --enable-gnomevfs \ --enable-cddax \ -%if 0%{?fedora} < 9 +%if 0%{?fedora} < 8 --disable-swscale \ --enable-imgresample \ %endif @@ -303,9 +317,7 @@ popd --enable-speex \ --enable-tarkin \ --enable-theora \ -%if %with_dirac - --enable-dirac \ -%endif + %{?_with_dirac:--enable-dirac} \ --enable-svg \ --enable-snapshot \ %ifarch %{ix86} x86_64 @@ -385,6 +397,9 @@ ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf +#Clear execstak +execstack -c $RPM_BUILD_ROOT%{_bindir}/vlc + %find_lang %{name} @@ -472,6 +487,10 @@ fi || : %ifarch %{ix86} x86_64 %exclude %{_libdir}/vlc/codec/libxvmc_plugin.so %exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so +%exclude %{_libdir}/vlc/video_output/libsvgalib_plugin.so +%endif +%if %with_directfb +%exclude %{_libdir}/vlc/video_output/libdirectfb_plugin.so %endif %exclude %{_libdir}/vlc/gui/libskins2_plugin.so %exclude %{_libdir}/vlc/video_filter/libopencv_example_plugin.so @@ -484,6 +503,11 @@ fi || : %{_libdir}/vlc/ %{_mandir}/man1/vlc.1* +%files nox +%defattr(-,root,root,-) +%{_libdir}/vlc/video_output/libdirectfb_plugin.so +%{_libdir}/vlc/video_output/libsvgalib_plugin.so + %if %with_dc1394 %files plugins-dc1394 %defattr(-,root,root,-) @@ -509,6 +533,13 @@ fi || : %changelog +* Fri Oct 24 2008 kwizart < kwizart at gmail.com > - 0.9.5-1 +- Update to 0.9.5 +- Use non-default rpmbuild options for dirac kate lua +- Split core/nox (nox bundles directfb/svgalib) +- Fix Selinux denials (patches from gentoo). +- Fix spurious perms on qt4 sources. + * Wed Oct 8 2008 kwizart < kwizart at gmail.com > - 0.9.4-1 - Update to 0.9.4 From abcc9465bdcf9ba685cef21623eb2c74409f9401 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 26 Oct 2008 11:44:03 +0000 Subject: [PATCH 014/671] Fix BR --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8216df4..485c268 100644 --- a/vlc.spec +++ b/vlc.spec @@ -112,7 +112,7 @@ BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel BuildRequires: openslp-devel -BuildRequires: preload +BuildRequires: prelink BuildRequires: qt4-devel BuildRequires: schroedinger-devel BuildRequires: SDL_image-devel From 5ae137b202f9efc70c2e6d414cde22424977216b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 27 Oct 2008 11:03:20 +0000 Subject: [PATCH 015/671] - Fix ppc/ppc64 build --- vlc.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 485c268..d62da57 100644 --- a/vlc.spec +++ b/vlc.spec @@ -19,7 +19,7 @@ Version: 1.0.0 %else Version: 0.9.5 %define _version %{version} -%define release_tag 1 +%define release_tag 2 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -506,7 +506,9 @@ fi || : %files nox %defattr(-,root,root,-) %{_libdir}/vlc/video_output/libdirectfb_plugin.so +%ifarch %{ix86} x86_64 %{_libdir}/vlc/video_output/libsvgalib_plugin.so +%endif %if %with_dc1394 %files plugins-dc1394 @@ -533,6 +535,9 @@ fi || : %changelog +* Mon Oct 27 2008 kwizart < kwizart at gmail.com > - 0.9.5-2 +- Fix ppc/ppc64 build + * Fri Oct 24 2008 kwizart < kwizart at gmail.com > - 0.9.5-1 - Update to 0.9.5 - Use non-default rpmbuild options for dirac kate lua From 2a7f0e4f603f098e2bc85a08e4552699820c6c65 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Oct 2008 18:48:40 +0000 Subject: [PATCH 016/671] Rebuild for a dependency --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d62da57..d63f5f1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -19,7 +19,7 @@ Version: 1.0.0 %else Version: 0.9.5 %define _version %{version} -%define release_tag 2 +%define release_tag 3 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -535,6 +535,9 @@ fi || : %changelog +* Tue Oct 28 2008 kwizart < kwizart at gmail.com > - 0.9.5-3 +- Rebuild for dependency + * Mon Oct 27 2008 kwizart < kwizart at gmail.com > - 0.9.5-2 - Fix ppc/ppc64 build From 30711961f274dabc273ed09e633f22160aeb31c8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 29 Oct 2008 15:19:13 +0000 Subject: [PATCH 017/671] Drop versionned BR for directfb --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d63f5f1..ce2f75c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ BuildRequires: cdparanoia-devel BuildRequires: dbus-devel %{?_with_dirac: BuildRequires: dirac-devel >= 1.0.0} %if %with_directfb -BuildRequires: directfb-devel >= 1.2.6 +BuildRequires: directfb-devel %endif BuildRequires: faac-devel BuildRequires: faad2-devel From de8c48aeb5c05477f69293a09d97a74612b57a04 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 6 Nov 2008 15:37:28 +0000 Subject: [PATCH 018/671] - Update to 0.9.6 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bb427f1..5469187 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.5.tar.bz2 +vlc-0.9.6.tar.bz2 diff --git a/sources b/sources index 0966404..0395f26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5be36243e75fff5476c01cc6083d43d vlc-0.9.5.tar.bz2 +cd71276ed867029a6d077a40bccd4d05 vlc-0.9.6.tar.bz2 diff --git a/vlc.spec b/vlc.spec index ce2f75c..b4a89c0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -17,9 +17,9 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.5 +Version: 0.9.6 %define _version %{version} -%define release_tag 3 +%define release_tag 1 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -535,6 +535,9 @@ fi || : %changelog +* Thu Nov 6 2008 kwizart < kwizart at gmail.com > - 0.9.6-1 +- Update to 0.9.6 + * Tue Oct 28 2008 kwizart < kwizart at gmail.com > - 0.9.5-3 - Rebuild for dependency From ba12dcc7a69478a9ebb29fc99e60652ff1398867 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 5 Dec 2008 01:52:50 +0000 Subject: [PATCH 019/671] - Update to 0.9.8a Security update: * Fixed buffer overflow in Real demuxer (SA-0811, CVE-2008-5276) - Add pulse0071 Patch - Fix RPM Fusion bugs: https://bugzilla.rpmfusion.org/show_bug.cgi?id=201 https://bugzilla.rpmfusion.org/show_bug.cgi?id=155 --- .gitignore | 2 +- sources | 2 +- vlc-0.9.8a-embeddedvideo.patch | 12 ++++++ vlc-pulse0071.patch | 72 ++++++++++++++++++++++++++++++++++ vlc.spec | 25 +++++++++--- 5 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 vlc-0.9.8a-embeddedvideo.patch create mode 100644 vlc-pulse0071.patch diff --git a/.gitignore b/.gitignore index 5469187..7375356 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.6.tar.bz2 +vlc-0.9.8a.tar.bz2 diff --git a/sources b/sources index 0395f26..54eb6a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd71276ed867029a6d077a40bccd4d05 vlc-0.9.6.tar.bz2 +8ffa2ff763badd5de7592004d8d69a63 vlc-0.9.8a.tar.bz2 diff --git a/vlc-0.9.8a-embeddedvideo.patch b/vlc-0.9.8a-embeddedvideo.patch new file mode 100644 index 0000000..994050f --- /dev/null +++ b/vlc-0.9.8a-embeddedvideo.patch @@ -0,0 +1,12 @@ +diff -up vlc-0.9.8a/modules/gui/qt4/qt4.cpp.embedded vlc-0.9.8a/modules/gui/qt4/qt4.cpp +--- vlc-0.9.8a/modules/gui/qt4/qt4.cpp.embedded 2008-12-05 02:27:20.000000000 +0100 ++++ vlc-0.9.8a/modules/gui/qt4/qt4.cpp 2008-12-05 02:27:27.000000000 +0100 +@@ -213,7 +213,7 @@ vlc_module_begin(); + + set_callbacks( OpenDialogs, Close ); + +-#if 0 ++#if 1 + add_submodule(); + set_capability( "vout window", 50 ); + set_callbacks( WindowOpen, WindowClose ); diff --git a/vlc-pulse0071.patch b/vlc-pulse0071.patch new file mode 100644 index 0000000..5566549 --- /dev/null +++ b/vlc-pulse0071.patch @@ -0,0 +1,72 @@ +--- pulse.c 2008-09-18 22:03:35.000000000 +0100 ++++ vlc-0.9.4/modules/audio_output/pulse.c 2008-12-04 11:43:43.000000000 +0000 +@@ -123,13 +123,52 @@ + + PULSE_DEBUG( "Pulse start initialization"); + +- ss.rate = p_aout->output.output.i_rate; +- ss.channels = 2; ++ ss.channels = aout_FormatNbChannels( &p_aout->output.output ); /* Get the input stream channel count */ ++ ++ /* Setup the pulse audio stream based on the input stream count */ ++ switch(ss.channels) ++ { ++ case 8: ++ p_aout->output.output.i_physical_channels ++ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER ++ | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT ++ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT ++ | AOUT_CHAN_LFE; ++ break; ++ ++ case 6: ++ p_aout->output.output.i_physical_channels ++ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER ++ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT ++ | AOUT_CHAN_LFE; ++ break; ++ ++ case 4: ++ p_aout->output.output.i_physical_channels ++ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT ++ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; ++ break; ++ ++ case 2: ++ p_aout->output.output.i_physical_channels ++ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; ++ break; ++ ++ case 1: ++ p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER; ++ break; ++ ++ default: ++ msg_Err(p_aout,"Invalid number of channels"); ++ goto fail; ++ } ++ ++ /* Add a quick command line info message */ ++ msg_Info(p_aout, "No. of Audio Channels: %d", ss.channels); + +- ss.format = PA_SAMPLE_S16LE; +- p_aout->output.output.i_physical_channels = +- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; +- p_aout->output.output.i_format = AOUT_FMT_S16_NE; ++ ss.rate = p_aout->output.output.i_rate; ++ ss.format = PA_SAMPLE_FLOAT32NE; ++ p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2'); + + if (!pa_sample_spec_valid(&ss)) { + msg_Err(p_aout,"Invalid sample spec"); +@@ -148,8 +187,8 @@ + + p_sys->buffer_size = a.minreq; + +- pa_channel_map_init_stereo(&map); +- ++ /* Initialise the speaker map setup above */ ++ pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); + + if (!(p_sys->mainloop = pa_threaded_mainloop_new())) { + msg_Err(p_aout, "Failed to allocate main loop"); diff --git a/vlc.spec b/vlc.spec index b4a89c0..98a2305 100644 --- a/vlc.spec +++ b/vlc.spec @@ -17,7 +17,7 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.6 +Version: 0.9.8a %define _version %{version} %define release_tag 1 %endif @@ -35,9 +35,10 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-trunk-default_font.patch Patch1: vlc-0.9.2-pulse_default.patch -Patch2: vlc-embeddedvideo.patch +Patch2: vlc-0.9.8a-embeddedvideo.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-pulse0071.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -178,8 +179,11 @@ BuildRequires: libraw1394-devel Requires: vlc-core = %{version}-%{release} +%if 0%{?fedora} > 10 +Requires: dejavu-fonts-sans +%else Requires: dejavu-fonts - +%endif %package devel Summary: Development package for %{name} @@ -261,11 +265,12 @@ VLC plugins for libdc1394 %endif %patch0 -p1 -b .default_font %patch1 -p1 -b .pulse_default -%patch2 -p1 -b .embedded +#patch2 -p1 -b .embedded #http://trac.videolan.org/vlc/ticket/1383 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch5 -p1 -b .pulse0071 chmod -x modules/gui/qt4/qt4* #./bootstrap @@ -400,6 +405,8 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Clear execstak execstack -c $RPM_BUILD_ROOT%{_bindir}/vlc +#Fix unowned directories +rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc %find_lang %{name} @@ -430,7 +437,6 @@ fi || : %files %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README THANKS -%doc %{_docdir}/vlc/* %{_datadir}/applications/*%{name}.desktop %{_datadir}/icons/hicolor/*/apps/vlc.png %{_datadir}/vlc/skins2/ @@ -535,6 +541,15 @@ fi || : %changelog +* Fri Dec 5 2008 kwizart < kwizart at gmail.com > - 0.9.8a-1 +- Update to 0.9.8a +Security update: + * Fixed buffer overflow in Real demuxer (SA-0811, CVE-2008-5276) +- Add pulse0071 Patch +- Fix RPM Fusion bugs: + https://bugzilla.rpmfusion.org/show_bug.cgi?id=201 + https://bugzilla.rpmfusion.org/show_bug.cgi?id=155 + * Thu Nov 6 2008 kwizart < kwizart at gmail.com > - 0.9.6-1 - Update to 0.9.6 From b335073bf690671218f3085f821753f515eba456 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 5 Dec 2008 01:57:03 +0000 Subject: [PATCH 020/671] Re-enable Patch2 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 98a2305..4c7ce6a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -265,7 +265,7 @@ VLC plugins for libdc1394 %endif %patch0 -p1 -b .default_font %patch1 -p1 -b .pulse_default -#patch2 -p1 -b .embedded +%patch2 -p1 -b .embedded #http://trac.videolan.org/vlc/ticket/1383 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in From 309715d67d98cb820d46e52fd6693eadbc1f7ba8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 15 Jan 2009 01:52:28 +0000 Subject: [PATCH 021/671] Rebuild for libcdio and disable mozilla --- vlc.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 4c7ce6a..616655a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -5,7 +5,7 @@ %define live555_date 2008.07.25 %define vlc_git 0 %define vlc_date 20080915 -%define with_mozilla 1 +%define with_mozilla 0 %define with_dc1394 0 %define with_directfb 1 @@ -19,7 +19,7 @@ Version: 1.0.0 %else Version: 0.9.8a %define _version %{version} -%define release_tag 1 +%define release_tag 2 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -541,6 +541,10 @@ fi || : %changelog +* Thu Jan 15 2008 kwizart < kwizart at gmail.com > - 0.9.8a-2 +- Disable mozilla-vlc because of libxul 1.9.1 WIP +- Rebuild for libcdio + * Fri Dec 5 2008 kwizart < kwizart at gmail.com > - 0.9.8a-1 - Update to 0.9.8a Security update: From 7ad2d41df35d74571148752c6199e35aad5d964b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 15 Jan 2009 01:52:55 +0000 Subject: [PATCH 022/671] 2009 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 616655a..eefd0ba 100644 --- a/vlc.spec +++ b/vlc.spec @@ -541,7 +541,7 @@ fi || : %changelog -* Thu Jan 15 2008 kwizart < kwizart at gmail.com > - 0.9.8a-2 +* Thu Jan 15 2009 kwizart < kwizart at gmail.com > - 0.9.8a-2 - Disable mozilla-vlc because of libxul 1.9.1 WIP - Rebuild for libcdio From 67b25ab2b9fff14af266a00ba4f0ac3cce31fb46 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 16 Jan 2009 16:21:19 +0000 Subject: [PATCH 023/671] libxul 1.9.1 fix and postproc backport --- .gitignore | 1 + ...SDK-libxul-1.9.1-preliminary-support.patch | 77 +++++ ...h-reference-that-was-only-present-in.patch | 39 +++ sources | 1 + vlc-backport-postproc_unif.patch | 316 ++++++++++++++++++ vlc-embeddedvideo.patch | 22 -- vlc.spec | 26 +- 7 files changed, 455 insertions(+), 27 deletions(-) create mode 100644 0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch create mode 100644 0002-Fix-the-config.h-reference-that-was-only-present-in.patch create mode 100644 vlc-backport-postproc_unif.patch delete mode 100644 vlc-embeddedvideo.patch diff --git a/.gitignore b/.gitignore index 7375356..d6608a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vlc-0.9.8a.tar.bz2 +vlc-0.9.9-git2009011313.tar.bz2 diff --git a/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch new file mode 100644 index 0000000..6caf914 --- /dev/null +++ b/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch @@ -0,0 +1,77 @@ +From b7fc1a472af08965e62df22eeb740d67970c78e1 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Tue, 13 Jan 2009 18:51:01 +0100 +Subject: [PATCH] Mozilla SDK libxul 1.9.1 - preliminary support + +According to https://bugzilla.mozilla.org/show_bug.cgi?id=455458 +npupp.h has been renamed to npfunctions.h with libxul 1.9.1 +--- + configure.ac | 1 + + projects/mozilla/support/npmac.cpp | 4 ++++ + projects/mozilla/support/npunix.c | 4 ++++ + projects/mozilla/support/npwin.cpp | 4 ++++ + 4 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ec2284e..5bd1e9a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5509,6 +5509,7 @@ then + AS_IF( [test $found = 1],[ + CPPFLAGS="${CPPFLAGS_save} ${MOZILLA_CFLAGS}" + MOZILLA_REQUIRED_HEADERS=1 ++ AC_CHECK_HEADERS([npfunctions.h]) + AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) + AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0, + [#if HAVE_NPAPI_H +diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp +index ccc3945..394c4c9 100644 +--- a/projects/mozilla/support/npmac.cpp ++++ b/projects/mozilla/support/npmac.cpp +@@ -54,7 +54,11 @@ + #undef XP_UNIX + #endif + ++#ifdef HAVE_NPFUNCTIONS_H ++#include "npfunctions.h" ++#else + #include "npupp.h" ++#endif + + #ifdef __MWERKS__ + #ifndef powerc +diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c +index 26c6736..573f1f9 100644 +--- a/projects/mozilla/support/npunix.c ++++ b/projects/mozilla/support/npunix.c +@@ -43,7 +43,11 @@ + + #include + #include ++#ifdef HAVE_NPFUNCTIONS_H ++#include ++#else + #include ++#endif + + /* + * Define PLUGIN_TRACE to have the wrapper functions print +diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp +index c277f84..d9a0a9c 100644 +--- a/projects/mozilla/support/npwin.cpp ++++ b/projects/mozilla/support/npwin.cpp +@@ -42,7 +42,11 @@ + #endif + + #include "npapi.h" ++#ifdef HAVE_NPFUNCTIONS_H ++#include "npfunctions.h" ++#else + #include "npupp.h" ++#endif + + //\\// DEFINE + #define NP_EXPORT +-- +1.6.0.6 + diff --git a/0002-Fix-the-config.h-reference-that-was-only-present-in.patch b/0002-Fix-the-config.h-reference-that-was-only-present-in.patch new file mode 100644 index 0000000..f706526 --- /dev/null +++ b/0002-Fix-the-config.h-reference-that-was-only-present-in.patch @@ -0,0 +1,39 @@ +From 2554044286d3697dcf1679f6e34413b9e7988066 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Fri, 16 Jan 2009 02:56:30 +0100 +Subject: [PATCH] Fix the config.h reference that was only present in npwin.cpp + +--- + projects/mozilla/support/npmac.cpp | 2 ++ + projects/mozilla/support/npunix.c | 2 ++ + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp +index 394c4c9..d5901bf 100644 +--- a/projects/mozilla/support/npmac.cpp ++++ b/projects/mozilla/support/npmac.cpp +@@ -4,6 +4,8 @@ + // + //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + ++#include "config.h" ++ + #include + + #include +diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c +index 573f1f9..59de292 100644 +--- a/projects/mozilla/support/npunix.c ++++ b/projects/mozilla/support/npunix.c +@@ -38,6 +38,8 @@ + *---------------------------------------------------------------------- + */ + ++#include "config.h" ++ + #define XP_UNIX 1 + #define OJI 1 + +-- +1.6.0.6 + diff --git a/sources b/sources index 54eb6a8..cc555bd 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 8ffa2ff763badd5de7592004d8d69a63 vlc-0.9.8a.tar.bz2 +ec6fb4e74389d3ca6b80b6a607b02a3f vlc-0.9.9-git2009011313.tar.bz2 diff --git a/vlc-backport-postproc_unif.patch b/vlc-backport-postproc_unif.patch new file mode 100644 index 0000000..ce4f775 --- /dev/null +++ b/vlc-backport-postproc_unif.patch @@ -0,0 +1,316 @@ +diff --git a/include/vlc_vout.h b/include/vlc_vout.h +index 74e0db1..dde9495 100644 +--- a/include/vlc_vout.h ++++ b/include/vlc_vout.h +@@ -100,6 +100,9 @@ struct picture_t + bool b_progressive; /**< is it a progressive frame ? */ + unsigned int i_nb_fields; /**< # of displayed fields */ + bool b_top_field_first; /**< which field is first */ ++ uint8_t *p_q; /**< quantification table */ ++ int i_qstride; /**< quantification stride */ ++ int i_qtype; /**< quantification style */ + /**@}*/ + + /** The picture heap we are attached to */ +@@ -158,6 +161,17 @@ static inline void picture_Release( picture_t *p_picture ) + } + + /** ++ * Cleanup quantization matrix data and set to 0 ++ */ ++static inline void picture_CleanupQuant( picture_t *p_pic ) ++{ ++ free( p_pic->p_q ); ++ p_pic->p_q = NULL; ++ p_pic->i_qstride = 0; ++ p_pic->i_qtype = 0; ++} ++ ++/** + * This function will copy all picture dynamic properties. + */ + static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src ) +@@ -168,6 +182,8 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_ + p_dst->b_progressive = p_src->b_progressive; + p_dst->i_nb_fields = p_src->i_nb_fields; + p_dst->b_top_field_first = p_src->b_top_field_first; ++ ++ /* FIXME: copy ->p_q and ->p_qstride */ + } + + /** +@@ -240,6 +256,11 @@ struct picture_heap_t + #define DISPLAYED_PICTURE 5 /* been displayed but is linked */ + #define DESTROYED_PICTURE 6 /* allocated but no more used */ + ++/* Quantification type */ ++#define QTYPE_MPEG1 0 ++#define QTYPE_MPEG2 1 ++#define QTYPE_H264 2 ++ + /***************************************************************************** + * Shortcuts to access image components + *****************************************************************************/ +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 2baffa8..38d63d6 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -643,6 +643,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) + /* Send decoded frame to vout */ + if( p_sys->i_pts ) + { ++ int i; + p_pic->date = p_sys->i_pts; + + ffmpeg_NextPts( p_dec, p_block->i_rate ); +@@ -658,6 +659,24 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) + p_pic->b_progressive = !p_sys->p_ff_pic->interlaced_frame; + p_pic->b_top_field_first = p_sys->p_ff_pic->top_field_first; + ++ p_pic->i_qstride = p_sys->p_ff_pic->qstride; ++ int i_mb_h = ( p_pic->format.i_height + 15 ) / 16; ++ p_pic->p_q = malloc( p_pic->i_qstride * i_mb_h ); ++ memcpy( p_pic->p_q, p_sys->p_ff_pic->qscale_table, ++ p_pic->i_qstride * i_mb_h ); ++ switch( p_sys->p_ff_pic->qscale_type ) ++ { ++ case FF_QSCALE_TYPE_MPEG1: ++ p_pic->i_qtype = QTYPE_MPEG1; ++ break; ++ case FF_QSCALE_TYPE_MPEG2: ++ p_pic->i_qtype = QTYPE_MPEG2; ++ break; ++ case FF_QSCALE_TYPE_H264: ++ p_pic->i_qtype = QTYPE_H264; ++ break; ++ } ++ + return p_pic; + } + else +diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp +index cb1a988..3c3f2fd 100644 +--- a/modules/gui/qt4/menus.cpp ++++ b/modules/gui/qt4/menus.cpp +@@ -198,14 +198,24 @@ static int VideoAutoMenuBuilder( vlc_object_t *p_object, + + if( p_object ) + { +- vlc_object_t *p_dec_obj = ( vlc_object_t * )vlc_object_find( p_object, +- VLC_OBJECT_DECODER, +- FIND_PARENT ); +- if( p_dec_obj ) ++ /* p_object is the vout, so the decoder is our parent and the ++ * postproc filter one of the decoder's children */ ++ vlc_object_t *p_dec = (vlc_object_t *) ++ vlc_object_find( p_object, VLC_OBJECT_DECODER, ++ FIND_PARENT ); ++ if( p_dec ) + { +- vlc_object_t *p_object = p_dec_obj; +- PUSH_VAR( "ffmpeg-pp-q" ); +- vlc_object_release( p_dec_obj ); ++ vlc_object_t *p_pp = (vlc_object_t *) ++ vlc_object_find_name( p_dec, "postproc", ++ FIND_CHILD ); ++ if( p_pp ) ++ { ++ p_object = p_pp; ++ PUSH_VAR( "postproc-q" ); ++ vlc_object_release( p_pp ); ++ } ++ ++ vlc_object_release( p_dec ); + } + } + return VLC_SUCCESS; +@@ -510,7 +520,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current ) + ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) ); + #endif + ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) ); +- /* ACT_ADD( current, "ffmpeg-pp-q", qtr( "Decoder" ) ); */ ++ ACT_ADD( current, "postproc-q", qtr( "Post processing" ) ); + } + + p_input = THEMIM->getInput(); +@@ -1059,7 +1069,8 @@ void QVLCMenu::UpdateItem( intf_thread_t *p_intf, QMenu *menu, + + /* Check the type of the object variable */ + if( !strcmp( psz_var, "audio-es" ) +- || !strcmp( psz_var, "video-es" ) ) ++ || !strcmp( psz_var, "video-es" ) ++ || !strcmp( psz_var, "postproc-q" ) ) + i_type = VLC_VAR_INTEGER | VLC_VAR_HASCHOICE; + else + i_type = var_Type( p_object, psz_var ); +diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c +index a28986c..c619b7f 100644 +--- a/modules/stream_out/mosaic_bridge.c ++++ b/modules/stream_out/mosaic_bridge.c +@@ -90,6 +90,7 @@ static void ReleasePicture( picture_t *p_pic ) + } + else + { ++ free( p_pic->p_q ); + free( p_pic->p_data_orig ); + free( p_pic ); + } +diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c +index 7290b60..6dc6232 100644 +--- a/modules/stream_out/transcode.c ++++ b/modules/stream_out/transcode.c +@@ -2269,6 +2269,7 @@ static void video_del_buffer( vlc_object_t *p_this, picture_t *p_pic ) + VLC_UNUSED(p_this); + if( p_pic ) + { ++ free( p_pic->p_q ); + free( p_pic->p_data_orig ); + free( p_pic->p_sys ); + free( p_pic ); +@@ -2280,6 +2281,7 @@ static void video_del_buffer_decoder( decoder_t *p_decoder, picture_t *p_pic ) + VLC_UNUSED(p_decoder); + p_pic->i_refcount = 0; + p_pic->i_status = DESTROYED_PICTURE; ++ picture_CleanupQuant( p_pic ); + } + + static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic ) +@@ -2287,6 +2289,7 @@ static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic ) + VLC_UNUSED(p_filter); + p_pic->i_refcount = 0; + p_pic->i_status = DESTROYED_PICTURE; ++ picture_CleanupQuant( p_pic ); + } + + static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic ) +diff --git a/modules/video_filter/postproc.c b/modules/video_filter/postproc.c +index e05d773..2e1237d 100644 +--- a/modules/video_filter/postproc.c ++++ b/modules/video_filter/postproc.c +@@ -102,6 +102,8 @@ struct filter_sys_t + pp_context_t *pp_context; /* Never changes after init */ + pp_mode_t *pp_mode; /* Set to NULL if post processing is disabled */ + ++ bool b_had_matrix; /* Set to true if previous pic had a quant matrix (used to prevent spamming warning messages */ ++ + vlc_mutex_t lock; /* Lock when using or changing pp_mode */ + }; + +@@ -139,6 +141,7 @@ static int OpenPostproc( vlc_object_t *p_this ) + { + case VLC_FOURCC('I','4','4','4'): + case VLC_FOURCC('J','4','4','4'): ++ /* case VLC_FOURCC('Y','U','V','A'): FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */ + i_flags |= PP_FORMAT_444; + break; + case VLC_FOURCC('I','4','2','2'): +@@ -152,7 +155,6 @@ static int OpenPostproc( vlc_object_t *p_this ) + case VLC_FOURCC('I','Y','U','V'): + case VLC_FOURCC('J','4','2','0'): + case VLC_FOURCC('Y','V','1','2'): +- /* case VLC_FOURCC('Y','U','V','A'): FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */ + i_flags |= PP_FORMAT_420; + break; + default: +@@ -238,6 +240,7 @@ static int OpenPostproc( vlc_object_t *p_this ) + vlc_mutex_init( &p_sys->lock ); + + p_filter->pf_video_filter = PostprocPict; ++ p_sys->b_had_matrix = true; + + return VLC_SUCCESS; + } +@@ -293,13 +296,22 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic ) + i_dst_stride[i_plane] = p_outpic->p[i_plane].i_pitch; + } + ++ if( !p_pic->p_q && p_sys->b_had_matrix ) ++ { ++ msg_Warn( p_filter, "Quantification table was not set by video decoder. Postprocessing won't look good." ); ++ p_sys->b_had_matrix = false; ++ } ++ else if( p_pic->p_q ) ++ { ++ p_sys->b_had_matrix = true; ++ } ++ + pp_postprocess( src, i_src_stride, dst, i_dst_stride, + p_filter->fmt_in.video.i_width, + p_filter->fmt_in.video.i_height, +- NULL /* FIXME ? works by selecting a default table. But maybe setting our own might help improve post processing quality ... */, +- 0 /* FIXME */, ++ p_pic->p_q, p_pic->i_qstride, + p_sys->pp_mode, p_sys->pp_context, +- PP_PICT_TYPE_QP2 /* FIXME ? This should be set only for mpeg2 type codecs if I understand correctly. */ ); ++ p_pic->i_qtype == QTYPE_MPEG2 ? PP_PICT_TYPE_QP2 : 0 ); + vlc_mutex_unlock( &p_sys->lock ); + + return CopyInfoAndRelease( p_outpic, p_pic ); +diff --git a/src/input/decoder.c b/src/input/decoder.c +index 0e30948..4977ddd 100644 +--- a/src/input/decoder.c ++++ b/src/input/decoder.c +@@ -712,6 +712,7 @@ static void VoutDisplayedPicture( vout_thread_t *p_vout, picture_t *p_pic ) + else + { + p_pic->i_status = DESTROYED_PICTURE; ++ picture_CleanupQuant( p_pic ); + p_vout->i_heap_size--; + } + +diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c +index b41aad2..a616d9c 100644 +--- a/src/video_output/video_output.c ++++ b/src/video_output/video_output.c +@@ -1327,6 +1327,7 @@ static void DropPicture( vout_thread_t *p_vout, picture_t *p_picture ) + /* Destroy the picture without displaying it */ + p_picture->i_status = DESTROYED_PICTURE; + p_vout->i_heap_size--; ++ picture_CleanupQuant( p_picture ); + } + vlc_mutex_unlock( &p_vout->picture_lock ); + } +diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c +index 6c2e807..d90a3fb 100644 +--- a/src/video_output/vout_pictures.c ++++ b/src/video_output/vout_pictures.c +@@ -262,6 +262,7 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic ) + + p_pic->i_status = DESTROYED_PICTURE; + p_vout->i_heap_size--; ++ picture_CleanupQuant( p_pic ); + + vlc_mutex_unlock( &p_vout->picture_lock ); + } +@@ -294,6 +295,7 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) + { + p_pic->i_status = DESTROYED_PICTURE; + p_vout->i_heap_size--; ++ picture_CleanupQuant( p_pic ); + } + + vlc_mutex_unlock( &p_vout->picture_lock ); +@@ -683,6 +685,10 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic, + p_pic->pf_unlock = 0; + p_pic->i_refcount = 0; + ++ p_pic->p_q = NULL; ++ p_pic->i_qstride = 0; ++ p_pic->i_qtype = 0; ++ + vout_InitFormat( &p_pic->format, i_chroma, i_width, i_height, i_aspect ); + + /* Make sure the real dimensions are a multiple of 16 */ +@@ -1042,6 +1048,7 @@ void picture_Delete( picture_t *p_picture ) + { + assert( p_picture && p_picture->i_refcount == 0 ); + ++ free( p_picture->p_q ); + free( p_picture->p_data_orig ); + free( p_picture->p_sys ); + free( p_picture ); +@@ -1094,4 +1101,3 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src ) + * + *****************************************************************************/ + +- diff --git a/vlc-embeddedvideo.patch b/vlc-embeddedvideo.patch deleted file mode 100644 index 821a9a6..0000000 --- a/vlc-embeddedvideo.patch +++ /dev/null @@ -1,22 +0,0 @@ -Re-enable the embedded video; Patch ported from this commit: - -commit 9c26b8e2a04468aa4b4a158f072d760a991932db -Author: Rémi Denis-Courmont -Date: Thu Oct 9 23:06:21 2008 +0300 - - Enable embedded video with Qt >= 4.3 - hopefully fixes #2136 - -Index: vlc-0.9.4/modules/gui/qt4/qt4.cpp -=================================================================== ---- vlc-0.9.4.orig/modules/gui/qt4/qt4.cpp -+++ vlc-0.9.4/modules/gui/qt4/qt4.cpp -@@ -213,7 +213,7 @@ vlc_module_begin(); - - set_callbacks( OpenDialogs, Close ); - --#ifdef WIN32 -+#if !defined (Q_WS_X11) || HAS_QT43 - add_submodule(); - set_capability( "vout window", 50 ); - set_callbacks( WindowOpen, WindowClose ); - diff --git a/vlc.spec b/vlc.spec index eefd0ba..4995324 100644 --- a/vlc.spec +++ b/vlc.spec @@ -5,7 +5,7 @@ %define live555_date 2008.07.25 %define vlc_git 0 %define vlc_date 20080915 -%define with_mozilla 0 +%define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -19,7 +19,7 @@ Version: 1.0.0 %else Version: 0.9.8a %define _version %{version} -%define release_tag 2 +%define release_tag 3 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -39,10 +39,14 @@ Patch2: vlc-0.9.8a-embeddedvideo.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-pulse0071.patch +Patch6: 0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch +Patch7: 0002-Fix-the-config.h-reference-that-was-only-present-in.patch +Patch8: vlc-backport-postproc_unif.patch +Patch9: vlc-0.9.9-git2009011313.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils -%if 0 +%if 1 BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -271,9 +275,16 @@ VLC plugins for libdc1394 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic %patch5 -p1 -b .pulse0071 +%patch6 -p1 -b .libxul191 +%patch7 -p1 -b .config_h +%patch8 -p1 -b .postproc +%patch9 -p1 -b .vlc099 -chmod -x modules/gui/qt4/qt4* +#chmod -x modules/gui/qt4/qt4* #./bootstrap +autoreconf +libtoolize + %build @@ -287,7 +298,7 @@ pushd live popd %endif - +export MOZILLA_CFLAGS="$(pkg-config --cflags libxul) -DHAVE_NPFUNCTIONS_H" %configure \ --disable-dependency-tracking \ --disable-rpath \ @@ -541,6 +552,11 @@ fi || : %changelog +* Fri Jan 16 2009 kwizart < kwizart at gmail.com > - 0.9.8a-3 +- Add libxul 1.9.1 prelimary support +- backport postproc fixes +- Add pending 0.9-bugfix git branch + * Thu Jan 15 2009 kwizart < kwizart at gmail.com > - 0.9.8a-2 - Disable mozilla-vlc because of libxul 1.9.1 WIP - Rebuild for libcdio From 784c6198ce3c281b57861b8065be18458dda1bc5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 16 Jan 2009 16:25:37 +0000 Subject: [PATCH 024/671] Still needed in 0.9-bugfix land --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 4995324..764685e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -280,7 +280,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch8 -p1 -b .postproc %patch9 -p1 -b .vlc099 -#chmod -x modules/gui/qt4/qt4* +chmod -x modules/gui/qt4/qt4* #./bootstrap autoreconf libtoolize @@ -298,7 +298,7 @@ pushd live popd %endif -export MOZILLA_CFLAGS="$(pkg-config --cflags libxul) -DHAVE_NPFUNCTIONS_H" + %configure \ --disable-dependency-tracking \ --disable-rpath \ From dc44c7657a2a4dc8592d88ef2edc9ef427e4a828 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 16 Jan 2009 17:37:08 +0000 Subject: [PATCH 025/671] Fix for newer libtool --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 764685e..ebc837f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -282,7 +282,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in chmod -x modules/gui/qt4/qt4* #./bootstrap -autoreconf +autoreconf -f -i libtoolize From 7be92c5e845d3b793ac30d0b3d8164da166d19a1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 16 Jan 2009 17:39:40 +0000 Subject: [PATCH 026/671] Add lua support by default --- vlc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index ebc837f..fb52b43 100644 --- a/vlc.spec +++ b/vlc.spec @@ -112,7 +112,7 @@ BuildRequires: kernel-headers >= 2.6.20 BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel -%{?_with_lua:BuildRequires: lua-devel} +BuildRequires: lua-devel BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel @@ -205,7 +205,6 @@ IPv4 or IPv6 on a high-bandwidth network. Non-default rpmbuild options: --with dirac: Enable dirac codec support --with kate: Enable kate codec support ---with lua: Enable lua support %description devel @@ -306,7 +305,7 @@ popd --with-tuning=no \ --enable-switcher \ --enable-shout \ - %{?_with_lua:--enable-lua --enable-lua} \ + --enable-lua \ --enable-live555 \ %if %with_internal_live555 --with-live555-tree=live \ @@ -556,6 +555,7 @@ fi || : - Add libxul 1.9.1 prelimary support - backport postproc fixes - Add pending 0.9-bugfix git branch +- Add lua support by default * Thu Jan 15 2009 kwizart < kwizart at gmail.com > - 0.9.8a-2 - Disable mozilla-vlc because of libxul 1.9.1 WIP From d0336972287d40dd9f19f64faf3ca89c11e630fd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 13 Feb 2009 18:14:19 +0000 Subject: [PATCH 027/671] Update to 0.9.9rc Add libxul 1.9.1 support --- .gitignore | 3 +- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 215 ++++++++++++++++++++ sources | 3 +- vlc.spec | 45 ++-- 4 files changed, 241 insertions(+), 25 deletions(-) create mode 100644 0001-Mozilla-SDK-libxul-1.9.1-support.patch diff --git a/.gitignore b/.gitignore index d6608a5..6baa58a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -vlc-0.9.8a.tar.bz2 -vlc-0.9.9-git2009011313.tar.bz2 +vlc-0.9.9-rc.tar.bz2 diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch new file mode 100644 index 0000000..b31048b --- /dev/null +++ b/0001-Mozilla-SDK-libxul-1.9.1-support.patch @@ -0,0 +1,215 @@ +diff --git a/configure.ac b/configure.ac +index 96df16a..83dbb1d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5523,7 +5523,7 @@ then + #endif + ]) + if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then +- AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.]) ++ AC_MSG_ERROR([Please install the Xulrunner development tools; npapi.h and pruntime.h were not found.]) + fi + MOZILLA_REQUIRED_HEADERS= + mozilla=: +diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp +index ccc3945..1b38392 100644 +--- a/projects/mozilla/support/npmac.cpp ++++ b/projects/mozilla/support/npmac.cpp +@@ -4,6 +4,8 @@ + // + //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + ++#include "config.h" ++ + #include + + #include +@@ -54,7 +56,11 @@ + #undef XP_UNIX + #endif + ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include "npupp.h" ++#else ++#include "npfunctions.h" ++#endif + + #ifdef __MWERKS__ + #ifndef powerc +@@ -993,6 +999,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + // + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); + pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); + pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); +@@ -1004,9 +1011,26 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); + pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); + pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); ++#else ++ pluginFuncs->newp = (NewNPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); ++ pluginFuncs->destroy = (NewNPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); ++ pluginFuncs->setwindow = (NewNPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); ++ pluginFuncs->newstream = (NewNPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); ++ pluginFuncs->destroystream = (NewNPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); ++ pluginFuncs->asfile = (NewNPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); ++ pluginFuncs->writeready = (NewNPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); ++ pluginFuncs->write = (NewNPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); ++ pluginFuncs->print = (NewNPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); ++ pluginFuncs->event = (NewNPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); ++ pluginFuncs->getvalue = (NewNPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); ++#endif + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#else ++ pluginFuncs->urlnotify = (NewNPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#endif + } + #ifdef OJI + if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) +diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c +index 26c6736..933aad3 100644 +--- a/projects/mozilla/support/npunix.c ++++ b/projects/mozilla/support/npunix.c +@@ -38,12 +38,20 @@ + *---------------------------------------------------------------------- + */ + ++#include "config.h" ++ + #define XP_UNIX 1 + #define OJI 1 + + #include + #include ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include ++#define MOZJREF jref ++#else ++#include ++#define MOZJREF void* ++#endif + + /* + * Define PLUGIN_TRACE to have the wrapper functions print +@@ -198,7 +206,7 @@ JRIEnv* NPN_GetJavaEnv() + return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); + } + +-jref NPN_GetJavaPeer(NPP instance) ++MOZJREF NPN_GetJavaPeer(NPP instance) + { + return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, + instance); +@@ -529,7 +537,7 @@ Private_SetValue(NPP instance, NPPVariable variable, void *r_value) + JRIGlobalRef + Private_GetJavaClass(void) + { +- jref clazz = NPP_GetJavaClass(); ++ MOZJREF clazz = NPP_GetJavaClass(); + if (clazz) { + JRIEnv* env = NPN_GetJavaEnv(); + return JRI_NewGlobalRef(env, clazz); +@@ -685,6 +693,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) + */ + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(Private_New); + pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); + pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +@@ -697,9 +706,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) + pluginFuncs->event = NULL; + pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); + pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); ++#else ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NewNPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NewNPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NewNPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NewNPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NewNPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NewNPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NewNPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NewNPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->event = NULL; ++ pluginFuncs->getvalue = (NewNPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->setvalue = (NewNPP_SetValueProcPtr)(Private_SetValue); ++#endif + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); ++#else ++ pluginFuncs->urlnotify = (NewNPP_URLNotifyProcPtr)(Private_URLNotify); ++#endif + } + #ifdef OJI + if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) +diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp +index c277f84..8d72e76 100644 +--- a/projects/mozilla/support/npwin.cpp ++++ b/projects/mozilla/support/npwin.cpp +@@ -42,7 +42,13 @@ + #endif + + #include "npapi.h" ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include "npupp.h" ++#define MOZJREF jref ++#else ++#include "npfunctions.h" ++#define MOZJREF void* ++#endif + + //\\// DEFINE + #define NP_EXPORT +@@ -61,7 +67,7 @@ JRIGlobalRef Private_GetJavaClass(void); + JRIGlobalRef + Private_GetJavaClass(void) + { +- jref clazz = NPP_GetJavaClass(); ++ MOZJREF clazz = NPP_GetJavaClass(); + if (clazz) { + JRIEnv* env = NPN_GetJavaEnv(); + return JRI_NewGlobalRef(env, clazz); +@@ -351,7 +357,7 @@ JRIEnv* NPN_GetJavaEnv(void) + return g_pNavigatorFuncs->getJavaEnv(); + } + +-jref NPN_GetJavaPeer(NPP instance) ++MOZJREF NPN_GetJavaPeer(NPP instance) + { + return g_pNavigatorFuncs->getJavaPeer(instance); + } +diff --git a/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp +index 7adfca6..3adf09d 100644 +--- a/projects/mozilla/vlcshell.cpp ++++ b/projects/mozilla/vlcshell.cpp +@@ -36,6 +36,13 @@ + # include + #endif + ++#include "npapi.h" ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) ++#define MOZJREF jref ++#else ++#define MOZJREF void* ++#endif ++ + /* This is from mozilla java, do we really need it? */ + #if 0 + #include +@@ -294,7 +301,7 @@ NPError NPP_Initialize( void ) + return NPERR_NO_ERROR; + } + +-jref NPP_GetJavaClass( void ) ++MOZJREF NPP_GetJavaClass( void ) + { + return NULL; + } diff --git a/sources b/sources index cc555bd..10c7d44 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -8ffa2ff763badd5de7592004d8d69a63 vlc-0.9.8a.tar.bz2 -ec6fb4e74389d3ca6b80b6a607b02a3f vlc-0.9.9-git2009011313.tar.bz2 +d332a2b8075d0f70de63372221e2a487 vlc-0.9.9-rc.tar.bz2 diff --git a/vlc.spec b/vlc.spec index fb52b43..5c9eeab 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,7 +4,8 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_date 20080915 +%define vlc_rc -rc +%define vlc_date 20090210 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -17,9 +18,9 @@ Version: 1.0.0 %define _version %{version}-git %define release_tag 0.1.%{vlc_date}git %else -Version: 0.9.8a +Version: 0.9.9 %define _version %{version} -%define release_tag 3 +%define release_tag 0.1rc %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -28,7 +29,7 @@ URL: http://www.videolan.org/ %if %vlc_git Source0: http://nightlies.videolan.org/build/source/trunk-%{vlc_date}-0024/vlc-snapshot-%{vlc_date}.tar.bz2 %else -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{_version}.tar.bz2 +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{_version}%{?vlc_rc}.tar.bz2 %endif %if %with_internal_live555 Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz @@ -39,10 +40,8 @@ Patch2: vlc-0.9.8a-embeddedvideo.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-pulse0071.patch -Patch6: 0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch -Patch7: 0002-Fix-the-config.h-reference-that-was-only-present-in.patch +Patch6: 0001-Mozilla-SDK-libxul-1.9.1-support.patch Patch8: vlc-backport-postproc_unif.patch -Patch9: vlc-0.9.9-git2009011313.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -177,8 +176,8 @@ BuildRequires: libggi-devel %if %with_dc1394 BuildRequires: compat-libdc1394-devel BuildRequires: compat-libraw1394-devel -%else -BuildRequires: libraw1394-devel +#else +#BuildRequires: libraw1394-devel %endif @@ -262,11 +261,13 @@ VLC plugins for libdc1394 %endif %prep -%setup -q -n %{name}-%{_version} +%setup -q -n %{name}-%{_version}%{?vlc_rc} %if %with_internal_live555 -%setup -q -D -T -a 2 -n %{name}-%{_version} +%setup -q -D -T -a 2 -n %{name}-%{_version}%{?vlc_rc} %endif %patch0 -p1 -b .default_font +%if %vlc_git +%else %patch1 -p1 -b .pulse_default %patch2 -p1 -b .embedded #http://trac.videolan.org/vlc/ticket/1383 @@ -275,15 +276,13 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic %patch5 -p1 -b .pulse0071 %patch6 -p1 -b .libxul191 -%patch7 -p1 -b .config_h %patch8 -p1 -b .postproc -%patch9 -p1 -b .vlc099 chmod -x modules/gui/qt4/qt4* #./bootstrap autoreconf -f -i libtoolize - +%endif %build @@ -382,7 +381,6 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool make %{?_smp_mflags} - %install rm -rf $RPM_BUILD_ROOT @@ -450,12 +448,8 @@ fi || : %{_datadir}/applications/*%{name}.desktop %{_datadir}/icons/hicolor/*/apps/vlc.png %{_datadir}/vlc/skins2/ -%{_bindir}/cvlc -%{_bindir}/nvlc %{_bindir}/qvlc -%{_bindir}/rvlc %{_bindir}/svlc -%{_bindir}/vlc-wrapper %{_libdir}/vlc/gui/libqt4_plugin.so %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so %{_libdir}/vlc/access/libscreen_plugin.so @@ -483,6 +477,10 @@ fi || : %files core -f %{name}.lang %defattr(-,root,root,-) %{_bindir}/vlc +%{_bindir}/cvlc +%{_bindir}/nvlc +%{_bindir}/rvlc +%{_bindir}/vlc-wrapper %exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ %{_libdir}/*.so.* @@ -517,7 +515,7 @@ fi || : %exclude %{_libdir}/vlc/access/libdc1394_plugin.so %endif %{_libdir}/vlc/ -%{_mandir}/man1/vlc.1* +%{_mandir}/man1/vlc*.1* %files nox %defattr(-,root,root,-) @@ -551,8 +549,13 @@ fi || : %changelog +* Fri Feb 13 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.1rc +- Update to 0.9.9rc +- Move Xless binaries to the -core subpackage +- Add support for libxul 1.9.1 + * Fri Jan 16 2009 kwizart < kwizart at gmail.com > - 0.9.8a-3 -- Add libxul 1.9.1 prelimary support +- Add libxul 1.9.1 preliminary support - backport postproc fixes - Add pending 0.9-bugfix git branch - Add lua support by default From c278f7a0a42d288b61cdc4a702ca14d1ea3b98c8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 15 Feb 2009 11:47:29 +0000 Subject: [PATCH 028/671] Disable rebootstrap --- vlc.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 5c9eeab..c0ff0f8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Version: 0.9.9 %define _version %{version} %define release_tag 0.1rc %endif -Release: %{release_tag}%{?dist} +Release: %{release_tag}%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -45,7 +45,7 @@ Patch8: vlc-backport-postproc_unif.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils -%if 1 +%if 0 BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -280,8 +280,6 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in chmod -x modules/gui/qt4/qt4* #./bootstrap -autoreconf -f -i -libtoolize %endif From a51a7e8492b77a706129aa72f823d0d63fb0c52d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 16 Feb 2009 08:21:33 +0000 Subject: [PATCH 029/671] Re-tag without autoreconf --- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 13 ------------- vlc.spec | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch index b31048b..326dc7f 100644 --- a/0001-Mozilla-SDK-libxul-1.9.1-support.patch +++ b/0001-Mozilla-SDK-libxul-1.9.1-support.patch @@ -1,16 +1,3 @@ -diff --git a/configure.ac b/configure.ac -index 96df16a..83dbb1d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5523,7 +5523,7 @@ then - #endif - ]) - if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then -- AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.]) -+ AC_MSG_ERROR([Please install the Xulrunner development tools; npapi.h and pruntime.h were not found.]) - fi - MOZILLA_REQUIRED_HEADERS= - mozilla=: diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp index ccc3945..1b38392 100644 --- a/projects/mozilla/support/npmac.cpp diff --git a/vlc.spec b/vlc.spec index c0ff0f8..e928b8d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Version: 0.9.9 %define _version %{version} %define release_tag 0.1rc %endif -Release: %{release_tag}%{?dist}.1 +Release: %{release_tag}%{?dist}.2 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ From 2a07e3b74aa4a5e7eb231b9057be40837db86711 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 16 Feb 2009 10:10:21 +0000 Subject: [PATCH 030/671] Clean old broken patches --- ...SDK-libxul-1.9.1-preliminary-support.patch | 77 ------- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 202 ------------------ ...h-reference-that-was-only-present-in.patch | 39 ---- 3 files changed, 318 deletions(-) delete mode 100644 0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch delete mode 100644 0001-Mozilla-SDK-libxul-1.9.1-support.patch delete mode 100644 0002-Fix-the-config.h-reference-that-was-only-present-in.patch diff --git a/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch deleted file mode 100644 index 6caf914..0000000 --- a/0001-Mozilla-SDK-libxul-1.9.1-preliminary-support.patch +++ /dev/null @@ -1,77 +0,0 @@ -From b7fc1a472af08965e62df22eeb740d67970c78e1 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) -Date: Tue, 13 Jan 2009 18:51:01 +0100 -Subject: [PATCH] Mozilla SDK libxul 1.9.1 - preliminary support - -According to https://bugzilla.mozilla.org/show_bug.cgi?id=455458 -npupp.h has been renamed to npfunctions.h with libxul 1.9.1 ---- - configure.ac | 1 + - projects/mozilla/support/npmac.cpp | 4 ++++ - projects/mozilla/support/npunix.c | 4 ++++ - projects/mozilla/support/npwin.cpp | 4 ++++ - 4 files changed, 13 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ec2284e..5bd1e9a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5509,6 +5509,7 @@ then - AS_IF( [test $found = 1],[ - CPPFLAGS="${CPPFLAGS_save} ${MOZILLA_CFLAGS}" - MOZILLA_REQUIRED_HEADERS=1 -+ AC_CHECK_HEADERS([npfunctions.h]) - AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) - AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0, - [#if HAVE_NPAPI_H -diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp -index ccc3945..394c4c9 100644 ---- a/projects/mozilla/support/npmac.cpp -+++ b/projects/mozilla/support/npmac.cpp -@@ -54,7 +54,11 @@ - #undef XP_UNIX - #endif - -+#ifdef HAVE_NPFUNCTIONS_H -+#include "npfunctions.h" -+#else - #include "npupp.h" -+#endif - - #ifdef __MWERKS__ - #ifndef powerc -diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 26c6736..573f1f9 100644 ---- a/projects/mozilla/support/npunix.c -+++ b/projects/mozilla/support/npunix.c -@@ -43,7 +43,11 @@ - - #include - #include -+#ifdef HAVE_NPFUNCTIONS_H -+#include -+#else - #include -+#endif - - /* - * Define PLUGIN_TRACE to have the wrapper functions print -diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp -index c277f84..d9a0a9c 100644 ---- a/projects/mozilla/support/npwin.cpp -+++ b/projects/mozilla/support/npwin.cpp -@@ -42,7 +42,11 @@ - #endif - - #include "npapi.h" -+#ifdef HAVE_NPFUNCTIONS_H -+#include "npfunctions.h" -+#else - #include "npupp.h" -+#endif - - //\\// DEFINE - #define NP_EXPORT --- -1.6.0.6 - diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch deleted file mode 100644 index 326dc7f..0000000 --- a/0001-Mozilla-SDK-libxul-1.9.1-support.patch +++ /dev/null @@ -1,202 +0,0 @@ -diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp -index ccc3945..1b38392 100644 ---- a/projects/mozilla/support/npmac.cpp -+++ b/projects/mozilla/support/npmac.cpp -@@ -4,6 +4,8 @@ - // - //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -+#include "config.h" -+ - #include - - #include -@@ -54,7 +56,11 @@ - #undef XP_UNIX - #endif - -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include "npupp.h" -+#else -+#include "npfunctions.h" -+#endif - - #ifdef __MWERKS__ - #ifndef powerc -@@ -993,6 +999,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - // - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); - pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); - pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -@@ -1004,9 +1011,26 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); - pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); - pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); -+#else -+ pluginFuncs->newp = (NewNPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); -+ pluginFuncs->destroy = (NewNPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); -+ pluginFuncs->setwindow = (NewNPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -+ pluginFuncs->newstream = (NewNPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); -+ pluginFuncs->destroystream = (NewNPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); -+ pluginFuncs->asfile = (NewNPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); -+ pluginFuncs->writeready = (NewNPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); -+ pluginFuncs->write = (NewNPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); -+ pluginFuncs->print = (NewNPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); -+ pluginFuncs->event = (NewNPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); -+ pluginFuncs->getvalue = (NewNPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); -+#endif - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#else -+ pluginFuncs->urlnotify = (NewNPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#endif - } - #ifdef OJI - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) -diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 26c6736..933aad3 100644 ---- a/projects/mozilla/support/npunix.c -+++ b/projects/mozilla/support/npunix.c -@@ -38,12 +38,20 @@ - *---------------------------------------------------------------------- - */ - -+#include "config.h" -+ - #define XP_UNIX 1 - #define OJI 1 - - #include - #include -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include -+#define MOZJREF jref -+#else -+#include -+#define MOZJREF void* -+#endif - - /* - * Define PLUGIN_TRACE to have the wrapper functions print -@@ -198,7 +206,7 @@ JRIEnv* NPN_GetJavaEnv() - return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); - } - --jref NPN_GetJavaPeer(NPP instance) -+MOZJREF NPN_GetJavaPeer(NPP instance) - { - return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, - instance); -@@ -529,7 +537,7 @@ Private_SetValue(NPP instance, NPPVariable variable, void *r_value) - JRIGlobalRef - Private_GetJavaClass(void) - { -- jref clazz = NPP_GetJavaClass(); -+ MOZJREF clazz = NPP_GetJavaClass(); - if (clazz) { - JRIEnv* env = NPN_GetJavaEnv(); - return JRI_NewGlobalRef(env, clazz); -@@ -685,6 +693,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) - */ - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->newp = NewNPP_NewProc(Private_New); - pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); - pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -@@ -697,9 +706,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) - pluginFuncs->event = NULL; - pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); - pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); -+#else -+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); -+ pluginFuncs->destroy = (NewNPP_DestroyProcPtr)(Private_Destroy); -+ pluginFuncs->setwindow = (NewNPP_SetWindowProcPtr)(Private_SetWindow); -+ pluginFuncs->newstream = (NewNPP_NewStreamProcPtr)(Private_NewStream); -+ pluginFuncs->destroystream = (NewNPP_DestroyStreamProcPtr)(Private_DestroyStream); -+ pluginFuncs->asfile = (NewNPP_StreamAsFileProcPtr)(Private_StreamAsFile); -+ pluginFuncs->writeready = (NewNPP_WriteReadyProcPtr)(Private_WriteReady); -+ pluginFuncs->write = (NewNPP_WriteProcPtr)(Private_Write); -+ pluginFuncs->print = (NewNPP_PrintProcPtr)(Private_Print); -+ pluginFuncs->event = NULL; -+ pluginFuncs->getvalue = (NewNPP_GetValueProcPtr)(Private_GetValue); -+ pluginFuncs->setvalue = (NewNPP_SetValueProcPtr)(Private_SetValue); -+#endif - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); -+#else -+ pluginFuncs->urlnotify = (NewNPP_URLNotifyProcPtr)(Private_URLNotify); -+#endif - } - #ifdef OJI - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) -diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp -index c277f84..8d72e76 100644 ---- a/projects/mozilla/support/npwin.cpp -+++ b/projects/mozilla/support/npwin.cpp -@@ -42,7 +42,13 @@ - #endif - - #include "npapi.h" -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include "npupp.h" -+#define MOZJREF jref -+#else -+#include "npfunctions.h" -+#define MOZJREF void* -+#endif - - //\\// DEFINE - #define NP_EXPORT -@@ -61,7 +67,7 @@ JRIGlobalRef Private_GetJavaClass(void); - JRIGlobalRef - Private_GetJavaClass(void) - { -- jref clazz = NPP_GetJavaClass(); -+ MOZJREF clazz = NPP_GetJavaClass(); - if (clazz) { - JRIEnv* env = NPN_GetJavaEnv(); - return JRI_NewGlobalRef(env, clazz); -@@ -351,7 +357,7 @@ JRIEnv* NPN_GetJavaEnv(void) - return g_pNavigatorFuncs->getJavaEnv(); - } - --jref NPN_GetJavaPeer(NPP instance) -+MOZJREF NPN_GetJavaPeer(NPP instance) - { - return g_pNavigatorFuncs->getJavaPeer(instance); - } -diff --git a/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp -index 7adfca6..3adf09d 100644 ---- a/projects/mozilla/vlcshell.cpp -+++ b/projects/mozilla/vlcshell.cpp -@@ -36,6 +36,13 @@ - # include - #endif - -+#include "npapi.h" -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) -+#define MOZJREF jref -+#else -+#define MOZJREF void* -+#endif -+ - /* This is from mozilla java, do we really need it? */ - #if 0 - #include -@@ -294,7 +301,7 @@ NPError NPP_Initialize( void ) - return NPERR_NO_ERROR; - } - --jref NPP_GetJavaClass( void ) -+MOZJREF NPP_GetJavaClass( void ) - { - return NULL; - } diff --git a/0002-Fix-the-config.h-reference-that-was-only-present-in.patch b/0002-Fix-the-config.h-reference-that-was-only-present-in.patch deleted file mode 100644 index f706526..0000000 --- a/0002-Fix-the-config.h-reference-that-was-only-present-in.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 2554044286d3697dcf1679f6e34413b9e7988066 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) -Date: Fri, 16 Jan 2009 02:56:30 +0100 -Subject: [PATCH] Fix the config.h reference that was only present in npwin.cpp - ---- - projects/mozilla/support/npmac.cpp | 2 ++ - projects/mozilla/support/npunix.c | 2 ++ - 2 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp -index 394c4c9..d5901bf 100644 ---- a/projects/mozilla/support/npmac.cpp -+++ b/projects/mozilla/support/npmac.cpp -@@ -4,6 +4,8 @@ - // - //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -+#include "config.h" -+ - #include - - #include -diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 573f1f9..59de292 100644 ---- a/projects/mozilla/support/npunix.c -+++ b/projects/mozilla/support/npunix.c -@@ -38,6 +38,8 @@ - *---------------------------------------------------------------------- - */ - -+#include "config.h" -+ - #define XP_UNIX 1 - #define OJI 1 - --- -1.6.0.6 - From 4078c39f2457575994bb718df82adf933faf8df6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 16 Feb 2009 10:11:51 +0000 Subject: [PATCH 031/671] Add patch for xulrunner 1.9.1 support for npunix --- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 0001-Mozilla-SDK-libxul-1.9.1-support.patch diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch new file mode 100644 index 0000000..fa381ab --- /dev/null +++ b/0001-Mozilla-SDK-libxul-1.9.1-support.patch @@ -0,0 +1,52 @@ +diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c +index 26c6736..b27b20d 100644 +--- a/projects/mozilla/support/npunix.c ++++ b/projects/mozilla/support/npunix.c +@@ -43,7 +43,11 @@ + + #include + #include ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include ++#else ++#include ++#endif + + /* + * Define PLUGIN_TRACE to have the wrapper functions print +@@ -685,6 +689,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) + */ + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(Private_New); + pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); + pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +@@ -697,9 +702,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) + pluginFuncs->event = NULL; + pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); + pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); ++#else ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->event = NULL; ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); ++#endif + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); ++#else ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); ++#endif + } + #ifdef OJI + if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) From 544ff7899d59bb7b668701a1c3a71887f7a8f134 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 27 Feb 2009 08:55:04 +0000 Subject: [PATCH 032/671] Rename the font package --- vlc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index e928b8d..2af15d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,9 +20,9 @@ Version: 1.0.0 %else Version: 0.9.9 %define _version %{version} -%define release_tag 0.1rc +%define release_tag 0.3rc %endif -Release: %{release_tag}%{?dist}.2 +Release: %{release_tag}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -183,7 +183,7 @@ BuildRequires: compat-libraw1394-devel Requires: vlc-core = %{version}-%{release} %if 0%{?fedora} > 10 -Requires: dejavu-fonts-sans +Requires: dejavu-sans-fonts %else Requires: dejavu-fonts %endif @@ -547,6 +547,9 @@ fi || : %changelog +* Fri Feb 27 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.3rc +- Rename the Required font package. + * Fri Feb 13 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.1rc - Update to 0.9.9rc - Move Xless binaries to the -core subpackage From 2a32761683c1da37ebdfbe6d5ae3d309eca7b42d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 27 Feb 2009 09:01:02 +0000 Subject: [PATCH 033/671] rebuild for new font name --- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 472 +++++++++++++++++++- 1 file changed, 468 insertions(+), 4 deletions(-) diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch index fa381ab..d13f351 100644 --- a/0001-Mozilla-SDK-libxul-1.9.1-support.patch +++ b/0001-Mozilla-SDK-libxul-1.9.1-support.patch @@ -1,8 +1,229 @@ +diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp +index ccc3945..43466c0 100644 +--- a/projects/mozilla/support/npmac.cpp ++++ b/projects/mozilla/support/npmac.cpp +@@ -54,7 +54,11 @@ + #undef XP_UNIX + #endif + ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include "npupp.h" ++#else ++#include "npfunctions.h" ++#endif + + #ifdef __MWERKS__ + #ifndef powerc +@@ -130,7 +134,7 @@ static inline void* SetupFPtoTVGlue(TFPtoTVGlue* functionGlue, void* fp) + + // glue for mapping netscape TVectors to Macho function pointers + struct TTVtoFPGlue { +- uint32 glue[6]; ++ uint32_t glue[6]; + }; + + static struct { +@@ -252,7 +256,7 @@ NPError NPN_GetURL(NPP instance, const char* url, const char* window) + return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window); + } + +-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) ++NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) + { + int navMinorVers = gNetscapeFuncs.version & 0xFF; + NPError err; +@@ -269,7 +273,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin + return err; + } + +-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) ++NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file) + { + return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, url, window, len, buf, file); + } +@@ -295,7 +299,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStrea + return err; + } + +-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) ++int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) + { + int navMinorVers = gNetscapeFuncs.version & 0xFF; + NPError err; +@@ -337,7 +341,7 @@ const char* NPN_UserAgent(NPP instance) + return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance); + } + +-void* NPN_MemAlloc(uint32 size) ++void* NPN_MemAlloc(uint32_t size) + { + return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); + } +@@ -347,7 +351,7 @@ void NPN_MemFree(void* ptr) + CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); + } + +-uint32 NPN_MemFlush(uint32 size) ++uint32_t NPN_MemFlush(uint32_t size) + { + return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); + } +@@ -594,18 +598,18 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message) + + NPError Private_Initialize(void); + void Private_Shutdown(void); +-NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); ++NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); + NPError Private_Destroy(NPP instance, NPSavedData** save); + NPError Private_SetWindow(NPP instance, NPWindow* window); + NPError Private_GetValue( NPP instance, NPPVariable variable, void *value ); + NPError Private_SetValue( NPP instance, NPPVariable variable, void *value ); + NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); + NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason); +-int32 Private_WriteReady(NPP instance, NPStream* stream); +-int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); ++int32_t Private_WriteReady(NPP instance, NPStream* stream); ++int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); + void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname); + void Private_Print(NPP instance, NPPrint* platformPrint); +-int16 Private_HandleEvent(NPP instance, void* event); ++int16_t Private_HandleEvent(NPP instance, void* event); + void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); + jobject Private_GetJavaClass(void); + +@@ -633,7 +637,7 @@ void Private_Shutdown(void) + ExitCodeResource(); + } + +-NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) ++NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved) + { + EnterCodeResource(); + NPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved); +@@ -692,9 +696,9 @@ NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBoo + return err; + } + +-int32 Private_WriteReady(NPP instance, NPStream* stream) ++int32_t Private_WriteReady(NPP instance, NPStream* stream) + { +- int32 result; ++ int32_t result; + EnterCodeResource(); + PLUGINDEBUGSTR("\pWriteReady;g;"); + result = NPP_WriteReady(instance, stream); +@@ -702,9 +706,9 @@ int32 Private_WriteReady(NPP instance, NPStream* stream) + return result; + } + +-int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer) ++int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer) + { +- int32 result; ++ int32_t result; + EnterCodeResource(); + PLUGINDEBUGSTR("\pWrite;g;"); + result = NPP_Write(instance, stream, offset, len, buffer); +@@ -730,9 +734,9 @@ NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason) + return err; + } + +-int16 Private_HandleEvent(NPP instance, void* event) ++int16_t Private_HandleEvent(NPP instance, void* event) + { +- int16 result; ++ int16_t result; + EnterCodeResource(); + PLUGINDEBUGSTR("\pHandleEvent;g;"); + result = NPP_HandleEvent(instance, event); +@@ -993,6 +997,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + // + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); + pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); + pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); +@@ -1004,9 +1009,26 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); + pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); + pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); ++#else ++ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); ++ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); ++ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); ++ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); ++#endif + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#else ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#endif + } + #ifdef OJI + if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) +@@ -1016,7 +1038,11 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + #else + pluginFuncs->javaClass = NULL; + #endif ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + *unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); ++#else ++ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); ++#endif + + SetUpQD(); + err = Private_Initialize(); +@@ -1152,6 +1178,7 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) + + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(Private_New); + pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); + pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +@@ -1164,6 +1191,27 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) + pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); + pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); + pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); ++#else ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); ++#endif ++ if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) ++ { ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) ++ pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#else ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++#endif + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { + pluginFuncs->urlnotify = Private_URLNotify; diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 26c6736..b27b20d 100644 +index 26c6736..450d627 100644 --- a/projects/mozilla/support/npunix.c +++ b/projects/mozilla/support/npunix.c -@@ -43,7 +43,11 @@ +@@ -43,7 +43,132 @@ #include #include @@ -10,11 +231,196 @@ index 26c6736..b27b20d 100644 #include +#else +#include ++// For 1.9 compatibility ++// ------------------------------------------------ ++typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); ++#define NewNPN_GetValueProc(FUNC) \ ++ ((NPN_GetValueUPP) (FUNC)) ++#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); ++#define NewNPN_SetValueProc(FUNC) \ ++ ((NPN_SetValueUPP) (FUNC)) ++#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); ++#define NewNPN_GetURLProc(FUNC) \ ++ ((NPN_GetURLUPP) (FUNC)) ++#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); ++#define NewNPN_GetURLNotifyProc(FUNC) \ ++ ((NPN_GetURLNotifyUPP) (FUNC)) ++#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++ ++typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); ++#define NewNPN_PostURLProc(FUNC) \ ++ ((NPN_PostURLUPP) (FUNC)) ++#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ ++typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData); ++#define NewNPN_PostURLNotifyProc(FUNC) \ ++ ((NPN_PostURLNotifyUPP) (FUNC)) ++#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++ ++typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); ++#define NewNPN_RequestReadProc(FUNC) \ ++ ((NPN_RequestReadUPP) (FUNC)) ++#define CallNPN_RequestReadProc(FUNC, stream, range) \ ++ (*(FUNC))((stream), (range)) ++ ++typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); ++#define NewNPN_NewStreamProc(FUNC) \ ++ ((NPN_NewStreamUPP) (FUNC)) ++#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ ++ (*(FUNC))((npp), (type), (window), (stream)) ++ ++typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer); ++#define NewNPN_WriteProc(FUNC) \ ++ ((NPN_WriteUPP) (FUNC)) ++#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ ++ (*(FUNC))((npp), (stream), (len), (buffer)) ++ ++typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); ++#define NewNPN_DestroyStreamProc(FUNC) \ ++ ((NPN_DestroyStreamUPP) (FUNC)) ++#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ ++ (*(FUNC))((npp), (stream), (reason)) ++ ++typedef void (*NPN_StatusUPP)(NPP instance, const char* message); ++#define NewNPN_StatusProc(FUNC) \ ++ ((NPN_StatusUPP) (FUNC)) ++#define CallNPN_StatusProc(FUNC, npp, msg) \ ++ (*(FUNC))((npp), (msg)) ++ ++typedef const char* (*NPN_UserAgentUPP)(NPP instance); ++#define NewNPN_UserAgentProc(FUNC) \ ++ ((NPN_UserAgentUPP) (FUNC)) ++#define CallNPN_UserAgentProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void* (*NPN_MemAllocUPP)(uint32_t size); ++#define NewNPN_MemAllocProc(FUNC) \ ++ ((NPN_MemAllocUPP) (FUNC)) ++#define CallNPN_MemAllocProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void (*NPN_MemFreeUPP)(void* ptr); ++#define NewNPN_MemFreeProc(FUNC) \ ++ ((NPN_MemFreeUPP) (FUNC)) ++#define CallNPN_MemFreeProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size); ++#define NewNPN_MemFlushProc(FUNC) \ ++ ((NPN_MemFlushUPP) (FUNC)) ++#define CallNPN_MemFlushProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); ++#define NewNPN_ReloadPluginsProc(FUNC) \ ++ ((NPN_ReloadPluginsUPP) (FUNC)) ++#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++//NPN_GetJavaEnv NPN_GetJavaPeer ++ ++typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); ++#define NewNPN_InvalidateRectProc(FUNC) \ ++ ((NPN_InvalidateRectUPP) (FUNC)) ++#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); ++#define NewNPN_InvalidateRegionProc(FUNC) \ ++ ((NPN_InvalidateRegionUPP) (FUNC)) ++#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++typedef void (*NPN_ForceRedrawUPP)(NPP instance); ++#define NewNPN_ForceRedrawProc(FUNC) \ ++ ((NPN_ForceRedrawUPP) (FUNC)) ++#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++//NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetIntIdentifier NPN_IdentifierIsString ++//NPN_UTF8FromIdentifier NPN_IntFromIdentifier NPN_CreateObject ++ +#endif /* * Define PLUGIN_TRACE to have the wrapper functions print -@@ -685,6 +689,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) +@@ -117,14 +242,14 @@ NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notify + + NPError + NPN_PostURL(NPP instance, const char* url, const char* window, +- uint32 len, const char* buf, NPBool file) ++ uint32_t len, const char* buf, NPBool file) + { + return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, + url, window, len, buf, file); + } + + NPError +-NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, ++NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, + const char* buf, NPBool file, void* notifyData) + { + return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, +@@ -147,7 +272,7 @@ NPN_NewStream(NPP instance, NPMIMEType type, const char *window, + } + + int32 +-NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) ++NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) + { + return CallNPN_WriteProc(gNetscapeFuncs.write, instance, + stream, len, buffer); +@@ -173,7 +298,7 @@ NPN_UserAgent(NPP instance) + } + + void* +-NPN_MemAlloc(uint32 size) ++NPN_MemAlloc(uint32_t size) + { + return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); + } +@@ -183,7 +308,7 @@ void NPN_MemFree(void* ptr) + CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); + } + +-uint32 NPN_MemFlush(uint32 size) ++uint32_t NPN_MemFlush(uint32_t size) + { + return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); + } +@@ -423,8 +548,8 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message) + ***********************************************************************/ + + NPError +-Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, +- int16 argc, char* argn[], char* argv[], NPSavedData* saved) ++Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, ++ int16_t argc, char* argn[], char* argv[], NPSavedData* saved) + { + NPError ret; + PLUGINDEBUGSTR("New"); +@@ -468,7 +593,7 @@ Private_WriteReady(NPP instance, NPStream* stream) + } + + int32 +-Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, ++Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, + void* buffer) + { + unsigned int result; +@@ -685,6 +810,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) */ pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginFuncs->size = sizeof(NPPluginFuncs); @@ -22,7 +428,7 @@ index 26c6736..b27b20d 100644 pluginFuncs->newp = NewNPP_NewProc(Private_New); pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -@@ -697,9 +702,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) +@@ -697,9 +823,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) pluginFuncs->event = NULL; pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); @@ -50,3 +456,61 @@ index 26c6736..b27b20d 100644 } #ifdef OJI if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) +diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp +index c277f84..2d08805 100644 +--- a/projects/mozilla/support/npwin.cpp ++++ b/projects/mozilla/support/npwin.cpp +@@ -42,7 +42,11 @@ + #endif + + #include "npapi.h" ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include "npupp.h" ++#else ++#include "npfunctions.h" ++#endif + + //\\// DEFINE + #define NP_EXPORT +@@ -228,7 +232,7 @@ NPError NPN_GetURL(NPP instance, const char *url, const char *target) + return g_pNavigatorFuncs->geturl(instance, url, target); + } + +-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) ++NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) + { + int navMinorVers = g_pNavigatorFuncs->version & 0xFF; + NPError err; +@@ -242,7 +246,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin + } + + +-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) ++NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file) + { + return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file); + } +@@ -276,11 +280,11 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, + + /* Provides len bytes of data. + */ +-int32 NPN_Write(NPP instance, NPStream *stream, +- int32 len, void *buffer) ++int32_t NPN_Write(NPP instance, NPStream *stream, ++ int32_t len, void *buffer) + { + int navMinorVersion = g_pNavigatorFuncs->version & 0xFF; +- int32 result; ++ int32_t result; + + if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) { + result = g_pNavigatorFuncs->write(instance, stream, len, buffer); +@@ -327,7 +331,7 @@ const char* NPN_UserAgent(NPP instance) + */ + + +-void* NPN_MemAlloc(uint32 size) ++void* NPN_MemAlloc(uint32_t size) + { + return g_pNavigatorFuncs->memalloc(size); + } From 93a9a0c249dd8278706b0298851ed839d64eefa5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 6 Mar 2009 18:07:04 +0000 Subject: [PATCH 034/671] Update to -rc2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6baa58a..57a8700 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.9-rc.tar.bz2 +vlc-0.9.9-rc2.tar.bz2 diff --git a/sources b/sources index 10c7d44..8d02f28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d332a2b8075d0f70de63372221e2a487 vlc-0.9.9-rc.tar.bz2 +d9e43e626c183052a6d44954eb366f08 vlc-0.9.9-rc2.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 2af15d4..932899d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,7 +4,7 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -rc +%define vlc_rc -rc2 %define vlc_date 20090210 %define with_mozilla 1 %define with_dc1394 0 @@ -20,7 +20,7 @@ Version: 1.0.0 %else Version: 0.9.9 %define _version %{version} -%define release_tag 0.3rc +%define release_tag 0.4rc2 %endif Release: %{release_tag}%{?dist} License: GPLv2+ @@ -547,6 +547,9 @@ fi || : %changelog +* Fri Mar 6 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.4rc2 +- Update to 0.9.9-rc2 + * Fri Feb 27 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.3rc - Rename the Required font package. From 944dd593cc0035b71b02c4f55166a0a419ec2f4b Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis Date: Sun, 29 Mar 2009 14:21:20 +0000 Subject: [PATCH 035/671] * Sun Mar 29 2009 Thorsten Leemhuis - 0.9.9-0.4rc2.1 - rebuild for new F11 features --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 932899d..0977c4c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Version: 0.9.9 %define _version %{version} %define release_tag 0.4rc2 %endif -Release: %{release_tag}%{?dist} +Release: %{release_tag}%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -547,6 +547,9 @@ fi || : %changelog +* Sun Mar 29 2009 Thorsten Leemhuis - 0.9.9-0.4rc2.1 +- rebuild for new F11 features + * Fri Mar 6 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.4rc2 - Update to 0.9.9-rc2 From 58685c4adb9624de3def06120b9b2e713fbaa0a7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 3 Apr 2009 14:47:07 +0000 Subject: [PATCH 036/671] Remove old patches --- vlc-0.9.2-pulse_default.patch | 12 -- vlc-0.9.8a-embeddedvideo.patch | 12 -- vlc-backport-postproc_unif.patch | 316 ------------------------------- vlc-pulse0071.patch | 72 ------- 4 files changed, 412 deletions(-) delete mode 100644 vlc-0.9.2-pulse_default.patch delete mode 100644 vlc-0.9.8a-embeddedvideo.patch delete mode 100644 vlc-backport-postproc_unif.patch delete mode 100644 vlc-pulse0071.patch diff --git a/vlc-0.9.2-pulse_default.patch b/vlc-0.9.2-pulse_default.patch deleted file mode 100644 index f3d541f..0000000 --- a/vlc-0.9.2-pulse_default.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-0.9.2/modules/audio_output/pulse.c.pulse_default vlc-0.9.2/modules/audio_output/pulse.c ---- vlc-0.9.2/modules/audio_output/pulse.c.pulse_default 2008-09-15 11:05:23.000000000 +0200 -+++ vlc-0.9.2/modules/audio_output/pulse.c 2008-09-15 11:05:52.000000000 +0200 -@@ -95,7 +95,7 @@ static void uninit(aout_instance_t *p_ao - vlc_module_begin(); - set_shortname( "Pulse Audio" ); - set_description( N_("Pulseaudio audio output") ); -- set_capability( "audio output", 40 ); -+ set_capability( "audio output", 200 ); - set_category( CAT_AUDIO ); - set_subcategory( SUBCAT_AUDIO_AOUT ); - add_shortcut( "pulseaudio" ); diff --git a/vlc-0.9.8a-embeddedvideo.patch b/vlc-0.9.8a-embeddedvideo.patch deleted file mode 100644 index 994050f..0000000 --- a/vlc-0.9.8a-embeddedvideo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-0.9.8a/modules/gui/qt4/qt4.cpp.embedded vlc-0.9.8a/modules/gui/qt4/qt4.cpp ---- vlc-0.9.8a/modules/gui/qt4/qt4.cpp.embedded 2008-12-05 02:27:20.000000000 +0100 -+++ vlc-0.9.8a/modules/gui/qt4/qt4.cpp 2008-12-05 02:27:27.000000000 +0100 -@@ -213,7 +213,7 @@ vlc_module_begin(); - - set_callbacks( OpenDialogs, Close ); - --#if 0 -+#if 1 - add_submodule(); - set_capability( "vout window", 50 ); - set_callbacks( WindowOpen, WindowClose ); diff --git a/vlc-backport-postproc_unif.patch b/vlc-backport-postproc_unif.patch deleted file mode 100644 index ce4f775..0000000 --- a/vlc-backport-postproc_unif.patch +++ /dev/null @@ -1,316 +0,0 @@ -diff --git a/include/vlc_vout.h b/include/vlc_vout.h -index 74e0db1..dde9495 100644 ---- a/include/vlc_vout.h -+++ b/include/vlc_vout.h -@@ -100,6 +100,9 @@ struct picture_t - bool b_progressive; /**< is it a progressive frame ? */ - unsigned int i_nb_fields; /**< # of displayed fields */ - bool b_top_field_first; /**< which field is first */ -+ uint8_t *p_q; /**< quantification table */ -+ int i_qstride; /**< quantification stride */ -+ int i_qtype; /**< quantification style */ - /**@}*/ - - /** The picture heap we are attached to */ -@@ -158,6 +161,17 @@ static inline void picture_Release( picture_t *p_picture ) - } - - /** -+ * Cleanup quantization matrix data and set to 0 -+ */ -+static inline void picture_CleanupQuant( picture_t *p_pic ) -+{ -+ free( p_pic->p_q ); -+ p_pic->p_q = NULL; -+ p_pic->i_qstride = 0; -+ p_pic->i_qtype = 0; -+} -+ -+/** - * This function will copy all picture dynamic properties. - */ - static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src ) -@@ -168,6 +182,8 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_ - p_dst->b_progressive = p_src->b_progressive; - p_dst->i_nb_fields = p_src->i_nb_fields; - p_dst->b_top_field_first = p_src->b_top_field_first; -+ -+ /* FIXME: copy ->p_q and ->p_qstride */ - } - - /** -@@ -240,6 +256,11 @@ struct picture_heap_t - #define DISPLAYED_PICTURE 5 /* been displayed but is linked */ - #define DESTROYED_PICTURE 6 /* allocated but no more used */ - -+/* Quantification type */ -+#define QTYPE_MPEG1 0 -+#define QTYPE_MPEG2 1 -+#define QTYPE_H264 2 -+ - /***************************************************************************** - * Shortcuts to access image components - *****************************************************************************/ -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 2baffa8..38d63d6 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -643,6 +643,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) - /* Send decoded frame to vout */ - if( p_sys->i_pts ) - { -+ int i; - p_pic->date = p_sys->i_pts; - - ffmpeg_NextPts( p_dec, p_block->i_rate ); -@@ -658,6 +659,24 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) - p_pic->b_progressive = !p_sys->p_ff_pic->interlaced_frame; - p_pic->b_top_field_first = p_sys->p_ff_pic->top_field_first; - -+ p_pic->i_qstride = p_sys->p_ff_pic->qstride; -+ int i_mb_h = ( p_pic->format.i_height + 15 ) / 16; -+ p_pic->p_q = malloc( p_pic->i_qstride * i_mb_h ); -+ memcpy( p_pic->p_q, p_sys->p_ff_pic->qscale_table, -+ p_pic->i_qstride * i_mb_h ); -+ switch( p_sys->p_ff_pic->qscale_type ) -+ { -+ case FF_QSCALE_TYPE_MPEG1: -+ p_pic->i_qtype = QTYPE_MPEG1; -+ break; -+ case FF_QSCALE_TYPE_MPEG2: -+ p_pic->i_qtype = QTYPE_MPEG2; -+ break; -+ case FF_QSCALE_TYPE_H264: -+ p_pic->i_qtype = QTYPE_H264; -+ break; -+ } -+ - return p_pic; - } - else -diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp -index cb1a988..3c3f2fd 100644 ---- a/modules/gui/qt4/menus.cpp -+++ b/modules/gui/qt4/menus.cpp -@@ -198,14 +198,24 @@ static int VideoAutoMenuBuilder( vlc_object_t *p_object, - - if( p_object ) - { -- vlc_object_t *p_dec_obj = ( vlc_object_t * )vlc_object_find( p_object, -- VLC_OBJECT_DECODER, -- FIND_PARENT ); -- if( p_dec_obj ) -+ /* p_object is the vout, so the decoder is our parent and the -+ * postproc filter one of the decoder's children */ -+ vlc_object_t *p_dec = (vlc_object_t *) -+ vlc_object_find( p_object, VLC_OBJECT_DECODER, -+ FIND_PARENT ); -+ if( p_dec ) - { -- vlc_object_t *p_object = p_dec_obj; -- PUSH_VAR( "ffmpeg-pp-q" ); -- vlc_object_release( p_dec_obj ); -+ vlc_object_t *p_pp = (vlc_object_t *) -+ vlc_object_find_name( p_dec, "postproc", -+ FIND_CHILD ); -+ if( p_pp ) -+ { -+ p_object = p_pp; -+ PUSH_VAR( "postproc-q" ); -+ vlc_object_release( p_pp ); -+ } -+ -+ vlc_object_release( p_dec ); - } - } - return VLC_SUCCESS; -@@ -510,7 +520,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current ) - ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) ); - #endif - ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) ); -- /* ACT_ADD( current, "ffmpeg-pp-q", qtr( "Decoder" ) ); */ -+ ACT_ADD( current, "postproc-q", qtr( "Post processing" ) ); - } - - p_input = THEMIM->getInput(); -@@ -1059,7 +1069,8 @@ void QVLCMenu::UpdateItem( intf_thread_t *p_intf, QMenu *menu, - - /* Check the type of the object variable */ - if( !strcmp( psz_var, "audio-es" ) -- || !strcmp( psz_var, "video-es" ) ) -+ || !strcmp( psz_var, "video-es" ) -+ || !strcmp( psz_var, "postproc-q" ) ) - i_type = VLC_VAR_INTEGER | VLC_VAR_HASCHOICE; - else - i_type = var_Type( p_object, psz_var ); -diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c -index a28986c..c619b7f 100644 ---- a/modules/stream_out/mosaic_bridge.c -+++ b/modules/stream_out/mosaic_bridge.c -@@ -90,6 +90,7 @@ static void ReleasePicture( picture_t *p_pic ) - } - else - { -+ free( p_pic->p_q ); - free( p_pic->p_data_orig ); - free( p_pic ); - } -diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c -index 7290b60..6dc6232 100644 ---- a/modules/stream_out/transcode.c -+++ b/modules/stream_out/transcode.c -@@ -2269,6 +2269,7 @@ static void video_del_buffer( vlc_object_t *p_this, picture_t *p_pic ) - VLC_UNUSED(p_this); - if( p_pic ) - { -+ free( p_pic->p_q ); - free( p_pic->p_data_orig ); - free( p_pic->p_sys ); - free( p_pic ); -@@ -2280,6 +2281,7 @@ static void video_del_buffer_decoder( decoder_t *p_decoder, picture_t *p_pic ) - VLC_UNUSED(p_decoder); - p_pic->i_refcount = 0; - p_pic->i_status = DESTROYED_PICTURE; -+ picture_CleanupQuant( p_pic ); - } - - static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic ) -@@ -2287,6 +2289,7 @@ static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic ) - VLC_UNUSED(p_filter); - p_pic->i_refcount = 0; - p_pic->i_status = DESTROYED_PICTURE; -+ picture_CleanupQuant( p_pic ); - } - - static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic ) -diff --git a/modules/video_filter/postproc.c b/modules/video_filter/postproc.c -index e05d773..2e1237d 100644 ---- a/modules/video_filter/postproc.c -+++ b/modules/video_filter/postproc.c -@@ -102,6 +102,8 @@ struct filter_sys_t - pp_context_t *pp_context; /* Never changes after init */ - pp_mode_t *pp_mode; /* Set to NULL if post processing is disabled */ - -+ bool b_had_matrix; /* Set to true if previous pic had a quant matrix (used to prevent spamming warning messages */ -+ - vlc_mutex_t lock; /* Lock when using or changing pp_mode */ - }; - -@@ -139,6 +141,7 @@ static int OpenPostproc( vlc_object_t *p_this ) - { - case VLC_FOURCC('I','4','4','4'): - case VLC_FOURCC('J','4','4','4'): -+ /* case VLC_FOURCC('Y','U','V','A'): FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */ - i_flags |= PP_FORMAT_444; - break; - case VLC_FOURCC('I','4','2','2'): -@@ -152,7 +155,6 @@ static int OpenPostproc( vlc_object_t *p_this ) - case VLC_FOURCC('I','Y','U','V'): - case VLC_FOURCC('J','4','2','0'): - case VLC_FOURCC('Y','V','1','2'): -- /* case VLC_FOURCC('Y','U','V','A'): FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */ - i_flags |= PP_FORMAT_420; - break; - default: -@@ -238,6 +240,7 @@ static int OpenPostproc( vlc_object_t *p_this ) - vlc_mutex_init( &p_sys->lock ); - - p_filter->pf_video_filter = PostprocPict; -+ p_sys->b_had_matrix = true; - - return VLC_SUCCESS; - } -@@ -293,13 +296,22 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic ) - i_dst_stride[i_plane] = p_outpic->p[i_plane].i_pitch; - } - -+ if( !p_pic->p_q && p_sys->b_had_matrix ) -+ { -+ msg_Warn( p_filter, "Quantification table was not set by video decoder. Postprocessing won't look good." ); -+ p_sys->b_had_matrix = false; -+ } -+ else if( p_pic->p_q ) -+ { -+ p_sys->b_had_matrix = true; -+ } -+ - pp_postprocess( src, i_src_stride, dst, i_dst_stride, - p_filter->fmt_in.video.i_width, - p_filter->fmt_in.video.i_height, -- NULL /* FIXME ? works by selecting a default table. But maybe setting our own might help improve post processing quality ... */, -- 0 /* FIXME */, -+ p_pic->p_q, p_pic->i_qstride, - p_sys->pp_mode, p_sys->pp_context, -- PP_PICT_TYPE_QP2 /* FIXME ? This should be set only for mpeg2 type codecs if I understand correctly. */ ); -+ p_pic->i_qtype == QTYPE_MPEG2 ? PP_PICT_TYPE_QP2 : 0 ); - vlc_mutex_unlock( &p_sys->lock ); - - return CopyInfoAndRelease( p_outpic, p_pic ); -diff --git a/src/input/decoder.c b/src/input/decoder.c -index 0e30948..4977ddd 100644 ---- a/src/input/decoder.c -+++ b/src/input/decoder.c -@@ -712,6 +712,7 @@ static void VoutDisplayedPicture( vout_thread_t *p_vout, picture_t *p_pic ) - else - { - p_pic->i_status = DESTROYED_PICTURE; -+ picture_CleanupQuant( p_pic ); - p_vout->i_heap_size--; - } - -diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c -index b41aad2..a616d9c 100644 ---- a/src/video_output/video_output.c -+++ b/src/video_output/video_output.c -@@ -1327,6 +1327,7 @@ static void DropPicture( vout_thread_t *p_vout, picture_t *p_picture ) - /* Destroy the picture without displaying it */ - p_picture->i_status = DESTROYED_PICTURE; - p_vout->i_heap_size--; -+ picture_CleanupQuant( p_picture ); - } - vlc_mutex_unlock( &p_vout->picture_lock ); - } -diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c -index 6c2e807..d90a3fb 100644 ---- a/src/video_output/vout_pictures.c -+++ b/src/video_output/vout_pictures.c -@@ -262,6 +262,7 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic ) - - p_pic->i_status = DESTROYED_PICTURE; - p_vout->i_heap_size--; -+ picture_CleanupQuant( p_pic ); - - vlc_mutex_unlock( &p_vout->picture_lock ); - } -@@ -294,6 +295,7 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) - { - p_pic->i_status = DESTROYED_PICTURE; - p_vout->i_heap_size--; -+ picture_CleanupQuant( p_pic ); - } - - vlc_mutex_unlock( &p_vout->picture_lock ); -@@ -683,6 +685,10 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic, - p_pic->pf_unlock = 0; - p_pic->i_refcount = 0; - -+ p_pic->p_q = NULL; -+ p_pic->i_qstride = 0; -+ p_pic->i_qtype = 0; -+ - vout_InitFormat( &p_pic->format, i_chroma, i_width, i_height, i_aspect ); - - /* Make sure the real dimensions are a multiple of 16 */ -@@ -1042,6 +1048,7 @@ void picture_Delete( picture_t *p_picture ) - { - assert( p_picture && p_picture->i_refcount == 0 ); - -+ free( p_picture->p_q ); - free( p_picture->p_data_orig ); - free( p_picture->p_sys ); - free( p_picture ); -@@ -1094,4 +1101,3 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src ) - * - *****************************************************************************/ - -- diff --git a/vlc-pulse0071.patch b/vlc-pulse0071.patch deleted file mode 100644 index 5566549..0000000 --- a/vlc-pulse0071.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- pulse.c 2008-09-18 22:03:35.000000000 +0100 -+++ vlc-0.9.4/modules/audio_output/pulse.c 2008-12-04 11:43:43.000000000 +0000 -@@ -123,13 +123,52 @@ - - PULSE_DEBUG( "Pulse start initialization"); - -- ss.rate = p_aout->output.output.i_rate; -- ss.channels = 2; -+ ss.channels = aout_FormatNbChannels( &p_aout->output.output ); /* Get the input stream channel count */ -+ -+ /* Setup the pulse audio stream based on the input stream count */ -+ switch(ss.channels) -+ { -+ case 8: -+ p_aout->output.output.i_physical_channels -+ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER -+ | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT -+ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT -+ | AOUT_CHAN_LFE; -+ break; -+ -+ case 6: -+ p_aout->output.output.i_physical_channels -+ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER -+ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT -+ | AOUT_CHAN_LFE; -+ break; -+ -+ case 4: -+ p_aout->output.output.i_physical_channels -+ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT -+ | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; -+ break; -+ -+ case 2: -+ p_aout->output.output.i_physical_channels -+ = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; -+ break; -+ -+ case 1: -+ p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER; -+ break; -+ -+ default: -+ msg_Err(p_aout,"Invalid number of channels"); -+ goto fail; -+ } -+ -+ /* Add a quick command line info message */ -+ msg_Info(p_aout, "No. of Audio Channels: %d", ss.channels); - -- ss.format = PA_SAMPLE_S16LE; -- p_aout->output.output.i_physical_channels = -- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; -- p_aout->output.output.i_format = AOUT_FMT_S16_NE; -+ ss.rate = p_aout->output.output.i_rate; -+ ss.format = PA_SAMPLE_FLOAT32NE; -+ p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2'); - - if (!pa_sample_spec_valid(&ss)) { - msg_Err(p_aout,"Invalid sample spec"); -@@ -148,8 +187,8 @@ - - p_sys->buffer_size = a.minreq; - -- pa_channel_map_init_stereo(&map); -- -+ /* Initialise the speaker map setup above */ -+ pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); - - if (!(p_sys->mainloop = pa_threaded_mainloop_new())) { - msg_Err(p_aout, "Failed to allocate main loop"); From 26fbc59223dbaaf18287f7562f2649fbc52ac855 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 3 Apr 2009 14:49:36 +0000 Subject: [PATCH 037/671] Add xullrunner patch --- vlc-1.0.0-pre1-xulrunner-191_support.patch | 497 +++++++++++++++++++++ 1 file changed, 497 insertions(+) create mode 100644 vlc-1.0.0-pre1-xulrunner-191_support.patch diff --git a/vlc-1.0.0-pre1-xulrunner-191_support.patch b/vlc-1.0.0-pre1-xulrunner-191_support.patch new file mode 100644 index 0000000..b2c3385 --- /dev/null +++ b/vlc-1.0.0-pre1-xulrunner-191_support.patch @@ -0,0 +1,497 @@ +From: Pavlov Konstantin +Date: Wed, 25 Mar 2009 14:28:20 +0000 (+0000) +Subject: Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov +X-Git-Tag: 1.0.0-alt0.pre1^0 +X-Git-Url: http://git.altlinux.org/people/thresh/packages/vlc.git?p=vlc.git;a=commitdiff_plain;h=1e8df789f39d5d4c09bf48935ace087e5e5867bd;hp=94de3abc393d1c684fb9129210ecfbc5462b293e + +Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov +(legion at altlinux ru) +--- + +diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp +index e9ffdc5..a6ca2e4 100644 +--- a/projects/mozilla/support/npmac.cpp ++++ b/projects/mozilla/support/npmac.cpp +@@ -1017,20 +1017,20 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + // + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); +- pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); +- pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); +- pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); +- pluginFuncs->newstream = NewNPP_NewStreamProc(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); +- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); +- pluginFuncs->asfile = NewNPP_StreamAsFileProc(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); +- pluginFuncs->writeready = NewNPP_WriteReadyProc(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); +- pluginFuncs->write = NewNPP_WriteProc(PLUGIN_TO_HOST_GLUE(write, Private_Write)); +- pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); +- pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); +- pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); ++ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); ++ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); ++ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); ++ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { +- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); + } + #ifdef OJI + if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) +@@ -1040,7 +1040,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, + #else + pluginFuncs->javaClass = NULL; + #endif +- *unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); ++ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); + + SetUpQD(); + err = Private_Initialize(); +@@ -1176,18 +1176,18 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) + + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); +- pluginFuncs->newp = NewNPP_NewProc(Private_New); +- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); +- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); +- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); +- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); +- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); +- pluginFuncs->write = NewNPP_WriteProc(Private_Write); +- pluginFuncs->print = NewNPP_PrintProc(Private_Print); +- pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); +- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); +- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); + if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) + { + pluginFuncs->urlnotify = Private_URLNotify; +diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c +index 7cabe66..5110c5c 100644 +--- a/projects/mozilla/support/npunix.c ++++ b/projects/mozilla/support/npunix.c +@@ -103,160 +103,144 @@ NPN_Version(int* plugin_major, int* plugin_minor, + NPError + NPN_GetValue(NPP instance, NPNVariable variable, void *r_value) + { +- return CallNPN_GetValueProc(gNetscapeFuncs.getvalue, +- instance, variable, r_value); ++ return (*gNetscapeFuncs.getvalue)(instance, variable, r_value); + } + + NPError + NPN_SetValue(NPP instance, NPPVariable variable, void *value) + { +- return CallNPN_SetValueProc(gNetscapeFuncs.setvalue, +- instance, variable, value); ++ return (*gNetscapeFuncs.setvalue)(instance, variable, value); + } + + NPError + NPN_GetURL(NPP instance, const char* url, const char* window) + { +- return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window); ++ return (*gNetscapeFuncs.geturl)(instance, url, window); + } + + NPError + NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData) + { +- return CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData); ++ return (*gNetscapeFuncs.geturlnotify)(instance, url, window, notifyData); + } + + NPError + NPN_PostURL(NPP instance, const char* url, const char* window, + uint32 len, const char* buf, NPBool file) + { +- return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, +- url, window, len, buf, file); ++ return (*gNetscapeFuncs.posturl)(instance, url, window, len, buf, file); + } + + NPError + NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, + const char* buf, NPBool file, void* notifyData) + { +- return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, +- instance, url, window, len, buf, file, notifyData); ++ return (*gNetscapeFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData); + } + + NPError + NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) + { +- return CallNPN_RequestReadProc(gNetscapeFuncs.requestread, +- stream, rangeList); ++ return (*gNetscapeFuncs.requestread)(stream, rangeList); + } + + NPError + NPN_NewStream(NPP instance, NPMIMEType type, const char *window, + NPStream** stream_ptr) + { +- return CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, +- type, window, stream_ptr); ++ return (*gNetscapeFuncs.newstream)(instance, type, window, stream_ptr); + } + + int32 + NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) + { +- return CallNPN_WriteProc(gNetscapeFuncs.write, instance, +- stream, len, buffer); ++ return (*gNetscapeFuncs.write)(instance, stream, len, buffer); + } + + NPError + NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) + { +- return CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, +- instance, stream, reason); ++ return (*gNetscapeFuncs.destroystream)(instance, stream, reason); + } + + void + NPN_Status(NPP instance, const char* message) + { +- CallNPN_StatusProc(gNetscapeFuncs.status, instance, message); ++ (*gNetscapeFuncs.status)(instance, message); + } + + const char* + NPN_UserAgent(NPP instance) + { +- return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance); ++ return (*gNetscapeFuncs.uagent)(instance); + } + + void* + NPN_MemAlloc(uint32 size) + { +- return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); ++ return (*gNetscapeFuncs.memalloc)(size); + } + + void NPN_MemFree(void* ptr) + { +- CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); ++ (*gNetscapeFuncs.memfree)(ptr); + } + + uint32 NPN_MemFlush(uint32 size) + { +- return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); ++ return (*gNetscapeFuncs.memflush)(size); + } + + void NPN_ReloadPlugins(NPBool reloadPages) + { +- CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages); ++ (*gNetscapeFuncs.reloadplugins)(reloadPages); + } + + #ifdef OJI + JRIEnv* NPN_GetJavaEnv() + { +- return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); ++ return (*gNetscapeFuncs.getJavaEnv); + } + + jref NPN_GetJavaPeer(NPP instance) + { +- return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, +- instance); ++ return (*gNetscapeFuncs.getJavaPeer)(instance); + } + #endif + + void + NPN_InvalidateRect(NPP instance, NPRect *invalidRect) + { +- CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance, +- invalidRect); ++ (*gNetscapeFuncs.invalidaterect)(instance, invalidRect); + } + + void + NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) + { +- CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance, +- invalidRegion); ++ (*gNetscapeFuncs.invalidateregion)(instance, invalidRegion); + } + + void + NPN_ForceRedraw(NPP instance) + { +- CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance); ++ (*gNetscapeFuncs.forceredraw)(instance); + } + + void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled) + { +- CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate, +- instance, enabled); ++ (*gNetscapeFuncs.pushpopupsenabledstate)(instance, enabled); + } + + void NPN_PopPopupsEnabledState(NPP instance) + { +- CallNPN_PopPopupsEnabledStateProc(gNetscapeFuncs.poppopupsenabledstate, +- instance); ++ (*gNetscapeFuncs.poppopupsenabledstate)(instance); + } + + NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- return CallNPN_GetStringIdentifierProc( +- gNetscapeFuncs.getstringidentifier, name); +- } ++ return (*gNetscapeFuncs.getstringidentifier)(name); + return NULL; + } + +@@ -265,19 +249,14 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers, +- names, nameCount, identifiers); +- } ++ (*gNetscapeFuncs.getstringidentifiers)(names, nameCount, identifiers); + } + + NPIdentifier NPN_GetIntIdentifier(int32_t intid) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid); +- } ++ return (*gNetscapeFuncs.getintidentifier)(intid); + return NULL; + } + +@@ -285,11 +264,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- return CallNPN_IdentifierIsStringProc( +- gNetscapeFuncs.identifierisstring, +- identifier); +- } ++ return (*gNetscapeFuncs.identifierisstring)(identifier); + return false; + } + +@@ -297,11 +272,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- return CallNPN_UTF8FromIdentifierProc( +- gNetscapeFuncs.utf8fromidentifier, +- identifier); +- } ++ return (*gNetscapeFuncs.utf8fromidentifier)(identifier); + return NULL; + } + +@@ -309,11 +280,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- { +- return CallNPN_IntFromIdentifierProc( +- gNetscapeFuncs.intfromidentifier, +- identifier); +- } ++ return (*gNetscapeFuncs.intfromidentifier)(identifier); + return 0; + } + +@@ -321,7 +288,7 @@ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass); ++ return (*gNetscapeFuncs.createobject)(npp, aClass); + return NULL; + } + +@@ -329,7 +296,7 @@ NPObject *NPN_RetainObject(NPObject *obj) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj); ++ return (*gNetscapeFuncs.retainobject)(obj); + return NULL; + } + +@@ -337,7 +304,7 @@ void NPN_ReleaseObject(NPObject *obj) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- CallNPN_ReleaseObjectProc(gNetscapeFuncs.releaseobject, obj); ++ (*gNetscapeFuncs.releaseobject)(obj); + } + + bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, +@@ -345,8 +312,7 @@ bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName, +- args, argCount, result); ++ return (*gNetscapeFuncs.invoke)(npp, obj, methodName, args, argCount, result); + return false; + } + +@@ -355,8 +321,7 @@ bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj, +- args, argCount, result); ++ return (*gNetscapeFuncs.invokeDefault)(npp, obj, args, argCount, result); + return false; + } + +@@ -365,8 +330,7 @@ bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj, +- script, result); ++ return (*gNetscapeFuncs.evaluate)(npp, obj, script, result); + return false; + } + +@@ -375,8 +339,7 @@ bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj, +- propertyName, result); ++ return (*gNetscapeFuncs.getproperty)(npp, obj, propertyName, result); + return false; + } + +@@ -385,8 +348,7 @@ bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj, +- propertyName, value); ++ return (*gNetscapeFuncs.setproperty)(npp, obj, propertyName, value); + return false; + } + +@@ -394,8 +356,7 @@ bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj, +- propertyName); ++ return (*gNetscapeFuncs.removeproperty)(npp, obj, propertyName); + return false; + } + +@@ -403,8 +364,7 @@ bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj, +- propertyName); ++ return (*gNetscapeFuncs.hasproperty)(npp, obj, propertyName); + return false; + } + +@@ -412,8 +372,7 @@ bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp, +- obj, methodName); ++ return (*gNetscapeFuncs.hasmethod)(npp, obj, methodName); + return false; + } + +@@ -421,14 +380,14 @@ void NPN_ReleaseVariantValue(NPVariant *variant) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- CallNPN_ReleaseVariantValueProc(gNetscapeFuncs.releasevariantvalue, variant); ++ (*gNetscapeFuncs.releasevariantvalue)(variant); + } + + void NPN_SetException(NPObject* obj, const NPUTF8 *message) + { + int minor = gNetscapeFuncs.version & 0xFF; + if( minor >= 14 ) +- CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message); ++ (*gNetscapeFuncs.setexception)(obj, message); + } + + /*********************************************************************** +@@ -767,22 +726,22 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) + */ + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); +- pluginFuncs->newp = NewNPP_NewProc(Private_New); +- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); +- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); +- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); +- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); +- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); +- pluginFuncs->write = NewNPP_WriteProc(Private_Write); +- pluginFuncs->print = NewNPP_PrintProc(Private_Print); +- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); +- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); + + pluginFuncs->event = NULL; + if( minor >= NPVERS_HAS_NOTIFICATION ) + { +- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); + } + #ifdef OJI + if( minor >= NPVERS_HAS_LIVECONNECT ) + From 9f2223a8d1e925f4341f3a47670f6ae0e8b84eb6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 3 Apr 2009 15:32:30 +0000 Subject: [PATCH 038/671] Update to 1.0.0-pre1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 123 ++++++++++++++++++++--------------------------------- 3 files changed, 47 insertions(+), 80 deletions(-) diff --git a/.gitignore b/.gitignore index 57a8700..f4f9888 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-0.9.9-rc2.tar.bz2 +vlc-1.0.0-pre1.tar.bz2 diff --git a/sources b/sources index 8d02f28..c53f4a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d9e43e626c183052a6d44954eb366f08 vlc-0.9.9-rc2.tar.bz2 +3397813329f2b962f28ddb1cc6e0242f vlc-1.0.0-pre1.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 0977c4c..834c714 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,8 +4,7 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -rc2 -%define vlc_date 20090210 +%define vlc_rc -pre1 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,38 +12,24 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -%if %vlc_git Version: 1.0.0 -%define _version %{version}-git -%define release_tag 0.1.%{vlc_date}git -%else -Version: 0.9.9 -%define _version %{version} -%define release_tag 0.4rc2 -%endif -Release: %{release_tag}%{?dist}.1 +Release: 0.1pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ -%if %vlc_git -Source0: http://nightlies.videolan.org/build/source/trunk-%{vlc_date}-0024/vlc-snapshot-%{vlc_date}.tar.bz2 -%else -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{_version}%{?vlc_rc}.tar.bz2 -%endif +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 %if %with_internal_live555 Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-trunk-default_font.patch -Patch1: vlc-0.9.2-pulse_default.patch -Patch2: vlc-0.9.8a-embeddedvideo.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-pulse0071.patch -Patch6: 0001-Mozilla-SDK-libxul-1.9.1-support.patch -Patch8: vlc-backport-postproc_unif.patch +Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils +BuildRequires: gettext + %if 0 BuildRequires: gettext-devel BuildRequires: libtool @@ -87,22 +72,30 @@ BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel +BuildRequires: libmtp-devel BuildRequires: libnotify-devel -BuildRequires: librsvg2-devel >= 2.5.0 +BuildRequires: libproxy-devel +BuildRequires: librsvg2-devel >= 2.9.0 BuildRequires: libsysfs-devel BuildRequires: libshout-devel +BuildRequires: libsmbclient-devel BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiff-devel BuildRequires: libupnp-devel -%if 0%{?fedora} > 9 +%if 0%{?fedora} > 8 BuildRequires: libv4l-devel %endif BuildRequires: libvorbis-devel +%if 0%{?fedora} < 11 +BuildRequires: libxml2 < 2.7.3 +BuildRequires: libxml2-devel < 2.7.3 +BuildRequires: libxml2-static < 2.7.3 +%else BuildRequires: libxml2-devel +%endif BuildRequires: lirc-devel %if %with_internal_live555 -BuildConflicts: live-devel BuildConflicts: live555-devel %else BuildRequires: live555-devel >= 0-0.19.2008.04.03 @@ -112,11 +105,14 @@ BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel BuildRequires: lua-devel +BuildRequires: minizip-devel BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel BuildRequires: openslp-devel BuildRequires: prelink +BuildRequires: pulseaudio-libs-devel >= 0.9.8 +BuildRequires: portaudio-devel BuildRequires: qt4-devel BuildRequires: schroedinger-devel BuildRequires: SDL_image-devel @@ -143,18 +139,9 @@ BuildRequires: libXpm-devel %ifarch %{ix86} x86_64 BuildRequires: libXvMC-devel %endif +BuildRequires: xcb-util-devel BuildRequires: xorg-x11-proto-devel -%if 0%{?fedora} > 6 -BuildRequires: libsmbclient-devel -%else -BuildRequires: samba-common -%endif - -%if 0%{?fedora} > 7 -BuildRequires: pulseaudio-libs-devel >= 0.9.8 -BuildRequires: portaudio-devel -%endif %if %with_mozilla BuildRequires: gecko-devel @@ -164,20 +151,9 @@ Obsoletes: mozilla-vlc < %{version}-%{release} %endif -# Now obsoleted as it will be built externally -Obsoletes: java-vlc < 0.9.0 -Obsoletes: python-vlc < 0.9.0 - -%if 0 -BuildRequires: libgoom2-devel -BuildRequires: libggi-devel -%endif - %if %with_dc1394 BuildRequires: compat-libdc1394-devel BuildRequires: compat-libraw1394-devel -#else -#BuildRequires: libraw1394-devel %endif @@ -261,25 +237,24 @@ VLC plugins for libdc1394 %endif %prep -%setup -q -n %{name}-%{_version}%{?vlc_rc} +%setup -q -n %{name}-%{version}%{?vlc_rc} %if %with_internal_live555 -%setup -q -D -T -a 2 -n %{name}-%{_version}%{?vlc_rc} +%setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .default_font -%if %vlc_git -%else -%patch1 -p1 -b .pulse_default -%patch2 -p1 -b .embedded #http://trac.videolan.org/vlc/ticket/1383 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .pulse0071 -%patch6 -p1 -b .libxul191 -%patch8 -p1 -b .postproc +%if 0%{?fedora} >= 11 +%patch5 -p1 -b .xul191 +%endif + -chmod -x modules/gui/qt4/qt4* #./bootstrap + +%if 0%{?fedora} < 11 +export XML2_LIBS="-static -lxml2 -shared -L%{_libdir} -lz -lm" %endif @@ -301,7 +276,6 @@ popd --enable-release \ --with-tuning=no \ --enable-switcher \ - --enable-shout \ --enable-lua \ --enable-live555 \ %if %with_internal_live555 @@ -312,14 +286,9 @@ popd --enable-dv \ %endif --enable-opencv \ - --enable-v4l \ --enable-pvr \ --enable-gnomevfs \ --enable-cddax \ -%if 0%{?fedora} < 8 - --disable-swscale \ - --enable-imgresample \ -%endif --enable-faad \ --enable-twolame \ --enable-real \ @@ -334,17 +303,13 @@ popd --enable-snapshot \ %ifarch %{ix86} x86_64 --enable-svgalib \ - --enable-xvmc \ + --disable-xvmc \ %endif %if %with_directfb --enable-directfb \ %endif --enable-aa \ --enable-caca \ -%if 0%{?fedora} < 9 - --enable-esd \ - --enable-arts \ -%endif --enable-jack \ %if 0%{?fedora} > 7 --enable-portaudio \ @@ -401,7 +366,7 @@ desktop-file-install --vendor livna \ --mode 644 \ $RPM_BUILD_ROOT%{_datadir}/applications/vlc.desktop -# Remove installed fonts for skin2 - needs +# Remove installed fonts for skin2 rm -rf $RPM_BUILD_ROOT%{_datadir}/vlc/skin2/fonts/*.ttf ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSans.ttf @@ -409,7 +374,7 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf #Clear execstak -execstack -c $RPM_BUILD_ROOT%{_bindir}/vlc +#execstack -c $RPM_BUILD_ROOT%{_bindir}/vlc #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc @@ -450,7 +415,7 @@ fi || : %{_bindir}/svlc %{_libdir}/vlc/gui/libqt4_plugin.so %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so -%{_libdir}/vlc/access/libscreen_plugin.so +%{_libdir}/vlc/access/libx11_screen_plugin.so %{_libdir}/vlc/codec/libfluidsynth_plugin.so %{_libdir}/vlc/misc/libsvg_plugin.so %{_libdir}/vlc/misc/libnotify_plugin.so @@ -462,10 +427,10 @@ fi || : %{_libdir}/vlc/video_output/libxvideo_plugin.so %{_libdir}/vlc/visualization/libgalaktos_plugin.so %{_libdir}/vlc/misc/libxosd_plugin.so -%ifarch %{ix86} x86_64 -%{_libdir}/vlc/codec/libxvmc_plugin.so -%{_libdir}/vlc/video_output/libxvmc_plugin.so -%endif +#ifarch %{ix86} x86_64 +#{_libdir}/vlc/codec/libxvmc_plugin.so +#{_libdir}/vlc/video_output/libxvmc_plugin.so +#endif %{_libdir}/vlc/gui/libskins2_plugin.so %{_libdir}/vlc/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so @@ -484,7 +449,7 @@ fi || : %{_libdir}/*.so.* %exclude %{_libdir}/vlc/gui/libqt4_plugin.so %exclude %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so -%exclude %{_libdir}/vlc/access/libscreen_plugin.so +%exclude %{_libdir}/vlc/access/libx11_screen_plugin.so %exclude %{_libdir}/vlc/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/misc/libsvg_plugin.so %exclude %{_libdir}/vlc/misc/libnotify_plugin.so @@ -497,8 +462,8 @@ fi || : %exclude %{_libdir}/vlc/visualization/libgalaktos_plugin.so %exclude %{_libdir}/vlc/misc/libxosd_plugin.so %ifarch %{ix86} x86_64 -%exclude %{_libdir}/vlc/codec/libxvmc_plugin.so -%exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so +#exclude %{_libdir}/vlc/codec/libxvmc_plugin.so +#exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so %exclude %{_libdir}/vlc/video_output/libsvgalib_plugin.so %endif %if %with_directfb @@ -547,8 +512,10 @@ fi || : %changelog -* Sun Mar 29 2009 Thorsten Leemhuis - 0.9.9-0.4rc2.1 -- rebuild for new F11 features +* Fri Mar 27 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.1pre1 +- Update to 1.0.0-pre1 +- Add mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov +- Disable xxmc * Fri Mar 6 2009 kwizart < kwizart at gmail.com > - 0.9.9-0.4rc2 - Update to 0.9.9-rc2 From 927840b079f84dea6003f9bbe23f3f025e785812 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 10 Apr 2009 14:18:43 +0000 Subject: [PATCH 039/671] Re-enable xxmc - remove libmpeg2 internal --- vlc-1.0.0-pre1-libmpeg2_out.patch | 225 ++++++++++++++++++++++++++++++ vlc.spec | 38 ++--- 2 files changed, 246 insertions(+), 17 deletions(-) create mode 100644 vlc-1.0.0-pre1-libmpeg2_out.patch diff --git a/vlc-1.0.0-pre1-libmpeg2_out.patch b/vlc-1.0.0-pre1-libmpeg2_out.patch new file mode 100644 index 0000000..1093e63 --- /dev/null +++ b/vlc-1.0.0-pre1-libmpeg2_out.patch @@ -0,0 +1,225 @@ +diff -up vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c +--- vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out 2009-02-15 12:36:51.000000000 +0100 ++++ vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c 2009-04-09 21:39:18.000000000 +0200 +@@ -41,9 +41,9 @@ + #endif + + #include "mpeg2.h" +-#include "attributes.h" ++//#include "attributes.h" + #include "mpeg2_internal.h" +-#include "xvmc_vld.h" ++//#include "xvmc_vld.h" + + /* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */ + #define AR_SQUARE_PICTURE 1 /* square pixels */ +@@ -277,7 +277,7 @@ static picture_t *DecodeBlock( decoder_t + if ( p_sys->b_slice_i ) + { + decoder_SynchroNewPicture( p_sys->p_synchro, +- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, ++ I_CODING_TYPE, 2, 0, 0, + p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); + decoder_SynchroDecode( p_sys->p_synchro ); + decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); +@@ -396,7 +396,7 @@ static picture_t *DecodeBlock( decoder_t + decoder_SynchroNewPicture( p_sys->p_synchro, + p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, + p_sys->p_info->current_picture->nb_fields, +- 0, 0, p_sys->i_current_rate, ++ 0, 0, + p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); + + if( p_sys->b_skip ) +@@ -422,7 +422,7 @@ static picture_t *DecodeBlock( decoder_t + /* Intra-slice refresh. Simulate a blank I picture. */ + msg_Dbg( p_dec, "intra-slice refresh stream" ); + decoder_SynchroNewPicture( p_sys->p_synchro, +- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, ++ I_CODING_TYPE, 2, 0, 0, + p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); + decoder_SynchroDecode( p_sys->p_synchro ); + decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); +@@ -457,7 +457,7 @@ static picture_t *DecodeBlock( decoder_t + decoder_SynchroNewPicture( p_sys->p_synchro, + p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, + p_sys->p_info->current_picture->nb_fields, i_pts, +- 0, p_sys->i_current_rate, ++ 0, + p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); + + if ( !(p_sys->b_slice_i +@@ -486,8 +486,8 @@ static picture_t *DecodeBlock( decoder_t + return NULL; + } + +- p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id; +- p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id; ++ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id; ++ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id; + + if ((p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE) != B_CODING_TYPE) + { +@@ -495,9 +495,9 @@ static picture_t *DecodeBlock( decoder_t + // p_sys->p_mpeg2dec->ptr_forward_ref_picture != picture->backward_reference_frame) + // p_pic->forward_reference_frame->free (p_pic->forward_reference_frame); + +- p_sys->p_mpeg2dec->ptr_forward_ref_picture = +- p_sys->p_mpeg2dec->ptr_backward_ref_picture; +- p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic; ++ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = ++ // p_sys->p_mpeg2dec->ptr_backward_ref_picture; ++ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic; + } + mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); + } +@@ -595,7 +595,7 @@ static picture_t *DecodeBlock( decoder_t + if( p_sys->b_slice_i ) + { + decoder_SynchroNewPicture( p_sys->p_synchro, +- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, ++ I_CODING_TYPE, 2, 0, 0, + p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); + decoder_SynchroDecode( p_sys->p_synchro ); + decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); +@@ -644,7 +644,7 @@ static double get_aspect_ratio( decoder_ + { + /* these hardcoded values are defined on mpeg2 standard for + * aspect ratio. other values are reserved or forbidden. */ +- switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information ) ++ /*switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information ) + { + case 2: + ratio = 4.0/3.0; +@@ -656,16 +656,16 @@ static double get_aspect_ratio( decoder_ + ratio = 2.11/1.0; + break; + case 1: +- default: ++ default:*/ + ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height; +- break; +- } ++ /* break; ++ }*/ + } + else + { + /* mpeg1 constants refer to pixel aspect ratio */ + ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height; +- ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; ++ /* ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; */ + } + return ratio; + } +@@ -730,8 +730,8 @@ static picture_t *GetNewPicture( decoder + p_dec->fmt_out.video.i_height, + p_dec->fmt_out.video.i_aspect, + format, flags); +-#endif + mpeg2_xxmc_choose_coding( p_dec, &p_sys->p_mpeg2dec->decoder, p_pic, + get_aspect_ratio(p_dec), 0 ); ++#endif + return p_pic; + } +diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c +--- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out 2009-03-17 21:06:54.000000000 +0100 ++++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c 2009-04-10 01:19:01.000000000 +0200 +@@ -116,16 +116,7 @@ static void DestroyWindow ( vout_thread + static int NewPicture ( vout_thread_t *, picture_t * ); + static void FreePicture ( vout_thread_t *, picture_t * ); + +-#ifndef MODULE_NAME_IS_glx +-static IMAGE_TYPE *CreateImage ( vout_thread_t *, +- Display *, EXTRA_ARGS, int, int ); +-#endif +- + #ifdef HAVE_SYS_SHM_H +-#ifndef MODULE_NAME_IS_glx +-IMAGE_TYPE *CreateShmImage ( vout_thread_t *, +- Display *, EXTRA_ARGS_SHM, int, int ); +-#endif + static int i_shm_major = 0; + #endif + +@@ -428,7 +419,7 @@ int Activate ( vlc_object_t *p_this ) + if( checkXvMCCap( p_vout ) == VLC_EGENERIC ) + { + msg_Err( p_vout, "no XVMC capability found" ); +- Deactivate( p_vout ); ++ Deactivate( p_this ); + return VLC_EGENERIC; + } + subpicture_t sub_pic; +@@ -1076,7 +1067,7 @@ static void DisplayVideo( vout_thread_t + if( p_vout->p_sys->i_shm_opcode ) + { + /* Display rendered image using shared memory extension */ +-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) ++#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) + XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport, + p_vout->p_sys->p_win->video_window, + p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image, +@@ -1086,7 +1077,7 @@ static void DisplayVideo( vout_thread_t + p_vout->fmt_out.i_visible_height, + 0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height, + False /* Don't put True here or you'll waste your CPU */ ); +-# else ++#else + XShmPutImage( p_vout->p_sys->p_display, + p_vout->p_sys->p_win->video_window, + p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image, +@@ -1096,7 +1087,7 @@ static void DisplayVideo( vout_thread_t + p_vout->fmt_out.i_visible_width, + p_vout->fmt_out.i_visible_height, + False /* Don't put True here ! */ ); +-# endif ++#endif + } + else + #endif /* HAVE_SYS_SHM_H */ +@@ -1922,13 +1913,13 @@ static int NewPicture( vout_thread_t *p_ + /* Create image using XShm extension */ + p_pic->p_sys->p_image = + CreateShmImage( p_vout, p_vout->p_sys->p_display, +-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) ++#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) + p_vout->p_sys->i_xvport, + VLC2X11_FOURCC(p_vout->output.i_chroma), +-# else ++#else + p_vout->p_sys->p_visual, + p_vout->p_sys->i_screen_depth, +-# endif ++#endif + &p_pic->p_sys->shminfo, + p_vout->output.i_width, p_vout->output.i_height ); + } +diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h +--- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out 2009-04-10 00:23:24.000000000 +0200 ++++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h 2009-04-10 01:19:07.000000000 +0200 +@@ -395,4 +395,12 @@ typedef struct mwmhints_t + # define MAX_DIRECTBUFFERS 2 + #endif + ++#ifndef MODULE_NAME_IS_glx ++static IMAGE_TYPE *CreateImage ( vout_thread_t *, ++ Display *, EXTRA_ARGS, int, int ); ++#ifdef HAVE_SYS_SHM_H ++IMAGE_TYPE *CreateShmImage ( vout_thread_t *, ++ Display *, EXTRA_ARGS_SHM, int, int ); ++#endif ++#endif + +diff -up vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c +--- vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out 2009-02-14 13:39:08.000000000 +0100 ++++ vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c 2009-04-09 21:39:18.000000000 +0200 +@@ -1304,7 +1304,7 @@ void xxmc_do_update_frame( picture_t *pi + /* Wait a little till frame is being displayed */ + while( status & XVMC_DISPLAYING ) + { +- msleep(1); ++ /* msleep(1); */ + + XvMCGetSurfaceStatus( p_vout->p_sys->p_display, + picture->p_sys->xvmc_surf, diff --git a/vlc.spec b/vlc.spec index 834c714..0406f0d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.1pre1%{?dist} +Release: 0.2pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -25,6 +25,7 @@ Patch0: vlc-trunk-default_font.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch +Patch6: vlc-1.0.0-pre1-libmpeg2_out.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -87,13 +88,7 @@ BuildRequires: libupnp-devel BuildRequires: libv4l-devel %endif BuildRequires: libvorbis-devel -%if 0%{?fedora} < 11 -BuildRequires: libxml2 < 2.7.3 -BuildRequires: libxml2-devel < 2.7.3 -BuildRequires: libxml2-static < 2.7.3 -%else BuildRequires: libxml2-devel -%endif BuildRequires: lirc-devel %if %with_internal_live555 BuildConflicts: live555-devel @@ -249,13 +244,18 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %if 0%{?fedora} >= 11 %patch5 -p1 -b .xul191 %endif +%patch6 -p1 -b .libmpeg2_out #./bootstrap -%if 0%{?fedora} < 11 -export XML2_LIBS="-static -lxml2 -shared -L%{_libdir} -lz -lm" -%endif +#Rip out libmpeg2 +rm ./modules/codec/xvmc/{alloc.c,attributes.h,cpu_accel.c,cpu_state.c,decode.c,header.c,motion_comp.c,motion_comp_mmx.c,mpeg2.h,mpeg2_internal.h,slice.c,slice_xvmc_vld.c,vlc.h,xvmc_vld.h} +touch ./modules/codec/xvmc/{alloc.c,attributes.h,cpu_accel.c,cpu_state.c,decode.c,header.c,motion_comp.c,motion_comp_mmx.c,mpeg2.h,mpeg2_internal.h,slice.c,slice_xvmc_vld.c,vlc.h,xvmc_vld.h} +rm ./modules/codec/xvmc/mpeg2.h +ln -sf %{_includedir}/mpeg2dec/mpeg2.h ./modules/codec/xvmc/mpeg2.h +rm ./modules/codec/xvmc/mpeg2_internal.h +ln -sf %{_includedir}/mpeg2dec/mpeg2_internal.h ./modules/codec/xvmc/mpeg2_internal.h %build @@ -303,7 +303,7 @@ popd --enable-snapshot \ %ifarch %{ix86} x86_64 --enable-svgalib \ - --disable-xvmc \ + --enable-xvmc \ %endif %if %with_directfb --enable-directfb \ @@ -427,10 +427,10 @@ fi || : %{_libdir}/vlc/video_output/libxvideo_plugin.so %{_libdir}/vlc/visualization/libgalaktos_plugin.so %{_libdir}/vlc/misc/libxosd_plugin.so -#ifarch %{ix86} x86_64 -#{_libdir}/vlc/codec/libxvmc_plugin.so -#{_libdir}/vlc/video_output/libxvmc_plugin.so -#endif +%ifarch %{ix86} x86_64 +%{_libdir}/vlc/codec/libxvmc_plugin.so +%{_libdir}/vlc/video_output/libxvmc_plugin.so +%endif %{_libdir}/vlc/gui/libskins2_plugin.so %{_libdir}/vlc/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so @@ -462,8 +462,8 @@ fi || : %exclude %{_libdir}/vlc/visualization/libgalaktos_plugin.so %exclude %{_libdir}/vlc/misc/libxosd_plugin.so %ifarch %{ix86} x86_64 -#exclude %{_libdir}/vlc/codec/libxvmc_plugin.so -#exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so +%exclude %{_libdir}/vlc/codec/libxvmc_plugin.so +%exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so %exclude %{_libdir}/vlc/video_output/libsvgalib_plugin.so %endif %if %with_directfb @@ -512,6 +512,10 @@ fi || : %changelog +* Fri Apr 10 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.2pre1 +- Re-enable xxmc +- Remove libmpeg2 out + * Fri Mar 27 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.1pre1 - Update to 1.0.0-pre1 - Add mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov From 8217d505cfb724fa9e0bed016ca3a44068772c24 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 12 May 2009 13:27:28 +0000 Subject: [PATCH 040/671] Update to -rc1 --enable dirac libkate --- .gitignore | 2 +- 0001-Mozilla-SDK-libxul-1.9.1-support.patch | 516 -------------- sources | 2 +- vlc-1.0.0-bugfix_backport.patch | 751 ++++++++++++++++++++ vlc-1.0.0-pre1-libmpeg2_out.patch | 225 ------ vlc-1.0.0-rc1-pkglibd.patch | 15 + vlc.spec | 40 +- 7 files changed, 789 insertions(+), 762 deletions(-) delete mode 100644 0001-Mozilla-SDK-libxul-1.9.1-support.patch create mode 100644 vlc-1.0.0-bugfix_backport.patch delete mode 100644 vlc-1.0.0-pre1-libmpeg2_out.patch create mode 100644 vlc-1.0.0-rc1-pkglibd.patch diff --git a/.gitignore b/.gitignore index f4f9888..5e22f9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.0.0-pre1.tar.bz2 +vlc-1.0.0-rc1.tar.bz2 diff --git a/0001-Mozilla-SDK-libxul-1.9.1-support.patch b/0001-Mozilla-SDK-libxul-1.9.1-support.patch deleted file mode 100644 index d13f351..0000000 --- a/0001-Mozilla-SDK-libxul-1.9.1-support.patch +++ /dev/null @@ -1,516 +0,0 @@ -diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp -index ccc3945..43466c0 100644 ---- a/projects/mozilla/support/npmac.cpp -+++ b/projects/mozilla/support/npmac.cpp -@@ -54,7 +54,11 @@ - #undef XP_UNIX - #endif - -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include "npupp.h" -+#else -+#include "npfunctions.h" -+#endif - - #ifdef __MWERKS__ - #ifndef powerc -@@ -130,7 +134,7 @@ static inline void* SetupFPtoTVGlue(TFPtoTVGlue* functionGlue, void* fp) - - // glue for mapping netscape TVectors to Macho function pointers - struct TTVtoFPGlue { -- uint32 glue[6]; -+ uint32_t glue[6]; - }; - - static struct { -@@ -252,7 +256,7 @@ NPError NPN_GetURL(NPP instance, const char* url, const char* window) - return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window); - } - --NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) -+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) - { - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; -@@ -269,7 +273,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin - return err; - } - --NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) -+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file) - { - return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, url, window, len, buf, file); - } -@@ -295,7 +299,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStrea - return err; - } - --int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) -+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) - { - int navMinorVers = gNetscapeFuncs.version & 0xFF; - NPError err; -@@ -337,7 +341,7 @@ const char* NPN_UserAgent(NPP instance) - return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance); - } - --void* NPN_MemAlloc(uint32 size) -+void* NPN_MemAlloc(uint32_t size) - { - return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); - } -@@ -347,7 +351,7 @@ void NPN_MemFree(void* ptr) - CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); - } - --uint32 NPN_MemFlush(uint32 size) -+uint32_t NPN_MemFlush(uint32_t size) - { - return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); - } -@@ -594,18 +598,18 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message) - - NPError Private_Initialize(void); - void Private_Shutdown(void); --NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -+NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); - NPError Private_Destroy(NPP instance, NPSavedData** save); - NPError Private_SetWindow(NPP instance, NPWindow* window); - NPError Private_GetValue( NPP instance, NPPVariable variable, void *value ); - NPError Private_SetValue( NPP instance, NPPVariable variable, void *value ); - NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); - NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason); --int32 Private_WriteReady(NPP instance, NPStream* stream); --int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -+int32_t Private_WriteReady(NPP instance, NPStream* stream); -+int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); - void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname); - void Private_Print(NPP instance, NPPrint* platformPrint); --int16 Private_HandleEvent(NPP instance, void* event); -+int16_t Private_HandleEvent(NPP instance, void* event); - void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); - jobject Private_GetJavaClass(void); - -@@ -633,7 +637,7 @@ void Private_Shutdown(void) - ExitCodeResource(); - } - --NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) -+NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved) - { - EnterCodeResource(); - NPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved); -@@ -692,9 +696,9 @@ NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBoo - return err; - } - --int32 Private_WriteReady(NPP instance, NPStream* stream) -+int32_t Private_WriteReady(NPP instance, NPStream* stream) - { -- int32 result; -+ int32_t result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pWriteReady;g;"); - result = NPP_WriteReady(instance, stream); -@@ -702,9 +706,9 @@ int32 Private_WriteReady(NPP instance, NPStream* stream) - return result; - } - --int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer) -+int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer) - { -- int32 result; -+ int32_t result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pWrite;g;"); - result = NPP_Write(instance, stream, offset, len, buffer); -@@ -730,9 +734,9 @@ NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason) - return err; - } - --int16 Private_HandleEvent(NPP instance, void* event) -+int16_t Private_HandleEvent(NPP instance, void* event) - { -- int16 result; -+ int16_t result; - EnterCodeResource(); - PLUGINDEBUGSTR("\pHandleEvent;g;"); - result = NPP_HandleEvent(instance, event); -@@ -993,6 +997,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - // - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); - pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); - pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -@@ -1004,9 +1009,26 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); - pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); - pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); -+#else -+ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); -+ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); -+ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); -+ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); -+#endif - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#else -+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#endif - } - #ifdef OJI - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) -@@ -1016,7 +1038,11 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - #else - pluginFuncs->javaClass = NULL; - #endif -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - *unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); -+#else -+ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); -+#endif - - SetUpQD(); - err = Private_Initialize(); -@@ -1152,6 +1178,7 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) - - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->newp = NewNPP_NewProc(Private_New); - pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); - pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -@@ -1164,6 +1191,27 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) - pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); - pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); - pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); -+#else -+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); -+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); -+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); -+ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent); -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); -+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); -+#endif -+ if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) -+ { -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) -+ pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#else -+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+#endif - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - pluginFuncs->urlnotify = Private_URLNotify; -diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 26c6736..450d627 100644 ---- a/projects/mozilla/support/npunix.c -+++ b/projects/mozilla/support/npunix.c -@@ -43,7 +43,132 @@ - - #include - #include -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include -+#else -+#include -+// For 1.9 compatibility -+// ------------------------------------------------ -+typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); -+#define NewNPN_GetValueProc(FUNC) \ -+ ((NPN_GetValueUPP) (FUNC)) -+#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3)) -+ -+typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); -+#define NewNPN_SetValueProc(FUNC) \ -+ ((NPN_SetValueUPP) (FUNC)) -+#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3)) -+ -+typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); -+#define NewNPN_GetURLProc(FUNC) \ -+ ((NPN_GetURLUPP) (FUNC)) -+#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3)) -+ -+typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); -+#define NewNPN_GetURLNotifyProc(FUNC) \ -+ ((NPN_GetURLNotifyUPP) (FUNC)) -+#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) -+ -+typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); -+#define NewNPN_PostURLProc(FUNC) \ -+ ((NPN_PostURLUPP) (FUNC)) -+#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) -+ -+typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData); -+#define NewNPN_PostURLNotifyProc(FUNC) \ -+ ((NPN_PostURLNotifyUPP) (FUNC)) -+#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ -+ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) -+ -+typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); -+#define NewNPN_RequestReadProc(FUNC) \ -+ ((NPN_RequestReadUPP) (FUNC)) -+#define CallNPN_RequestReadProc(FUNC, stream, range) \ -+ (*(FUNC))((stream), (range)) -+ -+typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); -+#define NewNPN_NewStreamProc(FUNC) \ -+ ((NPN_NewStreamUPP) (FUNC)) -+#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ -+ (*(FUNC))((npp), (type), (window), (stream)) -+ -+typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer); -+#define NewNPN_WriteProc(FUNC) \ -+ ((NPN_WriteUPP) (FUNC)) -+#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ -+ (*(FUNC))((npp), (stream), (len), (buffer)) -+ -+typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); -+#define NewNPN_DestroyStreamProc(FUNC) \ -+ ((NPN_DestroyStreamUPP) (FUNC)) -+#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ -+ (*(FUNC))((npp), (stream), (reason)) -+ -+typedef void (*NPN_StatusUPP)(NPP instance, const char* message); -+#define NewNPN_StatusProc(FUNC) \ -+ ((NPN_StatusUPP) (FUNC)) -+#define CallNPN_StatusProc(FUNC, npp, msg) \ -+ (*(FUNC))((npp), (msg)) -+ -+typedef const char* (*NPN_UserAgentUPP)(NPP instance); -+#define NewNPN_UserAgentProc(FUNC) \ -+ ((NPN_UserAgentUPP) (FUNC)) -+#define CallNPN_UserAgentProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+typedef void* (*NPN_MemAllocUPP)(uint32_t size); -+#define NewNPN_MemAllocProc(FUNC) \ -+ ((NPN_MemAllocUPP) (FUNC)) -+#define CallNPN_MemAllocProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+typedef void (*NPN_MemFreeUPP)(void* ptr); -+#define NewNPN_MemFreeProc(FUNC) \ -+ ((NPN_MemFreeUPP) (FUNC)) -+#define CallNPN_MemFreeProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size); -+#define NewNPN_MemFlushProc(FUNC) \ -+ ((NPN_MemFlushUPP) (FUNC)) -+#define CallNPN_MemFlushProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); -+#define NewNPN_ReloadPluginsProc(FUNC) \ -+ ((NPN_ReloadPluginsUPP) (FUNC)) -+#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+//NPN_GetJavaEnv NPN_GetJavaPeer -+ -+typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); -+#define NewNPN_InvalidateRectProc(FUNC) \ -+ ((NPN_InvalidateRectUPP) (FUNC)) -+#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ -+ (*(FUNC))((ARG1), (ARG2)) -+ -+typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); -+#define NewNPN_InvalidateRegionProc(FUNC) \ -+ ((NPN_InvalidateRegionUPP) (FUNC)) -+#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ -+ (*(FUNC))((ARG1), (ARG2)) -+ -+typedef void (*NPN_ForceRedrawUPP)(NPP instance); -+#define NewNPN_ForceRedrawProc(FUNC) \ -+ ((NPN_ForceRedrawUPP) (FUNC)) -+#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ -+ (*(FUNC))((ARG1)) -+ -+//NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetIntIdentifier NPN_IdentifierIsString -+//NPN_UTF8FromIdentifier NPN_IntFromIdentifier NPN_CreateObject -+ -+#endif - - /* - * Define PLUGIN_TRACE to have the wrapper functions print -@@ -117,14 +242,14 @@ NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notify - - NPError - NPN_PostURL(NPP instance, const char* url, const char* window, -- uint32 len, const char* buf, NPBool file) -+ uint32_t len, const char* buf, NPBool file) - { - return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, - url, window, len, buf, file); - } - - NPError --NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, -+NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, - const char* buf, NPBool file, void* notifyData) - { - return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, -@@ -147,7 +272,7 @@ NPN_NewStream(NPP instance, NPMIMEType type, const char *window, - } - - int32 --NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) -+NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) - { - return CallNPN_WriteProc(gNetscapeFuncs.write, instance, - stream, len, buffer); -@@ -173,7 +298,7 @@ NPN_UserAgent(NPP instance) - } - - void* --NPN_MemAlloc(uint32 size) -+NPN_MemAlloc(uint32_t size) - { - return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); - } -@@ -183,7 +308,7 @@ void NPN_MemFree(void* ptr) - CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); - } - --uint32 NPN_MemFlush(uint32 size) -+uint32_t NPN_MemFlush(uint32_t size) - { - return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); - } -@@ -423,8 +548,8 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message) - ***********************************************************************/ - - NPError --Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, -- int16 argc, char* argn[], char* argv[], NPSavedData* saved) -+Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, -+ int16_t argc, char* argn[], char* argv[], NPSavedData* saved) - { - NPError ret; - PLUGINDEBUGSTR("New"); -@@ -468,7 +593,7 @@ Private_WriteReady(NPP instance, NPStream* stream) - } - - int32 --Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, -+Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, - void* buffer) - { - unsigned int result; -@@ -685,6 +810,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) - */ - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->newp = NewNPP_NewProc(Private_New); - pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); - pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -@@ -697,9 +823,27 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) - pluginFuncs->event = NULL; - pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); - pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); -+#else -+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); -+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); -+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); -+ pluginFuncs->event = NULL; -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); -+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); -+#endif - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); -+#else -+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); -+#endif - } - #ifdef OJI - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) -diff --git a/projects/mozilla/support/npwin.cpp b/projects/mozilla/support/npwin.cpp -index c277f84..2d08805 100644 ---- a/projects/mozilla/support/npwin.cpp -+++ b/projects/mozilla/support/npwin.cpp -@@ -42,7 +42,11 @@ - #endif - - #include "npapi.h" -+#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - #include "npupp.h" -+#else -+#include "npfunctions.h" -+#endif - - //\\// DEFINE - #define NP_EXPORT -@@ -228,7 +232,7 @@ NPError NPN_GetURL(NPP instance, const char *url, const char *target) - return g_pNavigatorFuncs->geturl(instance, url, target); - } - --NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) -+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) - { - int navMinorVers = g_pNavigatorFuncs->version & 0xFF; - NPError err; -@@ -242,7 +246,7 @@ NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uin - } - - --NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) -+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file) - { - return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file); - } -@@ -276,11 +280,11 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, - - /* Provides len bytes of data. - */ --int32 NPN_Write(NPP instance, NPStream *stream, -- int32 len, void *buffer) -+int32_t NPN_Write(NPP instance, NPStream *stream, -+ int32_t len, void *buffer) - { - int navMinorVersion = g_pNavigatorFuncs->version & 0xFF; -- int32 result; -+ int32_t result; - - if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) { - result = g_pNavigatorFuncs->write(instance, stream, len, buffer); -@@ -327,7 +331,7 @@ const char* NPN_UserAgent(NPP instance) - */ - - --void* NPN_MemAlloc(uint32 size) -+void* NPN_MemAlloc(uint32_t size) - { - return g_pNavigatorFuncs->memalloc(size); - } diff --git a/sources b/sources index c53f4a5..60f9367 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3397813329f2b962f28ddb1cc6e0242f vlc-1.0.0-pre1.tar.bz2 +42e31b46e6faa3e0ce7aec3790f014a3 vlc-1.0.0-rc1.tar.bz2 diff --git a/vlc-1.0.0-bugfix_backport.patch b/vlc-1.0.0-bugfix_backport.patch new file mode 100644 index 0000000..b43657c --- /dev/null +++ b/vlc-1.0.0-bugfix_backport.patch @@ -0,0 +1,751 @@ +diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h +index 4085e25..5794c0a 100644 +--- a/include/vlc/libvlc.h ++++ b/include/vlc/libvlc.h +@@ -1065,7 +1065,7 @@ VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc + * \param i_height the snapshot's height + * \param p_e an initialized exception pointer + */ +-VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * ); ++VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * ); + + /** + * Resize the current video output window. +diff --git a/include/vlc_url.h b/include/vlc_url.h +index dc2a021..448c685 100644 +--- a/include/vlc_url.h ++++ b/include/vlc_url.h +@@ -48,8 +48,9 @@ struct vlc_url_t + VLC_EXPORT( char *, unescape_URI_duplicate, ( const char *psz ) ); + VLC_EXPORT( void, unescape_URI, ( char *psz ) ); + VLC_EXPORT( char *, decode_URI_duplicate, ( const char *psz ) ); +-VLC_EXPORT( void, decode_URI, ( char *psz ) ); ++VLC_EXPORT( char *, decode_URI, ( char *psz ) ); + VLC_EXPORT( char *, encode_URI_component, ( const char *psz ) ); ++VLC_EXPORT( char *, make_URI, ( const char *path ) ); + + /***************************************************************************** + * vlc_UrlParse: +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 19e4b75..86bd6dd 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -176,16 +176,15 @@ static int Open ( vlc_object_t *p_this ) + goto fail; + } + +- a.maxlength = pa_bytes_per_second(&ss)/4/pa_frame_size(&ss); +- a.tlength = a.maxlength*9/10; +- a.prebuf = a.tlength/2; +- a.minreq = a.tlength/10; +- +- a.maxlength *= pa_frame_size(&ss); +- a.tlength *= pa_frame_size(&ss); +- a.prebuf *= pa_frame_size(&ss); +- a.minreq *= pa_frame_size(&ss); +- ++ /* Reduce overall latency to 200mS to reduce audible clicks ++ * Also pulse minreq and internal buffers are now 20mS which reduces resampling ++ */ ++ a.tlength = pa_bytes_per_second(&ss)/5; ++ a.maxlength = a.tlength * 2; ++ a.prebuf = a.tlength; ++ a.minreq = a.tlength / 10; ++ ++ /* Buffer size is 20mS */ + p_sys->buffer_size = a.minreq; + + /* Initialise the speaker map setup above */ +@@ -240,7 +239,7 @@ static int Open ( vlc_object_t *p_this ) + pa_stream_set_write_callback(p_sys->stream, stream_request_cb, p_aout); + pa_stream_set_latency_update_callback(p_sys->stream, stream_latency_update_cb, p_aout); + +- if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) { ++ if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { + msg_Err(p_aout, "Failed to connect stream: %s", pa_strerror(pa_context_errno(p_sys->context))); + goto unlock_and_fail; + } +@@ -448,16 +447,11 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) { + latency = 0; + + } ++ + PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency); + next_date = mdate() + latency; + +- + if(p_sys->start_date < next_date + AOUT_PTS_TOLERANCE ){ +- /* +- vlc_mutex_lock( &p_aout->output_fifo_lock ); +- p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); +- vlc_mutex_unlock( &p_aout->output_fifo_lock ); +- */ + p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0); + } + } +diff --git a/modules/control/http/http.c b/modules/control/http/http.c +index 5bce03b..75f24c2 100644 +--- a/modules/control/http/http.c ++++ b/modules/control/http/http.c +@@ -555,18 +555,11 @@ int HandlerCallback( httpd_handler_sys_t *p_args, + int i_env = 0; + char **ppsz_env = NULL; + char *psz_tmp; +- char sep; + size_t i_buffer; + char *p_buffer; + char *psz_cwd, *psz_file = NULL; + int i_ret; + +-#ifdef WIN32 +- sep = '\\'; +-#else +- sep = '/'; +-#endif +- + /* Create environment for the CGI */ + TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") ); + TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") ); +@@ -677,7 +670,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, + } + } + +- psz_file = strrchr( p_args->file.file, sep ); ++ psz_file = strrchr( p_args->file.file, DIR_SEP_CHAR ); + if( psz_file != NULL ) + { + psz_file++; +@@ -694,7 +687,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, + NULL ); + + psz_tmp = strdup( p_args->file.file ); +- p = strrchr( psz_tmp, sep ); ++ p = strrchr( psz_tmp, DIR_SEP_CHAR ); + if( p != NULL ) + { + *p = '\0'; +diff --git a/modules/control/http/util.c b/modules/control/http/util.c +index a8b7861..69de4a6 100644 +--- a/modules/control/http/util.c ++++ b/modules/control/http/util.c +@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, + + int i_dirlen; + +- char sep; +- +-#if defined( WIN32 ) +- sep = '\\'; +-#else +- sep = '/'; +-#endif +- + if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL ) + { + if( errno != ENOENT && errno != ENOTDIR ) +@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, + + msg_Dbg( p_intf, "dir=%s", psz_dir ); + +- snprintf( dir, sizeof( dir ), "%s%c.access", psz_dir, sep ); ++ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".access", psz_dir ); + if( ( file = utf8_fopen( dir, "r" ) ) != NULL ) + { + char line[1024]; +@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, + fclose( file ); + } + +- snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep ); ++ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".hosts", psz_dir ); + p_acl = ACL_Create( p_intf, false ); + if( ACL_LoadFile( p_acl, dir ) ) + { +@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, + continue; + } + +- snprintf( dir, sizeof( dir ), "%s%c%s", psz_dir, sep, psz_filename ); ++ snprintf( dir, sizeof( dir ), "%s"DIR_SEP"%s", psz_dir, psz_filename ); + free( psz_filename ); + + if( ParseDirectory( p_intf, psz_root, dir ) ) +@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src ) + char *psz_dir; + char *p; + int i_len = strlen(psz_src); +- const char sep = DIR_SEP_CHAR; + + psz_dir = malloc( i_len + 2 ); + strcpy( psz_dir, psz_src ); + + /* Add a trailing sep to ease the .. step */ +- psz_dir[i_len] = sep; ++ psz_dir[i_len] = DIR_SEP_CHAR; + psz_dir[i_len + 1] = '\0'; + + #if (DIR_SEP_CHAR != '/') +@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src ) + p = psz_dir; + while( (p = strchr( p, '/' )) != NULL ) + { +- *p = sep; ++ *p = DIR_SEP_CHAR; + } + #endif + + /* FIXME: this could be O(N) rather than O(N²)... */ + /* Remove multiple separators and /./ */ + p = psz_dir; +- while( (p = strchr( p, sep )) != NULL ) ++ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL ) + { +- if( p[1] == sep ) ++ if( p[1] == DIR_SEP_CHAR ) + memmove( &p[1], &p[2], strlen(&p[2]) + 1 ); +- else if( p[1] == '.' && p[2] == sep ) ++ else if( p[1] == '.' && p[2] == DIR_SEP_CHAR ) + memmove( &p[1], &p[3], strlen(&p[3]) + 1 ); + else + p++; +@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src ) + { + /* Fix all .. dir */ + p = psz_dir + 3; +- while( (p = strchr( p, sep )) != NULL ) ++ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL ) + { +- if( p[-1] == '.' && p[-2] == '.' && p[-3] == sep ) ++ if( p[-1] == '.' && p[-2] == '.' && p[-3] == DIR_SEP_CHAR ) + { + char *q; + p[-3] = '\0'; +- if( (q = strrchr( psz_dir, sep )) != NULL ) ++ if( (q = strrchr( psz_dir, DIR_SEP_CHAR )) != NULL ) + { + memmove( q + 1, p + 1, strlen(p + 1) + 1 ); + p = q + 1; +@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src ) + + /* Remove trailing sep if there are at least 2 sep in the string + * (handles the C:\ stuff) */ +- p = strrchr( psz_dir, sep ); +- if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, sep ) ) ++ p = strrchr( psz_dir, DIR_SEP_CHAR ); ++ if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, DIR_SEP_CHAR ) ) + *p = '\0'; + + return psz_dir; +diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp +index ab0eb9a..8baf686 100644 +--- a/modules/gui/qt4/main_interface.cpp ++++ b/modules/gui/qt4/main_interface.cpp +@@ -637,7 +637,7 @@ QSize MainInterface::sizeHint() const + */ + void MainInterface::doComponentsUpdate() + { +- if( isFullScreen() ) return; ++ if( isFullScreen() || isMaximized() ) return; + + msg_Dbg( p_intf, "Updating the geometry" ); + /* Here we resize to sizeHint() and not adjustsize because we want +diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c +index 9b7ef96..0f5f82c 100644 +--- a/modules/misc/playlist/xspf.c ++++ b/modules/misc/playlist/xspf.c +@@ -34,11 +34,14 @@ + #include + #include + #include +-#include ++#include + #include "xspf.h" + + #include + ++static void xspf_export_item( playlist_item_t *, FILE *, int * ); ++static void xspf_extension_item( playlist_item_t *, FILE *, int * ); ++ + /** + * \brief Prints the XSPF header to file, writes each item by xspf_export_item() + * and closes the open xml elements +@@ -139,7 +142,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, + + if( psz_uri && *psz_uri ) + { +- psz = assertUTF8URI( psz_uri ); ++ psz = make_URI( psz_uri ); + fprintf( p_file, "\t\t\t%s\n", psz ); + free( psz ); + } +@@ -209,7 +212,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, + if( psz == NULL ) psz = strdup( "" ); + if( !EMPTY_STR( psz ) ) + { +- psz_uri = assertUTF8URI( psz ); ++ psz_uri = make_URI( psz ); + fprintf( p_file, "\t\t\t%s\n", psz_uri ); + free( psz_uri ); + } +@@ -284,89 +287,3 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file, + + return; + } +- +-/** +- * \param psz_name the location of the media ressource (e.g. local file, +- * device, network stream, etc.) +- * \return a new char buffer which asserts that the location is valid UTF-8 +- * and a valid URI +- * \note the returned buffer must be freed, when it isn't used anymore +- */ +-static char *assertUTF8URI( char *psz_name ) +-{ +- char *psz_ret = NULL; /**< the new result buffer to return */ +- char *psz_s = NULL, *psz_d = NULL; /**< src & dest pointers for URI conversion */ +- bool b_uri_is_file = false; /**< we do additional %-encoding if the URI is a file:// one */ +- +- if( !psz_name || !*psz_name ) +- return NULL; +- +- /* check that string is valid UTF-8 */ +- /* XXX: Why do we even need to do that ? (all strings in core are UTF-8 encoded */ +- if( !( psz_s = EnsureUTF8( psz_name ) ) ) +- return NULL; +- +- /* max. 3x for URI conversion (percent escaping) and +- 8 bytes for "file://" and NULL-termination */ +- psz_ret = (char *)malloc( strlen(psz_name)*6*3+8 ); +- if( !psz_ret ) +- return NULL; +- +- /** \todo check for a valid scheme part preceding the colon */ +- if( strstr( psz_s, "://") != NULL ) +- { +- size_t i_delim = strcspn( psz_s, ":" ); +- i_delim++; /* skip the ':' */ +- strncpy( psz_ret, psz_s, i_delim ); +- psz_d = psz_ret + i_delim; +- +- if( !strncmp( psz_s, "file://", 7 ) ) +- b_uri_is_file = true; +- +- psz_s += i_delim; +- } +- /* assume "file" scheme if no scheme-part is included */ +- else +- { +- strcpy( psz_ret, "file://" ); +- psz_d = psz_ret + 7; +- b_uri_is_file = true; +- } +- +- while( *psz_s ) +- { +- /* percent-encode all non-ASCII and the XML special characters and the percent sign itself */ +- if( *psz_s & B10000000 || +- *psz_s == '<' || +- *psz_s == '>' || +- *psz_s == '&' || +- *psz_s == ' ' || +- *psz_s == '+' || +- *psz_s == '%' || +- *psz_s == '\\' || +- ( b_uri_is_file && ( +- *psz_s == ':' || +- *psz_s == '"' || +- *psz_s == '?' || +- *psz_s == '#' || +- *psz_s == '[' || +- *psz_s == ']' || +- *psz_s == '@' ) +- ) +- ) +- { +- *psz_d++ = '%'; +- *psz_d++ = hexchars[(*psz_s >> 4) & B00001111]; +- *psz_d++ = hexchars[*psz_s & B00001111]; +- } +- else +- { +- *psz_d++ = *psz_s; +- } +- +- psz_s++; +- } +- *psz_d = '\0'; +- +- return (char *)realloc( psz_ret, strlen( psz_ret ) + 1 ); +-} +diff --git a/modules/misc/playlist/xspf.h b/modules/misc/playlist/xspf.h +index 9a8ac6b..adfaa90 100644 +--- a/modules/misc/playlist/xspf.h ++++ b/modules/misc/playlist/xspf.h +@@ -33,6 +33,3 @@ const char hexchars[16] = "0123456789ABCDEF"; + + /* prototypes */ + int xspf_export_playlist( vlc_object_t * ); +-static void xspf_export_item( playlist_item_t *, FILE *, int * ); +-static void xspf_extension_item( playlist_item_t *, FILE *, int * ); +-static char *assertUTF8URI( char * ); +diff --git a/modules/misc/screensaver.c b/modules/misc/screensaver.c +index 24448bc..b5d8946 100644 +--- a/modules/misc/screensaver.c ++++ b/modules/misc/screensaver.c +@@ -50,6 +50,10 @@ + #define GS_PATH "/org/gnome/ScreenSaver" + #define GS_INTERFACE "org.gnome.ScreenSaver" + ++#define FDS_SERVICE "org.freedesktop.ScreenSaver" ++#define FDS_PATH "/ScreenSaver" ++#define FDS_INTERFACE "org.freedesktop.ScreenSaver" ++ + #endif + + /***************************************************************************** +@@ -67,8 +71,11 @@ static void poke_screensaver( intf_thread_t *p_intf, + DBusConnection *p_connection ); + static void screensaver_send_message_void ( intf_thread_t *p_intf, + DBusConnection *p_connection, ++ const char *psz_service, ++ const char *psz_path, ++ const char *psz_interface, + const char *psz_name ); +-static bool screensaver_is_running( DBusConnection *p_connection ); ++static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service ); + + + struct intf_sys_t +@@ -235,34 +242,47 @@ static DBusConnection * dbus_init( intf_thread_t *p_intf ) + static void poke_screensaver( intf_thread_t *p_intf, + DBusConnection *p_connection ) + { +- if( screensaver_is_running( p_connection ) ) ++ if( screensaver_is_running( p_connection, GS_SERVICE ) ) + { + # ifdef SCREENSAVER_DEBUG + msg_Dbg( p_intf, "found a running gnome-screensaver instance" ); + # endif + /* gnome-screensaver changed it's D-Bus interface, so we need both */ +- screensaver_send_message_void( p_intf, p_connection, "Poke" ); +- screensaver_send_message_void( p_intf, p_connection, +- "SimulateUserActivity" ); ++ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH, ++ GS_INTERFACE, "Poke" ); ++ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH, ++ GS_INTERFACE, "SimulateUserActivity" ); ++ } ++ else if( screensaver_is_running( p_connection, FDS_SERVICE ) ) ++ { ++# ifdef SCREENSAVER_DEBUG ++ msg_Dbg( p_intf, "found a running freedesktop-screensaver instance" ); ++# endif ++ screensaver_send_message_void( p_intf, p_connection, FDS_SERVICE, FDS_PATH, ++ FDS_INTERFACE, "SimulateUserActivity" ); + } + # ifdef SCREENSAVER_DEBUG + else + { +- msg_Dbg( p_intf, "found no running gnome-screensaver instance" ); ++ msg_Dbg( p_intf, "found no running (gnome|freedesktop)-screensaver instance" ); + } + # endif ++ + } + + static void screensaver_send_message_void ( intf_thread_t *p_intf, + DBusConnection *p_connection, ++ const char *psz_service, ++ const char *psz_path, ++ const char *psz_interface, + const char *psz_name ) + { + DBusMessage *p_message; + + if( !p_connection || !psz_name ) return; + +- p_message = dbus_message_new_method_call( GS_SERVICE, GS_PATH, +- GS_INTERFACE, psz_name ); ++ p_message = dbus_message_new_method_call( psz_service, psz_path, ++ psz_interface, psz_name ); + if( p_message == NULL ) + { + msg_Err( p_intf, "DBUS initialization failed: message initialization" ); +@@ -279,7 +299,7 @@ static void screensaver_send_message_void ( intf_thread_t *p_intf, + dbus_message_unref( p_message ); + } + +-static bool screensaver_is_running( DBusConnection *p_connection ) ++static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service ) + { + DBusError error; + bool b_return; +@@ -287,7 +307,7 @@ static bool screensaver_is_running( DBusConnection *p_connection ) + if( !p_connection ) return false; + + dbus_error_init( &error ); +- b_return = dbus_bus_name_has_owner( p_connection, GS_SERVICE, &error ); ++ b_return = dbus_bus_name_has_owner( p_connection, psz_service, &error ); + if( dbus_error_is_set( &error ) ) dbus_error_free (&error); + + return b_return; +diff --git a/src/control/video.c b/src/control/video.c +index 567532c..81c0052 100644 +--- a/src/control/video.c ++++ b/src/control/video.c +@@ -104,7 +104,7 @@ void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi, + } + + void +-libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, char *psz_filepath, ++libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, const char *psz_filepath, + unsigned int i_width, unsigned int i_height, libvlc_exception_t *p_e ) + { + vout_thread_t *p_vout = GetVout( p_mi, p_e ); +diff --git a/src/test/url.c b/src/test/url.c +index a097aca..d03e48c 100644 +--- a/src/test/url.c ++++ b/src/test/url.c +@@ -29,6 +29,7 @@ + + #include + #include ++#include + + typedef char * (*conv_t) (const char *); + +@@ -60,8 +61,15 @@ static inline void test_b64 (const char *in, const char *out) + test (vlc_b64_encode, in, out); + } + ++static inline void test_path (const char *in, const char *out) ++{ ++ test (make_URI, in, out); ++} ++ + int main (void) + { ++ int val; ++ + (void)setvbuf (stdout, NULL, _IONBF, 0); + test_decode ("this_should_not_be_modified_1234", + "this_should_not_be_modified_1234"); +@@ -93,5 +101,24 @@ int main (void) + test_b64 ("fooba", "Zm9vYmE="); + test_b64 ("foobar", "Zm9vYmFy"); + ++ /* Path test */ ++ test_path ("file:///", "file:///"); ++ test_path ("http://www.example.com/%7Ejohn/", ++ "http://www.example.com/%7Ejohn/"); ++ test_path ("/", "file:///"); ++ test_path ("/home/john/", "file:///home/john/"); ++ test_path ("/home/john/music.ogg", "file:///home/john/music.ogg"); ++ //test_path ("\\\\server/pub/music.ogg", "file://server/pub/music.ogg"); ++ ++ /*int fd = open (".", O_RDONLY); ++ assert (fd != -1);*/ ++ val = chdir ("/tmp"); ++ assert (val != -1); ++ test_path ("movie.ogg", "file:///tmp/movie.ogg"); ++ test_path (".", "file:///tmp/."); ++ test_path ("", "file:///tmp/"); ++ /*val = fchdir (fd); ++ assert (val != -1);*/ ++ + return 0; + } +diff --git a/src/text/strings.c b/src/text/strings.c +index 8a0229c..860aae7 100644 +--- a/src/text/strings.c ++++ b/src/text/strings.c +@@ -130,7 +131,7 @@ void unescape_URI( char *psz ) + } + + /** +- * Decode encoded URI string ++ * Decode encoded URI component. See also decode_URI(). + * \return decoded duplicated string + */ + char *decode_URI_duplicate( const char *psz ) +@@ -141,14 +142,23 @@ char *decode_URI_duplicate( const char *psz ) + } + + /** +- * Decode encoded URI string in place +- * \return nothing ++ * Decode an encoded URI component in place. ++ * This function does NOT decode entire URIs. ++ * It decodes components (e.g. host name, directory, file name). ++ * Decoded URIs do not exist in the real world (see RFC3986 §2.4). ++ * Complete URIs are always "encoded" (or they are syntaxically invalid). ++ * ++ * Note that URI encoding is different from Javascript escaping. Especially, ++ * white spaces and Unicode non-ASCII code points are encoded differently. ++ * ++ * \return psz on success, NULL if it was not properly encoded + */ +-void decode_URI( char *psz ) ++char *decode_URI( char *psz ) + { + unsigned char *in = (unsigned char *)psz, *out = in, c; ++ + if( psz == NULL ) +- return; ++ return NULL; + + while( ( c = *in++ ) != '\0' ) + { +@@ -160,14 +170,14 @@ void decode_URI( char *psz ) + + if( ( ( hex[0] = *in++ ) == 0 ) + || ( ( hex[1] = *in++ ) == 0 ) ) +- return; ++ return NULL; + + hex[2] = '\0'; + *out++ = (unsigned char)strtoul( hex, NULL, 0x10 ); + break; + } + +- case '+': ++ case '+': /* This is HTTP forms, not URI decoding... */ + *out++ = ' '; + break; + +@@ -182,6 +192,7 @@ void decode_URI( char *psz ) + } + *out = '\0'; + EnsureUTF8( psz ); ++ return psz; + } + + static inline bool isurisafe( int c ) +@@ -193,23 +204,13 @@ static inline bool isurisafe( int c ) + || ( strchr( "-._~", c ) != NULL ); + } + +-/** +- * Encodes an URI component (RFC3986 §2). +- * +- * @param psz_uri nul-terminated UTF-8 representation of the component. +- * Obviously, you can't pass an URI containing a nul character, but you don't +- * want to do that, do you? +- * +- * @return encoded string (must be free()'d), or NULL for ENOMEM. +- */ +-char *encode_URI_component( const char *psz_uri ) ++static char *encode_URI_bytes (const char *psz_uri, size_t len) + { +- char *psz_enc = malloc ((3 * strlen (psz_uri)) + 1), *out = psz_enc; +- ++ char *psz_enc = malloc (3 * len + 1), *out = psz_enc; + if (psz_enc == NULL) + return NULL; + +- while (*psz_uri) ++ for (size_t i = 0; i < len; i++) + { + static const char hex[16] = "0123456789ABCDEF"; + uint8_t c = *psz_uri; +@@ -232,6 +233,21 @@ char *encode_URI_component( const char *psz_uri ) + return out ? out : psz_enc; /* realloc() can fail (safe) */ + } + ++/** ++ * Encodes an URI component (RFC3986 §2). ++ * ++ * @param psz_uri nul-terminated UTF-8 representation of the component. ++ * Obviously, you can't pass an URI containing a nul character, but you don't ++ * want to do that, do you? ++ * ++ * @return encoded string (must be free()'d), or NULL for ENOMEM. ++ */ ++char *encode_URI_component( const char *psz_uri ) ++{ ++ return encode_URI_bytes (psz_uri, strlen (psz_uri)); ++} ++ ++ + static const struct xml_entity_s + { + char psz_entity[8]; +@@ -1120,3 +1136,78 @@ void path_sanitize( char *str ) + str++; + } + } ++ ++#include ++ ++/** ++ * Convert a file path to an URI. If already an URI, do nothing. ++ */ ++char *make_URI (const char *path) ++{ ++ if (path == NULL) ++ return NULL; ++ if (strstr (path, "://") != NULL) ++ return strdup (path); /* Already an URI */ ++ /* Note: VLC cannot handle URI schemes without double slash after the ++ * scheme name (such as mailto: or news:). */ ++ ++ char *buf; ++#ifdef WIN32 ++ if (isalpha (path[0]) && (path[1] == ':')) ++ { ++ if (asprintf (&buf, "file:///%c:", path[0]) == -1) ++ buf = NULL; ++ path += 2; ++ } ++ else ++#endif ++#if 0 ++ /* Windows UNC paths (file://host/share/path instead of file:///path) */ ++ if (!strncmp (path, "\\\\", 2)) ++ { ++ path += 2; ++ buf = strdup ("file://"); ++ } ++ else ++#endif ++ if (path[0] != DIR_SEP_CHAR) ++ { /* Relative path: prepend the current working directory */ ++ char cwd[PATH_MAX]; ++ ++ if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */ ++ return NULL; ++ if (asprintf (&buf, "%s/%s", cwd, path) == -1) ++ return NULL; ++ char *ret = make_URI (buf); ++ free (buf); ++ return ret; ++ } ++ else ++ buf = strdup ("file://"); ++ if (buf == NULL) ++ return NULL; ++ ++ assert (path[0] == DIR_SEP_CHAR); ++ ++ /* Absolute file path */ ++ for (const char *ptr = path + 1;; ptr++) ++ { ++ size_t len = strcspn (ptr, DIR_SEP); ++ char *component = encode_URI_bytes (ptr, len); ++ if (component == NULL) ++ { ++ free (buf); ++ return NULL; ++ } ++ char *uri; ++ int val = asprintf (&uri, "%s/%s", buf, component); ++ free (component); ++ free (buf); ++ if (val == -1) ++ return NULL; ++ buf = uri; ++ ptr += len; ++ if (*ptr == '\0') ++ return buf; ++ } ++} diff --git a/vlc-1.0.0-pre1-libmpeg2_out.patch b/vlc-1.0.0-pre1-libmpeg2_out.patch deleted file mode 100644 index 1093e63..0000000 --- a/vlc-1.0.0-pre1-libmpeg2_out.patch +++ /dev/null @@ -1,225 +0,0 @@ -diff -up vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c ---- vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c.libmpeg2_out 2009-02-15 12:36:51.000000000 +0100 -+++ vlc-1.0.0-pre1/modules/codec/xvmc/xxmc.c 2009-04-09 21:39:18.000000000 +0200 -@@ -41,9 +41,9 @@ - #endif - - #include "mpeg2.h" --#include "attributes.h" -+//#include "attributes.h" - #include "mpeg2_internal.h" --#include "xvmc_vld.h" -+//#include "xvmc_vld.h" - - /* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */ - #define AR_SQUARE_PICTURE 1 /* square pixels */ -@@ -277,7 +277,7 @@ static picture_t *DecodeBlock( decoder_t - if ( p_sys->b_slice_i ) - { - decoder_SynchroNewPicture( p_sys->p_synchro, -- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, -+ I_CODING_TYPE, 2, 0, 0, - p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); - decoder_SynchroDecode( p_sys->p_synchro ); - decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); -@@ -396,7 +396,7 @@ static picture_t *DecodeBlock( decoder_t - decoder_SynchroNewPicture( p_sys->p_synchro, - p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, - p_sys->p_info->current_picture->nb_fields, -- 0, 0, p_sys->i_current_rate, -+ 0, 0, - p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); - - if( p_sys->b_skip ) -@@ -422,7 +422,7 @@ static picture_t *DecodeBlock( decoder_t - /* Intra-slice refresh. Simulate a blank I picture. */ - msg_Dbg( p_dec, "intra-slice refresh stream" ); - decoder_SynchroNewPicture( p_sys->p_synchro, -- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, -+ I_CODING_TYPE, 2, 0, 0, - p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); - decoder_SynchroDecode( p_sys->p_synchro ); - decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); -@@ -457,7 +457,7 @@ static picture_t *DecodeBlock( decoder_t - decoder_SynchroNewPicture( p_sys->p_synchro, - p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE, - p_sys->p_info->current_picture->nb_fields, i_pts, -- 0, p_sys->i_current_rate, -+ 0, - p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); - - if ( !(p_sys->b_slice_i -@@ -486,8 +486,8 @@ static picture_t *DecodeBlock( decoder_t - return NULL; - } - -- p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id; -- p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id; -+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id; -+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id; - - if ((p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE) != B_CODING_TYPE) - { -@@ -495,9 +495,9 @@ static picture_t *DecodeBlock( decoder_t - // p_sys->p_mpeg2dec->ptr_forward_ref_picture != picture->backward_reference_frame) - // p_pic->forward_reference_frame->free (p_pic->forward_reference_frame); - -- p_sys->p_mpeg2dec->ptr_forward_ref_picture = -- p_sys->p_mpeg2dec->ptr_backward_ref_picture; -- p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic; -+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = -+ // p_sys->p_mpeg2dec->ptr_backward_ref_picture; -+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic; - } - mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); - } -@@ -595,7 +595,7 @@ static picture_t *DecodeBlock( decoder_t - if( p_sys->b_slice_i ) - { - decoder_SynchroNewPicture( p_sys->p_synchro, -- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate, -+ I_CODING_TYPE, 2, 0, 0, - p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ); - decoder_SynchroDecode( p_sys->p_synchro ); - decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 ); -@@ -644,7 +644,7 @@ static double get_aspect_ratio( decoder_ - { - /* these hardcoded values are defined on mpeg2 standard for - * aspect ratio. other values are reserved or forbidden. */ -- switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information ) -+ /*switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information ) - { - case 2: - ratio = 4.0/3.0; -@@ -656,16 +656,16 @@ static double get_aspect_ratio( decoder_ - ratio = 2.11/1.0; - break; - case 1: -- default: -+ default:*/ - ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height; -- break; -- } -+ /* break; -+ }*/ - } - else - { - /* mpeg1 constants refer to pixel aspect ratio */ - ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height; -- ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; -+ /* ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; */ - } - return ratio; - } -@@ -730,8 +730,8 @@ static picture_t *GetNewPicture( decoder - p_dec->fmt_out.video.i_height, - p_dec->fmt_out.video.i_aspect, - format, flags); --#endif - mpeg2_xxmc_choose_coding( p_dec, &p_sys->p_mpeg2dec->decoder, p_pic, - get_aspect_ratio(p_dec), 0 ); -+#endif - return p_pic; - } -diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c ---- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c.libmpeg2_out 2009-03-17 21:06:54.000000000 +0100 -+++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.c 2009-04-10 01:19:01.000000000 +0200 -@@ -116,16 +116,7 @@ static void DestroyWindow ( vout_thread - static int NewPicture ( vout_thread_t *, picture_t * ); - static void FreePicture ( vout_thread_t *, picture_t * ); - --#ifndef MODULE_NAME_IS_glx --static IMAGE_TYPE *CreateImage ( vout_thread_t *, -- Display *, EXTRA_ARGS, int, int ); --#endif -- - #ifdef HAVE_SYS_SHM_H --#ifndef MODULE_NAME_IS_glx --IMAGE_TYPE *CreateShmImage ( vout_thread_t *, -- Display *, EXTRA_ARGS_SHM, int, int ); --#endif - static int i_shm_major = 0; - #endif - -@@ -428,7 +419,7 @@ int Activate ( vlc_object_t *p_this ) - if( checkXvMCCap( p_vout ) == VLC_EGENERIC ) - { - msg_Err( p_vout, "no XVMC capability found" ); -- Deactivate( p_vout ); -+ Deactivate( p_this ); - return VLC_EGENERIC; - } - subpicture_t sub_pic; -@@ -1076,7 +1067,7 @@ static void DisplayVideo( vout_thread_t - if( p_vout->p_sys->i_shm_opcode ) - { - /* Display rendered image using shared memory extension */ --# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) -+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) - XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport, - p_vout->p_sys->p_win->video_window, - p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image, -@@ -1086,7 +1077,7 @@ static void DisplayVideo( vout_thread_t - p_vout->fmt_out.i_visible_height, - 0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height, - False /* Don't put True here or you'll waste your CPU */ ); --# else -+#else - XShmPutImage( p_vout->p_sys->p_display, - p_vout->p_sys->p_win->video_window, - p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image, -@@ -1096,7 +1087,7 @@ static void DisplayVideo( vout_thread_t - p_vout->fmt_out.i_visible_width, - p_vout->fmt_out.i_visible_height, - False /* Don't put True here ! */ ); --# endif -+#endif - } - else - #endif /* HAVE_SYS_SHM_H */ -@@ -1922,13 +1913,13 @@ static int NewPicture( vout_thread_t *p_ - /* Create image using XShm extension */ - p_pic->p_sys->p_image = - CreateShmImage( p_vout, p_vout->p_sys->p_display, --# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) -+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) - p_vout->p_sys->i_xvport, - VLC2X11_FOURCC(p_vout->output.i_chroma), --# else -+#else - p_vout->p_sys->p_visual, - p_vout->p_sys->i_screen_depth, --# endif -+#endif - &p_pic->p_sys->shminfo, - p_vout->output.i_width, p_vout->output.i_height ); - } -diff -up vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h ---- vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h.libmpeg2_out 2009-04-10 00:23:24.000000000 +0200 -+++ vlc-1.0.0-pre1/modules/video_output/x11/xcommon.h 2009-04-10 01:19:07.000000000 +0200 -@@ -395,4 +395,12 @@ typedef struct mwmhints_t - # define MAX_DIRECTBUFFERS 2 - #endif - -+#ifndef MODULE_NAME_IS_glx -+static IMAGE_TYPE *CreateImage ( vout_thread_t *, -+ Display *, EXTRA_ARGS, int, int ); -+#ifdef HAVE_SYS_SHM_H -+IMAGE_TYPE *CreateShmImage ( vout_thread_t *, -+ Display *, EXTRA_ARGS_SHM, int, int ); -+#endif -+#endif - -diff -up vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c ---- vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c.libmpeg2_out 2009-02-14 13:39:08.000000000 +0100 -+++ vlc-1.0.0-pre1/modules/video_output/x11/xvmc.c 2009-04-09 21:39:18.000000000 +0200 -@@ -1304,7 +1304,7 @@ void xxmc_do_update_frame( picture_t *pi - /* Wait a little till frame is being displayed */ - while( status & XVMC_DISPLAYING ) - { -- msleep(1); -+ /* msleep(1); */ - - XvMCGetSurfaceStatus( p_vout->p_sys->p_display, - picture->p_sys->xvmc_surf, diff --git a/vlc-1.0.0-rc1-pkglibd.patch b/vlc-1.0.0-rc1-pkglibd.patch new file mode 100644 index 0000000..addd89d --- /dev/null +++ b/vlc-1.0.0-rc1-pkglibd.patch @@ -0,0 +1,15 @@ +diff -up vlc-1.0.0-rc1/configure.ac.pkglibd vlc-1.0.0-rc1/configure.ac +--- vlc-1.0.0-rc1/configure.ac.pkglibd 2009-05-12 14:39:52.000000000 +0200 ++++ vlc-1.0.0-rc1/configure.ac 2009-05-12 14:40:02.000000000 +0200 +@@ -144,11 +144,6 @@ AC_ARG_WITH(contrib, + CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include" + OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include" + OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include" +- if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then +- export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH +- else +- export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig +- fi + LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib" + LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib" + diff --git a/vlc.spec b/vlc.spec index 0406f0d..cf97f19 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,10 +1,10 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) %define _default_patch_fuzz 2 -%define with_internal_live555 0 +%define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -pre1 +%define vlc_rc -rc1 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.2pre1%{?dist} +Release: 0.4rc1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -25,13 +25,14 @@ Patch0: vlc-trunk-default_font.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch -Patch6: vlc-1.0.0-pre1-libmpeg2_out.patch +Patch6: vlc-1.0.0-bugfix_backport.patch +Patch7: vlc-1.0.0-rc1-pkglibd.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext -%if 0 +%if 1 BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -42,7 +43,7 @@ BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: dbus-devel -%{?_with_dirac: BuildRequires: dirac-devel >= 1.0.0} +BuildRequires: dirac-devel >= 1.0.0 %if %with_directfb BuildRequires: directfb-devel %endif @@ -67,7 +68,7 @@ BuildRequires: libdvbpsi-devel BuildRequires: libdvdnav-devel BuildRequires: libebml-devel BuildRequires: libid3tag-devel -%{?_with_kate: BuildRequires: libkate-devel} +BuildRequires: libkate-devel BuildRequires: libmad-devel BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel @@ -244,18 +245,12 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %if 0%{?fedora} >= 11 %patch5 -p1 -b .xul191 %endif -%patch6 -p1 -b .libmpeg2_out - - -#./bootstrap +%patch6 -p1 -b .bp +%patch7 -p1 -b .pkglibd -#Rip out libmpeg2 -rm ./modules/codec/xvmc/{alloc.c,attributes.h,cpu_accel.c,cpu_state.c,decode.c,header.c,motion_comp.c,motion_comp_mmx.c,mpeg2.h,mpeg2_internal.h,slice.c,slice_xvmc_vld.c,vlc.h,xvmc_vld.h} -touch ./modules/codec/xvmc/{alloc.c,attributes.h,cpu_accel.c,cpu_state.c,decode.c,header.c,motion_comp.c,motion_comp_mmx.c,mpeg2.h,mpeg2_internal.h,slice.c,slice_xvmc_vld.c,vlc.h,xvmc_vld.h} -rm ./modules/codec/xvmc/mpeg2.h -ln -sf %{_includedir}/mpeg2dec/mpeg2.h ./modules/codec/xvmc/mpeg2.h -rm ./modules/codec/xvmc/mpeg2_internal.h -ln -sf %{_includedir}/mpeg2dec/mpeg2_internal.h ./modules/codec/xvmc/mpeg2_internal.h +rm autotools/* m4/lib* +cp -p %{_datadir}/gettext/config.rpath autotools +./bootstrap %build @@ -298,7 +293,7 @@ popd --enable-speex \ --enable-tarkin \ --enable-theora \ - %{?_with_dirac:--enable-dirac} \ + --enable-dirac \ --enable-svg \ --enable-snapshot \ %ifarch %{ix86} x86_64 @@ -512,6 +507,13 @@ fi || : %changelog +* Tue May 12 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.4rc1 +- Update to 1.0.0-rc1 +- Add 1.0-bugfix patches + +* Fri Apr 17 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.3pre2 +- Update to 1.0.0-pre2 + * Fri Apr 10 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.2pre1 - Re-enable xxmc - Remove libmpeg2 out From 659d71d002312c5219f7109c3e135a73dbd0640e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 13 May 2009 10:35:08 +0000 Subject: [PATCH 041/671] 0.5 --- ...-missing-symbol-in-libxvmc_plugin.so.patch | 38 +++++++++++++++++++ vlc-1.0.0-bugfix_backport.patch | 12 ++++++ vlc.spec | 11 ++++-- 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch diff --git a/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch b/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch new file mode 100644 index 0000000..4e4511a --- /dev/null +++ b/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch @@ -0,0 +1,38 @@ +From b0b453e4e70073d63aebe6bb259f4c891ba08c21 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Wed, 13 May 2009 11:17:44 +0200 +Subject: [PATCH] Fix missing symbol in libxvmc_plugin.so + +the XvMC plugin use xcommon.c where some part use +HAVE_XINERAMA conditions. + +Missing symbols are : +XineramaQueryScreens +XineramaQueryExtension +XineramaIsActive +--- + configure.ac | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index be6e24c..414a29d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4106,12 +4106,14 @@ AS_IF([test "$enable_xinerama" != "no"], [ + VLC_ADD_LIBS([xvideo],[-lXinerama_pic]) + VLC_ADD_LIBS([x11],[-lXinerama_pic]) + VLC_ADD_LIBS([glx],[-lXinerama_pic]) ++ VLC_ADD_LIBS([xvmc],[-lXinerama_pic]) + ac_cv_have_xinerama="yes" + ],[ + AC_CHECK_LIB(Xinerama, XineramaQueryExtension,[ + VLC_ADD_LIBS([xvideo],[-lXinerama]) + VLC_ADD_LIBS([x11],[-lXinerama]) + VLC_ADD_LIBS([glx],[-lXinerama]) ++ VLC_ADD_LIBS([xvmc],[-lXinerama]) + ac_cv_have_xinerama="yes" + ]) + ]) +-- +1.6.0.6 + diff --git a/vlc-1.0.0-bugfix_backport.patch b/vlc-1.0.0-bugfix_backport.patch index b43657c..cce6381 100644 --- a/vlc-1.0.0-bugfix_backport.patch +++ b/vlc-1.0.0-bugfix_backport.patch @@ -1,3 +1,15 @@ +diff --git a/src/libvlccore.sym b/src/libvlccore.sym +index ac68b0e..d72c10f 100644 +--- a/src/libvlccore.sym ++++ b/src/libvlccore.sym +@@ -216,6 +216,7 @@ libvlc_InternalInit + libvlc_InternalWait + libvlc_Quit + LocaleFree ++make_URI + mdate + module_config_free + module_config_get diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index 4085e25..5794c0a 100644 --- a/include/vlc/libvlc.h diff --git a/vlc.spec b/vlc.spec index cf97f19..0b35c55 100644 --- a/vlc.spec +++ b/vlc.spec @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.4rc1%{?dist} +Release: 0.5rc1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -27,6 +27,7 @@ Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch Patch6: vlc-1.0.0-bugfix_backport.patch Patch7: vlc-1.0.0-rc1-pkglibd.patch +Patch8: 0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -173,9 +174,6 @@ mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network. -Non-default rpmbuild options: ---with dirac: Enable dirac codec support ---with kate: Enable kate codec support %description devel @@ -247,6 +245,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %endif %patch6 -p1 -b .bp %patch7 -p1 -b .pkglibd +%patch8 -p1 -b .xvmc rm autotools/* m4/lib* cp -p %{_datadir}/gettext/config.rpath autotools @@ -507,6 +506,10 @@ fi || : %changelog +* Wed May 13 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.5rc1 +- Fix missing XvMC symbols +- Fix export make_URI + * Tue May 12 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.4rc1 - Update to 1.0.0-rc1 - Add 1.0-bugfix patches From 99c6493abf1ca1e7f91a825053b3c9d95ad4b6fe Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 26 May 2009 12:24:41 +0000 Subject: [PATCH 042/671] Remove old pathes --- vlc-1.0.0-bugfix_backport.patch | 763 -------------------------------- vlc-1.0.0-rc1-pkglibd.patch | 15 - 2 files changed, 778 deletions(-) delete mode 100644 vlc-1.0.0-bugfix_backport.patch delete mode 100644 vlc-1.0.0-rc1-pkglibd.patch diff --git a/vlc-1.0.0-bugfix_backport.patch b/vlc-1.0.0-bugfix_backport.patch deleted file mode 100644 index cce6381..0000000 --- a/vlc-1.0.0-bugfix_backport.patch +++ /dev/null @@ -1,763 +0,0 @@ -diff --git a/src/libvlccore.sym b/src/libvlccore.sym -index ac68b0e..d72c10f 100644 ---- a/src/libvlccore.sym -+++ b/src/libvlccore.sym -@@ -216,6 +216,7 @@ libvlc_InternalInit - libvlc_InternalWait - libvlc_Quit - LocaleFree -+make_URI - mdate - module_config_free - module_config_get -diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h -index 4085e25..5794c0a 100644 ---- a/include/vlc/libvlc.h -+++ b/include/vlc/libvlc.h -@@ -1065,7 +1065,7 @@ VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc - * \param i_height the snapshot's height - * \param p_e an initialized exception pointer - */ --VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * ); -+VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * ); - - /** - * Resize the current video output window. -diff --git a/include/vlc_url.h b/include/vlc_url.h -index dc2a021..448c685 100644 ---- a/include/vlc_url.h -+++ b/include/vlc_url.h -@@ -48,8 +48,9 @@ struct vlc_url_t - VLC_EXPORT( char *, unescape_URI_duplicate, ( const char *psz ) ); - VLC_EXPORT( void, unescape_URI, ( char *psz ) ); - VLC_EXPORT( char *, decode_URI_duplicate, ( const char *psz ) ); --VLC_EXPORT( void, decode_URI, ( char *psz ) ); -+VLC_EXPORT( char *, decode_URI, ( char *psz ) ); - VLC_EXPORT( char *, encode_URI_component, ( const char *psz ) ); -+VLC_EXPORT( char *, make_URI, ( const char *path ) ); - - /***************************************************************************** - * vlc_UrlParse: -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 19e4b75..86bd6dd 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -176,16 +176,15 @@ static int Open ( vlc_object_t *p_this ) - goto fail; - } - -- a.maxlength = pa_bytes_per_second(&ss)/4/pa_frame_size(&ss); -- a.tlength = a.maxlength*9/10; -- a.prebuf = a.tlength/2; -- a.minreq = a.tlength/10; -- -- a.maxlength *= pa_frame_size(&ss); -- a.tlength *= pa_frame_size(&ss); -- a.prebuf *= pa_frame_size(&ss); -- a.minreq *= pa_frame_size(&ss); -- -+ /* Reduce overall latency to 200mS to reduce audible clicks -+ * Also pulse minreq and internal buffers are now 20mS which reduces resampling -+ */ -+ a.tlength = pa_bytes_per_second(&ss)/5; -+ a.maxlength = a.tlength * 2; -+ a.prebuf = a.tlength; -+ a.minreq = a.tlength / 10; -+ -+ /* Buffer size is 20mS */ - p_sys->buffer_size = a.minreq; - - /* Initialise the speaker map setup above */ -@@ -240,7 +239,7 @@ static int Open ( vlc_object_t *p_this ) - pa_stream_set_write_callback(p_sys->stream, stream_request_cb, p_aout); - pa_stream_set_latency_update_callback(p_sys->stream, stream_latency_update_cb, p_aout); - -- if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) { -+ if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { - msg_Err(p_aout, "Failed to connect stream: %s", pa_strerror(pa_context_errno(p_sys->context))); - goto unlock_and_fail; - } -@@ -448,16 +447,11 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) { - latency = 0; - - } -+ - PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency); - next_date = mdate() + latency; - -- - if(p_sys->start_date < next_date + AOUT_PTS_TOLERANCE ){ -- /* -- vlc_mutex_lock( &p_aout->output_fifo_lock ); -- p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); -- vlc_mutex_unlock( &p_aout->output_fifo_lock ); -- */ - p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0); - } - } -diff --git a/modules/control/http/http.c b/modules/control/http/http.c -index 5bce03b..75f24c2 100644 ---- a/modules/control/http/http.c -+++ b/modules/control/http/http.c -@@ -555,18 +555,11 @@ int HandlerCallback( httpd_handler_sys_t *p_args, - int i_env = 0; - char **ppsz_env = NULL; - char *psz_tmp; -- char sep; - size_t i_buffer; - char *p_buffer; - char *psz_cwd, *psz_file = NULL; - int i_ret; - --#ifdef WIN32 -- sep = '\\'; --#else -- sep = '/'; --#endif -- - /* Create environment for the CGI */ - TAB_APPEND( i_env, ppsz_env, strdup("GATEWAY_INTERFACE=CGI/1.1") ); - TAB_APPEND( i_env, ppsz_env, strdup("SERVER_PROTOCOL=HTTP/1.1") ); -@@ -677,7 +670,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, - } - } - -- psz_file = strrchr( p_args->file.file, sep ); -+ psz_file = strrchr( p_args->file.file, DIR_SEP_CHAR ); - if( psz_file != NULL ) - { - psz_file++; -@@ -694,7 +687,7 @@ int HandlerCallback( httpd_handler_sys_t *p_args, - NULL ); - - psz_tmp = strdup( p_args->file.file ); -- p = strrchr( psz_tmp, sep ); -+ p = strrchr( psz_tmp, DIR_SEP_CHAR ); - if( p != NULL ) - { - *p = '\0'; -diff --git a/modules/control/http/util.c b/modules/control/http/util.c -index a8b7861..69de4a6 100644 ---- a/modules/control/http/util.c -+++ b/modules/control/http/util.c -@@ -120,14 +120,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, - - int i_dirlen; - -- char sep; -- --#if defined( WIN32 ) -- sep = '\\'; --#else -- sep = '/'; --#endif -- - if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL ) - { - if( errno != ENOENT && errno != ENOTDIR ) -@@ -145,7 +137,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, - - msg_Dbg( p_intf, "dir=%s", psz_dir ); - -- snprintf( dir, sizeof( dir ), "%s%c.access", psz_dir, sep ); -+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".access", psz_dir ); - if( ( file = utf8_fopen( dir, "r" ) ) != NULL ) - { - char line[1024]; -@@ -179,7 +171,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, - fclose( file ); - } - -- snprintf( dir, sizeof( dir ), "%s%c.hosts", psz_dir, sep ); -+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP".hosts", psz_dir ); - p_acl = ACL_Create( p_intf, false ); - if( ACL_LoadFile( p_acl, dir ) ) - { -@@ -210,7 +202,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root, - continue; - } - -- snprintf( dir, sizeof( dir ), "%s%c%s", psz_dir, sep, psz_filename ); -+ snprintf( dir, sizeof( dir ), "%s"DIR_SEP"%s", psz_dir, psz_filename ); - free( psz_filename ); - - if( ParseDirectory( p_intf, psz_root, dir ) ) -@@ -912,13 +904,12 @@ char *RealPath( const char *psz_src ) - char *psz_dir; - char *p; - int i_len = strlen(psz_src); -- const char sep = DIR_SEP_CHAR; - - psz_dir = malloc( i_len + 2 ); - strcpy( psz_dir, psz_src ); - - /* Add a trailing sep to ease the .. step */ -- psz_dir[i_len] = sep; -+ psz_dir[i_len] = DIR_SEP_CHAR; - psz_dir[i_len + 1] = '\0'; - - #if (DIR_SEP_CHAR != '/') -@@ -926,18 +917,18 @@ char *RealPath( const char *psz_src ) - p = psz_dir; - while( (p = strchr( p, '/' )) != NULL ) - { -- *p = sep; -+ *p = DIR_SEP_CHAR; - } - #endif - - /* FIXME: this could be O(N) rather than O(N²)... */ - /* Remove multiple separators and /./ */ - p = psz_dir; -- while( (p = strchr( p, sep )) != NULL ) -+ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL ) - { -- if( p[1] == sep ) -+ if( p[1] == DIR_SEP_CHAR ) - memmove( &p[1], &p[2], strlen(&p[2]) + 1 ); -- else if( p[1] == '.' && p[2] == sep ) -+ else if( p[1] == '.' && p[2] == DIR_SEP_CHAR ) - memmove( &p[1], &p[3], strlen(&p[3]) + 1 ); - else - p++; -@@ -955,13 +946,13 @@ char *RealPath( const char *psz_src ) - { - /* Fix all .. dir */ - p = psz_dir + 3; -- while( (p = strchr( p, sep )) != NULL ) -+ while( (p = strchr( p, DIR_SEP_CHAR )) != NULL ) - { -- if( p[-1] == '.' && p[-2] == '.' && p[-3] == sep ) -+ if( p[-1] == '.' && p[-2] == '.' && p[-3] == DIR_SEP_CHAR ) - { - char *q; - p[-3] = '\0'; -- if( (q = strrchr( psz_dir, sep )) != NULL ) -+ if( (q = strrchr( psz_dir, DIR_SEP_CHAR )) != NULL ) - { - memmove( q + 1, p + 1, strlen(p + 1) + 1 ); - p = q + 1; -@@ -979,8 +970,8 @@ char *RealPath( const char *psz_src ) - - /* Remove trailing sep if there are at least 2 sep in the string - * (handles the C:\ stuff) */ -- p = strrchr( psz_dir, sep ); -- if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, sep ) ) -+ p = strrchr( psz_dir, DIR_SEP_CHAR ); -+ if( p != NULL && p[1] == '\0' && p != strchr( psz_dir, DIR_SEP_CHAR ) ) - *p = '\0'; - - return psz_dir; -diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp -index ab0eb9a..8baf686 100644 ---- a/modules/gui/qt4/main_interface.cpp -+++ b/modules/gui/qt4/main_interface.cpp -@@ -637,7 +637,7 @@ QSize MainInterface::sizeHint() const - */ - void MainInterface::doComponentsUpdate() - { -- if( isFullScreen() ) return; -+ if( isFullScreen() || isMaximized() ) return; - - msg_Dbg( p_intf, "Updating the geometry" ); - /* Here we resize to sizeHint() and not adjustsize because we want -diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c -index 9b7ef96..0f5f82c 100644 ---- a/modules/misc/playlist/xspf.c -+++ b/modules/misc/playlist/xspf.c -@@ -34,11 +34,14 @@ - #include - #include - #include --#include -+#include - #include "xspf.h" - - #include - -+static void xspf_export_item( playlist_item_t *, FILE *, int * ); -+static void xspf_extension_item( playlist_item_t *, FILE *, int * ); -+ - /** - * \brief Prints the XSPF header to file, writes each item by xspf_export_item() - * and closes the open xml elements -@@ -139,7 +142,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, - - if( psz_uri && *psz_uri ) - { -- psz = assertUTF8URI( psz_uri ); -+ psz = make_URI( psz_uri ); - fprintf( p_file, "\t\t\t%s\n", psz ); - free( psz ); - } -@@ -209,7 +212,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, - if( psz == NULL ) psz = strdup( "" ); - if( !EMPTY_STR( psz ) ) - { -- psz_uri = assertUTF8URI( psz ); -+ psz_uri = make_URI( psz ); - fprintf( p_file, "\t\t\t%s\n", psz_uri ); - free( psz_uri ); - } -@@ -284,89 +287,3 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file, - - return; - } -- --/** -- * \param psz_name the location of the media ressource (e.g. local file, -- * device, network stream, etc.) -- * \return a new char buffer which asserts that the location is valid UTF-8 -- * and a valid URI -- * \note the returned buffer must be freed, when it isn't used anymore -- */ --static char *assertUTF8URI( char *psz_name ) --{ -- char *psz_ret = NULL; /**< the new result buffer to return */ -- char *psz_s = NULL, *psz_d = NULL; /**< src & dest pointers for URI conversion */ -- bool b_uri_is_file = false; /**< we do additional %-encoding if the URI is a file:// one */ -- -- if( !psz_name || !*psz_name ) -- return NULL; -- -- /* check that string is valid UTF-8 */ -- /* XXX: Why do we even need to do that ? (all strings in core are UTF-8 encoded */ -- if( !( psz_s = EnsureUTF8( psz_name ) ) ) -- return NULL; -- -- /* max. 3x for URI conversion (percent escaping) and -- 8 bytes for "file://" and NULL-termination */ -- psz_ret = (char *)malloc( strlen(psz_name)*6*3+8 ); -- if( !psz_ret ) -- return NULL; -- -- /** \todo check for a valid scheme part preceding the colon */ -- if( strstr( psz_s, "://") != NULL ) -- { -- size_t i_delim = strcspn( psz_s, ":" ); -- i_delim++; /* skip the ':' */ -- strncpy( psz_ret, psz_s, i_delim ); -- psz_d = psz_ret + i_delim; -- -- if( !strncmp( psz_s, "file://", 7 ) ) -- b_uri_is_file = true; -- -- psz_s += i_delim; -- } -- /* assume "file" scheme if no scheme-part is included */ -- else -- { -- strcpy( psz_ret, "file://" ); -- psz_d = psz_ret + 7; -- b_uri_is_file = true; -- } -- -- while( *psz_s ) -- { -- /* percent-encode all non-ASCII and the XML special characters and the percent sign itself */ -- if( *psz_s & B10000000 || -- *psz_s == '<' || -- *psz_s == '>' || -- *psz_s == '&' || -- *psz_s == ' ' || -- *psz_s == '+' || -- *psz_s == '%' || -- *psz_s == '\\' || -- ( b_uri_is_file && ( -- *psz_s == ':' || -- *psz_s == '"' || -- *psz_s == '?' || -- *psz_s == '#' || -- *psz_s == '[' || -- *psz_s == ']' || -- *psz_s == '@' ) -- ) -- ) -- { -- *psz_d++ = '%'; -- *psz_d++ = hexchars[(*psz_s >> 4) & B00001111]; -- *psz_d++ = hexchars[*psz_s & B00001111]; -- } -- else -- { -- *psz_d++ = *psz_s; -- } -- -- psz_s++; -- } -- *psz_d = '\0'; -- -- return (char *)realloc( psz_ret, strlen( psz_ret ) + 1 ); --} -diff --git a/modules/misc/playlist/xspf.h b/modules/misc/playlist/xspf.h -index 9a8ac6b..adfaa90 100644 ---- a/modules/misc/playlist/xspf.h -+++ b/modules/misc/playlist/xspf.h -@@ -33,6 +33,3 @@ const char hexchars[16] = "0123456789ABCDEF"; - - /* prototypes */ - int xspf_export_playlist( vlc_object_t * ); --static void xspf_export_item( playlist_item_t *, FILE *, int * ); --static void xspf_extension_item( playlist_item_t *, FILE *, int * ); --static char *assertUTF8URI( char * ); -diff --git a/modules/misc/screensaver.c b/modules/misc/screensaver.c -index 24448bc..b5d8946 100644 ---- a/modules/misc/screensaver.c -+++ b/modules/misc/screensaver.c -@@ -50,6 +50,10 @@ - #define GS_PATH "/org/gnome/ScreenSaver" - #define GS_INTERFACE "org.gnome.ScreenSaver" - -+#define FDS_SERVICE "org.freedesktop.ScreenSaver" -+#define FDS_PATH "/ScreenSaver" -+#define FDS_INTERFACE "org.freedesktop.ScreenSaver" -+ - #endif - - /***************************************************************************** -@@ -67,8 +71,11 @@ static void poke_screensaver( intf_thread_t *p_intf, - DBusConnection *p_connection ); - static void screensaver_send_message_void ( intf_thread_t *p_intf, - DBusConnection *p_connection, -+ const char *psz_service, -+ const char *psz_path, -+ const char *psz_interface, - const char *psz_name ); --static bool screensaver_is_running( DBusConnection *p_connection ); -+static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service ); - - - struct intf_sys_t -@@ -235,34 +242,47 @@ static DBusConnection * dbus_init( intf_thread_t *p_intf ) - static void poke_screensaver( intf_thread_t *p_intf, - DBusConnection *p_connection ) - { -- if( screensaver_is_running( p_connection ) ) -+ if( screensaver_is_running( p_connection, GS_SERVICE ) ) - { - # ifdef SCREENSAVER_DEBUG - msg_Dbg( p_intf, "found a running gnome-screensaver instance" ); - # endif - /* gnome-screensaver changed it's D-Bus interface, so we need both */ -- screensaver_send_message_void( p_intf, p_connection, "Poke" ); -- screensaver_send_message_void( p_intf, p_connection, -- "SimulateUserActivity" ); -+ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH, -+ GS_INTERFACE, "Poke" ); -+ screensaver_send_message_void( p_intf, p_connection, GS_SERVICE, GS_PATH, -+ GS_INTERFACE, "SimulateUserActivity" ); -+ } -+ else if( screensaver_is_running( p_connection, FDS_SERVICE ) ) -+ { -+# ifdef SCREENSAVER_DEBUG -+ msg_Dbg( p_intf, "found a running freedesktop-screensaver instance" ); -+# endif -+ screensaver_send_message_void( p_intf, p_connection, FDS_SERVICE, FDS_PATH, -+ FDS_INTERFACE, "SimulateUserActivity" ); - } - # ifdef SCREENSAVER_DEBUG - else - { -- msg_Dbg( p_intf, "found no running gnome-screensaver instance" ); -+ msg_Dbg( p_intf, "found no running (gnome|freedesktop)-screensaver instance" ); - } - # endif -+ - } - - static void screensaver_send_message_void ( intf_thread_t *p_intf, - DBusConnection *p_connection, -+ const char *psz_service, -+ const char *psz_path, -+ const char *psz_interface, - const char *psz_name ) - { - DBusMessage *p_message; - - if( !p_connection || !psz_name ) return; - -- p_message = dbus_message_new_method_call( GS_SERVICE, GS_PATH, -- GS_INTERFACE, psz_name ); -+ p_message = dbus_message_new_method_call( psz_service, psz_path, -+ psz_interface, psz_name ); - if( p_message == NULL ) - { - msg_Err( p_intf, "DBUS initialization failed: message initialization" ); -@@ -279,7 +299,7 @@ static void screensaver_send_message_void ( intf_thread_t *p_intf, - dbus_message_unref( p_message ); - } - --static bool screensaver_is_running( DBusConnection *p_connection ) -+static bool screensaver_is_running( DBusConnection *p_connection, const char *psz_service ) - { - DBusError error; - bool b_return; -@@ -287,7 +307,7 @@ static bool screensaver_is_running( DBusConnection *p_connection ) - if( !p_connection ) return false; - - dbus_error_init( &error ); -- b_return = dbus_bus_name_has_owner( p_connection, GS_SERVICE, &error ); -+ b_return = dbus_bus_name_has_owner( p_connection, psz_service, &error ); - if( dbus_error_is_set( &error ) ) dbus_error_free (&error); - - return b_return; -diff --git a/src/control/video.c b/src/control/video.c -index 567532c..81c0052 100644 ---- a/src/control/video.c -+++ b/src/control/video.c -@@ -104,7 +104,7 @@ void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi, - } - - void --libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, char *psz_filepath, -+libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, const char *psz_filepath, - unsigned int i_width, unsigned int i_height, libvlc_exception_t *p_e ) - { - vout_thread_t *p_vout = GetVout( p_mi, p_e ); -diff --git a/src/test/url.c b/src/test/url.c -index a097aca..d03e48c 100644 ---- a/src/test/url.c -+++ b/src/test/url.c -@@ -29,6 +29,7 @@ - - #include - #include -+#include - - typedef char * (*conv_t) (const char *); - -@@ -60,8 +61,15 @@ static inline void test_b64 (const char *in, const char *out) - test (vlc_b64_encode, in, out); - } - -+static inline void test_path (const char *in, const char *out) -+{ -+ test (make_URI, in, out); -+} -+ - int main (void) - { -+ int val; -+ - (void)setvbuf (stdout, NULL, _IONBF, 0); - test_decode ("this_should_not_be_modified_1234", - "this_should_not_be_modified_1234"); -@@ -93,5 +101,24 @@ int main (void) - test_b64 ("fooba", "Zm9vYmE="); - test_b64 ("foobar", "Zm9vYmFy"); - -+ /* Path test */ -+ test_path ("file:///", "file:///"); -+ test_path ("http://www.example.com/%7Ejohn/", -+ "http://www.example.com/%7Ejohn/"); -+ test_path ("/", "file:///"); -+ test_path ("/home/john/", "file:///home/john/"); -+ test_path ("/home/john/music.ogg", "file:///home/john/music.ogg"); -+ //test_path ("\\\\server/pub/music.ogg", "file://server/pub/music.ogg"); -+ -+ /*int fd = open (".", O_RDONLY); -+ assert (fd != -1);*/ -+ val = chdir ("/tmp"); -+ assert (val != -1); -+ test_path ("movie.ogg", "file:///tmp/movie.ogg"); -+ test_path (".", "file:///tmp/."); -+ test_path ("", "file:///tmp/"); -+ /*val = fchdir (fd); -+ assert (val != -1);*/ -+ - return 0; - } -diff --git a/src/text/strings.c b/src/text/strings.c -index 8a0229c..860aae7 100644 ---- a/src/text/strings.c -+++ b/src/text/strings.c -@@ -130,7 +131,7 @@ void unescape_URI( char *psz ) - } - - /** -- * Decode encoded URI string -+ * Decode encoded URI component. See also decode_URI(). - * \return decoded duplicated string - */ - char *decode_URI_duplicate( const char *psz ) -@@ -141,14 +142,23 @@ char *decode_URI_duplicate( const char *psz ) - } - - /** -- * Decode encoded URI string in place -- * \return nothing -+ * Decode an encoded URI component in place. -+ * This function does NOT decode entire URIs. -+ * It decodes components (e.g. host name, directory, file name). -+ * Decoded URIs do not exist in the real world (see RFC3986 §2.4). -+ * Complete URIs are always "encoded" (or they are syntaxically invalid). -+ * -+ * Note that URI encoding is different from Javascript escaping. Especially, -+ * white spaces and Unicode non-ASCII code points are encoded differently. -+ * -+ * \return psz on success, NULL if it was not properly encoded - */ --void decode_URI( char *psz ) -+char *decode_URI( char *psz ) - { - unsigned char *in = (unsigned char *)psz, *out = in, c; -+ - if( psz == NULL ) -- return; -+ return NULL; - - while( ( c = *in++ ) != '\0' ) - { -@@ -160,14 +170,14 @@ void decode_URI( char *psz ) - - if( ( ( hex[0] = *in++ ) == 0 ) - || ( ( hex[1] = *in++ ) == 0 ) ) -- return; -+ return NULL; - - hex[2] = '\0'; - *out++ = (unsigned char)strtoul( hex, NULL, 0x10 ); - break; - } - -- case '+': -+ case '+': /* This is HTTP forms, not URI decoding... */ - *out++ = ' '; - break; - -@@ -182,6 +192,7 @@ void decode_URI( char *psz ) - } - *out = '\0'; - EnsureUTF8( psz ); -+ return psz; - } - - static inline bool isurisafe( int c ) -@@ -193,23 +204,13 @@ static inline bool isurisafe( int c ) - || ( strchr( "-._~", c ) != NULL ); - } - --/** -- * Encodes an URI component (RFC3986 §2). -- * -- * @param psz_uri nul-terminated UTF-8 representation of the component. -- * Obviously, you can't pass an URI containing a nul character, but you don't -- * want to do that, do you? -- * -- * @return encoded string (must be free()'d), or NULL for ENOMEM. -- */ --char *encode_URI_component( const char *psz_uri ) -+static char *encode_URI_bytes (const char *psz_uri, size_t len) - { -- char *psz_enc = malloc ((3 * strlen (psz_uri)) + 1), *out = psz_enc; -- -+ char *psz_enc = malloc (3 * len + 1), *out = psz_enc; - if (psz_enc == NULL) - return NULL; - -- while (*psz_uri) -+ for (size_t i = 0; i < len; i++) - { - static const char hex[16] = "0123456789ABCDEF"; - uint8_t c = *psz_uri; -@@ -232,6 +233,21 @@ char *encode_URI_component( const char *psz_uri ) - return out ? out : psz_enc; /* realloc() can fail (safe) */ - } - -+/** -+ * Encodes an URI component (RFC3986 §2). -+ * -+ * @param psz_uri nul-terminated UTF-8 representation of the component. -+ * Obviously, you can't pass an URI containing a nul character, but you don't -+ * want to do that, do you? -+ * -+ * @return encoded string (must be free()'d), or NULL for ENOMEM. -+ */ -+char *encode_URI_component( const char *psz_uri ) -+{ -+ return encode_URI_bytes (psz_uri, strlen (psz_uri)); -+} -+ -+ - static const struct xml_entity_s - { - char psz_entity[8]; -@@ -1120,3 +1136,78 @@ void path_sanitize( char *str ) - str++; - } - } -+ -+#include -+ -+/** -+ * Convert a file path to an URI. If already an URI, do nothing. -+ */ -+char *make_URI (const char *path) -+{ -+ if (path == NULL) -+ return NULL; -+ if (strstr (path, "://") != NULL) -+ return strdup (path); /* Already an URI */ -+ /* Note: VLC cannot handle URI schemes without double slash after the -+ * scheme name (such as mailto: or news:). */ -+ -+ char *buf; -+#ifdef WIN32 -+ if (isalpha (path[0]) && (path[1] == ':')) -+ { -+ if (asprintf (&buf, "file:///%c:", path[0]) == -1) -+ buf = NULL; -+ path += 2; -+ } -+ else -+#endif -+#if 0 -+ /* Windows UNC paths (file://host/share/path instead of file:///path) */ -+ if (!strncmp (path, "\\\\", 2)) -+ { -+ path += 2; -+ buf = strdup ("file://"); -+ } -+ else -+#endif -+ if (path[0] != DIR_SEP_CHAR) -+ { /* Relative path: prepend the current working directory */ -+ char cwd[PATH_MAX]; -+ -+ if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */ -+ return NULL; -+ if (asprintf (&buf, "%s/%s", cwd, path) == -1) -+ return NULL; -+ char *ret = make_URI (buf); -+ free (buf); -+ return ret; -+ } -+ else -+ buf = strdup ("file://"); -+ if (buf == NULL) -+ return NULL; -+ -+ assert (path[0] == DIR_SEP_CHAR); -+ -+ /* Absolute file path */ -+ for (const char *ptr = path + 1;; ptr++) -+ { -+ size_t len = strcspn (ptr, DIR_SEP); -+ char *component = encode_URI_bytes (ptr, len); -+ if (component == NULL) -+ { -+ free (buf); -+ return NULL; -+ } -+ char *uri; -+ int val = asprintf (&uri, "%s/%s", buf, component); -+ free (component); -+ free (buf); -+ if (val == -1) -+ return NULL; -+ buf = uri; -+ ptr += len; -+ if (*ptr == '\0') -+ return buf; -+ } -+} diff --git a/vlc-1.0.0-rc1-pkglibd.patch b/vlc-1.0.0-rc1-pkglibd.patch deleted file mode 100644 index addd89d..0000000 --- a/vlc-1.0.0-rc1-pkglibd.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up vlc-1.0.0-rc1/configure.ac.pkglibd vlc-1.0.0-rc1/configure.ac ---- vlc-1.0.0-rc1/configure.ac.pkglibd 2009-05-12 14:39:52.000000000 +0200 -+++ vlc-1.0.0-rc1/configure.ac 2009-05-12 14:40:02.000000000 +0200 -@@ -144,11 +144,6 @@ AC_ARG_WITH(contrib, - CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include" - OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include" - OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include" -- if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then -- export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH -- else -- export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig -- fi - LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib" - LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib" - From d0a52c7b5af0cbbcc4356046f8e01e51da2e33f2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 26 May 2009 12:25:23 +0000 Subject: [PATCH 043/671] Remove very old patch --- ...-missing-symbol-in-libxvmc_plugin.so.patch | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch diff --git a/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch b/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch deleted file mode 100644 index 4e4511a..0000000 --- a/0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b0b453e4e70073d63aebe6bb259f4c891ba08c21 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) -Date: Wed, 13 May 2009 11:17:44 +0200 -Subject: [PATCH] Fix missing symbol in libxvmc_plugin.so - -the XvMC plugin use xcommon.c where some part use -HAVE_XINERAMA conditions. - -Missing symbols are : -XineramaQueryScreens -XineramaQueryExtension -XineramaIsActive ---- - configure.ac | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index be6e24c..414a29d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4106,12 +4106,14 @@ AS_IF([test "$enable_xinerama" != "no"], [ - VLC_ADD_LIBS([xvideo],[-lXinerama_pic]) - VLC_ADD_LIBS([x11],[-lXinerama_pic]) - VLC_ADD_LIBS([glx],[-lXinerama_pic]) -+ VLC_ADD_LIBS([xvmc],[-lXinerama_pic]) - ac_cv_have_xinerama="yes" - ],[ - AC_CHECK_LIB(Xinerama, XineramaQueryExtension,[ - VLC_ADD_LIBS([xvideo],[-lXinerama]) - VLC_ADD_LIBS([x11],[-lXinerama]) - VLC_ADD_LIBS([glx],[-lXinerama]) -+ VLC_ADD_LIBS([xvmc],[-lXinerama]) - ac_cv_have_xinerama="yes" - ]) - ]) --- -1.6.0.6 - From 4ed2da14ce5e1a0ce4b524dd51239545e3d481f0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 27 May 2009 11:34:29 +0000 Subject: [PATCH 044/671] Update to 1.0.0-rc2 --- .gitignore | 2 +- 0001-Default-libv4l2-to-true.patch | 25 +++++++++ 0002-Default-aout-for-pulse.patch | 25 +++++++++ sources | 2 +- vlc-1.0.0-pre1-xulrunner-191_support.patch | 59 ++++++++++------------ vlc.spec | 53 +++++++++++++++---- 6 files changed, 123 insertions(+), 43 deletions(-) create mode 100644 0001-Default-libv4l2-to-true.patch create mode 100644 0002-Default-aout-for-pulse.patch diff --git a/.gitignore b/.gitignore index 5e22f9c..5a1cfca 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.0.0-rc1.tar.bz2 +vlc-1.0.0-rc2.tar.bz2 diff --git a/0001-Default-libv4l2-to-true.patch b/0001-Default-libv4l2-to-true.patch new file mode 100644 index 0000000..4130154 --- /dev/null +++ b/0001-Default-libv4l2-to-true.patch @@ -0,0 +1,25 @@ +From d3bef7cde676ad96ce036cb10aa534ca1c5d0e24 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Tue, 26 May 2009 18:38:07 +0200 +Subject: [PATCH] Default libv4l2 to true + +--- + modules/access/v4l2.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c +index 31dae66..42a8e9d 100644 +--- a/modules/access/v4l2.c ++++ b/modules/access/v4l2.c +@@ -261,7 +261,7 @@ vlc_module_begin () + add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, + CACHING_TEXT, CACHING_LONGTEXT, true ) + #ifdef HAVE_LIBV4L2 +- add_bool( CFG_PREFIX "use-libv4l2", false, NULL, LIBV4L2_TEXT, LIBV4L2_LONGTEXT, true ); ++ add_bool( CFG_PREFIX "use-libv4l2", true, NULL, LIBV4L2_TEXT, LIBV4L2_LONGTEXT, true ); + #endif + + set_section( N_( "Tuner" ), NULL ) +-- +1.6.0.6 + diff --git a/0002-Default-aout-for-pulse.patch b/0002-Default-aout-for-pulse.patch new file mode 100644 index 0000000..d217d49 --- /dev/null +++ b/0002-Default-aout-for-pulse.patch @@ -0,0 +1,25 @@ +From bba9ed13be6a4dade99360583dcc4a9eef62d1f4 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Tue, 26 May 2009 23:11:50 +0200 +Subject: [PATCH] Default aout for pulse + +--- + modules/audio_output/pulse.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 86bd6dd..93b2763 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -97,7 +97,7 @@ static void uninit(aout_instance_t *p_aout); + vlc_module_begin () + set_shortname( "Pulse Audio" ) + set_description( N_("Pulseaudio audio output") ) +- set_capability( "audio output", 40 ) ++ set_capability( "audio output", 200 ) + set_category( CAT_AUDIO ) + set_subcategory( SUBCAT_AUDIO_AOUT ) + add_shortcut( "pulseaudio" ) +-- +1.6.0.6 + diff --git a/sources b/sources index 60f9367..011ab1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -42e31b46e6faa3e0ce7aec3790f014a3 vlc-1.0.0-rc1.tar.bz2 +c0fe6fff896c165abb5bf949616a1eee vlc-1.0.0-rc2.tar.bz2 diff --git a/vlc-1.0.0-pre1-xulrunner-191_support.patch b/vlc-1.0.0-pre1-xulrunner-191_support.patch index b2c3385..21e2176 100644 --- a/vlc-1.0.0-pre1-xulrunner-191_support.patch +++ b/vlc-1.0.0-pre1-xulrunner-191_support.patch @@ -86,10 +86,10 @@ index e9ffdc5..a6ca2e4 100644 { pluginFuncs->urlnotify = Private_URLNotify; diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 7cabe66..5110c5c 100644 +index 0f6efc0..9ad454c 100644 --- a/projects/mozilla/support/npunix.c +++ b/projects/mozilla/support/npunix.c -@@ -103,160 +103,144 @@ NPN_Version(int* plugin_major, int* plugin_minor, +@@ -103,149 +103,136 @@ NPN_Version(int* plugin_major, int* plugin_minor, NPError NPN_GetValue(NPP instance, NPNVariable variable, void *r_value) { @@ -122,7 +122,7 @@ index 7cabe66..5110c5c 100644 NPError NPN_PostURL(NPP instance, const char* url, const char* window, - uint32 len, const char* buf, NPBool file) + uint32_t len, const char* buf, NPBool file) { - return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, - url, window, len, buf, file); @@ -130,7 +130,7 @@ index 7cabe66..5110c5c 100644 } NPError - NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, + NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) { - return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, @@ -155,8 +155,8 @@ index 7cabe66..5110c5c 100644 + return (*gNetscapeFuncs.newstream)(instance, type, window, stream_ptr); } - int32 - NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) + int32_t + NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) { - return CallNPN_WriteProc(gNetscapeFuncs.write, instance, - stream, len, buffer); @@ -185,8 +185,7 @@ index 7cabe66..5110c5c 100644 + return (*gNetscapeFuncs.uagent)(instance); } - void* - NPN_MemAlloc(uint32 size) + void *NPN_MemAlloc(uint32_t size) { - return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); + return (*gNetscapeFuncs.memalloc)(size); @@ -198,7 +197,7 @@ index 7cabe66..5110c5c 100644 + (*gNetscapeFuncs.memfree)(ptr); } - uint32 NPN_MemFlush(uint32 size) + uint32_t NPN_MemFlush(uint32_t size) { - return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); + return (*gNetscapeFuncs.memflush)(size); @@ -263,18 +262,17 @@ index 7cabe66..5110c5c 100644 } NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) - { +@@ -253,8 +240,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) -- { + { - return CallNPN_GetStringIdentifierProc( - gNetscapeFuncs.getstringidentifier, name); -- } + return (*gNetscapeFuncs.getstringidentifier)(name); + } return NULL; } - -@@ -265,19 +249,14 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, +@@ -264,19 +250,14 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -296,7 +294,7 @@ index 7cabe66..5110c5c 100644 return NULL; } -@@ -285,11 +264,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier) +@@ -284,11 +265,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -309,7 +307,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -297,11 +272,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) +@@ -296,11 +273,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -322,7 +320,7 @@ index 7cabe66..5110c5c 100644 return NULL; } -@@ -309,11 +280,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier) +@@ -308,11 +281,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -335,7 +333,7 @@ index 7cabe66..5110c5c 100644 return 0; } -@@ -321,7 +288,7 @@ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) +@@ -320,7 +289,7 @@ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -344,7 +342,7 @@ index 7cabe66..5110c5c 100644 return NULL; } -@@ -329,7 +296,7 @@ NPObject *NPN_RetainObject(NPObject *obj) +@@ -328,7 +297,7 @@ NPObject *NPN_RetainObject(NPObject *obj) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -353,7 +351,7 @@ index 7cabe66..5110c5c 100644 return NULL; } -@@ -337,7 +304,7 @@ void NPN_ReleaseObject(NPObject *obj) +@@ -336,7 +305,7 @@ void NPN_ReleaseObject(NPObject *obj) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -362,7 +360,7 @@ index 7cabe66..5110c5c 100644 } bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, -@@ -345,8 +312,7 @@ bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, +@@ -344,8 +313,7 @@ bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -372,7 +370,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -355,8 +321,7 @@ bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, +@@ -354,8 +322,7 @@ bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -382,7 +380,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -365,8 +330,7 @@ bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, +@@ -364,8 +331,7 @@ bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -392,7 +390,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -375,8 +339,7 @@ bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, +@@ -374,8 +340,7 @@ bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -402,7 +400,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -385,8 +348,7 @@ bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, +@@ -384,8 +349,7 @@ bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -412,7 +410,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -394,8 +356,7 @@ bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) +@@ -393,8 +357,7 @@ bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -422,7 +420,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -403,8 +364,7 @@ bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) +@@ -402,8 +365,7 @@ bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -432,7 +430,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -412,8 +372,7 @@ bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName) +@@ -411,8 +373,7 @@ bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -442,7 +440,7 @@ index 7cabe66..5110c5c 100644 return false; } -@@ -421,14 +380,14 @@ void NPN_ReleaseVariantValue(NPVariant *variant) +@@ -420,14 +381,14 @@ void NPN_ReleaseVariantValue(NPVariant *variant) { int minor = gNetscapeFuncs.version & 0xFF; if( minor >= 14 ) @@ -459,7 +457,7 @@ index 7cabe66..5110c5c 100644 } /*********************************************************************** -@@ -767,22 +726,22 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) +@@ -766,22 +727,22 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) */ pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginFuncs->size = sizeof(NPPluginFuncs); @@ -494,4 +492,3 @@ index 7cabe66..5110c5c 100644 } #ifdef OJI if( minor >= NPVERS_HAS_LIVECONNECT ) - diff --git a/vlc.spec b/vlc.spec index 0b35c55..9a08d41 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,7 +4,7 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -rc1 +%define vlc_rc -rc2 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.5rc1%{?dist} +Release: 0.7rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -21,13 +21,13 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} %if %with_internal_live555 Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif +Source10: vlc-handlers.schemas Patch0: vlc-trunk-default_font.patch +Patch1: 0001-Default-libv4l2-to-true.patch +Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch -Patch6: vlc-1.0.0-bugfix_backport.patch -Patch7: vlc-1.0.0-rc1-pkglibd.patch -Patch8: 0001-Fix-missing-symbol-in-libxvmc_plugin.so.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -236,6 +236,8 @@ VLC plugins for libdc1394 %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .default_font +%patch1 -p1 -b .istrue +%patch2 -p1 -b .defpa #http://trac.videolan.org/vlc/ticket/1383 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in @@ -243,12 +245,9 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %if 0%{?fedora} >= 11 %patch5 -p1 -b .xul191 %endif -%patch6 -p1 -b .bp -%patch7 -p1 -b .pkglibd -%patch8 -p1 -b .xvmc -rm autotools/* m4/lib* -cp -p %{_datadir}/gettext/config.rpath autotools +rm modules/access/videodev2.h +ln -sf %{_includedir}/videodev2.h modules/access/ ./bootstrap @@ -293,6 +292,7 @@ popd --enable-tarkin \ --enable-theora \ --enable-dirac \ + --enable-xcb \ --enable-svg \ --enable-snapshot \ %ifarch %{ix86} x86_64 @@ -373,6 +373,10 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc +#Fix CGonf2 url-handler support +#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas +install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ + %find_lang %{name} @@ -380,7 +384,22 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc rm -rf $RPM_BUILD_ROOT +%pre +if [ "$1" -gt 1 ] ; then +if [ -x %{_bindir}/gconftool-2 ] ; then +export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` +gconftool-2 --makefile-uninstall-rule \ + %{_datadir}/vlc/utils/vlc-handlers.schemas >/dev/null +fi +fi || : + + %post +if [ -x %{_bindir}/gconftool-2 ] ; then +export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` +gconftool-2 --makefile-install-rule \ + %{_datadir}/vlc/utils/vlc-handlers.schemas >/dev/null +fi touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -389,6 +408,15 @@ fi %post core -p /sbin/ldconfig +%preun +if [ "$1" -eq 0 ]; then +if [ -x %{_bindir}/gconftool-2 ] ; then + export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` + gconftool-2 --makefile-uninstall-rule \ + %{_datadir}/vlc/utils/vlc-handlers.schemas >& /dev/null +fi +fi || : + %postun %{_bindir}/update-desktop-database %{_datadir}/applications touch --no-create %{_datadir}/icons/hicolor @@ -506,6 +534,11 @@ fi || : %changelog +* Wed May 27 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.7rc2 +- Update to 1.0.0-rc2 +- Rebase xulrunner patch for -rc2 +- Add GConf2 support for url-handler (based on totem) + * Wed May 13 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.5rc1 - Fix missing XvMC symbols - Fix export make_URI From c0797d3efe7af6ec4eae779bf9497119e6d245f6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 27 May 2009 11:35:45 +0000 Subject: [PATCH 045/671] Add missing schema --- vlc-handlers.schemas | 161 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 vlc-handlers.schemas diff --git a/vlc-handlers.schemas b/vlc-handlers.schemas new file mode 100644 index 0000000..b243c23 --- /dev/null +++ b/vlc-handlers.schemas @@ -0,0 +1,161 @@ + + + + + /schemas/desktop/gnome/url-handlers/mms/command + /desktop/gnome/url-handlers/mms/command + vlc + string + vlc "%s" + + + + + + + + + /schemas/desktop/gnome/url-handlers/mms/needs_terminal + /desktop/gnome/url-handlers/mms/needs_terminal + vlc + bool + false + + + + + + + + + /schemas/desktop/gnome/url-handlers/mms/enabled + /desktop/gnome/url-handlers/mms/enabled + vlc + bool + true + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtp/command + /desktop/gnome/url-handlers/rtp/command + vlc + string + vlc "%s" + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtp/needs_terminal + /desktop/gnome/url-handlers/rtp/needs_terminal + vlc + bool + false + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtp/enabled + /desktop/gnome/url-handlers/rtp/enabled + vlc + bool + true + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtsp/command + /desktop/gnome/url-handlers/rtsp/command + vlc + string + vlc "%s" + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtsp/needs_terminal + /desktop/gnome/url-handlers/rtsp/needs_terminal + vlc + bool + false + + + + + + + + + /schemas/desktop/gnome/url-handlers/rtsp/enabled + /desktop/gnome/url-handlers/rtsp/enabled + vlc + bool + true + + + + + + + + + /schemas/desktop/gnome/url-handlers/mmsh/command + /desktop/gnome/url-handlers/mmsh/command + vlc + string + vlc "%s" + + + + + + + + + /schemas/desktop/gnome/url-handlers/mmsh/needs_terminal + /desktop/gnome/url-handlers/mmsh/needs_terminal + vlc + bool + false + + + + + + + + + /schemas/desktop/gnome/url-handlers/mmsh/enabled + /desktop/gnome/url-handlers/mmsh/enabled + vlc + bool + true + + + + + + + + + From e8c647b16a4bfc1e9d3463e9ce1af5c9edd9063e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 2 Jun 2009 19:26:22 +0000 Subject: [PATCH 046/671] 0.9rc20.9rc2 --- .gitignore | 2 + sources | 2 + vlc-1.0-bugfix-20090602.patch | 1096 +++++++++++++++++ ...3ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch | 66 + vlc.spec | 23 +- 5 files changed, 1187 insertions(+), 2 deletions(-) create mode 100644 vlc-1.0-bugfix-20090602.patch create mode 100644 vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch diff --git a/.gitignore b/.gitignore index 5a1cfca..5a1f971 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ vlc-1.0.0-rc2.tar.bz2 +shine.c +enc_base.h diff --git a/sources b/sources index 011ab1a..4c08ded 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ c0fe6fff896c165abb5bf949616a1eee vlc-1.0.0-rc2.tar.bz2 +c64e9e104b1eeba838a6c87435c6533c shine.c +a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h diff --git a/vlc-1.0-bugfix-20090602.patch b/vlc-1.0-bugfix-20090602.patch new file mode 100644 index 0000000..8db458d --- /dev/null +++ b/vlc-1.0-bugfix-20090602.patch @@ -0,0 +1,1096 @@ +diff --git a/include/vlc_url.h b/include/vlc_url.h +index 448c685..e5b29eb 100644 +--- a/include/vlc_url.h ++++ b/include/vlc_url.h +@@ -45,8 +45,6 @@ struct vlc_url_t + char *psz_buffer; /* to be freed */ + }; + +-VLC_EXPORT( char *, unescape_URI_duplicate, ( const char *psz ) ); +-VLC_EXPORT( void, unescape_URI, ( char *psz ) ); + VLC_EXPORT( char *, decode_URI_duplicate, ( const char *psz ) ); + VLC_EXPORT( char *, decode_URI, ( char *psz ) ); + VLC_EXPORT( char *, encode_URI_component, ( const char *psz ) ); +diff --git a/modules/access/directory.c b/modules/access/directory.c +index 05b6ec1..dd04b6a 100644 +--- a/modules/access/directory.c ++++ b/modules/access/directory.c +@@ -307,6 +307,7 @@ static block_t *Block (access_t *p_access) + { /* End of directory, go back to parent */ + closedir (current->handle); + p_sys->current = current->parent; ++ free (current->uri); + free (current); + + if (p_sys->current == NULL) +@@ -346,14 +347,20 @@ static block_t *Block (access_t *p_access) + + /* Skip current, parent and hidden directories */ + if (entry[0] == '.') ++ { ++ free (entry); + return NULL; ++ } + /* Handle recursion */ + if (p_sys->mode != MODE_COLLAPSE) + { + directory_t *sub = malloc (sizeof (*sub) + strlen (current->path) + 1 + + strlen (entry)); + if (sub == NULL) ++ { ++ free (entry); + return NULL; ++ } + sprintf (sub->path, "%s/%s", current->path, entry); + + DIR *handle = utf8_opendir (sub->path); +@@ -373,7 +380,9 @@ static block_t *Block (access_t *p_access) + || has_inode_loop (sub) + || (sub->uri == NULL)) + { ++ free (entry); + closedir (handle); ++ free (sub->uri); + free (sub); + return NULL; + } +@@ -382,9 +391,13 @@ static block_t *Block (access_t *p_access) + /* Add node to xspf extension */ + char *old_xspf_extension = p_sys->psz_xspf_extension; + if (old_xspf_extension == NULL) ++ { ++ free (entry); + goto fatal; ++ } + + char *title = convert_xml_special_chars (entry); ++ free (entry); + if (title == NULL + || asprintf (&p_sys->psz_xspf_extension, "%s" + " \n", old_xspf_extension, +@@ -417,7 +430,10 @@ static block_t *Block (access_t *p_access) + + if (type + extlen == end + && !strncasecmp (ext, type, extlen)) ++ { ++ free (entry); + return NULL; ++ } + + if (*end == '\0') + break; +diff --git a/modules/access/qtcapture.m b/modules/access/qtcapture.m +index 088378f..a94f7d2 100644 +--- a/modules/access/qtcapture.m ++++ b/modules/access/qtcapture.m +@@ -173,6 +173,7 @@ static int qtchroma_to_fourcc( int i_qt ) + /* Raw data types */ + { k422YpCbCr8CodecType, VLC_FOURCC('U','Y','V','Y') }, + { kComponentVideoCodecType,VLC_FOURCC('Y','U','Y','2') }, ++ { kComponentVideoUnsigned, VLC_FOURCC('U','Y','V','Y') }, + { 0, 0 } + }; + int i; +diff --git a/modules/audio_filter/equalizer.c b/modules/audio_filter/equalizer.c +index 33b6469..ed9df4d 100644 +--- a/modules/audio_filter/equalizer.c ++++ b/modules/audio_filter/equalizer.c +@@ -531,6 +531,7 @@ static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd, + free( psz_newbands ); + return VLC_ENOMEM; + } ++ free( psz_newbands ); + psz_newbands = psz; + } + if( p_sys->b_first == false ) +diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c +index 1effe5b..58b25f0 100644 +--- a/modules/audio_output/auhal.c ++++ b/modules/audio_output/auhal.c +@@ -993,6 +993,7 @@ static void Probe( aout_instance_t * p_aout ) + if( !AudioDeviceHasOutput( p_devices[i]) ) + { + msg_Dbg( p_aout, "this device is INPUT only. skipping..." ); ++ free( psz_name ); + continue; + } + +diff --git a/modules/codec/invmem.c b/modules/codec/invmem.c +index d672ecb..e8490b7 100644 +--- a/modules/codec/invmem.c ++++ b/modules/codec/invmem.c +@@ -191,7 +191,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) + if( p_sys->p_pic != NULL ) + picture_Release( p_sys->p_pic ); + p_sys->p_pic = decoder_NewPicture( p_dec ); +- p_sys->p_pic = p_dec->pf_vout_buffer_new( p_dec ); + p_sys->p_pic->b_force = true; + p_sys->p_pic->p->i_pitch = p_dec->p_sys->i_pitch; + p_sys->p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts; +diff --git a/modules/codec/x264.c b/modules/codec/x264.c +index 5004c2c..5602962 100644 +--- a/modules/codec/x264.c ++++ b/modules/codec/x264.c +@@ -803,6 +803,7 @@ static int Open ( vlc_object_t *p_this ) + return VLC_ENOMEM; + p_sys->i_interpolated_dts = 0; + p_sys->psz_stat_name = NULL; ++ p_sys->p_buffer = NULL; + + x264_param_default( &p_sys->param ); + p_sys->param.i_width = p_enc->fmt_in.video.i_width; +@@ -1304,6 +1305,13 @@ static int Open ( vlc_object_t *p_this ) + /* Open the encoder */ + p_sys->h = x264_encoder_open( &p_sys->param ); + ++ if( p_sys->h == NULL ) ++ { ++ msg_Err( p_enc, "cannot open x264 encoder" ); ++ Close( VLC_OBJECT(p_enc) ); ++ return VLC_EGENERIC; ++ } ++ + /* alloc mem */ + p_sys->i_buffer = 4 * p_enc->fmt_in.video.i_width * + p_enc->fmt_in.video.i_height + 1000; +@@ -1440,7 +1448,8 @@ static void Close( vlc_object_t *p_this ) + + free( p_sys->psz_stat_name ); + +- x264_encoder_close( p_sys->h ); ++ if( p_sys->h ) ++ x264_encoder_close( p_sys->h ); + + #ifdef PTW32_STATIC_LIB + vlc_value_t lock, count; +diff --git a/modules/control/dbus.c b/modules/control/dbus.c +index 2753140..5704672 100644 +--- a/modules/control/dbus.c ++++ b/modules/control/dbus.c +@@ -32,7 +32,7 @@ + * extract: + * "If you use this low-level API directly, you're signing up for some pain." + * +- * MPRIS Specification (still drafting on Jan, 23 of 2008): ++ * MPRIS Specification version 1.0 + * http://wiki.xmms2.xmms.se/index.php/MPRIS + */ + +@@ -73,7 +73,7 @@ static int TrackListChangeEmit( intf_thread_t *, int, int ); + static int AllCallback( vlc_object_t*, const char*, vlc_value_t, vlc_value_t, void* ); + + static int GetInputMeta ( input_item_t *, DBusMessageIter * ); +-static int MarshalStatus ( intf_thread_t *, DBusMessageIter *, bool ); ++static int MarshalStatus ( intf_thread_t *, DBusMessageIter * ); + static int UpdateCaps( intf_thread_t* ); + + /* GetCaps() capabilities */ +@@ -222,7 +222,7 @@ DBUS_METHOD( PositionSet ) + + if( p_input ) + { +- position.i_time = i_pos * 1000; ++ position.i_time = ((mtime_t)i_pos) * 1000; + var_Set( p_input, "time", position ); + vlc_object_release( p_input ); + } +@@ -311,7 +311,7 @@ DBUS_METHOD( GetStatus ) + REPLY_INIT; + OUT_ARGUMENTS; + +- MarshalStatus( p_this, &args, true ); ++ MarshalStatus( p_this, &args ); + + REPLY_SEND; + } +@@ -838,12 +838,28 @@ static void Run ( intf_thread_t *p_intf ) + int canc = vlc_savecancel(); + dbus_connection_read_write_dispatch( p_intf->p_sys->p_conn, 0 ); + +- // Get the messages ++ /* Get the list of events to process ++ * ++ * We can't keep the lock on p_intf->p_sys->p_events, else we risk a ++ * deadlock: ++ * The signal functions could lock mutex X while p_events is locked; ++ * While some other function in vlc (playlist) might lock mutex X ++ * and then set a variable which would call AllCallback(), which itself ++ * needs to lock p_events to add a new event. ++ */ + vlc_mutex_lock( &p_intf->p_sys->lock ); +- for( int i = vlc_array_count( p_intf->p_sys->p_events ) - 1; i >= 0; i-- ) ++ int i_events = vlc_array_count( p_intf->p_sys->p_events ); ++ callback_info_t* info[i_events]; ++ for( int i = i_events - 1; i >= 0; i-- ) + { +- callback_info_t* info = vlc_array_item_at_index( p_intf->p_sys->p_events, i ); +- switch( info->signal ) ++ info[i] = vlc_array_item_at_index( p_intf->p_sys->p_events, i ); ++ vlc_array_remove( p_intf->p_sys->p_events, i ); ++ } ++ vlc_mutex_unlock( &p_intf->p_sys->lock ); ++ ++ for( int i = 0; i < i_events; i++ ) ++ { ++ switch( info[i]->signal ) + { + case SIGNAL_ITEM_CURRENT: + TrackChange( p_intf ); +@@ -851,7 +867,7 @@ static void Run ( intf_thread_t *p_intf ) + case SIGNAL_INTF_CHANGE: + case SIGNAL_PLAYLIST_ITEM_APPEND: + case SIGNAL_PLAYLIST_ITEM_DELETED: +- TrackListChangeEmit( p_intf, info->signal, info->i_node ); ++ TrackListChangeEmit( p_intf, info[i]->signal, info[i]->i_node ); + break; + case SIGNAL_RANDOM: + case SIGNAL_REPEAT: +@@ -859,15 +875,13 @@ static void Run ( intf_thread_t *p_intf ) + StatusChangeEmit( p_intf ); + break; + case SIGNAL_STATE: +- StateChange( p_intf, info->i_input_state ); ++ StateChange( p_intf, info[i]->i_input_state ); + break; + default: + assert(0); + } +- free( info ); +- vlc_array_remove( p_intf->p_sys->p_events, i ); ++ free( info[i] ); + } +- vlc_mutex_unlock( &p_intf->p_sys->lock ); + vlc_restorecancel( canc ); + } + } +@@ -931,7 +945,7 @@ DBUS_SIGNAL( CapsChangeSignal ) + } + + /****************************************************************************** +- * TrackListChange: tracklist order / length change signal ++ * TrackListChange: tracklist order / length change signal + *****************************************************************************/ + DBUS_SIGNAL( TrackListChangeSignal ) + { /* emit the new tracklist lengh */ +@@ -1005,7 +1019,7 @@ DBUS_SIGNAL( StatusChangeSignal ) + + /* we're called from a callback of input_thread_t, so it can not be + * destroyed before we return */ +- MarshalStatus( (intf_thread_t*) p_data, &args, false ); ++ MarshalStatus( (intf_thread_t*) p_data, &args ); + + SIGNAL_SEND; + } +@@ -1119,7 +1133,7 @@ static int UpdateCaps( intf_thread_t* p_intf ) + intf_sys_t* p_sys = p_intf->p_sys; + dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST; + playlist_t* p_playlist = pl_Hold( p_intf ); +- ++ + PL_LOCK; + if( p_playlist->current.i_size > 0 ) + i_caps |= CAPS_CAN_PLAY | CAPS_CAN_GO_PREV | CAPS_CAN_GO_NEXT; +@@ -1233,8 +1247,7 @@ static int GetInputMeta( input_item_t* p_input, + * MarshalStatus: Fill a DBusMessage with the current player status + *****************************************************************************/ + +-static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args, +- bool lock ) ++static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args ) + { /* This is NOT the right way to do that, it would be better to sore + the status information in p_sys and update it on change, thus + avoiding a long lock */ +diff --git a/modules/control/http/http.c b/modules/control/http/http.c +index 75f24c2..6987029 100644 +--- a/modules/control/http/http.c ++++ b/modules/control/http/http.c +@@ -27,6 +27,7 @@ + + #include "http.h" + #include ++#include + + #include + +@@ -787,7 +788,8 @@ int ArtCallback( httpd_handler_sys_t *p_args, + psz_art = input_item_GetArtURL( p_item ); + } + +- if( psz_art && !strncmp( psz_art, "file://", strlen( "file://" ) ) ) ++ if( psz_art && !strncmp( psz_art, "file://", strlen( "file://" ) ) && ++ decode_URI( psz_art + 7 ) ) + { + FILE *f; + char *psz_ext; +diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp +index f6b9f69..a66d090 100644 +--- a/modules/demux/mkv/mkv.cpp ++++ b/modules/demux/mkv/mkv.cpp +@@ -42,7 +42,7 @@ static void Close( vlc_object_t * ); + vlc_module_begin () + set_shortname( "Matroska" ) + set_description( N_("Matroska stream demuxer" ) ) +- set_capability( "demux", 0 ) ++ set_capability( "demux", 50 ) + set_callbacks( Open, Close ) + set_category( CAT_INPUT ) + set_subcategory( SUBCAT_INPUT_DEMUX ) +diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c +index ed1ed92..eee5b85 100644 +--- a/modules/demux/playlist/xspf.c ++++ b/modules/demux/playlist/xspf.c +@@ -546,32 +546,31 @@ static bool parse_track_node COMPLEX_INTERFACE + /* special case: location */ + if( !strcmp( p_handler->name, "location" ) ) + { +- char *psz_uri = NULL; +- psz_uri = decode_URI_duplicate( psz_value ); ++ char *psz_location = psz_value; ++ if( !strncmp( psz_value, "file://", 7 ) ) ++ psz_location = decode_URI( psz_value + 7 ); + +- if( !psz_uri ) ++ if( !psz_location ) + { + FREE_ATT(); + return false; + } + +- if( p_demux->p_sys->psz_base && !strstr( psz_uri, "://" ) ) ++ if( p_demux->p_sys->psz_base && !strstr( psz_value, "://" ) ) + { + char* psz_tmp; + if( asprintf( &psz_tmp, "%s%s", p_demux->p_sys->psz_base, +- psz_uri ) == -1 ) ++ psz_location ) == -1 ) + { +- free( psz_uri ); + FREE_ATT(); + return NULL; + } +- free( psz_uri ); +- psz_uri = psz_tmp; ++ input_item_SetURI( p_new_input, psz_tmp ); ++ free( psz_tmp ); + } +- input_item_SetURI( p_new_input, psz_uri ); +- free( psz_uri ); ++ else ++ input_item_SetURI( p_new_input, psz_location ); + input_item_CopyOptions( p_input_item, p_new_input ); +- psz_uri = NULL; + FREE_ATT(); + p_handler = NULL; + } +@@ -652,9 +651,7 @@ static bool set_item_info SIMPLE_INTERFACE + } + else if( !strcmp( psz_name, "image" ) ) + { +- char *psz_uri = decode_URI_duplicate( psz_value ); +- input_item_SetArtURL( p_input, psz_uri ); +- free( psz_uri ); ++ input_item_SetArtURL( p_input, psz_value ); + } + return true; + } +diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c +index 3b90e2d..bb0a47e 100644 +--- a/modules/demux/vobsub.c ++++ b/modules/demux/vobsub.c +@@ -537,7 +537,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) + } + else if( !strncmp( "id:", line, 3 ) ) + { +- char language[20]; ++ char language[3]; + int i_track_id; + es_format_t fmt; + +@@ -547,6 +547,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) + { + p_sys->i_tracks++; + p_sys->track = realloc( p_sys->track, sizeof( vobsub_track_t ) * (p_sys->i_tracks + 1 ) ); ++ language[2] = '\0'; + + /* Init the track */ + current_tk = &p_sys->track[p_sys->i_tracks - 1]; +@@ -560,7 +561,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) + es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) ); + fmt.subs.spu.i_original_frame_width = p_sys->i_original_frame_width; + fmt.subs.spu.i_original_frame_height = p_sys->i_original_frame_height; +- fmt.psz_language = strdup( language ); ++ fmt.psz_language = language; + if( p_sys->b_palette ) + { + fmt.subs.spu.palette[0] = 0xBeef; +diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp +index 464c27f..cf4d0cc 100644 +--- a/modules/gui/qt4/components/extended_panels.cpp ++++ b/modules/gui/qt4/components/extended_panels.cpp +@@ -1340,7 +1340,7 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : + + QLabel *subSpeedLabel = new QLabel; + subSpeedLabel->setText( qtr( "Speed of the subtitles:" ) ); +- subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 3 ); ++ subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 1 ); + + subSpeedSpin = new QDoubleSpinBox; + subSpeedSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ); +diff --git a/modules/gui/qt4/components/sout/profile_selector.cpp b/modules/gui/qt4/components/sout/profile_selector.cpp +index 7c47163..3ebaa66 100644 +--- a/modules/gui/qt4/components/sout/profile_selector.cpp ++++ b/modules/gui/qt4/components/sout/profile_selector.cpp +@@ -331,7 +331,7 @@ void VLCProfileEditor::fillProfile( const QString& qs ) + CHECKMUX( FLVMux, "flv" ) + CHECKMUX( MKVMux, "mkv" ) + CHECKMUX( AVIMux, "avi" ) +- CHECKMUX( MJPEGMux, "mjpg" ){} ++ CHECKMUX( MJPEGMux, "mpjpeg" ){} + #undef CHECKMUX + + ui.keepVideo->setChecked( !options[1].toInt() ); +@@ -420,7 +420,7 @@ QString VLCProfileEditor::transcodeValue() + SMUX( FLVMux, "flv" ) + SMUX( MKVMux, "mkv" ) + SMUX( AVIMux, "avi" ) +- SMUX( MJPEGMux, "mjpg" ){} ++ SMUX( MJPEGMux, "mpjpeg" ){} + #undef SMUX + + #define currentData( box ) box->itemData( box->currentIndex() ) +diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp +index 0b456ad..1fc1f49 100644 +--- a/modules/gui/qt4/input_manager.cpp ++++ b/modules/gui/qt4/input_manager.cpp +@@ -29,6 +29,7 @@ + + #include "input_manager.hpp" + #include ++#include + + #include + +@@ -589,12 +590,12 @@ void InputManager::UpdateArt() + if( hasInput() ) + { + char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) ); +- url = qfu( psz_art ); ++ if( psz_art && !strncmp( psz_art, "file://", 7 ) && ++ decode_URI( psz_art + 7 ) ) ++ url = qfu( psz_art + 7); + free( psz_art ); + } +- url = url.replace( "file://", QString("" ) ); +- /* Taglib seems to define a attachment://, It won't work yet */ +- url = url.replace( "attachment://", QString("" ) ); ++ + /* Update Art meta */ + emit artChanged( url ); + } +diff --git a/modules/meta_engine/folder.c b/modules/meta_engine/folder.c +index 4d41b0a..5a0c3a0 100644 +--- a/modules/meta_engine/folder.c ++++ b/modules/meta_engine/folder.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_SYS_STAT_H + # include +@@ -98,26 +99,31 @@ static int FindMeta( vlc_object_t *p_this ) + case 0: + /* Windows Folder.jpg */ + snprintf( psz_filename, MAX_PATH, +- "file://%sFolder.jpg", psz_path ); ++ "%sFolder.jpg", psz_path ); + break; + + case 1: + /* Windows AlbumArtSmall.jpg == small version of Folder.jpg */ + snprintf( psz_filename, MAX_PATH, +- "file://%sAlbumArtSmall.jpg", psz_path ); ++ "%sAlbumArtSmall.jpg", psz_path ); + break; + + case 2: + /* KDE (?) .folder.png */ + snprintf( psz_filename, MAX_PATH, +- "file://%s.folder.png", psz_path ); ++ "%s.folder.png", psz_path ); + break; + } + +- if( utf8_stat( psz_filename+7, &a ) != -1 ) ++ if( utf8_stat( psz_filename, &a ) != -1 ) + { +- input_item_SetArtURL( p_item, psz_filename ); +- b_have_art = true; ++ char *psz_uri = make_URI( psz_filename ); ++ if( psz_uri ) ++ { ++ input_item_SetArtURL( p_item, psz_uri ); ++ free( psz_uri ); ++ b_have_art = true; ++ } + } + } + +diff --git a/modules/misc/notify/growl.m b/modules/misc/notify/growl.m +index c0503b0..95ad205 100644 +--- a/modules/misc/notify/growl.m ++++ b/modules/misc/notify/growl.m +@@ -58,6 +58,7 @@ + #include + #include + #include ++#include + + + /***************************************************************************** +@@ -210,7 +211,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, + char *psz_arturl = input_item_GetArtURL( p_item ); + CFDataRef art = NULL; + if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) && +- strlen( psz_arturl ) > 7 ) ++ decode_URI( psz_arturl + 7 ) ) + art = (CFDataRef) readFile( psz_arturl + 7 ); + + free( psz_title ); +diff --git a/modules/misc/notify/notify.c b/modules/misc/notify/notify.c +index 6b3be7c..6fa084a 100644 +--- a/modules/misc/notify/notify.c ++++ b/modules/misc/notify/notify.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -221,12 +222,11 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, + vlc_object_release( p_input ); + + if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) && +- strlen( psz_arturl ) > 7 ) ++ decode_URI( psz_arturl + 7 ) ) + { /* scale the art to show it in notify popup */ + GError *p_error = NULL; + pix = gdk_pixbuf_new_from_file_at_scale( &psz_arturl[7], + 72, 72, TRUE, &p_error ); +- free( psz_arturl ); + } + else /* else we show state-of-the art logo */ + { +@@ -239,6 +239,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, + } + } + ++ free( psz_arturl ); ++ + /* we need to replace '&' with '&' because '&' is a keyword of + * notification-daemon parser */ + const int i_len = strlen( psz_tmp ); +diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c +index 0f5f82c..6765adb 100644 +--- a/modules/misc/playlist/xspf.c ++++ b/modules/misc/playlist/xspf.c +@@ -212,9 +212,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, + if( psz == NULL ) psz = strdup( "" ); + if( !EMPTY_STR( psz ) ) + { +- psz_uri = make_URI( psz ); +- fprintf( p_file, "\t\t\t%s\n", psz_uri ); +- free( psz_uri ); ++ fprintf( p_file, "\t\t\t%s\n", psz ); + } + free( psz ); + +diff --git a/modules/misc/quartztext.c b/modules/misc/quartztext.c +index a19c2a3..3a8c7db 100644 +--- a/modules/misc/quartztext.c ++++ b/modules/misc/quartztext.c +@@ -749,7 +749,9 @@ static offscreen_bitmap_t *Compose( int i_text_align, UniChar *psz_utf16_str, ui + CGContextSetTextDrawingMode( p_context, kCGTextFillStroke ); + CGContextSetShadow( p_context, CGSizeMake( 0, 0 ), 5 ); + float black_components[4] = {0, 0, 0, 1}; +- CGContextSetShadowWithColor (p_context, CGSizeMake( 0, 0 ), 5, CGColorCreate( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ), black_components )); ++ CGColorRef outlinecolor = CGColorCreate( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ), black_components ); ++ CGContextSetShadowWithColor (p_context, CGSizeMake( 0, 0 ), 5, outlinecolor); ++ CGColorRelease( outlinecolor ); + do + { + // ATSUBreakLine will automatically pick up any manual '\n's also +diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c +index edd06c6..c4770f5 100644 +--- a/modules/stream_out/rtp.c ++++ b/modules/stream_out/rtp.c +@@ -853,10 +853,8 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + * mux (TS/PS), then p_fmt is NULL. */ + sout_stream_sys_t *p_sys = p_stream->p_sys; + sout_stream_id_t *id; +- int i_port, cscov = -1; ++ int cscov = -1; + char *psz_sdp; +- int i_port_audio_option = var_GetInteger( p_stream, "port-audio" ); +- int i_port_video_option = var_GetInteger( p_stream, "port-video" ); + + if (0xffffffff == p_sys->payload_bitmap) + { +@@ -864,38 +862,41 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + return NULL; + } + +- id = vlc_object_create( p_stream, sizeof( sout_stream_id_t ) ); +- if( id == NULL ) +- return NULL; +- vlc_object_attach( id, p_stream ); +- + /* Choose the port */ +- i_port = 0; ++ uint16_t i_port = 0; + if( p_fmt == NULL ) + ; + else + if( p_fmt->i_cat == AUDIO_ES && p_sys->i_port_audio > 0 ) +- { + i_port = p_sys->i_port_audio; +- p_sys->i_port_audio = 0; +- } + else + if( p_fmt->i_cat == VIDEO_ES && p_sys->i_port_video > 0 ) +- { + i_port = p_sys->i_port_video; +- p_sys->i_port_video = 0; +- } + +- while( i_port == 0 ) ++ /* We do not need the ES lock (p_sys->lock_es) here, because this is the ++ * only one thread that can *modify* the ES table. The ES lock protects ++ * the other threads from our modifications (TAB_APPEND, TAB_REMOVE). */ ++ for (int i = 0; i_port && (i < p_sys->i_es); i++) ++ if (i_port == p_sys->es[i]->i_port) ++ i_port = 0; /* Port already in use! */ ++ for (uint16_t p = p_sys->i_port; i_port == 0; p += 2) + { +- if( p_sys->i_port != i_port_audio_option +- && p_sys->i_port != i_port_video_option ) ++ if (p == 0) + { +- i_port = p_sys->i_port; ++ msg_Err (p_stream, "too many RTP elementary streams"); ++ return NULL; + } +- p_sys->i_port += 2; ++ i_port = p; ++ for (int i = 0; i_port && (i < p_sys->i_es); i++) ++ if (p == p_sys->es[i]->i_port) ++ i_port = 0; + } + ++ id = vlc_object_create( p_stream, sizeof( sout_stream_id_t ) ); ++ if( id == NULL ) ++ return NULL; ++ vlc_object_attach( id, p_stream ); ++ + id->p_stream = p_stream; + + /* Look for free dymanic payload type */ +@@ -1311,11 +1312,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id ) + TAB_REMOVE( p_sys->i_es, p_sys->es, id ); + vlc_mutex_unlock( &p_sys->lock_es ); + +- /* Release port */ +- if( id->i_port == var_GetInteger( p_stream, "port-audio" ) ) +- p_sys->i_port_audio = id->i_port; +- if( id->i_port == var_GetInteger( p_stream, "port-video" ) ) +- p_sys->i_port_video = id->i_port; + /* Release dynamic payload type */ + if (id->i_payload_type >= 96) + p_sys->payload_bitmap &= ~(1 << (id->i_payload_type - 96)); +diff --git a/share/lua/meta/10_googleimage.lua b/share/lua/meta/10_googleimage.lua +index e203c9c..8dc1e04 100644 +--- a/share/lua/meta/10_googleimage.lua ++++ b/share/lua/meta/10_googleimage.lua +@@ -44,9 +44,5 @@ function fetch_art() + page = fd:read( 65653 ) + fd = nil + _, _, arturl = string.find( page, "imgurl=([^&]+)" ) +- if arturl then +- return vlc.strings.decode_uri(arturl) +- else +- return nil +- end ++ return arturl + end +diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua +index e850bcf..f4545c6 100644 +--- a/share/lua/playlist/dailymotion.lua ++++ b/share/lua/playlist/dailymotion.lua +@@ -41,7 +41,7 @@ function parse() + if not line then break end + if string.match( line, "param name=\"flashvars\" value=\".*video=" ) + then +- arturl = vlc.strings.decode_uri( find( line, "param name=\"flashvars\" value=\".*preview=([^&]*)" ) ) ++ arturl = find( line, "param name=\"flashvars\" value=\".*preview=([^&]*)" ) + videos = vlc.strings.decode_uri( find( line, "param name=\"flashvars\" value=\".*video=([^&]*)" ) ) + --[[ we get a list of different streams available, at various codecs + and resolutions: +diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua +index 452400f..238d3eb 100644 +--- a/share/lua/playlist/youtube.lua ++++ b/share/lua/playlist/youtube.lua +@@ -26,7 +26,7 @@ end + + function get_arturl( path, video_id ) + if string.match( vlc.path, "iurl=" ) then +- return vlc.strings.decode_uri( get_url_param( vlc.path, "iurl" ) ) ++ return vlc.strings( get_url_param( vlc.path, "iurl" ) ) + end + if not arturl then + return "http://img.youtube.com/vi/"..video_id.."/default.jpg" +diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h +index 417d38e..053716b 100644 +--- a/src/control/libvlc_internal.h ++++ b/src/control/libvlc_internal.h +@@ -90,6 +90,7 @@ struct libvlc_media_list_t + libvlc_instance_t * p_libvlc_instance; + int i_refcount; + vlc_mutex_t object_lock; ++ vlc_mutex_t refcount_lock; + libvlc_media_t * p_md; /* The media from which the + * mlist comes, if any. */ + vlc_array_t items; +diff --git a/src/control/media_list.c b/src/control/media_list.c +index e043c4c..0bb2276 100644 +--- a/src/control/media_list.c ++++ b/src/control/media_list.c +@@ -170,6 +170,7 @@ libvlc_media_list_new( libvlc_instance_t * p_inst, + } + + vlc_mutex_init( &p_mlist->object_lock ); ++ vlc_mutex_init( &p_mlist->refcount_lock ); // FIXME: spinlock? + + vlc_array_init( &p_mlist->items ); + p_mlist->i_refcount = 1; +@@ -188,14 +189,14 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) + libvlc_media_t * p_md; + int i; + +- vlc_mutex_lock( &p_mlist->object_lock ); ++ vlc_mutex_lock( &p_mlist->refcount_lock ); + p_mlist->i_refcount--; + if( p_mlist->i_refcount > 0 ) + { +- vlc_mutex_unlock( &p_mlist->object_lock ); ++ vlc_mutex_unlock( &p_mlist->refcount_lock ); + return; + } +- vlc_mutex_unlock( &p_mlist->object_lock ); ++ vlc_mutex_unlock( &p_mlist->refcount_lock ); + + /* Refcount null, time to free */ + +@@ -223,9 +224,9 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) + **************************************************************************/ + void libvlc_media_list_retain( libvlc_media_list_t * p_mlist ) + { +- vlc_mutex_lock( &p_mlist->object_lock ); ++ vlc_mutex_lock( &p_mlist->refcount_lock ); + p_mlist->i_refcount++; +- vlc_mutex_unlock( &p_mlist->object_lock ); ++ vlc_mutex_unlock( &p_mlist->refcount_lock ); + } + + +diff --git a/src/libvlccore.sym b/src/libvlccore.sym +index d72c10f..4f201d3 100644 +--- a/src/libvlccore.sym ++++ b/src/libvlccore.sym +@@ -380,8 +380,6 @@ tls_ClientCreate + tls_ClientDelete + ToLocale + ToLocaleDup +-unescape_URI +-unescape_URI_duplicate + update_Check + update_Delete + update_Download +diff --git a/src/misc/mtime.c b/src/misc/mtime.c +index c735bdf..a0c24e8 100644 +--- a/src/misc/mtime.c ++++ b/src/misc/mtime.c +@@ -56,7 +56,8 @@ + # include + #endif + +-#ifdef __APPLE__ ++#if defined(__APPLE__) && !defined(__powerpc__) && !defined(__ppc__) && !defined(__ppc64__) ++#define USE_APPLE_MACH 1 + # include + # include + #endif +@@ -173,7 +174,7 @@ static inline unsigned mprec( void ) + #endif + } + +-#ifdef __APPLE__ ++#ifdef USE_APPLE_MACH + static mach_timebase_info_data_t mtime_timebase_info; + static pthread_once_t mtime_timebase_info_once = PTHREAD_ONCE_INIT; + static void mtime_init_timebase(void) +@@ -207,7 +208,7 @@ mtime_t mdate( void ) + #elif defined( HAVE_KERNEL_OS_H ) + res = real_time_clock_usecs(); + +-#elif defined( __APPLE__ ) ++#elif defined( USE_APPLE_MACH ) + pthread_once(&mtime_timebase_info_once, mtime_init_timebase); + uint64_t date = mach_absolute_time(); + +@@ -323,7 +324,7 @@ mtime_t mdate( void ) + i_previous_time = res; + LeaveCriticalSection( &date_lock ); + } +-#elif defined( __APPLE__ ) /* The version that should be used, if it was cancelable */ ++#elif USE_APPLE_MACH /* The version that should be used, if it was cancelable */ + pthread_once(&mtime_timebase_info_once, mtime_init_timebase); + uint64_t mach_time = date * 1000 * mtime_timebase_info.denom / mtime_timebase_info.numer; + mach_wait_until(mach_time); +@@ -424,7 +425,7 @@ void msleep( mtime_t delay ) + + while( nanosleep( &ts_delay, &ts_delay ) && ( errno == EINTR ) ); + +-#elif defined( __APPLE__ ) /* The version that should be used, if it was cancelable */ ++#elif USE_APPLE_MACH /* The version that should be used, if it was cancelable */ + pthread_once(&mtime_timebase_info_once, mtime_init_timebase); + uint64_t mach_time = delay * 1000 * mtime_timebase_info.denom / mtime_timebase_info.numer; + mach_wait_until(mach_time + mach_absolute_time()); +diff --git a/src/misc/threads.c b/src/misc/threads.c +index 149e761..71d0afe 100644 +--- a/src/misc/threads.c ++++ b/src/misc/threads.c +@@ -618,7 +618,7 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, + mtime_t deadline) + { + #if defined(LIBVLC_USE_PTHREAD) +-#ifdef __APPLE__ ++#if defined(__APPLE__) && !defined(__powerpc__) && !defined( __ppc__ ) && !defined( __ppc64__ ) + /* mdate() is mac_absolute_time on osx, which we must convert to do + * the same base than gettimeofday() on which pthread_cond_timedwait + * counts on. */ +diff --git a/src/playlist/art.c b/src/playlist/art.c +index 002ec6e..8b65121 100644 +--- a/src/playlist/art.c ++++ b/src/playlist/art.c +@@ -32,6 +32,8 @@ + #include + #include + #include ++#include ++ + #include /* PATH_MAX */ + + #ifdef HAVE_SYS_STAT_H +@@ -132,7 +134,7 @@ static char *ArtCacheName( input_item_t *p_item, const char *psz_type ) + + char *psz_ext = filename_sanitize( psz_type ? psz_type : "" ); + char *psz_filename; +- if( asprintf( &psz_filename, "file://%s" DIR_SEP "art%s", psz_path, psz_ext ) < 0 ) ++ if( asprintf( &psz_filename, "%s" DIR_SEP "art%s", psz_path, psz_ext ) < 0 ) + psz_filename = NULL; + + free( psz_ext ); +@@ -164,12 +166,19 @@ int playlist_FindArtInCache( input_item_t *p_item ) + if( !strncmp( psz_filename, "art", 3 ) ) + { + char *psz_file; +- if( asprintf( &psz_file, "file://%s" DIR_SEP "%s", ++ if( asprintf( &psz_file, "%s" DIR_SEP "%s", + psz_path, psz_filename ) < 0 ) + psz_file = NULL; + if( psz_file ) +- input_item_SetArtURL( p_item, psz_file ); +- free( psz_file ); ++ { ++ char *psz_uri = make_URI( psz_file ); ++ if( psz_uri ) ++ { ++ input_item_SetArtURL( p_item, psz_uri ); ++ free( psz_uri ); ++ } ++ free( psz_file ); ++ } + + b_found = true; + } +@@ -192,17 +201,25 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item, + if( !psz_filename ) + return VLC_EGENERIC; + ++ char *psz_uri = make_URI( psz_filename ); ++ if( !psz_uri ) ++ { ++ free( psz_filename ); ++ return VLC_EGENERIC; ++ } ++ + /* Check if we already dumped it */ + struct stat s; +- if( !utf8_stat( psz_filename+7, &s ) ) ++ if( !utf8_stat( psz_filename, &s ) ) + { +- input_item_SetArtURL( p_item, psz_filename ); ++ input_item_SetArtURL( p_item, psz_uri ); + free( psz_filename ); ++ free( psz_uri ); + return VLC_SUCCESS; + } + + /* Dump it otherwise */ +- FILE *f = utf8_fopen( psz_filename+7, "wb" ); ++ FILE *f = utf8_fopen( psz_filename, "wb" ); + if( f ) + { + if( fwrite( p_buffer, i_buffer, 1, f ) != 1 ) +@@ -212,11 +229,12 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item, + else + { + msg_Dbg( p_playlist, "album art saved to %s", psz_filename ); +- input_item_SetArtURL( p_item, psz_filename ); ++ input_item_SetArtURL( p_item, psz_uri ); + } + fclose( f ); + } + free( psz_filename ); ++ free( psz_uri ); + return VLC_SUCCESS; + } + +diff --git a/src/text/strings.c b/src/text/strings.c +index 9c6d931..736bb87 100644 +--- a/src/text/strings.c ++++ b/src/text/strings.c +@@ -49,89 +49,6 @@ + #include + + /** +- * Unescape URI encoded string +- * \return decoded duplicated string +- */ +-char *unescape_URI_duplicate( const char *psz ) +-{ +- char *psz_dup = strdup( psz ); +- unescape_URI( psz_dup ); +- return psz_dup; +-} +- +-/** +- * Unescape URI encoded string in place +- * \return nothing +- */ +-void unescape_URI( char *psz ) +-{ +- unsigned char *in = (unsigned char *)psz, *out = in, c; +- if( psz == NULL ) +- return; +- +- while( ( c = *in++ ) != '\0' ) +- { +- switch( c ) +- { +- case '%': +- { +- char val[5], *pval = val; +- unsigned long cp; +- +- switch( c = *in++ ) +- { +- case '\0': +- return; +- +- case 'u': +- case 'U': +- if( ( *pval++ = *in++ ) == '\0' ) +- return; +- if( ( *pval++ = *in++ ) == '\0' ) +- return; +- c = *in++; +- +- default: +- *pval++ = c; +- if( ( *pval++ = *in++ ) == '\0' ) +- return; +- *pval = '\0'; +- } +- +- cp = strtoul( val, NULL, 0x10 ); +- if( cp < 0x80 ) +- *out++ = cp; +- else +- if( cp < 0x800 ) +- { +- *out++ = (( cp >> 6) | 0xc0); +- *out++ = (( cp & 0x3f) | 0x80); +- } +- else +- { +- assert( cp < 0x10000 ); +- *out++ = (( cp >> 12) | 0xe0); +- *out++ = (((cp >> 6) & 0x3f) | 0x80); +- *out++ = (( cp & 0x3f) | 0x80); +- } +- break; +- } +- +- /* + is not a special case - it means plus, not space. */ +- +- default: +- /* Inserting non-ASCII or non-printable characters is unsafe, +- * and no sane browser will send these unencoded */ +- if( ( c < 32 ) || ( c > 127 ) ) +- *out++ = '?'; +- else +- *out++ = c; +- } +- } +- *out = '\0'; +-} +- +-/** + * Decode encoded URI component. See also decode_URI(). + * \return decoded duplicated string + */ +diff --git a/test/libvlc/media_list_player.c b/test/libvlc/media_list_player.c +index 712e0fe..49a1443 100644 +--- a/test/libvlc/media_list_player.c ++++ b/test/libvlc/media_list_player.c +@@ -92,8 +92,11 @@ static void test_media_list_player_play_item_at_index(const char** argv, int arg + + mlp = libvlc_media_list_player_new (vlc, &ex); + +- libvlc_media_list_add_media( ml, md, &ex ); +- catch (); ++ for (unsigned i = 0; i < 5; i++) ++ { ++ libvlc_media_list_add_media( ml, md, &ex ); ++ catch (); ++ } + + libvlc_media_list_player_set_media_list( mlp, ml, &ex ); + +diff --git a/test/libvlc/test.h b/test/libvlc/test.h +index 388a465..1015d25 100644 +--- a/test/libvlc/test.h ++++ b/test/libvlc/test.h +@@ -100,7 +100,7 @@ static inline void catch (void) + static inline void test_init (void) + { + (void)test_default_sample; /* This one may not be used */ +- alarm (50); /* Make sure "make check" does not get stuck */ ++ alarm (10); /* Make sure "make check" does not get stuck */ + } + + #endif /* TEST_H */ diff --git a/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch b/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch new file mode 100644 index 0000000..f3fcc05 --- /dev/null +++ b/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch @@ -0,0 +1,66 @@ +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 86bd6dd..ce133f9 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -175,16 +175,17 @@ static int Open ( vlc_object_t *p_this ) + msg_Err(p_aout,"Invalid sample spec"); + goto fail; + } ++ ++ a.maxlength = pa_bytes_per_second(&ss)/4/pa_frame_size(&ss); ++ a.tlength = a.maxlength*9/10; ++ a.prebuf = a.tlength/2; ++ a.minreq = a.tlength/10; + +- /* Reduce overall latency to 200mS to reduce audible clicks +- * Also pulse minreq and internal buffers are now 20mS which reduces resampling +- */ +- a.tlength = pa_bytes_per_second(&ss)/5; +- a.maxlength = a.tlength * 2; +- a.prebuf = a.tlength; +- a.minreq = a.tlength / 10; ++ a.maxlength *= pa_frame_size(&ss); ++ a.tlength *= pa_frame_size(&ss); ++ a.prebuf *= pa_frame_size(&ss); ++ a.minreq *= pa_frame_size(&ss); + +- /* Buffer size is 20mS */ + p_sys->buffer_size = a.minreq; + + /* Initialise the speaker map setup above */ +@@ -212,7 +213,7 @@ static int Open ( vlc_object_t *p_this ) + PULSE_DEBUG( "Pulse after context connect"); + + pa_threaded_mainloop_lock(p_sys->mainloop); +- ++ + if (pa_threaded_mainloop_start(p_sys->mainloop) < 0) { + msg_Err(p_aout, "Failed to start main loop"); + goto unlock_and_fail; +@@ -239,7 +240,7 @@ static int Open ( vlc_object_t *p_this ) + pa_stream_set_write_callback(p_sys->stream, stream_request_cb, p_aout); + pa_stream_set_latency_update_callback(p_sys->stream, stream_latency_update_cb, p_aout); + +- if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { ++ if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) { + msg_Err(p_aout, "Failed to connect stream: %s", pa_strerror(pa_context_errno(p_sys->context))); + goto unlock_and_fail; + } +@@ -447,11 +448,16 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) { + latency = 0; + + } +- + PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency); + next_date = mdate() + latency; + ++ + if(p_sys->start_date < next_date + AOUT_PTS_TOLERANCE ){ ++ /* ++ vlc_mutex_lock( &p_aout->output_fifo_lock ); ++ p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); ++ vlc_mutex_unlock( &p_aout->output_fifo_lock ); ++ */ + p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0); + } + } diff --git a/vlc.spec b/vlc.spec index 9a08d41..74fe0f6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.7rc2%{?dist} +Release: 0.9rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org/ @@ -22,12 +22,16 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas +Source11: shine.c +Source12: enc_base.h Patch0: vlc-trunk-default_font.patch Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch +Patch6: vlc-1.0-bugfix-20090602.patch +Patch7: vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -68,9 +72,10 @@ BuildRequires: libdv-devel BuildRequires: libdvbpsi-devel BuildRequires: libdvdnav-devel BuildRequires: libebml-devel +BuildRequires: libhildon-devel BuildRequires: libid3tag-devel BuildRequires: libkate-devel -BuildRequires: libmad-devel +BuildRequires: libmad-devel BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel @@ -245,11 +250,19 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %if 0%{?fedora} >= 11 %patch5 -p1 -b .xul191 %endif +%patch6 -p1 -b .bugfix +%patch7 -p1 -b .revert rm modules/access/videodev2.h ln -sf %{_includedir}/videodev2.h modules/access/ +rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 ./bootstrap +#missing sources +install -pm 0644 %{SOURCE11} modules/codec/shine +install -pm 0644 %{SOURCE12} modules/codec/shine + + %build %if %with_internal_live555 @@ -282,6 +295,8 @@ popd --enable-pvr \ --enable-gnomevfs \ --enable-cddax \ + --enable-wma-fixed \ + --enable-shine \ --enable-faad \ --enable-twolame \ --enable-real \ @@ -534,6 +549,10 @@ fi || : %changelog +* Tue Jun 2 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.9rc2 +- Update to current bugfix +- Revert b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568 + * Wed May 27 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.7rc2 - Update to 1.0.0-rc2 - Rebase xulrunner patch for -rc2 From 538e52fb042f206e5d2369aa7abc5dc76a4678fc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 2 Jun 2009 20:46:53 +0000 Subject: [PATCH 047/671] Split plugin-jack --- vlc.spec | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 74fe0f6..ad22077 100644 --- a/vlc.spec +++ b/vlc.spec @@ -223,16 +223,24 @@ Requires: vlc-core = %{version}-%{release} %description nox VLC Media Player with framebuffer support for X-less server. +%package plugin-jack +Summary: JACK audio plugin for VLC +Group: Applications/Multimedia +Requires: vlc-core = %{version}-%{release} + +%description plugin-jack +JACK audio plugin for the VLC media player. + %if %with_dc1394 -%package plugins-dc1394 +%package plugin-dc1394 Summary: VLC Media Player Plugins for dc1394 Group: Applications/Multimedia Requires: %{name}-core = %{version} Requires: compat-libdc1394-tools -%description plugins-dc1394 -VLC plugins for libdc1394 +%description plugin-dc1394 +VLC plugin for libdc1394 %endif %prep @@ -453,7 +461,6 @@ fi || : %{_libdir}/vlc/gui/libqt4_plugin.so %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so %{_libdir}/vlc/access/libx11_screen_plugin.so -%{_libdir}/vlc/codec/libfluidsynth_plugin.so %{_libdir}/vlc/misc/libsvg_plugin.so %{_libdir}/vlc/misc/libnotify_plugin.so %{_libdir}/vlc/video_output/libaa_plugin.so @@ -486,6 +493,7 @@ fi || : %{_libdir}/*.so.* %exclude %{_libdir}/vlc/gui/libqt4_plugin.so %exclude %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so +%exclude %{_libdir}/vlc/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/access/libx11_screen_plugin.so %exclude %{_libdir}/vlc/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/misc/libsvg_plugin.so @@ -510,6 +518,7 @@ fi || : %exclude %{_libdir}/vlc/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so %exclude %{_libdir}/vlc/video_filter/libpanoramix_plugin.so +%exclude %{_libdir}/vlc/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so %if %with_dc1394 %exclude %{_libdir}/vlc/access/libdc1394_plugin.so @@ -517,6 +526,12 @@ fi || : %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* +%files plugin-jack +%defattr(-,root,root,-) +%{_libdir}/vlc/access/libaccess_jack_plugin.so +%{_libdir}/vlc/audio_output/libjack_plugin.so +%{_libdir}/vlc/codec/libfluidsynth_plugin.so + %files nox %defattr(-,root,root,-) %{_libdir}/vlc/video_output/libdirectfb_plugin.so @@ -552,6 +567,7 @@ fi || : * Tue Jun 2 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.9rc2 - Update to current bugfix - Revert b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568 +- Split plugin-jack * Wed May 27 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.7rc2 - Update to 1.0.0-rc2 From d39c22c3e16b609bf10191c4d2059970e0eb0506 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 5 Jun 2009 15:53:06 +0000 Subject: [PATCH 048/671] Release 0.10, rc3 coming soon, final in one or two weeks from now --- ...ve-previous-signal-slot-connection-s.patch | 27 +++++++++++++++++++ ...ility-with-PA-when-the-vlc-alsa-outp.patch | 25 +++++++++++++++++ vlc.spec | 12 +++++++-- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 0001-QT4-menus-remove-previous-signal-slot-connection-s.patch create mode 100644 0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch diff --git a/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch b/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch new file mode 100644 index 0000000..b8335f7 --- /dev/null +++ b/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch @@ -0,0 +1,27 @@ +From 4717657053a13d69d48dc82dbc5402f6712f66ea Mon Sep 17 00:00:00 2001 +From: Erwan Tulou +Date: Fri, 5 Jun 2009 09:55:09 +0200 +Subject: [PATCH] QT4 menus : remove previous signal-slot connection(s) if any (correct trac #2818) + +--- + modules/gui/qt4/menus.cpp | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp +index 0a12c20..9304752 100644 +--- a/modules/gui/qt4/menus.cpp ++++ b/modules/gui/qt4/menus.cpp +@@ -1386,6 +1386,10 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var, + + MenuItemData *itemData = new MenuItemData( THEDP->menusMapper, p_obj, i_val_type, + val, psz_var ); ++ ++ /* remove previous signal-slot connection(s) if any */ ++ action->disconnect( ); ++ + CONNECT( action, triggered(), THEDP->menusMapper, map() ); + THEDP->menusMapper->setMapping( action, itemData ); + +-- +1.5.6.5 + diff --git a/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch b/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch new file mode 100644 index 0000000..5585bc2 --- /dev/null +++ b/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch @@ -0,0 +1,25 @@ +From dce1b815f87daef89715c9e5bec7ee78a69df79f Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet (kwizart) +Date: Thu, 4 Jun 2009 15:18:40 +0200 +Subject: [PATCH] Improve compatibility with PA when the vlc alsa output is used. + +--- + modules/audio_output/alsa.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c +index 2d03d1d..dd33f31 100644 +--- a/modules/audio_output/alsa.c ++++ b/modules/audio_output/alsa.c +@@ -78,7 +78,7 @@ struct aout_sys_t + number of channel(s) (eg. 2 for stereo) and the size of a sample (eg. + 2 for int16_t). */ + #define ALSA_DEFAULT_PERIOD_SIZE 1024 +-#define ALSA_DEFAULT_BUFFER_SIZE ( ALSA_DEFAULT_PERIOD_SIZE << 8 ) ++#define ALSA_DEFAULT_BUFFER_SIZE ( ALSA_DEFAULT_PERIOD_SIZE << 4 ) + #define ALSA_SPDIF_PERIOD_SIZE A52_FRAME_NB + #define ALSA_SPDIF_BUFFER_SIZE ( ALSA_SPDIF_PERIOD_SIZE << 4 ) + /* Why << 4 ? --Meuuh */ +-- +1.6.0.6 + diff --git a/vlc.spec b/vlc.spec index ad22077..f4062b6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -13,10 +13,10 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.9rc2%{?dist} +Release: 0.10rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia -URL: http://www.videolan.org/ +URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 %if %with_internal_live555 Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz @@ -32,6 +32,7 @@ Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch Patch6: vlc-1.0-bugfix-20090602.patch Patch7: vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch +Patch9: 0001-QT4-menus-remove-previous-signal-slot-connection-s.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -260,6 +261,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %endif %patch6 -p1 -b .bugfix %patch7 -p1 -b .revert +%patch9 -p1 -b .disconnect rm modules/access/videodev2.h ln -sf %{_includedir}/videodev2.h modules/access/ @@ -519,6 +521,7 @@ fi || : %exclude %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so %exclude %{_libdir}/vlc/video_filter/libpanoramix_plugin.so %exclude %{_libdir}/vlc/audio_output/libjack_plugin.so +%exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so %if %with_dc1394 %exclude %{_libdir}/vlc/access/libdc1394_plugin.so @@ -529,6 +532,7 @@ fi || : %files plugin-jack %defattr(-,root,root,-) %{_libdir}/vlc/access/libaccess_jack_plugin.so +%{_libdir}/vlc/audio_output/libportaudio_plugin.so %{_libdir}/vlc/audio_output/libjack_plugin.so %{_libdir}/vlc/codec/libfluidsynth_plugin.so @@ -564,6 +568,10 @@ fi || : %changelog +* Fri Jun 5 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.10rc2 +- Move some module to avoid dependency +- Remove previous signal-slot connection(s) if any - vlc trac #2818 + * Tue Jun 2 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.9rc2 - Update to current bugfix - Revert b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568 From dfc669d1cfcb396fcd6e0b2df8529997eafc5581 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 7 Jun 2009 09:14:31 +0000 Subject: [PATCH 049/671] Update to -rc3 --- .gitignore | 4 +- sources | 4 +- vlc-1.0-bugfix-20090602.patch | 1096 --------------------------------- vlc.spec | 13 +- 4 files changed, 11 insertions(+), 1106 deletions(-) delete mode 100644 vlc-1.0-bugfix-20090602.patch diff --git a/.gitignore b/.gitignore index 5a1f971..f868b75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -vlc-1.0.0-rc2.tar.bz2 -shine.c +vlc-1.0.0-rc3.tar.bz2 enc_base.h +shine.c diff --git a/sources b/sources index 4c08ded..0e3cb45 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -c0fe6fff896c165abb5bf949616a1eee vlc-1.0.0-rc2.tar.bz2 -c64e9e104b1eeba838a6c87435c6533c shine.c +a55dbd94856b922c29743b2980b0c672 vlc-1.0.0-rc3.tar.bz2 a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h +c64e9e104b1eeba838a6c87435c6533c shine.c diff --git a/vlc-1.0-bugfix-20090602.patch b/vlc-1.0-bugfix-20090602.patch deleted file mode 100644 index 8db458d..0000000 --- a/vlc-1.0-bugfix-20090602.patch +++ /dev/null @@ -1,1096 +0,0 @@ -diff --git a/include/vlc_url.h b/include/vlc_url.h -index 448c685..e5b29eb 100644 ---- a/include/vlc_url.h -+++ b/include/vlc_url.h -@@ -45,8 +45,6 @@ struct vlc_url_t - char *psz_buffer; /* to be freed */ - }; - --VLC_EXPORT( char *, unescape_URI_duplicate, ( const char *psz ) ); --VLC_EXPORT( void, unescape_URI, ( char *psz ) ); - VLC_EXPORT( char *, decode_URI_duplicate, ( const char *psz ) ); - VLC_EXPORT( char *, decode_URI, ( char *psz ) ); - VLC_EXPORT( char *, encode_URI_component, ( const char *psz ) ); -diff --git a/modules/access/directory.c b/modules/access/directory.c -index 05b6ec1..dd04b6a 100644 ---- a/modules/access/directory.c -+++ b/modules/access/directory.c -@@ -307,6 +307,7 @@ static block_t *Block (access_t *p_access) - { /* End of directory, go back to parent */ - closedir (current->handle); - p_sys->current = current->parent; -+ free (current->uri); - free (current); - - if (p_sys->current == NULL) -@@ -346,14 +347,20 @@ static block_t *Block (access_t *p_access) - - /* Skip current, parent and hidden directories */ - if (entry[0] == '.') -+ { -+ free (entry); - return NULL; -+ } - /* Handle recursion */ - if (p_sys->mode != MODE_COLLAPSE) - { - directory_t *sub = malloc (sizeof (*sub) + strlen (current->path) + 1 - + strlen (entry)); - if (sub == NULL) -+ { -+ free (entry); - return NULL; -+ } - sprintf (sub->path, "%s/%s", current->path, entry); - - DIR *handle = utf8_opendir (sub->path); -@@ -373,7 +380,9 @@ static block_t *Block (access_t *p_access) - || has_inode_loop (sub) - || (sub->uri == NULL)) - { -+ free (entry); - closedir (handle); -+ free (sub->uri); - free (sub); - return NULL; - } -@@ -382,9 +391,13 @@ static block_t *Block (access_t *p_access) - /* Add node to xspf extension */ - char *old_xspf_extension = p_sys->psz_xspf_extension; - if (old_xspf_extension == NULL) -+ { -+ free (entry); - goto fatal; -+ } - - char *title = convert_xml_special_chars (entry); -+ free (entry); - if (title == NULL - || asprintf (&p_sys->psz_xspf_extension, "%s" - " \n", old_xspf_extension, -@@ -417,7 +430,10 @@ static block_t *Block (access_t *p_access) - - if (type + extlen == end - && !strncasecmp (ext, type, extlen)) -+ { -+ free (entry); - return NULL; -+ } - - if (*end == '\0') - break; -diff --git a/modules/access/qtcapture.m b/modules/access/qtcapture.m -index 088378f..a94f7d2 100644 ---- a/modules/access/qtcapture.m -+++ b/modules/access/qtcapture.m -@@ -173,6 +173,7 @@ static int qtchroma_to_fourcc( int i_qt ) - /* Raw data types */ - { k422YpCbCr8CodecType, VLC_FOURCC('U','Y','V','Y') }, - { kComponentVideoCodecType,VLC_FOURCC('Y','U','Y','2') }, -+ { kComponentVideoUnsigned, VLC_FOURCC('U','Y','V','Y') }, - { 0, 0 } - }; - int i; -diff --git a/modules/audio_filter/equalizer.c b/modules/audio_filter/equalizer.c -index 33b6469..ed9df4d 100644 ---- a/modules/audio_filter/equalizer.c -+++ b/modules/audio_filter/equalizer.c -@@ -531,6 +531,7 @@ static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd, - free( psz_newbands ); - return VLC_ENOMEM; - } -+ free( psz_newbands ); - psz_newbands = psz; - } - if( p_sys->b_first == false ) -diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c -index 1effe5b..58b25f0 100644 ---- a/modules/audio_output/auhal.c -+++ b/modules/audio_output/auhal.c -@@ -993,6 +993,7 @@ static void Probe( aout_instance_t * p_aout ) - if( !AudioDeviceHasOutput( p_devices[i]) ) - { - msg_Dbg( p_aout, "this device is INPUT only. skipping..." ); -+ free( psz_name ); - continue; - } - -diff --git a/modules/codec/invmem.c b/modules/codec/invmem.c -index d672ecb..e8490b7 100644 ---- a/modules/codec/invmem.c -+++ b/modules/codec/invmem.c -@@ -191,7 +191,6 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) - if( p_sys->p_pic != NULL ) - picture_Release( p_sys->p_pic ); - p_sys->p_pic = decoder_NewPicture( p_dec ); -- p_sys->p_pic = p_dec->pf_vout_buffer_new( p_dec ); - p_sys->p_pic->b_force = true; - p_sys->p_pic->p->i_pitch = p_dec->p_sys->i_pitch; - p_sys->p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts; -diff --git a/modules/codec/x264.c b/modules/codec/x264.c -index 5004c2c..5602962 100644 ---- a/modules/codec/x264.c -+++ b/modules/codec/x264.c -@@ -803,6 +803,7 @@ static int Open ( vlc_object_t *p_this ) - return VLC_ENOMEM; - p_sys->i_interpolated_dts = 0; - p_sys->psz_stat_name = NULL; -+ p_sys->p_buffer = NULL; - - x264_param_default( &p_sys->param ); - p_sys->param.i_width = p_enc->fmt_in.video.i_width; -@@ -1304,6 +1305,13 @@ static int Open ( vlc_object_t *p_this ) - /* Open the encoder */ - p_sys->h = x264_encoder_open( &p_sys->param ); - -+ if( p_sys->h == NULL ) -+ { -+ msg_Err( p_enc, "cannot open x264 encoder" ); -+ Close( VLC_OBJECT(p_enc) ); -+ return VLC_EGENERIC; -+ } -+ - /* alloc mem */ - p_sys->i_buffer = 4 * p_enc->fmt_in.video.i_width * - p_enc->fmt_in.video.i_height + 1000; -@@ -1440,7 +1448,8 @@ static void Close( vlc_object_t *p_this ) - - free( p_sys->psz_stat_name ); - -- x264_encoder_close( p_sys->h ); -+ if( p_sys->h ) -+ x264_encoder_close( p_sys->h ); - - #ifdef PTW32_STATIC_LIB - vlc_value_t lock, count; -diff --git a/modules/control/dbus.c b/modules/control/dbus.c -index 2753140..5704672 100644 ---- a/modules/control/dbus.c -+++ b/modules/control/dbus.c -@@ -32,7 +32,7 @@ - * extract: - * "If you use this low-level API directly, you're signing up for some pain." - * -- * MPRIS Specification (still drafting on Jan, 23 of 2008): -+ * MPRIS Specification version 1.0 - * http://wiki.xmms2.xmms.se/index.php/MPRIS - */ - -@@ -73,7 +73,7 @@ static int TrackListChangeEmit( intf_thread_t *, int, int ); - static int AllCallback( vlc_object_t*, const char*, vlc_value_t, vlc_value_t, void* ); - - static int GetInputMeta ( input_item_t *, DBusMessageIter * ); --static int MarshalStatus ( intf_thread_t *, DBusMessageIter *, bool ); -+static int MarshalStatus ( intf_thread_t *, DBusMessageIter * ); - static int UpdateCaps( intf_thread_t* ); - - /* GetCaps() capabilities */ -@@ -222,7 +222,7 @@ DBUS_METHOD( PositionSet ) - - if( p_input ) - { -- position.i_time = i_pos * 1000; -+ position.i_time = ((mtime_t)i_pos) * 1000; - var_Set( p_input, "time", position ); - vlc_object_release( p_input ); - } -@@ -311,7 +311,7 @@ DBUS_METHOD( GetStatus ) - REPLY_INIT; - OUT_ARGUMENTS; - -- MarshalStatus( p_this, &args, true ); -+ MarshalStatus( p_this, &args ); - - REPLY_SEND; - } -@@ -838,12 +838,28 @@ static void Run ( intf_thread_t *p_intf ) - int canc = vlc_savecancel(); - dbus_connection_read_write_dispatch( p_intf->p_sys->p_conn, 0 ); - -- // Get the messages -+ /* Get the list of events to process -+ * -+ * We can't keep the lock on p_intf->p_sys->p_events, else we risk a -+ * deadlock: -+ * The signal functions could lock mutex X while p_events is locked; -+ * While some other function in vlc (playlist) might lock mutex X -+ * and then set a variable which would call AllCallback(), which itself -+ * needs to lock p_events to add a new event. -+ */ - vlc_mutex_lock( &p_intf->p_sys->lock ); -- for( int i = vlc_array_count( p_intf->p_sys->p_events ) - 1; i >= 0; i-- ) -+ int i_events = vlc_array_count( p_intf->p_sys->p_events ); -+ callback_info_t* info[i_events]; -+ for( int i = i_events - 1; i >= 0; i-- ) - { -- callback_info_t* info = vlc_array_item_at_index( p_intf->p_sys->p_events, i ); -- switch( info->signal ) -+ info[i] = vlc_array_item_at_index( p_intf->p_sys->p_events, i ); -+ vlc_array_remove( p_intf->p_sys->p_events, i ); -+ } -+ vlc_mutex_unlock( &p_intf->p_sys->lock ); -+ -+ for( int i = 0; i < i_events; i++ ) -+ { -+ switch( info[i]->signal ) - { - case SIGNAL_ITEM_CURRENT: - TrackChange( p_intf ); -@@ -851,7 +867,7 @@ static void Run ( intf_thread_t *p_intf ) - case SIGNAL_INTF_CHANGE: - case SIGNAL_PLAYLIST_ITEM_APPEND: - case SIGNAL_PLAYLIST_ITEM_DELETED: -- TrackListChangeEmit( p_intf, info->signal, info->i_node ); -+ TrackListChangeEmit( p_intf, info[i]->signal, info[i]->i_node ); - break; - case SIGNAL_RANDOM: - case SIGNAL_REPEAT: -@@ -859,15 +875,13 @@ static void Run ( intf_thread_t *p_intf ) - StatusChangeEmit( p_intf ); - break; - case SIGNAL_STATE: -- StateChange( p_intf, info->i_input_state ); -+ StateChange( p_intf, info[i]->i_input_state ); - break; - default: - assert(0); - } -- free( info ); -- vlc_array_remove( p_intf->p_sys->p_events, i ); -+ free( info[i] ); - } -- vlc_mutex_unlock( &p_intf->p_sys->lock ); - vlc_restorecancel( canc ); - } - } -@@ -931,7 +945,7 @@ DBUS_SIGNAL( CapsChangeSignal ) - } - - /****************************************************************************** -- * TrackListChange: tracklist order / length change signal -+ * TrackListChange: tracklist order / length change signal - *****************************************************************************/ - DBUS_SIGNAL( TrackListChangeSignal ) - { /* emit the new tracklist lengh */ -@@ -1005,7 +1019,7 @@ DBUS_SIGNAL( StatusChangeSignal ) - - /* we're called from a callback of input_thread_t, so it can not be - * destroyed before we return */ -- MarshalStatus( (intf_thread_t*) p_data, &args, false ); -+ MarshalStatus( (intf_thread_t*) p_data, &args ); - - SIGNAL_SEND; - } -@@ -1119,7 +1133,7 @@ static int UpdateCaps( intf_thread_t* p_intf ) - intf_sys_t* p_sys = p_intf->p_sys; - dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST; - playlist_t* p_playlist = pl_Hold( p_intf ); -- -+ - PL_LOCK; - if( p_playlist->current.i_size > 0 ) - i_caps |= CAPS_CAN_PLAY | CAPS_CAN_GO_PREV | CAPS_CAN_GO_NEXT; -@@ -1233,8 +1247,7 @@ static int GetInputMeta( input_item_t* p_input, - * MarshalStatus: Fill a DBusMessage with the current player status - *****************************************************************************/ - --static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args, -- bool lock ) -+static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args ) - { /* This is NOT the right way to do that, it would be better to sore - the status information in p_sys and update it on change, thus - avoiding a long lock */ -diff --git a/modules/control/http/http.c b/modules/control/http/http.c -index 75f24c2..6987029 100644 ---- a/modules/control/http/http.c -+++ b/modules/control/http/http.c -@@ -27,6 +27,7 @@ - - #include "http.h" - #include -+#include - - #include - -@@ -787,7 +788,8 @@ int ArtCallback( httpd_handler_sys_t *p_args, - psz_art = input_item_GetArtURL( p_item ); - } - -- if( psz_art && !strncmp( psz_art, "file://", strlen( "file://" ) ) ) -+ if( psz_art && !strncmp( psz_art, "file://", strlen( "file://" ) ) && -+ decode_URI( psz_art + 7 ) ) - { - FILE *f; - char *psz_ext; -diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp -index f6b9f69..a66d090 100644 ---- a/modules/demux/mkv/mkv.cpp -+++ b/modules/demux/mkv/mkv.cpp -@@ -42,7 +42,7 @@ static void Close( vlc_object_t * ); - vlc_module_begin () - set_shortname( "Matroska" ) - set_description( N_("Matroska stream demuxer" ) ) -- set_capability( "demux", 0 ) -+ set_capability( "demux", 50 ) - set_callbacks( Open, Close ) - set_category( CAT_INPUT ) - set_subcategory( SUBCAT_INPUT_DEMUX ) -diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c -index ed1ed92..eee5b85 100644 ---- a/modules/demux/playlist/xspf.c -+++ b/modules/demux/playlist/xspf.c -@@ -546,32 +546,31 @@ static bool parse_track_node COMPLEX_INTERFACE - /* special case: location */ - if( !strcmp( p_handler->name, "location" ) ) - { -- char *psz_uri = NULL; -- psz_uri = decode_URI_duplicate( psz_value ); -+ char *psz_location = psz_value; -+ if( !strncmp( psz_value, "file://", 7 ) ) -+ psz_location = decode_URI( psz_value + 7 ); - -- if( !psz_uri ) -+ if( !psz_location ) - { - FREE_ATT(); - return false; - } - -- if( p_demux->p_sys->psz_base && !strstr( psz_uri, "://" ) ) -+ if( p_demux->p_sys->psz_base && !strstr( psz_value, "://" ) ) - { - char* psz_tmp; - if( asprintf( &psz_tmp, "%s%s", p_demux->p_sys->psz_base, -- psz_uri ) == -1 ) -+ psz_location ) == -1 ) - { -- free( psz_uri ); - FREE_ATT(); - return NULL; - } -- free( psz_uri ); -- psz_uri = psz_tmp; -+ input_item_SetURI( p_new_input, psz_tmp ); -+ free( psz_tmp ); - } -- input_item_SetURI( p_new_input, psz_uri ); -- free( psz_uri ); -+ else -+ input_item_SetURI( p_new_input, psz_location ); - input_item_CopyOptions( p_input_item, p_new_input ); -- psz_uri = NULL; - FREE_ATT(); - p_handler = NULL; - } -@@ -652,9 +651,7 @@ static bool set_item_info SIMPLE_INTERFACE - } - else if( !strcmp( psz_name, "image" ) ) - { -- char *psz_uri = decode_URI_duplicate( psz_value ); -- input_item_SetArtURL( p_input, psz_uri ); -- free( psz_uri ); -+ input_item_SetArtURL( p_input, psz_value ); - } - return true; - } -diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c -index 3b90e2d..bb0a47e 100644 ---- a/modules/demux/vobsub.c -+++ b/modules/demux/vobsub.c -@@ -537,7 +537,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) - } - else if( !strncmp( "id:", line, 3 ) ) - { -- char language[20]; -+ char language[3]; - int i_track_id; - es_format_t fmt; - -@@ -547,6 +547,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) - { - p_sys->i_tracks++; - p_sys->track = realloc( p_sys->track, sizeof( vobsub_track_t ) * (p_sys->i_tracks + 1 ) ); -+ language[2] = '\0'; - - /* Init the track */ - current_tk = &p_sys->track[p_sys->i_tracks - 1]; -@@ -560,7 +561,7 @@ static int ParseVobSubIDX( demux_t *p_demux ) - es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) ); - fmt.subs.spu.i_original_frame_width = p_sys->i_original_frame_width; - fmt.subs.spu.i_original_frame_height = p_sys->i_original_frame_height; -- fmt.psz_language = strdup( language ); -+ fmt.psz_language = language; - if( p_sys->b_palette ) - { - fmt.subs.spu.palette[0] = 0xBeef; -diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp -index 464c27f..cf4d0cc 100644 ---- a/modules/gui/qt4/components/extended_panels.cpp -+++ b/modules/gui/qt4/components/extended_panels.cpp -@@ -1340,7 +1340,7 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) : - - QLabel *subSpeedLabel = new QLabel; - subSpeedLabel->setText( qtr( "Speed of the subtitles:" ) ); -- subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 3 ); -+ subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 1 ); - - subSpeedSpin = new QDoubleSpinBox; - subSpeedSpin->setAlignment( Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ); -diff --git a/modules/gui/qt4/components/sout/profile_selector.cpp b/modules/gui/qt4/components/sout/profile_selector.cpp -index 7c47163..3ebaa66 100644 ---- a/modules/gui/qt4/components/sout/profile_selector.cpp -+++ b/modules/gui/qt4/components/sout/profile_selector.cpp -@@ -331,7 +331,7 @@ void VLCProfileEditor::fillProfile( const QString& qs ) - CHECKMUX( FLVMux, "flv" ) - CHECKMUX( MKVMux, "mkv" ) - CHECKMUX( AVIMux, "avi" ) -- CHECKMUX( MJPEGMux, "mjpg" ){} -+ CHECKMUX( MJPEGMux, "mpjpeg" ){} - #undef CHECKMUX - - ui.keepVideo->setChecked( !options[1].toInt() ); -@@ -420,7 +420,7 @@ QString VLCProfileEditor::transcodeValue() - SMUX( FLVMux, "flv" ) - SMUX( MKVMux, "mkv" ) - SMUX( AVIMux, "avi" ) -- SMUX( MJPEGMux, "mjpg" ){} -+ SMUX( MJPEGMux, "mpjpeg" ){} - #undef SMUX - - #define currentData( box ) box->itemData( box->currentIndex() ) -diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp -index 0b456ad..1fc1f49 100644 ---- a/modules/gui/qt4/input_manager.cpp -+++ b/modules/gui/qt4/input_manager.cpp -@@ -29,6 +29,7 @@ - - #include "input_manager.hpp" - #include -+#include - - #include - -@@ -589,12 +590,12 @@ void InputManager::UpdateArt() - if( hasInput() ) - { - char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) ); -- url = qfu( psz_art ); -+ if( psz_art && !strncmp( psz_art, "file://", 7 ) && -+ decode_URI( psz_art + 7 ) ) -+ url = qfu( psz_art + 7); - free( psz_art ); - } -- url = url.replace( "file://", QString("" ) ); -- /* Taglib seems to define a attachment://, It won't work yet */ -- url = url.replace( "attachment://", QString("" ) ); -+ - /* Update Art meta */ - emit artChanged( url ); - } -diff --git a/modules/meta_engine/folder.c b/modules/meta_engine/folder.c -index 4d41b0a..5a0c3a0 100644 ---- a/modules/meta_engine/folder.c -+++ b/modules/meta_engine/folder.c -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - #ifdef HAVE_SYS_STAT_H - # include -@@ -98,26 +99,31 @@ static int FindMeta( vlc_object_t *p_this ) - case 0: - /* Windows Folder.jpg */ - snprintf( psz_filename, MAX_PATH, -- "file://%sFolder.jpg", psz_path ); -+ "%sFolder.jpg", psz_path ); - break; - - case 1: - /* Windows AlbumArtSmall.jpg == small version of Folder.jpg */ - snprintf( psz_filename, MAX_PATH, -- "file://%sAlbumArtSmall.jpg", psz_path ); -+ "%sAlbumArtSmall.jpg", psz_path ); - break; - - case 2: - /* KDE (?) .folder.png */ - snprintf( psz_filename, MAX_PATH, -- "file://%s.folder.png", psz_path ); -+ "%s.folder.png", psz_path ); - break; - } - -- if( utf8_stat( psz_filename+7, &a ) != -1 ) -+ if( utf8_stat( psz_filename, &a ) != -1 ) - { -- input_item_SetArtURL( p_item, psz_filename ); -- b_have_art = true; -+ char *psz_uri = make_URI( psz_filename ); -+ if( psz_uri ) -+ { -+ input_item_SetArtURL( p_item, psz_uri ); -+ free( psz_uri ); -+ b_have_art = true; -+ } - } - } - -diff --git a/modules/misc/notify/growl.m b/modules/misc/notify/growl.m -index c0503b0..95ad205 100644 ---- a/modules/misc/notify/growl.m -+++ b/modules/misc/notify/growl.m -@@ -58,6 +58,7 @@ - #include - #include - #include -+#include - - - /***************************************************************************** -@@ -210,7 +211,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, - char *psz_arturl = input_item_GetArtURL( p_item ); - CFDataRef art = NULL; - if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) && -- strlen( psz_arturl ) > 7 ) -+ decode_URI( psz_arturl + 7 ) ) - art = (CFDataRef) readFile( psz_arturl + 7 ); - - free( psz_title ); -diff --git a/modules/misc/notify/notify.c b/modules/misc/notify/notify.c -index 6b3be7c..6fa084a 100644 ---- a/modules/misc/notify/notify.c -+++ b/modules/misc/notify/notify.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -221,12 +222,11 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, - vlc_object_release( p_input ); - - if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) && -- strlen( psz_arturl ) > 7 ) -+ decode_URI( psz_arturl + 7 ) ) - { /* scale the art to show it in notify popup */ - GError *p_error = NULL; - pix = gdk_pixbuf_new_from_file_at_scale( &psz_arturl[7], - 72, 72, TRUE, &p_error ); -- free( psz_arturl ); - } - else /* else we show state-of-the art logo */ - { -@@ -239,6 +239,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, - } - } - -+ free( psz_arturl ); -+ - /* we need to replace '&' with '&' because '&' is a keyword of - * notification-daemon parser */ - const int i_len = strlen( psz_tmp ); -diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c -index 0f5f82c..6765adb 100644 ---- a/modules/misc/playlist/xspf.c -+++ b/modules/misc/playlist/xspf.c -@@ -212,9 +212,7 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file, - if( psz == NULL ) psz = strdup( "" ); - if( !EMPTY_STR( psz ) ) - { -- psz_uri = make_URI( psz ); -- fprintf( p_file, "\t\t\t%s\n", psz_uri ); -- free( psz_uri ); -+ fprintf( p_file, "\t\t\t%s\n", psz ); - } - free( psz ); - -diff --git a/modules/misc/quartztext.c b/modules/misc/quartztext.c -index a19c2a3..3a8c7db 100644 ---- a/modules/misc/quartztext.c -+++ b/modules/misc/quartztext.c -@@ -749,7 +749,9 @@ static offscreen_bitmap_t *Compose( int i_text_align, UniChar *psz_utf16_str, ui - CGContextSetTextDrawingMode( p_context, kCGTextFillStroke ); - CGContextSetShadow( p_context, CGSizeMake( 0, 0 ), 5 ); - float black_components[4] = {0, 0, 0, 1}; -- CGContextSetShadowWithColor (p_context, CGSizeMake( 0, 0 ), 5, CGColorCreate( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ), black_components )); -+ CGColorRef outlinecolor = CGColorCreate( CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ), black_components ); -+ CGContextSetShadowWithColor (p_context, CGSizeMake( 0, 0 ), 5, outlinecolor); -+ CGColorRelease( outlinecolor ); - do - { - // ATSUBreakLine will automatically pick up any manual '\n's also -diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c -index edd06c6..c4770f5 100644 ---- a/modules/stream_out/rtp.c -+++ b/modules/stream_out/rtp.c -@@ -853,10 +853,8 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - * mux (TS/PS), then p_fmt is NULL. */ - sout_stream_sys_t *p_sys = p_stream->p_sys; - sout_stream_id_t *id; -- int i_port, cscov = -1; -+ int cscov = -1; - char *psz_sdp; -- int i_port_audio_option = var_GetInteger( p_stream, "port-audio" ); -- int i_port_video_option = var_GetInteger( p_stream, "port-video" ); - - if (0xffffffff == p_sys->payload_bitmap) - { -@@ -864,38 +862,41 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - return NULL; - } - -- id = vlc_object_create( p_stream, sizeof( sout_stream_id_t ) ); -- if( id == NULL ) -- return NULL; -- vlc_object_attach( id, p_stream ); -- - /* Choose the port */ -- i_port = 0; -+ uint16_t i_port = 0; - if( p_fmt == NULL ) - ; - else - if( p_fmt->i_cat == AUDIO_ES && p_sys->i_port_audio > 0 ) -- { - i_port = p_sys->i_port_audio; -- p_sys->i_port_audio = 0; -- } - else - if( p_fmt->i_cat == VIDEO_ES && p_sys->i_port_video > 0 ) -- { - i_port = p_sys->i_port_video; -- p_sys->i_port_video = 0; -- } - -- while( i_port == 0 ) -+ /* We do not need the ES lock (p_sys->lock_es) here, because this is the -+ * only one thread that can *modify* the ES table. The ES lock protects -+ * the other threads from our modifications (TAB_APPEND, TAB_REMOVE). */ -+ for (int i = 0; i_port && (i < p_sys->i_es); i++) -+ if (i_port == p_sys->es[i]->i_port) -+ i_port = 0; /* Port already in use! */ -+ for (uint16_t p = p_sys->i_port; i_port == 0; p += 2) - { -- if( p_sys->i_port != i_port_audio_option -- && p_sys->i_port != i_port_video_option ) -+ if (p == 0) - { -- i_port = p_sys->i_port; -+ msg_Err (p_stream, "too many RTP elementary streams"); -+ return NULL; - } -- p_sys->i_port += 2; -+ i_port = p; -+ for (int i = 0; i_port && (i < p_sys->i_es); i++) -+ if (p == p_sys->es[i]->i_port) -+ i_port = 0; - } - -+ id = vlc_object_create( p_stream, sizeof( sout_stream_id_t ) ); -+ if( id == NULL ) -+ return NULL; -+ vlc_object_attach( id, p_stream ); -+ - id->p_stream = p_stream; - - /* Look for free dymanic payload type */ -@@ -1311,11 +1312,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id ) - TAB_REMOVE( p_sys->i_es, p_sys->es, id ); - vlc_mutex_unlock( &p_sys->lock_es ); - -- /* Release port */ -- if( id->i_port == var_GetInteger( p_stream, "port-audio" ) ) -- p_sys->i_port_audio = id->i_port; -- if( id->i_port == var_GetInteger( p_stream, "port-video" ) ) -- p_sys->i_port_video = id->i_port; - /* Release dynamic payload type */ - if (id->i_payload_type >= 96) - p_sys->payload_bitmap &= ~(1 << (id->i_payload_type - 96)); -diff --git a/share/lua/meta/10_googleimage.lua b/share/lua/meta/10_googleimage.lua -index e203c9c..8dc1e04 100644 ---- a/share/lua/meta/10_googleimage.lua -+++ b/share/lua/meta/10_googleimage.lua -@@ -44,9 +44,5 @@ function fetch_art() - page = fd:read( 65653 ) - fd = nil - _, _, arturl = string.find( page, "imgurl=([^&]+)" ) -- if arturl then -- return vlc.strings.decode_uri(arturl) -- else -- return nil -- end -+ return arturl - end -diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua -index e850bcf..f4545c6 100644 ---- a/share/lua/playlist/dailymotion.lua -+++ b/share/lua/playlist/dailymotion.lua -@@ -41,7 +41,7 @@ function parse() - if not line then break end - if string.match( line, "param name=\"flashvars\" value=\".*video=" ) - then -- arturl = vlc.strings.decode_uri( find( line, "param name=\"flashvars\" value=\".*preview=([^&]*)" ) ) -+ arturl = find( line, "param name=\"flashvars\" value=\".*preview=([^&]*)" ) - videos = vlc.strings.decode_uri( find( line, "param name=\"flashvars\" value=\".*video=([^&]*)" ) ) - --[[ we get a list of different streams available, at various codecs - and resolutions: -diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua -index 452400f..238d3eb 100644 ---- a/share/lua/playlist/youtube.lua -+++ b/share/lua/playlist/youtube.lua -@@ -26,7 +26,7 @@ end - - function get_arturl( path, video_id ) - if string.match( vlc.path, "iurl=" ) then -- return vlc.strings.decode_uri( get_url_param( vlc.path, "iurl" ) ) -+ return vlc.strings( get_url_param( vlc.path, "iurl" ) ) - end - if not arturl then - return "http://img.youtube.com/vi/"..video_id.."/default.jpg" -diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h -index 417d38e..053716b 100644 ---- a/src/control/libvlc_internal.h -+++ b/src/control/libvlc_internal.h -@@ -90,6 +90,7 @@ struct libvlc_media_list_t - libvlc_instance_t * p_libvlc_instance; - int i_refcount; - vlc_mutex_t object_lock; -+ vlc_mutex_t refcount_lock; - libvlc_media_t * p_md; /* The media from which the - * mlist comes, if any. */ - vlc_array_t items; -diff --git a/src/control/media_list.c b/src/control/media_list.c -index e043c4c..0bb2276 100644 ---- a/src/control/media_list.c -+++ b/src/control/media_list.c -@@ -170,6 +170,7 @@ libvlc_media_list_new( libvlc_instance_t * p_inst, - } - - vlc_mutex_init( &p_mlist->object_lock ); -+ vlc_mutex_init( &p_mlist->refcount_lock ); // FIXME: spinlock? - - vlc_array_init( &p_mlist->items ); - p_mlist->i_refcount = 1; -@@ -188,14 +189,14 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) - libvlc_media_t * p_md; - int i; - -- vlc_mutex_lock( &p_mlist->object_lock ); -+ vlc_mutex_lock( &p_mlist->refcount_lock ); - p_mlist->i_refcount--; - if( p_mlist->i_refcount > 0 ) - { -- vlc_mutex_unlock( &p_mlist->object_lock ); -+ vlc_mutex_unlock( &p_mlist->refcount_lock ); - return; - } -- vlc_mutex_unlock( &p_mlist->object_lock ); -+ vlc_mutex_unlock( &p_mlist->refcount_lock ); - - /* Refcount null, time to free */ - -@@ -223,9 +224,9 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) - **************************************************************************/ - void libvlc_media_list_retain( libvlc_media_list_t * p_mlist ) - { -- vlc_mutex_lock( &p_mlist->object_lock ); -+ vlc_mutex_lock( &p_mlist->refcount_lock ); - p_mlist->i_refcount++; -- vlc_mutex_unlock( &p_mlist->object_lock ); -+ vlc_mutex_unlock( &p_mlist->refcount_lock ); - } - - -diff --git a/src/libvlccore.sym b/src/libvlccore.sym -index d72c10f..4f201d3 100644 ---- a/src/libvlccore.sym -+++ b/src/libvlccore.sym -@@ -380,8 +380,6 @@ tls_ClientCreate - tls_ClientDelete - ToLocale - ToLocaleDup --unescape_URI --unescape_URI_duplicate - update_Check - update_Delete - update_Download -diff --git a/src/misc/mtime.c b/src/misc/mtime.c -index c735bdf..a0c24e8 100644 ---- a/src/misc/mtime.c -+++ b/src/misc/mtime.c -@@ -56,7 +56,8 @@ - # include - #endif - --#ifdef __APPLE__ -+#if defined(__APPLE__) && !defined(__powerpc__) && !defined(__ppc__) && !defined(__ppc64__) -+#define USE_APPLE_MACH 1 - # include - # include - #endif -@@ -173,7 +174,7 @@ static inline unsigned mprec( void ) - #endif - } - --#ifdef __APPLE__ -+#ifdef USE_APPLE_MACH - static mach_timebase_info_data_t mtime_timebase_info; - static pthread_once_t mtime_timebase_info_once = PTHREAD_ONCE_INIT; - static void mtime_init_timebase(void) -@@ -207,7 +208,7 @@ mtime_t mdate( void ) - #elif defined( HAVE_KERNEL_OS_H ) - res = real_time_clock_usecs(); - --#elif defined( __APPLE__ ) -+#elif defined( USE_APPLE_MACH ) - pthread_once(&mtime_timebase_info_once, mtime_init_timebase); - uint64_t date = mach_absolute_time(); - -@@ -323,7 +324,7 @@ mtime_t mdate( void ) - i_previous_time = res; - LeaveCriticalSection( &date_lock ); - } --#elif defined( __APPLE__ ) /* The version that should be used, if it was cancelable */ -+#elif USE_APPLE_MACH /* The version that should be used, if it was cancelable */ - pthread_once(&mtime_timebase_info_once, mtime_init_timebase); - uint64_t mach_time = date * 1000 * mtime_timebase_info.denom / mtime_timebase_info.numer; - mach_wait_until(mach_time); -@@ -424,7 +425,7 @@ void msleep( mtime_t delay ) - - while( nanosleep( &ts_delay, &ts_delay ) && ( errno == EINTR ) ); - --#elif defined( __APPLE__ ) /* The version that should be used, if it was cancelable */ -+#elif USE_APPLE_MACH /* The version that should be used, if it was cancelable */ - pthread_once(&mtime_timebase_info_once, mtime_init_timebase); - uint64_t mach_time = delay * 1000 * mtime_timebase_info.denom / mtime_timebase_info.numer; - mach_wait_until(mach_time + mach_absolute_time()); -diff --git a/src/misc/threads.c b/src/misc/threads.c -index 149e761..71d0afe 100644 ---- a/src/misc/threads.c -+++ b/src/misc/threads.c -@@ -618,7 +618,7 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, - mtime_t deadline) - { - #if defined(LIBVLC_USE_PTHREAD) --#ifdef __APPLE__ -+#if defined(__APPLE__) && !defined(__powerpc__) && !defined( __ppc__ ) && !defined( __ppc64__ ) - /* mdate() is mac_absolute_time on osx, which we must convert to do - * the same base than gettimeofday() on which pthread_cond_timedwait - * counts on. */ -diff --git a/src/playlist/art.c b/src/playlist/art.c -index 002ec6e..8b65121 100644 ---- a/src/playlist/art.c -+++ b/src/playlist/art.c -@@ -32,6 +32,8 @@ - #include - #include - #include -+#include -+ - #include /* PATH_MAX */ - - #ifdef HAVE_SYS_STAT_H -@@ -132,7 +134,7 @@ static char *ArtCacheName( input_item_t *p_item, const char *psz_type ) - - char *psz_ext = filename_sanitize( psz_type ? psz_type : "" ); - char *psz_filename; -- if( asprintf( &psz_filename, "file://%s" DIR_SEP "art%s", psz_path, psz_ext ) < 0 ) -+ if( asprintf( &psz_filename, "%s" DIR_SEP "art%s", psz_path, psz_ext ) < 0 ) - psz_filename = NULL; - - free( psz_ext ); -@@ -164,12 +166,19 @@ int playlist_FindArtInCache( input_item_t *p_item ) - if( !strncmp( psz_filename, "art", 3 ) ) - { - char *psz_file; -- if( asprintf( &psz_file, "file://%s" DIR_SEP "%s", -+ if( asprintf( &psz_file, "%s" DIR_SEP "%s", - psz_path, psz_filename ) < 0 ) - psz_file = NULL; - if( psz_file ) -- input_item_SetArtURL( p_item, psz_file ); -- free( psz_file ); -+ { -+ char *psz_uri = make_URI( psz_file ); -+ if( psz_uri ) -+ { -+ input_item_SetArtURL( p_item, psz_uri ); -+ free( psz_uri ); -+ } -+ free( psz_file ); -+ } - - b_found = true; - } -@@ -192,17 +201,25 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item, - if( !psz_filename ) - return VLC_EGENERIC; - -+ char *psz_uri = make_URI( psz_filename ); -+ if( !psz_uri ) -+ { -+ free( psz_filename ); -+ return VLC_EGENERIC; -+ } -+ - /* Check if we already dumped it */ - struct stat s; -- if( !utf8_stat( psz_filename+7, &s ) ) -+ if( !utf8_stat( psz_filename, &s ) ) - { -- input_item_SetArtURL( p_item, psz_filename ); -+ input_item_SetArtURL( p_item, psz_uri ); - free( psz_filename ); -+ free( psz_uri ); - return VLC_SUCCESS; - } - - /* Dump it otherwise */ -- FILE *f = utf8_fopen( psz_filename+7, "wb" ); -+ FILE *f = utf8_fopen( psz_filename, "wb" ); - if( f ) - { - if( fwrite( p_buffer, i_buffer, 1, f ) != 1 ) -@@ -212,11 +229,12 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item, - else - { - msg_Dbg( p_playlist, "album art saved to %s", psz_filename ); -- input_item_SetArtURL( p_item, psz_filename ); -+ input_item_SetArtURL( p_item, psz_uri ); - } - fclose( f ); - } - free( psz_filename ); -+ free( psz_uri ); - return VLC_SUCCESS; - } - -diff --git a/src/text/strings.c b/src/text/strings.c -index 9c6d931..736bb87 100644 ---- a/src/text/strings.c -+++ b/src/text/strings.c -@@ -49,89 +49,6 @@ - #include - - /** -- * Unescape URI encoded string -- * \return decoded duplicated string -- */ --char *unescape_URI_duplicate( const char *psz ) --{ -- char *psz_dup = strdup( psz ); -- unescape_URI( psz_dup ); -- return psz_dup; --} -- --/** -- * Unescape URI encoded string in place -- * \return nothing -- */ --void unescape_URI( char *psz ) --{ -- unsigned char *in = (unsigned char *)psz, *out = in, c; -- if( psz == NULL ) -- return; -- -- while( ( c = *in++ ) != '\0' ) -- { -- switch( c ) -- { -- case '%': -- { -- char val[5], *pval = val; -- unsigned long cp; -- -- switch( c = *in++ ) -- { -- case '\0': -- return; -- -- case 'u': -- case 'U': -- if( ( *pval++ = *in++ ) == '\0' ) -- return; -- if( ( *pval++ = *in++ ) == '\0' ) -- return; -- c = *in++; -- -- default: -- *pval++ = c; -- if( ( *pval++ = *in++ ) == '\0' ) -- return; -- *pval = '\0'; -- } -- -- cp = strtoul( val, NULL, 0x10 ); -- if( cp < 0x80 ) -- *out++ = cp; -- else -- if( cp < 0x800 ) -- { -- *out++ = (( cp >> 6) | 0xc0); -- *out++ = (( cp & 0x3f) | 0x80); -- } -- else -- { -- assert( cp < 0x10000 ); -- *out++ = (( cp >> 12) | 0xe0); -- *out++ = (((cp >> 6) & 0x3f) | 0x80); -- *out++ = (( cp & 0x3f) | 0x80); -- } -- break; -- } -- -- /* + is not a special case - it means plus, not space. */ -- -- default: -- /* Inserting non-ASCII or non-printable characters is unsafe, -- * and no sane browser will send these unencoded */ -- if( ( c < 32 ) || ( c > 127 ) ) -- *out++ = '?'; -- else -- *out++ = c; -- } -- } -- *out = '\0'; --} -- --/** - * Decode encoded URI component. See also decode_URI(). - * \return decoded duplicated string - */ -diff --git a/test/libvlc/media_list_player.c b/test/libvlc/media_list_player.c -index 712e0fe..49a1443 100644 ---- a/test/libvlc/media_list_player.c -+++ b/test/libvlc/media_list_player.c -@@ -92,8 +92,11 @@ static void test_media_list_player_play_item_at_index(const char** argv, int arg - - mlp = libvlc_media_list_player_new (vlc, &ex); - -- libvlc_media_list_add_media( ml, md, &ex ); -- catch (); -+ for (unsigned i = 0; i < 5; i++) -+ { -+ libvlc_media_list_add_media( ml, md, &ex ); -+ catch (); -+ } - - libvlc_media_list_player_set_media_list( mlp, ml, &ex ); - -diff --git a/test/libvlc/test.h b/test/libvlc/test.h -index 388a465..1015d25 100644 ---- a/test/libvlc/test.h -+++ b/test/libvlc/test.h -@@ -100,7 +100,7 @@ static inline void catch (void) - static inline void test_init (void) - { - (void)test_default_sample; /* This one may not be used */ -- alarm (50); /* Make sure "make check" does not get stuck */ -+ alarm (10); /* Make sure "make check" does not get stuck */ - } - - #endif /* TEST_H */ diff --git a/vlc.spec b/vlc.spec index f4062b6..3d59c0e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,7 +4,7 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -rc2 +%define vlc_rc -rc3 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.10rc2%{?dist} +Release: 0.11rc3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -30,9 +30,8 @@ Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch -Patch6: vlc-1.0-bugfix-20090602.patch +Patch6: 0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch Patch7: vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch -Patch9: 0001-QT4-menus-remove-previous-signal-slot-connection-s.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -259,9 +258,8 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %if 0%{?fedora} >= 11 %patch5 -p1 -b .xul191 %endif -%patch6 -p1 -b .bugfix +%patch6 -p1 -b .alsa_pa %patch7 -p1 -b .revert -%patch9 -p1 -b .disconnect rm modules/access/videodev2.h ln -sf %{_includedir}/videodev2.h modules/access/ @@ -568,6 +566,9 @@ fi || : %changelog +* Sun Jun 7 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.11rc3 +- Update to 1.0.0-rc3 + * Fri Jun 5 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.10rc2 - Move some module to avoid dependency - Remove previous signal-slot connection(s) if any - vlc trac #2818 From d11f1acbeb31fb703253c963d40e69c365af6a0d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 17 Jun 2009 16:47:41 +0000 Subject: [PATCH 050/671] Clean to prepare -rc4 --- ...ve-previous-signal-slot-connection-s.patch | 27 - ...ility-with-PA-when-the-vlc-alsa-outp.patch | 25 - vlc-1.0.0-pre1-xulrunner-191_support.patch | 494 ------------------ ...3ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch | 66 --- 4 files changed, 612 deletions(-) delete mode 100644 0001-QT4-menus-remove-previous-signal-slot-connection-s.patch delete mode 100644 0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch delete mode 100644 vlc-1.0.0-pre1-xulrunner-191_support.patch delete mode 100644 vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch diff --git a/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch b/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch deleted file mode 100644 index b8335f7..0000000 --- a/0001-QT4-menus-remove-previous-signal-slot-connection-s.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4717657053a13d69d48dc82dbc5402f6712f66ea Mon Sep 17 00:00:00 2001 -From: Erwan Tulou -Date: Fri, 5 Jun 2009 09:55:09 +0200 -Subject: [PATCH] QT4 menus : remove previous signal-slot connection(s) if any (correct trac #2818) - ---- - modules/gui/qt4/menus.cpp | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp -index 0a12c20..9304752 100644 ---- a/modules/gui/qt4/menus.cpp -+++ b/modules/gui/qt4/menus.cpp -@@ -1386,6 +1386,10 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var, - - MenuItemData *itemData = new MenuItemData( THEDP->menusMapper, p_obj, i_val_type, - val, psz_var ); -+ -+ /* remove previous signal-slot connection(s) if any */ -+ action->disconnect( ); -+ - CONNECT( action, triggered(), THEDP->menusMapper, map() ); - THEDP->menusMapper->setMapping( action, itemData ); - --- -1.5.6.5 - diff --git a/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch b/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch deleted file mode 100644 index 5585bc2..0000000 --- a/0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch +++ /dev/null @@ -1,25 +0,0 @@ -From dce1b815f87daef89715c9e5bec7ee78a69df79f Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) -Date: Thu, 4 Jun 2009 15:18:40 +0200 -Subject: [PATCH] Improve compatibility with PA when the vlc alsa output is used. - ---- - modules/audio_output/alsa.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c -index 2d03d1d..dd33f31 100644 ---- a/modules/audio_output/alsa.c -+++ b/modules/audio_output/alsa.c -@@ -78,7 +78,7 @@ struct aout_sys_t - number of channel(s) (eg. 2 for stereo) and the size of a sample (eg. - 2 for int16_t). */ - #define ALSA_DEFAULT_PERIOD_SIZE 1024 --#define ALSA_DEFAULT_BUFFER_SIZE ( ALSA_DEFAULT_PERIOD_SIZE << 8 ) -+#define ALSA_DEFAULT_BUFFER_SIZE ( ALSA_DEFAULT_PERIOD_SIZE << 4 ) - #define ALSA_SPDIF_PERIOD_SIZE A52_FRAME_NB - #define ALSA_SPDIF_BUFFER_SIZE ( ALSA_SPDIF_PERIOD_SIZE << 4 ) - /* Why << 4 ? --Meuuh */ --- -1.6.0.6 - diff --git a/vlc-1.0.0-pre1-xulrunner-191_support.patch b/vlc-1.0.0-pre1-xulrunner-191_support.patch deleted file mode 100644 index 21e2176..0000000 --- a/vlc-1.0.0-pre1-xulrunner-191_support.patch +++ /dev/null @@ -1,494 +0,0 @@ -From: Pavlov Konstantin -Date: Wed, 25 Mar 2009 14:28:20 +0000 (+0000) -Subject: Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov -X-Git-Tag: 1.0.0-alt0.pre1^0 -X-Git-Url: http://git.altlinux.org/people/thresh/packages/vlc.git?p=vlc.git;a=commitdiff_plain;h=1e8df789f39d5d4c09bf48935ace087e5e5867bd;hp=94de3abc393d1c684fb9129210ecfbc5462b293e - -Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov -(legion at altlinux ru) ---- - -diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp -index e9ffdc5..a6ca2e4 100644 ---- a/projects/mozilla/support/npmac.cpp -+++ b/projects/mozilla/support/npmac.cpp -@@ -1017,20 +1017,20 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - // - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -- pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New)); -- pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); -- pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -- pluginFuncs->newstream = NewNPP_NewStreamProc(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); -- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); -- pluginFuncs->asfile = NewNPP_StreamAsFileProc(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); -- pluginFuncs->writeready = NewNPP_WriteReadyProc(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); -- pluginFuncs->write = NewNPP_WriteProc(PLUGIN_TO_HOST_GLUE(write, Private_Write)); -- pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print)); -- pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); -- pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); -+ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New)); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy)); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow)); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream)); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream)); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile)); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady)); -+ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write)); -+ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print)); -+ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent)); -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue)); - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { -- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); -+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify)); - } - #ifdef OJI - if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) -@@ -1040,7 +1040,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, - #else - pluginFuncs->javaClass = NULL; - #endif -- *unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); -+ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown)); - - SetUpQD(); - err = Private_Initialize(); -@@ -1176,18 +1176,18 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs) - - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -- pluginFuncs->newp = NewNPP_NewProc(Private_New); -- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); -- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); -- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); -- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); -- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); -- pluginFuncs->write = NewNPP_WriteProc(Private_Write); -- pluginFuncs->print = NewNPP_PrintProc(Private_Print); -- pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); -- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); -- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); -+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); -+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); -+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); -+ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent); -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); -+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); - if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) - { - pluginFuncs->urlnotify = Private_URLNotify; -diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c -index 0f6efc0..9ad454c 100644 ---- a/projects/mozilla/support/npunix.c -+++ b/projects/mozilla/support/npunix.c -@@ -103,149 +103,136 @@ NPN_Version(int* plugin_major, int* plugin_minor, - NPError - NPN_GetValue(NPP instance, NPNVariable variable, void *r_value) - { -- return CallNPN_GetValueProc(gNetscapeFuncs.getvalue, -- instance, variable, r_value); -+ return (*gNetscapeFuncs.getvalue)(instance, variable, r_value); - } - - NPError - NPN_SetValue(NPP instance, NPPVariable variable, void *value) - { -- return CallNPN_SetValueProc(gNetscapeFuncs.setvalue, -- instance, variable, value); -+ return (*gNetscapeFuncs.setvalue)(instance, variable, value); - } - - NPError - NPN_GetURL(NPP instance, const char* url, const char* window) - { -- return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window); -+ return (*gNetscapeFuncs.geturl)(instance, url, window); - } - - NPError - NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData) - { -- return CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData); -+ return (*gNetscapeFuncs.geturlnotify)(instance, url, window, notifyData); - } - - NPError - NPN_PostURL(NPP instance, const char* url, const char* window, - uint32_t len, const char* buf, NPBool file) - { -- return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, -- url, window, len, buf, file); -+ return (*gNetscapeFuncs.posturl)(instance, url, window, len, buf, file); - } - - NPError - NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, - const char* buf, NPBool file, void* notifyData) - { -- return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, -- instance, url, window, len, buf, file, notifyData); -+ return (*gNetscapeFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData); - } - - NPError - NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) - { -- return CallNPN_RequestReadProc(gNetscapeFuncs.requestread, -- stream, rangeList); -+ return (*gNetscapeFuncs.requestread)(stream, rangeList); - } - - NPError - NPN_NewStream(NPP instance, NPMIMEType type, const char *window, - NPStream** stream_ptr) - { -- return CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, -- type, window, stream_ptr); -+ return (*gNetscapeFuncs.newstream)(instance, type, window, stream_ptr); - } - - int32_t - NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) - { -- return CallNPN_WriteProc(gNetscapeFuncs.write, instance, -- stream, len, buffer); -+ return (*gNetscapeFuncs.write)(instance, stream, len, buffer); - } - - NPError - NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) - { -- return CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, -- instance, stream, reason); -+ return (*gNetscapeFuncs.destroystream)(instance, stream, reason); - } - - void - NPN_Status(NPP instance, const char* message) - { -- CallNPN_StatusProc(gNetscapeFuncs.status, instance, message); -+ (*gNetscapeFuncs.status)(instance, message); - } - - const char* - NPN_UserAgent(NPP instance) - { -- return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance); -+ return (*gNetscapeFuncs.uagent)(instance); - } - - void *NPN_MemAlloc(uint32_t size) - { -- return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); -+ return (*gNetscapeFuncs.memalloc)(size); - } - - void NPN_MemFree(void* ptr) - { -- CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); -+ (*gNetscapeFuncs.memfree)(ptr); - } - - uint32_t NPN_MemFlush(uint32_t size) - { -- return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); -+ return (*gNetscapeFuncs.memflush)(size); - } - - void NPN_ReloadPlugins(NPBool reloadPages) - { -- CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages); -+ (*gNetscapeFuncs.reloadplugins)(reloadPages); - } - - #ifdef OJI - JRIEnv* NPN_GetJavaEnv() - { -- return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); -+ return (*gNetscapeFuncs.getJavaEnv); - } - - jref NPN_GetJavaPeer(NPP instance) - { -- return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, -- instance); -+ return (*gNetscapeFuncs.getJavaPeer)(instance); - } - #endif - - void - NPN_InvalidateRect(NPP instance, NPRect *invalidRect) - { -- CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance, -- invalidRect); -+ (*gNetscapeFuncs.invalidaterect)(instance, invalidRect); - } - - void - NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) - { -- CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance, -- invalidRegion); -+ (*gNetscapeFuncs.invalidateregion)(instance, invalidRegion); - } - - void - NPN_ForceRedraw(NPP instance) - { -- CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance); -+ (*gNetscapeFuncs.forceredraw)(instance); - } - - void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled) - { -- CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate, -- instance, enabled); -+ (*gNetscapeFuncs.pushpopupsenabledstate)(instance, enabled); - } - - void NPN_PopPopupsEnabledState(NPP instance) - { -- CallNPN_PopPopupsEnabledStateProc(gNetscapeFuncs.poppopupsenabledstate, -- instance); -+ (*gNetscapeFuncs.poppopupsenabledstate)(instance); - } - - NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) -@@ -253,8 +240,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) - { -- return CallNPN_GetStringIdentifierProc( -- gNetscapeFuncs.getstringidentifier, name); -+ return (*gNetscapeFuncs.getstringidentifier)(name); - } - return NULL; - } -@@ -264,19 +250,14 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- { -- CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers, -- names, nameCount, identifiers); -- } -+ (*gNetscapeFuncs.getstringidentifiers)(names, nameCount, identifiers); - } - - NPIdentifier NPN_GetIntIdentifier(int32_t intid) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- { -- return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid); -- } -+ return (*gNetscapeFuncs.getintidentifier)(intid); - return NULL; - } - -@@ -284,11 +265,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- { -- return CallNPN_IdentifierIsStringProc( -- gNetscapeFuncs.identifierisstring, -- identifier); -- } -+ return (*gNetscapeFuncs.identifierisstring)(identifier); - return false; - } - -@@ -296,11 +273,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- { -- return CallNPN_UTF8FromIdentifierProc( -- gNetscapeFuncs.utf8fromidentifier, -- identifier); -- } -+ return (*gNetscapeFuncs.utf8fromidentifier)(identifier); - return NULL; - } - -@@ -308,11 +281,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- { -- return CallNPN_IntFromIdentifierProc( -- gNetscapeFuncs.intfromidentifier, -- identifier); -- } -+ return (*gNetscapeFuncs.intfromidentifier)(identifier); - return 0; - } - -@@ -320,7 +289,7 @@ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass); -+ return (*gNetscapeFuncs.createobject)(npp, aClass); - return NULL; - } - -@@ -328,7 +297,7 @@ NPObject *NPN_RetainObject(NPObject *obj) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj); -+ return (*gNetscapeFuncs.retainobject)(obj); - return NULL; - } - -@@ -336,7 +305,7 @@ void NPN_ReleaseObject(NPObject *obj) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- CallNPN_ReleaseObjectProc(gNetscapeFuncs.releaseobject, obj); -+ (*gNetscapeFuncs.releaseobject)(obj); - } - - bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, -@@ -344,8 +313,7 @@ bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName, -- args, argCount, result); -+ return (*gNetscapeFuncs.invoke)(npp, obj, methodName, args, argCount, result); - return false; - } - -@@ -354,8 +322,7 @@ bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj, -- args, argCount, result); -+ return (*gNetscapeFuncs.invokeDefault)(npp, obj, args, argCount, result); - return false; - } - -@@ -364,8 +331,7 @@ bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj, -- script, result); -+ return (*gNetscapeFuncs.evaluate)(npp, obj, script, result); - return false; - } - -@@ -374,8 +340,7 @@ bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj, -- propertyName, result); -+ return (*gNetscapeFuncs.getproperty)(npp, obj, propertyName, result); - return false; - } - -@@ -384,8 +349,7 @@ bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj, -- propertyName, value); -+ return (*gNetscapeFuncs.setproperty)(npp, obj, propertyName, value); - return false; - } - -@@ -393,8 +357,7 @@ bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj, -- propertyName); -+ return (*gNetscapeFuncs.removeproperty)(npp, obj, propertyName); - return false; - } - -@@ -402,8 +365,7 @@ bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj, -- propertyName); -+ return (*gNetscapeFuncs.hasproperty)(npp, obj, propertyName); - return false; - } - -@@ -411,8 +373,7 @@ bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp, -- obj, methodName); -+ return (*gNetscapeFuncs.hasmethod)(npp, obj, methodName); - return false; - } - -@@ -420,14 +381,14 @@ void NPN_ReleaseVariantValue(NPVariant *variant) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- CallNPN_ReleaseVariantValueProc(gNetscapeFuncs.releasevariantvalue, variant); -+ (*gNetscapeFuncs.releasevariantvalue)(variant); - } - - void NPN_SetException(NPObject* obj, const NPUTF8 *message) - { - int minor = gNetscapeFuncs.version & 0xFF; - if( minor >= 14 ) -- CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message); -+ (*gNetscapeFuncs.setexception)(obj, message); - } - - /*********************************************************************** -@@ -766,22 +727,22 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs) - */ - pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; - pluginFuncs->size = sizeof(NPPluginFuncs); -- pluginFuncs->newp = NewNPP_NewProc(Private_New); -- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); -- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); -- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream); -- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream); -- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile); -- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady); -- pluginFuncs->write = NewNPP_WriteProc(Private_Write); -- pluginFuncs->print = NewNPP_PrintProc(Private_Print); -- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); -- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue); -+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); -+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); -+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); -+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); -+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); -+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); -+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); -+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); -+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); -+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); -+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue); - - pluginFuncs->event = NULL; - if( minor >= NPVERS_HAS_NOTIFICATION ) - { -- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); -+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); - } - #ifdef OJI - if( minor >= NPVERS_HAS_LIVECONNECT ) diff --git a/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch b/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch deleted file mode 100644 index f3fcc05..0000000 --- a/vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 86bd6dd..ce133f9 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -175,16 +175,17 @@ static int Open ( vlc_object_t *p_this ) - msg_Err(p_aout,"Invalid sample spec"); - goto fail; - } -+ -+ a.maxlength = pa_bytes_per_second(&ss)/4/pa_frame_size(&ss); -+ a.tlength = a.maxlength*9/10; -+ a.prebuf = a.tlength/2; -+ a.minreq = a.tlength/10; - -- /* Reduce overall latency to 200mS to reduce audible clicks -- * Also pulse minreq and internal buffers are now 20mS which reduces resampling -- */ -- a.tlength = pa_bytes_per_second(&ss)/5; -- a.maxlength = a.tlength * 2; -- a.prebuf = a.tlength; -- a.minreq = a.tlength / 10; -+ a.maxlength *= pa_frame_size(&ss); -+ a.tlength *= pa_frame_size(&ss); -+ a.prebuf *= pa_frame_size(&ss); -+ a.minreq *= pa_frame_size(&ss); - -- /* Buffer size is 20mS */ - p_sys->buffer_size = a.minreq; - - /* Initialise the speaker map setup above */ -@@ -212,7 +213,7 @@ static int Open ( vlc_object_t *p_this ) - PULSE_DEBUG( "Pulse after context connect"); - - pa_threaded_mainloop_lock(p_sys->mainloop); -- -+ - if (pa_threaded_mainloop_start(p_sys->mainloop) < 0) { - msg_Err(p_aout, "Failed to start main loop"); - goto unlock_and_fail; -@@ -239,7 +240,7 @@ static int Open ( vlc_object_t *p_this ) - pa_stream_set_write_callback(p_sys->stream, stream_request_cb, p_aout); - pa_stream_set_latency_update_callback(p_sys->stream, stream_latency_update_cb, p_aout); - -- if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { -+ if (pa_stream_connect_playback(p_sys->stream, NULL, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) { - msg_Err(p_aout, "Failed to connect stream: %s", pa_strerror(pa_context_errno(p_sys->context))); - goto unlock_and_fail; - } -@@ -447,11 +448,16 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) { - latency = 0; - - } -- - PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency); - next_date = mdate() + latency; - -+ - if(p_sys->start_date < next_date + AOUT_PTS_TOLERANCE ){ -+ /* -+ vlc_mutex_lock( &p_aout->output_fifo_lock ); -+ p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); -+ vlc_mutex_unlock( &p_aout->output_fifo_lock ); -+ */ - p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0); - } - } From 868789bdb3598fe522b4b674f29f02d913affb5a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 17 Jun 2009 17:20:02 +0000 Subject: [PATCH 051/671] Update to 1.0.0-rc4 --- vlc.spec | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/vlc.spec b/vlc.spec index 3d59c0e..849349c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -4,7 +4,7 @@ %define with_internal_live555 0 %define live555_date 2008.07.25 %define vlc_git 0 -%define vlc_rc -rc3 +%define vlc_rc -rc4 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.11rc3%{?dist} +Release: 0.12rc4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -29,15 +29,12 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0.0-pre1-xulrunner-191_support.patch -Patch6: 0005-Improve-compatibility-with-PA-when-the-vlc-alsa-outp.patch -Patch7: vlc-revert-b8f23ea716693d8d07dd8bd0cb4c9ba8ed05f568.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext -%if 1 +%if 0 BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -83,6 +80,7 @@ BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel BuildRequires: libnotify-devel BuildRequires: libproxy-devel +BuildRequires: libraw1394-devel BuildRequires: librsvg2-devel >= 2.9.0 BuildRequires: libsysfs-devel BuildRequires: libshout-devel @@ -255,16 +253,12 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%if 0%{?fedora} >= 11 -%patch5 -p1 -b .xul191 -%endif -%patch6 -p1 -b .alsa_pa -%patch7 -p1 -b .revert + rm modules/access/videodev2.h ln -sf %{_includedir}/videodev2.h modules/access/ -rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 -./bootstrap +#rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 +#./bootstrap #missing sources install -pm 0644 %{SOURCE11} modules/codec/shine @@ -566,6 +560,9 @@ fi || : %changelog +* Wed Jun 17 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.12rc4 +- Update to 1.0.0-rc4 + * Sun Jun 7 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.11rc3 - Update to 1.0.0-rc3 From 134fe9e14bd6a0958008447398bdd99896c05ca4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 18 Jun 2009 10:27:28 +0000 Subject: [PATCH 052/671] Update source --- .gitignore | 2 +- sources | 2 +- vlc.spec | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f868b75..9dd92dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -vlc-1.0.0-rc3.tar.bz2 enc_base.h shine.c +vlc-1.0.0-rc4.tar.bz2 diff --git a/sources b/sources index 0e3cb45..3724fd5 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -a55dbd94856b922c29743b2980b0c672 vlc-1.0.0-rc3.tar.bz2 a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h c64e9e104b1eeba838a6c87435c6533c shine.c +d8cefe26c0b734777c371db163c09bda vlc-1.0.0-rc4.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 849349c..570599e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -61,6 +61,7 @@ BuildRequires: gsm-devel BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: libavc1394-devel +BuildRequires: libass-devel BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 @@ -80,7 +81,6 @@ BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel BuildRequires: libnotify-devel BuildRequires: libproxy-devel -BuildRequires: libraw1394-devel BuildRequires: librsvg2-devel >= 2.9.0 BuildRequires: libsysfs-devel BuildRequires: libshout-devel @@ -256,7 +256,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h -ln -sf %{_includedir}/videodev2.h modules/access/ +ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h #rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 #./bootstrap @@ -291,8 +291,8 @@ popd %endif %if %with_dc1394 --enable-dc1394 \ - --enable-dv \ %endif + --enable-dv \ --enable-opencv \ --enable-pvr \ --enable-gnomevfs \ @@ -309,6 +309,8 @@ popd --enable-tarkin \ --enable-theora \ --enable-dirac \ + --enable-libass \ + --enable-asademux \ --enable-xcb \ --enable-svg \ --enable-snapshot \ From 08380d9cad7ee98e452d5e549b3efec4841c587c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 18 Jun 2009 11:02:53 +0000 Subject: [PATCH 053/671] Force reboostrap because of poisoned autotools --- vlc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 570599e..f8de2d0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -34,7 +34,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext -%if 0 +%if 1 BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -257,8 +257,8 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h -#rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 -#./bootstrap +rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 +./bootstrap #missing sources install -pm 0644 %{SOURCE11} modules/codec/shine From 72052e02d952edab69246568080436aafb4e7a3e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 18 Jun 2009 11:32:41 +0000 Subject: [PATCH 054/671] Fix file not there anymore --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f8de2d0..af74b7a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -257,7 +257,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h -rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 +rm aclocal.m4 m4/lib*.m4 ./bootstrap #missing sources From 2103860d9ef65e78c88360b2f2dd2a31b70af874 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 2 Jul 2009 15:24:45 +0000 Subject: [PATCH 055/671] - Cherry pick from 1.0-bugfix - Move xcb modules into main - Move -devel Requirement from main to -core (Mutlilib fix) --- vlc-1.0-bugfix-duplicate.patch | 33 +++++++++++++++++++++++++++++++++ vlc.spec | 18 ++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 vlc-1.0-bugfix-duplicate.patch diff --git a/vlc-1.0-bugfix-duplicate.patch b/vlc-1.0-bugfix-duplicate.patch new file mode 100644 index 0000000..2de1cb6 --- /dev/null +++ b/vlc-1.0-bugfix-duplicate.patch @@ -0,0 +1,33 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index b620179..5f74792 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -29,7 +29,6 @@ pkginclude_HEADERS = \ + ../include/vlc/deprecated.h \ + ../include/vlc/libvlc.h \ + ../include/vlc/libvlc_events.h \ +- ../include/vlc/libvlc_media_list.h \ + ../include/vlc/libvlc_media.h \ + ../include/vlc/libvlc_media_discoverer.h \ + ../include/vlc/libvlc_media_library.h \ +diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp +index 06056e5..b143a75 100644 +--- a/modules/gui/qt4/components/open_panels.cpp ++++ b/modules/gui/qt4/components/open_panels.cpp +@@ -1139,14 +1141,14 @@ void CaptureOpenPanel::updateMRL() + case V4L_DEVICE: + fileList << "v4l://"; + mrl += " :v4l-vdev=" + v4lVideoDevice->text(); +- mrl += " :v4l-adev=" + v4lAudioDevice->text(); ++ mrl += " :input-slave=alsa://" + v4lAudioDevice->text(); + mrl += " :v4l-norm=" + QString::number( v4lNormBox->currentIndex() ); + mrl += " :v4l-frequency=" + QString::number( v4lFreq->value() ); + break; + case V4L2_DEVICE: + fileList << "v4l2://"; + mrl += " :v4l2-dev=" + v4l2VideoDevice->text(); +- mrl += " :v4l2-adev=" + v4l2AudioDevice->text(); ++ mrl += " :input-slave=alsa://" + v4l2AudioDevice->text(); + mrl += " :v4l2-standard=" + QString::number( v4l2StdBox->currentIndex() ); + break; + case JACK_DEVICE: diff --git a/vlc.spec b/vlc.spec index af74b7a..f7cb78e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -13,7 +13,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.12rc4%{?dist} +Release: 0.14rc4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -29,6 +29,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0-bugfix-duplicate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -167,7 +168,7 @@ Requires: dejavu-fonts %package devel Summary: Development package for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}-core = %{version}-%{release} %description @@ -253,6 +254,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch5 -p1 -b .dup rm modules/access/videodev2.h @@ -282,6 +284,7 @@ popd --disable-dependency-tracking \ --disable-rpath \ --enable-release \ + --with-binary-version=%{version}-%{release} \ --with-tuning=no \ --enable-switcher \ --enable-lua \ @@ -464,6 +467,9 @@ fi || : %{_libdir}/vlc/video_output/libglx_plugin.so %{_libdir}/vlc/video_output/libopengl_plugin.so %{_libdir}/vlc/video_output/libx11_plugin.so +%{_libdir}/vlc/video_output/libxcb_plugin.so +%{_libdir}/vlc/video_output/libxcb_window_plugin.so +%{_libdir}/vlc/video_output/libxcb_xv_plugin.so %{_libdir}/vlc/video_output/libxvideo_plugin.so %{_libdir}/vlc/visualization/libgalaktos_plugin.so %{_libdir}/vlc/misc/libxosd_plugin.so @@ -499,6 +505,9 @@ fi || : %exclude %{_libdir}/vlc/video_output/libglx_plugin.so %exclude %{_libdir}/vlc/video_output/libopengl_plugin.so %exclude %{_libdir}/vlc/video_output/libx11_plugin.so +%exclude %{_libdir}/vlc/video_output/libxcb_plugin.so +%exclude %{_libdir}/vlc/video_output/libxcb_window_plugin.so +%exclude %{_libdir}/vlc/video_output/libxcb_xv_plugin.so %exclude %{_libdir}/vlc/video_output/libxvideo_plugin.so %exclude %{_libdir}/vlc/visualization/libgalaktos_plugin.so %exclude %{_libdir}/vlc/misc/libxosd_plugin.so @@ -562,6 +571,11 @@ fi || : %changelog +* Thu Jul 2 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.14rc4 +- Cherry pick from 1.0-bugfix +- Move xcb modules into main +- Move -devel Requirement from main to -core (Mutlilib fix) + * Wed Jun 17 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.12rc4 - Update to 1.0.0-rc4 From 178753008b3c6beb3c601cb1bbd05ba6d2609082 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 7 Jul 2009 11:00:51 +0000 Subject: [PATCH 056/671] Update to 1.0.0 Final --- .gitignore | 4 +--- sources | 4 +--- vlc.spec | 19 +++++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 9dd92dd..5b962fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -enc_base.h -shine.c -vlc-1.0.0-rc4.tar.bz2 +vlc-1.0.0.tar.bz2 diff --git a/sources b/sources index 3724fd5..0899674 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h -c64e9e104b1eeba838a6c87435c6533c shine.c -d8cefe26c0b734777c371db163c09bda vlc-1.0.0-rc4.tar.bz2 +fc78904ab5fa73f518d8fe4e852e7f67 vlc-1.0.0.tar.bz2 diff --git a/vlc.spec b/vlc.spec index f7cb78e..ad4a04a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,10 +1,8 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) -%define _default_patch_fuzz 2 %define with_internal_live555 0 %define live555_date 2008.07.25 -%define vlc_git 0 -%define vlc_rc -rc4 +#define vlc_rc -rc4 %define with_mozilla 1 %define with_dc1394 0 %define with_directfb 1 @@ -13,7 +11,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.0 -Release: 0.14rc4%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -29,7 +27,6 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-duplicate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -110,11 +107,12 @@ BuildRequires: minizip-devel BuildRequires: mpeg2dec-devel >= 0.3.2 BuildRequires: ncurses-devel BuildRequires: opencv-devel -BuildRequires: openslp-devel +BuildRequires: openslp-devel +BuildRequires: pcre-devel BuildRequires: prelink BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel -BuildRequires: qt4-devel +BuildRequires: qt4-devel >= 1:4.5.2 BuildRequires: schroedinger-devel BuildRequires: SDL_image-devel BuildRequires: speex-devel >= 1.1.5 @@ -164,6 +162,7 @@ Requires: dejavu-sans-fonts %else Requires: dejavu-fonts %endif +Requires: qt-x11%{_isa} >= 1:4.5.2 %package devel Summary: Development package for %{name} @@ -254,13 +253,14 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .dup rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h +%if 1 rm aclocal.m4 m4/lib*.m4 ./bootstrap +%endif #missing sources install -pm 0644 %{SOURCE11} modules/codec/shine @@ -571,6 +571,9 @@ fi || : %changelog +* Mon Jul 6 2009 kwizart < kwizart at gmail.com > - 1.0.0-1 +- Update to 1.0.0 (Final) + * Thu Jul 2 2009 kwizart < kwizart at gmail.com > - 1.0.0-0.14rc4 - Cherry pick from 1.0-bugfix - Move xcb modules into main From 4d21f929e48f944084dc058c2946ec036ae0ba18 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 7 Jul 2009 11:01:50 +0000 Subject: [PATCH 057/671] Clean --- vlc-1.0-bugfix-duplicate.patch | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 vlc-1.0-bugfix-duplicate.patch diff --git a/vlc-1.0-bugfix-duplicate.patch b/vlc-1.0-bugfix-duplicate.patch deleted file mode 100644 index 2de1cb6..0000000 --- a/vlc-1.0-bugfix-duplicate.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/src/Makefile.am b/src/Makefile.am -index b620179..5f74792 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -29,7 +29,6 @@ pkginclude_HEADERS = \ - ../include/vlc/deprecated.h \ - ../include/vlc/libvlc.h \ - ../include/vlc/libvlc_events.h \ -- ../include/vlc/libvlc_media_list.h \ - ../include/vlc/libvlc_media.h \ - ../include/vlc/libvlc_media_discoverer.h \ - ../include/vlc/libvlc_media_library.h \ -diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp -index 06056e5..b143a75 100644 ---- a/modules/gui/qt4/components/open_panels.cpp -+++ b/modules/gui/qt4/components/open_panels.cpp -@@ -1139,14 +1141,14 @@ void CaptureOpenPanel::updateMRL() - case V4L_DEVICE: - fileList << "v4l://"; - mrl += " :v4l-vdev=" + v4lVideoDevice->text(); -- mrl += " :v4l-adev=" + v4lAudioDevice->text(); -+ mrl += " :input-slave=alsa://" + v4lAudioDevice->text(); - mrl += " :v4l-norm=" + QString::number( v4lNormBox->currentIndex() ); - mrl += " :v4l-frequency=" + QString::number( v4lFreq->value() ); - break; - case V4L2_DEVICE: - fileList << "v4l2://"; - mrl += " :v4l2-dev=" + v4l2VideoDevice->text(); -- mrl += " :v4l2-adev=" + v4l2AudioDevice->text(); -+ mrl += " :input-slave=alsa://" + v4l2AudioDevice->text(); - mrl += " :v4l2-standard=" + QString::number( v4l2StdBox->currentIndex() ); - break; - case JACK_DEVICE: From 8694b7ce2304ef5e901241c3053c5bc856b4f163 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 7 Jul 2009 11:08:19 +0000 Subject: [PATCH 058/671] Fix shine --- .gitignore | 2 ++ sources | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 5b962fe..520423f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ vlc-1.0.0.tar.bz2 +enc_base.h +shine.c diff --git a/sources b/sources index 0899674..6160d3a 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ fc78904ab5fa73f518d8fe4e852e7f67 vlc-1.0.0.tar.bz2 +a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h +c64e9e104b1eeba838a6c87435c6533c shine.c From 1595ea3d6e261fbfda2e87c5032ea140469a66b0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 7 Jul 2009 11:21:56 +0000 Subject: [PATCH 059/671] Epoch is only for qt, not qt4 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ad4a04a..87d331b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -112,7 +112,7 @@ BuildRequires: pcre-devel BuildRequires: prelink BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel -BuildRequires: qt4-devel >= 1:4.5.2 +BuildRequires: qt4-devel >= 4.5.2 BuildRequires: schroedinger-devel BuildRequires: SDL_image-devel BuildRequires: speex-devel >= 1.1.5 From 045062a4665c95971f9295dfe7fe22f87f00696f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 11:02:28 +0000 Subject: [PATCH 060/671] - Update to 1.0.1 (Final) - Improve conditionals --- .gitignore | 4 +-- sources | 4 +-- vlc.spec | 104 ++++++++++++++++++++++------------------------------- 3 files changed, 44 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 520423f..2758ddb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -vlc-1.0.0.tar.bz2 -enc_base.h -shine.c +vlc-1.0.1.tar.bz2 diff --git a/sources b/sources index 6160d3a..ac9ffab 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -fc78904ab5fa73f518d8fe4e852e7f67 vlc-1.0.0.tar.bz2 -a897e4f24fb3fb993db7daf5a5f4d551 enc_base.h -c64e9e104b1eeba838a6c87435c6533c shine.c +6e299d373e7751bb36de001cdc6a2989 vlc-1.0.1.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 87d331b..eacfdfb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,27 +1,22 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) -%define with_internal_live555 0 -%define live555_date 2008.07.25 -#define vlc_rc -rc4 -%define with_mozilla 1 -%define with_dc1394 0 -%define with_directfb 1 +#global live555_date 2009.07.28 +#global vlc_rc -rc4 +#global vlc_bootstrap 1 Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 1.0.0 +Version: 1.0.1 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 -%if %with_internal_live555 +%if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas -Source11: shine.c -Source12: enc_base.h Patch0: vlc-trunk-default_font.patch Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch @@ -29,10 +24,11 @@ Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: desktop-file-utils +BuildRequires: desktop-file-utils BuildRequires: gettext +BuildRequires: prelink -%if 1 +%if 0%{?vlc_bootstrap:1} BuildRequires: gettext-devel BuildRequires: libtool %endif @@ -44,9 +40,7 @@ BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: dbus-devel BuildRequires: dirac-devel >= 1.0.0 -%if %with_directfb -BuildRequires: directfb-devel -%endif +%{!?_without_directfb:BuildRequires: directfb-devel} BuildRequires: faac-devel BuildRequires: faad2-devel BuildRequires: ffmpeg-devel >= 0.4.9-0 @@ -68,7 +62,6 @@ BuildRequires: libdv-devel BuildRequires: libdvbpsi-devel BuildRequires: libdvdnav-devel BuildRequires: libebml-devel -BuildRequires: libhildon-devel BuildRequires: libid3tag-devel BuildRequires: libkate-devel BuildRequires: libmad-devel @@ -93,12 +86,12 @@ BuildRequires: libv4l-devel BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel -%if %with_internal_live555 +%if 0%{?live555_date:1} BuildConflicts: live555-devel %else BuildRequires: live555-devel >= 0-0.19.2008.04.03 %endif -BuildRequires: kernel-headers >= 2.6.20 +BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel @@ -109,7 +102,6 @@ BuildRequires: ncurses-devel BuildRequires: opencv-devel BuildRequires: openslp-devel BuildRequires: pcre-devel -BuildRequires: prelink BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel BuildRequires: qt4-devel >= 4.5.2 @@ -142,18 +134,9 @@ BuildRequires: xcb-util-devel BuildRequires: xorg-x11-proto-devel -%if %with_mozilla -BuildRequires: gecko-devel -BuildRequires: nspr-devel -%else -Obsoletes: mozilla-vlc < %{version}-%{release} -%endif - - -%if %with_dc1394 -BuildRequires: compat-libdc1394-devel -BuildRequires: compat-libraw1394-devel -%endif +%{!?_without_mozilla:BuildRequires: gecko-devel nspr-devel} +%{?_without_mozilla:Obsoletes: mozilla-vlc < %{version}-%{release}} +%{?_with_dc1394: BuildRequires: compat-libdc1394-devel compat-libraw1394-devel} Requires: vlc-core = %{version}-%{release} @@ -164,6 +147,7 @@ Requires: dejavu-fonts %endif Requires: qt-x11%{_isa} >= 1:4.5.2 + %package devel Summary: Development package for %{name} Group: Development/Libraries @@ -188,7 +172,7 @@ mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network. -%if %with_mozilla +%{!?_without_mozilla: %package -n mozilla-vlc Summary: VLC Media Player plugin for Mozilla compatible web browsers Group: Applications/Multimedia @@ -204,7 +188,7 @@ for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network. -%endif +} %package core Summary: VLC Media Player core @@ -230,20 +214,19 @@ Requires: vlc-core = %{version}-%{release} JACK audio plugin for the VLC media player. -%if %with_dc1394 +%{?_with_dc1394: %package plugin-dc1394 Summary: VLC Media Player Plugins for dc1394 Group: Applications/Multimedia Requires: %{name}-core = %{version} -Requires: compat-libdc1394-tools %description plugin-dc1394 VLC plugin for libdc1394 -%endif +} %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%if %with_internal_live555 +%if 0%{?live555_date:1} %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .default_font @@ -257,19 +240,15 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h -%if 1 +%if 0%{?vlc_bootstrap:1} rm aclocal.m4 m4/lib*.m4 ./bootstrap %endif -#missing sources -install -pm 0644 %{SOURCE11} modules/codec/shine -install -pm 0644 %{SOURCE12} modules/codec/shine - %build -%if %with_internal_live555 +%if 0%{?live555_date:1} # Then bundled live555 - not needed pushd live # Force the use of our CFLAGS @@ -289,12 +268,10 @@ popd --enable-switcher \ --enable-lua \ --enable-live555 \ -%if %with_internal_live555 +%if 0%{?live555_date:1} --with-live555-tree=live \ %endif -%if %with_dc1394 - --enable-dc1394 \ -%endif +%{?_with_dc1394:--enable-dc1394} \ --enable-dv \ --enable-opencv \ --enable-pvr \ @@ -321,9 +298,7 @@ popd --enable-svgalib \ --enable-xvmc \ %endif -%if %with_directfb - --enable-directfb \ -%endif +%{!?_without_directfb:--enable-directfb} \ --enable-aa \ --enable-caca \ --enable-jack \ @@ -341,9 +316,8 @@ popd %else --without-contrib \ %endif -%if %with_mozilla - --enable-mozilla \ -%endif +%{!?_without_mozilla:--enable-mozilla} \ + # remove rpath from libtool @@ -516,9 +490,9 @@ fi || : %exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so %exclude %{_libdir}/vlc/video_output/libsvgalib_plugin.so %endif -%if %with_directfb +%{!?_without_directfb: %exclude %{_libdir}/vlc/video_output/libdirectfb_plugin.so -%endif +} %exclude %{_libdir}/vlc/gui/libskins2_plugin.so %exclude %{_libdir}/vlc/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so @@ -526,9 +500,9 @@ fi || : %exclude %{_libdir}/vlc/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so -%if %with_dc1394 +%{?_with_dc1394: %exclude %{_libdir}/vlc/access/libdc1394_plugin.so -%endif +} %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* @@ -541,16 +515,18 @@ fi || : %files nox %defattr(-,root,root,-) +%{!?_without_directfb: %{_libdir}/vlc/video_output/libdirectfb_plugin.so +} %ifarch %{ix86} x86_64 %{_libdir}/vlc/video_output/libsvgalib_plugin.so %endif -%if %with_dc1394 -%files plugins-dc1394 +%{?_with_dc1394: +%files plugin-dc1394 %defattr(-,root,root,-) %{_libdir}/vlc/access/libdc1394_plugin.so -%endif +} %files devel %defattr(-,root,root,-) @@ -562,15 +538,19 @@ fi || : %{_libdir}/pkgconfig/vlc-plugin.pc %{_libdir}/pkgconfig/libvlc.pc -%if %with_mozilla +%{!?_without_mozilla: %files -n mozilla-vlc %defattr(-,root,root,-) %{_libdir}/mozilla/plugins/libvlcplugin.so -%endif +} %changelog +* Mon Jul 27 2009 kwizart < kwizart at gmail.com > - 1.0.1-1 +- Update to 1.0.1 (Final) +- Improve conditionals + * Mon Jul 6 2009 kwizart < kwizart at gmail.com > - 1.0.0-1 - Update to 1.0.0 (Final) From 42c0b91ce5950ba0dbd0446fcc6a5a1ae42c06a4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 11:03:46 +0000 Subject: [PATCH 061/671] Enable rebootstrap --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index eacfdfb..f413e43 100644 --- a/vlc.spec +++ b/vlc.spec @@ -2,7 +2,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc4 -#global vlc_bootstrap 1 +%global vlc_bootstrap 1 Summary: Multi-platform MPEG, DVD, and DivX player From a1f298249339e7ef555ae17ddd4a88ccaf7a999b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 12:16:57 +0000 Subject: [PATCH 062/671] BP 5 --- vlc-1.0-bugfix-bp_zip_qt4.patch | 40 +++++++++++++++++++++++++++++++++ vlc.spec | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 vlc-1.0-bugfix-bp_zip_qt4.patch diff --git a/vlc-1.0-bugfix-bp_zip_qt4.patch b/vlc-1.0-bugfix-bp_zip_qt4.patch new file mode 100644 index 0000000..ff438f5 --- /dev/null +++ b/vlc-1.0-bugfix-bp_zip_qt4.patch @@ -0,0 +1,40 @@ +diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c +index 0250312..59b3f74 100644 +--- a/modules/access/zip/zipstream.c ++++ b/modules/access/zip/zipstream.c +@@ -205,8 +205,8 @@ int StreamOpen( vlc_object_t *p_this ) + if( !p_sys->zipFile ) + { + msg_Warn( s, "unable to open file" ); +- free( p_sys ); + free( p_sys->fileFunctions ); ++ free( p_sys ); + return VLC_EGENERIC; + } + +@@ -214,8 +214,8 @@ int StreamOpen( vlc_object_t *p_this ) + char *psz_tmp; + if( asprintf( &psz_tmp, "%s.xspf", s->psz_path ) == -1 ) + { +- free( p_sys ); + free( p_sys->fileFunctions ); ++ free( p_sys ); + return VLC_ENOMEM; + } + p_sys->psz_path = s->psz_path; +diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp +index 97aca1a..31b990a 100644 +--- a/modules/gui/qt4/main_interface.cpp ++++ b/modules/gui/qt4/main_interface.cpp +@@ -1134,8 +1134,8 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play ) + + if( s.length() > 0 ) { + playlist_Add( THEPL, qtu(s), NULL, +- PLAYLIST_APPEND | (first ? PLAYLIST_GO: 0), +- PLAYLIST_END, true, false ); ++ PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE), ++ PLAYLIST_END, true, pl_Unlocked ); + first = false; + RecentsMRL::getInstance( p_intf )->addRecent( s ); + } + diff --git a/vlc.spec b/vlc.spec index f413e43..ad1d6b6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,6 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch& BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -236,6 +237,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch5 -p1 -b .bp5 rm modules/access/videodev2.h From c31022067f053c3d2aff09e914d6ccab76c29124 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 12:17:18 +0000 Subject: [PATCH 063/671] Fix --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ad1d6b6..32c652b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch& +Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils From 8c02a4e062606bc2a1b6da2ee9079706d8622ec4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 12:35:53 +0000 Subject: [PATCH 064/671] Fix for older lt --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 32c652b..783943b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -243,7 +243,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h %if 0%{?vlc_bootstrap:1} -rm aclocal.m4 m4/lib*.m4 +rm aclocal.m4 m4/lib*.m4 lt*.m4 ./bootstrap %endif From 0f11aacce2c3e59a9fdc184db5e765185667d92f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 12:48:37 +0000 Subject: [PATCH 065/671] Fix m4 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 783943b..815240d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -243,7 +243,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h %if 0%{?vlc_bootstrap:1} -rm aclocal.m4 m4/lib*.m4 lt*.m4 +rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 ./bootstrap %endif From 9ddad566dba7547987f76d8db8cc3a6e3b7b16dd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 13:46:03 +0000 Subject: [PATCH 066/671] - Backport zip qt4 from 1.0-bugfix - Backport font_family from master --- vlc-1.0-bugfix-bp-font_family.patch | 183 ++++++++++++++++++++++++++++ vlc.spec | 4 + 2 files changed, 187 insertions(+) create mode 100644 vlc-1.0-bugfix-bp-font_family.patch diff --git a/vlc-1.0-bugfix-bp-font_family.patch b/vlc-1.0-bugfix-bp-font_family.patch new file mode 100644 index 0000000..43425b1 --- /dev/null +++ b/vlc-1.0-bugfix-bp-font_family.patch @@ -0,0 +1,183 @@ +diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c +index 7e45866..0dc3143 100644 +--- a/modules/misc/freetype.c ++++ b/modules/misc/freetype.c +@@ -70,6 +70,8 @@ + + #ifdef HAVE_FONTCONFIG + #include ++#undef DEFAULT_FONT ++#define DEFAULT_FONT FC_DEFAULT_FONT + #endif + + #include +@@ -81,7 +83,13 @@ static int Create ( vlc_object_t * ); + static void Destroy( vlc_object_t * ); + + #define FONT_TEXT N_("Font") +-#define FONT_LONGTEXT N_("Filename for the font you want to use") ++ ++#ifdef HAVE_FONTCONFIG ++#define FONT_LONGTEXT N_("Font family for the font you want to use") ++#else ++#define FONT_LONGTEXT N_("Fontfile for the font you want to use") ++#endif ++ + #define FONTSIZE_TEXT N_("Font size in pixels") + #define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \ + "that will be rendered on the video. " \ +@@ -284,9 +292,15 @@ static int Create( vlc_object_t *p_this ) + { + filter_t *p_filter = (filter_t *)p_this; + filter_sys_t *p_sys; +- char *psz_fontfile = NULL; +- int i_error; +- vlc_value_t val; ++ char *psz_fontfile=NULL; ++ char *psz_fontfamily=NULL; ++ int i_error,fontindex; ++ ++#ifdef HAVE_FONTCONFIG ++ FcPattern *fontpattern, *fontmatch; ++ FcResult fontresult; ++#endif ++ + + /* Allocate structure */ + p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); +@@ -297,52 +311,77 @@ static int Create( vlc_object_t *p_this ) + p_sys->i_font_size = 0; + p_sys->i_display_height = 0; + +- var_Create( p_filter, "freetype-font", +- VLC_VAR_STRING | VLC_VAR_DOINHERIT ); +- var_Create( p_filter, "freetype-fontsize", +- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); + var_Create( p_filter, "freetype-rel-fontsize", + VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); +- var_Create( p_filter, "freetype-opacity", +- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); +- var_Create( p_filter, "freetype-effect", +- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); +- var_Get( p_filter, "freetype-opacity", &val ); +- p_sys->i_font_opacity = __MAX( __MIN( val.i_int, 255 ), 0 ); +- var_Create( p_filter, "freetype-color", +- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); +- var_Get( p_filter, "freetype-color", &val ); +- p_sys->i_font_color = __MAX( __MIN( val.i_int, 0xFFFFFF ), 0 ); +- p_sys->i_effect = var_GetInteger( p_filter, "freetype-effect" ); +- +- /* Look what method was requested */ +- var_Get( p_filter, "freetype-font", &val ); +- psz_fontfile = val.psz_string; +- if( !psz_fontfile || !*psz_fontfile ) ++ ++ psz_fontfamily = var_CreateGetString( p_filter, "freetype-font" ); ++ p_sys->i_default_font_size = var_CreateGetInteger( p_filter, "freetype-fontsize" ); ++ p_sys->i_effect = var_CreateGetInteger( p_filter, "freetype-effect" ); ++ p_sys->i_font_opacity = var_CreateGetInteger( p_filter,"freetype-opacity" ); ++ p_sys->i_font_opacity = __MAX( __MIN( p_sys->i_font_opacity, 255 ), 0 ); ++ p_sys->i_font_color = var_CreateGetInteger( p_filter, "freetype-color" ); ++ p_sys->i_font_color = __MAX( __MIN( p_sys->i_font_color , 0xFFFFFF ), 0 ); ++ ++ fontindex=0; ++ if( !psz_fontfamily || !*psz_fontfamily ) + { +- free( psz_fontfile ); +- psz_fontfile = (char *)malloc( PATH_MAX + 1 ); +- if( !psz_fontfile ) +- goto error; +-#ifdef WIN32 +- GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); +- strcat( psz_fontfile, "\\fonts\\arial.ttf" ); +-#elif defined(__APPLE__) +- strcpy( psz_fontfile, DEFAULT_FONT ); ++#ifdef HAVE_FONTCONFIG ++ free( psz_fontfamily); ++ psz_fontfamily=strdup( DEFAULT_FONT ); + #else +- msg_Err( p_filter, "user didn't specify a font" ); +- goto error; ++ free( psz_fontfamily ); ++ psz_fontfamily = (char *)malloc( PATH_MAX + 1 ); ++ if( !psz_fontfamily ) ++ goto error; ++# ifdef WIN32 ++ GetWindowsDirectory( psz_fontfamily , PATH_MAX + 1 ); ++ strcat( psz_fontfamily, "\\fonts\\arial.ttf" ); ++# else ++ strcpy( psz_fontfamily, DEFAULT_FONT ); ++# endif ++ msg_Err( p_filter,"User didn't specify fontfile, using %s", psz_fontfamily); + #endif + } + ++#ifdef HAVE_FONTCONFIG ++ /* Lets find some fontfile from freetype-font variable family */ ++ char *psz_fontsize; ++ if( asprintf( &psz_fontsize, "%d", p_sys->i_default_font_size ) == -1 ) ++ goto error; ++ fontpattern = FcPatternCreate(); ++ FcPatternAddString( fontpattern, FC_FAMILY, psz_fontfamily); ++ FcPatternAddString( fontpattern, FC_SIZE, psz_fontsize ); ++ ++ if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse ) ++ { ++ FcPatternDestroy( fontpattern ); ++ free( psz_fontsize ); ++ goto error; ++ } ++ FcDefaultSubstitute( fontpattern ); ++ ++ fontmatch = FcFontMatch( NULL, fontpattern, &fontresult ); ++ ++ FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile); ++ FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex ); ++ if( !psz_fontfile ) ++ goto error; ++ msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile); ++ free( psz_fontsize ); ++#else ++ psz_fontfile = psz_fontfamily; ++#endif ++ + i_error = FT_Init_FreeType( &p_sys->p_library ); + if( i_error ) + { + msg_Err( p_filter, "couldn't initialize freetype" ); + goto error; + } ++ + i_error = FT_New_Face( p_sys->p_library, psz_fontfile ? psz_fontfile : "", +- 0, &p_sys->p_face ); ++ fontindex, &p_sys->p_face ); ++ + if( i_error == FT_Err_Unknown_File_Format ) + { + msg_Err( p_filter, "file %s have unknown format", psz_fontfile ); +@@ -369,11 +408,8 @@ static int Create( vlc_object_t *p_this ) + + p_sys->i_use_kerning = FT_HAS_KERNING( p_sys->p_face ); + +- var_Get( p_filter, "freetype-fontsize", &val ); +- p_sys->i_default_font_size = val.i_int; + if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error; + +- free( psz_fontfile ); + + p_sys->pp_font_attachments = NULL; + p_sys->i_font_attachments = 0; +@@ -381,10 +417,13 @@ static int Create( vlc_object_t *p_this ) + p_filter->pf_render_text = RenderText; + #ifdef HAVE_FONTCONFIG + p_filter->pf_render_html = RenderHtml; ++ FcPatternDestroy( fontmatch ); ++ FcPatternDestroy( fontpattern ); + #else + p_filter->pf_render_html = NULL; + #endif + ++ free( psz_fontfamily ); + LoadFontsFromAttachments( p_filter ); + + return VLC_SUCCESS; diff --git a/vlc.spec b/vlc.spec index 815240d..f1bf77c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,6 +23,7 @@ Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch +Patch6: vlc-1.0-bugfix-bp-font_family.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -238,6 +239,7 @@ VLC plugin for libdc1394 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic %patch5 -p1 -b .bp5 +%patch6 -p1 -b .bp_ff rm modules/access/videodev2.h @@ -552,6 +554,8 @@ fi || : * Mon Jul 27 2009 kwizart < kwizart at gmail.com > - 1.0.1-1 - Update to 1.0.1 (Final) - Improve conditionals +- Backport zip qt4 from 1.0-bugfix +- Backport font_family from master * Mon Jul 6 2009 kwizart < kwizart at gmail.com > - 1.0.0-1 - Update to 1.0.0 (Final) From dc855eca622265fbf3a8caf5d962fd10655aafd7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 14:03:42 +0000 Subject: [PATCH 067/671] - More %%_isa requirement --- vlc.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index f1bf77c..8a3c3ac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -140,8 +140,9 @@ BuildRequires: xorg-x11-proto-devel %{?_without_mozilla:Obsoletes: mozilla-vlc < %{version}-%{release}} %{?_with_dc1394: BuildRequires: compat-libdc1394-devel compat-libraw1394-devel} +Provides: %{name}-xorg%{_isa} = %{version}-%{release} +Requires: vlc-core%{_isa} = %{version}-%{release} -Requires: vlc-core = %{version}-%{release} %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts %else @@ -153,7 +154,7 @@ Requires: qt-x11%{_isa} >= 1:4.5.2 %package devel Summary: Development package for %{name} Group: Development/Libraries -Requires: %{name}-core = %{version}-%{release} +Requires: %{name}-core%{_isa} = %{version}-%{release} %description @@ -178,7 +179,7 @@ IPv4 or IPv6 on a high-bandwidth network. %package -n mozilla-vlc Summary: VLC Media Player plugin for Mozilla compatible web browsers Group: Applications/Multimedia -Requires: %{name} = %{version}-%{release} +Requires: %{name}-xorg%{_isa} = %{version}-%{release} Requires: %{_libdir}/mozilla/plugins %description -n mozilla-vlc @@ -202,7 +203,7 @@ VLC Media Player core components %package nox Summary: VLC Media Player without Xorg Group: Applications/Multimedia -Requires: vlc-core = %{version}-%{release} +Requires: vlc-core%{_isa} = %{version}-%{release} %description nox VLC Media Player with framebuffer support for X-less server. @@ -210,7 +211,7 @@ VLC Media Player with framebuffer support for X-less server. %package plugin-jack Summary: JACK audio plugin for VLC Group: Applications/Multimedia -Requires: vlc-core = %{version}-%{release} +Requires: vlc-core%{_isa} = %{version}-%{release} %description plugin-jack JACK audio plugin for the VLC media player. @@ -220,7 +221,7 @@ JACK audio plugin for the VLC media player. %package plugin-dc1394 Summary: VLC Media Player Plugins for dc1394 Group: Applications/Multimedia -Requires: %{name}-core = %{version} +Requires: %{name}-core%{_isa} = %{version} %description plugin-dc1394 VLC plugin for libdc1394 @@ -556,6 +557,7 @@ fi || : - Improve conditionals - Backport zip qt4 from 1.0-bugfix - Backport font_family from master +- More %%_isa requirement * Mon Jul 6 2009 kwizart < kwizart at gmail.com > - 1.0.0-1 - Update to 1.0.0 (Final) From d3168d9a38ebc580d1438753641153087932407f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 14:04:07 +0000 Subject: [PATCH 068/671] Today's date --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8a3c3ac..ff705d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -552,7 +552,7 @@ fi || : %changelog -* Mon Jul 27 2009 kwizart < kwizart at gmail.com > - 1.0.1-1 +* Tue Jul 28 2009 kwizart < kwizart at gmail.com > - 1.0.1-1 - Update to 1.0.1 (Final) - Improve conditionals - Backport zip qt4 from 1.0-bugfix From 679c7efa487fa71cb46d0ee3aadc45fdc98578ac Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 14:10:45 +0000 Subject: [PATCH 069/671] Update font_family --- vlc-1.0-bugfix-bp-font_family.patch | 42 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/vlc-1.0-bugfix-bp-font_family.patch b/vlc-1.0-bugfix-bp-font_family.patch index 43425b1..d97793a 100644 --- a/vlc-1.0-bugfix-bp-font_family.patch +++ b/vlc-1.0-bugfix-bp-font_family.patch @@ -1,5 +1,5 @@ diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c -index 7e45866..0dc3143 100644 +index 7e45866..a0c3a93 100644 --- a/modules/misc/freetype.c +++ b/modules/misc/freetype.c @@ -70,6 +70,8 @@ @@ -45,7 +45,7 @@ index 7e45866..0dc3143 100644 /* Allocate structure */ p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); -@@ -297,52 +311,77 @@ static int Create( vlc_object_t *p_this ) +@@ -297,52 +311,88 @@ static int Create( vlc_object_t *p_this ) p_sys->i_font_size = 0; p_sys->i_display_height = 0; @@ -71,6 +71,16 @@ index 7e45866..0dc3143 100644 - var_Get( p_filter, "freetype-font", &val ); - psz_fontfile = val.psz_string; - if( !psz_fontfile || !*psz_fontfile ) +- { +- free( psz_fontfile ); +- psz_fontfile = (char *)malloc( PATH_MAX + 1 ); +- if( !psz_fontfile ) +- goto error; +-#ifdef WIN32 +- GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); +- strcat( psz_fontfile, "\\fonts\\arial.ttf" ); +-#elif defined(__APPLE__) +- strcpy( psz_fontfile, DEFAULT_FONT ); + + psz_fontfamily = var_CreateGetString( p_filter, "freetype-font" ); + p_sys->i_default_font_size = var_CreateGetInteger( p_filter, "freetype-fontsize" ); @@ -82,16 +92,7 @@ index 7e45866..0dc3143 100644 + + fontindex=0; + if( !psz_fontfamily || !*psz_fontfamily ) - { -- free( psz_fontfile ); -- psz_fontfile = (char *)malloc( PATH_MAX + 1 ); -- if( !psz_fontfile ) -- goto error; --#ifdef WIN32 -- GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); -- strcat( psz_fontfile, "\\fonts\\arial.ttf" ); --#elif defined(__APPLE__) -- strcpy( psz_fontfile, DEFAULT_FONT ); ++ { +#ifdef HAVE_FONTCONFIG + free( psz_fontfamily); + psz_fontfamily=strdup( DEFAULT_FONT ); @@ -130,13 +131,24 @@ index 7e45866..0dc3143 100644 + FcDefaultSubstitute( fontpattern ); + + fontmatch = FcFontMatch( NULL, fontpattern, &fontresult ); ++ if( fontresult == FcResultNoMatch ) ++ { ++ free( psz_fontsize ); ++ FcPatternDestroy( fontpattern ); ++ FcPatternDestroy( fontmatch ); ++ goto error; ++ } + + FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile); + FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex ); ++ free( psz_fontsize ); + if( !psz_fontfile ) ++ { ++ FcPatternDestroy( fontpattern ); ++ FcPatternDestroy( fontmatch ); + goto error; ++ } + msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile); -+ free( psz_fontsize ); +#else + psz_fontfile = psz_fontfamily; +#endif @@ -155,7 +167,7 @@ index 7e45866..0dc3143 100644 if( i_error == FT_Err_Unknown_File_Format ) { msg_Err( p_filter, "file %s have unknown format", psz_fontfile ); -@@ -369,11 +408,8 @@ static int Create( vlc_object_t *p_this ) +@@ -369,11 +419,8 @@ static int Create( vlc_object_t *p_this ) p_sys->i_use_kerning = FT_HAS_KERNING( p_sys->p_face ); @@ -167,7 +179,7 @@ index 7e45866..0dc3143 100644 p_sys->pp_font_attachments = NULL; p_sys->i_font_attachments = 0; -@@ -381,10 +417,13 @@ static int Create( vlc_object_t *p_this ) +@@ -381,10 +428,13 @@ static int Create( vlc_object_t *p_this ) p_filter->pf_render_text = RenderText; #ifdef HAVE_FONTCONFIG p_filter->pf_render_html = RenderHtml; From 3e2f9f11dec72398277211a9db8d39c1de188610 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 15:34:43 +0000 Subject: [PATCH 070/671] ff still in progress --- vlc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index ff705d4..6e58dfe 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,7 +23,6 @@ Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch -Patch6: vlc-1.0-bugfix-bp-font_family.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -240,7 +239,6 @@ VLC plugin for libdc1394 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic %patch5 -p1 -b .bp5 -%patch6 -p1 -b .bp_ff rm modules/access/videodev2.h @@ -556,7 +554,6 @@ fi || : - Update to 1.0.1 (Final) - Improve conditionals - Backport zip qt4 from 1.0-bugfix -- Backport font_family from master - More %%_isa requirement * Mon Jul 6 2009 kwizart < kwizart at gmail.com > - 1.0.0-1 From 8b351faaac6321f349899456a176b8ab832aa9dc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 15:41:21 +0000 Subject: [PATCH 071/671] Remove which is on TOKILL list --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6e58dfe..daab8b3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -293,7 +293,6 @@ popd --enable-theora \ --enable-dirac \ --enable-libass \ - --enable-asademux \ --enable-xcb \ --enable-svg \ --enable-snapshot \ From c61975c1f1e6e2b277c3722c7043e38272a90cb7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 28 Jul 2009 15:58:11 +0000 Subject: [PATCH 072/671] Update patch --- vlc-1.0-bugfix-bp_zip_qt4.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vlc-1.0-bugfix-bp_zip_qt4.patch b/vlc-1.0-bugfix-bp_zip_qt4.patch index ff438f5..19fda7c 100644 --- a/vlc-1.0-bugfix-bp_zip_qt4.patch +++ b/vlc-1.0-bugfix-bp_zip_qt4.patch @@ -22,6 +22,16 @@ index 0250312..59b3f74 100644 return VLC_ENOMEM; } p_sys->psz_path = s->psz_path; +@@ -310,7 +310,7 @@ static int Control( stream_t *s, int i_query, va_list args ) + return VLC_EGENERIC; + else + { +- p_sys->i_len = (size_t) i_position; ++ p_sys->i_pos = (size_t) i_position; + return VLC_SUCCESS; + } + } + diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 97aca1a..31b990a 100644 --- a/modules/gui/qt4/main_interface.cpp From c22dd9c3562939af876ecd561b66c4bc50b60cf3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 12 Aug 2009 08:59:56 +0000 Subject: [PATCH 073/671] - Conditionalize libass until stabilized ABI. - Update to 1.0-bugfix 20090812 --- .gitignore | 1 + sources | 1 + vlc.spec | 14 +++++++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2758ddb..b711dca 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vlc-1.0.1.tar.bz2 +vlc-1.0-bugfix-20090812.tar.bz2 diff --git a/sources b/sources index ac9ffab..ff730a3 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 6e299d373e7751bb36de001cdc6a2989 vlc-1.0.1.tar.bz2 +2df9319d666071efd2a5b9f4a04e3a07 vlc-1.0-bugfix-20090812.tar.bz2 diff --git a/vlc.spec b/vlc.spec index daab8b3..aa56b69 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,7 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-bp_zip_qt4.patch +Patch5: vlc-1.0-bugfix-20090812.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -54,7 +54,7 @@ BuildRequires: gsm-devel BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: libavc1394-devel -BuildRequires: libass-devel +%{?_with_libass:BuildRequires: libass-devel >= 0.9.7} BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 @@ -238,7 +238,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .bp5 +%patch5 -p1 -b .bf rm modules/access/videodev2.h @@ -292,7 +292,7 @@ popd --enable-tarkin \ --enable-theora \ --enable-dirac \ - --enable-libass \ +%{?_with_libass:--enable-libass} \ --enable-xcb \ --enable-svg \ --enable-snapshot \ @@ -549,6 +549,10 @@ fi || : %changelog +* Wed Aug 12 2009 kwizart < kwizart at gmail.com > - 1.0.1-2 +- Conditionalize libass until stabilized ABI. +- Update to 1.0-bugfix 20090812 + * Tue Jul 28 2009 kwizart < kwizart at gmail.com > - 1.0.1-1 - Update to 1.0.1 (Final) - Improve conditionals From 0a2032442796cc33618b51107d95cdf3b1a9c3cf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 12 Aug 2009 09:45:42 +0000 Subject: [PATCH 074/671] Update patches pack --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index ff730a3..3301d9c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 6e299d373e7751bb36de001cdc6a2989 vlc-1.0.1.tar.bz2 -2df9319d666071efd2a5b9f4a04e3a07 vlc-1.0-bugfix-20090812.tar.bz2 +3cf4d28f13d2fe525c0df7e2460c5b8b vlc-1.0-bugfix-20090812.tar.bz2 From 9964f978cea9b8acd02cf3a9ef39e1e732b0a2dc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 19 Sep 2009 22:19:30 +0000 Subject: [PATCH 075/671] Update to 1.0.2 --- .gitignore | 3 +-- sources | 3 +-- vlc.spec | 13 +++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index b711dca..b83a423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -vlc-1.0.1.tar.bz2 -vlc-1.0-bugfix-20090812.tar.bz2 +vlc-1.0.2.tar.bz2 diff --git a/sources b/sources index 3301d9c..544ccd6 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -6e299d373e7751bb36de001cdc6a2989 vlc-1.0.1.tar.bz2 -3cf4d28f13d2fe525c0df7e2460c5b8b vlc-1.0-bugfix-20090812.tar.bz2 +6e9383e1684506ee2bfbfae011821fdd vlc-1.0.2.tar.bz2 diff --git a/vlc.spec b/vlc.spec index aa56b69..9bfb8c7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -7,8 +7,8 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 1.0.1 -Release: 2%{?dist} +Version: 1.0.2 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,7 +22,6 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-20090812.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -54,7 +53,7 @@ BuildRequires: gsm-devel BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: libavc1394-devel -%{?_with_libass:BuildRequires: libass-devel >= 0.9.7} +BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 @@ -238,7 +237,6 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .bf rm modules/access/videodev2.h @@ -292,7 +290,7 @@ popd --enable-tarkin \ --enable-theora \ --enable-dirac \ -%{?_with_libass:--enable-libass} \ + --enable-libass \ --enable-xcb \ --enable-svg \ --enable-snapshot \ @@ -549,6 +547,9 @@ fi || : %changelog +* Sat Sep 19 2009 kwizart < kwizart at gmail.com > - 1.0.2-1 +- Update to 1.0.2 + * Wed Aug 12 2009 kwizart < kwizart at gmail.com > - 1.0.1-2 - Conditionalize libass until stabilized ABI. - Update to 1.0-bugfix 20090812 From a4da62fddd30c160f800eeeac5447ae5823c4c06 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 19 Sep 2009 22:22:02 +0000 Subject: [PATCH 076/671] Fix fonts requirement --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 9bfb8c7..f332bd2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -143,6 +143,7 @@ Requires: vlc-core%{_isa} = %{version}-%{release} %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts +Requires: dejavu-serif-fonts %else Requires: dejavu-fonts %endif From bd55f7a33323f7b01769b99b61ba4cac124ea19e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 19 Sep 2009 23:19:26 +0000 Subject: [PATCH 077/671] Fixing --- vlc-1.0.2-powerpc.patch | 24 ++++++++++++++++++++++++ vlc.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 vlc-1.0.2-powerpc.patch diff --git a/vlc-1.0.2-powerpc.patch b/vlc-1.0.2-powerpc.patch new file mode 100644 index 0000000..3516eeb --- /dev/null +++ b/vlc-1.0.2-powerpc.patch @@ -0,0 +1,24 @@ +diff --git a/src/misc/cpu.c b/src/misc/cpu.c +index ac42227..ffe7716 100644 +--- a/src/misc/cpu.c ++++ b/src/misc/cpu.c + -44,8 +44,8 @@ + #include + #endif + +-#if defined( __i386__ ) || defined( __x86_64__ ) \ +- || defined( __ppc__ ) || defined( __ppc64__ ) ++#if defined( __i386__ ) || defined( __x86_64__ ) || defined( __powerpc__ ) \ ++ || defined( __ppc__ ) || defined( __ppc64__ ) || defined( __powerpc64__ ) + static bool check_OS_capability( const char *psz_capability, pid_t pid ) + { + #ifndef WIN32 + -233,7 +233,8 @@ out: + i_capabilities |= CPU_CAPABILITY_NEON; + # endif + +-#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) ++#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __powerpc64__ ) \ ++ || defined( __ppc64__ ) + + i_capabilities |= CPU_CAPABILITY_FPU; diff --git a/vlc.spec b/vlc.spec index f332bd2..390e3aa 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,6 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0.2-powerpc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -238,6 +239,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch4 -p1 -b .ppc rm modules/access/videodev2.h From f18fb9541ff96c8f7c4f98ea33825f7b234b59d7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 19 Sep 2009 23:28:31 +0000 Subject: [PATCH 078/671] Typo --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 390e3aa..dfe2940 100644 --- a/vlc.spec +++ b/vlc.spec @@ -239,7 +239,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch4 -p1 -b .ppc +%patch5 -p1 -b .ppc rm modules/access/videodev2.h From add8c398673861cdebea85d912a99e04e4ffdf2b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 19 Sep 2009 23:58:07 +0000 Subject: [PATCH 079/671] Re-Upload the tarball --- sources | 2 +- vlc-1.0.2-powerpc.patch | 24 ------------------------ vlc.spec | 2 -- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 vlc-1.0.2-powerpc.patch diff --git a/sources b/sources index 544ccd6..c40fc70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e9383e1684506ee2bfbfae011821fdd vlc-1.0.2.tar.bz2 +69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 diff --git a/vlc-1.0.2-powerpc.patch b/vlc-1.0.2-powerpc.patch deleted file mode 100644 index 3516eeb..0000000 --- a/vlc-1.0.2-powerpc.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/misc/cpu.c b/src/misc/cpu.c -index ac42227..ffe7716 100644 ---- a/src/misc/cpu.c -+++ b/src/misc/cpu.c - -44,8 +44,8 @@ - #include - #endif - --#if defined( __i386__ ) || defined( __x86_64__ ) \ -- || defined( __ppc__ ) || defined( __ppc64__ ) -+#if defined( __i386__ ) || defined( __x86_64__ ) || defined( __powerpc__ ) \ -+ || defined( __ppc__ ) || defined( __ppc64__ ) || defined( __powerpc64__ ) - static bool check_OS_capability( const char *psz_capability, pid_t pid ) - { - #ifndef WIN32 - -233,7 +233,8 @@ out: - i_capabilities |= CPU_CAPABILITY_NEON; - # endif - --#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) -+#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __powerpc64__ ) \ -+ || defined( __ppc64__ ) - - i_capabilities |= CPU_CAPABILITY_FPU; diff --git a/vlc.spec b/vlc.spec index dfe2940..f332bd2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,6 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0.2-powerpc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -239,7 +238,6 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .ppc rm modules/access/videodev2.h From 7fd13ee610bbbf7615209f874a7856e98ef0f2ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 20 Sep 2009 09:04:57 +0000 Subject: [PATCH 080/671] *** empty log message *** --- sources | 2 +- vlc-1.0-bugfix-bp-font_family.patch | 195 ---------------------------- vlc-1.0-bugfix-bp_zip_qt4.patch | 50 ------- vlc-1.0.2-compiler.patch | 9 ++ vlc.spec | 15 ++- 5 files changed, 22 insertions(+), 249 deletions(-) delete mode 100644 vlc-1.0-bugfix-bp-font_family.patch delete mode 100644 vlc-1.0-bugfix-bp_zip_qt4.patch create mode 100644 vlc-1.0.2-compiler.patch diff --git a/sources b/sources index c40fc70..544ccd6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 +6e9383e1684506ee2bfbfae011821fdd vlc-1.0.2.tar.bz2 diff --git a/vlc-1.0-bugfix-bp-font_family.patch b/vlc-1.0-bugfix-bp-font_family.patch deleted file mode 100644 index d97793a..0000000 --- a/vlc-1.0-bugfix-bp-font_family.patch +++ /dev/null @@ -1,195 +0,0 @@ -diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c -index 7e45866..a0c3a93 100644 ---- a/modules/misc/freetype.c -+++ b/modules/misc/freetype.c -@@ -70,6 +70,8 @@ - - #ifdef HAVE_FONTCONFIG - #include -+#undef DEFAULT_FONT -+#define DEFAULT_FONT FC_DEFAULT_FONT - #endif - - #include -@@ -81,7 +83,13 @@ static int Create ( vlc_object_t * ); - static void Destroy( vlc_object_t * ); - - #define FONT_TEXT N_("Font") --#define FONT_LONGTEXT N_("Filename for the font you want to use") -+ -+#ifdef HAVE_FONTCONFIG -+#define FONT_LONGTEXT N_("Font family for the font you want to use") -+#else -+#define FONT_LONGTEXT N_("Fontfile for the font you want to use") -+#endif -+ - #define FONTSIZE_TEXT N_("Font size in pixels") - #define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \ - "that will be rendered on the video. " \ -@@ -284,9 +292,15 @@ static int Create( vlc_object_t *p_this ) - { - filter_t *p_filter = (filter_t *)p_this; - filter_sys_t *p_sys; -- char *psz_fontfile = NULL; -- int i_error; -- vlc_value_t val; -+ char *psz_fontfile=NULL; -+ char *psz_fontfamily=NULL; -+ int i_error,fontindex; -+ -+#ifdef HAVE_FONTCONFIG -+ FcPattern *fontpattern, *fontmatch; -+ FcResult fontresult; -+#endif -+ - - /* Allocate structure */ - p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); -@@ -297,52 +311,88 @@ static int Create( vlc_object_t *p_this ) - p_sys->i_font_size = 0; - p_sys->i_display_height = 0; - -- var_Create( p_filter, "freetype-font", -- VLC_VAR_STRING | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-fontsize", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); - var_Create( p_filter, "freetype-rel-fontsize", - VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-opacity", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-effect", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Get( p_filter, "freetype-opacity", &val ); -- p_sys->i_font_opacity = __MAX( __MIN( val.i_int, 255 ), 0 ); -- var_Create( p_filter, "freetype-color", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Get( p_filter, "freetype-color", &val ); -- p_sys->i_font_color = __MAX( __MIN( val.i_int, 0xFFFFFF ), 0 ); -- p_sys->i_effect = var_GetInteger( p_filter, "freetype-effect" ); -- -- /* Look what method was requested */ -- var_Get( p_filter, "freetype-font", &val ); -- psz_fontfile = val.psz_string; -- if( !psz_fontfile || !*psz_fontfile ) -- { -- free( psz_fontfile ); -- psz_fontfile = (char *)malloc( PATH_MAX + 1 ); -- if( !psz_fontfile ) -- goto error; --#ifdef WIN32 -- GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); -- strcat( psz_fontfile, "\\fonts\\arial.ttf" ); --#elif defined(__APPLE__) -- strcpy( psz_fontfile, DEFAULT_FONT ); -+ -+ psz_fontfamily = var_CreateGetString( p_filter, "freetype-font" ); -+ p_sys->i_default_font_size = var_CreateGetInteger( p_filter, "freetype-fontsize" ); -+ p_sys->i_effect = var_CreateGetInteger( p_filter, "freetype-effect" ); -+ p_sys->i_font_opacity = var_CreateGetInteger( p_filter,"freetype-opacity" ); -+ p_sys->i_font_opacity = __MAX( __MIN( p_sys->i_font_opacity, 255 ), 0 ); -+ p_sys->i_font_color = var_CreateGetInteger( p_filter, "freetype-color" ); -+ p_sys->i_font_color = __MAX( __MIN( p_sys->i_font_color , 0xFFFFFF ), 0 ); -+ -+ fontindex=0; -+ if( !psz_fontfamily || !*psz_fontfamily ) -+ { -+#ifdef HAVE_FONTCONFIG -+ free( psz_fontfamily); -+ psz_fontfamily=strdup( DEFAULT_FONT ); - #else -- msg_Err( p_filter, "user didn't specify a font" ); -- goto error; -+ free( psz_fontfamily ); -+ psz_fontfamily = (char *)malloc( PATH_MAX + 1 ); -+ if( !psz_fontfamily ) -+ goto error; -+# ifdef WIN32 -+ GetWindowsDirectory( psz_fontfamily , PATH_MAX + 1 ); -+ strcat( psz_fontfamily, "\\fonts\\arial.ttf" ); -+# else -+ strcpy( psz_fontfamily, DEFAULT_FONT ); -+# endif -+ msg_Err( p_filter,"User didn't specify fontfile, using %s", psz_fontfamily); - #endif - } - -+#ifdef HAVE_FONTCONFIG -+ /* Lets find some fontfile from freetype-font variable family */ -+ char *psz_fontsize; -+ if( asprintf( &psz_fontsize, "%d", p_sys->i_default_font_size ) == -1 ) -+ goto error; -+ fontpattern = FcPatternCreate(); -+ FcPatternAddString( fontpattern, FC_FAMILY, psz_fontfamily); -+ FcPatternAddString( fontpattern, FC_SIZE, psz_fontsize ); -+ -+ if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse ) -+ { -+ FcPatternDestroy( fontpattern ); -+ free( psz_fontsize ); -+ goto error; -+ } -+ FcDefaultSubstitute( fontpattern ); -+ -+ fontmatch = FcFontMatch( NULL, fontpattern, &fontresult ); -+ if( fontresult == FcResultNoMatch ) -+ { -+ free( psz_fontsize ); -+ FcPatternDestroy( fontpattern ); -+ FcPatternDestroy( fontmatch ); -+ goto error; -+ } -+ -+ FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile); -+ FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex ); -+ free( psz_fontsize ); -+ if( !psz_fontfile ) -+ { -+ FcPatternDestroy( fontpattern ); -+ FcPatternDestroy( fontmatch ); -+ goto error; -+ } -+ msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile); -+#else -+ psz_fontfile = psz_fontfamily; -+#endif -+ - i_error = FT_Init_FreeType( &p_sys->p_library ); - if( i_error ) - { - msg_Err( p_filter, "couldn't initialize freetype" ); - goto error; - } -+ - i_error = FT_New_Face( p_sys->p_library, psz_fontfile ? psz_fontfile : "", -- 0, &p_sys->p_face ); -+ fontindex, &p_sys->p_face ); -+ - if( i_error == FT_Err_Unknown_File_Format ) - { - msg_Err( p_filter, "file %s have unknown format", psz_fontfile ); -@@ -369,11 +419,8 @@ static int Create( vlc_object_t *p_this ) - - p_sys->i_use_kerning = FT_HAS_KERNING( p_sys->p_face ); - -- var_Get( p_filter, "freetype-fontsize", &val ); -- p_sys->i_default_font_size = val.i_int; - if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error; - -- free( psz_fontfile ); - - p_sys->pp_font_attachments = NULL; - p_sys->i_font_attachments = 0; -@@ -381,10 +428,13 @@ static int Create( vlc_object_t *p_this ) - p_filter->pf_render_text = RenderText; - #ifdef HAVE_FONTCONFIG - p_filter->pf_render_html = RenderHtml; -+ FcPatternDestroy( fontmatch ); -+ FcPatternDestroy( fontpattern ); - #else - p_filter->pf_render_html = NULL; - #endif - -+ free( psz_fontfamily ); - LoadFontsFromAttachments( p_filter ); - - return VLC_SUCCESS; diff --git a/vlc-1.0-bugfix-bp_zip_qt4.patch b/vlc-1.0-bugfix-bp_zip_qt4.patch deleted file mode 100644 index 19fda7c..0000000 --- a/vlc-1.0-bugfix-bp_zip_qt4.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c -index 0250312..59b3f74 100644 ---- a/modules/access/zip/zipstream.c -+++ b/modules/access/zip/zipstream.c -@@ -205,8 +205,8 @@ int StreamOpen( vlc_object_t *p_this ) - if( !p_sys->zipFile ) - { - msg_Warn( s, "unable to open file" ); -- free( p_sys ); - free( p_sys->fileFunctions ); -+ free( p_sys ); - return VLC_EGENERIC; - } - -@@ -214,8 +214,8 @@ int StreamOpen( vlc_object_t *p_this ) - char *psz_tmp; - if( asprintf( &psz_tmp, "%s.xspf", s->psz_path ) == -1 ) - { -- free( p_sys ); - free( p_sys->fileFunctions ); -+ free( p_sys ); - return VLC_ENOMEM; - } - p_sys->psz_path = s->psz_path; -@@ -310,7 +310,7 @@ static int Control( stream_t *s, int i_query, va_list args ) - return VLC_EGENERIC; - else - { -- p_sys->i_len = (size_t) i_position; -+ p_sys->i_pos = (size_t) i_position; - return VLC_SUCCESS; - } - } - -diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp -index 97aca1a..31b990a 100644 ---- a/modules/gui/qt4/main_interface.cpp -+++ b/modules/gui/qt4/main_interface.cpp -@@ -1134,8 +1134,8 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play ) - - if( s.length() > 0 ) { - playlist_Add( THEPL, qtu(s), NULL, -- PLAYLIST_APPEND | (first ? PLAYLIST_GO: 0), -- PLAYLIST_END, true, false ); -+ PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE), -+ PLAYLIST_END, true, pl_Unlocked ); - first = false; - RecentsMRL::getInstance( p_intf )->addRecent( s ); - } - diff --git a/vlc-1.0.2-compiler.patch b/vlc-1.0.2-compiler.patch new file mode 100644 index 0000000..d374dba --- /dev/null +++ b/vlc-1.0.2-compiler.patch @@ -0,0 +1,9 @@ +diff -up vlc-1.0.2/modules/access/bd/Modules.am.compiler vlc-1.0.2/modules/access/bd/Modules.am +--- vlc-1.0.2/modules/access/bd/Modules.am.compiler 2009-09-18 00:23:37.000000000 +0200 ++++ vlc-1.0.2/modules/access/bd/Modules.am 2009-09-20 10:35:40.107945580 +0200 +@@ -8,3 +8,5 @@ SOURCES_access_bd = \ + + libvlc_LTLIBRARIES += libaccess_bd_plugin.la + ++libaccess_bd_plugin_la_CFLAGS = -O0 ++ diff --git a/vlc.spec b/vlc.spec index f332bd2..8578632 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.2 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,6 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0.2-compiler.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -143,7 +144,6 @@ Requires: vlc-core%{_isa} = %{version}-%{release} %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts -Requires: dejavu-serif-fonts %else Requires: dejavu-fonts %endif @@ -238,7 +238,13 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%ifarch %{ix86} x86_64 +#https://bugzilla.redhat.com/show_bug.cgi?id=524439 +%patch5 -p1 -b .compiler +%endif +#Workaround internal compiler bug in bd.c +sed -i -e 's/screen bd zip/screen zip/' modules/access/Modules.am rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -264,7 +270,7 @@ popd %configure \ --disable-dependency-tracking \ --disable-rpath \ - --enable-release \ + --enable-debug \ --with-binary-version=%{version}-%{release} \ --with-tuning=no \ --enable-switcher \ @@ -548,6 +554,9 @@ fi || : %changelog +* Sun Sep 20 2009 kwizart < kwizart at gmail.com > - 1.0.2-1.1 +- Workaround the compiler bug on x86 x86_64 by disabling optimization. + * Sat Sep 19 2009 kwizart < kwizart at gmail.com > - 1.0.2-1 - Update to 1.0.2 From 3241fea0b956275055296aeea00bdf32c74abbd5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 20 Sep 2009 09:05:52 +0000 Subject: [PATCH 081/671] Release --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8578632..f3c96b9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -270,7 +270,7 @@ popd %configure \ --disable-dependency-tracking \ --disable-rpath \ - --enable-debug \ + --enable-release \ --with-binary-version=%{version}-%{release} \ --with-tuning=no \ --enable-switcher \ From 3114114e6d31612bf3f9f7bbfd6890e65b075252 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 20 Sep 2009 21:42:04 +0000 Subject: [PATCH 082/671] Commit the fixed ppc source --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 544ccd6..c40fc70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e9383e1684506ee2bfbfae011821fdd vlc-1.0.2.tar.bz2 +69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 From c27e8bfbc44bdd2b6838a9c163386bf4a761795c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 27 Sep 2009 18:20:30 +0000 Subject: [PATCH 083/671] - Disable the workaround for the compiler bug. (rhbz#524439) - Resync with the fonts requirement.:x --- vlc-1.0.2-compiler.patch | 9 --------- vlc.spec | 15 ++++++--------- 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 vlc-1.0.2-compiler.patch diff --git a/vlc-1.0.2-compiler.patch b/vlc-1.0.2-compiler.patch deleted file mode 100644 index d374dba..0000000 --- a/vlc-1.0.2-compiler.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up vlc-1.0.2/modules/access/bd/Modules.am.compiler vlc-1.0.2/modules/access/bd/Modules.am ---- vlc-1.0.2/modules/access/bd/Modules.am.compiler 2009-09-18 00:23:37.000000000 +0200 -+++ vlc-1.0.2/modules/access/bd/Modules.am 2009-09-20 10:35:40.107945580 +0200 -@@ -8,3 +8,5 @@ SOURCES_access_bd = \ - - libvlc_LTLIBRARIES += libaccess_bd_plugin.la - -+libaccess_bd_plugin_la_CFLAGS = -O0 -+ diff --git a/vlc.spec b/vlc.spec index f3c96b9..dea9279 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.2 -Release: 1%{?dist}.1 +Release: 1%{?dist}.2 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,7 +22,6 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0.2-compiler.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -144,6 +143,7 @@ Requires: vlc-core%{_isa} = %{version}-%{release} %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts +Requires: dejavu-serif-fonts %else Requires: dejavu-fonts %endif @@ -238,13 +238,6 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%ifarch %{ix86} x86_64 -#https://bugzilla.redhat.com/show_bug.cgi?id=524439 -%patch5 -p1 -b .compiler -%endif - -#Workaround internal compiler bug in bd.c -sed -i -e 's/screen bd zip/screen zip/' modules/access/Modules.am rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -554,6 +547,10 @@ fi || : %changelog +* Sun Sep 27 2009 kwizart < kwizart at gmail.com > - 1.0.2-1.2 +- Disable the workaround for the compiler bug. (rhbz#524439) +- Resync with the fonts requirement. + * Sun Sep 20 2009 kwizart < kwizart at gmail.com > - 1.0.2-1.1 - Workaround the compiler bug on x86 x86_64 by disabling optimization. From 34582f81a9d28b6e22d506cfa5b12e1d819d4e9d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 16 Oct 2009 10:10:22 +0000 Subject: [PATCH 084/671] Rebuild for x264/ffmpeg --- vlc-1.0-bugfix-20091016.patch | 905 ++++++++++++++++++++++++++++++++++ vlc.spec | 8 +- 2 files changed, 912 insertions(+), 1 deletion(-) create mode 100644 vlc-1.0-bugfix-20091016.patch diff --git a/vlc-1.0-bugfix-20091016.patch b/vlc-1.0-bugfix-20091016.patch new file mode 100644 index 0000000..5850030 --- /dev/null +++ b/vlc-1.0-bugfix-20091016.patch @@ -0,0 +1,905 @@ +diff --git a/modules/access/dvb/en50221.c b/modules/access/dvb/en50221.c +index b2d8991..fbf2147 100644 +--- a/modules/access/dvb/en50221.c ++++ b/modules/access/dvb/en50221.c +@@ -151,7 +151,7 @@ static uint8_t *SetLength( uint8_t *p_data, int i_length ) + * Transport layer + */ + +-#define MAX_TPDU_SIZE 2048 ++#define MAX_TPDU_SIZE 4096 + #define MAX_TPDU_DATA (MAX_TPDU_SIZE - 4) + + #define DATA_INDICATOR 0x80 +diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c +index 4b1c67c..113162d 100644 +--- a/modules/access/v4l2.c ++++ b/modules/access/v4l2.c +@@ -204,7 +204,11 @@ static void AccessClose( vlc_object_t * ); + "please use 'v4l2:/""/ :input-slave=alsa:/""/' or " \ + "'v4l2:/""/ :input-slave=oss:/""/' instead." ) + ++#define ASPECT_TEXT N_("Picture aspect-ratio n:m") ++#define ASPECT_LONGTEXT N_("Define input picture aspect-ratio to use. Default is 4:3" ) ++ + typedef enum { ++ IO_METHOD_AUTO, + IO_METHOD_READ, + IO_METHOD_MMAP, + IO_METHOD_USERPTR, +@@ -216,9 +220,9 @@ static const char *const psz_standards_list_text[] = + { N_("Default"), N_("SECAM"), N_("PAL"), N_("NTSC") }; + + static const int i_iomethod_list[] = +- { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR }; ++ { IO_METHOD_AUTO, IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR }; + static const char *const psz_iomethod_list_text[] = +- { N_("READ"), N_("MMAP"), N_("USERPTR") }; ++ { N_("AUTO"), N_("READ"), N_("MMAP"), N_("USERPTR") }; + + static const int i_tuner_audio_modes_list[] = + { V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO, +@@ -251,13 +255,15 @@ vlc_module_begin () + true ) + add_integer( CFG_PREFIX "audio-input", 0, NULL, AUDIO_INPUT_TEXT, + AUDIO_INPUT_LONGTEXT, true ) +- add_integer( CFG_PREFIX "io", IO_METHOD_MMAP, NULL, IOMETHOD_TEXT, ++ add_integer( CFG_PREFIX "io", IO_METHOD_AUTO, NULL, IOMETHOD_TEXT, + IOMETHOD_LONGTEXT, true ) + change_integer_list( i_iomethod_list, psz_iomethod_list_text, NULL ) + add_integer( CFG_PREFIX "width", -1, NULL, WIDTH_TEXT, + WIDTH_LONGTEXT, true ) + add_integer( CFG_PREFIX "height", -1, NULL, HEIGHT_TEXT, + HEIGHT_LONGTEXT, true ) ++ add_string( CFG_PREFIX "aspect-ratio", "4:3", NULL, ASPECT_TEXT, ++ ASPECT_LONGTEXT, true ) + add_float( CFG_PREFIX "fps", 0, NULL, FPS_TEXT, FPS_LONGTEXT, true ) + add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, + CACHING_TEXT, CACHING_LONGTEXT, true ) +@@ -363,6 +369,7 @@ static int AccessControl( access_t *, int, va_list ); + + static int Demux( demux_t * ); + static block_t *AccessRead( access_t * ); ++static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len ); + + static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys ); + static block_t* ProcessVideoFrame( vlc_object_t *p_demux, uint8_t *p_frame, size_t ); +@@ -525,6 +532,7 @@ struct demux_sys_t + + int i_width; + int i_height; ++ unsigned int i_aspect; + float f_fps; /* <= 0.0 mean to grab at full rate */ + mtime_t i_video_pts; /* only used when f_fps > 0 */ + int i_fourcc; +@@ -687,6 +695,19 @@ static void GetV4L2Params( demux_sys_t *p_sys, vlc_object_t *p_obj ) + + p_sys->psz_set_ctrls = var_CreateGetString( p_obj, "v4l2-set-ctrls" ); + ++ char *psz_aspect = var_CreateGetString( p_obj, "v4l2-aspect-ratio" ); ++ if( psz_aspect && *psz_aspect && strchr( psz_aspect, ":" ) ) ++ { ++ char psz_delim = strchr( psz_aspect, ":" ); ++ p_sys->i_aspect = atoi( psz_aspect ) * VOUT_ASPECT_FACTOR / atoi( psz_delim + 1 ); ++ } ++ else ++ { ++ p_sys->i_aspect = 4 * VOUT_ASPECT_FACTOR / 3 ; ++ ++ } ++ free( psz_aspect ); ++ + p_sys->psz_device = NULL; + p_sys->i_fd = -1; + +@@ -793,6 +814,11 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) + p_sys->io = IO_METHOD_USERPTR; + psz_parser += strlen( "userptr" ); + } ++ else if( !strncmp( psz_parser, "auto", strlen( "auto" ) ) ) ++ { ++ p_sys->io = IO_METHOD_AUTO; ++ psz_parser += strlen( "auto" ); ++ } + else + { + p_sys->io = strtol( psz_parser, &psz_parser, 0 ); +@@ -812,6 +838,17 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) + strtol( psz_parser + strlen( "height=" ), + &psz_parser, 0 ); + } ++ else if( !strncmp( psz_parser, "aspect-ratio=", ++ strlen( "aspect-ratio=" ) ) ) ++ { ++ unsigned int num,den; ++ num = strtol( psz_parser + strlen( "aspect-ratio=" ), ++ &psz_parser, 0 ); ++ den = strtol( psz_parser + strlen( ":" ), ++ &psz_parser, 0 ); ++ if( num && den ) ++ p_sys->i_aspect = num * VOUT_ASPECT_FACTOR / den; ++ } + else if( !strncmp( psz_parser, "controls-reset", + strlen( "controls-reset" ) ) ) + { +@@ -990,6 +1027,9 @@ static void DemuxClose( vlc_object_t *p_this ) + } + + break; ++ ++ default: ++ break; + } + } + +@@ -1017,6 +1057,9 @@ static void DemuxClose( vlc_object_t *p_this ) + free( p_sys->p_buffers[i].start ); + } + break; ++ ++ default: ++ break; + } + free( p_sys->p_buffers ); + } +@@ -1056,7 +1099,6 @@ static int AccessOpen( vlc_object_t * p_this ) + if( *p_access->psz_access == '\0' ) return VLC_EGENERIC; + + access_InitFields( p_access ); +- ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); + p_sys = calloc( 1, sizeof( demux_sys_t )); + if( !p_sys ) return VLC_ENOMEM; + p_access->p_sys = (access_sys_t*)p_sys; +@@ -1071,14 +1113,34 @@ static int AccessOpen( vlc_object_t * p_this ) + msg_Dbg( p_this, "Trying direct kernel v4l2" ); + use_kernel_v4l2( p_sys ); + if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS) ++ { ++ if( p_sys->io == IO_METHOD_READ ) ++ { ++ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL ); ++ } ++ else ++ { ++ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); ++ } + return VLC_SUCCESS; ++ } + } + + msg_Dbg( p_this, "Trying libv4l2 wrapper" ); + use_libv4l2( p_sys ); + #endif + if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS ) ++ { ++ if( p_sys->io == IO_METHOD_READ ) ++ { ++ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL ); ++ } ++ else ++ { ++ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); ++ } + return VLC_SUCCESS; ++ } + + AccessClose( p_this ); + return VLC_EGENERIC; +@@ -1199,6 +1261,46 @@ static block_t *AccessRead( access_t * p_access ) + return NULL; + } + ++static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len ) ++{ ++ demux_sys_t *p_sys = (demux_sys_t *) p_access->p_sys; ++ struct pollfd ufd; ++ int i_ret; ++ ++ ufd.fd = p_sys->i_fd; ++ ufd.events = POLLIN; ++ ++ if( p_access->info.b_eof ) ++ return 0; ++ ++ do ++ { ++ if( !vlc_object_alive (p_access) ) ++ return 0; ++ ++ ufd.revents = 0; ++ } ++ while( ( i_ret = poll( &ufd, 1, 500 ) ) == 0 ); ++ ++ if( i_ret < 0 ) ++ { ++ msg_Err( p_access, "Polling error (%m)." ); ++ return -1; ++ } ++ ++ i_ret = v4l2_read( p_sys->i_fd, p_buffer, i_len ); ++ if( i_ret == 0 ) ++ { ++ p_access->info.b_eof = true; ++ } ++ else if( i_ret > 0 ) ++ { ++ p_access->info.i_pos += i_ret; ++ } ++ ++ return i_ret; ++} ++ + /***************************************************************************** + * Demux: Processes the audio or video frame + *****************************************************************************/ +@@ -1357,6 +1459,8 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys ) + + break; + ++ default: ++ break; + } + + /* Timestamp */ +@@ -1843,6 +1947,7 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + msg_Err( p_obj, "device does not support read i/o" ); + goto open_failed; + } ++ msg_Dbg( p_obj, "using read i/o" ); + break; + + case IO_METHOD_MMAP: +@@ -1852,6 +1957,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + msg_Err( p_obj, "device does not support streaming i/o" ); + goto open_failed; + } ++ if( p_sys->io == IO_METHOD_MMAP ) ++ msg_Dbg( p_obj, "using streaming i/o (mmap)" ); ++ else ++ msg_Dbg( p_obj, "using streaming i/o (userptr)" ); + break; + + default: +@@ -1866,16 +1975,19 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + { + crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + crop.c = cropcap.defrect; /* reset to default */ +- if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) ++ if( crop.c.width > 0 && crop.c.height > 0 ) /* Fix for fm tuners */ + { +- switch( errno ) ++ if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) + { +- case EINVAL: +- /* Cropping not supported. */ +- break; +- default: +- /* Errors ignored. */ +- break; ++ switch( errno ) ++ { ++ case EINVAL: ++ /* Cropping not supported. */ ++ break; ++ default: ++ /* Errors ignored. */ ++ break; ++ } + } + } + } +@@ -1911,8 +2023,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + msg_Dbg( p_obj, "trying specified size %dx%d", p_sys->i_width, p_sys->i_height ); + } + +- fmt.fmt.pix.width = p_sys->i_width; +- fmt.fmt.pix.height = p_sys->i_height; ++ fmt.fmt.pix.width = __MAX(0, p_sys->i_width); ++ fmt.fmt.pix.height = __MAX(0, p_sys->i_height); + fmt.fmt.pix.field = V4L2_FIELD_NONE; + + if (b_demux) +@@ -2129,7 +2241,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + switch( p_sys->io ) + { + case IO_METHOD_READ: +- if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; ++ if( b_demux ) ++ if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; + break; + + case IO_METHOD_MMAP: +@@ -2140,15 +2253,20 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + if( InitUserP( p_obj, p_sys, i_fd, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; + break; + ++ default: ++ goto open_failed; ++ break; + } + +- /* Add */ +- es_fmt.video.i_width = p_sys->i_width; +- es_fmt.video.i_height = p_sys->i_height; +- es_fmt.video.i_aspect = 4 * VOUT_ASPECT_FACTOR / 3; +- + if( b_demux ) + { ++ /* Add */ ++ es_fmt.video.i_width = p_sys->i_width; ++ es_fmt.video.i_height = p_sys->i_height; ++ ++ /* Get aspect-ratio */ ++ es_fmt.video.i_aspect = p_sys->i_aspect; ++ + demux_t *p_demux = (demux_t *) p_obj; + msg_Dbg( p_demux, "added new video es %4.4s %dx%d", + (char*)&es_fmt.i_codec, es_fmt.video.i_width, es_fmt.video.i_height ); +@@ -2216,6 +2334,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) + } + + break; ++ ++ default: ++ goto open_failed; ++ break; + } + + /* report fps */ +@@ -2283,10 +2405,12 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + + msg_Dbg( p_obj, "the device has the capabilities: (%c) Video Capure, " + "(%c) Audio, " +- "(%c) Tuner", ++ "(%c) Tuner, " ++ "(%c) Radio", + ( p_sys->dev_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE ? 'X':' '), + ( p_sys->dev_cap.capabilities & V4L2_CAP_AUDIO ? 'X':' '), +- ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' ') ); ++ ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' '), ++ ( p_sys->dev_cap.capabilities & V4L2_CAP_RADIO ? 'X':' ') ); + + msg_Dbg( p_obj, "supported I/O methods are: (%c) Read/Write, " + "(%c) Streaming, " +@@ -2295,6 +2419,30 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + ( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING ? 'X':' ' ), + ( p_sys->dev_cap.capabilities & V4L2_CAP_ASYNCIO ? 'X':' ' ) ); + ++ if( p_sys->io == IO_METHOD_AUTO ) ++ { ++ if( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING ) ++ p_sys->io = IO_METHOD_MMAP; ++ else if( p_sys->dev_cap.capabilities & V4L2_CAP_READWRITE ) ++ p_sys->io = IO_METHOD_READ; ++ else ++ msg_Err( p_obj, "No known I/O method supported" ); ++ } ++ ++ if( p_sys->dev_cap.capabilities & V4L2_CAP_RDS_CAPTURE ) ++ msg_Dbg( p_obj, "device supports RDS" ); ++ ++#ifdef V4L2_CAP_HW_FREQ_SEEK ++ if( p_sys->dev_cap.capabilities & V4L2_CAP_HW_FREQ_SEEK ) ++ msg_Dbg( p_obj, "device supports hardware frequency seeking" ); ++#endif ++ ++ if( p_sys->dev_cap.capabilities & V4L2_CAP_VBI_CAPTURE ) ++ msg_Dbg( p_obj, "device support raw VBI capture" ); ++ ++ if( p_sys->dev_cap.capabilities & V4L2_CAP_SLICED_VBI_CAPTURE ) ++ msg_Dbg( p_obj, "device support sliced VBI capture" ); ++ + /* Now, enumerate all the video inputs. This is useless at the moment + since we have no way to present that info to the user except with + debug messages */ +@@ -2303,12 +2451,14 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + { + struct v4l2_input t_input; + memset( &t_input, 0, sizeof(t_input) ); ++ p_sys->i_input = 0; + while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) + { + p_sys->i_input++; + t_input.index = p_sys->i_input; + } + ++ free( p_sys->p_inputs ); + p_sys->p_inputs = calloc( 1, p_sys->i_input * sizeof( struct v4l2_input ) ); + if( !p_sys->p_inputs ) goto open_failed; + +@@ -2344,6 +2494,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + t_standards.index = p_sys->i_standard; + } + ++ free( p_sys->p_standards ); + p_sys->p_standards = calloc( 1, p_sys->i_standard * sizeof( struct v4l2_standard ) ); + if( !p_sys->p_standards ) goto open_failed; + +@@ -2409,6 +2560,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + tuner.index = p_sys->i_tuner; + } + ++ free( p_sys->p_tuners ); + p_sys->p_tuners = calloc( 1, p_sys->i_tuner * sizeof( struct v4l2_tuner ) ); + if( !p_sys->p_tuners ) goto open_failed; + +@@ -2472,6 +2624,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, + + p_sys->i_codec = i_index; + ++ free( p_sys->p_codecs ); + p_sys->p_codecs = calloc( 1, p_sys->i_codec * sizeof( struct v4l2_fmtdesc ) ); + + for( i_index = 0; i_index < p_sys->i_codec; i_index++ ) +diff --git a/modules/codec/faad.c b/modules/codec/faad.c +index e050a94..ae44675 100644 +--- a/modules/codec/faad.c ++++ b/modules/codec/faad.c +@@ -233,8 +233,17 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) + /* Append the block to the temporary buffer */ + if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer ) + { +- p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer; +- p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size ); ++ size_t i_buffer_size = p_sys->i_buffer + p_block->i_buffer; ++ uint8_t *p_buffer = realloc( p_sys->p_buffer, i_buffer_size ); ++ if( p_buffer ) ++ { ++ p_sys->i_buffer_size = i_buffer_size; ++ p_sys->p_buffer = p_buffer; ++ } ++ else ++ { ++ p_block->i_buffer = 0; ++ } + } + + if( p_block->i_buffer > 0 ) +diff --git a/modules/codec/kate.c b/modules/codec/kate.c +index a6d8ef4..9fe0af9 100644 +--- a/modules/codec/kate.c ++++ b/modules/codec/kate.c +@@ -864,7 +864,7 @@ static void PostprocessTigerImage( plane_t *p_plane, unsigned int i_width ) + if( a ) + { + #ifdef WORDS_BIGENDIAN +- uint8_t tmp = pixel[2]; ++ uint8_t tmp = p_pixel[2]; + p_pixel[0] = p_pixel[3] * 255 / a; + p_pixel[3] = a; + p_pixel[2] = p_pixel[1] * 255 / a; +diff --git a/modules/codec/subtitles/t140.c b/modules/codec/subtitles/t140.c +index 5e0c25a..2b89199 100644 +--- a/modules/codec/subtitles/t140.c ++++ b/modules/codec/subtitles/t140.c +@@ -101,5 +101,9 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu ) + p_block = block_New( p_enc, len ); + memcpy( p_block->p_buffer, p_region->psz_text, len ); + ++ p_block->i_pts = p_block->i_dts = p_spu->i_start; ++ if( !p_spu->b_ephemer && ( p_spu->i_stop > p_spu->i_start ) ) ++ p_block->i_length = p_spu->i_stop - p_spu->i_start; ++ + return p_block; + } +diff --git a/modules/codec/x264.c b/modules/codec/x264.c +index e76ac3b..243bcba 100644 +--- a/modules/codec/x264.c ++++ b/modules/codec/x264.c +@@ -1359,6 +1359,21 @@ static int Open ( vlc_object_t *p_this ) + p_enc->fmt_out.i_extra = 0; + p_enc->fmt_out.p_extra = NULL; + ++#if X264_BUILD >= 76 ++ p_enc->fmt_out.i_extra = x264_encoder_headers( p_sys->h, &nal, &i_nal ); ++ p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra ); ++ if( !p_enc->fmt_out.p_extra ) ++ { ++ Close( VLC_OBJECT(p_enc) ); ++ return VLC_ENOMEM; ++ } ++ void *p_tmp = p_enc->fmt_out.p_extra; ++ for( i = 0; i < i_nal; i++ ) ++ { ++ memcpy( p_tmp, nal[i].p_payload, nal[i].i_payload ); ++ p_tmp += nal[i].i_payload; ++ } ++#else + x264_encoder_headers( p_sys->h, &nal, &i_nal ); + for( i = 0; i < i_nal; i++ ) + { +@@ -1380,6 +1395,7 @@ static int Open ( vlc_object_t *p_this ) + + p_enc->fmt_out.i_extra += i_size; + } ++#endif + + return VLC_SUCCESS; + } +@@ -1416,10 +1432,15 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ) + + for( i = 0, i_out = 0; i < i_nal; i++ ) + { ++#if X264_BUILD >= 76 ++ memcpy( p_sys->p_buffer + i_out, nal[i].p_payload, nal[i].i_payload ); ++ i_out += nal[i].i_payload; ++#else + int i_size = p_sys->i_buffer - i_out; + x264_nal_encode( p_sys->p_buffer + i_out, &i_size, 1, &nal[i] ); + + i_out += i_size; ++#endif + } + + p_block = block_New( p_enc, i_out ); +diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c +index 4fe88b4..47a97e4 100644 +--- a/modules/demux/avi/avi.c ++++ b/modules/demux/avi/avi.c +@@ -672,7 +672,18 @@ aviindex: + + /* *** movie length in sec *** */ + p_sys->i_length = AVI_MovieGetLength( p_demux ); +- if( p_sys->i_length < (mtime_t)p_avih->i_totalframes * ++ ++ /* Check the index completeness */ ++ unsigned int i_idx_totalframes = 0; ++ for( unsigned int i = 0; i < p_sys->i_track; i++ ) ++ { ++ const avi_track_t *tk = p_sys->track[i]; ++ if( tk->i_cat == VIDEO_ES && tk->p_index ) ++ i_idx_totalframes = __MAX(i_idx_totalframes, tk->i_idxnb); ++ continue; ++ } ++ if( i_idx_totalframes != p_avih->i_totalframes && ++ p_sys->i_length < (mtime_t)p_avih->i_totalframes * + (mtime_t)p_avih->i_microsecperframe / + (mtime_t)1000000 ) + { +diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c +index 9770b29..f727c87 100644 +--- a/modules/demux/playlist/m3u.c ++++ b/modules/demux/playlist/m3u.c +@@ -114,28 +114,6 @@ void Close_M3U( vlc_object_t *p_this ) + } + + +-/* Gruik! */ +-static inline char *MaybeFromLocaleDup (const char *str) +-{ +- if (str == NULL) +- return NULL; +- +- return IsUTF8 (str) ? strdup (str) : FromLocaleDup (str); +-} +- +- +-static inline void MaybeFromLocaleRep (char **str) +-{ +- char *const orig_str = *str; +- +- if ((orig_str != NULL) && !IsUTF8 (orig_str)) +- { +- *str = FromLocaleDup (orig_str); +- free (orig_str); +- } +-} +- +- + static int Demux( demux_t *p_demux ) + { + char *psz_line; +@@ -178,9 +156,9 @@ static int Demux( demux_t *p_demux ) + if( i_parsed_duration >= 0 ) + i_duration = i_parsed_duration * INT64_C(1000000); + if( psz_name ) +- psz_name = strdup( psz_name ); ++ psz_name = FromLocaleDup( psz_name ); + if( psz_artist ) +- psz_artist = strdup( psz_artist ); ++ psz_artist = FromLocaleDup( psz_artist ); + } + else if( !strncasecmp( psz_parse, "EXTVLCOPT:", + sizeof("EXTVLCOPT:") -1 ) ) +@@ -190,7 +168,7 @@ static int Demux( demux_t *p_demux ) + psz_parse += sizeof("EXTVLCOPT:") -1; + if( !*psz_parse ) goto error; + +- psz_option = MaybeFromLocaleDup( psz_parse ); ++ psz_option = FromLocaleDup( psz_parse ); + if( psz_option ) + INSERT_ELEM( ppsz_options, i_options, i_options, + psz_option ); +@@ -203,14 +181,13 @@ static int Demux( demux_t *p_demux ) + else if( *psz_parse ) + { + char *psz_mrl; +- if( !psz_name || !*psz_name ) +- { ++ ++ psz_parse = FromLocale( psz_parse ); ++ if( !psz_name && psz_parse ) + /* Use filename as name for relative entries */ +- psz_name = MaybeFromLocaleDup( psz_parse ); +- } ++ psz_name = strdup( psz_parse ); + + psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix ); +- MaybeFromLocaleRep( &psz_mrl ); + + b_cleanup = true; + if( !psz_mrl ) goto error; +@@ -218,12 +195,14 @@ static int Demux( demux_t *p_demux ) + p_input = input_item_NewExt( p_demux, psz_mrl, psz_name, + i_options, ppsz_options, 0, i_duration ); + ++ LocaleFree( psz_parse ); ++ free( psz_mrl ); ++ + if ( psz_artist && *psz_artist ) + input_item_SetArtist( p_input, psz_artist ); + + input_item_AddSubItem( p_current_input, p_input ); + vlc_gc_decref( p_input ); +- free( psz_mrl ); + } + + error: +diff --git a/modules/demux/ts.c b/modules/demux/ts.c +index 514096b..b36dc4f 100644 +--- a/modules/demux/ts.c ++++ b/modules/demux/ts.c +@@ -2083,6 +2083,9 @@ static int PIDFillFormat( ts_pid_t *pid, int i_stream_type ) + case 0x85: /* DTS (audio) */ + es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'd', 't', 's', ' ' ) ); + break; ++ case 0x87: /* E-AC3 */ ++ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'e', 'a', 'c', '3' ) ); ++ break; + + case 0x91: /* A52 vls (audio) */ + es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', 'b' ) ); +@@ -3671,7 +3674,6 @@ static void PMTSetupEsHDMV( demux_t *p_demux, ts_pid_t *pid, + break; + + case 0x84: /* E-AC3 */ +- case 0x87: /* E-AC3 */ + case 0xA1: /* Secondary E-AC3 */ + p_fmt->i_cat = AUDIO_ES; + p_fmt->i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' ); +diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp +index b0436f0..0edde6a 100644 +--- a/modules/gui/qt4/components/playlist/playlist_item.cpp ++++ b/modules/gui/qt4/components/playlist/playlist_item.cpp +@@ -48,7 +48,7 @@ + */ + + +-void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m, QSettings *settings ) ++void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m, QSettings *settings ) + { + parentItem = parent; /* Can be NULL, but only for the rootItem */ + i_id = _i_id; /* Playlist item specific id */ +@@ -56,7 +56,6 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL + model = m; /* PLModel (QAbsmodel) */ + i_type = -1; /* Item type - Avoid segfault */ + b_current = false; /* Is the item the current Item or not */ +- b_is_node = _is_node; + + assert( model ); /* We need a model */ + +@@ -92,21 +91,19 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL + Call the above function init + So far the first constructor isn't used... + */ +-PLItem::PLItem( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m ) ++PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m ) + { +- init( _i_id, _i_input_id, _is_node, parent, m, NULL ); ++ init( _i_id, _i_input_id, parent, m, NULL ); + } + + PLItem::PLItem( playlist_item_t * p_item, PLItem *parent, PLModel *m ) + { +- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1, +- parent, m, NULL ); ++ init( p_item->i_id, p_item->p_input->i_id, parent, m, NULL ); + } + + PLItem::PLItem( playlist_item_t * p_item, QSettings *settings, PLModel *m ) + { +- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1, +- NULL, m, settings ); ++ init( p_item->i_id, p_item->p_input->i_id, NULL, m, settings ); + } + + PLItem::~PLItem() +@@ -177,7 +174,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent ) + /* Useful for the model */ + i_type = p_item->p_input->i_type; + b_current = iscurrent; +- b_is_node = p_item->i_children > -1; + + item_col_strings.clear(); + +diff --git a/modules/gui/qt4/components/playlist/playlist_item.hpp b/modules/gui/qt4/components/playlist/playlist_item.hpp +index c9d186b..26ce13c 100644 +--- a/modules/gui/qt4/components/playlist/playlist_item.hpp ++++ b/modules/gui/qt4/components/playlist/playlist_item.hpp +@@ -40,7 +40,7 @@ class PLItem + { + friend class PLModel; + public: +- PLItem( int, int, bool, PLItem *parent , PLModel * ); ++ PLItem( int, int, PLItem *parent , PLModel * ); + PLItem( playlist_item_t *, PLItem *parent, PLModel * ); + PLItem( playlist_item_t *, QSettings *, PLModel * ); + ~PLItem(); +@@ -72,10 +72,9 @@ protected: + int i_id; + int i_input_id; + int i_showflags; +- bool b_is_node; + + private: +- void init( int, int, bool, PLItem *, PLModel *, QSettings * ); ++ void init( int, int, PLItem *, PLModel *, QSettings * ); + void updateColumnHeaders(); + PLItem *parentItem; + PLModel *model; +diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp +index 9a28d42..add3ddc 100644 +--- a/modules/gui/qt4/components/playlist/playlist_model.cpp ++++ b/modules/gui/qt4/components/playlist/playlist_model.cpp +@@ -119,12 +119,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const + { + Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index ); + if( index.isValid() ) +- { +- PLItem *item = static_cast( index.internalPointer() ); +- if ( item->b_is_node ) +- defaultFlags |= Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; +- else defaultFlags |= Qt::ItemIsDragEnabled; +- } ++ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags; + else if ( rootItem->i_id != p_playlist->p_root_onelevel->i_id + && rootItem->i_id != p_playlist->p_root_category->i_id ) + defaultFlags |= Qt::ItemIsDropEnabled; +diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp +index c9e5550..ca421c6 100644 +--- a/modules/gui/qt4/components/playlist/standardpanel.cpp ++++ b/modules/gui/qt4/components/playlist/standardpanel.cpp +@@ -87,15 +87,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, + view->header()->resizeSection( 0, 200 ); + view->header()->resizeSection( 1, 80 ); + } ++ view->header()->setSortIndicatorShown( true ); + view->header()->setClickable( true ); + view->header()->setContextMenuPolicy( Qt::CustomContextMenu ); + getSettings()->endGroup(); + +- /* Set sorting enable by hand, so it doesn't run sort on start */ +- view->header()->setSortIndicator( -1, Qt::AscendingOrder ); +- view->header()->setSortIndicatorShown( true ); +- CONNECT( view->header(), sortIndicatorChanged( int, Qt::SortOrder ), +- view, sortByColumn( int ) ); + /* Connections for the TreeView */ + CONNECT( view, activated( const QModelIndex& ) , + model,activateItem( const QModelIndex& ) ); +diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp +index 0c4da89..c39bb2f 100644 +--- a/modules/gui/qt4/dialogs_provider.cpp ++++ b/modules/gui/qt4/dialogs_provider.cpp +@@ -532,7 +532,7 @@ void DialogsProvider::saveAPlaylist() + char filter[24]; + char module[12]; + } types[] = { +- { N_("XSPF playlist (*.xpsf)"), "export-xspf", }, ++ { N_("XSPF playlist (*.xspf)"), "export-xspf", }, + { N_("M3U playlist (*.m3u)"), "export-m3u", }, + { N_("HTML playlist (*.html)"), "export-html", }, + }; +diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp +index d352fae..c9af6ef 100644 +--- a/modules/gui/qt4/main_interface.hpp ++++ b/modules/gui/qt4/main_interface.hpp +@@ -180,7 +180,7 @@ private slots: + void showCryptedLabel( bool ); + signals: + void askGetVideo( WId *p_id, vout_thread_t *, int *pi_x, int *pi_y, +- unsigned int *pi_width, unsigned int *pi_height ); ++ unsigned *pi_width, unsigned *pi_height ); + void askReleaseVideo( ); + void askVideoToResize( unsigned int, unsigned int ); + void askUpdate(); +diff --git a/modules/stream_filter/rar.c b/modules/stream_filter/rar.c +index a5fd829..f828058 100644 +--- a/modules/stream_filter/rar.c ++++ b/modules/stream_filter/rar.c +@@ -525,7 +525,7 @@ static int SkipFile( stream_t *s,const rar_block_t *p_hdr ) + rar_file_chunk_t *p_chunk = malloc( sizeof( *p_chunk ) ); + if( p_chunk ) + { +- p_chunk->i_offset = stream_Tell( s->p_source ); ++ p_chunk->i_offset = stream_Tell( s->p_source ) + p_hdr->i_size; + p_chunk->i_size = p_hdr->i_add_size; + p_chunk->i_cummulated_size = 0; + if( p_current->i_chunk > 0 ) +diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c +index e6c79cd..f2074e5 100644 +--- a/modules/video_filter/canvas.c ++++ b/modules/video_filter/canvas.c +@@ -102,6 +102,7 @@ static int alloc_init( filter_t *, void * ); + * Module descriptor + *****************************************************************************/ + vlc_module_begin () ++ set_shortname( N_("Canvas") ) + set_description( N_("Automatically resize and pad a video") ) + set_capability( "video filter2", 0 ) + set_callbacks( Activate, Destroy ) +diff --git a/modules/video_filter/croppadd.c b/modules/video_filter/croppadd.c +index 63b5341..887e6e5 100644 +--- a/modules/video_filter/croppadd.c ++++ b/modules/video_filter/croppadd.c +@@ -76,6 +76,7 @@ static picture_t *Filter( filter_t *, picture_t * ); + * Module descriptor + *****************************************************************************/ + vlc_module_begin () ++ set_shortname( N_("Cropadd") ) + set_description( N_("Video scaling filter") ) + set_capability( "video filter2", 0 ) + set_callbacks( OpenFilter, CloseFilter ) +diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua +index 7544255..3e2688d 100644 +--- a/share/lua/playlist/appletrailers.lua ++++ b/share/lua/playlist/appletrailers.lua +@@ -53,7 +53,7 @@ function parse() + else + extraname = "" + end +- table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path } ) ++ table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime vlc lua edition\"" } ) + end + if string.match( line, "" ) + then +diff --git a/src/misc/update.c b/src/misc/update.c +index a0f4334..d7e6179 100644 +--- a/src/misc/update.c ++++ b/src/misc/update.c +@@ -1081,12 +1081,12 @@ void update_Delete( update_t *p_update ) + + if( p_update->p_check ) + { +- assert( !p_update->p_download ); + vlc_object_kill( p_update->p_check ); + vlc_thread_join( p_update->p_check ); + vlc_object_release( p_update->p_check ); + } +- else if( p_update->p_download ) ++ ++ if( p_update->p_download ) + { + vlc_object_kill( p_update->p_download ); + vlc_thread_join( p_update->p_download ); +@@ -1613,9 +1613,9 @@ static void* update_DownloadReal( vlc_object_t *p_this ) + psz_downloaded = size_str( l_downloaded ); + f_progress = (float)l_downloaded/(float)l_size; + +- if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ), ++ if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s - %.1f%% done" ), + p_update->release.psz_url, psz_downloaded, psz_size, +- f_progress ) != -1 ) ++ f_progress*100 ) != -1 ) + { + dialog_ProgressSet( p_progress, psz_status, f_progress ); + free( psz_status ); +@@ -1735,9 +1735,6 @@ end: + free( p_buffer ); + free( psz_size ); + +- p_udt->p_update->p_download = NULL; +- +- vlc_object_release( p_udt ); + vlc_restorecancel( canc ); + return NULL; + } diff --git a/vlc.spec b/vlc.spec index dea9279..7a4689e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.2 -Release: 1%{?dist}.2 +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,6 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0-bugfix-20091016.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -238,6 +239,7 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch5 -p1 -b .bf rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -547,6 +549,10 @@ fi || : %changelog +* Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 +- Update to 1.0-bugfix 20091016 +- Rebuild for x264/ffmpeg + * Sun Sep 27 2009 kwizart < kwizart at gmail.com > - 1.0.2-1.2 - Disable the workaround for the compiler bug. (rhbz#524439) - Resync with the fonts requirement. From 2125e051ae422165a53145f256389602f9195d44 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Oct 2009 16:41:04 +0000 Subject: [PATCH 085/671] Update to 1.0.3-rc --- .gitignore | 2 +- sources | 2 +- vlc-1.0-bugfix-20091016.patch | 905 ---------------------------------- vlc-1.0-bugfix-20091025.patch | 814 ++++++++++++++++++++++++++++++ vlc.spec | 32 +- 5 files changed, 824 insertions(+), 931 deletions(-) delete mode 100644 vlc-1.0-bugfix-20091016.patch create mode 100644 vlc-1.0-bugfix-20091025.patch diff --git a/.gitignore b/.gitignore index b83a423..c50428f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.0.2.tar.bz2 +vlc-1.0.3-rc.tar.bz2 diff --git a/sources b/sources index c40fc70..c1d976f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 +a83fc8d8a4bc804b27da6bd60b091967 vlc-1.0.3-rc.tar.bz2 diff --git a/vlc-1.0-bugfix-20091016.patch b/vlc-1.0-bugfix-20091016.patch deleted file mode 100644 index 5850030..0000000 --- a/vlc-1.0-bugfix-20091016.patch +++ /dev/null @@ -1,905 +0,0 @@ -diff --git a/modules/access/dvb/en50221.c b/modules/access/dvb/en50221.c -index b2d8991..fbf2147 100644 ---- a/modules/access/dvb/en50221.c -+++ b/modules/access/dvb/en50221.c -@@ -151,7 +151,7 @@ static uint8_t *SetLength( uint8_t *p_data, int i_length ) - * Transport layer - */ - --#define MAX_TPDU_SIZE 2048 -+#define MAX_TPDU_SIZE 4096 - #define MAX_TPDU_DATA (MAX_TPDU_SIZE - 4) - - #define DATA_INDICATOR 0x80 -diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c -index 4b1c67c..113162d 100644 ---- a/modules/access/v4l2.c -+++ b/modules/access/v4l2.c -@@ -204,7 +204,11 @@ static void AccessClose( vlc_object_t * ); - "please use 'v4l2:/""/ :input-slave=alsa:/""/' or " \ - "'v4l2:/""/ :input-slave=oss:/""/' instead." ) - -+#define ASPECT_TEXT N_("Picture aspect-ratio n:m") -+#define ASPECT_LONGTEXT N_("Define input picture aspect-ratio to use. Default is 4:3" ) -+ - typedef enum { -+ IO_METHOD_AUTO, - IO_METHOD_READ, - IO_METHOD_MMAP, - IO_METHOD_USERPTR, -@@ -216,9 +220,9 @@ static const char *const psz_standards_list_text[] = - { N_("Default"), N_("SECAM"), N_("PAL"), N_("NTSC") }; - - static const int i_iomethod_list[] = -- { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR }; -+ { IO_METHOD_AUTO, IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR }; - static const char *const psz_iomethod_list_text[] = -- { N_("READ"), N_("MMAP"), N_("USERPTR") }; -+ { N_("AUTO"), N_("READ"), N_("MMAP"), N_("USERPTR") }; - - static const int i_tuner_audio_modes_list[] = - { V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO, -@@ -251,13 +255,15 @@ vlc_module_begin () - true ) - add_integer( CFG_PREFIX "audio-input", 0, NULL, AUDIO_INPUT_TEXT, - AUDIO_INPUT_LONGTEXT, true ) -- add_integer( CFG_PREFIX "io", IO_METHOD_MMAP, NULL, IOMETHOD_TEXT, -+ add_integer( CFG_PREFIX "io", IO_METHOD_AUTO, NULL, IOMETHOD_TEXT, - IOMETHOD_LONGTEXT, true ) - change_integer_list( i_iomethod_list, psz_iomethod_list_text, NULL ) - add_integer( CFG_PREFIX "width", -1, NULL, WIDTH_TEXT, - WIDTH_LONGTEXT, true ) - add_integer( CFG_PREFIX "height", -1, NULL, HEIGHT_TEXT, - HEIGHT_LONGTEXT, true ) -+ add_string( CFG_PREFIX "aspect-ratio", "4:3", NULL, ASPECT_TEXT, -+ ASPECT_LONGTEXT, true ) - add_float( CFG_PREFIX "fps", 0, NULL, FPS_TEXT, FPS_LONGTEXT, true ) - add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, - CACHING_TEXT, CACHING_LONGTEXT, true ) -@@ -363,6 +369,7 @@ static int AccessControl( access_t *, int, va_list ); - - static int Demux( demux_t * ); - static block_t *AccessRead( access_t * ); -+static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len ); - - static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys ); - static block_t* ProcessVideoFrame( vlc_object_t *p_demux, uint8_t *p_frame, size_t ); -@@ -525,6 +532,7 @@ struct demux_sys_t - - int i_width; - int i_height; -+ unsigned int i_aspect; - float f_fps; /* <= 0.0 mean to grab at full rate */ - mtime_t i_video_pts; /* only used when f_fps > 0 */ - int i_fourcc; -@@ -687,6 +695,19 @@ static void GetV4L2Params( demux_sys_t *p_sys, vlc_object_t *p_obj ) - - p_sys->psz_set_ctrls = var_CreateGetString( p_obj, "v4l2-set-ctrls" ); - -+ char *psz_aspect = var_CreateGetString( p_obj, "v4l2-aspect-ratio" ); -+ if( psz_aspect && *psz_aspect && strchr( psz_aspect, ":" ) ) -+ { -+ char psz_delim = strchr( psz_aspect, ":" ); -+ p_sys->i_aspect = atoi( psz_aspect ) * VOUT_ASPECT_FACTOR / atoi( psz_delim + 1 ); -+ } -+ else -+ { -+ p_sys->i_aspect = 4 * VOUT_ASPECT_FACTOR / 3 ; -+ -+ } -+ free( psz_aspect ); -+ - p_sys->psz_device = NULL; - p_sys->i_fd = -1; - -@@ -793,6 +814,11 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) - p_sys->io = IO_METHOD_USERPTR; - psz_parser += strlen( "userptr" ); - } -+ else if( !strncmp( psz_parser, "auto", strlen( "auto" ) ) ) -+ { -+ p_sys->io = IO_METHOD_AUTO; -+ psz_parser += strlen( "auto" ); -+ } - else - { - p_sys->io = strtol( psz_parser, &psz_parser, 0 ); -@@ -812,6 +838,17 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) - strtol( psz_parser + strlen( "height=" ), - &psz_parser, 0 ); - } -+ else if( !strncmp( psz_parser, "aspect-ratio=", -+ strlen( "aspect-ratio=" ) ) ) -+ { -+ unsigned int num,den; -+ num = strtol( psz_parser + strlen( "aspect-ratio=" ), -+ &psz_parser, 0 ); -+ den = strtol( psz_parser + strlen( ":" ), -+ &psz_parser, 0 ); -+ if( num && den ) -+ p_sys->i_aspect = num * VOUT_ASPECT_FACTOR / den; -+ } - else if( !strncmp( psz_parser, "controls-reset", - strlen( "controls-reset" ) ) ) - { -@@ -990,6 +1027,9 @@ static void DemuxClose( vlc_object_t *p_this ) - } - - break; -+ -+ default: -+ break; - } - } - -@@ -1017,6 +1057,9 @@ static void DemuxClose( vlc_object_t *p_this ) - free( p_sys->p_buffers[i].start ); - } - break; -+ -+ default: -+ break; - } - free( p_sys->p_buffers ); - } -@@ -1056,7 +1099,6 @@ static int AccessOpen( vlc_object_t * p_this ) - if( *p_access->psz_access == '\0' ) return VLC_EGENERIC; - - access_InitFields( p_access ); -- ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); - p_sys = calloc( 1, sizeof( demux_sys_t )); - if( !p_sys ) return VLC_ENOMEM; - p_access->p_sys = (access_sys_t*)p_sys; -@@ -1071,14 +1113,34 @@ static int AccessOpen( vlc_object_t * p_this ) - msg_Dbg( p_this, "Trying direct kernel v4l2" ); - use_kernel_v4l2( p_sys ); - if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS) -+ { -+ if( p_sys->io == IO_METHOD_READ ) -+ { -+ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL ); -+ } -+ else -+ { -+ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); -+ } - return VLC_SUCCESS; -+ } - } - - msg_Dbg( p_this, "Trying libv4l2 wrapper" ); - use_libv4l2( p_sys ); - #endif - if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS ) -+ { -+ if( p_sys->io == IO_METHOD_READ ) -+ { -+ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL ); -+ } -+ else -+ { -+ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL ); -+ } - return VLC_SUCCESS; -+ } - - AccessClose( p_this ); - return VLC_EGENERIC; -@@ -1199,6 +1261,46 @@ static block_t *AccessRead( access_t * p_access ) - return NULL; - } - -+static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len ) -+{ -+ demux_sys_t *p_sys = (demux_sys_t *) p_access->p_sys; -+ struct pollfd ufd; -+ int i_ret; -+ -+ ufd.fd = p_sys->i_fd; -+ ufd.events = POLLIN; -+ -+ if( p_access->info.b_eof ) -+ return 0; -+ -+ do -+ { -+ if( !vlc_object_alive (p_access) ) -+ return 0; -+ -+ ufd.revents = 0; -+ } -+ while( ( i_ret = poll( &ufd, 1, 500 ) ) == 0 ); -+ -+ if( i_ret < 0 ) -+ { -+ msg_Err( p_access, "Polling error (%m)." ); -+ return -1; -+ } -+ -+ i_ret = v4l2_read( p_sys->i_fd, p_buffer, i_len ); -+ if( i_ret == 0 ) -+ { -+ p_access->info.b_eof = true; -+ } -+ else if( i_ret > 0 ) -+ { -+ p_access->info.i_pos += i_ret; -+ } -+ -+ return i_ret; -+} -+ - /***************************************************************************** - * Demux: Processes the audio or video frame - *****************************************************************************/ -@@ -1357,6 +1459,8 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys ) - - break; - -+ default: -+ break; - } - - /* Timestamp */ -@@ -1843,6 +1947,7 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - msg_Err( p_obj, "device does not support read i/o" ); - goto open_failed; - } -+ msg_Dbg( p_obj, "using read i/o" ); - break; - - case IO_METHOD_MMAP: -@@ -1852,6 +1957,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - msg_Err( p_obj, "device does not support streaming i/o" ); - goto open_failed; - } -+ if( p_sys->io == IO_METHOD_MMAP ) -+ msg_Dbg( p_obj, "using streaming i/o (mmap)" ); -+ else -+ msg_Dbg( p_obj, "using streaming i/o (userptr)" ); - break; - - default: -@@ -1866,16 +1975,19 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - { - crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - crop.c = cropcap.defrect; /* reset to default */ -- if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) -+ if( crop.c.width > 0 && crop.c.height > 0 ) /* Fix for fm tuners */ - { -- switch( errno ) -+ if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 ) - { -- case EINVAL: -- /* Cropping not supported. */ -- break; -- default: -- /* Errors ignored. */ -- break; -+ switch( errno ) -+ { -+ case EINVAL: -+ /* Cropping not supported. */ -+ break; -+ default: -+ /* Errors ignored. */ -+ break; -+ } - } - } - } -@@ -1911,8 +2023,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - msg_Dbg( p_obj, "trying specified size %dx%d", p_sys->i_width, p_sys->i_height ); - } - -- fmt.fmt.pix.width = p_sys->i_width; -- fmt.fmt.pix.height = p_sys->i_height; -+ fmt.fmt.pix.width = __MAX(0, p_sys->i_width); -+ fmt.fmt.pix.height = __MAX(0, p_sys->i_height); - fmt.fmt.pix.field = V4L2_FIELD_NONE; - - if (b_demux) -@@ -2129,7 +2241,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - switch( p_sys->io ) - { - case IO_METHOD_READ: -- if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; -+ if( b_demux ) -+ if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; - break; - - case IO_METHOD_MMAP: -@@ -2140,15 +2253,20 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - if( InitUserP( p_obj, p_sys, i_fd, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed; - break; - -+ default: -+ goto open_failed; -+ break; - } - -- /* Add */ -- es_fmt.video.i_width = p_sys->i_width; -- es_fmt.video.i_height = p_sys->i_height; -- es_fmt.video.i_aspect = 4 * VOUT_ASPECT_FACTOR / 3; -- - if( b_demux ) - { -+ /* Add */ -+ es_fmt.video.i_width = p_sys->i_width; -+ es_fmt.video.i_height = p_sys->i_height; -+ -+ /* Get aspect-ratio */ -+ es_fmt.video.i_aspect = p_sys->i_aspect; -+ - demux_t *p_demux = (demux_t *) p_obj; - msg_Dbg( p_demux, "added new video es %4.4s %dx%d", - (char*)&es_fmt.i_codec, es_fmt.video.i_width, es_fmt.video.i_height ); -@@ -2216,6 +2334,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) - } - - break; -+ -+ default: -+ goto open_failed; -+ break; - } - - /* report fps */ -@@ -2283,10 +2405,12 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - - msg_Dbg( p_obj, "the device has the capabilities: (%c) Video Capure, " - "(%c) Audio, " -- "(%c) Tuner", -+ "(%c) Tuner, " -+ "(%c) Radio", - ( p_sys->dev_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE ? 'X':' '), - ( p_sys->dev_cap.capabilities & V4L2_CAP_AUDIO ? 'X':' '), -- ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' ') ); -+ ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' '), -+ ( p_sys->dev_cap.capabilities & V4L2_CAP_RADIO ? 'X':' ') ); - - msg_Dbg( p_obj, "supported I/O methods are: (%c) Read/Write, " - "(%c) Streaming, " -@@ -2295,6 +2419,30 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - ( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING ? 'X':' ' ), - ( p_sys->dev_cap.capabilities & V4L2_CAP_ASYNCIO ? 'X':' ' ) ); - -+ if( p_sys->io == IO_METHOD_AUTO ) -+ { -+ if( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING ) -+ p_sys->io = IO_METHOD_MMAP; -+ else if( p_sys->dev_cap.capabilities & V4L2_CAP_READWRITE ) -+ p_sys->io = IO_METHOD_READ; -+ else -+ msg_Err( p_obj, "No known I/O method supported" ); -+ } -+ -+ if( p_sys->dev_cap.capabilities & V4L2_CAP_RDS_CAPTURE ) -+ msg_Dbg( p_obj, "device supports RDS" ); -+ -+#ifdef V4L2_CAP_HW_FREQ_SEEK -+ if( p_sys->dev_cap.capabilities & V4L2_CAP_HW_FREQ_SEEK ) -+ msg_Dbg( p_obj, "device supports hardware frequency seeking" ); -+#endif -+ -+ if( p_sys->dev_cap.capabilities & V4L2_CAP_VBI_CAPTURE ) -+ msg_Dbg( p_obj, "device support raw VBI capture" ); -+ -+ if( p_sys->dev_cap.capabilities & V4L2_CAP_SLICED_VBI_CAPTURE ) -+ msg_Dbg( p_obj, "device support sliced VBI capture" ); -+ - /* Now, enumerate all the video inputs. This is useless at the moment - since we have no way to present that info to the user except with - debug messages */ -@@ -2303,12 +2451,14 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - { - struct v4l2_input t_input; - memset( &t_input, 0, sizeof(t_input) ); -+ p_sys->i_input = 0; - while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 ) - { - p_sys->i_input++; - t_input.index = p_sys->i_input; - } - -+ free( p_sys->p_inputs ); - p_sys->p_inputs = calloc( 1, p_sys->i_input * sizeof( struct v4l2_input ) ); - if( !p_sys->p_inputs ) goto open_failed; - -@@ -2344,6 +2494,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - t_standards.index = p_sys->i_standard; - } - -+ free( p_sys->p_standards ); - p_sys->p_standards = calloc( 1, p_sys->i_standard * sizeof( struct v4l2_standard ) ); - if( !p_sys->p_standards ) goto open_failed; - -@@ -2409,6 +2560,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - tuner.index = p_sys->i_tuner; - } - -+ free( p_sys->p_tuners ); - p_sys->p_tuners = calloc( 1, p_sys->i_tuner * sizeof( struct v4l2_tuner ) ); - if( !p_sys->p_tuners ) goto open_failed; - -@@ -2472,6 +2624,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, - - p_sys->i_codec = i_index; - -+ free( p_sys->p_codecs ); - p_sys->p_codecs = calloc( 1, p_sys->i_codec * sizeof( struct v4l2_fmtdesc ) ); - - for( i_index = 0; i_index < p_sys->i_codec; i_index++ ) -diff --git a/modules/codec/faad.c b/modules/codec/faad.c -index e050a94..ae44675 100644 ---- a/modules/codec/faad.c -+++ b/modules/codec/faad.c -@@ -233,8 +233,17 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) - /* Append the block to the temporary buffer */ - if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer ) - { -- p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer; -- p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size ); -+ size_t i_buffer_size = p_sys->i_buffer + p_block->i_buffer; -+ uint8_t *p_buffer = realloc( p_sys->p_buffer, i_buffer_size ); -+ if( p_buffer ) -+ { -+ p_sys->i_buffer_size = i_buffer_size; -+ p_sys->p_buffer = p_buffer; -+ } -+ else -+ { -+ p_block->i_buffer = 0; -+ } - } - - if( p_block->i_buffer > 0 ) -diff --git a/modules/codec/kate.c b/modules/codec/kate.c -index a6d8ef4..9fe0af9 100644 ---- a/modules/codec/kate.c -+++ b/modules/codec/kate.c -@@ -864,7 +864,7 @@ static void PostprocessTigerImage( plane_t *p_plane, unsigned int i_width ) - if( a ) - { - #ifdef WORDS_BIGENDIAN -- uint8_t tmp = pixel[2]; -+ uint8_t tmp = p_pixel[2]; - p_pixel[0] = p_pixel[3] * 255 / a; - p_pixel[3] = a; - p_pixel[2] = p_pixel[1] * 255 / a; -diff --git a/modules/codec/subtitles/t140.c b/modules/codec/subtitles/t140.c -index 5e0c25a..2b89199 100644 ---- a/modules/codec/subtitles/t140.c -+++ b/modules/codec/subtitles/t140.c -@@ -101,5 +101,9 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu ) - p_block = block_New( p_enc, len ); - memcpy( p_block->p_buffer, p_region->psz_text, len ); - -+ p_block->i_pts = p_block->i_dts = p_spu->i_start; -+ if( !p_spu->b_ephemer && ( p_spu->i_stop > p_spu->i_start ) ) -+ p_block->i_length = p_spu->i_stop - p_spu->i_start; -+ - return p_block; - } -diff --git a/modules/codec/x264.c b/modules/codec/x264.c -index e76ac3b..243bcba 100644 ---- a/modules/codec/x264.c -+++ b/modules/codec/x264.c -@@ -1359,6 +1359,21 @@ static int Open ( vlc_object_t *p_this ) - p_enc->fmt_out.i_extra = 0; - p_enc->fmt_out.p_extra = NULL; - -+#if X264_BUILD >= 76 -+ p_enc->fmt_out.i_extra = x264_encoder_headers( p_sys->h, &nal, &i_nal ); -+ p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra ); -+ if( !p_enc->fmt_out.p_extra ) -+ { -+ Close( VLC_OBJECT(p_enc) ); -+ return VLC_ENOMEM; -+ } -+ void *p_tmp = p_enc->fmt_out.p_extra; -+ for( i = 0; i < i_nal; i++ ) -+ { -+ memcpy( p_tmp, nal[i].p_payload, nal[i].i_payload ); -+ p_tmp += nal[i].i_payload; -+ } -+#else - x264_encoder_headers( p_sys->h, &nal, &i_nal ); - for( i = 0; i < i_nal; i++ ) - { -@@ -1380,6 +1395,7 @@ static int Open ( vlc_object_t *p_this ) - - p_enc->fmt_out.i_extra += i_size; - } -+#endif - - return VLC_SUCCESS; - } -@@ -1416,10 +1432,15 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ) - - for( i = 0, i_out = 0; i < i_nal; i++ ) - { -+#if X264_BUILD >= 76 -+ memcpy( p_sys->p_buffer + i_out, nal[i].p_payload, nal[i].i_payload ); -+ i_out += nal[i].i_payload; -+#else - int i_size = p_sys->i_buffer - i_out; - x264_nal_encode( p_sys->p_buffer + i_out, &i_size, 1, &nal[i] ); - - i_out += i_size; -+#endif - } - - p_block = block_New( p_enc, i_out ); -diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c -index 4fe88b4..47a97e4 100644 ---- a/modules/demux/avi/avi.c -+++ b/modules/demux/avi/avi.c -@@ -672,7 +672,18 @@ aviindex: - - /* *** movie length in sec *** */ - p_sys->i_length = AVI_MovieGetLength( p_demux ); -- if( p_sys->i_length < (mtime_t)p_avih->i_totalframes * -+ -+ /* Check the index completeness */ -+ unsigned int i_idx_totalframes = 0; -+ for( unsigned int i = 0; i < p_sys->i_track; i++ ) -+ { -+ const avi_track_t *tk = p_sys->track[i]; -+ if( tk->i_cat == VIDEO_ES && tk->p_index ) -+ i_idx_totalframes = __MAX(i_idx_totalframes, tk->i_idxnb); -+ continue; -+ } -+ if( i_idx_totalframes != p_avih->i_totalframes && -+ p_sys->i_length < (mtime_t)p_avih->i_totalframes * - (mtime_t)p_avih->i_microsecperframe / - (mtime_t)1000000 ) - { -diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c -index 9770b29..f727c87 100644 ---- a/modules/demux/playlist/m3u.c -+++ b/modules/demux/playlist/m3u.c -@@ -114,28 +114,6 @@ void Close_M3U( vlc_object_t *p_this ) - } - - --/* Gruik! */ --static inline char *MaybeFromLocaleDup (const char *str) --{ -- if (str == NULL) -- return NULL; -- -- return IsUTF8 (str) ? strdup (str) : FromLocaleDup (str); --} -- -- --static inline void MaybeFromLocaleRep (char **str) --{ -- char *const orig_str = *str; -- -- if ((orig_str != NULL) && !IsUTF8 (orig_str)) -- { -- *str = FromLocaleDup (orig_str); -- free (orig_str); -- } --} -- -- - static int Demux( demux_t *p_demux ) - { - char *psz_line; -@@ -178,9 +156,9 @@ static int Demux( demux_t *p_demux ) - if( i_parsed_duration >= 0 ) - i_duration = i_parsed_duration * INT64_C(1000000); - if( psz_name ) -- psz_name = strdup( psz_name ); -+ psz_name = FromLocaleDup( psz_name ); - if( psz_artist ) -- psz_artist = strdup( psz_artist ); -+ psz_artist = FromLocaleDup( psz_artist ); - } - else if( !strncasecmp( psz_parse, "EXTVLCOPT:", - sizeof("EXTVLCOPT:") -1 ) ) -@@ -190,7 +168,7 @@ static int Demux( demux_t *p_demux ) - psz_parse += sizeof("EXTVLCOPT:") -1; - if( !*psz_parse ) goto error; - -- psz_option = MaybeFromLocaleDup( psz_parse ); -+ psz_option = FromLocaleDup( psz_parse ); - if( psz_option ) - INSERT_ELEM( ppsz_options, i_options, i_options, - psz_option ); -@@ -203,14 +181,13 @@ static int Demux( demux_t *p_demux ) - else if( *psz_parse ) - { - char *psz_mrl; -- if( !psz_name || !*psz_name ) -- { -+ -+ psz_parse = FromLocale( psz_parse ); -+ if( !psz_name && psz_parse ) - /* Use filename as name for relative entries */ -- psz_name = MaybeFromLocaleDup( psz_parse ); -- } -+ psz_name = strdup( psz_parse ); - - psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix ); -- MaybeFromLocaleRep( &psz_mrl ); - - b_cleanup = true; - if( !psz_mrl ) goto error; -@@ -218,12 +195,14 @@ static int Demux( demux_t *p_demux ) - p_input = input_item_NewExt( p_demux, psz_mrl, psz_name, - i_options, ppsz_options, 0, i_duration ); - -+ LocaleFree( psz_parse ); -+ free( psz_mrl ); -+ - if ( psz_artist && *psz_artist ) - input_item_SetArtist( p_input, psz_artist ); - - input_item_AddSubItem( p_current_input, p_input ); - vlc_gc_decref( p_input ); -- free( psz_mrl ); - } - - error: -diff --git a/modules/demux/ts.c b/modules/demux/ts.c -index 514096b..b36dc4f 100644 ---- a/modules/demux/ts.c -+++ b/modules/demux/ts.c -@@ -2083,6 +2083,9 @@ static int PIDFillFormat( ts_pid_t *pid, int i_stream_type ) - case 0x85: /* DTS (audio) */ - es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'd', 't', 's', ' ' ) ); - break; -+ case 0x87: /* E-AC3 */ -+ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'e', 'a', 'c', '3' ) ); -+ break; - - case 0x91: /* A52 vls (audio) */ - es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', 'b' ) ); -@@ -3671,7 +3674,6 @@ static void PMTSetupEsHDMV( demux_t *p_demux, ts_pid_t *pid, - break; - - case 0x84: /* E-AC3 */ -- case 0x87: /* E-AC3 */ - case 0xA1: /* Secondary E-AC3 */ - p_fmt->i_cat = AUDIO_ES; - p_fmt->i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' ); -diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp -index b0436f0..0edde6a 100644 ---- a/modules/gui/qt4/components/playlist/playlist_item.cpp -+++ b/modules/gui/qt4/components/playlist/playlist_item.cpp -@@ -48,7 +48,7 @@ - */ - - --void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m, QSettings *settings ) -+void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m, QSettings *settings ) - { - parentItem = parent; /* Can be NULL, but only for the rootItem */ - i_id = _i_id; /* Playlist item specific id */ -@@ -56,7 +56,6 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL - model = m; /* PLModel (QAbsmodel) */ - i_type = -1; /* Item type - Avoid segfault */ - b_current = false; /* Is the item the current Item or not */ -- b_is_node = _is_node; - - assert( model ); /* We need a model */ - -@@ -92,21 +91,19 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL - Call the above function init - So far the first constructor isn't used... - */ --PLItem::PLItem( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m ) -+PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m ) - { -- init( _i_id, _i_input_id, _is_node, parent, m, NULL ); -+ init( _i_id, _i_input_id, parent, m, NULL ); - } - - PLItem::PLItem( playlist_item_t * p_item, PLItem *parent, PLModel *m ) - { -- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1, -- parent, m, NULL ); -+ init( p_item->i_id, p_item->p_input->i_id, parent, m, NULL ); - } - - PLItem::PLItem( playlist_item_t * p_item, QSettings *settings, PLModel *m ) - { -- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1, -- NULL, m, settings ); -+ init( p_item->i_id, p_item->p_input->i_id, NULL, m, settings ); - } - - PLItem::~PLItem() -@@ -177,7 +174,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent ) - /* Useful for the model */ - i_type = p_item->p_input->i_type; - b_current = iscurrent; -- b_is_node = p_item->i_children > -1; - - item_col_strings.clear(); - -diff --git a/modules/gui/qt4/components/playlist/playlist_item.hpp b/modules/gui/qt4/components/playlist/playlist_item.hpp -index c9d186b..26ce13c 100644 ---- a/modules/gui/qt4/components/playlist/playlist_item.hpp -+++ b/modules/gui/qt4/components/playlist/playlist_item.hpp -@@ -40,7 +40,7 @@ class PLItem - { - friend class PLModel; - public: -- PLItem( int, int, bool, PLItem *parent , PLModel * ); -+ PLItem( int, int, PLItem *parent , PLModel * ); - PLItem( playlist_item_t *, PLItem *parent, PLModel * ); - PLItem( playlist_item_t *, QSettings *, PLModel * ); - ~PLItem(); -@@ -72,10 +72,9 @@ protected: - int i_id; - int i_input_id; - int i_showflags; -- bool b_is_node; - - private: -- void init( int, int, bool, PLItem *, PLModel *, QSettings * ); -+ void init( int, int, PLItem *, PLModel *, QSettings * ); - void updateColumnHeaders(); - PLItem *parentItem; - PLModel *model; -diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp -index 9a28d42..add3ddc 100644 ---- a/modules/gui/qt4/components/playlist/playlist_model.cpp -+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp -@@ -119,12 +119,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const - { - Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index ); - if( index.isValid() ) -- { -- PLItem *item = static_cast<PLItem*>( index.internalPointer() ); -- if ( item->b_is_node ) -- defaultFlags |= Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; -- else defaultFlags |= Qt::ItemIsDragEnabled; -- } -+ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags; - else if ( rootItem->i_id != p_playlist->p_root_onelevel->i_id - && rootItem->i_id != p_playlist->p_root_category->i_id ) - defaultFlags |= Qt::ItemIsDropEnabled; -diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp -index c9e5550..ca421c6 100644 ---- a/modules/gui/qt4/components/playlist/standardpanel.cpp -+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp -@@ -87,15 +87,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, - view->header()->resizeSection( 0, 200 ); - view->header()->resizeSection( 1, 80 ); - } -+ view->header()->setSortIndicatorShown( true ); - view->header()->setClickable( true ); - view->header()->setContextMenuPolicy( Qt::CustomContextMenu ); - getSettings()->endGroup(); - -- /* Set sorting enable by hand, so it doesn't run sort on start */ -- view->header()->setSortIndicator( -1, Qt::AscendingOrder ); -- view->header()->setSortIndicatorShown( true ); -- CONNECT( view->header(), sortIndicatorChanged( int, Qt::SortOrder ), -- view, sortByColumn( int ) ); - /* Connections for the TreeView */ - CONNECT( view, activated( const QModelIndex& ) , - model,activateItem( const QModelIndex& ) ); -diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp -index 0c4da89..c39bb2f 100644 ---- a/modules/gui/qt4/dialogs_provider.cpp -+++ b/modules/gui/qt4/dialogs_provider.cpp -@@ -532,7 +532,7 @@ void DialogsProvider::saveAPlaylist() - char filter[24]; - char module[12]; - } types[] = { -- { N_("XSPF playlist (*.xpsf)"), "export-xspf", }, -+ { N_("XSPF playlist (*.xspf)"), "export-xspf", }, - { N_("M3U playlist (*.m3u)"), "export-m3u", }, - { N_("HTML playlist (*.html)"), "export-html", }, - }; -diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp -index d352fae..c9af6ef 100644 ---- a/modules/gui/qt4/main_interface.hpp -+++ b/modules/gui/qt4/main_interface.hpp -@@ -180,7 +180,7 @@ private slots: - void showCryptedLabel( bool ); - signals: - void askGetVideo( WId *p_id, vout_thread_t *, int *pi_x, int *pi_y, -- unsigned int *pi_width, unsigned int *pi_height ); -+ unsigned *pi_width, unsigned *pi_height ); - void askReleaseVideo( ); - void askVideoToResize( unsigned int, unsigned int ); - void askUpdate(); -diff --git a/modules/stream_filter/rar.c b/modules/stream_filter/rar.c -index a5fd829..f828058 100644 ---- a/modules/stream_filter/rar.c -+++ b/modules/stream_filter/rar.c -@@ -525,7 +525,7 @@ static int SkipFile( stream_t *s,const rar_block_t *p_hdr ) - rar_file_chunk_t *p_chunk = malloc( sizeof( *p_chunk ) ); - if( p_chunk ) - { -- p_chunk->i_offset = stream_Tell( s->p_source ); -+ p_chunk->i_offset = stream_Tell( s->p_source ) + p_hdr->i_size; - p_chunk->i_size = p_hdr->i_add_size; - p_chunk->i_cummulated_size = 0; - if( p_current->i_chunk > 0 ) -diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c -index e6c79cd..f2074e5 100644 ---- a/modules/video_filter/canvas.c -+++ b/modules/video_filter/canvas.c -@@ -102,6 +102,7 @@ static int alloc_init( filter_t *, void * ); - * Module descriptor - *****************************************************************************/ - vlc_module_begin () -+ set_shortname( N_("Canvas") ) - set_description( N_("Automatically resize and pad a video") ) - set_capability( "video filter2", 0 ) - set_callbacks( Activate, Destroy ) -diff --git a/modules/video_filter/croppadd.c b/modules/video_filter/croppadd.c -index 63b5341..887e6e5 100644 ---- a/modules/video_filter/croppadd.c -+++ b/modules/video_filter/croppadd.c -@@ -76,6 +76,7 @@ static picture_t *Filter( filter_t *, picture_t * ); - * Module descriptor - *****************************************************************************/ - vlc_module_begin () -+ set_shortname( N_("Cropadd") ) - set_description( N_("Video scaling filter") ) - set_capability( "video filter2", 0 ) - set_callbacks( OpenFilter, CloseFilter ) -diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua -index 7544255..3e2688d 100644 ---- a/share/lua/playlist/appletrailers.lua -+++ b/share/lua/playlist/appletrailers.lua -@@ -53,7 +53,7 @@ function parse() - else - extraname = "" - end -- table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path } ) -+ table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime vlc lua edition\"" } ) - end - if string.match( line, "<title>" ) - then -diff --git a/src/misc/update.c b/src/misc/update.c -index a0f4334..d7e6179 100644 ---- a/src/misc/update.c -+++ b/src/misc/update.c -@@ -1081,12 +1081,12 @@ void update_Delete( update_t *p_update ) - - if( p_update->p_check ) - { -- assert( !p_update->p_download ); - vlc_object_kill( p_update->p_check ); - vlc_thread_join( p_update->p_check ); - vlc_object_release( p_update->p_check ); - } -- else if( p_update->p_download ) -+ -+ if( p_update->p_download ) - { - vlc_object_kill( p_update->p_download ); - vlc_thread_join( p_update->p_download ); -@@ -1613,9 +1613,9 @@ static void* update_DownloadReal( vlc_object_t *p_this ) - psz_downloaded = size_str( l_downloaded ); - f_progress = (float)l_downloaded/(float)l_size; - -- if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ), -+ if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s - %.1f%% done" ), - p_update->release.psz_url, psz_downloaded, psz_size, -- f_progress ) != -1 ) -+ f_progress*100 ) != -1 ) - { - dialog_ProgressSet( p_progress, psz_status, f_progress ); - free( psz_status ); -@@ -1735,9 +1735,6 @@ end: - free( p_buffer ); - free( psz_size ); - -- p_udt->p_update->p_download = NULL; -- -- vlc_object_release( p_udt ); - vlc_restorecancel( canc ); - return NULL; - } diff --git a/vlc-1.0-bugfix-20091025.patch b/vlc-1.0-bugfix-20091025.patch new file mode 100644 index 0000000..c0af471 --- /dev/null +++ b/vlc-1.0-bugfix-20091025.patch @@ -0,0 +1,814 @@ +diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c +index 1461302..745da6e 100644 +--- a/modules/access/dvb/access.c ++++ b/modules/access/dvb/access.c +@@ -421,6 +421,8 @@ static int Open( vlc_object_t *p_this ) + else + p_sys->i_read_once = DVB_READ_ONCE_START; + ++ free( p_access->psz_demux ); ++ p_access->psz_demux = strdup( "ts" ); + return VLC_SUCCESS; + } + +diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp +index 895d528..5c38426 100644 +--- a/modules/gui/qt4/components/interface_widgets.cpp ++++ b/modules/gui/qt4/components/interface_widgets.cpp +@@ -506,7 +506,6 @@ void TimeLabel::setCaching( float f_cache ) + { + QString amount; + amount.setNum( (int)(100 * f_cache) ); +- msg_Dbg( p_intf, "New caching: %d", (int)(100*f_cache)); + setText( "Buff: " + amount + "%" ); + } + +diff --git a/src/config/file.c b/src/config/file.c +index 01c0332..e2c92ec 100644 +--- a/src/config/file.c ++++ b/src/config/file.c +@@ -117,6 +117,9 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj ) + } + free( psz_readme ); + } ++ /* Remove the old configuration file so that --reset-config ++ * can work properly. */ ++ unlink( psz_old ); + } + free( psz_old ); + } +diff --git a/src/input/clock.c b/src/input/clock.c +index dc010e5..a26b9c4 100644 +--- a/src/input/clock.c ++++ b/src/input/clock.c +@@ -86,6 +86,19 @@ + * my dice --Meuuh */ + #define CR_MEAN_PTS_GAP (300000) + ++/* Rate (in 1/256) at which we will read faster to try to increase our ++ * internal buffer (if we control the pace of the source). ++ */ ++#define CR_BUFFERING_RATE (48) ++ ++/* Extra internal buffer value (in CLOCK_FREQ) ++ * It is 60s max, remember as it is limited by the size it takes by es_out.c ++ * it can be really large. ++ */ ++//#define CR_BUFFERING_TARGET (60000000) ++/* Due to some problems in es_out, we cannot use a large value yet */ ++#define CR_BUFFERING_TARGET (100000) ++ + /***************************************************************************** + * Structures + *****************************************************************************/ +@@ -123,6 +136,9 @@ static inline clock_point_t clock_point_Create( mtime_t i_stream, mtime_t i_syst + } + + /* */ ++#define INPUT_CLOCK_LATE_COUNT (3) ++ ++/* */ + struct input_clock_t + { + /* */ +@@ -139,10 +155,20 @@ struct input_clock_t + /* Maximal timestamp returned by input_clock_ConvertTS (in system unit) */ + mtime_t i_ts_max; + ++ /* Amount of extra buffering expressed in stream clock */ ++ mtime_t i_buffering_duration; ++ + /* Clock drift */ + mtime_t i_next_drift_update; + average_t drift; + ++ /* Late statistics */ ++ struct ++ { ++ mtime_t pi_value[INPUT_CLOCK_LATE_COUNT]; ++ unsigned i_index; ++ } late; ++ + /* Current modifiers */ + int i_rate; + mtime_t i_pts_delay; +@@ -153,6 +179,8 @@ struct input_clock_t + static mtime_t ClockStreamToSystem( input_clock_t *, mtime_t i_stream ); + static mtime_t ClockSystemToStream( input_clock_t *, mtime_t i_system ); + ++static mtime_t ClockGetTsOffset( input_clock_t * ); ++ + /***************************************************************************** + * input_clock_New: create a new clock + *****************************************************************************/ +@@ -170,9 +198,15 @@ input_clock_t *input_clock_New( int i_rate ) + + cl->i_ts_max = VLC_TS_INVALID; + ++ cl->i_buffering_duration = 0; ++ + cl->i_next_drift_update = VLC_TS_INVALID; + AvgInit( &cl->drift, 10 ); + ++ cl->late.i_index = 0; ++ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) ++ cl->late.pi_value[i] = 0; ++ + cl->i_rate = i_rate; + cl->i_pts_delay = 0; + cl->b_paused = false; +@@ -197,8 +231,9 @@ void input_clock_Delete( input_clock_t *cl ) + * i_ck_stream: date in stream clock + * i_ck_system: date in system clock + *****************************************************************************/ +-void input_clock_Update( input_clock_t *cl, +- vlc_object_t *p_log, bool b_can_pace_control, ++void input_clock_Update( input_clock_t *cl, vlc_object_t *p_log, ++ bool *pb_late, ++ bool b_can_pace_control, bool b_buffering_allowed, + mtime_t i_ck_stream, mtime_t i_ck_system ) + { + bool b_reset_reference = false; +@@ -226,6 +261,8 @@ void input_clock_Update( input_clock_t *cl, + msg_Warn( p_log, "feeding synchro with a new reference point trying to recover from clock gap" ); + b_reset_reference= true; + } ++ ++ /* */ + if( b_reset_reference ) + { + cl->i_next_drift_update = VLC_TS_INVALID; +@@ -237,6 +274,8 @@ void input_clock_Update( input_clock_t *cl, + __MAX( cl->i_ts_max + CR_MEAN_PTS_GAP, i_ck_system ) ); + } + ++ /* Compute the drift between the stream clock and the system clock ++ * when we don't control the source pace */ + if( !b_can_pace_control && cl->i_next_drift_update < i_ck_system ) + { + const mtime_t i_converted = ClockSystemToStream( cl, i_ck_system ); +@@ -245,8 +284,39 @@ void input_clock_Update( input_clock_t *cl, + + cl->i_next_drift_update = i_ck_system + CLOCK_FREQ/5; /* FIXME why that */ + } ++ ++ /* Update the extra buffering value */ ++ if( !b_can_pace_control || b_reset_reference ) ++ { ++ cl->i_buffering_duration = 0; ++ } ++ else if( b_buffering_allowed ) ++ { ++ /* Try to bufferize more than necessary by reading ++ * CR_BUFFERING_RATE/256 faster until we have CR_BUFFERING_TARGET. ++ */ ++ const mtime_t i_duration = __MAX( i_ck_stream - cl->last.i_stream, 0 ); ++ ++ cl->i_buffering_duration += ( i_duration * CR_BUFFERING_RATE + 255 ) / 256; ++ if( cl->i_buffering_duration > CR_BUFFERING_TARGET ) ++ cl->i_buffering_duration = CR_BUFFERING_TARGET; ++ } ++ //fprintf( stderr, "input_clock_Update: %d :: %lld\n", b_buffering_allowed, cl->i_buffering_duration/1000 ); ++ ++ /* */ + cl->last = clock_point_Create( i_ck_stream, i_ck_system ); + ++ /* It does not take the decoder latency into account but it is not really ++ * the goal of the clock here */ ++ const mtime_t i_system_expected = ClockStreamToSystem( cl, i_ck_stream + AvgGet( &cl->drift ) ); ++ const mtime_t i_late = ( i_ck_system - cl->i_pts_delay ) - i_system_expected; ++ *pb_late = i_late > 0; ++ if( i_late > 0 ) ++ { ++ cl->late.pi_value[cl->late.i_index] = i_late; ++ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT; ++ } ++ + vlc_mutex_unlock( &cl->lock ); + } + +@@ -271,13 +341,12 @@ void input_clock_ChangeRate( input_clock_t *cl, int i_rate ) + { + vlc_mutex_lock( &cl->lock ); + +- /* Move the reference point */ + if( cl->b_has_reference ) + { +- cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream ); +- cl->ref = cl->last; ++ /* Move the reference point (as if we were playing at the new rate ++ * from the start */ ++ cl->ref.i_system = cl->last.i_system - (cl->last.i_system - cl->ref.i_system) * i_rate / cl->i_rate; + } +- + cl->i_rate = i_rate; + + vlc_mutex_unlock( &cl->lock ); +@@ -318,7 +387,7 @@ mtime_t input_clock_GetWakeup( input_clock_t *cl ) + + /* Synchronized, we can wait */ + if( cl->b_has_reference ) +- i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream ); ++ i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) - cl->i_buffering_duration ); + + vlc_mutex_unlock( &cl->lock ); + +@@ -332,8 +401,6 @@ int input_clock_ConvertTS( input_clock_t *cl, + int *pi_rate, mtime_t *pi_ts0, mtime_t *pi_ts1, + mtime_t i_ts_bound ) + { +- mtime_t i_pts_delay; +- + assert( pi_ts0 ); + vlc_mutex_lock( &cl->lock ); + +@@ -350,27 +417,30 @@ int input_clock_ConvertTS( input_clock_t *cl, + } + + /* */ ++ const mtime_t i_ts_buffering = cl->i_buffering_duration * cl->i_rate / INPUT_RATE_DEFAULT; ++ const mtime_t i_ts_delay = cl->i_pts_delay + ClockGetTsOffset( cl ); ++ ++ /* */ + if( *pi_ts0 > VLC_TS_INVALID ) + { + *pi_ts0 = ClockStreamToSystem( cl, *pi_ts0 + AvgGet( &cl->drift ) ); + if( *pi_ts0 > cl->i_ts_max ) + cl->i_ts_max = *pi_ts0; +- *pi_ts0 += cl->i_pts_delay; ++ *pi_ts0 += i_ts_delay; + } + + /* XXX we do not ipdate i_ts_max on purpose */ + if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID ) + { + *pi_ts1 = ClockStreamToSystem( cl, *pi_ts1 + AvgGet( &cl->drift ) ) + +- cl->i_pts_delay; ++ i_ts_delay; + } + +- i_pts_delay = cl->i_pts_delay; + vlc_mutex_unlock( &cl->lock ); + + /* Check ts validity */ + if( i_ts_bound != INT64_MAX && +- *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + cl->i_pts_delay + i_ts_bound ) ++ *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + i_ts_delay + i_ts_buffering + i_ts_bound ) + return VLC_EGENERIC; + + return VLC_SUCCESS; +@@ -417,7 +487,7 @@ void input_clock_ChangeSystemOrigin( input_clock_t *cl, mtime_t i_system ) + vlc_mutex_lock( &cl->lock ); + + assert( cl->b_has_reference ); +- const mtime_t i_offset = i_system - cl->ref.i_system; ++ const mtime_t i_offset = i_system - cl->ref.i_system - ClockGetTsOffset( cl ); + + cl->ref.i_system += i_offset; + cl->last.i_system += i_offset; +@@ -431,6 +501,24 @@ void input_clock_SetJitter( input_clock_t *cl, + { + vlc_mutex_lock( &cl->lock ); + ++ /* Update late observations */ ++ const mtime_t i_delay_delta = i_pts_delay - cl->i_pts_delay; ++ mtime_t pi_late[INPUT_CLOCK_LATE_COUNT]; ++ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) ++ pi_late[i] = __MAX( cl->late.pi_value[(cl->late.i_index + 1 + i)%INPUT_CLOCK_LATE_COUNT] - i_delay_delta, 0 ); ++ ++ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) ++ cl->late.pi_value[i] = 0; ++ cl->late.i_index = 0; ++ ++ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) ++ { ++ if( pi_late[i] <= 0 ) ++ continue; ++ cl->late.pi_value[cl->late.i_index] = pi_late[i]; ++ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT; ++ } ++ + /* TODO always save the value, and when rebuffering use the new one if smaller + * TODO when increasing -> force rebuffering + */ +@@ -447,6 +535,28 @@ void input_clock_SetJitter( input_clock_t *cl, + vlc_mutex_unlock( &cl->lock ); + } + ++mtime_t input_clock_GetJitter( input_clock_t *cl ) ++{ ++ vlc_mutex_lock( &cl->lock ); ++ ++#if INPUT_CLOCK_LATE_COUNT != 3 ++# error "unsupported INPUT_CLOCK_LATE_COUNT" ++#endif ++ /* Find the median of the last late values ++ * It works pretty well at rejecting bad values ++ * ++ * XXX we only increase pts_delay over time, decreasing it is ++ * not that easy if we want to be robust. ++ */ ++ const mtime_t *p = cl->late.pi_value; ++ mtime_t i_late_median = p[0] + p[1] + p[2] - __MIN(__MIN(p[0],p[1]),p[2]) - __MAX(__MAX(p[0],p[1]),p[2]); ++ mtime_t i_pts_delay = cl->i_pts_delay ; ++ ++ vlc_mutex_unlock( &cl->lock ); ++ ++ return i_pts_delay + i_late_median; ++} ++ + /***************************************************************************** + * ClockStreamToSystem: converts a movie clock to system date + *****************************************************************************/ +@@ -471,6 +581,15 @@ static mtime_t ClockSystemToStream( input_clock_t *cl, mtime_t i_system ) + cl->ref.i_stream; + } + ++/** ++ * It returns timestamp display offset due to ref/last modfied on rate changes ++ * It ensures that currently converted dates are not changed. ++ */ ++static mtime_t ClockGetTsOffset( input_clock_t *cl ) ++{ ++ return cl->i_pts_delay * ( cl->i_rate - INPUT_RATE_DEFAULT ) / INPUT_RATE_DEFAULT; ++} ++ + /***************************************************************************** + * Long term average helpers + *****************************************************************************/ +diff --git a/src/input/clock.h b/src/input/clock.h +index 1384793..ff50c82 100644 +--- a/src/input/clock.h ++++ b/src/input/clock.h +@@ -52,9 +52,15 @@ void input_clock_Delete( input_clock_t * ); + + /** + * This function will update a input_clock_t with a new clock reference point. ++ * It will also tell if the clock point is late regarding our buffering. ++ * ++ * \param b_buffering_allowed tells if we are allowed to bufferize more data in ++ * advanced (if possible). + */ + void input_clock_Update( input_clock_t *, vlc_object_t *p_log, +- bool b_can_pace_control, mtime_t i_clock, mtime_t i_system ); ++ bool *pb_late, ++ bool b_can_pace_control, bool b_buffering_allowed, ++ mtime_t i_clock, mtime_t i_system ); + /** + * This function will reset the drift of a input_clock_t. + * +@@ -119,5 +125,11 @@ int input_clock_GetState( input_clock_t *, + void input_clock_SetJitter( input_clock_t *, + mtime_t i_pts_delay, int i_cr_average ); + ++/** ++ * This function returns an estimation of the pts_delay needed to avoid rebufferization. ++ * XXX in the current implementation, the pts_delay will never be decreased. ++ */ ++mtime_t input_clock_GetJitter( input_clock_t * ); ++ + #endif + +diff --git a/src/input/decoder.c b/src/input/decoder.c +index b110a1e..c0e9fb5 100644 +--- a/src/input/decoder.c ++++ b/src/input/decoder.c +@@ -386,7 +386,11 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace ) + if( !p_owner->b_buffering ) + block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX ); + } ++#ifdef __arm__ + else if( block_FifoSize( p_owner->p_fifo ) > 50000000 /* 50 MB */ ) ++#else ++ else if( block_FifoSize( p_owner->p_fifo ) > 400000000 /* 400 MB, ie ~ 50mb/s for 60s */ ) ++#endif + { + /* FIXME: ideally we would check the time amount of data + * in the FIFO instead of its size. */ +@@ -633,6 +637,13 @@ bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_me + return b_changed; + } + ++size_t input_DecoderGetFifoSize( decoder_t *p_dec ) ++{ ++ decoder_owner_sys_t *p_owner = p_dec->p_owner; ++ ++ return block_FifoSize( p_owner->p_fifo ); ++} ++ + /***************************************************************************** + * Internal functions + *****************************************************************************/ +diff --git a/src/input/decoder.h b/src/input/decoder.h +index d47119d..fe99b42 100644 +--- a/src/input/decoder.h ++++ b/src/input/decoder.h +@@ -99,4 +99,9 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration ); + */ + bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta ); + ++/** ++ * This function returns the current size in bytes of the decoder fifo ++ */ ++size_t input_DecoderGetFifoSize( decoder_t *p_dec ); ++ + #endif +diff --git a/src/input/es_out.c b/src/input/es_out.c +index b67aa36..6f12b18 100644 +--- a/src/input/es_out.c ++++ b/src/input/es_out.c +@@ -186,6 +186,7 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da + static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date ); + static void EsOutProgramsChangeRate( es_out_t *out ); + static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced ); ++ + static char *LanguageGetName( const char *psz_code ); + static char *LanguageGetCode( const char *psz_lang ); + static char **LanguageSplit( const char *psz_langs ); +@@ -585,9 +586,7 @@ static void EsOutChangeRate( es_out_t *out, int i_rate ) + es_out_sys_t *p_sys = out->p_sys; + + p_sys->i_rate = i_rate; +- +- if( !p_sys->b_paused ) +- EsOutProgramsChangeRate( out ); ++ EsOutProgramsChangeRate( out ); + } + + static void EsOutChangePosition( es_out_t *out ) +@@ -719,6 +718,32 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da + } + } + } ++ ++static bool EsOutIsExtraBufferingAllowed( es_out_t *out ) ++{ ++ es_out_sys_t *p_sys = out->p_sys; ++ ++ size_t i_size = 0; ++ for( int i = 0; i < p_sys->i_es; i++ ) ++ { ++ es_out_id_t *p_es = p_sys->es[i]; ++ ++ if( p_es->p_dec ) ++ i_size += input_DecoderGetFifoSize( p_es->p_dec ); ++ if( p_es->p_dec_record ) ++ i_size += input_DecoderGetFifoSize( p_es->p_dec_record ); ++ } ++ //fprintf( stderr, "----- EsOutIsExtraBufferingAllowed =% 5d kbytes -- ", i_size / 1024 ); ++ ++ /* TODO maybe we want to be able to tune it ? */ ++#if defined(OPTIMIZE_MEMORY) ++ const size_t i_level_high = 500000; /* 0.5 Mbytes */ ++#else ++ const size_t i_level_high = 10000000; /* 10 Mbytes */ ++#endif ++ return i_size < i_level_high; ++} ++ + static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date ) + { + es_out_sys_t *p_sys = out->p_sys; +@@ -1360,6 +1385,58 @@ static void EsOutProgramUpdateScrambled( es_out_t *p_out, es_out_pgrm_t *p_pgrm + input_SendEventProgramScrambled( p_input, p_pgrm->i_id, b_scrambled ); + } + ++static void EsOutMeta( es_out_t *p_out, const vlc_meta_t *p_meta ) ++{ ++ es_out_sys_t *p_sys = p_out->p_sys; ++ input_thread_t *p_input = p_sys->p_input; ++ ++ input_item_t *p_item = input_GetItem( p_input ); ++ ++ char *psz_title = NULL; ++ char *psz_arturl = input_item_GetArtURL( p_item ); ++ ++ vlc_mutex_lock( &p_item->lock ); ++ ++ if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name ) ++ psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) ); ++ ++ vlc_meta_Merge( p_item->p_meta, p_meta ); ++ ++ if( !psz_arturl || *psz_arturl == '\0' ) ++ { ++ const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL ); ++ if( psz_tmp ) ++ psz_arturl = strdup( psz_tmp ); ++ } ++ vlc_mutex_unlock( &p_item->lock ); ++ ++ if( psz_arturl && *psz_arturl ) ++ { ++ input_item_SetArtURL( p_item, psz_arturl ); ++ ++ if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) ) ++ { ++ /* Don't look for art cover if sout ++ * XXX It can change when sout has meta data support */ ++ if( p_out->b_sout && !p_input->b_preparsing ) ++ input_item_SetArtURL( p_item, "" ); ++ else ++ input_ExtractAttachmentAndCacheArt( p_input ); ++ } ++ } ++ free( psz_arturl ); ++ ++ if( psz_title ) ++ { ++ input_item_SetName( p_item, psz_title ); ++ free( psz_title ); ++ } ++ input_item_SetPreparsed( p_item, true ); ++ ++ input_SendEventMeta( p_input ); ++ /* TODO handle sout meta ? */ ++} ++ + /* EsOutAdd: + * Add an es_out + */ +@@ -2226,6 +2303,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) + int i_group = 0; + int64_t i_pcr; + ++ /* Search program */ + if( i_query == ES_OUT_SET_PCR ) + { + p_pgrm = p_sys->p_pgrm; +@@ -2247,14 +2325,42 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) + return VLC_EGENERIC; + } + +- /* search program +- * TODO do not use mdate() but proper stream acquisition date */ ++ /* TODO do not use mdate() but proper stream acquisition date */ ++ bool b_late; + input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input), +- p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() ); +- /* Check buffering state on master clock update */ +- if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm ) +- EsOutDecodersStopBuffering( out, false ); ++ &b_late, ++ p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, ++ EsOutIsExtraBufferingAllowed( out ), ++ i_pcr, mdate() ); + ++ if( p_pgrm == p_sys->p_pgrm ) ++ { ++ if( p_sys->b_buffering ) ++ { ++ /* Check buffering state on master clock update */ ++ EsOutDecodersStopBuffering( out, false ); ++ } ++ else if( b_late ) ++ { ++ mtime_t i_pts_delay = input_clock_GetJitter( p_pgrm->p_clock ); ++ ++ /* Avoid dangerously high value */ ++ const mtime_t i_pts_delay_max = 30000000; ++ if( i_pts_delay > i_pts_delay_max ) ++ i_pts_delay = __MAX( i_pts_delay_max, p_sys->i_pts_delay ); ++ ++ /* Force a rebufferization when we are too late */ ++ msg_Err( p_sys->p_input, ++ "ES_OUT_SET_(GROUP_)PCR is called too late, increasing pts_delay to %d ms", ++ (int)(i_pts_delay/1000) ); ++ ++ /* It is not really good, as we throw away already buffered data ++ * TODO have a mean to correctly reenter bufferization */ ++ es_out_Control( out, ES_OUT_RESET_PCR ); ++ ++ es_out_Control( out, ES_OUT_SET_JITTER, i_pts_delay, p_sys->i_cr_average ); ++ } ++ } + return VLC_SUCCESS; + } + +@@ -2361,6 +2467,14 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) + return EsOutProgramDel( out, i_group ); + } + ++ case ES_OUT_SET_META: ++ { ++ const vlc_meta_t *p_meta = va_arg( args, const vlc_meta_t * ); ++ ++ EsOutMeta( out, p_meta ); ++ return VLC_SUCCESS; ++ } ++ + case ES_OUT_GET_WAKE_UP: + { + mtime_t *pi_wakeup = (mtime_t*)va_arg( args, mtime_t* ); +diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c +index a48d365..19f4d21 100644 +--- a/src/input/es_out_timeshift.c ++++ b/src/input/es_out_timeshift.c +@@ -599,6 +599,7 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args ) + case ES_OUT_SET_GROUP_EPG: + case ES_OUT_SET_ES_SCRAMBLED_STATE: + case ES_OUT_DEL_GROUP: ++ case ES_OUT_SET_META: + case ES_OUT_SET_ES: + case ES_OUT_RESTART_ES: + case ES_OUT_SET_ES_DEFAULT: +@@ -1315,9 +1316,11 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co + case ES_OUT_RESET_PCR: /* no arg */ + break; + ++ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */ + case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=vlc_meta_t* */ + { +- p_cmd->control.int_meta.i_int = (int)va_arg( args, int ); ++ if( i_query == ES_OUT_SET_GROUP_META ) ++ p_cmd->control.int_meta.i_int = (int)va_arg( args, int ); + vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t * ); + + if( b_copy ) +@@ -1459,6 +1462,9 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) + return es_out_Control( p_out, i_query, p_cmd->control.es_bool.p_es->p_es, + p_cmd->control.es_bool.b_bool ); + ++ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */ ++ return es_out_Control( p_out, i_query, p_cmd->control.int_meta.p_meta ); ++ + /* Modified control */ + case ES_OUT_SET_ES: /* arg1= es_out_id_t* */ + case ES_OUT_RESTART_ES: /* arg1= es_out_id_t* */ +@@ -1488,7 +1494,8 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) + } + static void CmdCleanControl( ts_cmd_t *p_cmd ) + { +- if( p_cmd->control.i_query == ES_OUT_SET_GROUP_META && ++ if( ( p_cmd->control.i_query == ES_OUT_SET_GROUP_META || ++ p_cmd->control.i_query == ES_OUT_SET_META ) && + p_cmd->control.int_meta.p_meta ) + { + vlc_meta_Delete( p_cmd->control.int_meta.p_meta ); +diff --git a/src/input/input.c b/src/input/input.c +index be4eb7b..d003625 100644 +--- a/src/input/input.c ++++ b/src/input/input.c +@@ -763,7 +763,7 @@ static void MainLoop( input_thread_t *p_input ) + * is paused -> this may cause problem with some of them + * The same problem can be seen when seeking while paused */ + b_paused = p_input->p->i_state == PAUSE_S && +- !es_out_GetBuffering( p_input->p->p_es_out ); ++ ( !es_out_GetBuffering( p_input->p->p_es_out ) || p_input->p->input.b_eof ); + + if( !b_paused ) + { +@@ -773,7 +773,7 @@ static void MainLoop( input_thread_t *p_input ) + + i_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); + } +- else if( !p_input->b_eof && !es_out_GetEmpty( p_input->p->p_es_out ) ) ++ else if( !es_out_GetEmpty( p_input->p->p_es_out ) ) + { + msg_Dbg( p_input, "waiting decoder fifos to empty" ); + i_wakeup = mdate() + INPUT_IDLE_SLEEP; +@@ -816,13 +816,9 @@ static void MainLoop( input_thread_t *p_input ) + i_statistic_update = i_current + INT64_C(1000000); + } + +- /* Check if i_wakeup is still valid */ ++ /* Update the wakeup time */ + if( i_wakeup != 0 ) +- { +- mtime_t i_new_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); +- if( !i_new_wakeup ) +- i_wakeup = 0; +- } ++ i_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); + } while( i_current < i_wakeup ); + } + +@@ -1668,9 +1664,8 @@ static bool Control( input_thread_t *p_input, + int64_t i_length; + + /* Emulate it with a SET_POS */ +- demux_Control( p_input->p->input.p_demux, +- DEMUX_GET_LENGTH, &i_length ); +- if( i_length > 0 ) ++ if( !demux_Control( p_input->p->input.p_demux, ++ DEMUX_GET_LENGTH, &i_length ) && i_length > 0 ) + { + double f_pos = (double)i_time / (double)i_length; + i_ret = demux_Control( p_input->p->input.p_demux, +@@ -2430,8 +2425,9 @@ static int InputSourceInit( input_thread_t *p_input, + if( in->p_demux ) + { + /* Get infos from access_demux */ +- demux_Control( in->p_demux, +- DEMUX_GET_PTS_DELAY, &in->i_pts_delay ); ++ int i_ret = demux_Control( in->p_demux, ++ DEMUX_GET_PTS_DELAY, &in->i_pts_delay ); ++ assert( !i_ret ); + in->i_pts_delay = __MAX( 0, __MIN( in->i_pts_delay, INPUT_PTS_DELAY_MAX ) ); + + +@@ -2885,54 +2881,8 @@ static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta ) + *****************************************************************************/ + static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta ) + { +- input_item_t *p_item = p_input->p->p_item; +- +- char *psz_title = NULL; +- char *psz_arturl = input_item_GetArtURL( p_item ); +- +- vlc_mutex_lock( &p_item->lock ); +- +- if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name ) +- psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) ); +- +- vlc_meta_Merge( p_item->p_meta, p_meta ); +- ++ es_out_ControlSetMeta( p_input->p->p_es_out, p_meta ); + vlc_meta_Delete( p_meta ); +- +- if( !psz_arturl || *psz_arturl == '\0' ) +- { +- const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL ); +- if( psz_tmp ) +- psz_arturl = strdup( psz_tmp ); +- } +- vlc_mutex_unlock( &p_item->lock ); +- +- if( psz_arturl && *psz_arturl ) +- { +- input_item_SetArtURL( p_item, psz_arturl ); +- +- if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) ) +- { +- /* Don't look for art cover if sout +- * XXX It can change when sout has meta data support */ +- if( p_input->p->p_sout && !p_input->b_preparsing ) +- input_item_SetArtURL( p_item, "" ); +- else +- input_ExtractAttachmentAndCacheArt( p_input ); +- } +- } +- free( psz_arturl ); +- +- if( psz_title ) +- { +- input_item_SetName( p_item, psz_title ); +- free( psz_title ); +- } +- input_item_SetPreparsed( p_item, true ); +- +- input_SendEventMeta( p_input ); +- +- /** \todo handle sout meta */ + } + + static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment, +diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua +index 238d3eb..9b165e0 100644 +--- a/share/lua/playlist/youtube.lua ++++ b/share/lua/playlist/youtube.lua +@@ -1,7 +1,7 @@ + --[[ + $Id$ + +- Copyright © 2007 the VideoLAN team ++ Copyright © 2007-2009 the VideoLAN team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -74,7 +74,8 @@ function parse() + end + -- OLD: var swfArgs = {hl:'en',BASE_YT_URL:'http://youtube.com/',video_id:'XPJ7d8dq0t8',l:'292',t:'OEgsToPDskLFdOYrrlDm3FQPoQBYaCP1',sk:'0gnr-AE6QZJEZmCMd3lq_AC'}; + -- NEW: var swfArgs = { "BASE_YT_URL": "http://youtube.com", "video_id": "OHVvVmUNBFc", "l": 88, "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA", "tk": "mEL4E7PqHeaZp5OG19NQThHt9mXJU4PbRTOw6lz9osHi4Hixp7RE1w=="}; +- if string.match( line, "swfArgs" ) and string.match( line, "video_id" ) then ++ -- NEWER: 'SWF_ARGS': { [a lot of stuff...], "video_id": "OHVvVmUNBFc", "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA"}; ++ if ( string.match( line, "SWF_ARGS" ) or string.match( line, "swfArgs" ) ) and string.match( line, "video_id" ) then + if string.match( line, "BASE_YT_URL" ) then + _,_,base_yt_url = string.find( line, "\"BASE_YT_URL\": \"(.-)\"" ) + end +diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h +index 043e557..fdde1c9 100644 +--- a/include/vlc_es_out.h ++++ b/include/vlc_es_out.h +@@ -90,6 +90,9 @@ enum es_out_query_e + * XXX You SHALL call ES_OUT_RESET_PCR before any other es_out_Control/Send calls. */ + ES_OUT_GET_EMPTY, /* arg1=bool* res=cannot fail */ + ++ /* Set global meta data (The vlc_meta_t is not modified nor released) */ ++ ES_OUT_SET_META, /* arg1=const vlc_meta_t * */ ++ + /* First value usable for private control */ + ES_OUT_PRIVATE_START = 0x10000, + }; +@@ -145,6 +148,11 @@ static inline void es_out_Delete( es_out_t *p_out ) + p_out->pf_destroy( p_out ); + } + ++static inline int es_out_ControlSetMeta( es_out_t *out, const vlc_meta_t *p_meta ) ++{ ++ return es_out_Control( out, ES_OUT_SET_META, p_meta ); ++} ++ + /** + * @} + */ diff --git a/vlc.spec b/vlc.spec index 7a4689e..5fbb92c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,14 +1,14 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) #global live555_date 2009.07.28 -#global vlc_rc -rc4 +%global vlc_rc -rc %global vlc_bootstrap 1 Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 1.0.2 -Release: 2%{?dist} +Version: 1.0.3 +Release: 0.1_rc%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,7 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-20091016.patch +Patch5: vlc-1.0-bugfix-20091025.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -217,16 +217,6 @@ Requires: vlc-core%{_isa} = %{version}-%{release} JACK audio plugin for the VLC media player. -%{?_with_dc1394: -%package plugin-dc1394 -Summary: VLC Media Player Plugins for dc1394 -Group: Applications/Multimedia -Requires: %{name}-core%{_isa} = %{version} - -%description plugin-dc1394 -VLC plugin for libdc1394 -} - %prep %setup -q -n %{name}-%{version}%{?vlc_rc} %if 0%{?live555_date:1} @@ -244,7 +234,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h %if 0%{?vlc_bootstrap:1} -rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 +rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap %endif @@ -502,9 +492,6 @@ fi || : %exclude %{_libdir}/vlc/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so -%{?_with_dc1394: -%exclude %{_libdir}/vlc/access/libdc1394_plugin.so -} %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* @@ -524,12 +511,6 @@ fi || : %{_libdir}/vlc/video_output/libsvgalib_plugin.so %endif -%{?_with_dc1394: -%files plugin-dc1394 -%defattr(-,root,root,-) -%{_libdir}/vlc/access/libdc1394_plugin.so -} - %files devel %defattr(-,root,root,-) %doc HACKING @@ -549,6 +530,9 @@ fi || : %changelog +* Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.1_rc +- Update to 1.0.3-rc + * Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 - Update to 1.0-bugfix 20091016 - Rebuild for x264/ffmpeg From a0f96d1dcd5d7b6fa05d24b9b4e5c5bb72749dcb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Oct 2009 16:55:51 +0000 Subject: [PATCH 086/671] Fix for faac and other comments --- vlc.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 5fbb92c..79888aa 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ BuildRequires: cdparanoia-devel BuildRequires: dbus-devel BuildRequires: dirac-devel >= 1.0.0 %{!?_without_directfb:BuildRequires: directfb-devel} -BuildRequires: faac-devel +%{?_with_faac:BuildRequires: faac-devel} BuildRequires: faad2-devel BuildRequires: ffmpeg-devel >= 0.4.9-0 BuildRequires: flac-devel @@ -264,7 +264,6 @@ popd %if 0%{?live555_date:1} --with-live555-tree=live \ %endif -%{?_with_dc1394:--enable-dc1394} \ --enable-dv \ --enable-opencv \ --enable-pvr \ @@ -273,6 +272,7 @@ popd --enable-wma-fixed \ --enable-shine \ --enable-faad \ +%{!?_with_faac:--disable-faac} \ --enable-twolame \ --enable-real \ --enable-realrtsp \ @@ -532,6 +532,8 @@ fi || : %changelog * Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.1_rc - Update to 1.0.3-rc +- Update bugfix to 20091025 +- Clean dc1394 sub-package * Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 - Update to 1.0-bugfix 20091016 From 36b195dcd821a0636e59fafac0eca874b1c30f78 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Oct 2009 22:10:08 +0000 Subject: [PATCH 087/671] Rebuild for x264 --- vlc.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 79888aa..6999dd2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.3 -Release: 0.1_rc%{?dist} +Release: 0.2_rc%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -96,6 +96,7 @@ BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel +BuildRequires: libshout-devel BuildRequires: lua-devel BuildRequires: minizip-devel BuildRequires: mpeg2dec-devel >= 0.3.2 @@ -283,6 +284,7 @@ popd --enable-theora \ --enable-dirac \ --enable-libass \ + --enable-shout \ --enable-xcb \ --enable-svg \ --enable-snapshot \ @@ -530,6 +532,9 @@ fi || : %changelog +* Tue Oct 27 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.2_rc +- Rebuild for x264 + * Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.1_rc - Update to 1.0.3-rc - Update bugfix to 20091025 From 7008e2b49ca95c669dfd7da79ac67b8e8523512c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 31 Oct 2009 09:19:22 +0000 Subject: [PATCH 088/671] Update to 1.0.3 --- sources | 2 +- vlc-1.0-bugfix-20091025.patch | 814 ---------------------------------- vlc.spec | 12 +- 3 files changed, 6 insertions(+), 822 deletions(-) delete mode 100644 vlc-1.0-bugfix-20091025.patch diff --git a/sources b/sources index c1d976f..178303c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a83fc8d8a4bc804b27da6bd60b091967 vlc-1.0.3-rc.tar.bz2 +d0945c2489551c102a3f0f15e4591555 vlc-1.0.3.tar.bz2 diff --git a/vlc-1.0-bugfix-20091025.patch b/vlc-1.0-bugfix-20091025.patch deleted file mode 100644 index c0af471..0000000 --- a/vlc-1.0-bugfix-20091025.patch +++ /dev/null @@ -1,814 +0,0 @@ -diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c -index 1461302..745da6e 100644 ---- a/modules/access/dvb/access.c -+++ b/modules/access/dvb/access.c -@@ -421,6 +421,8 @@ static int Open( vlc_object_t *p_this ) - else - p_sys->i_read_once = DVB_READ_ONCE_START; - -+ free( p_access->psz_demux ); -+ p_access->psz_demux = strdup( "ts" ); - return VLC_SUCCESS; - } - -diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp -index 895d528..5c38426 100644 ---- a/modules/gui/qt4/components/interface_widgets.cpp -+++ b/modules/gui/qt4/components/interface_widgets.cpp -@@ -506,7 +506,6 @@ void TimeLabel::setCaching( float f_cache ) - { - QString amount; - amount.setNum( (int)(100 * f_cache) ); -- msg_Dbg( p_intf, "New caching: %d", (int)(100*f_cache)); - setText( "Buff: " + amount + "%" ); - } - -diff --git a/src/config/file.c b/src/config/file.c -index 01c0332..e2c92ec 100644 ---- a/src/config/file.c -+++ b/src/config/file.c -@@ -117,6 +117,9 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj ) - } - free( psz_readme ); - } -+ /* Remove the old configuration file so that --reset-config -+ * can work properly. */ -+ unlink( psz_old ); - } - free( psz_old ); - } -diff --git a/src/input/clock.c b/src/input/clock.c -index dc010e5..a26b9c4 100644 ---- a/src/input/clock.c -+++ b/src/input/clock.c -@@ -86,6 +86,19 @@ - * my dice --Meuuh */ - #define CR_MEAN_PTS_GAP (300000) - -+/* Rate (in 1/256) at which we will read faster to try to increase our -+ * internal buffer (if we control the pace of the source). -+ */ -+#define CR_BUFFERING_RATE (48) -+ -+/* Extra internal buffer value (in CLOCK_FREQ) -+ * It is 60s max, remember as it is limited by the size it takes by es_out.c -+ * it can be really large. -+ */ -+//#define CR_BUFFERING_TARGET (60000000) -+/* Due to some problems in es_out, we cannot use a large value yet */ -+#define CR_BUFFERING_TARGET (100000) -+ - /***************************************************************************** - * Structures - *****************************************************************************/ -@@ -123,6 +136,9 @@ static inline clock_point_t clock_point_Create( mtime_t i_stream, mtime_t i_syst - } - - /* */ -+#define INPUT_CLOCK_LATE_COUNT (3) -+ -+/* */ - struct input_clock_t - { - /* */ -@@ -139,10 +155,20 @@ struct input_clock_t - /* Maximal timestamp returned by input_clock_ConvertTS (in system unit) */ - mtime_t i_ts_max; - -+ /* Amount of extra buffering expressed in stream clock */ -+ mtime_t i_buffering_duration; -+ - /* Clock drift */ - mtime_t i_next_drift_update; - average_t drift; - -+ /* Late statistics */ -+ struct -+ { -+ mtime_t pi_value[INPUT_CLOCK_LATE_COUNT]; -+ unsigned i_index; -+ } late; -+ - /* Current modifiers */ - int i_rate; - mtime_t i_pts_delay; -@@ -153,6 +179,8 @@ struct input_clock_t - static mtime_t ClockStreamToSystem( input_clock_t *, mtime_t i_stream ); - static mtime_t ClockSystemToStream( input_clock_t *, mtime_t i_system ); - -+static mtime_t ClockGetTsOffset( input_clock_t * ); -+ - /***************************************************************************** - * input_clock_New: create a new clock - *****************************************************************************/ -@@ -170,9 +198,15 @@ input_clock_t *input_clock_New( int i_rate ) - - cl->i_ts_max = VLC_TS_INVALID; - -+ cl->i_buffering_duration = 0; -+ - cl->i_next_drift_update = VLC_TS_INVALID; - AvgInit( &cl->drift, 10 ); - -+ cl->late.i_index = 0; -+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) -+ cl->late.pi_value[i] = 0; -+ - cl->i_rate = i_rate; - cl->i_pts_delay = 0; - cl->b_paused = false; -@@ -197,8 +231,9 @@ void input_clock_Delete( input_clock_t *cl ) - * i_ck_stream: date in stream clock - * i_ck_system: date in system clock - *****************************************************************************/ --void input_clock_Update( input_clock_t *cl, -- vlc_object_t *p_log, bool b_can_pace_control, -+void input_clock_Update( input_clock_t *cl, vlc_object_t *p_log, -+ bool *pb_late, -+ bool b_can_pace_control, bool b_buffering_allowed, - mtime_t i_ck_stream, mtime_t i_ck_system ) - { - bool b_reset_reference = false; -@@ -226,6 +261,8 @@ void input_clock_Update( input_clock_t *cl, - msg_Warn( p_log, "feeding synchro with a new reference point trying to recover from clock gap" ); - b_reset_reference= true; - } -+ -+ /* */ - if( b_reset_reference ) - { - cl->i_next_drift_update = VLC_TS_INVALID; -@@ -237,6 +274,8 @@ void input_clock_Update( input_clock_t *cl, - __MAX( cl->i_ts_max + CR_MEAN_PTS_GAP, i_ck_system ) ); - } - -+ /* Compute the drift between the stream clock and the system clock -+ * when we don't control the source pace */ - if( !b_can_pace_control && cl->i_next_drift_update < i_ck_system ) - { - const mtime_t i_converted = ClockSystemToStream( cl, i_ck_system ); -@@ -245,8 +284,39 @@ void input_clock_Update( input_clock_t *cl, - - cl->i_next_drift_update = i_ck_system + CLOCK_FREQ/5; /* FIXME why that */ - } -+ -+ /* Update the extra buffering value */ -+ if( !b_can_pace_control || b_reset_reference ) -+ { -+ cl->i_buffering_duration = 0; -+ } -+ else if( b_buffering_allowed ) -+ { -+ /* Try to bufferize more than necessary by reading -+ * CR_BUFFERING_RATE/256 faster until we have CR_BUFFERING_TARGET. -+ */ -+ const mtime_t i_duration = __MAX( i_ck_stream - cl->last.i_stream, 0 ); -+ -+ cl->i_buffering_duration += ( i_duration * CR_BUFFERING_RATE + 255 ) / 256; -+ if( cl->i_buffering_duration > CR_BUFFERING_TARGET ) -+ cl->i_buffering_duration = CR_BUFFERING_TARGET; -+ } -+ //fprintf( stderr, "input_clock_Update: %d :: %lld\n", b_buffering_allowed, cl->i_buffering_duration/1000 ); -+ -+ /* */ - cl->last = clock_point_Create( i_ck_stream, i_ck_system ); - -+ /* It does not take the decoder latency into account but it is not really -+ * the goal of the clock here */ -+ const mtime_t i_system_expected = ClockStreamToSystem( cl, i_ck_stream + AvgGet( &cl->drift ) ); -+ const mtime_t i_late = ( i_ck_system - cl->i_pts_delay ) - i_system_expected; -+ *pb_late = i_late > 0; -+ if( i_late > 0 ) -+ { -+ cl->late.pi_value[cl->late.i_index] = i_late; -+ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT; -+ } -+ - vlc_mutex_unlock( &cl->lock ); - } - -@@ -271,13 +341,12 @@ void input_clock_ChangeRate( input_clock_t *cl, int i_rate ) - { - vlc_mutex_lock( &cl->lock ); - -- /* Move the reference point */ - if( cl->b_has_reference ) - { -- cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream ); -- cl->ref = cl->last; -+ /* Move the reference point (as if we were playing at the new rate -+ * from the start */ -+ cl->ref.i_system = cl->last.i_system - (cl->last.i_system - cl->ref.i_system) * i_rate / cl->i_rate; - } -- - cl->i_rate = i_rate; - - vlc_mutex_unlock( &cl->lock ); -@@ -318,7 +387,7 @@ mtime_t input_clock_GetWakeup( input_clock_t *cl ) - - /* Synchronized, we can wait */ - if( cl->b_has_reference ) -- i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream ); -+ i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) - cl->i_buffering_duration ); - - vlc_mutex_unlock( &cl->lock ); - -@@ -332,8 +401,6 @@ int input_clock_ConvertTS( input_clock_t *cl, - int *pi_rate, mtime_t *pi_ts0, mtime_t *pi_ts1, - mtime_t i_ts_bound ) - { -- mtime_t i_pts_delay; -- - assert( pi_ts0 ); - vlc_mutex_lock( &cl->lock ); - -@@ -350,27 +417,30 @@ int input_clock_ConvertTS( input_clock_t *cl, - } - - /* */ -+ const mtime_t i_ts_buffering = cl->i_buffering_duration * cl->i_rate / INPUT_RATE_DEFAULT; -+ const mtime_t i_ts_delay = cl->i_pts_delay + ClockGetTsOffset( cl ); -+ -+ /* */ - if( *pi_ts0 > VLC_TS_INVALID ) - { - *pi_ts0 = ClockStreamToSystem( cl, *pi_ts0 + AvgGet( &cl->drift ) ); - if( *pi_ts0 > cl->i_ts_max ) - cl->i_ts_max = *pi_ts0; -- *pi_ts0 += cl->i_pts_delay; -+ *pi_ts0 += i_ts_delay; - } - - /* XXX we do not ipdate i_ts_max on purpose */ - if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID ) - { - *pi_ts1 = ClockStreamToSystem( cl, *pi_ts1 + AvgGet( &cl->drift ) ) + -- cl->i_pts_delay; -+ i_ts_delay; - } - -- i_pts_delay = cl->i_pts_delay; - vlc_mutex_unlock( &cl->lock ); - - /* Check ts validity */ - if( i_ts_bound != INT64_MAX && -- *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + cl->i_pts_delay + i_ts_bound ) -+ *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + i_ts_delay + i_ts_buffering + i_ts_bound ) - return VLC_EGENERIC; - - return VLC_SUCCESS; -@@ -417,7 +487,7 @@ void input_clock_ChangeSystemOrigin( input_clock_t *cl, mtime_t i_system ) - vlc_mutex_lock( &cl->lock ); - - assert( cl->b_has_reference ); -- const mtime_t i_offset = i_system - cl->ref.i_system; -+ const mtime_t i_offset = i_system - cl->ref.i_system - ClockGetTsOffset( cl ); - - cl->ref.i_system += i_offset; - cl->last.i_system += i_offset; -@@ -431,6 +501,24 @@ void input_clock_SetJitter( input_clock_t *cl, - { - vlc_mutex_lock( &cl->lock ); - -+ /* Update late observations */ -+ const mtime_t i_delay_delta = i_pts_delay - cl->i_pts_delay; -+ mtime_t pi_late[INPUT_CLOCK_LATE_COUNT]; -+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) -+ pi_late[i] = __MAX( cl->late.pi_value[(cl->late.i_index + 1 + i)%INPUT_CLOCK_LATE_COUNT] - i_delay_delta, 0 ); -+ -+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) -+ cl->late.pi_value[i] = 0; -+ cl->late.i_index = 0; -+ -+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ ) -+ { -+ if( pi_late[i] <= 0 ) -+ continue; -+ cl->late.pi_value[cl->late.i_index] = pi_late[i]; -+ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT; -+ } -+ - /* TODO always save the value, and when rebuffering use the new one if smaller - * TODO when increasing -> force rebuffering - */ -@@ -447,6 +535,28 @@ void input_clock_SetJitter( input_clock_t *cl, - vlc_mutex_unlock( &cl->lock ); - } - -+mtime_t input_clock_GetJitter( input_clock_t *cl ) -+{ -+ vlc_mutex_lock( &cl->lock ); -+ -+#if INPUT_CLOCK_LATE_COUNT != 3 -+# error "unsupported INPUT_CLOCK_LATE_COUNT" -+#endif -+ /* Find the median of the last late values -+ * It works pretty well at rejecting bad values -+ * -+ * XXX we only increase pts_delay over time, decreasing it is -+ * not that easy if we want to be robust. -+ */ -+ const mtime_t *p = cl->late.pi_value; -+ mtime_t i_late_median = p[0] + p[1] + p[2] - __MIN(__MIN(p[0],p[1]),p[2]) - __MAX(__MAX(p[0],p[1]),p[2]); -+ mtime_t i_pts_delay = cl->i_pts_delay ; -+ -+ vlc_mutex_unlock( &cl->lock ); -+ -+ return i_pts_delay + i_late_median; -+} -+ - /***************************************************************************** - * ClockStreamToSystem: converts a movie clock to system date - *****************************************************************************/ -@@ -471,6 +581,15 @@ static mtime_t ClockSystemToStream( input_clock_t *cl, mtime_t i_system ) - cl->ref.i_stream; - } - -+/** -+ * It returns timestamp display offset due to ref/last modfied on rate changes -+ * It ensures that currently converted dates are not changed. -+ */ -+static mtime_t ClockGetTsOffset( input_clock_t *cl ) -+{ -+ return cl->i_pts_delay * ( cl->i_rate - INPUT_RATE_DEFAULT ) / INPUT_RATE_DEFAULT; -+} -+ - /***************************************************************************** - * Long term average helpers - *****************************************************************************/ -diff --git a/src/input/clock.h b/src/input/clock.h -index 1384793..ff50c82 100644 ---- a/src/input/clock.h -+++ b/src/input/clock.h -@@ -52,9 +52,15 @@ void input_clock_Delete( input_clock_t * ); - - /** - * This function will update a input_clock_t with a new clock reference point. -+ * It will also tell if the clock point is late regarding our buffering. -+ * -+ * \param b_buffering_allowed tells if we are allowed to bufferize more data in -+ * advanced (if possible). - */ - void input_clock_Update( input_clock_t *, vlc_object_t *p_log, -- bool b_can_pace_control, mtime_t i_clock, mtime_t i_system ); -+ bool *pb_late, -+ bool b_can_pace_control, bool b_buffering_allowed, -+ mtime_t i_clock, mtime_t i_system ); - /** - * This function will reset the drift of a input_clock_t. - * -@@ -119,5 +125,11 @@ int input_clock_GetState( input_clock_t *, - void input_clock_SetJitter( input_clock_t *, - mtime_t i_pts_delay, int i_cr_average ); - -+/** -+ * This function returns an estimation of the pts_delay needed to avoid rebufferization. -+ * XXX in the current implementation, the pts_delay will never be decreased. -+ */ -+mtime_t input_clock_GetJitter( input_clock_t * ); -+ - #endif - -diff --git a/src/input/decoder.c b/src/input/decoder.c -index b110a1e..c0e9fb5 100644 ---- a/src/input/decoder.c -+++ b/src/input/decoder.c -@@ -386,7 +386,11 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace ) - if( !p_owner->b_buffering ) - block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX ); - } -+#ifdef __arm__ - else if( block_FifoSize( p_owner->p_fifo ) > 50000000 /* 50 MB */ ) -+#else -+ else if( block_FifoSize( p_owner->p_fifo ) > 400000000 /* 400 MB, ie ~ 50mb/s for 60s */ ) -+#endif - { - /* FIXME: ideally we would check the time amount of data - * in the FIFO instead of its size. */ -@@ -633,6 +637,13 @@ bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_me - return b_changed; - } - -+size_t input_DecoderGetFifoSize( decoder_t *p_dec ) -+{ -+ decoder_owner_sys_t *p_owner = p_dec->p_owner; -+ -+ return block_FifoSize( p_owner->p_fifo ); -+} -+ - /***************************************************************************** - * Internal functions - *****************************************************************************/ -diff --git a/src/input/decoder.h b/src/input/decoder.h -index d47119d..fe99b42 100644 ---- a/src/input/decoder.h -+++ b/src/input/decoder.h -@@ -99,4 +99,9 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration ); - */ - bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta ); - -+/** -+ * This function returns the current size in bytes of the decoder fifo -+ */ -+size_t input_DecoderGetFifoSize( decoder_t *p_dec ); -+ - #endif -diff --git a/src/input/es_out.c b/src/input/es_out.c -index b67aa36..6f12b18 100644 ---- a/src/input/es_out.c -+++ b/src/input/es_out.c -@@ -186,6 +186,7 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da - static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date ); - static void EsOutProgramsChangeRate( es_out_t *out ); - static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced ); -+ - static char *LanguageGetName( const char *psz_code ); - static char *LanguageGetCode( const char *psz_lang ); - static char **LanguageSplit( const char *psz_langs ); -@@ -585,9 +586,7 @@ static void EsOutChangeRate( es_out_t *out, int i_rate ) - es_out_sys_t *p_sys = out->p_sys; - - p_sys->i_rate = i_rate; -- -- if( !p_sys->b_paused ) -- EsOutProgramsChangeRate( out ); -+ EsOutProgramsChangeRate( out ); - } - - static void EsOutChangePosition( es_out_t *out ) -@@ -719,6 +718,32 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da - } - } - } -+ -+static bool EsOutIsExtraBufferingAllowed( es_out_t *out ) -+{ -+ es_out_sys_t *p_sys = out->p_sys; -+ -+ size_t i_size = 0; -+ for( int i = 0; i < p_sys->i_es; i++ ) -+ { -+ es_out_id_t *p_es = p_sys->es[i]; -+ -+ if( p_es->p_dec ) -+ i_size += input_DecoderGetFifoSize( p_es->p_dec ); -+ if( p_es->p_dec_record ) -+ i_size += input_DecoderGetFifoSize( p_es->p_dec_record ); -+ } -+ //fprintf( stderr, "----- EsOutIsExtraBufferingAllowed =% 5d kbytes -- ", i_size / 1024 ); -+ -+ /* TODO maybe we want to be able to tune it ? */ -+#if defined(OPTIMIZE_MEMORY) -+ const size_t i_level_high = 500000; /* 0.5 Mbytes */ -+#else -+ const size_t i_level_high = 10000000; /* 10 Mbytes */ -+#endif -+ return i_size < i_level_high; -+} -+ - static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date ) - { - es_out_sys_t *p_sys = out->p_sys; -@@ -1360,6 +1385,58 @@ static void EsOutProgramUpdateScrambled( es_out_t *p_out, es_out_pgrm_t *p_pgrm - input_SendEventProgramScrambled( p_input, p_pgrm->i_id, b_scrambled ); - } - -+static void EsOutMeta( es_out_t *p_out, const vlc_meta_t *p_meta ) -+{ -+ es_out_sys_t *p_sys = p_out->p_sys; -+ input_thread_t *p_input = p_sys->p_input; -+ -+ input_item_t *p_item = input_GetItem( p_input ); -+ -+ char *psz_title = NULL; -+ char *psz_arturl = input_item_GetArtURL( p_item ); -+ -+ vlc_mutex_lock( &p_item->lock ); -+ -+ if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name ) -+ psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) ); -+ -+ vlc_meta_Merge( p_item->p_meta, p_meta ); -+ -+ if( !psz_arturl || *psz_arturl == '\0' ) -+ { -+ const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL ); -+ if( psz_tmp ) -+ psz_arturl = strdup( psz_tmp ); -+ } -+ vlc_mutex_unlock( &p_item->lock ); -+ -+ if( psz_arturl && *psz_arturl ) -+ { -+ input_item_SetArtURL( p_item, psz_arturl ); -+ -+ if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) ) -+ { -+ /* Don't look for art cover if sout -+ * XXX It can change when sout has meta data support */ -+ if( p_out->b_sout && !p_input->b_preparsing ) -+ input_item_SetArtURL( p_item, "" ); -+ else -+ input_ExtractAttachmentAndCacheArt( p_input ); -+ } -+ } -+ free( psz_arturl ); -+ -+ if( psz_title ) -+ { -+ input_item_SetName( p_item, psz_title ); -+ free( psz_title ); -+ } -+ input_item_SetPreparsed( p_item, true ); -+ -+ input_SendEventMeta( p_input ); -+ /* TODO handle sout meta ? */ -+} -+ - /* EsOutAdd: - * Add an es_out - */ -@@ -2226,6 +2303,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) - int i_group = 0; - int64_t i_pcr; - -+ /* Search program */ - if( i_query == ES_OUT_SET_PCR ) - { - p_pgrm = p_sys->p_pgrm; -@@ -2247,14 +2325,42 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) - return VLC_EGENERIC; - } - -- /* search program -- * TODO do not use mdate() but proper stream acquisition date */ -+ /* TODO do not use mdate() but proper stream acquisition date */ -+ bool b_late; - input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input), -- p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() ); -- /* Check buffering state on master clock update */ -- if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm ) -- EsOutDecodersStopBuffering( out, false ); -+ &b_late, -+ p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, -+ EsOutIsExtraBufferingAllowed( out ), -+ i_pcr, mdate() ); - -+ if( p_pgrm == p_sys->p_pgrm ) -+ { -+ if( p_sys->b_buffering ) -+ { -+ /* Check buffering state on master clock update */ -+ EsOutDecodersStopBuffering( out, false ); -+ } -+ else if( b_late ) -+ { -+ mtime_t i_pts_delay = input_clock_GetJitter( p_pgrm->p_clock ); -+ -+ /* Avoid dangerously high value */ -+ const mtime_t i_pts_delay_max = 30000000; -+ if( i_pts_delay > i_pts_delay_max ) -+ i_pts_delay = __MAX( i_pts_delay_max, p_sys->i_pts_delay ); -+ -+ /* Force a rebufferization when we are too late */ -+ msg_Err( p_sys->p_input, -+ "ES_OUT_SET_(GROUP_)PCR is called too late, increasing pts_delay to %d ms", -+ (int)(i_pts_delay/1000) ); -+ -+ /* It is not really good, as we throw away already buffered data -+ * TODO have a mean to correctly reenter bufferization */ -+ es_out_Control( out, ES_OUT_RESET_PCR ); -+ -+ es_out_Control( out, ES_OUT_SET_JITTER, i_pts_delay, p_sys->i_cr_average ); -+ } -+ } - return VLC_SUCCESS; - } - -@@ -2361,6 +2467,14 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) - return EsOutProgramDel( out, i_group ); - } - -+ case ES_OUT_SET_META: -+ { -+ const vlc_meta_t *p_meta = va_arg( args, const vlc_meta_t * ); -+ -+ EsOutMeta( out, p_meta ); -+ return VLC_SUCCESS; -+ } -+ - case ES_OUT_GET_WAKE_UP: - { - mtime_t *pi_wakeup = (mtime_t*)va_arg( args, mtime_t* ); -diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c -index a48d365..19f4d21 100644 ---- a/src/input/es_out_timeshift.c -+++ b/src/input/es_out_timeshift.c -@@ -599,6 +599,7 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args ) - case ES_OUT_SET_GROUP_EPG: - case ES_OUT_SET_ES_SCRAMBLED_STATE: - case ES_OUT_DEL_GROUP: -+ case ES_OUT_SET_META: - case ES_OUT_SET_ES: - case ES_OUT_RESTART_ES: - case ES_OUT_SET_ES_DEFAULT: -@@ -1315,9 +1316,11 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co - case ES_OUT_RESET_PCR: /* no arg */ - break; - -+ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */ - case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=vlc_meta_t* */ - { -- p_cmd->control.int_meta.i_int = (int)va_arg( args, int ); -+ if( i_query == ES_OUT_SET_GROUP_META ) -+ p_cmd->control.int_meta.i_int = (int)va_arg( args, int ); - vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t * ); - - if( b_copy ) -@@ -1459,6 +1462,9 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) - return es_out_Control( p_out, i_query, p_cmd->control.es_bool.p_es->p_es, - p_cmd->control.es_bool.b_bool ); - -+ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */ -+ return es_out_Control( p_out, i_query, p_cmd->control.int_meta.p_meta ); -+ - /* Modified control */ - case ES_OUT_SET_ES: /* arg1= es_out_id_t* */ - case ES_OUT_RESTART_ES: /* arg1= es_out_id_t* */ -@@ -1488,7 +1494,8 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) - } - static void CmdCleanControl( ts_cmd_t *p_cmd ) - { -- if( p_cmd->control.i_query == ES_OUT_SET_GROUP_META && -+ if( ( p_cmd->control.i_query == ES_OUT_SET_GROUP_META || -+ p_cmd->control.i_query == ES_OUT_SET_META ) && - p_cmd->control.int_meta.p_meta ) - { - vlc_meta_Delete( p_cmd->control.int_meta.p_meta ); -diff --git a/src/input/input.c b/src/input/input.c -index be4eb7b..d003625 100644 ---- a/src/input/input.c -+++ b/src/input/input.c -@@ -763,7 +763,7 @@ static void MainLoop( input_thread_t *p_input ) - * is paused -> this may cause problem with some of them - * The same problem can be seen when seeking while paused */ - b_paused = p_input->p->i_state == PAUSE_S && -- !es_out_GetBuffering( p_input->p->p_es_out ); -+ ( !es_out_GetBuffering( p_input->p->p_es_out ) || p_input->p->input.b_eof ); - - if( !b_paused ) - { -@@ -773,7 +773,7 @@ static void MainLoop( input_thread_t *p_input ) - - i_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); - } -- else if( !p_input->b_eof && !es_out_GetEmpty( p_input->p->p_es_out ) ) -+ else if( !es_out_GetEmpty( p_input->p->p_es_out ) ) - { - msg_Dbg( p_input, "waiting decoder fifos to empty" ); - i_wakeup = mdate() + INPUT_IDLE_SLEEP; -@@ -816,13 +816,9 @@ static void MainLoop( input_thread_t *p_input ) - i_statistic_update = i_current + INT64_C(1000000); - } - -- /* Check if i_wakeup is still valid */ -+ /* Update the wakeup time */ - if( i_wakeup != 0 ) -- { -- mtime_t i_new_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); -- if( !i_new_wakeup ) -- i_wakeup = 0; -- } -+ i_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); - } while( i_current < i_wakeup ); - } - -@@ -1668,9 +1664,8 @@ static bool Control( input_thread_t *p_input, - int64_t i_length; - - /* Emulate it with a SET_POS */ -- demux_Control( p_input->p->input.p_demux, -- DEMUX_GET_LENGTH, &i_length ); -- if( i_length > 0 ) -+ if( !demux_Control( p_input->p->input.p_demux, -+ DEMUX_GET_LENGTH, &i_length ) && i_length > 0 ) - { - double f_pos = (double)i_time / (double)i_length; - i_ret = demux_Control( p_input->p->input.p_demux, -@@ -2430,8 +2425,9 @@ static int InputSourceInit( input_thread_t *p_input, - if( in->p_demux ) - { - /* Get infos from access_demux */ -- demux_Control( in->p_demux, -- DEMUX_GET_PTS_DELAY, &in->i_pts_delay ); -+ int i_ret = demux_Control( in->p_demux, -+ DEMUX_GET_PTS_DELAY, &in->i_pts_delay ); -+ assert( !i_ret ); - in->i_pts_delay = __MAX( 0, __MIN( in->i_pts_delay, INPUT_PTS_DELAY_MAX ) ); - - -@@ -2885,54 +2881,8 @@ static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta ) - *****************************************************************************/ - static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta ) - { -- input_item_t *p_item = p_input->p->p_item; -- -- char *psz_title = NULL; -- char *psz_arturl = input_item_GetArtURL( p_item ); -- -- vlc_mutex_lock( &p_item->lock ); -- -- if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name ) -- psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) ); -- -- vlc_meta_Merge( p_item->p_meta, p_meta ); -- -+ es_out_ControlSetMeta( p_input->p->p_es_out, p_meta ); - vlc_meta_Delete( p_meta ); -- -- if( !psz_arturl || *psz_arturl == '\0' ) -- { -- const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL ); -- if( psz_tmp ) -- psz_arturl = strdup( psz_tmp ); -- } -- vlc_mutex_unlock( &p_item->lock ); -- -- if( psz_arturl && *psz_arturl ) -- { -- input_item_SetArtURL( p_item, psz_arturl ); -- -- if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) ) -- { -- /* Don't look for art cover if sout -- * XXX It can change when sout has meta data support */ -- if( p_input->p->p_sout && !p_input->b_preparsing ) -- input_item_SetArtURL( p_item, "" ); -- else -- input_ExtractAttachmentAndCacheArt( p_input ); -- } -- } -- free( psz_arturl ); -- -- if( psz_title ) -- { -- input_item_SetName( p_item, psz_title ); -- free( psz_title ); -- } -- input_item_SetPreparsed( p_item, true ); -- -- input_SendEventMeta( p_input ); -- -- /** \todo handle sout meta */ - } - - static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment, -diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua -index 238d3eb..9b165e0 100644 ---- a/share/lua/playlist/youtube.lua -+++ b/share/lua/playlist/youtube.lua -@@ -1,7 +1,7 @@ - --[[ - $Id$ - -- Copyright © 2007 the VideoLAN team -+ Copyright © 2007-2009 the VideoLAN team - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -74,7 +74,8 @@ function parse() - end - -- OLD: var swfArgs = {hl:'en',BASE_YT_URL:'http://youtube.com/',video_id:'XPJ7d8dq0t8',l:'292',t:'OEgsToPDskLFdOYrrlDm3FQPoQBYaCP1',sk:'0gnr-AE6QZJEZmCMd3lq_AC'}; - -- NEW: var swfArgs = { "BASE_YT_URL": "http://youtube.com", "video_id": "OHVvVmUNBFc", "l": 88, "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA", "tk": "mEL4E7PqHeaZp5OG19NQThHt9mXJU4PbRTOw6lz9osHi4Hixp7RE1w=="}; -- if string.match( line, "swfArgs" ) and string.match( line, "video_id" ) then -+ -- NEWER: 'SWF_ARGS': { [a lot of stuff...], "video_id": "OHVvVmUNBFc", "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA"}; -+ if ( string.match( line, "SWF_ARGS" ) or string.match( line, "swfArgs" ) ) and string.match( line, "video_id" ) then - if string.match( line, "BASE_YT_URL" ) then - _,_,base_yt_url = string.find( line, "\"BASE_YT_URL\": \"(.-)\"" ) - end -diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h -index 043e557..fdde1c9 100644 ---- a/include/vlc_es_out.h -+++ b/include/vlc_es_out.h -@@ -90,6 +90,9 @@ enum es_out_query_e - * XXX You SHALL call ES_OUT_RESET_PCR before any other es_out_Control/Send calls. */ - ES_OUT_GET_EMPTY, /* arg1=bool* res=cannot fail */ - -+ /* Set global meta data (The vlc_meta_t is not modified nor released) */ -+ ES_OUT_SET_META, /* arg1=const vlc_meta_t * */ -+ - /* First value usable for private control */ - ES_OUT_PRIVATE_START = 0x10000, - }; -@@ -145,6 +148,11 @@ static inline void es_out_Delete( es_out_t *p_out ) - p_out->pf_destroy( p_out ); - } - -+static inline int es_out_ControlSetMeta( es_out_t *out, const vlc_meta_t *p_meta ) -+{ -+ return es_out_Control( out, ES_OUT_SET_META, p_meta ); -+} -+ - /** - * @} - */ diff --git a/vlc.spec b/vlc.spec index 6999dd2..383d52a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,14 +1,14 @@ # TODO: libdc1394(juju), modularization (vlc-plugin-foo) #global live555_date 2009.07.28 -%global vlc_rc -rc +#global vlc_rc -rc %global vlc_bootstrap 1 Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.3 -Release: 0.2_rc%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,7 +22,6 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0-bugfix-20091025.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -230,7 +229,6 @@ JACK audio plugin for the VLC media player. %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .bf rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -532,10 +530,10 @@ fi || : %changelog -* Tue Oct 27 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.2_rc -- Rebuild for x264 +* Sat Oct 31 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.3-1 +- Update to 1.0.3 -* Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.1_rc +* Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3-0.1_rc - Update to 1.0.3-rc - Update bugfix to 20091025 - Clean dc1394 sub-package From a9463476ad8c17642f0593223d5cd5fd8d31d990 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 31 Oct 2009 12:38:15 +0000 Subject: [PATCH 089/671] Clean --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 383d52a..e045ac1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -137,7 +137,7 @@ BuildRequires: xorg-x11-proto-devel %{!?_without_mozilla:BuildRequires: gecko-devel nspr-devel} %{?_without_mozilla:Obsoletes: mozilla-vlc < %{version}-%{release}} -%{?_with_dc1394: BuildRequires: compat-libdc1394-devel compat-libraw1394-devel} + Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} From 51ca3603f62978239e1457a4b4f26c37222e4923 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 15 Dec 2009 19:41:55 +0000 Subject: [PATCH 090/671] - Update to 1.0.4 - Drop patch2 - PulseaAudio is tried first from original sources. --- 0002-Default-aout-for-pulse.patch | 25 ------------------------- sources | 2 +- vlc.spec | 8 +++++--- 3 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 0002-Default-aout-for-pulse.patch diff --git a/0002-Default-aout-for-pulse.patch b/0002-Default-aout-for-pulse.patch deleted file mode 100644 index d217d49..0000000 --- a/0002-Default-aout-for-pulse.patch +++ /dev/null @@ -1,25 +0,0 @@ -From bba9ed13be6a4dade99360583dcc4a9eef62d1f4 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) <kwizart@gmail.com> -Date: Tue, 26 May 2009 23:11:50 +0200 -Subject: [PATCH] Default aout for pulse - ---- - modules/audio_output/pulse.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 86bd6dd..93b2763 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -97,7 +97,7 @@ static void uninit(aout_instance_t *p_aout); - vlc_module_begin () - set_shortname( "Pulse Audio" ) - set_description( N_("Pulseaudio audio output") ) -- set_capability( "audio output", 40 ) -+ set_capability( "audio output", 200 ) - set_category( CAT_AUDIO ) - set_subcategory( SUBCAT_AUDIO_AOUT ) - add_shortcut( "pulseaudio" ) --- -1.6.0.6 - diff --git a/sources b/sources index 178303c..2639ac9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d0945c2489551c102a3f0f15e4591555 vlc-1.0.3.tar.bz2 +3a0db00380b6d5b24dc7eb73e5d8ae51 vlc-1.0.4.tar.bz2 diff --git a/vlc.spec b/vlc.spec index e045ac1..12d3b8a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -7,7 +7,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 1.0.3 +Version: 1.0.4 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -19,7 +19,6 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz Source10: vlc-handlers.schemas Patch0: vlc-trunk-default_font.patch Patch1: 0001-Default-libv4l2-to-true.patch -Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -224,7 +223,6 @@ JACK audio plugin for the VLC media player. %endif %patch0 -p1 -b .default_font %patch1 -p1 -b .istrue -%patch2 -p1 -b .defpa #http://trac.videolan.org/vlc/ticket/1383 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in @@ -530,6 +528,10 @@ fi || : %changelog +* Tue Dec 15 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-1 +- Update to 1.0.4 +- Drop patch2 - PulseaAudio is tried first from original sources. + * Sat Oct 31 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.3-1 - Update to 1.0.3 From 023a35031aba1fcc4cc3f1d497b710f8c7a74f7e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 3 Jan 2010 22:54:05 +0000 Subject: [PATCH 091/671] - Add vlc-1.0.4-xulrunner-192.patch --- vlc-1.0.4-xulrunner-192.patch | 263 ++++++++++++++++++++++++++++++++++ vlc.spec | 7 +- 2 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 vlc-1.0.4-xulrunner-192.patch diff --git a/vlc-1.0.4-xulrunner-192.patch b/vlc-1.0.4-xulrunner-192.patch new file mode 100644 index 0000000..6a275e4 --- /dev/null +++ b/vlc-1.0.4-xulrunner-192.patch @@ -0,0 +1,263 @@ +diff -up vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp.xul192 vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp +--- vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp 2010-01-03 22:19:46.664423003 +0100 +@@ -949,7 +949,7 @@ LibvlcPlaylistNPObject::invoke(int index + void LibvlcPlaylistNPObject::parseOptions(const NPString &nps, + int *i_options, char*** ppsz_options) + { +- if( nps.utf8length ) ++ if( nps.UTF8Length ) + { + char *s = stringValue(nps); + char *val = s; +@@ -961,7 +961,7 @@ void LibvlcPlaylistNPObject::parseOption + { + int nOptions = 0; + +- char *end = val + nps.utf8length; ++ char *end = val + nps.UTF8Length; + while( val < end ) + { + // skip leading blanks +diff -up vlc-1.0.4/projects/mozilla/control/nporuntime.cpp.xul192 vlc-1.0.4/projects/mozilla/control/nporuntime.cpp +--- vlc-1.0.4/projects/mozilla/control/nporuntime.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/control/nporuntime.cpp 2010-01-03 22:29:50.065676926 +0100 +@@ -37,11 +37,11 @@ + + char* RuntimeNPObject::stringValue(const NPString &s) + { +- NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.utf8length+1) * sizeof(*val))); ++ NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.UTF8Length+1) * sizeof(*val))); + if( val ) + { +- strncpy(val, s.utf8characters, s.utf8length); +- val[s.utf8length] = '\0'; ++ strncpy(val, s.UTF8Characters, s.UTF8Length); ++ val[s.UTF8Length] = '\0'; + } + return val; + } +diff -up vlc-1.0.4/projects/mozilla/support/npunix.c.xul192 vlc-1.0.4/projects/mozilla/support/npunix.c +--- vlc-1.0.4/projects/mozilla/support/npunix.c.xul192 2009-12-05 10:03:25.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/support/npunix.c 2010-01-03 23:39:32.273422832 +0100 +@@ -268,8 +268,8 @@ void NPN_ReloadPlugins(NPBool reloadPage + #endif + } + +-#ifdef OJI +-JRIEnv* NPN_GetJavaEnv() ++#ifdef OJI_OLD ++void * NPN_GetJavaEnv() + { + #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); +@@ -278,7 +278,7 @@ JRIEnv* NPN_GetJavaEnv() + #endif + } + +-jref NPN_GetJavaPeer(NPP instance) ++void * NPN_GetJavaPeer(NPP instance) + { + #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, +@@ -627,8 +627,8 @@ void Private_URLNotify(NPP instance, con + void Private_Print(NPP instance, NPPrint* platformPrint); + NPError Private_GetValue(NPP instance, NPPVariable variable, void *r_value); + NPError Private_SetValue(NPP instance, NPPVariable variable, void *r_value); +-#ifdef OJI +-JRIGlobalRef Private_GetJavaClass(void); ++#ifdef OJI_OLD ++void * Private_GetJavaClass(void); + #endif + + /* function implementations */ +@@ -733,13 +733,13 @@ Private_SetValue(NPP instance, NPPVariab + return NPP_SetValue(instance, variable, r_value); + } + +-#ifdef OJI +-JRIGlobalRef ++#ifdef OJI_OLD ++void * + Private_GetJavaClass(void) + { +- jref clazz = NPP_GetJavaClass(); ++ void * clazz = NPP_GetJavaClass(); + if (clazz) { +- JRIEnv* env = NPN_GetJavaEnv(); ++ void * env = NPN_GetJavaEnv(); + return JRI_NewGlobalRef(env, clazz); + } + return NULL; +@@ -846,7 +846,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, + gNetscapeFuncs.memfree = nsTable->memfree; + gNetscapeFuncs.memflush = nsTable->memflush; + gNetscapeFuncs.reloadplugins = nsTable->reloadplugins; +-#ifdef OJI ++#ifdef OJI_OLD + if( minor >= NPVERS_HAS_LIVECONNECT ) + { + gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv; +@@ -969,7 +969,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, + pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); + #endif + } +-#ifdef OJI ++#ifdef OJI_OLD + if( minor >= NPVERS_HAS_LIVECONNECT ) + pluginFuncs->javaClass = Private_GetJavaClass(); + else +diff -up vlc-1.0.4/projects/mozilla/vlcplugin.cpp.xul192 vlc-1.0.4/projects/mozilla/vlcplugin.cpp +--- vlc-1.0.4/projects/mozilla/vlcplugin.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/vlcplugin.cpp 2010-01-03 22:19:46.665420058 +0100 +@@ -36,11 +36,12 @@ + #include "control/npolibvlc.h" + + #include <ctype.h> ++#include <stdlib.h> + + /***************************************************************************** + * VlcPlugin constructor and destructor + *****************************************************************************/ +-VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) : ++VlcPlugin::VlcPlugin( NPP instance, uint16_t mode ) : + i_npmode(mode), + b_stream(0), + b_autoplay(1), +@@ -227,8 +228,8 @@ NPError VlcPlugin::init(int argc, char* + NPString script; + NPVariant result; + +- script.utf8characters = docLocHref; +- script.utf8length = sizeof(docLocHref)-1; ++ script.UTF8Characters = docLocHref; ++ script.UTF8Length = sizeof(docLocHref)-1; + + if( NPN_Evaluate(p_browser, plugin, &script, &result) ) + { +@@ -236,11 +237,11 @@ NPError VlcPlugin::init(int argc, char* + { + NPString &location = NPVARIANT_TO_STRING(result); + +- psz_baseURL = (char *) malloc(location.utf8length+1); ++ psz_baseURL = (char *) malloc(location.UTF8Length+1); + if( psz_baseURL ) + { +- strncpy(psz_baseURL, location.utf8characters, location.utf8length); +- psz_baseURL[location.utf8length] = '\0'; ++ strncpy(psz_baseURL, location.UTF8Characters, location.UTF8Length); ++ psz_baseURL[location.UTF8Length] = '\0'; + } + } + NPN_ReleaseVariantValue(&result); +diff -up vlc-1.0.4/projects/mozilla/vlcplugin.h.xul192 vlc-1.0.4/projects/mozilla/vlcplugin.h +--- vlc-1.0.4/projects/mozilla/vlcplugin.h.xul192 2009-12-07 22:12:58.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/vlcplugin.h 2010-01-03 22:19:46.666424935 +0100 +@@ -82,7 +82,7 @@ typedef enum vlc_toolbar_clicked_e { + class VlcPlugin + { + public: +- VlcPlugin( NPP, uint16 ); ++ VlcPlugin( NPP, uint16_t ); + virtual ~VlcPlugin(); + + NPError init(int argc, char* const argn[], char* const argv[]); +@@ -135,7 +135,7 @@ public: + vlc_toolbar_clicked_t getToolbarButtonClicked( int i_xpos, int i_ypos ); + #endif + +- uint16 i_npmode; /* either NP_EMBED or NP_FULL */ ++ uint16_t i_npmode; /* either NP_EMBED or NP_FULL */ + + /* plugin properties */ + int b_stream; +diff -up vlc-1.0.4/projects/mozilla/vlcshell.cpp.xul192 vlc-1.0.4/projects/mozilla/vlcshell.cpp +--- vlc-1.0.4/projects/mozilla/vlcshell.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/vlcshell.cpp 2010-01-03 22:19:46.666424935 +0100 +@@ -265,7 +265,7 @@ NPError NPP_Initialize( void ) + return NPERR_NO_ERROR; + } + +-jref NPP_GetJavaClass( void ) ++void * NPP_GetJavaClass( void ) + { + return NULL; + } +@@ -275,7 +275,7 @@ void NPP_Shutdown( void ) + ; + } + +-NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ++NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, + char* argn[], char* argv[], NPSavedData* saved ) + { + NPError status; +@@ -579,7 +579,7 @@ NPError NPP_SetWindow( NPP instance, NPW + } + + NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, +- NPBool seekable, uint16 *stype ) ++ NPBool seekable, uint16_t *stype ) + { + if( NULL == instance ) + { +@@ -608,14 +608,14 @@ NPError NPP_NewStream( NPP instance, NPM + return NPERR_GENERIC_ERROR; + } + +-int32 NPP_WriteReady( NPP instance, NPStream *stream ) ++int32_t NPP_WriteReady( NPP instance, NPStream *stream ) + { + /* TODO */ + return 8*1024; + } + +-int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, +- int32 len, void *buffer ) ++int32_t NPP_Write( NPP instance, NPStream *stream, int32_t offset, ++ int32_t len, void *buffer ) + { + /* TODO */ + return len; +diff -up vlc-1.0.4/projects/mozilla/vlcshell.h.xul192 vlc-1.0.4/projects/mozilla/vlcshell.h +--- vlc-1.0.4/projects/mozilla/vlcshell.h.xul192 2009-12-05 10:03:25.000000000 +0100 ++++ vlc-1.0.4/projects/mozilla/vlcshell.h 2010-01-03 22:19:46.667422548 +0100 +@@ -27,10 +27,10 @@ + char * NPP_GetMIMEDescription( void ); + + NPError NPP_Initialize( void ); +-jref NPP_GetJavaClass( void ); ++void * NPP_GetJavaClass( void ); + void NPP_Shutdown( void ); + +-NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ++NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, + char* argn[], char* argv[], NPSavedData* saved ); + NPError NPP_Destroy( NPP instance, NPSavedData** save ); + +@@ -40,20 +40,20 @@ NPError NPP_SetValue( NPP instance, NPNV + NPError NPP_SetWindow( NPP instance, NPWindow* window ); + + NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, +- NPBool seekable, uint16 *stype ); ++ NPBool seekable, uint16_t *stype ); + NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason ); + void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname ); + +-int32 NPP_WriteReady( NPP instance, NPStream *stream ); +-int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, +- int32 len, void *buffer ); ++int32_t NPP_WriteReady( NPP instance, NPStream *stream ); ++int32_t NPP_Write( NPP instance, NPStream *stream, int32_t offset, ++ int32_t len, void *buffer ); + + void NPP_URLNotify( NPP instance, const char* url, + NPReason reason, void* notifyData ); + void NPP_Print( NPP instance, NPPrint* printInfo ); + + #ifdef XP_MACOSX +-int16 NPP_HandleEvent( NPP instance, void * event ); ++int16_t NPP_HandleEvent( NPP instance, void * event ); + #endif + + #endif diff --git a/vlc.spec b/vlc.spec index 12d3b8a..e7644a3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -21,6 +21,7 @@ Patch0: vlc-trunk-default_font.patch Patch1: 0001-Default-libv4l2-to-true.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0.4-xulrunner-192.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -227,6 +228,7 @@ JACK audio plugin for the VLC media player. %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%patch5 -p1 -b .xul192 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -528,6 +530,9 @@ fi || : %changelog +* Sun Jan 3 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-2 +- Add vlc-1.0.4-xulrunner-192.patch + * Tue Dec 15 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-1 - Update to 1.0.4 - Drop patch2 - PulseaAudio is tried first from original sources. From fdbf7491bf0b32c3f80f7465be65aefd462ffe33 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 26 Jan 2010 15:37:55 +0000 Subject: [PATCH 092/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e7644a3..2446e11 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -530,6 +530,9 @@ fi || : %changelog +* Tue Jan 26 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-3 +- Rebuild + * Sun Jan 3 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-2 - Add vlc-1.0.4-xulrunner-192.patch From a0baf734834b9bc7fa7dd79a9846397d0f26d851 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 28 Jan 2010 20:22:39 +0000 Subject: [PATCH 093/671] - Update to 1.0.5 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index c50428f..8055d9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.0.3-rc.tar.bz2 +vlc-1.0.5.tar.bz2 diff --git a/sources b/sources index 2639ac9..263009c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3a0db00380b6d5b24dc7eb73e5d8ae51 vlc-1.0.4.tar.bz2 +d3d99e489ba1ae996af7e1065c0ef313 vlc-1.0.5.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 2446e11..6f0ba3f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -7,8 +7,8 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc -Version: 1.0.4 -Release: 3%{?dist} +Version: 1.0.5 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -41,7 +41,6 @@ BuildRequires: cdparanoia-devel BuildRequires: dbus-devel BuildRequires: dirac-devel >= 1.0.0 %{!?_without_directfb:BuildRequires: directfb-devel} -%{?_with_faac:BuildRequires: faac-devel} BuildRequires: faad2-devel BuildRequires: ffmpeg-devel >= 0.4.9-0 BuildRequires: flac-devel @@ -271,7 +270,6 @@ popd --enable-wma-fixed \ --enable-shine \ --enable-faad \ -%{!?_with_faac:--disable-faac} \ --enable-twolame \ --enable-real \ --enable-realrtsp \ @@ -530,6 +528,9 @@ fi || : %changelog +* Thu Jan 28 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.5-1 +- Update to 1.0.5 + * Tue Jan 26 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.4-3 - Rebuild From c0a1fe4c47f7685855090d77dcc1ab12e2caf9fd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 27 Feb 2010 18:20:15 +0000 Subject: [PATCH 094/671] Add br libtiger --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6f0ba3f..3e6a708 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -77,6 +77,7 @@ BuildRequires: libshout-devel BuildRequires: libsmbclient-devel BuildRequires: libtar-devel BuildRequires: libtheora-devel +BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: libupnp-devel %if 0%{?fedora} > 8 @@ -528,6 +529,9 @@ fi || : %changelog +* Sat Feb 27 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.5-2 +- Add BR libtiger-devel + * Thu Jan 28 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.5-1 - Update to 1.0.5 From 1fec7a8640c45aca2758f4b563a8c37b4fef9176 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Apr 2010 09:36:51 +0000 Subject: [PATCH 095/671] Clean xulrunner --- vlc-1.0.4-xulrunner-192.patch | 263 ---------------------------------- 1 file changed, 263 deletions(-) delete mode 100644 vlc-1.0.4-xulrunner-192.patch diff --git a/vlc-1.0.4-xulrunner-192.patch b/vlc-1.0.4-xulrunner-192.patch deleted file mode 100644 index 6a275e4..0000000 --- a/vlc-1.0.4-xulrunner-192.patch +++ /dev/null @@ -1,263 +0,0 @@ -diff -up vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp.xul192 vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp ---- vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/control/npolibvlc.cpp 2010-01-03 22:19:46.664423003 +0100 -@@ -949,7 +949,7 @@ LibvlcPlaylistNPObject::invoke(int index - void LibvlcPlaylistNPObject::parseOptions(const NPString &nps, - int *i_options, char*** ppsz_options) - { -- if( nps.utf8length ) -+ if( nps.UTF8Length ) - { - char *s = stringValue(nps); - char *val = s; -@@ -961,7 +961,7 @@ void LibvlcPlaylistNPObject::parseOption - { - int nOptions = 0; - -- char *end = val + nps.utf8length; -+ char *end = val + nps.UTF8Length; - while( val < end ) - { - // skip leading blanks -diff -up vlc-1.0.4/projects/mozilla/control/nporuntime.cpp.xul192 vlc-1.0.4/projects/mozilla/control/nporuntime.cpp ---- vlc-1.0.4/projects/mozilla/control/nporuntime.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/control/nporuntime.cpp 2010-01-03 22:29:50.065676926 +0100 -@@ -37,11 +37,11 @@ - - char* RuntimeNPObject::stringValue(const NPString &s) - { -- NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.utf8length+1) * sizeof(*val))); -+ NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.UTF8Length+1) * sizeof(*val))); - if( val ) - { -- strncpy(val, s.utf8characters, s.utf8length); -- val[s.utf8length] = '\0'; -+ strncpy(val, s.UTF8Characters, s.UTF8Length); -+ val[s.UTF8Length] = '\0'; - } - return val; - } -diff -up vlc-1.0.4/projects/mozilla/support/npunix.c.xul192 vlc-1.0.4/projects/mozilla/support/npunix.c ---- vlc-1.0.4/projects/mozilla/support/npunix.c.xul192 2009-12-05 10:03:25.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/support/npunix.c 2010-01-03 23:39:32.273422832 +0100 -@@ -268,8 +268,8 @@ void NPN_ReloadPlugins(NPBool reloadPage - #endif - } - --#ifdef OJI --JRIEnv* NPN_GetJavaEnv() -+#ifdef OJI_OLD -+void * NPN_GetJavaEnv() - { - #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv); -@@ -278,7 +278,7 @@ JRIEnv* NPN_GetJavaEnv() - #endif - } - --jref NPN_GetJavaPeer(NPP instance) -+void * NPN_GetJavaPeer(NPP instance) - { - #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) - return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer, -@@ -627,8 +627,8 @@ void Private_URLNotify(NPP instance, con - void Private_Print(NPP instance, NPPrint* platformPrint); - NPError Private_GetValue(NPP instance, NPPVariable variable, void *r_value); - NPError Private_SetValue(NPP instance, NPPVariable variable, void *r_value); --#ifdef OJI --JRIGlobalRef Private_GetJavaClass(void); -+#ifdef OJI_OLD -+void * Private_GetJavaClass(void); - #endif - - /* function implementations */ -@@ -733,13 +733,13 @@ Private_SetValue(NPP instance, NPPVariab - return NPP_SetValue(instance, variable, r_value); - } - --#ifdef OJI --JRIGlobalRef -+#ifdef OJI_OLD -+void * - Private_GetJavaClass(void) - { -- jref clazz = NPP_GetJavaClass(); -+ void * clazz = NPP_GetJavaClass(); - if (clazz) { -- JRIEnv* env = NPN_GetJavaEnv(); -+ void * env = NPN_GetJavaEnv(); - return JRI_NewGlobalRef(env, clazz); - } - return NULL; -@@ -846,7 +846,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, - gNetscapeFuncs.memfree = nsTable->memfree; - gNetscapeFuncs.memflush = nsTable->memflush; - gNetscapeFuncs.reloadplugins = nsTable->reloadplugins; --#ifdef OJI -+#ifdef OJI_OLD - if( minor >= NPVERS_HAS_LIVECONNECT ) - { - gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv; -@@ -969,7 +969,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, - pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); - #endif - } --#ifdef OJI -+#ifdef OJI_OLD - if( minor >= NPVERS_HAS_LIVECONNECT ) - pluginFuncs->javaClass = Private_GetJavaClass(); - else -diff -up vlc-1.0.4/projects/mozilla/vlcplugin.cpp.xul192 vlc-1.0.4/projects/mozilla/vlcplugin.cpp ---- vlc-1.0.4/projects/mozilla/vlcplugin.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/vlcplugin.cpp 2010-01-03 22:19:46.665420058 +0100 -@@ -36,11 +36,12 @@ - #include "control/npolibvlc.h" - - #include <ctype.h> -+#include <stdlib.h> - - /***************************************************************************** - * VlcPlugin constructor and destructor - *****************************************************************************/ --VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) : -+VlcPlugin::VlcPlugin( NPP instance, uint16_t mode ) : - i_npmode(mode), - b_stream(0), - b_autoplay(1), -@@ -227,8 +228,8 @@ NPError VlcPlugin::init(int argc, char* - NPString script; - NPVariant result; - -- script.utf8characters = docLocHref; -- script.utf8length = sizeof(docLocHref)-1; -+ script.UTF8Characters = docLocHref; -+ script.UTF8Length = sizeof(docLocHref)-1; - - if( NPN_Evaluate(p_browser, plugin, &script, &result) ) - { -@@ -236,11 +237,11 @@ NPError VlcPlugin::init(int argc, char* - { - NPString &location = NPVARIANT_TO_STRING(result); - -- psz_baseURL = (char *) malloc(location.utf8length+1); -+ psz_baseURL = (char *) malloc(location.UTF8Length+1); - if( psz_baseURL ) - { -- strncpy(psz_baseURL, location.utf8characters, location.utf8length); -- psz_baseURL[location.utf8length] = '\0'; -+ strncpy(psz_baseURL, location.UTF8Characters, location.UTF8Length); -+ psz_baseURL[location.UTF8Length] = '\0'; - } - } - NPN_ReleaseVariantValue(&result); -diff -up vlc-1.0.4/projects/mozilla/vlcplugin.h.xul192 vlc-1.0.4/projects/mozilla/vlcplugin.h ---- vlc-1.0.4/projects/mozilla/vlcplugin.h.xul192 2009-12-07 22:12:58.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/vlcplugin.h 2010-01-03 22:19:46.666424935 +0100 -@@ -82,7 +82,7 @@ typedef enum vlc_toolbar_clicked_e { - class VlcPlugin - { - public: -- VlcPlugin( NPP, uint16 ); -+ VlcPlugin( NPP, uint16_t ); - virtual ~VlcPlugin(); - - NPError init(int argc, char* const argn[], char* const argv[]); -@@ -135,7 +135,7 @@ public: - vlc_toolbar_clicked_t getToolbarButtonClicked( int i_xpos, int i_ypos ); - #endif - -- uint16 i_npmode; /* either NP_EMBED or NP_FULL */ -+ uint16_t i_npmode; /* either NP_EMBED or NP_FULL */ - - /* plugin properties */ - int b_stream; -diff -up vlc-1.0.4/projects/mozilla/vlcshell.cpp.xul192 vlc-1.0.4/projects/mozilla/vlcshell.cpp ---- vlc-1.0.4/projects/mozilla/vlcshell.cpp.xul192 2009-12-07 22:12:58.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/vlcshell.cpp 2010-01-03 22:19:46.666424935 +0100 -@@ -265,7 +265,7 @@ NPError NPP_Initialize( void ) - return NPERR_NO_ERROR; - } - --jref NPP_GetJavaClass( void ) -+void * NPP_GetJavaClass( void ) - { - return NULL; - } -@@ -275,7 +275,7 @@ void NPP_Shutdown( void ) - ; - } - --NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, -+NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, - char* argn[], char* argv[], NPSavedData* saved ) - { - NPError status; -@@ -579,7 +579,7 @@ NPError NPP_SetWindow( NPP instance, NPW - } - - NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, -- NPBool seekable, uint16 *stype ) -+ NPBool seekable, uint16_t *stype ) - { - if( NULL == instance ) - { -@@ -608,14 +608,14 @@ NPError NPP_NewStream( NPP instance, NPM - return NPERR_GENERIC_ERROR; - } - --int32 NPP_WriteReady( NPP instance, NPStream *stream ) -+int32_t NPP_WriteReady( NPP instance, NPStream *stream ) - { - /* TODO */ - return 8*1024; - } - --int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, -- int32 len, void *buffer ) -+int32_t NPP_Write( NPP instance, NPStream *stream, int32_t offset, -+ int32_t len, void *buffer ) - { - /* TODO */ - return len; -diff -up vlc-1.0.4/projects/mozilla/vlcshell.h.xul192 vlc-1.0.4/projects/mozilla/vlcshell.h ---- vlc-1.0.4/projects/mozilla/vlcshell.h.xul192 2009-12-05 10:03:25.000000000 +0100 -+++ vlc-1.0.4/projects/mozilla/vlcshell.h 2010-01-03 22:19:46.667422548 +0100 -@@ -27,10 +27,10 @@ - char * NPP_GetMIMEDescription( void ); - - NPError NPP_Initialize( void ); --jref NPP_GetJavaClass( void ); -+void * NPP_GetJavaClass( void ); - void NPP_Shutdown( void ); - --NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, -+NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, - char* argn[], char* argv[], NPSavedData* saved ); - NPError NPP_Destroy( NPP instance, NPSavedData** save ); - -@@ -40,20 +40,20 @@ NPError NPP_SetValue( NPP instance, NPNV - NPError NPP_SetWindow( NPP instance, NPWindow* window ); - - NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, -- NPBool seekable, uint16 *stype ); -+ NPBool seekable, uint16_t *stype ); - NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason ); - void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname ); - --int32 NPP_WriteReady( NPP instance, NPStream *stream ); --int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, -- int32 len, void *buffer ); -+int32_t NPP_WriteReady( NPP instance, NPStream *stream ); -+int32_t NPP_Write( NPP instance, NPStream *stream, int32_t offset, -+ int32_t len, void *buffer ); - - void NPP_URLNotify( NPP instance, const char* url, - NPReason reason, void* notifyData ); - void NPP_Print( NPP instance, NPPrint* printInfo ); - - #ifdef XP_MACOSX --int16 NPP_HandleEvent( NPP instance, void * event ); -+int16_t NPP_HandleEvent( NPP instance, void * event ); - #endif - - #endif From d2486ec9d6275bdd35cd9acfe0bf6dcbedfd05a9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 17 Apr 2010 10:12:06 +0000 Subject: [PATCH 096/671] Update to 1.1.0-pre1 --- .gitignore | 2 +- 0001-Default-libv4l2-to-true.patch | 25 --- 300_all_pic.patch | 209 --------------------- 310_all_mmx_pic.patch | 154 ---------------- position.h | 55 ++++++ sources | 2 +- vlc-trunk-default_font.patch | 12 -- vlc.spec | 284 ++++++++++++++--------------- xcb_keysym.h | 90 +++++++++ 9 files changed, 286 insertions(+), 547 deletions(-) delete mode 100644 0001-Default-libv4l2-to-true.patch delete mode 100644 300_all_pic.patch delete mode 100644 310_all_mmx_pic.patch create mode 100644 position.h delete mode 100644 vlc-trunk-default_font.patch create mode 100644 xcb_keysym.h diff --git a/.gitignore b/.gitignore index 8055d9a..328a530 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.0.5.tar.bz2 +vlc-1.1.0-pre1.tar.bz2 diff --git a/0001-Default-libv4l2-to-true.patch b/0001-Default-libv4l2-to-true.patch deleted file mode 100644 index 4130154..0000000 --- a/0001-Default-libv4l2-to-true.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d3bef7cde676ad96ce036cb10aa534ca1c5d0e24 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet (kwizart) <kwizart@gmail.com> -Date: Tue, 26 May 2009 18:38:07 +0200 -Subject: [PATCH] Default libv4l2 to true - ---- - modules/access/v4l2.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c -index 31dae66..42a8e9d 100644 ---- a/modules/access/v4l2.c -+++ b/modules/access/v4l2.c -@@ -261,7 +261,7 @@ vlc_module_begin () - add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, - CACHING_TEXT, CACHING_LONGTEXT, true ) - #ifdef HAVE_LIBV4L2 -- add_bool( CFG_PREFIX "use-libv4l2", false, NULL, LIBV4L2_TEXT, LIBV4L2_LONGTEXT, true ); -+ add_bool( CFG_PREFIX "use-libv4l2", true, NULL, LIBV4L2_TEXT, LIBV4L2_LONGTEXT, true ); - #endif - - set_section( N_( "Tuner" ), NULL ) --- -1.6.0.6 - diff --git a/300_all_pic.patch b/300_all_pic.patch deleted file mode 100644 index 2129efa..0000000 --- a/300_all_pic.patch +++ /dev/null @@ -1,209 +0,0 @@ -Index: vlc-0.9.0-svn/libs/loader/Makefile.am -=================================================================== ---- vlc-0.9.0-svn.orig/libs/loader/Makefile.am -+++ vlc-0.9.0-svn/libs/loader/Makefile.am -@@ -16,7 +16,7 @@ endif - # TODO: real check for vsscanf() and <sys/mmap.h> - AM_CPPFLAGS = -D__WINE__ -DHAVE_SYS_MMAN_H=1 -DHAVE_VSSCANF=1 \ - -DWIN32_PATH=\"\" -DTRACE\(...\)=\(void\)0 --AM_CFLAGS = -fno-PIC `$(top_builddir)/vlc-config --cflags` -U_FILE_OFFSET_BITS \ -+AM_CFLAGS = -fPIC `$(top_builddir)/vlc-config --cflags` -U_FILE_OFFSET_BITS \ - -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer - - noinst_HEADERS = com.h driver.h ext.h ldt_keeper.h loader.h registry.h \ -Index: vlc-0.9.0-svn/libs/loader/module.c -=================================================================== ---- vlc-0.9.0-svn.orig/libs/loader/module.c -+++ vlc-0.9.0-svn/libs/loader/module.c -@@ -63,8 +63,8 @@ - - #ifdef EMU_QTX_API - #include "wrapper.h" --static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); --static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); -+int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); -+int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); - #endif - - //#undef TRACE -@@ -572,8 +572,6 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR lib - fprintf(stderr,"QuickTime.qts patched!!! old entry=%p\n",ptr[0]); - - #ifdef EMU_QTX_API -- report_entry = report_func; -- report_ret = report_func_ret; - wrapper_target=ptr[0]; - ptr[0]=wrapper; - #endif -@@ -754,7 +752,7 @@ static int dump_component(char* name,int - static uint32_t ret_array[4096]; - static int ret_i=0; - --static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) -+int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) - { - #ifdef DEBUG_QTX_API - int i; -@@ -953,7 +951,7 @@ static int report_func(void *stack_base, - return 0; - } - --static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) -+int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) - { - int i; - short err; -@@ -1066,8 +1064,6 @@ FARPROC MODULE_GetProcAddress( - // || !strcmp(function,"_CallComponent") - ){ - fprintf(stderr,"theQuickTimeDispatcher catched -> %p\n",retproc); -- report_entry = report_func; -- report_ret = report_func_ret; - wrapper_target=(void(*)(void))retproc; - retproc=(FARPROC)wrapper; - } -Index: vlc-0.9.0-svn/libs/loader/stubs.s -=================================================================== ---- vlc-0.9.0-svn.orig/libs/loader/stubs.s -+++ vlc-0.9.0-svn/libs/loader/stubs.s -@@ -33,3 +33,6 @@ exp_EH_prolog: - leal 12(%esp), %ebp - pushl %eax - ret -+ -+.section .note.GNU-stack,"",@progbits -+ -Index: vlc-0.9.0-svn/libs/loader/wrapper.S -=================================================================== ---- vlc-0.9.0-svn.orig/libs/loader/wrapper.S -+++ vlc-0.9.0-svn/libs/loader/wrapper.S -@@ -1,17 +1,19 @@ - .section .data --.globl caller_return - caller_return: - .long 0 --.globl report_entry --report_entry: -- .long null_call --.globl report_ret --report_ret: -- .long null_call - .global wrapper_target - wrapper_target: - .long null_call - -+#undef __i686 /* gcc define gets in our way */ -+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits -+.globl __i686.get_pc_thunk.bx -+ .hidden __i686.get_pc_thunk.bx -+ .type __i686.get_pc_thunk.bx,@function -+__i686.get_pc_thunk.bx: -+ movl (%esp), %ebx -+ ret -+ - .section .text - .globl null_call - .type null_call, @function -@@ -22,46 +24,60 @@ null_call: - .type wrapper, @function - .balign 16,0x90 - wrapper: -+ pushl $0 - pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI) - pushf # store flags - - push %ebp # set up a stack frame - movl %esp, %ebp - -+ call __i686.get_pc_thunk.bx -+ addl $_GLOBAL_OFFSET_TABLE_, %ebx -+ - leal 4(%ebp), %eax # push flags addr - push %eax - leal 8(%ebp), %eax # push registers addr - push %eax -- -- leal 40(%ebp), %edx -+ -+ leal 44(%ebp), %edx - movl (%ebp), %eax - subl %edx, %eax - push %eax - push %edx -- -- call *report_entry # report entry -- -+ -+ call report_func@PLT # report entry -+ - test %eax, %eax - jnz .Ldone - -+ movl 44(%ebp), %eax # switch return addresses -+ movl %eax, caller_return@GOTOFF(%ebx) -+ leal .Lwrapper_return@GOTOFF(%ebx), %eax -+ movl %eax, 40(%ebp) -+ -+ movl wrapper_target@GOTOFF(%ebx), %eax -+ mov %eax, 40(%ebp) # wrapper_target should return at .Lwrapper_return -+ - leave # restore %esp, %ebp - popf # restore flags - popa # restore registers -- -- popl caller_return # switch return addresses -- pushl $.Lwrapper_return -- -- jmp *wrapper_target # wrapper_target should return at .Lwrapper_return -+ -+ ret - - .balign 16, 0x90 - .Lwrapper_return: -- pushl caller_return # restore the original return address -+ pushl $0 # restore the original return address - pusha # more for reference sake here - pushf - - push %ebp # set up a stack frame - movl %esp, %ebp - -+ call __i686.get_pc_thunk.bx -+ addl $_GLOBAL_OFFSET_TABLE_, %ebx -+ movl caller_return@GOTOFF(%ebx), %eax -+ movl %eax, 40(%ebp) # restore the original return address -+ - leal 4(%ebp), %eax # push flags addr - push %eax - leal 8(%ebp), %eax # push registers addr -@@ -73,11 +89,13 @@ wrapper: - push %eax - push %edx - -- call *report_ret # report the return information (same args) -+ call report_func_ret@PLT# report the return information (same args) - .Ldone: - - leave - popf - popa - ret -- -+ -+.section .note.GNU-stack,"",@progbits -+ -Index: vlc-0.9.0-svn/libs/loader/wrapper.h -=================================================================== ---- vlc-0.9.0-svn.orig/libs/loader/wrapper.h -+++ vlc-0.9.0-svn/libs/loader/wrapper.h -@@ -7,10 +7,6 @@ typedef struct { - uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; - } reg386_t; - --typedef int (*wrapper_func_t)(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); -- --extern wrapper_func_t report_entry, report_ret; -- - extern void (*wrapper_target)(void); - - extern int wrapper(void); diff --git a/310_all_mmx_pic.patch b/310_all_mmx_pic.patch deleted file mode 100644 index 2079370..0000000 --- a/310_all_mmx_pic.patch +++ /dev/null @@ -1,154 +0,0 @@ -Index: vlc-0.9.0-svn/modules/video_chroma/i420_rgb_mmx.h -=================================================================== ---- vlc-0.9.0-svn.orig/modules/video_chroma/i420_rgb_mmx.h -+++ vlc-0.9.0-svn/modules/video_chroma/i420_rgb_mmx.h -@@ -34,18 +34,18 @@ - #define USED_U64(foo) \ - static const uint64_t foo __asm__ (#foo) __attribute__((unused)) - #endif --USED_U64(mmx_80w) = 0x0080008000800080ULL; --USED_U64(mmx_10w) = 0x1010101010101010ULL; --USED_U64(mmx_00ffw) = 0x00ff00ff00ff00ffULL; --USED_U64(mmx_Y_coeff) = 0x253f253f253f253fULL; -- --USED_U64(mmx_U_green) = 0xf37df37df37df37dULL; --USED_U64(mmx_U_blue) = 0x4093409340934093ULL; --USED_U64(mmx_V_red) = 0x3312331233123312ULL; --USED_U64(mmx_V_green) = 0xe5fce5fce5fce5fcULL; -+USED_U64(mmx_80w) = 0x0080008000800080ULL; /* Will be referenced as %4 in inline asm */ -+USED_U64(mmx_10w) = 0x1010101010101010ULL; /* -- as %5 */ -+USED_U64(mmx_00ffw) = 0x00ff00ff00ff00ffULL; /* -- as %6 */ -+USED_U64(mmx_Y_coeff) = 0x253f253f253f253fULL; /* -- as %7 */ -+ -+USED_U64(mmx_U_green) = 0xf37df37df37df37dULL; /* -- as %8 */ -+USED_U64(mmx_U_blue) = 0x4093409340934093ULL; /* -- as %9 */ -+USED_U64(mmx_V_red) = 0x3312331233123312ULL; /* -- as %10 */ -+USED_U64(mmx_V_green) = 0xe5fce5fce5fce5fcULL; /* -- as %11 */ - --USED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8ULL; --USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfcULL; -+USED_U64(mmx_mask_f8) = 0xf8f8f8f8f8f8f8f8ULL; /* -- as %12 */ -+USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfcfcULL; /* -- as %13 */ - #undef USED_U64 - - #if defined(CAN_COMPILE_MMX) -@@ -59,18 +59,16 @@ USED_U64(mmx_mask_fc) = 0xfcfcfcfcfcfcfc - MMX_INSTRUCTIONS \ - : \ - : "r" (p_y), "r" (p_u), \ -- "r" (p_v), "r" (p_buffer) ); \ -+ "r" (p_v), "r" (p_buffer), \ -+ "m" (mmx_80w), "m" (mmx_10w), \ -+ "m" (mmx_00ffw), "m" (mmx_Y_coeff), \ -+ "m" (mmx_U_green), "m" (mmx_U_blue), \ -+ "m" (mmx_V_red), "m" (mmx_V_green), \ -+ "m" (mmx_mask_f8), "m" (mmx_mask_fc) ); \ - } while(0) - - #define MMX_END __asm__ __volatile__ ( "emms" ) - --/* Use RIP-relative code in PIC mode on amd64 */ --#if defined(__x86_64__) && defined(__PIC__) --# define G "(%%rip)" --#else --# define G --#endif -- - #define MMX_INIT_16 " \n\ - movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\ - movd (%2), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\ -@@ -103,27 +101,27 @@ movq (%0), %%mm6 # Load 8 Y - # convert the chroma part \n\ - punpcklbw %%mm4, %%mm0 # scatter 4 Cb 00 u3 00 u2 00 u1 00 u0 \n\ - punpcklbw %%mm4, %%mm1 # scatter 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\ --psubsw mmx_80w"G", %%mm0 # Cb -= 128 \n\ --psubsw mmx_80w"G", %%mm1 # Cr -= 128 \n\ -+psubsw %4, %%mm0 # Cb -= 128 \n\ -+psubsw %4, %%mm1 # Cr -= 128 \n\ - psllw $3, %%mm0 # Promote precision \n\ - psllw $3, %%mm1 # Promote precision \n\ - movq %%mm0, %%mm2 # Copy 4 Cb 00 u3 00 u2 00 u1 00 u0 \n\ - movq %%mm1, %%mm3 # Copy 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\ --pmulhw mmx_U_green"G", %%mm2 # Mul Cb with green coeff -> Cb green \n\ --pmulhw mmx_V_green"G", %%mm3 # Mul Cr with green coeff -> Cr green \n\ --pmulhw mmx_U_blue"G", %%mm0 # Mul Cb -> Cblue 00 b3 00 b2 00 b1 00 b0 \n\ --pmulhw mmx_V_red"G", %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 r0 \n\ -+pmulhw %8, %%mm2 # Mul Cb with green coeff -> Cb green \n\ -+pmulhw %11, %%mm3 # Mul Cr with green coeff -> Cr green \n\ -+pmulhw %9, %%mm0 # Mul Cb -> Cblue 00 b3 00 b2 00 b1 00 b0 \n\ -+pmulhw %10, %%mm1 # Mul Cr -> Cred 00 r3 00 r2 00 r1 00 r0 \n\ - paddsw %%mm3, %%mm2 # Cb green + Cr green -> Cgreen \n\ - \n\ - # convert the luma part \n\ --psubusb mmx_10w"G", %%mm6 # Y -= 16 \n\ -+psubusb %5, %%mm6 # Y -= 16 \n\ - movq %%mm6, %%mm7 # Copy 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\ --pand mmx_00ffw"G", %%mm6 # get Y even 00 Y6 00 Y4 00 Y2 00 Y0 \n\ -+pand %6, %%mm6 # get Y even 00 Y6 00 Y4 00 Y2 00 Y0 \n\ - psrlw $8, %%mm7 # get Y odd 00 Y7 00 Y5 00 Y3 00 Y1 \n\ - psllw $3, %%mm6 # Promote precision \n\ - psllw $3, %%mm7 # Promote precision \n\ --pmulhw mmx_Y_coeff"G", %%mm6 # Mul 4 Y even 00 y6 00 y4 00 y2 00 y0 \n\ --pmulhw mmx_Y_coeff"G", %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\ -+pmulhw %7, %%mm6 # Mul 4 Y even 00 y6 00 y4 00 y2 00 y0 \n\ -+pmulhw %7, %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\ - " - - /* -@@ -168,14 +166,14 @@ punpcklbw %%mm5, %%mm2 # - - #define MMX_YUV_GRAY " \n\ - # convert the luma part \n\ --psubusb mmx_10w"G", %%mm6 \n\ -+psubusb %5, %%mm6 \n\ - movq %%mm6, %%mm7 \n\ --pand mmx_00ffw"G", %%mm6 \n\ -+pand %6, %%mm6 \n\ - psrlw $8, %%mm7 \n\ - psllw $3, %%mm6 \n\ - psllw $3, %%mm7 \n\ --pmulhw mmx_Y_coeff"G", %%mm6 \n\ --pmulhw mmx_Y_coeff"G", %%mm7 \n\ -+pmulhw %7, %%mm6 \n\ -+pmulhw %7, %%mm7 \n\ - packuswb %%mm6, %%mm6 \n\ - packuswb %%mm7, %%mm7 \n\ - punpcklbw %%mm7, %%mm6 \n\ -@@ -183,8 +181,8 @@ punpcklbw %%mm7, %%mm6 - - #define MMX_UNPACK_16_GRAY " \n\ - movq %%mm6, %%mm5 \n\ --pand mmx_mask_f8"G", %%mm6 \n\ --pand mmx_mask_fc"G", %%mm5 \n\ -+pand %12, %%mm6 \n\ -+pand %13, %%mm5 \n\ - movq %%mm6, %%mm7 \n\ - psrlw $3, %%mm7 \n\ - pxor %%mm3, %%mm3 \n\ -@@ -213,10 +211,10 @@ movq %%mm2, 8(%3) - - #define MMX_UNPACK_15 " \n\ - # mask unneeded bits off \n\ --pand mmx_mask_f8"G", %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ -+pand %12, %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ - psrlw $3,%%mm0 # ______b7 b6b5b4b3 ______b7 b6b5b4b3 \n\ --pand mmx_mask_f8"G", %%mm2 # g7g6g5g4 g3______ g7g6g5g4 g3______ \n\ --pand mmx_mask_f8"G", %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ -+pand %12, %%mm2 # g7g6g5g4 g3______ g7g6g5g4 g3______ \n\ -+pand %12, %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ - psrlw $1,%%mm1 # __r7r6r5 r4r3____ __r7r6r5 r4r3____ \n\ - pxor %%mm4, %%mm4 # zero mm4 \n\ - movq %%mm0, %%mm5 # Copy B7-B0 \n\ -@@ -249,9 +247,9 @@ movq %%mm5, 8(%3) # store - - #define MMX_UNPACK_16 " \n\ - # mask unneeded bits off \n\ --pand mmx_mask_f8"G", %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ --pand mmx_mask_fc"G", %%mm2 # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____ \n\ --pand mmx_mask_f8"G", %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ -+pand %12, %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\ -+pand %13, %%mm2 # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____ \n\ -+pand %12, %%mm1 # r7r6r5r4 r3______ r7r6r5r4 r3______ \n\ - psrlw $3,%%mm0 # ______b7 b6b5b4b3 ______b7 b6b5b4b3 \n\ - pxor %%mm4, %%mm4 # zero mm4 \n\ - movq %%mm0, %%mm5 # Copy B7-B0 \n\ diff --git a/position.h b/position.h new file mode 100644 index 0000000..5f3b376 --- /dev/null +++ b/position.h @@ -0,0 +1,55 @@ +/***************************************************************************** + * position.h: Support routines for logo and marquee plugin objects + ***************************************************************************** + * Copyright (C) 2010 M2X BV + * + * Authors: JP Dinger <jpd (at) videolan (dot) org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ +#ifndef POSITION_H +#define POSITION_H + +struct posidx_s { const char *n; size_t i; }; +static const posidx_s posidx[] = { + { "center", 0 }, + { "left", 1 }, + { "right", 2 }, + { "top", 4 }, + { "bottom", 8 }, + { "top-left", 5 }, + { "top-right", 6 }, + { "bottom-left", 9 }, + { "bottom-right", 10 }, +}; +enum { num_posidx = sizeof(posidx)/sizeof(*posidx) }; + +static inline const char *position_bynumber( size_t i ) +{ + for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h ) + if( h->i == i ) + return h->n; + return "undefined"; +} + +static inline bool position_byname( const char *n, size_t &i ) +{ + for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h ) + if( !strcasecmp( n, h->n ) ) + { i=h->i; return true; } + return false; +} +#endif + diff --git a/sources b/sources index 263009c..8ef4a18 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d3d99e489ba1ae996af7e1065c0ef313 vlc-1.0.5.tar.bz2 +2cbda5fa9b52d10d917f23a4a00dbbf5 vlc-1.1.0-pre1.tar.bz2 diff --git a/vlc-trunk-default_font.patch b/vlc-trunk-default_font.patch deleted file mode 100644 index df7e8c5..0000000 --- a/vlc-trunk-default_font.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-0.9.0-svn/modules/misc/freetype.c.default_font vlc-0.9.0-svn/modules/misc/freetype.c ---- vlc-0.9.0-svn/modules/misc/freetype.c.default_font 2007-11-21 22:58:06.000000000 +0100 -+++ vlc-0.9.0-svn/modules/misc/freetype.c 2007-11-21 23:00:54.000000000 +0100 -@@ -61,7 +61,7 @@ - #define DEFAULT_FONT "" /* Default font found at run-time */ - #define FC_DEFAULT_FONT "Arial" - #else --#define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf" -+#define DEFAULT_FONT "/usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf" - #define FC_DEFAULT_FONT "Serif Bold" - #endif - diff --git a/vlc.spec b/vlc.spec index 3e6a708..46a25e9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,14 +1,25 @@ -# TODO: libdc1394(juju), modularization (vlc-plugin-foo) - #global live555_date 2009.07.28 -#global vlc_rc -rc -%global vlc_bootstrap 1 - +%global vlc_rc -pre1 +#global vlc_bootstrap 1 +%global _with_freeworld 1 +%if 0%{?_with_freeworld:1} +%global _with_faad2 --with-faad2 +%global _with_ffmpeg --with-ffmpeg +%global _with_libdca --with-libdca +%global _with_libdvbpsi --with-libdvbpsi +%global _with_libmad --with-libmad +%global _with_libmpeg2 --with-libmpeg2 +%global _with_twolame --with-twolame +%global _with_vcdimager --with-vcdimager +%global _with_x264 --with-x264 +%global _with_xvidcore --with-xvidcore +%global _with_live555 --with-live55 +%endif -Summary: Multi-platform MPEG, DVD, and DivX player +Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.0.5 -Release: 2%{?dist} +Version: 1.1.0 +Release: 0.1.pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -17,11 +28,8 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas -Patch0: vlc-trunk-default_font.patch -Patch1: 0001-Default-libv4l2-to-true.patch -Patch3: 300_all_pic.patch -Patch4: 310_all_mmx_pic.patch -Patch5: vlc-1.0.4-xulrunner-192.patch +Source11: xcb_keysym.h +Source12: position.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -33,16 +41,16 @@ BuildRequires: gettext-devel BuildRequires: libtool %endif -BuildRequires: a52dec-devel +%{?_with_a52dec:BuildRequires: a52dec-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: dbus-devel BuildRequires: dirac-devel >= 1.0.0 -%{!?_without_directfb:BuildRequires: directfb-devel} -BuildRequires: faad2-devel -BuildRequires: ffmpeg-devel >= 0.4.9-0 +%{!?_without_directfb:BuildRequires: directfb-devel} +%{?_with_faad2:BuildRequires: faad2-devel} +%{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel BuildRequires: fluidsynth-devel BuildRequires: fribidi-devel @@ -51,27 +59,31 @@ BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel +BuildRequires: kdelibs-devel >= 4.4.0 BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 -BuildRequires: libdca-devel +BuildRequires: libdc1394-devel >= 2.1.0 +%{?_with_libdca:BuildRequires: libdca-devel} BuildRequires: libdv-devel -BuildRequires: libdvbpsi-devel +%{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel BuildRequires: libebml-devel BuildRequires: libid3tag-devel BuildRequires: libkate-devel -BuildRequires: libmad-devel +%{?_with_libmad:BuildRequires: libmad-devel} BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel BuildRequires: libnotify-devel +BuildRequires: libprojectM-qt-devel BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 +BuildRequires: libssh2-devel BuildRequires: libsysfs-devel BuildRequires: libshout-devel BuildRequires: libsmbclient-devel @@ -79,18 +91,14 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel +BuildRequires: libudev-devel >= 142 BuildRequires: libupnp-devel -%if 0%{?fedora} > 8 BuildRequires: libv4l-devel -%endif +%{?_with_vaapi:BuildRequires: libva-devel} BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel -%if 0%{?live555_date:1} -BuildConflicts: live555-devel -%else -BuildRequires: live555-devel >= 0-0.19.2008.04.03 -%endif +%{?_with_live555:BuildRequires: live555-devel >= 0-0.19.2008.04.03} BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel @@ -98,7 +106,7 @@ BuildRequires: libmusicbrainz-devel BuildRequires: libshout-devel BuildRequires: lua-devel BuildRequires: minizip-devel -BuildRequires: mpeg2dec-devel >= 0.3.2 +%{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel BuildRequires: opencv-devel BuildRequires: openslp-devel @@ -113,11 +121,11 @@ BuildRequires: speex-devel >= 1.1.5 BuildRequires: svgalib-devel %endif BuildRequires: taglib-devel -BuildRequires: twolame-devel -BuildRequires: vcdimager-devel >= 0.7.21 -BuildRequires: x264-devel >= 0-0.8.20061028 +%{?_with_twolame:BuildRequires: twolame-devel} +%{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} +%{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} BuildRequires: xosd-devel -BuildRequires: xvidcore-devel +%{?_with_xvidcore:BuildRequires: xvidcore-devel} BuildRequires: zlib-devel BuildRequires: zvbi-devel @@ -128,9 +136,6 @@ BuildRequires: libXxf86vm-devel BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -%ifarch %{ix86} x86_64 -BuildRequires: libXvMC-devel -%endif BuildRequires: xcb-util-devel BuildRequires: xorg-x11-proto-devel @@ -151,62 +156,53 @@ Requires: dejavu-fonts Requires: qt-x11%{_isa} >= 1:4.5.2 -%package devel -Summary: Development package for %{name} -Group: Development/Libraries -Requires: %{name}-core%{_isa} = %{version}-%{release} %description -VLC (initially VideoLAN Client) is a highly portable multimedia player -for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, -mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. -It can also be used as a server to stream in unicast or multicast in -IPv4 or IPv6 on a high-bandwidth network. +VLC media player is a highly portable multimedia player and multimedia framework +capable of reading most audio and video formats as well as DVDs, Audio CDs VCDs, +and various streaming protocols. +It can also be used as a media converter or a server to stream in unicast or +multicast in IPv4 or IPv6 on networks. +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}-core%{_isa} = %{version}-%{release} %description devel -This package contains development files for VLC Media Player. +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. -VLC (initially VideoLAN Client) is a highly portable multimedia player -for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, -mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. -It can also be used as a server to stream in unicast or multicast in -IPv4 or IPv6 on a high-bandwidth network. %{!?_without_mozilla: %package -n mozilla-vlc -Summary: VLC Media Player plugin for Mozilla compatible web browsers +Summary: VLC media player plugin for Mozilla compatible web browsers Group: Applications/Multimedia Requires: %{name}-xorg%{_isa} = %{version}-%{release} Requires: %{_libdir}/mozilla/plugins %description -n mozilla-vlc -This package contains a VLC Media Player plugin for Mozilla compatible +This package contains a VLC media player plugin for Mozilla compatible web browsers. -VLC (initially VideoLAN Client) is a highly portable multimedia player -for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, -mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. -It can also be used as a server to stream in unicast or multicast in -IPv4 or IPv6 on a high-bandwidth network. } %package core -Summary: VLC Media Player core +Summary: VLC media player core Group: Applications/Multimedia %description core -VLC Media Player core components +VLC media player core components %package nox -Summary: VLC Media Player without Xorg +Summary: VLC media player without Xorg Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} %description nox -VLC Media Player with framebuffer support for X-less server. +VLC media player with framebuffer support for X-less server. %package plugin-jack Summary: JACK audio plugin for VLC @@ -222,14 +218,14 @@ JACK audio plugin for the VLC media player. %if 0%{?live555_date:1} %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif -%patch0 -p1 -b .default_font -%patch1 -p1 -b .istrue +#patch1 -p1 -b .istrue #http://trac.videolan.org/vlc/ticket/1383 -%patch3 -p1 -b .dmo_pic -sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in -%patch4 -p1 -b .mmx_pic -%patch5 -p1 -b .xul192 +#patch3 -p1 -b .dmo_pic +#sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.{in,am} +#patch4 -p1 -b .mmx_pic +install -pm 0644 %{SOURCE11} modules/video_output/xcb/xcb_keysym.h +install -pm 0644 %{SOURCE12} projects/mozilla/control/position.h rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h %if 0%{?vlc_bootstrap:1} @@ -254,10 +250,9 @@ popd %configure \ --disable-dependency-tracking \ --disable-rpath \ - --enable-release \ - --with-binary-version=%{version}-%{release} \ + --with-binary-version=%{version} \ --with-tuning=no \ - --enable-switcher \ +%{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ --enable-live555 \ %if 0%{?live555_date:1} @@ -265,19 +260,22 @@ popd %endif --enable-dv \ --enable-opencv \ + --enable-sftp \ --enable-pvr \ --enable-gnomevfs \ - --enable-cddax \ - --enable-wma-fixed \ - --enable-shine \ - --enable-faad \ - --enable-twolame \ - --enable-real \ - --enable-realrtsp \ +%{?_with_vcdimager--enable-vcdx} \ +%{?_with_freeworld:--enable-wma-fixed} \ +%{?_with_freeworld:--enable-shine} \ + --enable-omxil \ + --disable-a52 \ +%{!?_with_ffmpeg:--disable-avcodec --disable-avformat --disable-swscale --disable-postproc} \ +%{?_with_faad2:--enable-faad} \ +%{!?_with_libmad:--disable-mad} \ +%{?_with_twolame:--enable-twolame} \ +%{?_with_freeworld:--enable-real --enable-realrtsp} \ --enable-flac \ --enable-tremor \ --enable-speex \ - --enable-tarkin \ --enable-theora \ --enable-dirac \ --enable-libass \ @@ -287,20 +285,16 @@ popd --enable-snapshot \ %ifarch %{ix86} x86_64 --enable-svgalib \ - --enable-xvmc \ %endif %{!?_without_directfb:--enable-directfb} \ --enable-aa \ --enable-caca \ --enable-jack \ -%if 0%{?fedora} > 7 --enable-portaudio \ --enable-pulse \ -%endif --enable-ncurses \ --enable-xosd \ --enable-fbosd \ - --enable-galaktos \ --enable-lirc \ %ifarch %{ix86} --enable-loader \ @@ -310,10 +304,11 @@ popd %{!?_without_mozilla:--enable-mozilla} \ - +%if 0 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%endif %if 0 # clean unused-direct-shlib-dependencies @@ -335,13 +330,15 @@ find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' install -dm 755 $RPM_BUILD_ROOT%{_mandir}/man1 install -pm 644 doc/vlc*.1 $RPM_BUILD_ROOT%{_mandir}/man1 +%if 0 for i in 16x16 32x32 48x48 128x128 ; do mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps install -pm 0644 share/vlc${i}.png \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps/vlc.png done +%endif -desktop-file-install --vendor livna \ +desktop-file-install --vendor "" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --delete-original \ --mode 644 \ @@ -364,6 +361,8 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ +rm -rf $RPM_BUILD_ROOT%{_datadir}/kde4 + %find_lang %{name} @@ -416,37 +415,32 @@ fi || : %files %defattr(-,root,root,-) -%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README THANKS +%doc AUTHORS COPYING ChangeLog NEWS README THANKS %{_datadir}/applications/*%{name}.desktop -%{_datadir}/icons/hicolor/*/apps/vlc.png +#exclude #{_datadir}/kde4/apps/solid/actions/vlc-*.desktop +%{_datadir}/icons/hicolor/*/apps/vlc*.png +%{_datadir}/icons/hicolor/*/apps/vlc*.xpm %{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc -%{_libdir}/vlc/gui/libqt4_plugin.so -%{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so -%{_libdir}/vlc/access/libx11_screen_plugin.so -%{_libdir}/vlc/misc/libsvg_plugin.so -%{_libdir}/vlc/misc/libnotify_plugin.so -%{_libdir}/vlc/video_output/libaa_plugin.so -%{_libdir}/vlc/video_output/libcaca_plugin.so -%{_libdir}/vlc/video_output/libglx_plugin.so -%{_libdir}/vlc/video_output/libopengl_plugin.so -%{_libdir}/vlc/video_output/libx11_plugin.so -%{_libdir}/vlc/video_output/libxcb_plugin.so -%{_libdir}/vlc/video_output/libxcb_window_plugin.so -%{_libdir}/vlc/video_output/libxcb_xv_plugin.so -%{_libdir}/vlc/video_output/libxvideo_plugin.so -%{_libdir}/vlc/visualization/libgalaktos_plugin.so -%{_libdir}/vlc/misc/libxosd_plugin.so -%ifarch %{ix86} x86_64 -%{_libdir}/vlc/codec/libxvmc_plugin.so -%{_libdir}/vlc/video_output/libxvmc_plugin.so +%{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so +%{_libdir}/vlc/plugins/misc/libsvg_plugin.so +%{_libdir}/vlc/plugins/misc/libnotify_plugin.so +%{_libdir}/vlc/plugins/video_output/libaa_plugin.so +%{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so +%{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so +%{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so +%{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +%{_libdir}/vlc/plugins/misc/libxosd_plugin.so +%{_libdir}/vlc/plugins/gui/libskins2_plugin.so +%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so +%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so +%if 0%{fedora} > 11 +%{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif -%{_libdir}/vlc/gui/libskins2_plugin.so -%{_libdir}/vlc/video_filter/libopencv_example_plugin.so -%{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so -%{_libdir}/vlc/video_filter/libpanoramix_plugin.so -%{_libdir}/vlc/audio_output/libpulse_plugin.so +%{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %files core -f %{name}.lang %defattr(-,root,root,-) @@ -458,56 +452,52 @@ fi || : %exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ %{_libdir}/*.so.* -%exclude %{_libdir}/vlc/gui/libqt4_plugin.so -%exclude %{_libdir}/vlc/access/libaccess_gnomevfs_plugin.so -%exclude %{_libdir}/vlc/access/libaccess_jack_plugin.so -%exclude %{_libdir}/vlc/access/libx11_screen_plugin.so -%exclude %{_libdir}/vlc/codec/libfluidsynth_plugin.so -%exclude %{_libdir}/vlc/misc/libsvg_plugin.so -%exclude %{_libdir}/vlc/misc/libnotify_plugin.so -%exclude %{_libdir}/vlc/video_output/libaa_plugin.so -%exclude %{_libdir}/vlc/video_output/libcaca_plugin.so -%exclude %{_libdir}/vlc/video_output/libglx_plugin.so -%exclude %{_libdir}/vlc/video_output/libopengl_plugin.so -%exclude %{_libdir}/vlc/video_output/libx11_plugin.so -%exclude %{_libdir}/vlc/video_output/libxcb_plugin.so -%exclude %{_libdir}/vlc/video_output/libxcb_window_plugin.so -%exclude %{_libdir}/vlc/video_output/libxcb_xv_plugin.so -%exclude %{_libdir}/vlc/video_output/libxvideo_plugin.so -%exclude %{_libdir}/vlc/visualization/libgalaktos_plugin.so -%exclude %{_libdir}/vlc/misc/libxosd_plugin.so +%exclude %{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%exclude %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so +%exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so +%exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so +%exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +%exclude %{_libdir}/vlc/plugins/misc/libsvg_plugin.so +%exclude %{_libdir}/vlc/plugins/misc/libnotify_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +%exclude %{_libdir}/vlc/plugins/misc/libxosd_plugin.so %ifarch %{ix86} x86_64 -%exclude %{_libdir}/vlc/codec/libxvmc_plugin.so -%exclude %{_libdir}/vlc/video_output/libxvmc_plugin.so -%exclude %{_libdir}/vlc/video_output/libsvgalib_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so %endif %{!?_without_directfb: -%exclude %{_libdir}/vlc/video_output/libdirectfb_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } -%exclude %{_libdir}/vlc/gui/libskins2_plugin.so -%exclude %{_libdir}/vlc/video_filter/libopencv_example_plugin.so -%exclude %{_libdir}/vlc/video_filter/libopencv_wrapper_plugin.so -%exclude %{_libdir}/vlc/video_filter/libpanoramix_plugin.so -%exclude %{_libdir}/vlc/audio_output/libjack_plugin.so -%exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so -%exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so +%exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so +%exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so +%exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so +%if 0%{fedora} > 11 +%exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +%endif +%exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so +%exclude %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so +%exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* %files plugin-jack %defattr(-,root,root,-) -%{_libdir}/vlc/access/libaccess_jack_plugin.so -%{_libdir}/vlc/audio_output/libportaudio_plugin.so -%{_libdir}/vlc/audio_output/libjack_plugin.so -%{_libdir}/vlc/codec/libfluidsynth_plugin.so +%{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so +%{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so +%{_libdir}/vlc/plugins/audio_output/libjack_plugin.so +%{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %files nox %defattr(-,root,root,-) %{!?_without_directfb: -%{_libdir}/vlc/video_output/libdirectfb_plugin.so +%{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } %ifarch %{ix86} x86_64 -%{_libdir}/vlc/video_output/libsvgalib_plugin.so +%{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so %endif %files devel @@ -529,6 +519,10 @@ fi || : %changelog +* Fri Apr 16 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.3.pre1 +- Update to 1.1.0-pre1 +- Changed summary and descriptions + * Sat Feb 27 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.5-2 - Add BR libtiger-devel diff --git a/xcb_keysym.h b/xcb_keysym.h new file mode 100644 index 0000000..3db3139 --- /dev/null +++ b/xcb_keysym.h @@ -0,0 +1,90 @@ + /* This list MUST be in XK_* incremental order (see keysymdef.h), + * so that binary search works. + * Multiple X keys can match the same VLC key. + * X key symbols must be in the first column of the struct. */ + { XK_BackSpace, KEY_BACKSPACE, }, + { XK_Tab, KEY_TAB, }, + { XK_Return, KEY_ENTER, }, + { XK_Escape, KEY_ESC, }, + { XK_Home, KEY_HOME, }, + { XK_Left, KEY_LEFT, }, + { XK_Up, KEY_UP, }, + { XK_Right, KEY_RIGHT, }, + { XK_Down, KEY_DOWN, }, + { XK_Page_Up, KEY_PAGEUP, }, + { XK_Page_Down, KEY_PAGEDOWN, }, + { XK_End, KEY_END, }, + { XK_Begin, KEY_HOME, }, + { XK_Insert, KEY_INSERT, }, + { XK_Menu, KEY_MENU }, + + /* Numeric pad keys */ + { XK_KP_Space, ' ', }, + { XK_KP_Tab, KEY_TAB, }, + { XK_KP_Enter, KEY_ENTER, }, + { XK_KP_F1, KEY_F1, }, + { XK_KP_F2, KEY_F2, }, + { XK_KP_F3, KEY_F3, }, + { XK_KP_F4, KEY_F4, }, + { XK_KP_Home, KEY_HOME, }, + { XK_KP_Left, KEY_LEFT, }, + { XK_KP_Up, KEY_UP, }, + { XK_KP_Right, KEY_RIGHT, }, + { XK_KP_Down, KEY_DOWN, }, + { XK_KP_Page_Up, KEY_PAGEUP, }, + { XK_KP_Page_Down, KEY_PAGEDOWN, }, + { XK_KP_End, KEY_END, }, + { XK_KP_Begin, KEY_HOME, }, /* KP middle (5 without numlock) */ + { XK_KP_Insert, KEY_INSERT, }, + { XK_KP_Delete, KEY_DELETE, }, + { XK_KP_Equal, '=', }, + { XK_KP_Multiply, '*', }, + { XK_KP_Add, '+', }, + { XK_KP_Separator, ',', }, + { XK_KP_Subtract, '-', }, + { XK_KP_Decimal, ',', }, /* FIXME: I don't know that key */ + { XK_KP_Divide, '/', }, + { XK_KP_0, '0', }, + { XK_KP_1, '1', }, + { XK_KP_2, '2', }, + { XK_KP_3, '3', }, + { XK_KP_4, '4', }, + { XK_KP_5, '5', }, + { XK_KP_6, '6', }, + { XK_KP_7, '7', }, + { XK_KP_8, '8', }, + { XK_KP_9, '9', }, + + { XK_F1, KEY_F1, }, + { XK_F2, KEY_F2, }, + { XK_F3, KEY_F3, }, + { XK_F4, KEY_F4, }, + { XK_F5, KEY_F5, }, + { XK_F6, KEY_F6, }, + { XK_F7, KEY_F7, }, + { XK_F8, KEY_F8, }, + { XK_F9, KEY_F9, }, + { XK_F10, KEY_F10, }, + { XK_F11, KEY_F11, }, + { XK_F12, KEY_F12, }, + { XK_Delete, KEY_DELETE, }, + + /* XFree86 extensions */ + { XF86XK_AudioLowerVolume, KEY_VOLUME_DOWN, }, + { XF86XK_AudioMute, KEY_VOLUME_MUTE, }, + { XF86XK_AudioRaiseVolume, KEY_VOLUME_UP, }, + { XF86XK_AudioPlay, KEY_MEDIA_PLAY_PAUSE, }, + { XF86XK_AudioStop, KEY_MEDIA_STOP, }, + { XF86XK_AudioPrev, KEY_MEDIA_PREV_TRACK, }, + { XF86XK_AudioNext, KEY_MEDIA_NEXT_TRACK, }, + { XF86XK_HomePage, KEY_BROWSER_HOME, }, + { XF86XK_Search, KEY_BROWSER_SEARCH, }, + { XF86XK_Back, KEY_BROWSER_BACK, }, + { XF86XK_Forward, KEY_BROWSER_FORWARD, }, + { XF86XK_Stop, KEY_BROWSER_STOP, }, + { XF86XK_Refresh, KEY_BROWSER_REFRESH, }, + { XF86XK_Favorites, KEY_BROWSER_FAVORITES, }, + { XF86XK_AudioPause, KEY_MEDIA_PLAY_PAUSE, }, + { XF86XK_Reload, KEY_BROWSER_REFRESH, }, + + From 9979bf4f1c71cb7bc67221836a78d9b6dd8a8e00 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 2 May 2010 00:01:29 +0000 Subject: [PATCH 097/671] Update to 1.1.0-pre3 --- .gitignore | 2 +- position.h | 55 -------------------------------- sources | 2 +- vlc.spec | 44 ++++++++++--------------- xcb_keysym.h | 90 ---------------------------------------------------- 5 files changed, 19 insertions(+), 174 deletions(-) delete mode 100644 position.h delete mode 100644 xcb_keysym.h diff --git a/.gitignore b/.gitignore index 328a530..d0316f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.0-pre1.tar.bz2 +vlc-1.1.0-pre3.tar.bz2 diff --git a/position.h b/position.h deleted file mode 100644 index 5f3b376..0000000 --- a/position.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************** - * position.h: Support routines for logo and marquee plugin objects - ***************************************************************************** - * Copyright (C) 2010 M2X BV - * - * Authors: JP Dinger <jpd (at) videolan (dot) org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -#ifndef POSITION_H -#define POSITION_H - -struct posidx_s { const char *n; size_t i; }; -static const posidx_s posidx[] = { - { "center", 0 }, - { "left", 1 }, - { "right", 2 }, - { "top", 4 }, - { "bottom", 8 }, - { "top-left", 5 }, - { "top-right", 6 }, - { "bottom-left", 9 }, - { "bottom-right", 10 }, -}; -enum { num_posidx = sizeof(posidx)/sizeof(*posidx) }; - -static inline const char *position_bynumber( size_t i ) -{ - for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h ) - if( h->i == i ) - return h->n; - return "undefined"; -} - -static inline bool position_byname( const char *n, size_t &i ) -{ - for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h ) - if( !strcasecmp( n, h->n ) ) - { i=h->i; return true; } - return false; -} -#endif - diff --git a/sources b/sources index 8ef4a18..3ffdeb0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2cbda5fa9b52d10d917f23a4a00dbbf5 vlc-1.1.0-pre1.tar.bz2 +b7d978b3e5285b7012d47bc0b3b74c47 vlc-1.1.0-pre3.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 46a25e9..ffcf9ea 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -pre1 +%global vlc_rc -pre3 #global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -19,7 +19,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.1.pre1%{?dist} +Release: 0.5.pre3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -28,8 +28,6 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas -Source11: xcb_keysym.h -Source12: position.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -59,7 +57,7 @@ BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel -BuildRequires: kdelibs-devel >= 4.4.0 +BuildRequires: kde-filesystem BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel @@ -78,7 +76,7 @@ BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel -BuildRequires: libmtp-devel +BuildRequires: libmtp-devel >= 1.0.0 BuildRequires: libnotify-devel BuildRequires: libprojectM-qt-devel BuildRequires: libproxy-devel @@ -146,6 +144,7 @@ BuildRequires: xorg-x11-proto-devel Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} +Requires: kde-filesystem %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts @@ -153,7 +152,7 @@ Requires: dejavu-serif-fonts %else Requires: dejavu-fonts %endif -Requires: qt-x11%{_isa} >= 1:4.5.2 +Requires: qt4%{?_isa} >= %{_qt4_version} @@ -162,8 +161,8 @@ Requires: qt-x11%{_isa} >= 1:4.5.2 VLC media player is a highly portable multimedia player and multimedia framework capable of reading most audio and video formats as well as DVDs, Audio CDs VCDs, and various streaming protocols. -It can also be used as a media converter or a server to stream in unicast or -multicast in IPv4 or IPv6 on networks. +It can also be used as a media converter or a server to stream in uni-cast or +multi-cast in IPv4 or IPv6 on networks. %package devel @@ -184,7 +183,7 @@ Requires: %{name}-xorg%{_isa} = %{version}-%{release} Requires: %{_libdir}/mozilla/plugins %description -n mozilla-vlc -This package contains a VLC media player plugin for Mozilla compatible +This package contains a VLC media player plugging for Mozilla compatible web browsers. } @@ -202,7 +201,7 @@ Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} %description nox -VLC media player with framebuffer support for X-less server. +VLC media player with frame-buffer support for X-less server. %package plugin-jack Summary: JACK audio plugin for VLC @@ -224,8 +223,6 @@ JACK audio plugin for the VLC media player. #sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.{in,am} #patch4 -p1 -b .mmx_pic -install -pm 0644 %{SOURCE11} modules/video_output/xcb/xcb_keysym.h -install -pm 0644 %{SOURCE12} projects/mozilla/control/position.h rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h %if 0%{?vlc_bootstrap:1} @@ -252,6 +249,7 @@ popd --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ + --with-kde-solid=%{_kde4_appsdir}/solid/actions \ %{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ --enable-live555 \ @@ -304,7 +302,7 @@ popd %{!?_without_mozilla:--enable-mozilla} \ -%if 0 +%if 1 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -327,17 +325,6 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' -install -dm 755 $RPM_BUILD_ROOT%{_mandir}/man1 -install -pm 644 doc/vlc*.1 $RPM_BUILD_ROOT%{_mandir}/man1 - -%if 0 -for i in 16x16 32x32 48x48 128x128 ; do - mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps - install -pm 0644 share/vlc${i}.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}/apps/vlc.png -done -%endif - desktop-file-install --vendor "" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --delete-original \ @@ -361,7 +348,6 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ -rm -rf $RPM_BUILD_ROOT%{_datadir}/kde4 %find_lang %{name} @@ -417,7 +403,7 @@ fi || : %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README THANKS %{_datadir}/applications/*%{name}.desktop -#exclude #{_datadir}/kde4/apps/solid/actions/vlc-*.desktop +%{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png %{_datadir}/icons/hicolor/*/apps/vlc*.xpm %{_datadir}/vlc/skins2/ @@ -519,8 +505,12 @@ fi || : %changelog +* Sat May 1 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.5.pre3 +- Update to 1.1.0-pre3 + * Fri Apr 16 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.3.pre1 - Update to 1.1.0-pre1 +- Built for Fedora - Changed summary and descriptions * Sat Feb 27 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.0.5-2 diff --git a/xcb_keysym.h b/xcb_keysym.h deleted file mode 100644 index 3db3139..0000000 --- a/xcb_keysym.h +++ /dev/null @@ -1,90 +0,0 @@ - /* This list MUST be in XK_* incremental order (see keysymdef.h), - * so that binary search works. - * Multiple X keys can match the same VLC key. - * X key symbols must be in the first column of the struct. */ - { XK_BackSpace, KEY_BACKSPACE, }, - { XK_Tab, KEY_TAB, }, - { XK_Return, KEY_ENTER, }, - { XK_Escape, KEY_ESC, }, - { XK_Home, KEY_HOME, }, - { XK_Left, KEY_LEFT, }, - { XK_Up, KEY_UP, }, - { XK_Right, KEY_RIGHT, }, - { XK_Down, KEY_DOWN, }, - { XK_Page_Up, KEY_PAGEUP, }, - { XK_Page_Down, KEY_PAGEDOWN, }, - { XK_End, KEY_END, }, - { XK_Begin, KEY_HOME, }, - { XK_Insert, KEY_INSERT, }, - { XK_Menu, KEY_MENU }, - - /* Numeric pad keys */ - { XK_KP_Space, ' ', }, - { XK_KP_Tab, KEY_TAB, }, - { XK_KP_Enter, KEY_ENTER, }, - { XK_KP_F1, KEY_F1, }, - { XK_KP_F2, KEY_F2, }, - { XK_KP_F3, KEY_F3, }, - { XK_KP_F4, KEY_F4, }, - { XK_KP_Home, KEY_HOME, }, - { XK_KP_Left, KEY_LEFT, }, - { XK_KP_Up, KEY_UP, }, - { XK_KP_Right, KEY_RIGHT, }, - { XK_KP_Down, KEY_DOWN, }, - { XK_KP_Page_Up, KEY_PAGEUP, }, - { XK_KP_Page_Down, KEY_PAGEDOWN, }, - { XK_KP_End, KEY_END, }, - { XK_KP_Begin, KEY_HOME, }, /* KP middle (5 without numlock) */ - { XK_KP_Insert, KEY_INSERT, }, - { XK_KP_Delete, KEY_DELETE, }, - { XK_KP_Equal, '=', }, - { XK_KP_Multiply, '*', }, - { XK_KP_Add, '+', }, - { XK_KP_Separator, ',', }, - { XK_KP_Subtract, '-', }, - { XK_KP_Decimal, ',', }, /* FIXME: I don't know that key */ - { XK_KP_Divide, '/', }, - { XK_KP_0, '0', }, - { XK_KP_1, '1', }, - { XK_KP_2, '2', }, - { XK_KP_3, '3', }, - { XK_KP_4, '4', }, - { XK_KP_5, '5', }, - { XK_KP_6, '6', }, - { XK_KP_7, '7', }, - { XK_KP_8, '8', }, - { XK_KP_9, '9', }, - - { XK_F1, KEY_F1, }, - { XK_F2, KEY_F2, }, - { XK_F3, KEY_F3, }, - { XK_F4, KEY_F4, }, - { XK_F5, KEY_F5, }, - { XK_F6, KEY_F6, }, - { XK_F7, KEY_F7, }, - { XK_F8, KEY_F8, }, - { XK_F9, KEY_F9, }, - { XK_F10, KEY_F10, }, - { XK_F11, KEY_F11, }, - { XK_F12, KEY_F12, }, - { XK_Delete, KEY_DELETE, }, - - /* XFree86 extensions */ - { XF86XK_AudioLowerVolume, KEY_VOLUME_DOWN, }, - { XF86XK_AudioMute, KEY_VOLUME_MUTE, }, - { XF86XK_AudioRaiseVolume, KEY_VOLUME_UP, }, - { XF86XK_AudioPlay, KEY_MEDIA_PLAY_PAUSE, }, - { XF86XK_AudioStop, KEY_MEDIA_STOP, }, - { XF86XK_AudioPrev, KEY_MEDIA_PREV_TRACK, }, - { XF86XK_AudioNext, KEY_MEDIA_NEXT_TRACK, }, - { XF86XK_HomePage, KEY_BROWSER_HOME, }, - { XF86XK_Search, KEY_BROWSER_SEARCH, }, - { XF86XK_Back, KEY_BROWSER_BACK, }, - { XF86XK_Forward, KEY_BROWSER_FORWARD, }, - { XF86XK_Stop, KEY_BROWSER_STOP, }, - { XF86XK_Refresh, KEY_BROWSER_REFRESH, }, - { XF86XK_Favorites, KEY_BROWSER_FAVORITES, }, - { XF86XK_AudioPause, KEY_MEDIA_PLAY_PAUSE, }, - { XF86XK_Reload, KEY_BROWSER_REFRESH, }, - - From 6fd6443f28b9352436fdbadd44dcdbf0e967b286 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 2 May 2010 08:57:30 +0000 Subject: [PATCH 098/671] Add rdieter patch --- vlc-1.1.0-vlc-cache-gen_noerror.patch | 22 ++++++++++++++++++++++ vlc.spec | 14 ++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 vlc-1.1.0-vlc-cache-gen_noerror.patch diff --git a/vlc-1.1.0-vlc-cache-gen_noerror.patch b/vlc-1.1.0-vlc-cache-gen_noerror.patch new file mode 100644 index 0000000..710629f --- /dev/null +++ b/vlc-1.1.0-vlc-cache-gen_noerror.patch @@ -0,0 +1,22 @@ +diff -up vlc-1.1.0/modules/Makefile.am.mock vlc-1.1.0/modules/Makefile.am +--- vlc-1.1.0/modules/Makefile.am.mock 2010-04-05 19:46:04.000000000 -0500 ++++ vlc-1.1.0/modules/Makefile.am 2010-04-16 12:24:52.745993752 -0500 +@@ -63,7 +63,7 @@ MOSTLYCLEANFILES = stamp-cache plugins-* + + stamp-cache: + $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ +- ../bin/vlc-cache-gen$(EXEEXT) . ; \ ++ ../bin/vlc-cache-gen$(EXEEXT) . ||: ; \ + else \ + echo "Cross-compilation: cache generation skipped!" ; \ + fi +@@ -71,7 +71,7 @@ stamp-cache: + + install-exec-hook: + if test -z "$(DESTDIR)"; then \ +- ../bin/vlc-cache-gen$(EXEEXT) "$(vlclibdir)/plugins" ; \ ++ ../bin/vlc-cache-gen$(EXEEXT) "$(vlclibdir)/plugins" ||: ; \ + else \ + echo "Staged installation: cache generation skipped!" ; \ + fi + diff --git a/vlc.spec b/vlc.spec index ffcf9ea..0207f07 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ #global live555_date 2009.07.28 %global vlc_rc -pre3 -#global vlc_bootstrap 1 +%global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_faad2 --with-faad2 @@ -19,7 +19,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.5.pre3%{?dist} +Release: 0.6.pre3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -28,6 +28,7 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas +Patch0 vlc-1.1.0-vlc-cache-gen_noerror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -217,11 +218,7 @@ JACK audio plugin for the VLC media player. %if 0%{?live555_date:1} %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif -#patch1 -p1 -b .istrue -#http://trac.videolan.org/vlc/ticket/1383 -#patch3 -p1 -b .dmo_pic -#sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.{in,am} -#patch4 -p1 -b .mmx_pic +%patch0 -p1 -b .noerror rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -505,8 +502,9 @@ fi || : %changelog -* Sat May 1 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.5.pre3 +* Sun May 2 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.6.pre3 - Update to 1.1.0-pre3 +- Add patch from rdieter * Fri Apr 16 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.3.pre1 - Update to 1.1.0-pre1 From 829b802ada8c3598d9b500026d8b81930dceed4b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 2 May 2010 08:58:00 +0000 Subject: [PATCH 099/671] Fix typo --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0207f07..fdccae9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,7 +28,7 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas -Patch0 vlc-1.1.0-vlc-cache-gen_noerror.patch +Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils From 70005633976ed41963c4faefe7f9440490e54a21 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 6 Jun 2010 22:23:53 +0000 Subject: [PATCH 100/671] Update to -rc2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 15 ++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index d0316f9..e7b15e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.0-pre3.tar.bz2 +vlc-1.1.0-rc2.tar.bz2 diff --git a/sources b/sources index 3ffdeb0..3603030 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b7d978b3e5285b7012d47bc0b3b74c47 vlc-1.1.0-pre3.tar.bz2 +352d01045f1704b8042c4d9096a21c6c vlc-1.1.0-rc2.tar.bz2 diff --git a/vlc.spec b/vlc.spec index fdccae9..2ef6a25 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -pre3 +%global vlc_rc -rc2 %global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -19,7 +19,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.6.pre3%{?dist} +Release: 0.9.rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -56,7 +56,6 @@ BuildRequires: fribidi-devel BuildRequires: gnome-vfs2-devel BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel -BuildRequires: hal-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: kde-filesystem BuildRequires: libavc1394-devel @@ -259,11 +258,14 @@ popd --enable-pvr \ --enable-gnomevfs \ %{?_with_vcdimager--enable-vcdx} \ +%if 0 %{?_with_freeworld:--enable-wma-fixed} \ %{?_with_freeworld:--enable-shine} \ +%endif --enable-omxil \ - --disable-a52 \ -%{!?_with_ffmpeg:--disable-avcodec --disable-avformat --disable-swscale --disable-postproc} \ +%{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ + --disable-swscale --disable-postproc --disable-a52 +} \ %{?_with_faad2:--enable-faad} \ %{!?_with_libmad:--disable-mad} \ %{?_with_twolame:--enable-twolame} \ @@ -502,6 +504,9 @@ fi || : %changelog +* Fri Jun 04 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.9.rc2 +- Update to 1.1.0-rc2 + * Sun May 2 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.1.0-0.6.pre3 - Update to 1.1.0-pre3 - Add patch from rdieter From 960c7daf02156c0ff470fc71368e2ea4a6adb8a8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 7 Jun 2010 09:23:28 +0000 Subject: [PATCH 101/671] Fix a52dec conditional --- vlc.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 2ef6a25..b9f0b71 100644 --- a/vlc.spec +++ b/vlc.spec @@ -3,6 +3,7 @@ %global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} +%global _with_a52dec --with-a52dec %global _with_faad2 --with-faad2 %global _with_ffmpeg --with-ffmpeg %global _with_libdca --with-libdca @@ -19,7 +20,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.9.rc2%{?dist} +Release: 0.10.rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -263,9 +264,9 @@ popd %{?_with_freeworld:--enable-shine} \ %endif --enable-omxil \ +%{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ - --disable-swscale --disable-postproc --disable-a52 -} \ + --disable-swscale --disable-postproc} \ %{?_with_faad2:--enable-faad} \ %{!?_with_libmad:--disable-mad} \ %{?_with_twolame:--enable-twolame} \ @@ -504,6 +505,9 @@ fi || : %changelog +* Mon Jun 07 2010 kwizart@gmail.com - 1.1.0-0.10.rc2 +- Fix --with a52dec conditional + * Fri Jun 04 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.9.rc2 - Update to 1.1.0-rc2 From edc6bf0e6f38c7e70f05c1ce819ecad6c627d516 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jun 2010 19:58:19 +0000 Subject: [PATCH 102/671] Fix segfault on dlopen --- vlc.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index b9f0b71..e4c5875 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.10.rc2%{?dist} +Release: 0.11.rc2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -30,6 +30,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch +Patch1: vlc-1.1.0-bugfix-dlopen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -219,6 +220,7 @@ JACK audio plugin for the VLC media player. %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .noerror +%patch1 -p1 -b .0dlopen rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -505,7 +507,10 @@ fi || : %changelog -* Mon Jun 07 2010 kwizart@gmail.com - 1.1.0-0.10.rc2 +* Tue Jun 08 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.11.rc2 +- Fix segfault on dlopen + +* Mon Jun 07 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.10.rc2 - Fix --with a52dec conditional * Fri Jun 04 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.9.rc2 From 616673ea29076c2a3af4e7167e2630ec05184f16 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jun 2010 20:01:38 +0000 Subject: [PATCH 103/671] Add patch --- vlc-1.1.0-bugfix-dlopen.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vlc-1.1.0-bugfix-dlopen.patch diff --git a/vlc-1.1.0-bugfix-dlopen.patch b/vlc-1.1.0-bugfix-dlopen.patch new file mode 100644 index 0000000..1cb398b --- /dev/null +++ b/vlc-1.1.0-bugfix-dlopen.patch @@ -0,0 +1,14 @@ +diff --git a/bin/override.c b/bin/override.c +index 54ca687..5e72918 100644 +--- a/bin/override.c ++++ b/bin/override.c +@@ -297,7 +297,7 @@ int (*XSetIOErrorHandler (int (*handler) (Display *))) (Display *) + + void *dlopen (const char *path, int flag) + { +- if (strstr (path, "/gui_platform/libkde.so")) ++ if (path && strstr (path, "/gui_platform/libkde.so")) + return NULL; /* Oh no, not that one! */ + return CALL(dlopen, path, flag); + } + From c3321b89103d97add74f17f68aaa9517e450e87d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 13 Jun 2010 19:33:26 +0000 Subject: [PATCH 104/671] -Update to -rc3 -Recover libxcb_screen_plugin.so (thx nucleo) --- vlc.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index e4c5875..87358c4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -rc2 +%global vlc_rc -rc3 %global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -20,7 +20,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.11.rc2%{?dist} +Release: 0.12.rc3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -30,7 +30,6 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch -Patch1: vlc-1.1.0-bugfix-dlopen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -220,7 +219,6 @@ JACK audio plugin for the VLC media player. %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .noerror -%patch1 -p1 -b .0dlopen rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -350,6 +348,12 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ +#Workaround scaled pixmaps +pushd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor + for s in 16 32 48 128 256 ; do + ln -s vlc${s}x${s}.png ${s}x${s}/apps/vlc.png + done +popd %find_lang %{name} @@ -413,6 +417,7 @@ fi || : %{_bindir}/svlc %{_libdir}/vlc/plugins/gui/libqt4_plugin.so %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so +%{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -507,6 +512,9 @@ fi || : %changelog +* Sat Jun 12 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.12.rc3 +- Update to -rc3 + * Tue Jun 08 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.11.rc2 - Fix segfault on dlopen From 2b2229430400ea930cdfb2fa4f8e483303fe2345 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 13 Jun 2010 19:34:11 +0000 Subject: [PATCH 105/671] Update to -rc3 --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e7b15e5..3c08be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.0-rc2.tar.bz2 +vlc-1.1.0-rc3.tar.bz2 diff --git a/sources b/sources index 3603030..85482fe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -352d01045f1704b8042c4d9096a21c6c vlc-1.1.0-rc2.tar.bz2 +6f7256484223f11c21e8c92d4b8df379 vlc-1.1.0-rc3.tar.bz2 From 76d55b579f4fb913f3e7a0115220254803177f7c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 1 Jul 2010 22:15:44 +0000 Subject: [PATCH 106/671] Update to 1.1.0 Final --- .gitignore | 2 +- sources | 2 +- vlc.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3c08be4..14cca26 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.0-rc3.tar.bz2 +vlc-1.1.0.tar.bz2 diff --git a/sources b/sources index 85482fe..d195604 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6f7256484223f11c21e8c92d4b8df379 vlc-1.1.0-rc3.tar.bz2 +e2142957137b183a5ad0a4827c39f655 vlc-1.1.0.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 87358c4..78a12ee 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -rc3 +#global vlc_rc -rc3 %global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -17,10 +17,11 @@ %global _with_live555 --with-live55 %endif + Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 0.12.rc3%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -512,6 +513,9 @@ fi || : %changelog +* Thu Jul 01 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-1 +- Update to 1.1.0 + * Sat Jun 12 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-0.12.rc3 - Update to -rc3 From d1f69eeca2b4a76ebe85d0d39ed71ff3a9496e91 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 15 Jul 2010 21:43:50 +0000 Subject: [PATCH 107/671] Disable notify --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 78a12ee..9f965d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,7 +21,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -295,6 +295,7 @@ popd --enable-xosd \ --enable-fbosd \ --enable-lirc \ + --disable-notify \ %ifarch %{ix86} --enable-loader \ %else @@ -513,6 +514,9 @@ fi || : %changelog +* Thu Jul 15 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-2 +- Disable notify + * Thu Jul 01 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-1 - Update to 1.1.0 From be7d9c44bb473f1697d865b8fa50239ceb315241 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 Aug 2010 15:49:59 +0000 Subject: [PATCH 108/671] Update to 1.1.2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 14cca26..9b31ae1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.0.tar.bz2 +vlc-1.1.2.tar.bz2 diff --git a/sources b/sources index d195604..c5dad73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e2142957137b183a5ad0a4827c39f655 vlc-1.1.0.tar.bz2 +dec11ed850e044c518aee6fef7e7f893 vlc-1.1.2.tar.bz2 diff --git a/vlc.spec b/vlc.spec index 9f965d4..b9f5edd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,8 +20,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.0 -Release: 2%{?dist} +Version: 1.1.2 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -295,7 +295,6 @@ popd --enable-xosd \ --enable-fbosd \ --enable-lirc \ - --disable-notify \ %ifarch %{ix86} --enable-loader \ %else @@ -514,8 +513,8 @@ fi || : %changelog -* Thu Jul 15 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-2 -- Disable notify +* Thu Aug 05 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.2-1 +- Update to 1.1.2 * Thu Jul 01 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.0-1 - Update to 1.1.0 From fecaa5df38e45799ab7d5edd20a4b999b8f18597 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 Aug 2010 16:03:57 +0000 Subject: [PATCH 109/671] Identation fix --- vlc.spec | 104 +++++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/vlc.spec b/vlc.spec index b9f5edd..9f4ac51 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -#global live555_date 2009.07.28 -#global vlc_rc -rc3 -%global vlc_bootstrap 1 +#global live555_date 2009.07.28 +#global vlc_rc -rc3 +%global vlc_bootstrap 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_a52dec --with-a52dec @@ -29,13 +29,13 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} %if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif -Source10: vlc-handlers.schemas -Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch +Source10: vlc-handlers.schemas +Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: desktop-file-utils -BuildRequires: gettext -BuildRequires: prelink +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: prelink %if 0%{?vlc_bootstrap:1} BuildRequires: gettext-devel @@ -46,21 +46,21 @@ BuildRequires: libtool BuildRequires: aalib-devel BuildRequires: alsa-lib-devel BuildRequires: avahi-devel -BuildRequires: cdparanoia-devel -BuildRequires: dbus-devel -BuildRequires: dirac-devel >= 1.0.0 +BuildRequires: cdparanoia-devel +BuildRequires: dbus-devel +BuildRequires: dirac-devel >= 1.0.0 %{!?_without_directfb:BuildRequires: directfb-devel} %{?_with_faad2:BuildRequires: faad2-devel} %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel -BuildRequires: fluidsynth-devel +BuildRequires: fluidsynth-devel BuildRequires: fribidi-devel -BuildRequires: gnome-vfs2-devel +BuildRequires: gnome-vfs2-devel BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: jack-audio-connection-kit-devel -BuildRequires: kde-filesystem -BuildRequires: libavc1394-devel +BuildRequires: kde-filesystem +BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel @@ -70,74 +70,74 @@ BuildRequires: libdc1394-devel >= 2.1.0 BuildRequires: libdv-devel %{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel -BuildRequires: libebml-devel +BuildRequires: libebml-devel BuildRequires: libid3tag-devel -BuildRequires: libkate-devel +BuildRequires: libkate-devel %{?_with_libmad:BuildRequires: libmad-devel} BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel >= 1.0.0 -BuildRequires: libnotify-devel -BuildRequires: libprojectM-qt-devel -BuildRequires: libproxy-devel +BuildRequires: libnotify-devel +BuildRequires: libprojectM-qt-devel +BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 BuildRequires: libssh2-devel BuildRequires: libsysfs-devel -BuildRequires: libshout-devel -BuildRequires: libsmbclient-devel +BuildRequires: libshout-devel +BuildRequires: libsmbclient-devel BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel -BuildRequires: libtiff-devel -BuildRequires: libudev-devel >= 142 -BuildRequires: libupnp-devel +BuildRequires: libtiff-devel +BuildRequires: libudev-devel >= 142 +BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} BuildRequires: libvorbis-devel -BuildRequires: libxml2-devel +BuildRequires: libxml2-devel BuildRequires: lirc-devel %{?_with_live555:BuildRequires: live555-devel >= 0-0.19.2008.04.03} BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel -BuildRequires: libmusicbrainz-devel -BuildRequires: libshout-devel -BuildRequires: lua-devel -BuildRequires: minizip-devel +BuildRequires: libmusicbrainz-devel +BuildRequires: libshout-devel +BuildRequires: lua-devel +BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel -BuildRequires: opencv-devel -BuildRequires: openslp-devel -BuildRequires: pcre-devel -BuildRequires: pulseaudio-libs-devel >= 0.9.8 -BuildRequires: portaudio-devel -BuildRequires: qt4-devel >= 4.5.2 -BuildRequires: schroedinger-devel +BuildRequires: opencv-devel +BuildRequires: openslp-devel +BuildRequires: pcre-devel +BuildRequires: pulseaudio-libs-devel >= 0.9.8 +BuildRequires: portaudio-devel +BuildRequires: qt4-devel >= 4.5.2 +BuildRequires: schroedinger-devel BuildRequires: SDL_image-devel BuildRequires: speex-devel >= 1.1.5 %ifarch %{ix86} x86_64 -BuildRequires: svgalib-devel +BuildRequires: svgalib-devel %endif -BuildRequires: taglib-devel +BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} %{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} %{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} BuildRequires: xosd-devel %{?_with_xvidcore:BuildRequires: xvidcore-devel} BuildRequires: zlib-devel -BuildRequires: zvbi-devel +BuildRequires: zvbi-devel # X-libs BuildRequires: libXt-devel BuildRequires: libXv-devel -BuildRequires: libXxf86vm-devel -BuildRequires: libX11-devel -BuildRequires: libXext-devel -BuildRequires: libXpm-devel -BuildRequires: xcb-util-devel -BuildRequires: xorg-x11-proto-devel +BuildRequires: libXxf86vm-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXpm-devel +BuildRequires: xcb-util-devel +BuildRequires: xorg-x11-proto-devel %{!?_without_mozilla:BuildRequires: gecko-devel nspr-devel} @@ -200,7 +200,7 @@ VLC media player core components %package nox Summary: VLC media player without Xorg Group: Applications/Multimedia -Requires: vlc-core%{_isa} = %{version}-%{release} +Requires: vlc-core%{_isa} = %{version}-%{release} %description nox VLC media player with frame-buffer support for X-less server. @@ -208,7 +208,7 @@ VLC media player with frame-buffer support for X-less server. %package plugin-jack Summary: JACK audio plugin for VLC Group: Applications/Multimedia -Requires: vlc-core%{_isa} = %{version}-%{release} +Requires: vlc-core%{_isa} = %{version}-%{release} %description plugin-jack JACK audio plugin for the VLC media player. @@ -249,7 +249,7 @@ popd --with-tuning=no \ --with-kde-solid=%{_kde4_appsdir}/solid/actions \ %{?_with_ffmpeg:--enable-switcher} \ - --enable-lua \ + --enable-lua \ --enable-live555 \ %if 0%{?live555_date:1} --with-live555-tree=live \ @@ -265,9 +265,9 @@ popd %{?_with_freeworld:--enable-shine} \ %endif --enable-omxil \ -%{!?_with_a52dec:--disable-a52} \ +%{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ - --disable-swscale --disable-postproc} \ + --disable-swscale --disable-postproc} \ %{?_with_faad2:--enable-faad} \ %{!?_with_libmad:--disable-mad} \ %{?_with_twolame:--enable-twolame} \ @@ -289,7 +289,7 @@ popd --enable-aa \ --enable-caca \ --enable-jack \ - --enable-portaudio \ + --enable-portaudio \ --enable-pulse \ --enable-ncurses \ --enable-xosd \ From 30a14296282755548d4c8b38e1677f857fadd425 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 Aug 2010 16:08:31 +0000 Subject: [PATCH 110/671] Remove workaround to install icons --- vlc.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9f4ac51..d12cc76 100644 --- a/vlc.spec +++ b/vlc.spec @@ -349,12 +349,6 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc #mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ -#Workaround scaled pixmaps -pushd $RPM_BUILD_ROOT%{_datadir}/icons/hicolor - for s in 16 32 48 128 256 ; do - ln -s vlc${s}x${s}.png ${s}x${s}/apps/vlc.png - done -popd %find_lang %{name} From b87686881ec7df506b86c54d60e8ca2e277b6c87 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 Aug 2010 16:13:07 +0000 Subject: [PATCH 111/671] Remove uneeded patch --- vlc-1.1.0-bugfix-dlopen.patch | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 vlc-1.1.0-bugfix-dlopen.patch diff --git a/vlc-1.1.0-bugfix-dlopen.patch b/vlc-1.1.0-bugfix-dlopen.patch deleted file mode 100644 index 1cb398b..0000000 --- a/vlc-1.1.0-bugfix-dlopen.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/bin/override.c b/bin/override.c -index 54ca687..5e72918 100644 ---- a/bin/override.c -+++ b/bin/override.c -@@ -297,7 +297,7 @@ int (*XSetIOErrorHandler (int (*handler) (Display *))) (Display *) - - void *dlopen (const char *path, int flag) - { -- if (strstr (path, "/gui_platform/libkde.so")) -+ if (path && strstr (path, "/gui_platform/libkde.so")) - return NULL; /* Oh no, not that one! */ - return CALL(dlopen, path, flag); - } - From 0894273ca089a51416c3b55823aaf04359d241e9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 20 Aug 2010 22:30:24 +0000 Subject: [PATCH 112/671] Update to 1.1.3 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 9b31ae1..fe8818b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.2.tar.bz2 +vlc-1.1.3.tar.bz2 diff --git a/sources b/sources index c5dad73..bacec43 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dec11ed850e044c518aee6fef7e7f893 vlc-1.1.2.tar.bz2 +b8ba8b6687d19dadcf3eb148ca525603 vlc-1.1.3.tar.bz2 diff --git a/vlc.spec b/vlc.spec index d12cc76..fe3c679 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.2 +Version: 1.1.3 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -148,7 +148,7 @@ Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} Requires: kde-filesystem -%if 0%{?fedora} > 10 +%if 0%{?fedora} > 10 || 0%{rhel} > 5 Requires: dejavu-sans-fonts Requires: dejavu-serif-fonts %else @@ -413,6 +413,7 @@ fi || : %{_libdir}/vlc/plugins/gui/libqt4_plugin.so %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so +%{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -425,9 +426,10 @@ fi || : %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so -%if 0%{fedora} > 11 +%if 0%{fedora} > 11 || 0%{rhel} > 5 %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif +%{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %files core -f %{name}.lang @@ -445,6 +447,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +%exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %exclude %{_libdir}/vlc/plugins/misc/libsvg_plugin.so %exclude %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -463,9 +466,10 @@ fi || : %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so -%if 0%{fedora} > 11 +%if 0%{fedora} > 11 || 0%{rhel} > 5 %exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif +%exclude %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so @@ -507,6 +511,10 @@ fi || : %changelog +* Sat Aug 21 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.3-1 +- Update to 1.1.3 +- move some plugin from core to main + * Thu Aug 05 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.2-1 - Update to 1.1.2 From 8c6b53e5c776fc10b320657358560a7c460074ca Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 20 Aug 2010 22:35:13 +0000 Subject: [PATCH 113/671] Fix Conditional --- vlc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index fe3c679..a3dc505 100644 --- a/vlc.spec +++ b/vlc.spec @@ -148,7 +148,7 @@ Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} Requires: kde-filesystem -%if 0%{?fedora} > 10 || 0%{rhel} > 5 +%if 0%{?fedora} > 10 || 0%{?rhel} > 5 Requires: dejavu-sans-fonts Requires: dejavu-serif-fonts %else @@ -426,7 +426,7 @@ fi || : %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so -%if 0%{fedora} > 11 || 0%{rhel} > 5 +%if 0%{?fedora} > 11 || 0%{?rhel} > 5 %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so @@ -466,7 +466,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so -%if 0%{fedora} > 11 || 0%{rhel} > 5 +%if 0%{?fedora} > 11 || 0%{?rhel} > 5 %exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif %exclude %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so From 053882e133ed4f98695ddf95e2f9858f27089aa0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 28 Aug 2010 14:29:54 +0000 Subject: [PATCH 114/671] - Update to 1.1.4 - Fix libnotify build on f14 - Obsoletes ffmpeg4vlc - Raise selinux requirements that fix rhbz#591854 --- .gitignore | 2 +- 0001-Libnotify-depends-on-a-gtk.patch | 27 +++++++++++++++++++++++++++ sources | 2 +- vlc.spec | 17 ++++++++++++++++- 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 0001-Libnotify-depends-on-a-gtk.patch diff --git a/.gitignore b/.gitignore index fe8818b..f0816fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.3.tar.bz2 +vlc-1.1.4.tar.bz2 diff --git a/0001-Libnotify-depends-on-a-gtk.patch b/0001-Libnotify-depends-on-a-gtk.patch new file mode 100644 index 0000000..66e378f --- /dev/null +++ b/0001-Libnotify-depends-on-a-gtk.patch @@ -0,0 +1,27 @@ +From 967294c285981da403d3c3cd9c7d5616a6f96288 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger <dominique@leuenberger.net> +Date: Fri, 27 Aug 2010 22:30:00 +0200 +Subject: [PATCH] Libnotify depends on *a* GTK version (can be gtk-2.0 or gtk-3.0). + +As both are possible, libnotify can not drag the dependency in automatically, and as such +the applications being built have to decide upon it. At this time, gtk-2.0 is the logical choice. +--- + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7650ade..a60e4c5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1691,7 +1691,7 @@ AS_IF([test "${enable_growl}" != "no"], [ + dnl + dnl Libnotify notification plugin + dnl +-PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify], [libnotify notification], [auto]) ++PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto]) + + dnl + dnl Taglibplugin +-- +1.7.1 + diff --git a/sources b/sources index bacec43..806ec3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b8ba8b6687d19dadcf3eb148ca525603 vlc-1.1.3.tar.bz2 +b71aacaa242f8050a64c6ffe09d6f067 vlc-1.1.4.tar.bz2 diff --git a/vlc.spec b/vlc.spec index a3dc505..2896217 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.3 +Version: 1.1.4 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -31,6 +31,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Source10: vlc-handlers.schemas Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch +Patch1: 0001-Libnotify-depends-on-a-gtk.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -193,6 +194,13 @@ web browsers. %package core Summary: VLC media player core Group: Applications/Multimedia +%if 0%{?fedora} >= 13 +Conflicts: selinux-policy-targeted < 3.7.19-51 +%endif +Provides: ffmpeg4vlc-libs = 0.6-0.5 +Provides: ffmpeg4vlc-devel = 0.6-0.5 +Obsoletes: ffmpeg4vlc-libs < 0.6-0.5 +Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 %description core VLC media player core components @@ -220,6 +228,7 @@ JACK audio plugin for the VLC media player. %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .noerror +%patch1 -p1 -b .gtk23 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -511,6 +520,12 @@ fi || : %changelog +* Sat Aug 28 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-1 +- Update to 1.1.4 +- Fix libnotify build on f14 +- Obsoletes ffmpeg4vlc +- Raise selinux requirements that fix rhbz#591854 + * Sat Aug 21 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.3-1 - Update to 1.1.3 - move some plugin from core to main From 5dd942c79580d664cea3cb445e974cabd1c4455d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 5 Sep 2010 10:49:21 +0000 Subject: [PATCH 115/671] - Adds support for vlc-cache-gen - Drop support for vlc-handlers.schemas (will be handled in .desktop file) --- vlc.spec | 64 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/vlc.spec b/vlc.spec index 2896217..767e0b9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,7 +21,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -29,7 +29,6 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} %if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif -Source10: vlc-handlers.schemas Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch1: 0001-Libnotify-depends-on-a-gtk.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -354,10 +353,6 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc -#Fix CGonf2 url-handler support -#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas -install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ - %find_lang %{name} @@ -366,22 +361,7 @@ install -pm 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vlc/utils/ rm -rf $RPM_BUILD_ROOT -%pre -if [ "$1" -gt 1 ] ; then -if [ -x %{_bindir}/gconftool-2 ] ; then -export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` -gconftool-2 --makefile-uninstall-rule \ - %{_datadir}/vlc/utils/vlc-handlers.schemas >/dev/null -fi -fi || : - - %post -if [ -x %{_bindir}/gconftool-2 ] ; then -export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` -gconftool-2 --makefile-install-rule \ - %{_datadir}/vlc/utils/vlc-handlers.schemas >/dev/null -fi touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -390,15 +370,6 @@ fi %post core -p /sbin/ldconfig -%preun -if [ "$1" -eq 0 ]; then -if [ -x %{_bindir}/gconftool-2 ] ; then - export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` - gconftool-2 --makefile-uninstall-rule \ - %{_datadir}/vlc/utils/vlc-handlers.schemas >& /dev/null -fi -fi || : - %postun %{_bindir}/update-desktop-database %{_datadir}/applications touch --no-create %{_datadir}/icons/hicolor @@ -408,6 +379,34 @@ fi || : %postun core -p /sbin/ldconfig +%posttrans core +%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : + +%post nox +if [ $1 == 1 ] ; then + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : +fi + +%post plugin-jack +if [ $1 == 1 ] ; then + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : +fi + +%postun nox +if [ $1 == 0 ] ; then + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : +fi + +%postun plugin-jack +if [ $1 == 0 ] ; then + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : +fi + +%preun core +if [ $1 == 0 ] ; then + rm -rf %{_libdir}/vlc/plugins-*-*.dat +fi || : + %files %defattr(-,root,root,-) @@ -520,6 +519,11 @@ fi || : %changelog +* Sun Sep 05 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-2 +- Adds support for vlc-cache-gen +- Drop support for vlc-handlers.schemas + (will be handled in .desktop file) + * Sat Aug 28 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-1 - Update to 1.1.4 - Fix libnotify build on f14 From 1a59c074fc2b5754acc8ccb60c73c8c81c6fd1a8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 17 Oct 2010 16:09:50 +0000 Subject: [PATCH 116/671] - Explicitely use -fPIC compilation even for dmo plugin - Silence post scriptlet --- vlc.spec | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/vlc.spec b/vlc.spec index 767e0b9..471b2b3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,7 +21,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -228,6 +228,7 @@ JACK audio plugin for the VLC media player. %endif %patch0 -p1 -b .noerror %patch1 -p1 -b .gtk23 +sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -252,6 +253,7 @@ popd %configure \ --disable-dependency-tracking \ + --with-pic \ --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ @@ -366,12 +368,12 @@ touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi -%{_bindir}/update-desktop-database %{_datadir}/applications || : +%{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null || : %post core -p /sbin/ldconfig %postun -%{_bindir}/update-desktop-database %{_datadir}/applications +%{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -380,26 +382,26 @@ fi || : %postun core -p /sbin/ldconfig %posttrans core -%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : +%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : %post nox if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi %post plugin-jack if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi %postun nox if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi %postun plugin-jack if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc || : + %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi %preun core @@ -519,6 +521,10 @@ fi || : %changelog +* Sun Oct 17 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-3 +- Explicitely use -fPIC compilation even for dmo plugin +- Silence post scriptlet + * Sun Sep 05 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-2 - Adds support for vlc-cache-gen - Drop support for vlc-handlers.schemas From 1a5dd792d86c4984b893a7d251e55d45d18bcccf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 24 Oct 2010 17:01:53 +0000 Subject: [PATCH 117/671] Workaround for taglib not been tread safe --- vlc-1.1.0-pending-taglib-not-tread_safe.patch | 40 +++++++++++++++++++ vlc.spec | 7 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 vlc-1.1.0-pending-taglib-not-tread_safe.patch diff --git a/vlc-1.1.0-pending-taglib-not-tread_safe.patch b/vlc-1.1.0-pending-taglib-not-tread_safe.patch new file mode 100644 index 0000000..cf6ece6 --- /dev/null +++ b/vlc-1.1.0-pending-taglib-not-tread_safe.patch @@ -0,0 +1,40 @@ +From: Rafaël Carré <rafael.carre@gmail.com> +Date: Sun, 24 Oct 2010 16:14:33 +0000 (+0200) +Subject: taglib is not thread-safe +X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=8675d26cea713ca9ebae3b91bd7c3e9bb320dcb1;hp=2ad5d811df1fcb2c0229d9e21fdd93d43344d19c + +taglib is not thread-safe + +Fix ticket #3958 +--- + +diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp +index 33866d0..f67dbda 100644 +--- a/modules/meta_engine/taglib.cpp ++++ b/modules/meta_engine/taglib.cpp +@@ -77,6 +77,8 @@ + #include <textidentificationframe.h> + #include <uniquefileidentifierframe.h> + ++// taglib is not thread safe ++static vlc_mutex_t taglib_lock = VLC_STATIC_MUTEX; + + // Local functions + static int ReadMeta ( vlc_object_t * ); +@@ -363,6 +365,7 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_t *p_demux, demux_meta_t *p_de + */ + static int ReadMeta( vlc_object_t* p_this) + { ++ vlc_mutex_locker locker (&taglib_lock); + demux_meta_t* p_demux_meta = (demux_meta_t *)p_this; + demux_t* p_demux = p_demux_meta->p_demux; + vlc_meta_t* p_meta; +@@ -585,6 +588,7 @@ static void WriteMetaToXiph( Ogg::XiphComment* tag, input_item_t* p_item ) + + static int WriteMeta( vlc_object_t *p_this ) + { ++ vlc_mutex_locker locker (&taglib_lock); + meta_export_t *p_export = (meta_export_t *)p_this; + input_item_t *p_item = p_export->p_item; + FileRef f; + diff --git a/vlc.spec b/vlc.spec index 471b2b3..7a56097 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,7 +21,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -31,6 +31,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch1: 0001-Libnotify-depends-on-a-gtk.patch +Patch2: vlc-1.1.0-pending-taglib-not-tread_safe.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -228,6 +229,7 @@ JACK audio plugin for the VLC media player. %endif %patch0 -p1 -b .noerror %patch1 -p1 -b .gtk23 +%patch2 -p1 -b .taglib_ts sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -521,6 +523,9 @@ fi || : %changelog +* Sun Oct 24 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-4 +- Workaround for taglib not been tread safe + * Sun Oct 17 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-3 - Explicitely use -fPIC compilation even for dmo plugin - Silence post scriptlet From b1e9b836c81c112629d36a41957ab8a839df1fbb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 9 Nov 2010 09:04:37 +0000 Subject: [PATCH 118/671] Enable vaapi --- vlc.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 7a56097..0168b2c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -14,14 +14,15 @@ %global _with_vcdimager --with-vcdimager %global _with_x264 --with-x264 %global _with_xvidcore --with-xvidcore -%global _with_live555 --with-live55 +%global _with_live555 --with-live555 +%global _with_vaapi --with-vaapi %endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -523,6 +524,9 @@ fi || : %changelog +* Tue Nov 09 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-5 +- Enable VAAPI + * Sun Oct 24 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-4 - Workaround for taglib not been tread safe From f1f06a0a023d3df79d8a0e9c838a266fd65169f6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 10 Nov 2010 22:19:32 +0000 Subject: [PATCH 119/671] - Disable notify by f15 - deprecated upstream - Fix libProjectM crash once selected. - Fix default CA file for gnutls module. --- vlc-1.1.4-hardode_font_patch.patch | 15 +++++++++++++++ vlc-1.1.4-tls_path.patch | 14 ++++++++++++++ vlc.spec | 23 +++++++++++++++++++++-- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 vlc-1.1.4-hardode_font_patch.patch create mode 100644 vlc-1.1.4-tls_path.patch diff --git a/vlc-1.1.4-hardode_font_patch.patch b/vlc-1.1.4-hardode_font_patch.patch new file mode 100644 index 0000000..ea67d0a --- /dev/null +++ b/vlc-1.1.4-hardode_font_patch.patch @@ -0,0 +1,15 @@ +diff -up vlc-1.1.4/modules/visualization/projectm.cpp.hardcode vlc-1.1.4/modules/visualization/projectm.cpp +--- vlc-1.1.4/modules/visualization/projectm.cpp.hardcode 2010-04-13 02:22:27.000000000 +0200 ++++ vlc-1.1.4/modules/visualization/projectm.cpp 2010-11-10 22:52:59.496688406 +0100 +@@ -75,9 +75,9 @@ vlc_module_begin () + #else + add_file( "projectm-preset-path", "/usr/share/projectM/presets", NULL, + PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true ) +- add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL, ++ add_file( "projectm-title-font", "/usr/share/fonts/dejavu/DejaVuSans.ttf", NULL, + TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true ) +- add_file( "projectm-menu-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf", NULL, ++ add_file( "projectm-menu-font", "/usr/share/fonts/dejavu/DejaVuSansMono.ttf", NULL, + MENU_FONT_TXT, MENU_FONT_LONGTXT, true ) + #endif + add_integer( "projectm-width", 800, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, diff --git a/vlc-1.1.4-tls_path.patch b/vlc-1.1.4-tls_path.patch new file mode 100644 index 0000000..cea8ebe --- /dev/null +++ b/vlc-1.1.4-tls_path.patch @@ -0,0 +1,14 @@ +diff -up vlc-1.1.4/modules/misc/gnutls.c.tls_path vlc-1.1.4/modules/misc/gnutls.c +--- vlc-1.1.4/modules/misc/gnutls.c.tls_path 2010-06-08 00:57:45.000000000 +0200 ++++ vlc-1.1.4/modules/misc/gnutls.c 2010-11-10 23:13:01.390977175 +0100 +@@ -695,8 +695,8 @@ static int OpenClient (vlc_object_t *obj + const char *confdir = config_GetConfDir (); + { + char path[strlen (confdir) +- + sizeof ("/ssl/certs/ca-certificates.crt")]; +- sprintf (path, "%s/ssl/certs/ca-certificates.crt", confdir); ++ + sizeof ("/pki/tls/certs/ca-bundle.crt")]; ++ sprintf (path, "%s/pki/tls/certs/ca-bundle.crt", confdir); + gnutls_Addx509File (VLC_OBJECT (p_session), + p_sys->x509_cred, path, false); + } diff --git a/vlc.spec b/vlc.spec index 0168b2c..c8d611b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.4 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -32,7 +32,9 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch1: 0001-Libnotify-depends-on-a-gtk.patch -Patch2: vlc-1.1.0-pending-taglib-not-tread_safe.patch +Patch2: vlc-1.1.0-pending-taglib-not-tread_safe.patch +Patch3: vlc-1.1.4-hardode_font_patch.patch +Patch4: vlc-1.1.4-tls_path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -81,7 +83,9 @@ BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel >= 1.0.0 +%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 BuildRequires: libnotify-devel +%endif BuildRequires: libprojectM-qt-devel BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 @@ -152,6 +156,7 @@ Requires: kde-filesystem %if 0%{?fedora} > 10 || 0%{?rhel} > 5 Requires: dejavu-sans-fonts +Requires: dejavu-sans-mono-fonts Requires: dejavu-serif-fonts %else Requires: dejavu-fonts @@ -231,6 +236,8 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch1 -p1 -b .gtk23 %patch2 -p1 -b .taglib_ts +%patch3 -p1 -b .hardode_path +%patch4 -p1 -b .tls_path sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -260,6 +267,9 @@ popd --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ +%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 + --disable-notify \ +%endif --with-kde-solid=%{_kde4_appsdir}/solid/actions \ %{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ @@ -428,7 +438,9 @@ fi || : %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so +%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 %{_libdir}/vlc/plugins/misc/libnotify_plugin.so +%endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so @@ -462,7 +474,9 @@ fi || : %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %exclude %{_libdir}/vlc/plugins/misc/libsvg_plugin.so +%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 %exclude %{_libdir}/vlc/plugins/misc/libnotify_plugin.so +%endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so @@ -524,6 +538,11 @@ fi || : %changelog +* Wed Nov 10 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-6 +- Disable notify by f15 - deprecated upstream +- Fix libProjectM crash once selected. +- Fix default CA file for gnutls module. + * Tue Nov 09 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-5 - Enable VAAPI From 6c126ef8b1302b660941f59abb6ee85c377e9f5f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 10 Nov 2010 22:30:41 +0000 Subject: [PATCH 120/671] -Fix conditionals --- vlc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index c8d611b..8286ae5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -83,7 +83,7 @@ BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel >= 1.0.0 -%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 +%if 0%{?fedora} < 15 BuildRequires: libnotify-devel %endif BuildRequires: libprojectM-qt-devel @@ -267,7 +267,7 @@ popd --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ -%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 +%if 0%{?fedora} < 15 --disable-notify \ %endif --with-kde-solid=%{_kde4_appsdir}/solid/actions \ @@ -438,7 +438,7 @@ fi || : %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so -%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 +%if 0%{?fedora} < 15 %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -474,7 +474,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %exclude %{_libdir}/vlc/plugins/misc/libsvg_plugin.so -%if 0%{?fedora} < 15 || 0%{?rhel} =< 6 +%if 0%{?fedora} < 15 %exclude %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so From a98b99e865d811884c0b21644d5ee73b656bcaf3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 11 Nov 2010 15:56:53 +0000 Subject: [PATCH 121/671] Fix build --- vlc.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index 8286ae5..ec224b1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -130,7 +130,7 @@ BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} %{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} %{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} -BuildRequires: xosd-devel +%{?_with_xosd:BuildRequires: xosd-devel} %{?_with_xvidcore:BuildRequires: xvidcore-devel} BuildRequires: zlib-devel BuildRequires: zvbi-devel @@ -267,7 +267,7 @@ popd --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ -%if 0%{?fedora} < 15 +%if 0%{?fedora} > 14 --disable-notify \ %endif --with-kde-solid=%{_kde4_appsdir}/solid/actions \ @@ -315,7 +315,7 @@ popd --enable-portaudio \ --enable-pulse \ --enable-ncurses \ - --enable-xosd \ +%{?_with_xosd:--enable-xosd} \ --enable-fbosd \ --enable-lirc \ %ifarch %{ix86} @@ -447,7 +447,7 @@ fi || : %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{_libdir}/vlc/plugins/misc/libxosd_plugin.so +%{?_with_xosd:%{_libdir}/vlc/plugins/misc/libxosd_plugin.so} %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so @@ -483,7 +483,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%exclude %{_libdir}/vlc/plugins/misc/libxosd_plugin.so +%{?_with_xosd:%exclude %{_libdir}/vlc/plugins/misc/libxosd_plugin.so} %ifarch %{ix86} x86_64 %exclude %{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so %endif @@ -542,6 +542,7 @@ fi || : - Disable notify by f15 - deprecated upstream - Fix libProjectM crash once selected. - Fix default CA file for gnutls module. +- xosd not built by default - deprecated upstream * Tue Nov 09 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-5 - Enable VAAPI From 6caf95e259a21c701b6b11e891a7ff40f362932f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 14 Nov 2010 22:57:19 +0000 Subject: [PATCH 122/671] Update to 1.1.5 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f0816fe..9bc905a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.4.tar.bz2 +vlc-1.1.5.tar.bz2 diff --git a/sources b/sources index 806ec3a..ece67c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b71aacaa242f8050a64c6ffe09d6f067 vlc-1.1.4.tar.bz2 +fdc23693351ed57af9f4c85ea885b536 vlc-1.1.5.tar.bz2 diff --git a/vlc.spec b/vlc.spec index ec224b1..03b9bed 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,8 +21,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.4 -Release: 6%{?dist} +Version: 1.1.5 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -32,7 +32,6 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch1: 0001-Libnotify-depends-on-a-gtk.patch -Patch2: vlc-1.1.0-pending-taglib-not-tread_safe.patch Patch3: vlc-1.1.4-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -235,7 +234,6 @@ JACK audio plugin for the VLC media player. %endif %patch0 -p1 -b .noerror %patch1 -p1 -b .gtk23 -%patch2 -p1 -b .taglib_ts %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in @@ -538,6 +536,9 @@ fi || : %changelog +* Sun Nov 14 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-1 +- Update to 1.1.5 + * Wed Nov 10 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-6 - Disable notify by f15 - deprecated upstream - Fix libProjectM crash once selected. From b06a4632e7878b37916f5f829aeea9c396b6a113 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 14 Nov 2010 23:07:28 +0000 Subject: [PATCH 123/671] Rework extras subpakages --- vlc.spec | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/vlc.spec b/vlc.spec index 03b9bed..fb96df0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -210,13 +210,15 @@ Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 %description core VLC media player core components -%package nox -Summary: VLC media player without Xorg +%package extras +Summary: VLC media player with extras modules Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} +Provides: vlc-nox = %{version}-%{release} +Obsoletes: vlc-nox < 1.1.5-2 -%description nox -VLC media player with frame-buffer support for X-less server. +%description extras +VLC media player extras modules. %package plugin-jack Summary: JACK audio plugin for VLC @@ -395,7 +397,7 @@ fi || : %posttrans core %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : -%post nox +%post extras if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -405,7 +407,7 @@ if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi -%postun nox +%postun extras if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -436,9 +438,6 @@ fi || : %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so -%if 0%{?fedora} < 15 -%{_libdir}/vlc/plugins/misc/libnotify_plugin.so -%endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so @@ -447,8 +446,6 @@ fi || : %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so %{?_with_xosd:%{_libdir}/vlc/plugins/misc/libxosd_plugin.so} %{_libdir}/vlc/plugins/gui/libskins2_plugin.so -%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so -%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so %if 0%{?fedora} > 11 || 0%{?rhel} > 5 %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif @@ -508,11 +505,16 @@ fi || : %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -%files nox +%files extras %defattr(-,root,root,-) %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } +%if 0%{?fedora} < 15 +%{_libdir}/vlc/plugins/misc/libnotify_plugin.so +%endif +%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so +%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so %ifarch %{ix86} x86_64 %{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so %endif @@ -538,6 +540,9 @@ fi || : %changelog * Sun Nov 14 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-1 - Update to 1.1.5 +- Rename nox subpackage to extras +- Move opencv modules to extras +- Move libnotify module to extras until f15 * Wed Nov 10 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-6 - Disable notify by f15 - deprecated upstream From 566b0843cfad6410a6aafa016caecf67a07ffebb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 5 Dec 2010 22:18:10 +0000 Subject: [PATCH 124/671] Add Requires xdg-utils for xdg-screensaver - rfbz#1212 --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index fb96df0..4600f4e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -162,6 +162,8 @@ Requires: dejavu-fonts %endif Requires: qt4%{?_isa} >= %{_qt4_version} +#For xdg-sreensaver +Requires: xdg-utils From e8babba12a72423bfe7a9351143586878974f44b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 22 Jan 2011 10:11:28 +0000 Subject: [PATCH 125/671] Rebuild and add clear execstack for now --- vlc.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 4600f4e..61dc700 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.5 -Release: 1%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -365,7 +365,10 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf #Clear execstak -#execstack -c $RPM_BUILD_ROOT%{_bindir}/vlc +%ifarch %{ix86} +execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so +execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/librealvideo_plugin.so +%endif #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc @@ -540,6 +543,12 @@ fi || : %changelog +* Sat Jan 22 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-3 +- Rebuilt for OpenCV 2.2 + +* Sat Dec 18 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-2 +- Clear execstack on dmo and real plugin for i686 + * Sun Nov 14 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-1 - Update to 1.1.5 - Rename nox subpackage to extras From ea22c34433d4d42c846eb894c1f042f9493b6e84 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Jan 2011 11:57:16 +0000 Subject: [PATCH 126/671] VLC 1.1.6 - 'The Luggage' This is the seventh release of the 1.1.x branch of VLC. This is a minor release, focused on minor features, bugfixes and security issues: - Various security issues in Real demuxer, CDG and subtitle decoders, transcode - Important Visualisation improvements, notably in projectM and goom - Faster Webm/VP8 decoding - Fixes in WMV seeking, Icy metadata, freetype, XDG screensaver and KDE solid - Fixes and improvements on PulseAudio output - MPC SV7/SV8 support on Windows/MacOS X, Midi on MacOS X - Support for audio/L24 in RTP - Fix for Audio CD playback on Windows - Qt4 and Media Keys processing improvements --- .gitignore | 2 +- sources | 2 +- ...atch => vlc-1.1.6-hardode_font_patch.patch | 14 ++++----- vlc-backport-lirc_fix.patch | 30 +++++++++++++++++++ vlc.spec | 28 ++++++++++++----- 5 files changed, 59 insertions(+), 17 deletions(-) rename vlc-1.1.4-hardode_font_patch.patch => vlc-1.1.6-hardode_font_patch.patch (53%) create mode 100644 vlc-backport-lirc_fix.patch diff --git a/.gitignore b/.gitignore index 9bc905a..6cb201a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.5.tar.bz2 +vlc-1.1.6.tar.bz2 diff --git a/sources b/sources index ece67c0..ded7e22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fdc23693351ed57af9f4c85ea885b536 vlc-1.1.5.tar.bz2 +c47f3ebc886f2aff8c95b98c564d1759 vlc-1.1.6.tar.bz2 diff --git a/vlc-1.1.4-hardode_font_patch.patch b/vlc-1.1.6-hardode_font_patch.patch similarity index 53% rename from vlc-1.1.4-hardode_font_patch.patch rename to vlc-1.1.6-hardode_font_patch.patch index ea67d0a..0383c33 100644 --- a/vlc-1.1.4-hardode_font_patch.patch +++ b/vlc-1.1.6-hardode_font_patch.patch @@ -1,10 +1,10 @@ -diff -up vlc-1.1.4/modules/visualization/projectm.cpp.hardcode vlc-1.1.4/modules/visualization/projectm.cpp ---- vlc-1.1.4/modules/visualization/projectm.cpp.hardcode 2010-04-13 02:22:27.000000000 +0200 -+++ vlc-1.1.4/modules/visualization/projectm.cpp 2010-11-10 22:52:59.496688406 +0100 -@@ -75,9 +75,9 @@ vlc_module_begin () - #else - add_file( "projectm-preset-path", "/usr/share/projectM/presets", NULL, - PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true ) +diff -up vlc-1.1.6/modules/visualization/projectm.cpp.hardode_path vlc-1.1.6/modules/visualization/projectm.cpp +--- vlc-1.1.6/modules/visualization/projectm.cpp.hardode_path 2011-01-17 17:30:54.000000000 +0100 ++++ vlc-1.1.6/modules/visualization/projectm.cpp 2011-01-25 10:55:30.791607002 +0100 +@@ -89,9 +89,9 @@ vlc_module_begin () + add_directory( "projectm-preset-path", "/usr/share/projectM/presets", NULL, + #endif + PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true ) - add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL, + add_file( "projectm-title-font", "/usr/share/fonts/dejavu/DejaVuSans.ttf", NULL, TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true ) diff --git a/vlc-backport-lirc_fix.patch b/vlc-backport-lirc_fix.patch new file mode 100644 index 0000000..e059128 --- /dev/null +++ b/vlc-backport-lirc_fix.patch @@ -0,0 +1,30 @@ +commit 942ab6c31026a84e4c5503cb8e68a5135dfc2f2b +Author: Pierre Ynard <linkfanel@yahoo.fr> +Date: Sun Jan 23 18:19:05 2011 +0100 + + lirc: build fix + +diff --git a/modules/control/lirc.c b/modules/control/lirc.c +index aee33c3..e8c4780 100644 +--- a/modules/control/lirc.c ++++ b/modules/control/lirc.c +@@ -25,6 +25,7 @@ + * Preamble + *****************************************************************************/ + ++#include <errno.h> + #include <fcntl.h> + + #ifdef HAVE_CONFIG_H +@@ -154,10 +155,12 @@ static void Run( intf_thread_t *p_intf ) + /* Wait for data */ + struct pollfd ufd = { .fd = p_sys->i_fd, .events = POLLIN, .revents = 0 + if( poll( &ufd, 1, -1 ) == -1 ) ++ { + if( errno == EINTR ) + continue; + else + break; ++ } + + /* Process */ diff --git a/vlc.spec b/vlc.spec index 61dc700..da5067a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -17,12 +17,16 @@ %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi %endif - +%if 0%{?fedora} > 14 +# Those need works in Rawhide +%global _without_opencv 1 +%global _without_mozilla 1 +%endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.5 -Release: 3%{?dist} +Version: 1.1.6 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -32,8 +36,9 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch1: 0001-Libnotify-depends-on-a-gtk.patch -Patch3: vlc-1.1.4-hardode_font_patch.patch +Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch +Patch5: vlc-backport-lirc_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -88,6 +93,7 @@ BuildRequires: libnotify-devel BuildRequires: libprojectM-qt-devel BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 +BuildRequires: librtmp-devel BuildRequires: libssh2-devel BuildRequires: libsysfs-devel BuildRequires: libshout-devel @@ -113,7 +119,7 @@ BuildRequires: lua-devel BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel -BuildRequires: opencv-devel +%{!?_without_opencv:BuildRequires: opencv-devel} BuildRequires: openslp-devel BuildRequires: pcre-devel BuildRequires: pulseaudio-libs-devel >= 0.9.8 @@ -208,6 +214,7 @@ Provides: ffmpeg4vlc-libs = 0.6-0.5 Provides: ffmpeg4vlc-devel = 0.6-0.5 Obsoletes: ffmpeg4vlc-libs < 0.6-0.5 Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 +%{?live555date:Requires: live555%{_isa} = %{live555date}} %description core VLC media player core components @@ -240,6 +247,7 @@ JACK audio plugin for the VLC media player. %patch1 -p1 -b .gtk23 %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path +%patch5 -p1 -b .lirc_fix sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -280,7 +288,7 @@ popd --with-live555-tree=live \ %endif --enable-dv \ - --enable-opencv \ +%{!?_without_opencv:--enable-opencv} \ --enable-sftp \ --enable-pvr \ --enable-gnomevfs \ @@ -491,8 +499,10 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so +%{!?_without_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so +} %if 0%{?fedora} > 11 || 0%{?rhel} > 5 %exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %endif @@ -518,8 +528,10 @@ fi || : %if 0%{?fedora} < 15 %{_libdir}/vlc/plugins/misc/libnotify_plugin.so %endif +%{!?_without_opencv: %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so +} %ifarch %{ix86} x86_64 %{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so %endif @@ -543,8 +555,8 @@ fi || : %changelog -* Sat Jan 22 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-3 -- Rebuilt for OpenCV 2.2 +* Mon Jan 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6-1 +- Update to 1.1.6 * Sat Dec 18 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-2 - Clear execstack on dmo and real plugin for i686 From b706f65f6c023c4274c6176ab4a94d72eaeb91ce Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Jan 2011 13:39:37 +0000 Subject: [PATCH 127/671] Fix truncated patch --- vlc-backport-lirc_fix.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vlc-backport-lirc_fix.patch b/vlc-backport-lirc_fix.patch index e059128..3f2d5f3 100644 --- a/vlc-backport-lirc_fix.patch +++ b/vlc-backport-lirc_fix.patch @@ -16,9 +16,9 @@ index aee33c3..e8c4780 100644 #include <fcntl.h> #ifdef HAVE_CONFIG_H -@@ -154,10 +155,12 @@ static void Run( intf_thread_t *p_intf ) +@@ -154,10 +155,12 @@ /* Wait for data */ - struct pollfd ufd = { .fd = p_sys->i_fd, .events = POLLIN, .revents = 0 + struct pollfd ufd = { .fd = p_sys->i_fd, .events = POLLIN, .revents = 0 }; if( poll( &ufd, 1, -1 ) == -1 ) + { if( errno == EINTR ) @@ -28,3 +28,4 @@ index aee33c3..e8c4780 100644 + } /* Process */ + int canc = vlc_savecancel(); From 854d745cce17737ec33bf8558d6cb45906fd1573 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Jan 2011 13:54:51 +0000 Subject: [PATCH 128/671] Fix live555date RPM macro --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index da5067a..c49b271 100644 --- a/vlc.spec +++ b/vlc.spec @@ -214,7 +214,7 @@ Provides: ffmpeg4vlc-libs = 0.6-0.5 Provides: ffmpeg4vlc-devel = 0.6-0.5 Obsoletes: ffmpeg4vlc-libs < 0.6-0.5 Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 -%{?live555date:Requires: live555%{_isa} = %{live555date}} +%{?live555date:Requires: live555date%{_isa} = %{live555date}} %description core VLC media player core components From c6063024f85d6276d1a945d2dbee51a0c9a884ca Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Jan 2011 17:15:53 +0000 Subject: [PATCH 129/671] Backport another patch that worth been tested on KDE 4.6 https://bugs.kde.org/show_bug.cgi?id=260719 --- vlc-backport-signal_fix.patch | 27 +++++++++++++++++++++++++++ vlc.spec | 7 +++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 vlc-backport-signal_fix.patch diff --git a/vlc-backport-signal_fix.patch b/vlc-backport-signal_fix.patch new file mode 100644 index 0000000..16d1367 --- /dev/null +++ b/vlc-backport-signal_fix.patch @@ -0,0 +1,27 @@ +commit de68b12937589cdcbe5143f162dabd7654969362 +Author: Rémi Denis-Courmont <remi@remlab.net> +Date: Sat Jul 24 13:43:56 2010 +0300 + + Do not override signal functions for the time being + +diff --git a/bin/override.c b/bin/override.c +index 2385f2b..ac9e14c 100644 +--- a/bin/override.c ++++ b/bin/override.c +@@ -201,6 +201,7 @@ int rand (void) + } + + ++#if 0 + /** Signals **/ + #include <signal.h> + +@@ -252,6 +253,7 @@ error: + LOG("Blocked", "%d, %p, %p", signum, act, old); + return -1; + } ++#endif + + + /*** Locales *** + diff --git a/vlc.spec b/vlc.spec index c49b271..09c669f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -26,7 +26,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -39,6 +39,7 @@ Patch1: 0001-Libnotify-depends-on-a-gtk.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-backport-lirc_fix.patch +Patch6: vlc-backport-signal_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -248,6 +249,7 @@ JACK audio plugin for the VLC media player. %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path %patch5 -p1 -b .lirc_fix +%patch6 -p1 -b .signal_fix sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -555,8 +557,9 @@ fi || : %changelog -* Mon Jan 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6-1 +* Mon Jan 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6-2 - Update to 1.1.6 +- backport lirc and signal fixes * Sat Dec 18 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.5-2 - Clear execstack on dmo and real plugin for i686 From f084bc5079d04ebed05874211695e4f3a2ae0c45 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jan 2011 09:40:26 +0000 Subject: [PATCH 130/671] Remove unused patches --- vlc-1.1.0-pending-taglib-not-tread_safe.patch | 40 ----- vlc-handlers.schemas | 161 ------------------ 2 files changed, 201 deletions(-) delete mode 100644 vlc-1.1.0-pending-taglib-not-tread_safe.patch delete mode 100644 vlc-handlers.schemas diff --git a/vlc-1.1.0-pending-taglib-not-tread_safe.patch b/vlc-1.1.0-pending-taglib-not-tread_safe.patch deleted file mode 100644 index cf6ece6..0000000 --- a/vlc-1.1.0-pending-taglib-not-tread_safe.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Rafaël Carré <rafael.carre@gmail.com> -Date: Sun, 24 Oct 2010 16:14:33 +0000 (+0200) -Subject: taglib is not thread-safe -X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=8675d26cea713ca9ebae3b91bd7c3e9bb320dcb1;hp=2ad5d811df1fcb2c0229d9e21fdd93d43344d19c - -taglib is not thread-safe - -Fix ticket #3958 ---- - -diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp -index 33866d0..f67dbda 100644 ---- a/modules/meta_engine/taglib.cpp -+++ b/modules/meta_engine/taglib.cpp -@@ -77,6 +77,8 @@ - #include <textidentificationframe.h> - #include <uniquefileidentifierframe.h> - -+// taglib is not thread safe -+static vlc_mutex_t taglib_lock = VLC_STATIC_MUTEX; - - // Local functions - static int ReadMeta ( vlc_object_t * ); -@@ -363,6 +365,7 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_t *p_demux, demux_meta_t *p_de - */ - static int ReadMeta( vlc_object_t* p_this) - { -+ vlc_mutex_locker locker (&taglib_lock); - demux_meta_t* p_demux_meta = (demux_meta_t *)p_this; - demux_t* p_demux = p_demux_meta->p_demux; - vlc_meta_t* p_meta; -@@ -585,6 +588,7 @@ static void WriteMetaToXiph( Ogg::XiphComment* tag, input_item_t* p_item ) - - static int WriteMeta( vlc_object_t *p_this ) - { -+ vlc_mutex_locker locker (&taglib_lock); - meta_export_t *p_export = (meta_export_t *)p_this; - input_item_t *p_item = p_export->p_item; - FileRef f; - diff --git a/vlc-handlers.schemas b/vlc-handlers.schemas deleted file mode 100644 index b243c23..0000000 --- a/vlc-handlers.schemas +++ /dev/null @@ -1,161 +0,0 @@ -<gconfschemafile> - <schemalist> - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mms/command</key> - <applyto>/desktop/gnome/url-handlers/mms/command</applyto> - <owner>vlc</owner> - <type>string</type> - <default>vlc "%s"</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mms/needs_terminal</key> - <applyto>/desktop/gnome/url-handlers/mms/needs_terminal</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mms/enabled</key> - <applyto>/desktop/gnome/url-handlers/mms/enabled</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtp/command</key> - <applyto>/desktop/gnome/url-handlers/rtp/command</applyto> - <owner>vlc</owner> - <type>string</type> - <default>vlc "%s"</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtp/needs_terminal</key> - <applyto>/desktop/gnome/url-handlers/rtp/needs_terminal</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtp/enabled</key> - <applyto>/desktop/gnome/url-handlers/rtp/enabled</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtsp/command</key> - <applyto>/desktop/gnome/url-handlers/rtsp/command</applyto> - <owner>vlc</owner> - <type>string</type> - <default>vlc "%s"</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtsp/needs_terminal</key> - <applyto>/desktop/gnome/url-handlers/rtsp/needs_terminal</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/rtsp/enabled</key> - <applyto>/desktop/gnome/url-handlers/rtsp/enabled</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mmsh/command</key> - <applyto>/desktop/gnome/url-handlers/mmsh/command</applyto> - <owner>vlc</owner> - <type>string</type> - <default>vlc "%s"</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mmsh/needs_terminal</key> - <applyto>/desktop/gnome/url-handlers/mmsh/needs_terminal</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/url-handlers/mmsh/enabled</key> - <applyto>/desktop/gnome/url-handlers/mmsh/enabled</applyto> - <owner>vlc</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - </schemalist> -</gconfschemafile> From 62327c585c6abf03b2461d203581e73b03149693 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 29 Jan 2011 10:09:10 +0000 Subject: [PATCH 131/671] PRE-commit for 1.6.1.1 --- vlc.spec | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/vlc.spec b/vlc.spec index 09c669f..ab08ac1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -25,8 +25,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.6 -Release: 2%{?dist} +Version: 1.1.6.1 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -35,11 +35,8 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch -Patch1: 0001-Libnotify-depends-on-a-gtk.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch -Patch5: vlc-backport-lirc_fix.patch -Patch6: vlc-backport-signal_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -215,19 +212,21 @@ Provides: ffmpeg4vlc-libs = 0.6-0.5 Provides: ffmpeg4vlc-devel = 0.6-0.5 Obsoletes: ffmpeg4vlc-libs < 0.6-0.5 Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 +Provides: vlc-nox = %{version}-%{release} +Obsoletes: vlc-nox < 1.1.5-2 %{?live555date:Requires: live555date%{_isa} = %{live555date}} %description core VLC media player core components -%package extras +%package plugin-extras Summary: VLC media player with extras modules Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} -Provides: vlc-nox = %{version}-%{release} -Obsoletes: vlc-nox < 1.1.5-2 +Provides: vlc-extras = %{version}-%{release} +Obsoletes: vlc-extras < 1.1.6.1 -%description extras +%description plugin-extras VLC media player extras modules. %package plugin-jack @@ -245,11 +244,8 @@ JACK audio plugin for the VLC media player. %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .noerror -%patch1 -p1 -b .gtk23 %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path -%patch5 -p1 -b .lirc_fix -%patch6 -p1 -b .signal_fix sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -412,7 +408,7 @@ fi || : %posttrans core %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : -%post extras +%post plugin-extras if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -422,7 +418,7 @@ if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi -%postun extras +%postun plugin-extras if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -522,7 +518,7 @@ fi || : %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -%files extras +%files c %defattr(-,root,root,-) %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so @@ -557,6 +553,11 @@ fi || : %changelog +* Sat Jan 29 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6.1-1 +- Update to 1.1.6.1 +- Remove merged patches +- Switch extras subpackage to plugin-extras + * Mon Jan 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6-2 - Update to 1.1.6 - backport lirc and signal fixes From 11940caf349457f8d51a221fc222a5b3d72ac34f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 29 Jan 2011 12:47:06 +0000 Subject: [PATCH 132/671] Fix package name --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ab08ac1..f8aa8fc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -518,7 +518,7 @@ fi || : %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -%files c +%files plugin-extras %defattr(-,root,root,-) %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so From 9471c4854bcf0041de49b4ef6273c30e0f9ce178 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 29 Jan 2011 12:59:18 +0000 Subject: [PATCH 133/671] Revert extras plugin-extras changes, that's pointless after all --- vlc.spec | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/vlc.spec b/vlc.spec index f8aa8fc..61755ba 100644 --- a/vlc.spec +++ b/vlc.spec @@ -219,14 +219,13 @@ Obsoletes: vlc-nox < 1.1.5-2 %description core VLC media player core components -%package plugin-extras +%package extras Summary: VLC media player with extras modules Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} -Provides: vlc-extras = %{version}-%{release} -Obsoletes: vlc-extras < 1.1.6.1 -%description plugin-extras + +%description extras VLC media player extras modules. %package plugin-jack @@ -408,7 +407,7 @@ fi || : %posttrans core %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : -%post plugin-extras +%post extras if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -418,7 +417,7 @@ if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi -%postun plugin-extras +%postun extras if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : fi @@ -518,7 +517,7 @@ fi || : %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -%files plugin-extras +%files extras %defattr(-,root,root,-) %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so @@ -556,7 +555,6 @@ fi || : * Sat Jan 29 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6.1-1 - Update to 1.1.6.1 - Remove merged patches -- Switch extras subpackage to plugin-extras * Mon Jan 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6-2 - Update to 1.1.6 From fad81c49ae4a2cb0fbdc4bc5e274d0ae30a678f3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Feb 2011 16:52:43 +0000 Subject: [PATCH 134/671] Update to 1.1.7 --- .gitignore | 2 +- sources | 2 +- vlc-backport-lirc_fix.patch | 31 ------------------------------- vlc.spec | 6 +++++- 4 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 vlc-backport-lirc_fix.patch diff --git a/.gitignore b/.gitignore index 6cb201a..70f3d32 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.6.tar.bz2 +vlc-1.1.7.tar.bz2 diff --git a/sources b/sources index ded7e22..c3fd175 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c47f3ebc886f2aff8c95b98c564d1759 vlc-1.1.6.tar.bz2 +932ce1fa4afa54b56ac0ccc0655667b6 vlc-1.1.7.tar.bz2 diff --git a/vlc-backport-lirc_fix.patch b/vlc-backport-lirc_fix.patch deleted file mode 100644 index 3f2d5f3..0000000 --- a/vlc-backport-lirc_fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit 942ab6c31026a84e4c5503cb8e68a5135dfc2f2b -Author: Pierre Ynard <linkfanel@yahoo.fr> -Date: Sun Jan 23 18:19:05 2011 +0100 - - lirc: build fix - -diff --git a/modules/control/lirc.c b/modules/control/lirc.c -index aee33c3..e8c4780 100644 ---- a/modules/control/lirc.c -+++ b/modules/control/lirc.c -@@ -25,6 +25,7 @@ - * Preamble - *****************************************************************************/ - -+#include <errno.h> - #include <fcntl.h> - - #ifdef HAVE_CONFIG_H -@@ -154,10 +155,12 @@ - /* Wait for data */ - struct pollfd ufd = { .fd = p_sys->i_fd, .events = POLLIN, .revents = 0 }; - if( poll( &ufd, 1, -1 ) == -1 ) -+ { - if( errno == EINTR ) - continue; - else - break; -+ } - - /* Process */ - int canc = vlc_savecancel(); diff --git a/vlc.spec b/vlc.spec index 61755ba..0849785 100644 --- a/vlc.spec +++ b/vlc.spec @@ -25,7 +25,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.6.1 +Version: 1.1.7 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -245,6 +245,7 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path +%patch5 -p1 -b .signal sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -552,6 +553,9 @@ fi || : %changelog +* Wed Feb 02 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.7-1 +- Update to 1.1.7 + * Sat Jan 29 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.6.1-1 - Update to 1.1.6.1 - Remove merged patches From 4a7afc2b066c4d000a889610c66fa9b7f73c27ea Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Feb 2011 16:53:39 +0000 Subject: [PATCH 135/671] Fix patch5 --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0849785..efed16b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -245,7 +245,6 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path -%patch5 -p1 -b .signal sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h From b2b833599deb60c68238df31c9e0442aa4432cc4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 7 Mar 2011 10:57:38 +0000 Subject: [PATCH 136/671] Update to pre-1.1.8 --- .gitignore | 1 + sources | 1 + vlc.spec | 14 ++++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 70f3d32..d8e31f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vlc-1.1.7.tar.bz2 +vlc-1.1-bugfix-20110307.patch.tar.bz2 diff --git a/sources b/sources index c3fd175..261ffd2 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 932ce1fa4afa54b56ac0ccc0655667b6 vlc-1.1.7.tar.bz2 +e7e9603412faafa49a05632ff7b54e1c vlc-1.1-bugfix-20110307.patch.tar.bz2 diff --git a/vlc.spec b/vlc.spec index efed16b..cf93aa1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 +%global tarball_version 1.1.7 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_a52dec --with-a52dec @@ -25,18 +26,19 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.7 -Release: 1%{?dist} +Version: 1.1.8 +Release: 0.1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{tarball_version}%{?vlc_rc}.tar.bz2 %if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch +Patch5: vlc-1.1-bugfix-20110307.patch.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -238,13 +240,14 @@ JACK audio plugin for the VLC media player. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc} +%setup -q -n %{name}-%{tarball_version}%{?vlc_rc} %if 0%{?live555_date:1} %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path +%patch5 -p1 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -552,6 +555,9 @@ fi || : %changelog +* Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1² +- Update to pre-1.1.8 bugfix git from today + * Wed Feb 02 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.7-1 - Update to 1.1.7 From d62dad8ce1eca86775a6b4f70cf5f64315bf2e3d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 7 Mar 2011 11:06:51 +0000 Subject: [PATCH 137/671] Typo --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index cf93aa1..56a09a2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -555,7 +555,7 @@ fi || : %changelog -* Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1² +* Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1 - Update to pre-1.1.8 bugfix git from today * Wed Feb 02 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.7-1 From e271849c9dfa4ebedeaae3d5e4e4f6b4f9395709 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Mar 2011 15:42:27 +0000 Subject: [PATCH 138/671] Workaround circle deps with qt-devel and phonon-backend-vlc --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 56a09a2..d4ebca4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -2,6 +2,7 @@ #global vlc_rc -rc3 %global vlc_bootstrap 1 %global tarball_version 1.1.7 +%global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_a52dec --with-a52dec @@ -153,6 +154,7 @@ BuildRequires: xorg-x11-proto-devel %{!?_without_mozilla:BuildRequires: gecko-devel nspr-devel} %{?_without_mozilla:Obsoletes: mozilla-vlc < %{version}-%{release}} +%{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} Provides: %{name}-xorg%{_isa} = %{version}-%{release} From 9ae3e5794f2f7d26344be5e39dddf14c00493bfa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Mar 2011 17:05:58 +0000 Subject: [PATCH 139/671] Rework the patch not to include po and extras --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 261ffd2..7e35c6c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +c72aa3f4e3e19f82556d0b08aa23d20f vlc-1.1-bugfix-20110307.patch.tar.bz2 932ce1fa4afa54b56ac0ccc0655667b6 vlc-1.1.7.tar.bz2 -e7e9603412faafa49a05632ff7b54e1c vlc-1.1-bugfix-20110307.patch.tar.bz2 From e3d6540d25004661d32334f05ceb763e689a5a94 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Mar 2011 22:21:13 +0000 Subject: [PATCH 140/671] Rebuild (again) --- sources | 2 +- vlc.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 7e35c6c..d996ead 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -c72aa3f4e3e19f82556d0b08aa23d20f vlc-1.1-bugfix-20110307.patch.tar.bz2 932ce1fa4afa54b56ac0ccc0655667b6 vlc-1.1.7.tar.bz2 +34e180c14f1af0c77774ca4e9f62b99d vlc-1.1-bugfix-20110307.patch.tar.bz2 diff --git a/vlc.spec b/vlc.spec index d4ebca4..5386c9e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,7 +28,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 0.1%{?dist} +Release: 0.1%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -249,7 +249,7 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path -%patch5 -p1 +%patch5 -p2 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -557,7 +557,7 @@ fi || : %changelog -* Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1 +* Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1.1 - Update to pre-1.1.8 bugfix git from today * Wed Feb 02 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.7-1 From a0c659b0959c2051f490310b039f29c7503e8e0b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 11 Mar 2011 08:16:36 +0000 Subject: [PATCH 141/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5386c9e..f7fc24b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,7 +28,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 0.1%{?dist}.1 +Release: 0.2%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -557,6 +557,9 @@ fi || : %changelog +* Fri Mar 11 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.2.1 +- Rebuilt for new x264/FFmpeg + * Mon Mar 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.1.1 - Update to pre-1.1.8 bugfix git from today From c9ecdf180e58f43331b7b00cee3d85e5209bb926 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 11 Mar 2011 09:10:14 +0000 Subject: [PATCH 142/671] Remove right bump --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f7fc24b..034eb65 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,7 +28,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 0.2%{?dist}.1 +Release: 0.2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org From f68128b59c2c85c5da779d8c65ae0bcc86ca9243 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 23 Mar 2011 14:15:30 +0000 Subject: [PATCH 143/671] Removal of merged patches --- 0001-Libnotify-depends-on-a-gtk.patch | 27 --------------------------- vlc-backport-signal_fix.patch | 27 --------------------------- vlc.spec | 22 +++++++++++++--------- 3 files changed, 13 insertions(+), 63 deletions(-) delete mode 100644 0001-Libnotify-depends-on-a-gtk.patch delete mode 100644 vlc-backport-signal_fix.patch diff --git a/0001-Libnotify-depends-on-a-gtk.patch b/0001-Libnotify-depends-on-a-gtk.patch deleted file mode 100644 index 66e378f..0000000 --- a/0001-Libnotify-depends-on-a-gtk.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 967294c285981da403d3c3cd9c7d5616a6f96288 Mon Sep 17 00:00:00 2001 -From: Dominique Leuenberger <dominique@leuenberger.net> -Date: Fri, 27 Aug 2010 22:30:00 +0200 -Subject: [PATCH] Libnotify depends on *a* GTK version (can be gtk-2.0 or gtk-3.0). - -As both are possible, libnotify can not drag the dependency in automatically, and as such -the applications being built have to decide upon it. At this time, gtk-2.0 is the logical choice. ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7650ade..a60e4c5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1691,7 +1691,7 @@ AS_IF([test "${enable_growl}" != "no"], [ - dnl - dnl Libnotify notification plugin - dnl --PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify], [libnotify notification], [auto]) -+PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto]) - - dnl - dnl Taglibplugin --- -1.7.1 - diff --git a/vlc-backport-signal_fix.patch b/vlc-backport-signal_fix.patch deleted file mode 100644 index 16d1367..0000000 --- a/vlc-backport-signal_fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit de68b12937589cdcbe5143f162dabd7654969362 -Author: Rémi Denis-Courmont <remi@remlab.net> -Date: Sat Jul 24 13:43:56 2010 +0300 - - Do not override signal functions for the time being - -diff --git a/bin/override.c b/bin/override.c -index 2385f2b..ac9e14c 100644 ---- a/bin/override.c -+++ b/bin/override.c -@@ -201,6 +201,7 @@ int rand (void) - } - - -+#if 0 - /** Signals **/ - #include <signal.h> - -@@ -252,6 +253,7 @@ error: - LOG("Blocked", "%d, %p, %p", signum, act, old); - return -1; - } -+#endif - - - /*** Locales *** - diff --git a/vlc.spec b/vlc.spec index 034eb65..5bc9266 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,8 +1,8 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 -%global tarball_version 1.1.7 -%global _with_workaround_circle_deps 1 +%global tarball_version 1.1.8 +#global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_a52dec --with-a52dec @@ -23,23 +23,24 @@ # Those need works in Rawhide %global _without_opencv 1 %global _without_mozilla 1 +%else +%global _with_gnomevfs 1 %endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 0.2%{?dist} +Release: 0%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{tarball_version}%{?vlc_rc}.tar.bz2 +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 %if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch -Patch5: vlc-1.1-bugfix-20110307.patch.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -64,7 +65,7 @@ BuildRequires: dirac-devel >= 1.0.0 BuildRequires: flac-devel BuildRequires: fluidsynth-devel BuildRequires: fribidi-devel -BuildRequires: gnome-vfs2-devel +%{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: jack-audio-connection-kit-devel @@ -249,7 +250,6 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path -%patch5 -p2 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -293,8 +293,8 @@ popd %{!?_without_opencv:--enable-opencv} \ --enable-sftp \ --enable-pvr \ - --enable-gnomevfs \ -%{?_with_vcdimager--enable-vcdx} \ +%{?_with_gnomevfs:--enable-gnomevfs} \ +%{?_with_vcdimager:--enable-vcdx} \ %if 0 %{?_with_freeworld:--enable-wma-fixed} \ %{?_with_freeworld:--enable-shine} \ @@ -449,7 +449,9 @@ fi || : %{_bindir}/qvlc %{_bindir}/svlc %{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%{?_with_gnomevfs: %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so +} %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %{_libdir}/vlc/plugins/misc/libsvg_plugin.so @@ -478,7 +480,9 @@ fi || : %{_datadir}/vlc/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%{?_with_gnomevfs: %exclude %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so +} %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so From 3544f1dee3951dd5990a626c12d2439e8288d7c8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 24 Mar 2011 08:37:13 +0000 Subject: [PATCH 144/671] Update to 1.1.8 --- vlc-1.1.8-bugfix.opencv22.patch | 12 ++++++++++++ vlc.spec | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 vlc-1.1.8-bugfix.opencv22.patch diff --git a/vlc-1.1.8-bugfix.opencv22.patch b/vlc-1.1.8-bugfix.opencv22.patch new file mode 100644 index 0000000..b0c911d --- /dev/null +++ b/vlc-1.1.8-bugfix.opencv22.patch @@ -0,0 +1,12 @@ +diff -up vlc-1.1.8/modules/video_filter/opencv_example.c.opencv22 vlc-1.1.8/modules/video_filter/opencv_example.c +--- vlc-1.1.8/modules/video_filter/opencv_example.c.opencv22 2010-04-13 02:22:27.000000000 +0200 ++++ vlc-1.1.8/modules/video_filter/opencv_example.c 2011-03-23 10:47:05.053097995 +0100 +@@ -191,7 +191,7 @@ static picture_t *Filter( filter_t *p_fi + 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) ); ++ cvSize(0, 0), cvSize(0, 0) ); + //create the video_filter_region_info_t struct + if (faces && (faces->total > 0)) + { diff --git a/vlc.spec b/vlc.spec index 5bc9266..d394673 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,7 +21,6 @@ %endif %if 0%{?fedora} > 14 # Those need works in Rawhide -%global _without_opencv 1 %global _without_mozilla 1 %else %global _with_gnomevfs 1 @@ -30,7 +29,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 0%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -41,6 +40,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch +Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -250,6 +250,9 @@ JACK audio plugin for the VLC media player. %patch0 -p1 -b .noerror %patch3 -p1 -b .hardode_path %patch4 -p1 -b .tls_path +%if 0%{?fedora} >= 15 +%patch5 -p1 -b .opencv22 +%endif sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -561,6 +564,9 @@ fi || : %changelog +* Thu Mar 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-1 +- Update to 1.1.8 + * Fri Mar 11 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-0.2.1 - Rebuilt for new x264/FFmpeg From b904f60f621a26fcb7e5556294dd44fd874da233 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 24 Mar 2011 08:37:44 +0000 Subject: [PATCH 145/671] Update the sources --- .gitignore | 3 +-- sources | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d8e31f6..7b5e849 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -vlc-1.1.7.tar.bz2 -vlc-1.1-bugfix-20110307.patch.tar.bz2 +vlc-1.1.8.tar.bz2 diff --git a/sources b/sources index d996ead..0854498 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -932ce1fa4afa54b56ac0ccc0655667b6 vlc-1.1.7.tar.bz2 -34e180c14f1af0c77774ca4e9f62b99d vlc-1.1-bugfix-20110307.patch.tar.bz2 +c0065ec11b6fd12167cd440cbe0ef0d9 vlc-1.1.8.tar.bz2 From 726c51de4cd566863191f475c35b413dd6551fac Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 6 Apr 2011 16:26:18 +0000 Subject: [PATCH 146/671] Fix youtube lua plugin --- vlc-1.1.8-bugfix-20110406.patch | 67 +++++++++++++++++++++++++++++++++ vlc.spec | 7 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 vlc-1.1.8-bugfix-20110406.patch diff --git a/vlc-1.1.8-bugfix-20110406.patch b/vlc-1.1.8-bugfix-20110406.patch new file mode 100644 index 0000000..1f8cb3f --- /dev/null +++ b/vlc-1.1.8-bugfix-20110406.patch @@ -0,0 +1,67 @@ +diff --git a/src/input/vlm.c b/src/input/vlm.c +index facc49c..fe36742 100644 +--- a/src/input/vlm.c ++++ b/src/input/vlm.c +@@ -218,7 +218,7 @@ static void vlm_Destructor( vlm_t *p_vlm ) + TAB_CLEAN( p_vlm->i_media, p_vlm->media ); + + vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES ); +- TAB_CLEAN( p_vlm->schedule, p_vlm->schedule ); ++ TAB_CLEAN( p_vlm->i_schedule, p_vlm->schedule ); + vlc_mutex_unlock( &p_vlm->lock ); + + libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL; +@@ -472,7 +472,7 @@ static void* Manage( void* p_object ) + } + } + } +- else ++ else if( i_nextschedule == 0 || i_real_date < i_nextschedule ) + { + i_nextschedule = i_real_date; + } +diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua +index 713bdc0..85ba428 100644 +--- a/share/lua/playlist/youtube.lua ++++ b/share/lua/playlist/youtube.lua +@@ -35,10 +35,9 @@ end + + -- Probe function. + function probe() +- if vlc.access ~= "http" then ++ if vlc.access ~= "http" and vlc.access ~= "https" then + return false + end +- options = {":demux=avformat,ffmpeg"} + youtube_site = string.match( string.sub( vlc.path, 1, 8 ), "youtube" ) + if not youtube_site then + -- FIXME we should be using a builtin list of known youtube websites +@@ -89,6 +88,8 @@ function parse() + -- vlc.msg.err( t ) + -- video_id = string.gsub( line, ".*&video_id:'([^']*)'.*", "%1" ) + fmt_url_map = string.match( line, "\"fmt_url_map\": \"(.-)\"" ) ++ -- FIXME: do this properly ++ fmt_url_map = string.gsub( fmt_url_map, "\\u0026", "&" ) + if fmt_url_map then + for itag,url in string.gmatch( fmt_url_map, "(%d+)|([^,]+)" ) do + -- Apparently formats are listed in quality order, +@@ -152,7 +153,7 @@ function parse() + path = "http://www.youtube.com/v/"..video_id + end + end +- return { { path = path; name = name; description = description; artist = artist; arturl = arturl; options = options } } ++ return { { path = path; name = name; description = description; artist = artist; arturl = arturl } } + else -- This is the flash player's URL + if string.match( vlc.path, "title=" ) then + name = vlc.strings.decode_uri(get_url_param( vlc.path, "title" )) +@@ -168,8 +169,8 @@ function parse() + if not string.match( vlc.path, "t=" ) then + -- This sucks, we're missing "t" which is now mandatory. Let's + -- try using another url +- return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl; options=options } } ++ return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl } } + end +- return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl; options=options } } ++ return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl } } + end + end diff --git a/vlc.spec b/vlc.spec index d394673..2a7b8fb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,7 +29,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.8 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -41,6 +41,7 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch +Patch6: vlc-1.1.8-bugfix-20110406.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -253,6 +254,7 @@ JACK audio plugin for the VLC media player. %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif +%patch6 -p1 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -564,6 +566,9 @@ fi || : %changelog +* Wed Apr 06 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-2 +- Backport youtube lua fix - rfbz#1675 + * Thu Mar 24 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-1 - Update to 1.1.8 From 009d3b7143c45b72d0778e7dc957d34193e72192 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 12 Apr 2011 15:47:00 +0000 Subject: [PATCH 147/671] Update to 1.1.9 --- .gitignore | 2 +- sources | 2 +- vlc-1.1.8-bugfix-20110406.patch | 67 --------------------------------- vlc.spec | 9 +++-- 4 files changed, 7 insertions(+), 73 deletions(-) delete mode 100644 vlc-1.1.8-bugfix-20110406.patch diff --git a/.gitignore b/.gitignore index 7b5e849..2e1f846 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.8.tar.bz2 +vlc-1.1.9.tar.bz2 diff --git a/sources b/sources index 0854498..c588795 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0065ec11b6fd12167cd440cbe0ef0d9 vlc-1.1.8.tar.bz2 +06adb1848e6b87fbe1ced77ec0f91e4c vlc-1.1.9.tar.bz2 diff --git a/vlc-1.1.8-bugfix-20110406.patch b/vlc-1.1.8-bugfix-20110406.patch deleted file mode 100644 index 1f8cb3f..0000000 --- a/vlc-1.1.8-bugfix-20110406.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/src/input/vlm.c b/src/input/vlm.c -index facc49c..fe36742 100644 ---- a/src/input/vlm.c -+++ b/src/input/vlm.c -@@ -218,7 +218,7 @@ static void vlm_Destructor( vlm_t *p_vlm ) - TAB_CLEAN( p_vlm->i_media, p_vlm->media ); - - vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES ); -- TAB_CLEAN( p_vlm->schedule, p_vlm->schedule ); -+ TAB_CLEAN( p_vlm->i_schedule, p_vlm->schedule ); - vlc_mutex_unlock( &p_vlm->lock ); - - libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL; -@@ -472,7 +472,7 @@ static void* Manage( void* p_object ) - } - } - } -- else -+ else if( i_nextschedule == 0 || i_real_date < i_nextschedule ) - { - i_nextschedule = i_real_date; - } -diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua -index 713bdc0..85ba428 100644 ---- a/share/lua/playlist/youtube.lua -+++ b/share/lua/playlist/youtube.lua -@@ -35,10 +35,9 @@ end - - -- Probe function. - function probe() -- if vlc.access ~= "http" then -+ if vlc.access ~= "http" and vlc.access ~= "https" then - return false - end -- options = {":demux=avformat,ffmpeg"} - youtube_site = string.match( string.sub( vlc.path, 1, 8 ), "youtube" ) - if not youtube_site then - -- FIXME we should be using a builtin list of known youtube websites -@@ -89,6 +88,8 @@ function parse() - -- vlc.msg.err( t ) - -- video_id = string.gsub( line, ".*&video_id:'([^']*)'.*", "%1" ) - fmt_url_map = string.match( line, "\"fmt_url_map\": \"(.-)\"" ) -+ -- FIXME: do this properly -+ fmt_url_map = string.gsub( fmt_url_map, "\\u0026", "&" ) - if fmt_url_map then - for itag,url in string.gmatch( fmt_url_map, "(%d+)|([^,]+)" ) do - -- Apparently formats are listed in quality order, -@@ -152,7 +153,7 @@ function parse() - path = "http://www.youtube.com/v/"..video_id - end - end -- return { { path = path; name = name; description = description; artist = artist; arturl = arturl; options = options } } -+ return { { path = path; name = name; description = description; artist = artist; arturl = arturl } } - else -- This is the flash player's URL - if string.match( vlc.path, "title=" ) then - name = vlc.strings.decode_uri(get_url_param( vlc.path, "title" )) -@@ -168,8 +169,8 @@ function parse() - if not string.match( vlc.path, "t=" ) then - -- This sucks, we're missing "t" which is now mandatory. Let's - -- try using another url -- return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl; options=options } } -+ return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl } } - end -- return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl; options=options } } -+ return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl } } - end - end diff --git a/vlc.spec b/vlc.spec index 2a7b8fb..d231189 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,8 +28,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.8 -Release: 2%{?dist} +Version: 1.1.9 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -41,7 +41,6 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch -Patch6: vlc-1.1.8-bugfix-20110406.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -254,7 +253,6 @@ JACK audio plugin for the VLC media player. %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif -%patch6 -p1 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -566,6 +564,9 @@ fi || : %changelog +* Tue Apr 12 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.9-1 +- Update to 1.1.9 + * Wed Apr 06 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.8-2 - Backport youtube lua fix - rfbz#1675 From c2369be8e5a15e1314018a44e6a3d3d795dc3099 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 12 Apr 2011 17:56:58 +0000 Subject: [PATCH 148/671] Fix tarball version Update --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d231189..345eac4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 -%global tarball_version 1.1.8 +%global tarball_version 1.1.9 #global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} From 3f112d713163ab5c8b09f2b4bde65649c6befdc1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 10 May 2011 15:41:09 +0000 Subject: [PATCH 149/671] Rebuilt for libdvbpsi --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 345eac4..44da726 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,7 +29,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.9 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -564,6 +564,9 @@ fi || : %changelog +* Tue May 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.9-2 +- Rebuilt for libdvbpsi + * Tue Apr 12 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.9-1 - Update to 1.1.9 From 2ba4d82c25397f187a68e215f517e3d259e2f1c1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 10 May 2011 15:44:13 +0000 Subject: [PATCH 150/671] Workaround circle deps with phonon-backend-vlc because of qt-devel As there is an ABI bump involved building vlc cannot requires vlc --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 44da726..aca336d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -2,7 +2,7 @@ #global vlc_rc -rc3 %global vlc_bootstrap 1 %global tarball_version 1.1.9 -#global _with_workaround_circle_deps 1 +%global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} %global _with_a52dec --with-a52dec From e2827235deab501b5f72545cc0f4510d7cb376d2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 7 Jun 2011 09:15:09 +0000 Subject: [PATCH 151/671] Add patch from 1.1-bugfix --- .gitignore | 2 +- sources | 2 +- vlc-1.1-backport_20110607.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 vlc-1.1-backport_20110607.patch diff --git a/.gitignore b/.gitignore index 2e1f846..21b1fbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.9.tar.bz2 +vlc-1.1.10.tar.bz2 diff --git a/sources b/sources index c588795..614fcd1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -06adb1848e6b87fbe1ced77ec0f91e4c vlc-1.1.9.tar.bz2 +066cb94b1e3aa848d828121354d6be4d vlc-1.1.10.tar.bz2 diff --git a/vlc-1.1-backport_20110607.patch b/vlc-1.1-backport_20110607.patch new file mode 100644 index 0000000..3306db5 --- /dev/null +++ b/vlc-1.1-backport_20110607.patch @@ -0,0 +1,27 @@ +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 7a5ef1f..64de04d 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -273,7 +273,7 @@ static int Open(vlc_object_t *obj) + aout_instance_t *aout = (aout_instance_t *)obj; + + #if !defined(PA_CHECK_VERSION) || !PA_CHECK_VERSION(0,9,22) +- if( !vlc_xlib_init( p_this ) ) ++ if( !vlc_xlib_init( obj ) ) + return VLC_EGENERIC; + #endif + +diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c +index fbb0b28..bd7c166 100644 +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -210,6 +210,9 @@ int OpenDemux( vlc_object_t *p_this ) + */ + p_sys->url.is_streamed = 1; + p_sys->io.is_streamed = 1; ++#if defined(AVIO_SEEKABLE_NORMAL) ++ p_sys->io.seekable = 0; ++#endif + } + + From da49a357e1f9c8268fb88ed5892ae7db8b7cf3dd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 7 Jun 2011 09:33:37 +0000 Subject: [PATCH 152/671] Update to 1.1.10 --- vlc.spec | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/vlc.spec b/vlc.spec index aca336d..d832fb2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 -%global tarball_version 1.1.9 +%global tarball_version 1.1.10 %global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -19,17 +19,14 @@ %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi %endif -%if 0%{?fedora} > 14 -# Those need works in Rawhide -%global _without_mozilla 1 -%else +%if 0%{?fedora} < 15 %global _with_gnomevfs 1 %endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.9 -Release: 2%{?dist} +Version: 1.1.10 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -41,6 +38,7 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch +Patch6: vlc-1.1-backport_20110607.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -253,6 +251,7 @@ JACK audio plugin for the VLC media player. %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif +%patch6 -p1 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -564,6 +563,11 @@ fi || : %changelog +* Mon Jun 06 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.10-1 +- Update to 1.1.10 +- backport from 1.1-bugfix +- Re-add mozilla-vlc for f15 + * Tue May 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.9-2 - Rebuilt for libdvbpsi From fb7cdd178f60e191db9fcd1e7844d4aef4f8a6c1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 14 Jul 2011 22:04:57 +0000 Subject: [PATCH 153/671] Rebuilt for x264 ABI 115 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d832fb2..fc0b288 100644 --- a/vlc.spec +++ b/vlc.spec @@ -26,7 +26,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.10 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -563,6 +563,9 @@ fi || : %changelog +* Fri Jul 15 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.10-2 +- Rebuilt for x264 ABI 115 + * Mon Jun 06 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.10-1 - Update to 1.1.10 - backport from 1.1-bugfix From 792347d935cc0f5edf7301b88a1cf715c86a46e8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 20 Jul 2011 21:00:15 +0000 Subject: [PATCH 154/671] Update to 1.1.11 --- .gitignore | 2 +- sources | 2 +- vlc-1.1-backport_20110607.patch | 27 --------------------------- vlc.spec | 11 ++++++----- 4 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 vlc-1.1-backport_20110607.patch diff --git a/.gitignore b/.gitignore index 21b1fbe..c1821e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.10.tar.bz2 +vlc-1.1.11.tar.bz2 diff --git a/sources b/sources index 614fcd1..26fbcbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -066cb94b1e3aa848d828121354d6be4d vlc-1.1.10.tar.bz2 +a64846d6f21ea179ae8e8bfb6f9447fe vlc-1.1.11.tar.bz2 diff --git a/vlc-1.1-backport_20110607.patch b/vlc-1.1-backport_20110607.patch deleted file mode 100644 index 3306db5..0000000 --- a/vlc-1.1-backport_20110607.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 7a5ef1f..64de04d 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -273,7 +273,7 @@ static int Open(vlc_object_t *obj) - aout_instance_t *aout = (aout_instance_t *)obj; - - #if !defined(PA_CHECK_VERSION) || !PA_CHECK_VERSION(0,9,22) -- if( !vlc_xlib_init( p_this ) ) -+ if( !vlc_xlib_init( obj ) ) - return VLC_EGENERIC; - #endif - -diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c -index fbb0b28..bd7c166 100644 ---- a/modules/demux/avformat/demux.c -+++ b/modules/demux/avformat/demux.c -@@ -210,6 +210,9 @@ int OpenDemux( vlc_object_t *p_this ) - */ - p_sys->url.is_streamed = 1; - p_sys->io.is_streamed = 1; -+#if defined(AVIO_SEEKABLE_NORMAL) -+ p_sys->io.seekable = 0; -+#endif - } - - diff --git a/vlc.spec b/vlc.spec index fc0b288..7a5834e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 -%global tarball_version 1.1.10 +%global tarball_version 1.1.11 %global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -25,8 +25,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.10 -Release: 2%{?dist} +Version: 1.1.11 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -38,7 +38,6 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch -Patch6: vlc-1.1-backport_20110607.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -251,7 +250,6 @@ JACK audio plugin for the VLC media player. %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif -%patch6 -p1 sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in rm modules/access/videodev2.h @@ -563,6 +561,9 @@ fi || : %changelog +* Wed Jul 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-1 +- Update to 1.1.11 + * Fri Jul 15 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.10-2 - Rebuilt for x264 ABI 115 From b370600e2f0d1114ab82722b7d726dff7be5a254 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 19 Sep 2011 22:55:25 +0000 Subject: [PATCH 155/671] Update to current bugfix --- vlc-1.1-bugfix-20110920.patch | 1226 +++++++++++++++++++++++++++++++++ vlc.spec | 7 +- 2 files changed, 1232 insertions(+), 1 deletion(-) create mode 100644 vlc-1.1-bugfix-20110920.patch diff --git a/vlc-1.1-bugfix-20110920.patch b/vlc-1.1-bugfix-20110920.patch new file mode 100644 index 0000000..d4e7f19 --- /dev/null +++ b/vlc-1.1-bugfix-20110920.patch @@ -0,0 +1,1226 @@ +diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c +index e1cd6b1..03f882f 100755 +--- a/modules/access/rtp/rtp.c ++++ b/modules/access/rtp/rtp.c +@@ -39,6 +39,8 @@ + #include "rtp.h" + #ifdef HAVE_SRTP + # include <srtp.h> ++# include <gcrypt.h> ++# include <vlc_gcrypt.h> + #endif + + #define RTP_CACHING_TEXT N_("RTP de-jitter buffer length (msec)") +@@ -276,6 +278,7 @@ static int Open (vlc_object_t *obj) + char *key = var_CreateGetNonEmptyString (demux, "srtp-key"); + if (key) + { ++ vlc_gcrypt_init (); + p_sys->srtp = srtp_create (SRTP_ENCR_AES_CM, SRTP_AUTH_HMAC_SHA1, 10, + SRTP_PRF_AES_CM, SRTP_RCC_MODE1); + if (p_sys->srtp == NULL) +diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c +index d29aec6..d0e14db 100644 +--- a/modules/access/v4l2.c ++++ b/modules/access/v4l2.c +@@ -792,7 +792,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) + } + + if( i == ARRAY_SIZE(psz_standards_list_text) ) +- p_sys->i_selected_standard_id = i_standards_list[strtol( psz_parser, &psz_parser, 0 )]; ++ p_sys->i_selected_standard_id = strtol( psz_parser, &psz_parser, 0 ); + } + else if( !strncmp( psz_parser, "chroma=", strlen( "chroma=" ) ) ) + { +diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c +index ab45f0c..6985781 100644 +--- a/modules/audio_output/auhal.c ++++ b/modules/audio_output/auhal.c +@@ -632,7 +632,7 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + + /* Set mixable to false if we are allowed to */ + AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; +- b_writeable = AudioObjectHasProperty( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress ); ++ err = AudioObjectIsPropertySettable( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable ); + err = AudioObjectGetPropertyDataSize( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size ); + err = AudioObjectGetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size, &b_mix ); + +@@ -676,7 +676,7 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + for( int i = 0; i < i_streams && p_sys->i_stream_index < 0 ; i++ ) + { + /* Find a stream with a cac3 stream */ +- AudioStreamBasicDescription *p_format_list = NULL; ++ AudioStreamRangedDescription *p_format_list = NULL; + int i_formats = 0; + bool b_digital = false; + +@@ -688,8 +688,8 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + continue; + } + +- i_formats = i_param_size / sizeof( AudioStreamBasicDescription ); +- p_format_list = (AudioStreamBasicDescription *)malloc( i_param_size ); ++ i_formats = i_param_size / sizeof( AudioStreamRangedDescription ); ++ p_format_list = (AudioStreamRangedDescription *)malloc( i_param_size ); + if( p_format_list == NULL ) + continue; + +@@ -704,8 +704,8 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + /* Check if one of the supported formats is a digital format */ + for( int j = 0; j < i_formats; j++ ) + { +- if( p_format_list[j].mFormatID == 'IAC3' || +- p_format_list[j].mFormatID == kAudioFormat60958AC3 ) ++ if( p_format_list[j].mFormat.mFormatID == 'IAC3' || ++ p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 ) + { + b_digital = true; + break; +@@ -737,21 +737,21 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + + for( int j = 0; j < i_formats; j++ ) + { +- if( p_format_list[j].mFormatID == 'IAC3' || +- p_format_list[j].mFormatID == kAudioFormat60958AC3 ) ++ if( p_format_list[j].mFormat.mFormatID == 'IAC3' || ++ p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 ) + { +- if( p_format_list[j].mSampleRate == p_aout->output.output.i_rate ) ++ if( p_format_list[j].mFormat.mSampleRate == p_aout->output.output.i_rate ) + { + i_requested_rate_format = j; + break; + } +- else if( p_format_list[j].mSampleRate == p_sys->sfmt_revert.mSampleRate ) ++ else if( p_format_list[j].mFormat.mSampleRate == p_sys->sfmt_revert.mSampleRate ) + { + i_current_rate_format = j; + } + else + { +- if( i_backup_rate_format < 0 || p_format_list[j].mSampleRate > p_format_list[i_backup_rate_format].mSampleRate ) ++ if( i_backup_rate_format < 0 || p_format_list[j].mFormat.mSampleRate > p_format_list[i_backup_rate_format].mFormat.mSampleRate ) + i_backup_rate_format = j; + } + } +@@ -759,10 +759,10 @@ static int OpenSPDIF( aout_instance_t * p_aout ) + } + + if( i_requested_rate_format >= 0 ) /* We prefer to output at the samplerate of the original audio */ +- p_sys->stream_format = p_format_list[i_requested_rate_format]; ++ p_sys->stream_format = p_format_list[i_requested_rate_format].mFormat; + else if( i_current_rate_format >= 0 ) /* If not possible, we will try to use the current samplerate of the device */ +- p_sys->stream_format = p_format_list[i_current_rate_format]; +- else p_sys->stream_format = p_format_list[i_backup_rate_format]; /* And if we have to, any digital format will be just fine (highest rate possible) */ ++ p_sys->stream_format = p_format_list[i_current_rate_format].mFormat; ++ else p_sys->stream_format = p_format_list[i_backup_rate_format].mFormat; /* And if we have to, any digital format will be just fine (highest rate possible) */ + } + free( p_format_list ); + } +@@ -866,7 +866,7 @@ static void Close( vlc_object_t * p_this ) + Boolean b_writeable; + /* Revert mixable to true if we are allowed to */ + AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; +- b_writeable = AudioObjectHasProperty( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress ); ++ err = AudioObjectIsPropertySettable( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable ); + err = AudioObjectGetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size, &b_mix ); + + if( !err && b_writeable ) +@@ -1082,7 +1082,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_ + bool b_return = false; + + /* Retrieve all the output streams */ +- AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; ++ AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; + err = AudioObjectGetPropertyDataSize( i_dev_id, &streamsAddress, 0, NULL, &i_param_size ); + if( err != noErr ) + { +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 64de04d..a377f66 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -58,7 +58,9 @@ struct aout_sys_t + pa_stream *stream; /**< PulseAudio playback stream object */ + pa_context *context; /**< PulseAudio connection context */ + pa_threaded_mainloop *mainloop; /**< PulseAudio event loop */ +- //uint32_t byterate; /**< bytes per second */ ++ mtime_t pts; /**< Play time of buffer write offset */ ++ mtime_t desync; /**< Measured desynchronization */ ++ unsigned rate; /**< Current stream sample rate */ + }; + + /* Context helpers */ +@@ -93,6 +95,164 @@ static void error(aout_instance_t *aout, const char *msg, pa_context *context) + msg_Err(aout, "%s: %s", msg, pa_strerror(pa_context_errno(context))); + } + ++/* Latency management and lip synchronization */ ++static mtime_t vlc_pa_get_latency(aout_instance_t *aout, ++ pa_context *ctx, pa_stream *s) ++{ ++ pa_usec_t latency; ++ int negative; ++ ++ if (pa_stream_get_latency(s, &latency, &negative)) { ++ if (pa_context_errno (ctx) != PA_ERR_NODATA) ++ error(aout, "unknown latency", ctx); ++ return VLC_TS_INVALID; ++ } ++ return negative ? -latency : +latency; ++} ++ ++static void stream_reset_sync(pa_stream *s, aout_instance_t *aout) ++{ ++ aout_sys_t *sys = aout->output.p_sys; ++ const unsigned rate = aout->output.output.i_rate; ++ ++ sys->pts = VLC_TS_INVALID; ++ sys->desync = 0; ++ pa_operation *op = pa_stream_update_sample_rate(s, rate, NULL, NULL); ++ if (unlikely(op == NULL)) ++ return; ++ pa_operation_unref(op); ++ sys->rate = rate; ++} ++ ++/** ++ * Starts or resumes the playback stream. ++ * Tries start playing back audio samples at the most accurate time ++ * in order to minimize desync and resampling during early playback. ++ * @note PulseAudio lock required. ++ */ ++static void stream_resync(aout_instance_t *aout, pa_stream *s) ++{ ++ aout_sys_t *sys = aout->output.p_sys; ++ pa_operation *op; ++ mtime_t delta; ++ ++ assert (pa_stream_is_corked(s) > 0); ++ assert (sys->pts != VLC_TS_INVALID); ++ ++ delta = vlc_pa_get_latency(aout, sys->context, s); ++ if (unlikely(delta == VLC_TS_INVALID)) ++ delta = 0; /* screwed */ ++ ++ delta = (sys->pts - mdate()) - delta; ++ ++ /* TODO: adjust prebuf instead of padding? */ ++ if (delta > 0) { ++ size_t nb = (delta * sys->rate) / CLOCK_FREQ; ++ size_t size = aout->output.output.i_bytes_per_frame; ++ float *zeroes = calloc (nb, size); ++ ++ msg_Dbg(aout, "starting with %zu zeroes (%"PRId64" us)", nb, ++ delta); ++#if 0 /* Fault injector: add delay */ ++ pa_stream_write(s, zeroes, nb * size, NULL, 0, PA_SEEK_RELATIVE); ++ pa_stream_write(s, zeroes, nb * size, NULL, 0, PA_SEEK_RELATIVE); ++#endif ++ if (likely(zeroes != NULL)) ++ if (pa_stream_write(s, zeroes, nb * size, free, 0, ++ PA_SEEK_RELATIVE) < 0) ++ free(zeroes); ++ } else ++ msg_Warn(aout, "starting late (%"PRId64" us)", delta); ++ ++ op = pa_stream_cork(s, 0, NULL, NULL); ++ if (op != NULL) ++ pa_operation_unref(op); ++ op = pa_stream_trigger(s, NULL, NULL); ++ if (op != NULL) ++ pa_operation_unref(op); ++} ++ ++/* Values from EBU R37 */ ++#define AOUT_EARLY_TOLERANCE 40000 ++#define AOUT_LATE_TOLERANCE 60000 ++ ++static void stream_latency_cb(pa_stream *s, void *userdata) ++{ ++ aout_instance_t *aout = userdata; ++ aout_sys_t *sys = aout->output.p_sys; ++ mtime_t delta, change; ++ ++ if (pa_stream_is_corked(s)) ++ return; ++ if (sys->pts == VLC_TS_INVALID) ++ { ++ msg_Dbg(aout, "missing latency from input"); ++ return; ++ } ++ ++ /* Compute lip desynchronization */ ++ delta = vlc_pa_get_latency(aout, sys->context, s); ++ if (delta == VLC_TS_INVALID) ++ return; ++ ++ delta = (sys->pts - mdate()) - delta; ++ change = delta - sys->desync; ++ sys->desync = delta; ++ //msg_Dbg(aout, "desync: %+"PRId64" us (variation: %+"PRId64" us)", ++ // delta, change); ++ ++ const unsigned inrate = aout->output.output.i_rate; ++ unsigned outrate = sys->rate; ++ bool sync = false; ++ ++ if (delta < -AOUT_LATE_TOLERANCE) ++ msg_Warn(aout, "too late by %"PRId64" us", -delta); ++ else if (delta > +AOUT_EARLY_TOLERANCE) ++ msg_Warn(aout, "too early by %"PRId64" us", delta); ++ else if (outrate == inrate) ++ return; /* In sync, do not add unnecessary disturbance! */ ++ else ++ sync = true; ++ ++ /* Compute playback sample rate */ ++ /* This is empirical (especially the shift values). ++ * Feel free to define something smarter. */ ++ int adj = sync ? (outrate - inrate) ++ : outrate * ((delta >> 4) + change) / (CLOCK_FREQ << 2); ++ /* This avoids too quick rate variation. It sounds really bad and ++ * causes unstability (e.g. oscillation around the correct rate). */ ++ int limit = inrate >> 10; ++ /* However, to improve stability and try to converge, closing to the ++ * nominal rate is favored over drifting from it. */ ++ if ((adj > 0) == (sys->rate > inrate)) ++ limit *= 2; ++ if (adj > +limit) ++ adj = +limit; ++ if (adj < -limit) ++ adj = -limit; ++ outrate -= adj; ++ ++ /* This keeps the effective rate within specified range ++ * (+/-AOUT_MAX_RESAMPLING% - see <vlc_aout.h>) of the nominal rate. */ ++ limit = inrate * AOUT_MAX_RESAMPLING / 100; ++ if (outrate > inrate + limit) ++ outrate = inrate + limit; ++ if (outrate < inrate - limit) ++ outrate = inrate - limit; ++ ++ /* Apply adjusted sample rate */ ++ if (outrate == sys->rate) ++ return; ++ pa_operation *op = pa_stream_update_sample_rate(s, outrate, NULL, NULL); ++ if (unlikely(op == NULL)) { ++ error(aout, "cannot change sample rate", sys->context); ++ return; ++ } ++ pa_operation_unref(op); ++ msg_Dbg(aout, "changed sample rate to %u Hz",outrate); ++ sys->rate = outrate; ++} ++ + /* Stream helpers */ + static void stream_state_cb(pa_stream *s, void *userdata) + { +@@ -106,6 +266,7 @@ static void stream_state_cb(pa_stream *s, void *userdata) + default: + break; + } ++ (void) userdata; + } + + static void stream_moved_cb(pa_stream *s, void *userdata) +@@ -138,15 +299,19 @@ static void stream_suspended_cb(pa_stream *s, void *userdata) + aout_instance_t *aout = userdata; + + msg_Dbg(aout, "suspended"); +- (void) s; ++ stream_reset_sync(s, aout); + } + + static void stream_underflow_cb(pa_stream *s, void *userdata) + { + aout_instance_t *aout = userdata; ++ pa_operation *op; + +- msg_Dbg(aout, "underflow"); +- (void) s; ++ msg_Warn(aout, "underflow"); ++ op = pa_stream_cork(s, 1, NULL, NULL); ++ if (op != NULL) ++ pa_operation_unref(op); ++ stream_reset_sync(s, aout); + } + + static int stream_wait(pa_threaded_mainloop *mainloop, pa_stream *stream) +@@ -193,6 +358,17 @@ static void Play(aout_instance_t *aout) + aout_sys_t *sys = aout->output.p_sys; + pa_stream *s = sys->stream; + ++ /* This function is called exactly once per block in the output FIFO. */ ++ block_t *block = aout_FifoPop(aout, &aout->output.fifo); ++ assert (block != NULL); ++ ++ const void *ptr = data_convert(&block); ++ if (unlikely(ptr == NULL)) ++ return; ++ ++ size_t len = block->i_buffer; ++ mtime_t pts = block->i_pts + block->i_length; ++ + /* Note: The core already holds the output FIFO lock at this point. + * Therefore we must not under any circumstances (try to) acquire the + * output FIFO lock while the PulseAudio threaded main loop lock is held +@@ -200,71 +376,26 @@ static void Play(aout_instance_t *aout) + * will take place, and sooner or later a deadlock. */ + pa_threaded_mainloop_lock(sys->mainloop); + +- if (pa_stream_is_corked(sys->stream) > 0) { +- pa_operation *op = pa_stream_cork(s, 0, NULL, NULL); +- if (op != NULL) +- pa_operation_unref(op); +- msg_Dbg(aout, "uncorking"); +- } +- +-#if 0 +- /* This function should be called by the LibVLC core a header of time, +- * but not more than AOUT_MAX_PREPARE. The PulseAudio latency should be +- * shorter than that (though it might not be the case with some evil piece +- * of audio output hardware). So we may need to trigger playback early, +- * (that is to say, short cut the PulseAudio prebuffering). Otherwise, +- * audio and video may be out of synchronization. */ +- pa_usec_t latency; +- int negative; +- if (pa_stream_get_latency(s, &latency, &negative) < 0) { +- /* Especially at start of stream, latency may not be known (yet). */ +- if (pa_context_errno(sys->context) != PA_ERR_NODATA) +- error(aout, "cannot determine latency", sys->context); +- } else { +- mtime_t gap = aout_FifoFirstDate(aout, &aout->output.fifo) - mdate() +- - latency; ++ sys->pts = pts; ++ if (pa_stream_is_corked(s) > 0) ++ stream_resync(aout, s); + +- if (gap > AOUT_PTS_TOLERANCE) +- msg_Dbg(aout, "buffer too early (%"PRId64" us)", gap); +- else if (gap < -AOUT_PTS_TOLERANCE) +- msg_Err(aout, "buffer too late (%"PRId64" us)", -gap); +- } +-#endif + #if 0 /* Fault injector to test underrun recovery */ +- static unsigned u = 0; +- if ((++u % 500) == 0) { ++ static volatile unsigned u = 0; ++ if ((++u % 1000) == 0) { + msg_Err(aout, "fault injection"); +- msleep(CLOCK_FREQ*2); ++ pa_operation_unref(pa_stream_flush(s, NULL, NULL)); + } + #endif + +- /* This function is called exactly once per block in the output FIFO, so +- * this for-loop is not necessary. +- * If this function is changed to not always dequeue blocks, be sure to +- * limit the queue size to a reasonable limit to avoid huge leaks. */ +- for (;;) { +- block_t *block = aout_FifoPop(aout, &aout->output.fifo); +- if (block == NULL) +- break; +- +- const void *ptr = data_convert(&block); +- if (unlikely(ptr == NULL)) +- break; +- +- size_t len = block->i_buffer; +- //mtime_t pts = block->i_pts, duration = block->i_length; +- +- if (pa_stream_write(s, ptr, len, data_free, 0, PA_SEEK_RELATIVE) < 0) +- { +- error(aout, "cannot write", sys->context); +- block_Release(block); +- } ++ if (pa_stream_write(s, ptr, len, data_free, 0, PA_SEEK_RELATIVE) < 0) { ++ error(aout, "cannot write", sys->context); ++ block_Release(block); + } + + pa_threaded_mainloop_unlock(sys->mainloop); + } + +- + /***************************************************************************** + * Open: open the audio device + *****************************************************************************/ +@@ -377,21 +508,27 @@ static int Open(vlc_object_t *obj) + msg_Err(aout, "unsupported channel map"); + return VLC_EGENERIC; + } else { +- const char *name = pa_channel_map_to_pretty_name(&map); ++ const char *name = pa_channel_map_to_name(&map); + msg_Dbg(aout, "using %s channel map", (name != NULL) ? name : "?"); + } + +- const pa_stream_flags_t flags = PA_STREAM_INTERPOLATE_TIMING ++ /* Stream parameters */ ++ const pa_stream_flags_t flags = PA_STREAM_START_CORKED ++ //| PA_STREAM_INTERPOLATE_TIMING + | PA_STREAM_AUTO_TIMING_UPDATE +- | PA_STREAM_ADJUST_LATENCY +- | PA_STREAM_START_CORKED; ++ | PA_STREAM_VARIABLE_RATE; + + const uint32_t byterate = pa_bytes_per_second(&ss); + struct pa_buffer_attr attr; +- /* no point in larger buffers on PA side than VLC */ + attr.maxlength = -1; +- attr.tlength = byterate * AOUT_MAX_ADVANCE_TIME / CLOCK_FREQ; +- attr.prebuf = byterate * AOUT_MAX_PREPARE_TIME / CLOCK_FREQ; ++ /* PulseAudio assumes that tlength bytes are available in the buffer. Thus ++ * we need to be conservative and set the minimum value that the VLC ++ * audio decoder thread warrants. Otherwise, PulseAudio buffers will ++ * underrun on hardware with large buffers. VLC keeps at least ++ * AOUT_MIN_PREPARE and at most AOUT_MAX_PREPARE worth of audio buffers. ++ * TODO? tlength could be adaptively increased to reduce wakeups. */ ++ attr.tlength = byterate * AOUT_MIN_PREPARE_TIME / CLOCK_FREQ; ++ attr.prebuf = 0; /* trigger manually */ + attr.minreq = -1; + attr.fragsize = 0; /* not used for output */ + +@@ -427,6 +564,9 @@ static int Open(vlc_object_t *obj) + if (unlikely(ctx == NULL)) + goto fail; + sys->context = ctx; ++ sys->pts = VLC_TS_INVALID; ++ sys->desync = 0; ++ sys->rate = ss.rate; + + pa_context_set_state_callback(ctx, context_state_cb, mainloop); + if (pa_context_connect(ctx, NULL, 0, NULL) < 0 +@@ -443,6 +583,7 @@ static int Open(vlc_object_t *obj) + } + sys->stream = s; + pa_stream_set_state_callback(s, stream_state_cb, mainloop); ++ pa_stream_set_latency_update_callback(s, stream_latency_cb, aout); + pa_stream_set_moved_callback(s, stream_moved_cb, aout); + pa_stream_set_overflow_callback(s, stream_overflow_cb, aout); + pa_stream_set_started_callback(s, stream_started_cb, aout); +@@ -487,19 +628,24 @@ static void Close (vlc_object_t *obj) + + pa_threaded_mainloop_lock(mainloop); + if (s != NULL) { +- pa_operation *op; +- +- op = pa_stream_flush(s, NULL, NULL); +- if (op != NULL) +- pa_operation_unref(op); +- op = pa_stream_drain(s, NULL, NULL); +- if (op != NULL) +- pa_operation_unref(op); + pa_stream_disconnect(s); ++ ++ /* Clear all callbacks */ ++ pa_stream_set_state_callback(s, NULL, NULL); ++ pa_stream_set_latency_update_callback(s, NULL, aout); ++ pa_stream_set_moved_callback(s, NULL, aout); ++ pa_stream_set_overflow_callback(s, NULL, aout); ++ pa_stream_set_started_callback(s, NULL, aout); ++ pa_stream_set_suspended_callback(s, NULL, aout); ++ pa_stream_set_underflow_callback(s, NULL, aout); ++ + pa_stream_unref(s); + } +- if (ctx != NULL) ++ if (ctx != NULL) { ++ pa_context_disconnect(ctx); ++ pa_context_set_state_callback (ctx, NULL, NULL); + pa_context_unref(ctx); ++ } + pa_threaded_mainloop_unlock(mainloop); + pa_threaded_mainloop_free(mainloop); + free(sys); +diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c +index 8ef775f..d8a0cd5 100644 +--- a/modules/codec/vorbis.c ++++ b/modules/codec/vorbis.c +@@ -570,6 +570,10 @@ static void ParseVorbisComments( decoder_t *p_dec ) + *psz_value = '\0'; + psz_value++; + ++ /* Don't add empty values */ ++ if( *psz_value == '\0' ) ++ break; ++ + if( !p_dec->p_description ) + p_dec->p_description = vlc_meta_New(); + if( p_dec->p_description ) +diff --git a/modules/control/signals.c b/modules/control/signals.c +index a1e4215..b183718 100644 +--- a/modules/control/signals.c ++++ b/modules/control/signals.c +@@ -130,16 +130,16 @@ static void *SigThread (void *data) + sigaction (signum, NULL, &act); + if ((act.sa_flags & SA_SIGINFO) || (act.sa_handler != SIG_DFL)) + { +- msg_Err (obj, "signal %d overridden (%p)", signum, +- act.sa_handler); ++ msg_Warn (obj, "signal %d overridden (%p)", signum, ++ act.sa_handler); + #ifdef __GLIBC__ + Dl_info info; + + if (dladdr (act.sa_handler, &info)) +- msg_Err (obj, " %s(%s)[%p]", +- info.dli_fname ? info.dli_fname : "?", +- info.dli_sname ? info.dli_sname : "?", +- info.dli_saddr); ++ msg_Warn (obj, " %s(%s)[%p]", ++ info.dli_fname ? info.dli_fname : "?", ++ info.dli_sname ? info.dli_sname : "?", ++ info.dli_saddr); + #endif + if (!(act.sa_flags & SA_SIGINFO) && (act.sa_handler != SIG_IGN)) + act.sa_handler (signum); +diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c +index ebb8f56..20ae0e7 100644 +--- a/modules/demux/avi/avi.c ++++ b/modules/demux/avi/avi.c +@@ -1280,15 +1280,16 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent ) + { + + demux_sys_t *p_sys = p_demux->p_sys; +- unsigned int i_stream; + msg_Dbg( p_demux, "seek requested: %"PRId64" seconds %d%%", + i_date / 1000000, i_percent ); + + if( p_sys->b_seekable ) + { ++ unsigned i_stream; ++ + if( !p_sys->i_length ) + { +- avi_track_t *p_stream; ++ avi_track_t *p_stream = NULL; + int64_t i_pos; + + /* use i_percent to create a true i_date */ +@@ -1304,17 +1305,19 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent ) + /* try to find chunk that is at i_percent or the file */ + i_pos = __MAX( i_percent * stream_Size( p_demux->s ) / 100, + p_sys->i_movi_begin ); +- /* search first selected stream (and prefer non eof ones) */ +- for( i_stream = 0, p_stream = NULL; +- i_stream < p_sys->i_track; i_stream++ ) ++ /* search first selected stream (and prefer non-EOF ones) */ ++ for( unsigned i = 0; i < p_sys->i_track; i++ ) + { +- if( !p_stream || p_stream->b_eof ) +- p_stream = p_sys->track[i_stream]; ++ avi_track_t *p_track = p_sys->track[i]; ++ if( !p_track->b_activated ) ++ continue; + +- if( p_stream->b_activated && !p_stream->b_eof ) ++ p_stream = p_track; ++ i_stream = i; ++ if( !p_track->b_eof ) + break; + } +- if( !p_stream || !p_stream->b_activated ) ++ if( p_stream == NULL ) + { + msg_Warn( p_demux, "cannot find any selected stream" ); + return VLC_EGENERIC; +diff --git a/modules/gui/macosx/about.m b/modules/gui/macosx/about.m +index e0ebf78..551d19b 100644 +--- a/modules/gui/macosx/about.m ++++ b/modules/gui/macosx/about.m +@@ -100,8 +100,7 @@ static VLAboutBox *_o_sharedInstance = nil; + #else + compiler = [NSString stringWithFormat:@"gcc %s", __VERSION__]; + #endif +- [o_revision_field setStringValue: +- [NSString stringWithFormat: _NS("Compiled by %s with %@"), VLC_CompileBy(), compiler]]; ++ [o_revision_field setStringValue: [NSString stringWithFormat: _NS("Compiled by %@ with %@"), [NSString stringWithUTF8String:VLC_CompileBy()], compiler]]; + + /* Setup the nameversion field */ + [o_name_version_field setStringValue: [NSString stringWithFormat:@"Version %s (%s)", VLC_Version(), PLATFORM]]; +diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h +index 7e14eea..e7e0511 100644 +--- a/modules/gui/macosx/intf.h ++++ b/modules/gui/macosx/intf.h +@@ -104,7 +104,7 @@ struct intf_sys_t + id o_bookmarks; /* VLCBookmarks */ + id o_embedded_list; /* VLCEmbeddedList*/ + id o_coredialogs; /* VLCCoreDialogProvider */ +- VLCInformation * o_info; /* VLCInformation */ ++ id o_info; /* VLCInfo */ + id o_eyetv; /* VLCEyeTVController */ + BOOL nib_main_loaded; /* main nibfile */ + BOOL nib_open_loaded; /* open nibfile */ +diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m +index 535e9b9..bdcfdcb 100644 +--- a/modules/gui/macosx/intf.m ++++ b/modules/gui/macosx/intf.m +@@ -2589,9 +2589,8 @@ end: + + o_attr = [NSDictionary dictionaryWithObject: pp_color[i_type] + forKey: NSForegroundColorAttributeName]; +- o_msg = [[[o_notification userInfo] objectForKey: @"Message"] stringByAppendingString: @"\n"]; +- o_msg_color = [[NSAttributedString alloc] +- initWithString: o_msg attributes: o_attr]; ++ o_msg = [NSString stringWithFormat:@"%@\n", [[o_notification userInfo] objectForKey: @"Message"]]; ++ o_msg_color = [[NSAttributedString alloc] initWithString: o_msg attributes: o_attr]; + [o_msg_arr addObject: [o_msg_color autorelease]]; + + b_msg_arr_changed = YES; +diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp +index 6bc2926..6a0567a 100644 +--- a/modules/meta_engine/taglib.cpp ++++ b/modules/meta_engine/taglib.cpp +@@ -74,6 +74,8 @@ + # define TAGLIB_HAVE_AIFF_WAV_H + # include <aifffile.h> + # include <wavfile.h> ++#else ++# include <id3v2tag.h> + #endif + + #if TAGLIB_VERSION >= VERSION_INT(1,6,1) && defined(TAGLIB_WITH_MP4) +diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c +index 9b18f1d..95780ce 100644 +--- a/modules/misc/audioscrobbler.c ++++ b/modules/misc/audioscrobbler.c +@@ -122,7 +122,7 @@ static int PlayingChange ( vlc_object_t *, const char *, vlc_value_t, + + static void AddToQueue ( intf_thread_t * ); + static int Handshake ( intf_thread_t * ); +-static int ReadMetaData ( intf_thread_t * ); ++static void ReadMetaData ( intf_thread_t * ); + static void DeleteSong ( audioscrobbler_song_t* ); + static int ParseURL ( char *, char **, char **, int * ); + static void HandleInterval ( mtime_t *, unsigned int * ); +@@ -927,7 +927,7 @@ static void DeleteSong( audioscrobbler_song_t* p_song ) + /***************************************************************************** + * ReadMetaData : Read meta data when parsed by vlc + *****************************************************************************/ +-static int ReadMetaData( intf_thread_t *p_this ) ++static void ReadMetaData( intf_thread_t *p_this ) + { + input_thread_t *p_input; + input_item_t *p_item; +@@ -936,81 +936,65 @@ static int ReadMetaData( intf_thread_t *p_this ) + + p_input = playlist_CurrentInput( pl_Get( p_this ) ); + if( !p_input ) +- return( VLC_SUCCESS ); ++ return; + + p_item = input_GetItem( p_input ); + if( !p_item ) +- return VLC_SUCCESS; +- +- char *psz_meta; +-#define ALLOC_ITEM_META( a, b ) \ +- psz_meta = input_item_Get##b( p_item ); \ +- if( psz_meta && *psz_meta ) \ +- { \ +- a = encode_URI_component( psz_meta ); \ +- if( !a ) \ +- { \ +- vlc_mutex_unlock( &p_sys->lock ); \ +- vlc_object_release( p_input ); \ +- free( psz_meta ); \ +- return VLC_ENOMEM; \ +- } \ ++ { ++ vlc_object_release( p_input ); ++ return; + } + ++#define ALLOC_ITEM_META( a, b ) do { \ ++ char *psz_meta = input_item_Get##b( p_item ); \ ++ if( psz_meta && *psz_meta ) \ ++ a = encode_URI_component( psz_meta ); \ ++ free( psz_meta ); \ ++ } while(0) ++ + vlc_mutex_lock( &p_sys->lock ); + + p_sys->b_meta_read = true; + +- ALLOC_ITEM_META( p_sys->p_current_song.psz_a, Artist ) +- else ++ ALLOC_ITEM_META( p_sys->p_current_song.psz_a, Artist ); ++ if( !p_sys->p_current_song.psz_a ) + { +- vlc_mutex_unlock( &p_sys->lock ); + msg_Dbg( p_this, "No artist.." ); +- vlc_object_release( p_input ); +- free( psz_meta ); +- return VLC_EGENERIC; ++ DeleteSong( &p_sys->p_current_song ); ++ goto end; + } +- free( psz_meta ); + +- ALLOC_ITEM_META( p_sys->p_current_song.psz_t, Title ) +- else ++ ALLOC_ITEM_META( p_sys->p_current_song.psz_t, Title ); ++ if( !p_sys->p_current_song.psz_t ) + { +- vlc_mutex_unlock( &p_sys->lock ); + msg_Dbg( p_this, "No track name.." ); +- vlc_object_release( p_input ); +- free( p_sys->p_current_song.psz_a ); +- free( psz_meta ); +- return VLC_EGENERIC; ++ DeleteSong( &p_sys->p_current_song ); ++ goto end; + } +- free( psz_meta ); + + /* Now we have read the mandatory meta data, so we can submit that info */ + p_sys->b_submit = true; + +- ALLOC_ITEM_META( p_sys->p_current_song.psz_b, Album ) +- else ++ ALLOC_ITEM_META( p_sys->p_current_song.psz_b, Album ); ++ if( !p_sys->p_current_song.psz_b ) + p_sys->p_current_song.psz_b = calloc( 1, 1 ); +- free( psz_meta ); + +- ALLOC_ITEM_META( p_sys->p_current_song.psz_m, TrackID ) +- else ++ ALLOC_ITEM_META( p_sys->p_current_song.psz_m, TrackID ); ++ if( !p_sys->p_current_song.psz_m ) + p_sys->p_current_song.psz_m = calloc( 1, 1 ); +- free( psz_meta ); + + p_sys->p_current_song.i_l = input_item_GetDuration( p_item ) / 1000000; + +- ALLOC_ITEM_META( p_sys->p_current_song.psz_n, TrackNum ) +- else ++ ALLOC_ITEM_META( p_sys->p_current_song.psz_n, TrackNum ); ++ if( !p_sys->p_current_song.psz_n ) + p_sys->p_current_song.psz_n = calloc( 1, 1 ); +- free( psz_meta ); + #undef ALLOC_ITEM_META + + msg_Dbg( p_this, "Meta data registered" ); + ++end: + vlc_mutex_unlock( &p_sys->lock ); + vlc_object_release( p_input ); +- return VLC_SUCCESS; +- + } + + static void HandleInterval( mtime_t *next, unsigned int *i_interval ) +diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c +index 71876b5..328e019 100644 +--- a/modules/misc/gnutls.c ++++ b/modules/misc/gnutls.c +@@ -130,7 +130,7 @@ static int gnutls_Init (vlc_object_t *p_this) + goto error; + } + +- const char *psz_version = gnutls_check_version ("1.3.3"); ++ const char *psz_version = gnutls_check_version ("1.7.4"); + if (psz_version == NULL) + { + msg_Err (p_this, "unsupported GnuTLS version"); +@@ -356,8 +356,8 @@ gnutls_HandshakeAndValidate( tls_session_t *session ) + goto error; + } + +- assert( p_sys->psz_hostname != NULL ); +- if ( !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) ) ++ if( p_sys->psz_hostname != NULL ++ && !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) ) + { + msg_Err( session, "Certificate does not match \"%s\"", + p_sys->psz_hostname ); +@@ -731,7 +731,7 @@ static int OpenClient (vlc_object_t *obj) + + char *servername = var_GetNonEmptyString (p_session, "tls-server-name"); + if (servername == NULL ) +- msg_Err (p_session, "server name missing for TLS session"); ++ abort (); + else + gnutls_server_name_set (p_sys->session.session, GNUTLS_NAME_DNS, + servername, strlen (servername)); +@@ -1046,7 +1046,7 @@ gnutls_ServerAddCRL( tls_server_t *p_server, const char *psz_crl_path ) + (p_server->p_sys))->x509_cred, + psz_local_path, + GNUTLS_X509_FMT_PEM ); +- LocaleFree( psz_crl_path ); ++ LocaleFree( psz_local_path ); + if( val < 0 ) + { + msg_Err( p_server, "cannot add CRL (%s): %s", psz_crl_path, +diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c +index e6a247a..954a3c1 100644 +--- a/modules/stream_out/rtp.c ++++ b/modules/stream_out/rtp.c +@@ -42,6 +42,8 @@ + #include <vlc_rand.h> + #ifdef HAVE_SRTP + # include <srtp.h> ++# include <gcrypt.h> ++# include <vlc_gcrypt.h> + #endif + + #include "rtp.h" +@@ -1006,6 +1008,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + char *key = var_CreateGetNonEmptyString (p_stream, SOUT_CFG_PREFIX"key"); + if (key) + { ++ vlc_gcrypt_init (); + id->srtp = srtp_create (SRTP_ENCR_AES_CM, SRTP_AUTH_HMAC_SHA1, 10, + SRTP_PRF_AES_CM, SRTP_RCC_MODE1); + if (id->srtp == NULL) +diff --git a/modules/stream_out/smem.c b/modules/stream_out/smem.c +index 784c31b..59f27cf 100644 +--- a/modules/stream_out/smem.c ++++ b/modules/stream_out/smem.c +@@ -369,6 +369,13 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id, + int i_samples = 0; + + i_size = p_buffer->i_buffer; ++ if (id->format->audio.i_channels <= 0) ++ { ++ msg_Warn( p_stream, "No buffer given!" ); ++ block_ChainRelease( p_buffer ); ++ return VLC_EGENERIC; ++ } ++ + i_samples = i_size / ( ( id->format->audio.i_bitspersample / 8 ) * id->format->audio.i_channels ); + /* Calling the prerender callback to get user buffer */ + p_sys->pf_audio_prerender_callback( id->p_data, &p_pcm_buffer, i_size ); +diff --git a/modules/video_filter/Modules.am b/modules/video_filter/Modules.am +index c07f263..afa6330 100644 +--- a/modules/video_filter/Modules.am ++++ b/modules/video_filter/Modules.am +@@ -1,4 +1,5 @@ + SUBDIRS = dynamicoverlay ++ + SOURCES_mosaic = mosaic.c mosaic.h + SOURCES_transform = transform.c + SOURCES_invert = invert.c +@@ -17,7 +18,13 @@ SOURCES_marq = marq.c + SOURCES_rss = rss.c + SOURCES_motiondetect = motiondetect.c + SOURCES_rv32 = rv32.c +-SOURCES_osdmenu = osdmenu.c ++ ++libosdmenu_plugin_la_SOURCES = osdmenu.c ++libosdmenu_plugin_la_CFLAGS = $(AM_CFLAGS) -DPKGDATADIR=\"$(vlcdatadir)\" ++libosdmenu_plugin_la_LIBADD = $(AM_LIBADD) ++libosdmenu_plugin_la_DEPENDENCIES = ++EXTRA_LTLIBRARIES += libosdmenu_plugin.la ++ + SOURCES_remoteosd = remoteosd.c remoteosd_rfbproto.h + SOURCES_magnify = magnify.c + SOURCES_wave = wave.c +diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c +index 377f740..87416bf 100644 +--- a/modules/video_filter/osdmenu.c ++++ b/modules/video_filter/osdmenu.c +@@ -105,7 +105,7 @@ static int MouseEvent( vlc_object_t *, char const *, + #if defined( WIN32 ) || defined( UNDER_CE ) + #define OSD_DEFAULT_CFG "osdmenu/default.cfg" + #else +-#define OSD_DEFAULT_CFG "share/osdmenu/default.cfg" ++#define OSD_DEFAULT_CFG PKGDATADIR"/osdmenu/default.cfg" + #endif + + #define OSD_UPDATE_MIN 0 +diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c +index d2d5e26..3a40829 100644 +--- a/modules/video_output/msw/events.c ++++ b/modules/video_output/msw/events.c +@@ -122,6 +122,8 @@ struct event_thread_t + video_format_t source; + vout_display_place_t place; + ++ HICON vlc_icon; ++ + bool has_moved; + }; + +@@ -498,7 +500,6 @@ static int DirectXCreateWindow( event_thread_t *p_event ) + HMENU hMenu; + RECT rect_window; + WNDCLASS wc; /* window class components */ +- HICON vlc_icon; + char vlc_path[MAX_PATH+1]; + int i_style, i_stylex; + +@@ -537,11 +538,11 @@ static int DirectXCreateWindow( event_thread_t *p_event ) + #endif + + /* Get the Icon from the main app */ +- vlc_icon = NULL; ++ p_event->vlc_icon = NULL; + #ifndef UNDER_CE + if( GetModuleFileName( NULL, vlc_path, MAX_PATH ) ) + { +- vlc_icon = ExtractIcon( hInstance, vlc_path, 0 ); ++ p_event->vlc_icon = ExtractIcon( hInstance, vlc_path, 0 ); + } + #endif + +@@ -551,7 +552,7 @@ static int DirectXCreateWindow( event_thread_t *p_event ) + wc.cbClsExtra = 0; /* no extra class data */ + wc.cbWndExtra = 0; /* no extra window data */ + wc.hInstance = hInstance; /* instance */ +- wc.hIcon = vlc_icon; /* load the vlc big icon */ ++ wc.hIcon = p_event->vlc_icon; /* load the vlc big icon */ + wc.hCursor = p_event->is_cursor_hidden ? p_event->cursor_empty : + p_event->cursor_arrow; + wc.hbrBackground = GetStockObject(BLACK_BRUSH); /* background color */ +@@ -561,8 +562,8 @@ static int DirectXCreateWindow( event_thread_t *p_event ) + /* Register the window class */ + if( !RegisterClass(&wc) ) + { +- if( vlc_icon ) +- DestroyIcon( vlc_icon ); ++ if( p_event->vlc_icon ) ++ DestroyIcon( p_event->vlc_icon ); + + msg_Err( vd, "DirectXCreateWindow RegisterClass FAILED (err=%lu)", GetLastError() ); + return VLC_EGENERIC; +@@ -607,6 +608,12 @@ static int DirectXCreateWindow( event_thread_t *p_event ) + { + i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD; + i_stylex = 0; ++ ++ /* allow user to regain control over input events if requested */ ++ bool b_mouse_support = var_InheritBool( vd, "mouse-events" ); ++ bool b_key_support = var_InheritBool( vd, "keyboard-events" ); ++ if( !b_mouse_support && !b_key_support ) ++ i_style |= WS_DISABLED; + } + + p_event->i_window_style = i_style; +@@ -711,6 +718,9 @@ static void DirectXCloseWindow( event_thread_t *p_event ) + vout_display_DeleteWindow( vd, p_event->parent_window ); + p_event->hwnd = NULL; + ++ if( p_event->vlc_icon ) ++ DestroyIcon( p_event->vlc_icon ); ++ + HINSTANCE hInstance = GetModuleHandle(NULL); + UnregisterClass( p_event->class_video, hInstance ); + UnregisterClass( p_event->class_main, hInstance ); +diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c +index 356f3c5..d899a17 100644 +--- a/modules/video_output/xcb/xvideo.c ++++ b/modules/video_output/xcb/xvideo.c +@@ -297,10 +297,11 @@ FindFormat (vout_display_t *vd, + static int Open (vlc_object_t *obj) + { + vout_display_t *vd = (vout_display_t *)obj; +- vout_display_sys_t *p_sys = malloc (sizeof (*p_sys)); ++ vout_display_sys_t *p_sys; + + if (!var_CreateGetBool (obj, "overlay")) + return VLC_EGENERIC; ++ p_sys = malloc (sizeof (*p_sys)); + if (p_sys == NULL) + return VLC_ENOMEM; + +diff --git a/src/control/audio.c b/src/control/audio.c +index edde5b7..90333a8 100644 +--- a/src/control/audio.c ++++ b/src/control/audio.c +@@ -266,9 +266,9 @@ void libvlc_audio_output_device_set( libvlc_media_player_t *mp, + return; + if( asprintf( &psz_config_name, "%s-audio-device", psz_audio_output ) == -1 ) + return; +- if( !var_Type( mp, psz_audio_output ) ) ++ if( !var_Type( mp, psz_config_name ) ) + /* Don't recreate the same variable over and over and over... */ +- var_Create( mp, psz_audio_output, VLC_VAR_STRING ); ++ var_Create( mp, psz_config_name, VLC_VAR_STRING ); + var_SetString( mp, psz_config_name, psz_device_id ); + free( psz_config_name ); + } +diff --git a/src/input/demux.c b/src/input/demux.c +index 981799f..ab01a13 100644 +--- a/src/input/demux.c ++++ b/src/input/demux.c +@@ -162,8 +162,9 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input, + /* ID3/APE tags will mess-up demuxer probing so we skip it here. + * ID3/APE parsers will called later on in the demuxer to access the + * skipped info. */ +- if( !SkipID3Tag( p_demux ) ) +- SkipAPETag( p_demux ); ++ while (SkipID3Tag( p_demux )) ++ ; ++ SkipAPETag( p_demux ); + + p_demux->p_module = + module_need( p_demux, "demux", psz_module, +diff --git a/libs/srtp/Makefile.am b/libs/srtp/Makefile.am +index 8b7522b..b90bed1 100644 +--- a/libs/srtp/Makefile.am ++++ b/libs/srtp/Makefile.am +@@ -32,11 +32,6 @@ srtp_LDADD = libvlc_srtp.la + test_recv_LDADD = libvlc_srtp.la + test_aes_LDADD = @GCRYPT_LIBS@ + +-if !HAVE_WIN32 +-libvlc_srtp_la_LIBADD += -lpthread +-test_aes_LDADD += -lpthread +-endif +- + lcov-run: + rm -Rf *.gcda lcov + $(MAKE) $(AM_MAKEFLAGS) check +diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c +index f2f2c95..766834c 100644 +--- a/libs/srtp/srtp.c ++++ b/libs/srtp/srtp.c +@@ -43,8 +43,6 @@ + # include <winsock2.h> + #else + # include <netinet/in.h> +-# include <pthread.h> +-GCRY_THREAD_OPTION_PTHREAD_IMPL; + #endif + + #define debug( ... ) (void)0 +@@ -86,41 +84,6 @@ static inline unsigned rcc_mode (const srtp_session_t *s) + return (s->flags >> 4) & 3; + } + +-static bool libgcrypt_usable = false; +- +-static void initonce_libgcrypt (void) +-{ +-#ifndef WIN32 +- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +-#endif +- +- if ((gcry_check_version ("1.1.94") == NULL) +- || gcry_control (GCRYCTL_DISABLE_SECMEM, 0) +- || gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0)) +- return; +- +- libgcrypt_usable = true; +-} +- +-static int init_libgcrypt (void) +-{ +- int retval; +-#ifndef WIN32 +- static pthread_once_t once = PTHREAD_ONCE_INIT; +- +- pthread_once (&once, initonce_libgcrypt); +-#else +-# warning FIXME: This is not thread-safe. +- if (!libgcrypt_usable) +- initonce_libgcrypt (); +-#endif +- +- retval = libgcrypt_usable ? 0 : -1; +- +- return retval; +- +-} +- + + static void proto_destroy (srtp_proto_t *p) + { +@@ -170,7 +133,7 @@ static int proto_create (srtp_proto_t *p, int gcipher, int gmd) + srtp_session_t * + srtp_create (int encr, int auth, unsigned tag_len, int prf, unsigned flags) + { +- if ((flags & ~SRTP_FLAGS_MASK) || init_libgcrypt ()) ++ if ((flags & ~SRTP_FLAGS_MASK)) + return NULL; + + int cipher, md; +@@ -833,7 +796,7 @@ srtcp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize) + + len += 4; /* Digests SRTCP index too */ + +- const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len); ++ const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len); + memcpy (buf + len, tag, s->tag_len); + *lenp = len + s->tag_len; + return 0; +@@ -861,7 +824,7 @@ srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp) + return EINVAL; + len -= s->tag_len; + +- const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len); ++ const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len); + if (memcmp (buf + len, tag, s->tag_len)) + return EACCES; + +diff --git a/libs/srtp/srtp.h b/libs/srtp/srtp.h +index b58b9d6..67e8026 100644 +--- a/libs/srtp/srtp.h ++++ b/libs/srtp/srtp.h +@@ -24,36 +24,36 @@ typedef struct srtp_session_t srtp_session_t; + + enum + { +- SRTP_UNENCRYPTED=0x1, // do not encrypt SRTP packets +- SRTCP_UNENCRYPTED=0x2, // do not encrypt SRTCP packets +- SRTP_UNAUTHENTICATED=0x4, // authenticate only SRTCP packets ++ SRTP_UNENCRYPTED=0x1, //< do not encrypt SRTP packets ++ SRTCP_UNENCRYPTED=0x2, //< do not encrypt SRTCP packets ++ SRTP_UNAUTHENTICATED=0x4, //< authenticate only SRTCP packets + +- SRTP_RCC_MODE1=0x10, // use Roll-over-Counter Carry mode 1 +- SRTP_RCC_MODE2=0x20, // use Roll-over-Counter Carry mode 2 +- SRTP_RCC_MODE3=0x30, // use Roll-over-Counter Carry mode 3 (insecure) ++ SRTP_RCC_MODE1=0x10, //< use Roll-over-Counter Carry mode 1 ++ SRTP_RCC_MODE2=0x20, //< use Roll-over-Counter Carry mode 2 ++ SRTP_RCC_MODE3=0x30, //< use Roll-over-Counter Carry mode 3 (insecure) + +- SRTP_FLAGS_MASK=0x38 ++ SRTP_FLAGS_MASK=0x37 //< mask for valid flags + }; + +-/* SRTP encryption algorithms (ciphers); same values as MIKEY */ ++/** SRTP encryption algorithms (ciphers); same values as MIKEY */ + enum + { +- SRTP_ENCR_NULL=0, +- SRTP_ENCR_AES_CM=1, +- SRTP_ENCR_AES_F8=2 // not implemented ++ SRTP_ENCR_NULL=0, //< no encryption ++ SRTP_ENCR_AES_CM=1, //< AES counter mode ++ SRTP_ENCR_AES_F8=2, //< AES F8 mode (not implemented) + }; + +-/* SRTP authenticaton algorithms; same values as MIKEY */ ++/** SRTP authenticaton algorithms; same values as MIKEY */ + enum + { +- SRTP_AUTH_NULL=0, +- SRTP_AUTH_HMAC_SHA1=1 ++ SRTP_AUTH_NULL=0, //< no authentication code ++ SRTP_AUTH_HMAC_SHA1=1, //< HMAC-SHA1 + }; + +-/* SRTP pseudo random function; same values as MIKEY */ ++/** SRTP pseudo random function; same values as MIKEY */ + enum + { +- SRTP_PRF_AES_CM=0 ++ SRTP_PRF_AES_CM=0, //< AES counter mode + }; + + # ifdef __cplusplus +diff --git a/libs/srtp/test-aes.c b/libs/srtp/test-aes.c +index 463f0b1..ae55f34 100644 +--- a/libs/srtp/test-aes.c ++++ b/libs/srtp/test-aes.c +@@ -143,8 +143,6 @@ static void test_keystream (void) + + static void srtp_test (void) + { +- if (init_libgcrypt ()) +- fatal ("Libgcrypt initialization error"); + test_derivation (); + test_keystream (); + } diff --git a/vlc.spec b/vlc.spec index 7a5834e..6f35c78 100644 --- a/vlc.spec +++ b/vlc.spec @@ -26,7 +26,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -38,6 +38,7 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch +Patch6: vlc-1.1-bugfix-20110920.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -251,6 +252,7 @@ JACK audio plugin for the VLC media player. %patch5 -p1 -b .opencv22 %endif sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in +%patch6 -p1 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -561,6 +563,9 @@ fi || : %changelog +* Tue Sep 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-2 +- Update to current bugfix + * Wed Jul 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-1 - Update to 1.1.11 From 6847d9a7f45c38674a16ff4009219111333a295d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 20 Sep 2011 08:53:06 +0000 Subject: [PATCH 156/671] Add patch for FFmpeg-0.8 --- 0001-port-to-FFmpeg-0.8-API.patch | 69 +++++++++++++++++++++++++++++++ vlc.spec | 3 ++ 2 files changed, 72 insertions(+) create mode 100644 0001-port-to-FFmpeg-0.8-API.patch diff --git a/0001-port-to-FFmpeg-0.8-API.patch b/0001-port-to-FFmpeg-0.8-API.patch new file mode 100644 index 0000000..1484d23 --- /dev/null +++ b/0001-port-to-FFmpeg-0.8-API.patch @@ -0,0 +1,69 @@ +From e2a0e38258a16da56a5d850e179a691839558dcd Mon Sep 17 00:00:00 2001 +From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> +Date: Sun, 4 Sep 2011 23:58:53 +0200 +Subject: [PATCH] port to FFmpeg-0.8 API + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + modules/stream_out/switcher.c | 41 ++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 40 insertions(+), 1 deletions(-) + +diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c +index ca57a28..d96f690 100644 +--- a/modules/stream_out/switcher.c ++++ b/modules/stream_out/switcher.c +@@ -358,6 +358,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + /* Set CPU capabilities */ + unsigned i_cpu = vlc_CPU(); + id->ff_enc_c->dsp_mask = 0; ++#if FF_API_MM_FLAGS + if( !(i_cpu & CPU_CAPABILITY_MMX) ) + { + id->ff_enc_c->dsp_mask |= FF_MM_MMX; +@@ -375,7 +376,25 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + id->ff_enc_c->dsp_mask |= FF_MM_SSE; + id->ff_enc_c->dsp_mask |= FF_MM_SSE2; + } +- ++#else ++ if( !(i_cpu & CPU_CAPABILITY_MMX) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX; ++ } ++ if( !(i_cpu & CPU_CAPABILITY_MMXEXT) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX2; ++ } ++ if( !(i_cpu & CPU_CAPABILITY_3DNOW) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_3DNOW; ++ } +@@ -764,6 +784,25 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) + id->ff_enc_c->dsp_mask |= FF_MM_SSE; + id->ff_enc_c->dsp_mask |= FF_MM_SSE2; + } ++#else ++ if( !(i_cpu & CPU_CAPABILITY_MMX) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX; ++ } ++ if( !(i_cpu & CPU_CAPABILITY_MMXEXT) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX2; ++ } ++ if( !(i_cpu & CPU_CAPABILITY_3DNOW) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_3DNOW; ++ } ++ if( !(i_cpu & CPU_CAPABILITY_SSE) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE; ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE2; ++ } ++#endif + + id->ff_enc_c->width = p_sys->p_pictures[p_sys->i_cmd-1].format.i_width; + id->ff_enc_c->height = p_sys->p_pictures[p_sys->i_cmd-1].format.i_height; +-- +1.7.4.4 + diff --git a/vlc.spec b/vlc.spec index 6f35c78..3fd790f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,6 +39,7 @@ Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch Patch6: vlc-1.1-bugfix-20110920.patch +Patch7: 0001-port-to-FFmpeg-0.8-API.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -253,6 +254,7 @@ JACK audio plugin for the VLC media player. %endif sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch6 -p1 +%patch7 -p1 -b .ff08 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -565,6 +567,7 @@ fi || : %changelog * Tue Sep 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-2 - Update to current bugfix +- Add patch for FFmpeg-0.8 * Wed Jul 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-1 - Update to 1.1.11 From 0e26e3f734c15cd650302208018ddd306bdd972b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 20 Sep 2011 09:16:00 +0000 Subject: [PATCH 157/671] Fix wrong patch --- 0001-port-to-FFmpeg-0.8-API.patch | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/0001-port-to-FFmpeg-0.8-API.patch b/0001-port-to-FFmpeg-0.8-API.patch index 1484d23..05dc2cc 100644 --- a/0001-port-to-FFmpeg-0.8-API.patch +++ b/0001-port-to-FFmpeg-0.8-API.patch @@ -1,22 +1,23 @@ -From e2a0e38258a16da56a5d850e179a691839558dcd Mon Sep 17 00:00:00 2001 +From 02d07530a2ef11acee153137fcccfbe124b2b9e6 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> Date: Sun, 4 Sep 2011 23:58:53 +0200 Subject: [PATCH] port to FFmpeg-0.8 API +Reworked to allow older ffmpeg version Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> --- modules/stream_out/switcher.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c -index ca57a28..d96f690 100644 +index ca57a28..0b48a71 100644 --- a/modules/stream_out/switcher.c +++ b/modules/stream_out/switcher.c @@ -358,6 +358,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) /* Set CPU capabilities */ unsigned i_cpu = vlc_CPU(); id->ff_enc_c->dsp_mask = 0; -+#if FF_API_MM_FLAGS ++#if LIBAVCODEC_VERSION_MAJOR < 53 if( !(i_cpu & CPU_CAPABILITY_MMX) ) { id->ff_enc_c->dsp_mask |= FF_MM_MMX; @@ -38,6 +39,23 @@ index ca57a28..d96f690 100644 + { + id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_3DNOW; + } ++ if( !(i_cpu & CPU_CAPABILITY_SSE) ) ++ { ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE; ++ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE2; ++ } ++#endif + id->ff_enc_c->sample_rate = p_fmt->audio.i_rate; + id->ff_enc_c->channels = p_fmt->audio.i_channels; + id->ff_enc_c->bit_rate = p_fmt->i_bitrate; +@@ -747,6 +766,7 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) + /* Set CPU capabilities */ + unsigned i_cpu = vlc_CPU(); + id->ff_enc_c->dsp_mask = 0; ++#if LIBAVCODEC_VERSION_MAJOR < 53 + if( !(i_cpu & CPU_CAPABILITY_MMX) ) + { + id->ff_enc_c->dsp_mask |= FF_MM_MMX; @@ -764,6 +784,25 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) id->ff_enc_c->dsp_mask |= FF_MM_SSE; id->ff_enc_c->dsp_mask |= FF_MM_SSE2; @@ -61,7 +79,7 @@ index ca57a28..d96f690 100644 + id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE2; + } +#endif - + id->ff_enc_c->width = p_sys->p_pictures[p_sys->i_cmd-1].format.i_width; id->ff_enc_c->height = p_sys->p_pictures[p_sys->i_cmd-1].format.i_height; -- From cdad77826aed39950e12c8fb6d557d45e15e00b5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 7 Oct 2011 08:09:24 +0000 Subject: [PATCH 158/671] UPdate to 1.1.12 --- 0001-port-to-FFmpeg-0.8-API.patch | 87 -- vlc-1.1-bugfix-20110920.patch | 1226 ----------------------------- vlc.spec | 13 +- 3 files changed, 6 insertions(+), 1320 deletions(-) delete mode 100644 0001-port-to-FFmpeg-0.8-API.patch delete mode 100644 vlc-1.1-bugfix-20110920.patch diff --git a/0001-port-to-FFmpeg-0.8-API.patch b/0001-port-to-FFmpeg-0.8-API.patch deleted file mode 100644 index 05dc2cc..0000000 --- a/0001-port-to-FFmpeg-0.8-API.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 02d07530a2ef11acee153137fcccfbe124b2b9e6 Mon Sep 17 00:00:00 2001 -From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> -Date: Sun, 4 Sep 2011 23:58:53 +0200 -Subject: [PATCH] port to FFmpeg-0.8 API - -Reworked to allow older ffmpeg version -Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> ---- - modules/stream_out/switcher.c | 41 ++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 40 insertions(+), 1 deletions(-) - -diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c -index ca57a28..0b48a71 100644 ---- a/modules/stream_out/switcher.c -+++ b/modules/stream_out/switcher.c -@@ -358,6 +358,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - /* Set CPU capabilities */ - unsigned i_cpu = vlc_CPU(); - id->ff_enc_c->dsp_mask = 0; -+#if LIBAVCODEC_VERSION_MAJOR < 53 - if( !(i_cpu & CPU_CAPABILITY_MMX) ) - { - id->ff_enc_c->dsp_mask |= FF_MM_MMX; -@@ -375,7 +376,25 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - id->ff_enc_c->dsp_mask |= FF_MM_SSE; - id->ff_enc_c->dsp_mask |= FF_MM_SSE2; - } -- -+#else -+ if( !(i_cpu & CPU_CAPABILITY_MMX) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_MMXEXT) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX2; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_3DNOW) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_3DNOW; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_SSE) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE; -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE2; -+ } -+#endif - id->ff_enc_c->sample_rate = p_fmt->audio.i_rate; - id->ff_enc_c->channels = p_fmt->audio.i_channels; - id->ff_enc_c->bit_rate = p_fmt->i_bitrate; -@@ -747,6 +766,7 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) - /* Set CPU capabilities */ - unsigned i_cpu = vlc_CPU(); - id->ff_enc_c->dsp_mask = 0; -+#if LIBAVCODEC_VERSION_MAJOR < 53 - if( !(i_cpu & CPU_CAPABILITY_MMX) ) - { - id->ff_enc_c->dsp_mask |= FF_MM_MMX; -@@ -764,6 +784,25 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) - id->ff_enc_c->dsp_mask |= FF_MM_SSE; - id->ff_enc_c->dsp_mask |= FF_MM_SSE2; - } -+#else -+ if( !(i_cpu & CPU_CAPABILITY_MMX) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_MMXEXT) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_MMX2; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_3DNOW) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_3DNOW; -+ } -+ if( !(i_cpu & CPU_CAPABILITY_SSE) ) -+ { -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE; -+ id->ff_enc_c->dsp_mask |= AV_CPU_FLAG_SSE2; -+ } -+#endif - - id->ff_enc_c->width = p_sys->p_pictures[p_sys->i_cmd-1].format.i_width; - id->ff_enc_c->height = p_sys->p_pictures[p_sys->i_cmd-1].format.i_height; --- -1.7.4.4 - diff --git a/vlc-1.1-bugfix-20110920.patch b/vlc-1.1-bugfix-20110920.patch deleted file mode 100644 index d4e7f19..0000000 --- a/vlc-1.1-bugfix-20110920.patch +++ /dev/null @@ -1,1226 +0,0 @@ -diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c -index e1cd6b1..03f882f 100755 ---- a/modules/access/rtp/rtp.c -+++ b/modules/access/rtp/rtp.c -@@ -39,6 +39,8 @@ - #include "rtp.h" - #ifdef HAVE_SRTP - # include <srtp.h> -+# include <gcrypt.h> -+# include <vlc_gcrypt.h> - #endif - - #define RTP_CACHING_TEXT N_("RTP de-jitter buffer length (msec)") -@@ -276,6 +278,7 @@ static int Open (vlc_object_t *obj) - char *key = var_CreateGetNonEmptyString (demux, "srtp-key"); - if (key) - { -+ vlc_gcrypt_init (); - p_sys->srtp = srtp_create (SRTP_ENCR_AES_CM, SRTP_AUTH_HMAC_SHA1, 10, - SRTP_PRF_AES_CM, SRTP_RCC_MODE1); - if (p_sys->srtp == NULL) -diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c -index d29aec6..d0e14db 100644 ---- a/modules/access/v4l2.c -+++ b/modules/access/v4l2.c -@@ -792,7 +792,7 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj ) - } - - if( i == ARRAY_SIZE(psz_standards_list_text) ) -- p_sys->i_selected_standard_id = i_standards_list[strtol( psz_parser, &psz_parser, 0 )]; -+ p_sys->i_selected_standard_id = strtol( psz_parser, &psz_parser, 0 ); - } - else if( !strncmp( psz_parser, "chroma=", strlen( "chroma=" ) ) ) - { -diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c -index ab45f0c..6985781 100644 ---- a/modules/audio_output/auhal.c -+++ b/modules/audio_output/auhal.c -@@ -632,7 +632,7 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - - /* Set mixable to false if we are allowed to */ - AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; -- b_writeable = AudioObjectHasProperty( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress ); -+ err = AudioObjectIsPropertySettable( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable ); - err = AudioObjectGetPropertyDataSize( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size ); - err = AudioObjectGetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size, &b_mix ); - -@@ -676,7 +676,7 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - for( int i = 0; i < i_streams && p_sys->i_stream_index < 0 ; i++ ) - { - /* Find a stream with a cac3 stream */ -- AudioStreamBasicDescription *p_format_list = NULL; -+ AudioStreamRangedDescription *p_format_list = NULL; - int i_formats = 0; - bool b_digital = false; - -@@ -688,8 +688,8 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - continue; - } - -- i_formats = i_param_size / sizeof( AudioStreamBasicDescription ); -- p_format_list = (AudioStreamBasicDescription *)malloc( i_param_size ); -+ i_formats = i_param_size / sizeof( AudioStreamRangedDescription ); -+ p_format_list = (AudioStreamRangedDescription *)malloc( i_param_size ); - if( p_format_list == NULL ) - continue; - -@@ -704,8 +704,8 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - /* Check if one of the supported formats is a digital format */ - for( int j = 0; j < i_formats; j++ ) - { -- if( p_format_list[j].mFormatID == 'IAC3' || -- p_format_list[j].mFormatID == kAudioFormat60958AC3 ) -+ if( p_format_list[j].mFormat.mFormatID == 'IAC3' || -+ p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 ) - { - b_digital = true; - break; -@@ -737,21 +737,21 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - - for( int j = 0; j < i_formats; j++ ) - { -- if( p_format_list[j].mFormatID == 'IAC3' || -- p_format_list[j].mFormatID == kAudioFormat60958AC3 ) -+ if( p_format_list[j].mFormat.mFormatID == 'IAC3' || -+ p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 ) - { -- if( p_format_list[j].mSampleRate == p_aout->output.output.i_rate ) -+ if( p_format_list[j].mFormat.mSampleRate == p_aout->output.output.i_rate ) - { - i_requested_rate_format = j; - break; - } -- else if( p_format_list[j].mSampleRate == p_sys->sfmt_revert.mSampleRate ) -+ else if( p_format_list[j].mFormat.mSampleRate == p_sys->sfmt_revert.mSampleRate ) - { - i_current_rate_format = j; - } - else - { -- if( i_backup_rate_format < 0 || p_format_list[j].mSampleRate > p_format_list[i_backup_rate_format].mSampleRate ) -+ if( i_backup_rate_format < 0 || p_format_list[j].mFormat.mSampleRate > p_format_list[i_backup_rate_format].mFormat.mSampleRate ) - i_backup_rate_format = j; - } - } -@@ -759,10 +759,10 @@ static int OpenSPDIF( aout_instance_t * p_aout ) - } - - if( i_requested_rate_format >= 0 ) /* We prefer to output at the samplerate of the original audio */ -- p_sys->stream_format = p_format_list[i_requested_rate_format]; -+ p_sys->stream_format = p_format_list[i_requested_rate_format].mFormat; - else if( i_current_rate_format >= 0 ) /* If not possible, we will try to use the current samplerate of the device */ -- p_sys->stream_format = p_format_list[i_current_rate_format]; -- else p_sys->stream_format = p_format_list[i_backup_rate_format]; /* And if we have to, any digital format will be just fine (highest rate possible) */ -+ p_sys->stream_format = p_format_list[i_current_rate_format].mFormat; -+ else p_sys->stream_format = p_format_list[i_backup_rate_format].mFormat; /* And if we have to, any digital format will be just fine (highest rate possible) */ - } - free( p_format_list ); - } -@@ -866,7 +866,7 @@ static void Close( vlc_object_t * p_this ) - Boolean b_writeable; - /* Revert mixable to true if we are allowed to */ - AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; -- b_writeable = AudioObjectHasProperty( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress ); -+ err = AudioObjectIsPropertySettable( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable ); - err = AudioObjectGetPropertyData( p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, 0, NULL, &i_param_size, &b_mix ); - - if( !err && b_writeable ) -@@ -1082,7 +1082,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_ - bool b_return = false; - - /* Retrieve all the output streams */ -- AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; -+ AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster }; - err = AudioObjectGetPropertyDataSize( i_dev_id, &streamsAddress, 0, NULL, &i_param_size ); - if( err != noErr ) - { -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 64de04d..a377f66 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -58,7 +58,9 @@ struct aout_sys_t - pa_stream *stream; /**< PulseAudio playback stream object */ - pa_context *context; /**< PulseAudio connection context */ - pa_threaded_mainloop *mainloop; /**< PulseAudio event loop */ -- //uint32_t byterate; /**< bytes per second */ -+ mtime_t pts; /**< Play time of buffer write offset */ -+ mtime_t desync; /**< Measured desynchronization */ -+ unsigned rate; /**< Current stream sample rate */ - }; - - /* Context helpers */ -@@ -93,6 +95,164 @@ static void error(aout_instance_t *aout, const char *msg, pa_context *context) - msg_Err(aout, "%s: %s", msg, pa_strerror(pa_context_errno(context))); - } - -+/* Latency management and lip synchronization */ -+static mtime_t vlc_pa_get_latency(aout_instance_t *aout, -+ pa_context *ctx, pa_stream *s) -+{ -+ pa_usec_t latency; -+ int negative; -+ -+ if (pa_stream_get_latency(s, &latency, &negative)) { -+ if (pa_context_errno (ctx) != PA_ERR_NODATA) -+ error(aout, "unknown latency", ctx); -+ return VLC_TS_INVALID; -+ } -+ return negative ? -latency : +latency; -+} -+ -+static void stream_reset_sync(pa_stream *s, aout_instance_t *aout) -+{ -+ aout_sys_t *sys = aout->output.p_sys; -+ const unsigned rate = aout->output.output.i_rate; -+ -+ sys->pts = VLC_TS_INVALID; -+ sys->desync = 0; -+ pa_operation *op = pa_stream_update_sample_rate(s, rate, NULL, NULL); -+ if (unlikely(op == NULL)) -+ return; -+ pa_operation_unref(op); -+ sys->rate = rate; -+} -+ -+/** -+ * Starts or resumes the playback stream. -+ * Tries start playing back audio samples at the most accurate time -+ * in order to minimize desync and resampling during early playback. -+ * @note PulseAudio lock required. -+ */ -+static void stream_resync(aout_instance_t *aout, pa_stream *s) -+{ -+ aout_sys_t *sys = aout->output.p_sys; -+ pa_operation *op; -+ mtime_t delta; -+ -+ assert (pa_stream_is_corked(s) > 0); -+ assert (sys->pts != VLC_TS_INVALID); -+ -+ delta = vlc_pa_get_latency(aout, sys->context, s); -+ if (unlikely(delta == VLC_TS_INVALID)) -+ delta = 0; /* screwed */ -+ -+ delta = (sys->pts - mdate()) - delta; -+ -+ /* TODO: adjust prebuf instead of padding? */ -+ if (delta > 0) { -+ size_t nb = (delta * sys->rate) / CLOCK_FREQ; -+ size_t size = aout->output.output.i_bytes_per_frame; -+ float *zeroes = calloc (nb, size); -+ -+ msg_Dbg(aout, "starting with %zu zeroes (%"PRId64" us)", nb, -+ delta); -+#if 0 /* Fault injector: add delay */ -+ pa_stream_write(s, zeroes, nb * size, NULL, 0, PA_SEEK_RELATIVE); -+ pa_stream_write(s, zeroes, nb * size, NULL, 0, PA_SEEK_RELATIVE); -+#endif -+ if (likely(zeroes != NULL)) -+ if (pa_stream_write(s, zeroes, nb * size, free, 0, -+ PA_SEEK_RELATIVE) < 0) -+ free(zeroes); -+ } else -+ msg_Warn(aout, "starting late (%"PRId64" us)", delta); -+ -+ op = pa_stream_cork(s, 0, NULL, NULL); -+ if (op != NULL) -+ pa_operation_unref(op); -+ op = pa_stream_trigger(s, NULL, NULL); -+ if (op != NULL) -+ pa_operation_unref(op); -+} -+ -+/* Values from EBU R37 */ -+#define AOUT_EARLY_TOLERANCE 40000 -+#define AOUT_LATE_TOLERANCE 60000 -+ -+static void stream_latency_cb(pa_stream *s, void *userdata) -+{ -+ aout_instance_t *aout = userdata; -+ aout_sys_t *sys = aout->output.p_sys; -+ mtime_t delta, change; -+ -+ if (pa_stream_is_corked(s)) -+ return; -+ if (sys->pts == VLC_TS_INVALID) -+ { -+ msg_Dbg(aout, "missing latency from input"); -+ return; -+ } -+ -+ /* Compute lip desynchronization */ -+ delta = vlc_pa_get_latency(aout, sys->context, s); -+ if (delta == VLC_TS_INVALID) -+ return; -+ -+ delta = (sys->pts - mdate()) - delta; -+ change = delta - sys->desync; -+ sys->desync = delta; -+ //msg_Dbg(aout, "desync: %+"PRId64" us (variation: %+"PRId64" us)", -+ // delta, change); -+ -+ const unsigned inrate = aout->output.output.i_rate; -+ unsigned outrate = sys->rate; -+ bool sync = false; -+ -+ if (delta < -AOUT_LATE_TOLERANCE) -+ msg_Warn(aout, "too late by %"PRId64" us", -delta); -+ else if (delta > +AOUT_EARLY_TOLERANCE) -+ msg_Warn(aout, "too early by %"PRId64" us", delta); -+ else if (outrate == inrate) -+ return; /* In sync, do not add unnecessary disturbance! */ -+ else -+ sync = true; -+ -+ /* Compute playback sample rate */ -+ /* This is empirical (especially the shift values). -+ * Feel free to define something smarter. */ -+ int adj = sync ? (outrate - inrate) -+ : outrate * ((delta >> 4) + change) / (CLOCK_FREQ << 2); -+ /* This avoids too quick rate variation. It sounds really bad and -+ * causes unstability (e.g. oscillation around the correct rate). */ -+ int limit = inrate >> 10; -+ /* However, to improve stability and try to converge, closing to the -+ * nominal rate is favored over drifting from it. */ -+ if ((adj > 0) == (sys->rate > inrate)) -+ limit *= 2; -+ if (adj > +limit) -+ adj = +limit; -+ if (adj < -limit) -+ adj = -limit; -+ outrate -= adj; -+ -+ /* This keeps the effective rate within specified range -+ * (+/-AOUT_MAX_RESAMPLING% - see <vlc_aout.h>) of the nominal rate. */ -+ limit = inrate * AOUT_MAX_RESAMPLING / 100; -+ if (outrate > inrate + limit) -+ outrate = inrate + limit; -+ if (outrate < inrate - limit) -+ outrate = inrate - limit; -+ -+ /* Apply adjusted sample rate */ -+ if (outrate == sys->rate) -+ return; -+ pa_operation *op = pa_stream_update_sample_rate(s, outrate, NULL, NULL); -+ if (unlikely(op == NULL)) { -+ error(aout, "cannot change sample rate", sys->context); -+ return; -+ } -+ pa_operation_unref(op); -+ msg_Dbg(aout, "changed sample rate to %u Hz",outrate); -+ sys->rate = outrate; -+} -+ - /* Stream helpers */ - static void stream_state_cb(pa_stream *s, void *userdata) - { -@@ -106,6 +266,7 @@ static void stream_state_cb(pa_stream *s, void *userdata) - default: - break; - } -+ (void) userdata; - } - - static void stream_moved_cb(pa_stream *s, void *userdata) -@@ -138,15 +299,19 @@ static void stream_suspended_cb(pa_stream *s, void *userdata) - aout_instance_t *aout = userdata; - - msg_Dbg(aout, "suspended"); -- (void) s; -+ stream_reset_sync(s, aout); - } - - static void stream_underflow_cb(pa_stream *s, void *userdata) - { - aout_instance_t *aout = userdata; -+ pa_operation *op; - -- msg_Dbg(aout, "underflow"); -- (void) s; -+ msg_Warn(aout, "underflow"); -+ op = pa_stream_cork(s, 1, NULL, NULL); -+ if (op != NULL) -+ pa_operation_unref(op); -+ stream_reset_sync(s, aout); - } - - static int stream_wait(pa_threaded_mainloop *mainloop, pa_stream *stream) -@@ -193,6 +358,17 @@ static void Play(aout_instance_t *aout) - aout_sys_t *sys = aout->output.p_sys; - pa_stream *s = sys->stream; - -+ /* This function is called exactly once per block in the output FIFO. */ -+ block_t *block = aout_FifoPop(aout, &aout->output.fifo); -+ assert (block != NULL); -+ -+ const void *ptr = data_convert(&block); -+ if (unlikely(ptr == NULL)) -+ return; -+ -+ size_t len = block->i_buffer; -+ mtime_t pts = block->i_pts + block->i_length; -+ - /* Note: The core already holds the output FIFO lock at this point. - * Therefore we must not under any circumstances (try to) acquire the - * output FIFO lock while the PulseAudio threaded main loop lock is held -@@ -200,71 +376,26 @@ static void Play(aout_instance_t *aout) - * will take place, and sooner or later a deadlock. */ - pa_threaded_mainloop_lock(sys->mainloop); - -- if (pa_stream_is_corked(sys->stream) > 0) { -- pa_operation *op = pa_stream_cork(s, 0, NULL, NULL); -- if (op != NULL) -- pa_operation_unref(op); -- msg_Dbg(aout, "uncorking"); -- } -- --#if 0 -- /* This function should be called by the LibVLC core a header of time, -- * but not more than AOUT_MAX_PREPARE. The PulseAudio latency should be -- * shorter than that (though it might not be the case with some evil piece -- * of audio output hardware). So we may need to trigger playback early, -- * (that is to say, short cut the PulseAudio prebuffering). Otherwise, -- * audio and video may be out of synchronization. */ -- pa_usec_t latency; -- int negative; -- if (pa_stream_get_latency(s, &latency, &negative) < 0) { -- /* Especially at start of stream, latency may not be known (yet). */ -- if (pa_context_errno(sys->context) != PA_ERR_NODATA) -- error(aout, "cannot determine latency", sys->context); -- } else { -- mtime_t gap = aout_FifoFirstDate(aout, &aout->output.fifo) - mdate() -- - latency; -+ sys->pts = pts; -+ if (pa_stream_is_corked(s) > 0) -+ stream_resync(aout, s); - -- if (gap > AOUT_PTS_TOLERANCE) -- msg_Dbg(aout, "buffer too early (%"PRId64" us)", gap); -- else if (gap < -AOUT_PTS_TOLERANCE) -- msg_Err(aout, "buffer too late (%"PRId64" us)", -gap); -- } --#endif - #if 0 /* Fault injector to test underrun recovery */ -- static unsigned u = 0; -- if ((++u % 500) == 0) { -+ static volatile unsigned u = 0; -+ if ((++u % 1000) == 0) { - msg_Err(aout, "fault injection"); -- msleep(CLOCK_FREQ*2); -+ pa_operation_unref(pa_stream_flush(s, NULL, NULL)); - } - #endif - -- /* This function is called exactly once per block in the output FIFO, so -- * this for-loop is not necessary. -- * If this function is changed to not always dequeue blocks, be sure to -- * limit the queue size to a reasonable limit to avoid huge leaks. */ -- for (;;) { -- block_t *block = aout_FifoPop(aout, &aout->output.fifo); -- if (block == NULL) -- break; -- -- const void *ptr = data_convert(&block); -- if (unlikely(ptr == NULL)) -- break; -- -- size_t len = block->i_buffer; -- //mtime_t pts = block->i_pts, duration = block->i_length; -- -- if (pa_stream_write(s, ptr, len, data_free, 0, PA_SEEK_RELATIVE) < 0) -- { -- error(aout, "cannot write", sys->context); -- block_Release(block); -- } -+ if (pa_stream_write(s, ptr, len, data_free, 0, PA_SEEK_RELATIVE) < 0) { -+ error(aout, "cannot write", sys->context); -+ block_Release(block); - } - - pa_threaded_mainloop_unlock(sys->mainloop); - } - -- - /***************************************************************************** - * Open: open the audio device - *****************************************************************************/ -@@ -377,21 +508,27 @@ static int Open(vlc_object_t *obj) - msg_Err(aout, "unsupported channel map"); - return VLC_EGENERIC; - } else { -- const char *name = pa_channel_map_to_pretty_name(&map); -+ const char *name = pa_channel_map_to_name(&map); - msg_Dbg(aout, "using %s channel map", (name != NULL) ? name : "?"); - } - -- const pa_stream_flags_t flags = PA_STREAM_INTERPOLATE_TIMING -+ /* Stream parameters */ -+ const pa_stream_flags_t flags = PA_STREAM_START_CORKED -+ //| PA_STREAM_INTERPOLATE_TIMING - | PA_STREAM_AUTO_TIMING_UPDATE -- | PA_STREAM_ADJUST_LATENCY -- | PA_STREAM_START_CORKED; -+ | PA_STREAM_VARIABLE_RATE; - - const uint32_t byterate = pa_bytes_per_second(&ss); - struct pa_buffer_attr attr; -- /* no point in larger buffers on PA side than VLC */ - attr.maxlength = -1; -- attr.tlength = byterate * AOUT_MAX_ADVANCE_TIME / CLOCK_FREQ; -- attr.prebuf = byterate * AOUT_MAX_PREPARE_TIME / CLOCK_FREQ; -+ /* PulseAudio assumes that tlength bytes are available in the buffer. Thus -+ * we need to be conservative and set the minimum value that the VLC -+ * audio decoder thread warrants. Otherwise, PulseAudio buffers will -+ * underrun on hardware with large buffers. VLC keeps at least -+ * AOUT_MIN_PREPARE and at most AOUT_MAX_PREPARE worth of audio buffers. -+ * TODO? tlength could be adaptively increased to reduce wakeups. */ -+ attr.tlength = byterate * AOUT_MIN_PREPARE_TIME / CLOCK_FREQ; -+ attr.prebuf = 0; /* trigger manually */ - attr.minreq = -1; - attr.fragsize = 0; /* not used for output */ - -@@ -427,6 +564,9 @@ static int Open(vlc_object_t *obj) - if (unlikely(ctx == NULL)) - goto fail; - sys->context = ctx; -+ sys->pts = VLC_TS_INVALID; -+ sys->desync = 0; -+ sys->rate = ss.rate; - - pa_context_set_state_callback(ctx, context_state_cb, mainloop); - if (pa_context_connect(ctx, NULL, 0, NULL) < 0 -@@ -443,6 +583,7 @@ static int Open(vlc_object_t *obj) - } - sys->stream = s; - pa_stream_set_state_callback(s, stream_state_cb, mainloop); -+ pa_stream_set_latency_update_callback(s, stream_latency_cb, aout); - pa_stream_set_moved_callback(s, stream_moved_cb, aout); - pa_stream_set_overflow_callback(s, stream_overflow_cb, aout); - pa_stream_set_started_callback(s, stream_started_cb, aout); -@@ -487,19 +628,24 @@ static void Close (vlc_object_t *obj) - - pa_threaded_mainloop_lock(mainloop); - if (s != NULL) { -- pa_operation *op; -- -- op = pa_stream_flush(s, NULL, NULL); -- if (op != NULL) -- pa_operation_unref(op); -- op = pa_stream_drain(s, NULL, NULL); -- if (op != NULL) -- pa_operation_unref(op); - pa_stream_disconnect(s); -+ -+ /* Clear all callbacks */ -+ pa_stream_set_state_callback(s, NULL, NULL); -+ pa_stream_set_latency_update_callback(s, NULL, aout); -+ pa_stream_set_moved_callback(s, NULL, aout); -+ pa_stream_set_overflow_callback(s, NULL, aout); -+ pa_stream_set_started_callback(s, NULL, aout); -+ pa_stream_set_suspended_callback(s, NULL, aout); -+ pa_stream_set_underflow_callback(s, NULL, aout); -+ - pa_stream_unref(s); - } -- if (ctx != NULL) -+ if (ctx != NULL) { -+ pa_context_disconnect(ctx); -+ pa_context_set_state_callback (ctx, NULL, NULL); - pa_context_unref(ctx); -+ } - pa_threaded_mainloop_unlock(mainloop); - pa_threaded_mainloop_free(mainloop); - free(sys); -diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c -index 8ef775f..d8a0cd5 100644 ---- a/modules/codec/vorbis.c -+++ b/modules/codec/vorbis.c -@@ -570,6 +570,10 @@ static void ParseVorbisComments( decoder_t *p_dec ) - *psz_value = '\0'; - psz_value++; - -+ /* Don't add empty values */ -+ if( *psz_value == '\0' ) -+ break; -+ - if( !p_dec->p_description ) - p_dec->p_description = vlc_meta_New(); - if( p_dec->p_description ) -diff --git a/modules/control/signals.c b/modules/control/signals.c -index a1e4215..b183718 100644 ---- a/modules/control/signals.c -+++ b/modules/control/signals.c -@@ -130,16 +130,16 @@ static void *SigThread (void *data) - sigaction (signum, NULL, &act); - if ((act.sa_flags & SA_SIGINFO) || (act.sa_handler != SIG_DFL)) - { -- msg_Err (obj, "signal %d overridden (%p)", signum, -- act.sa_handler); -+ msg_Warn (obj, "signal %d overridden (%p)", signum, -+ act.sa_handler); - #ifdef __GLIBC__ - Dl_info info; - - if (dladdr (act.sa_handler, &info)) -- msg_Err (obj, " %s(%s)[%p]", -- info.dli_fname ? info.dli_fname : "?", -- info.dli_sname ? info.dli_sname : "?", -- info.dli_saddr); -+ msg_Warn (obj, " %s(%s)[%p]", -+ info.dli_fname ? info.dli_fname : "?", -+ info.dli_sname ? info.dli_sname : "?", -+ info.dli_saddr); - #endif - if (!(act.sa_flags & SA_SIGINFO) && (act.sa_handler != SIG_IGN)) - act.sa_handler (signum); -diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c -index ebb8f56..20ae0e7 100644 ---- a/modules/demux/avi/avi.c -+++ b/modules/demux/avi/avi.c -@@ -1280,15 +1280,16 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent ) - { - - demux_sys_t *p_sys = p_demux->p_sys; -- unsigned int i_stream; - msg_Dbg( p_demux, "seek requested: %"PRId64" seconds %d%%", - i_date / 1000000, i_percent ); - - if( p_sys->b_seekable ) - { -+ unsigned i_stream; -+ - if( !p_sys->i_length ) - { -- avi_track_t *p_stream; -+ avi_track_t *p_stream = NULL; - int64_t i_pos; - - /* use i_percent to create a true i_date */ -@@ -1304,17 +1305,19 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent ) - /* try to find chunk that is at i_percent or the file */ - i_pos = __MAX( i_percent * stream_Size( p_demux->s ) / 100, - p_sys->i_movi_begin ); -- /* search first selected stream (and prefer non eof ones) */ -- for( i_stream = 0, p_stream = NULL; -- i_stream < p_sys->i_track; i_stream++ ) -+ /* search first selected stream (and prefer non-EOF ones) */ -+ for( unsigned i = 0; i < p_sys->i_track; i++ ) - { -- if( !p_stream || p_stream->b_eof ) -- p_stream = p_sys->track[i_stream]; -+ avi_track_t *p_track = p_sys->track[i]; -+ if( !p_track->b_activated ) -+ continue; - -- if( p_stream->b_activated && !p_stream->b_eof ) -+ p_stream = p_track; -+ i_stream = i; -+ if( !p_track->b_eof ) - break; - } -- if( !p_stream || !p_stream->b_activated ) -+ if( p_stream == NULL ) - { - msg_Warn( p_demux, "cannot find any selected stream" ); - return VLC_EGENERIC; -diff --git a/modules/gui/macosx/about.m b/modules/gui/macosx/about.m -index e0ebf78..551d19b 100644 ---- a/modules/gui/macosx/about.m -+++ b/modules/gui/macosx/about.m -@@ -100,8 +100,7 @@ static VLAboutBox *_o_sharedInstance = nil; - #else - compiler = [NSString stringWithFormat:@"gcc %s", __VERSION__]; - #endif -- [o_revision_field setStringValue: -- [NSString stringWithFormat: _NS("Compiled by %s with %@"), VLC_CompileBy(), compiler]]; -+ [o_revision_field setStringValue: [NSString stringWithFormat: _NS("Compiled by %@ with %@"), [NSString stringWithUTF8String:VLC_CompileBy()], compiler]]; - - /* Setup the nameversion field */ - [o_name_version_field setStringValue: [NSString stringWithFormat:@"Version %s (%s)", VLC_Version(), PLATFORM]]; -diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h -index 7e14eea..e7e0511 100644 ---- a/modules/gui/macosx/intf.h -+++ b/modules/gui/macosx/intf.h -@@ -104,7 +104,7 @@ struct intf_sys_t - id o_bookmarks; /* VLCBookmarks */ - id o_embedded_list; /* VLCEmbeddedList*/ - id o_coredialogs; /* VLCCoreDialogProvider */ -- VLCInformation * o_info; /* VLCInformation */ -+ id o_info; /* VLCInfo */ - id o_eyetv; /* VLCEyeTVController */ - BOOL nib_main_loaded; /* main nibfile */ - BOOL nib_open_loaded; /* open nibfile */ -diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m -index 535e9b9..bdcfdcb 100644 ---- a/modules/gui/macosx/intf.m -+++ b/modules/gui/macosx/intf.m -@@ -2589,9 +2589,8 @@ end: - - o_attr = [NSDictionary dictionaryWithObject: pp_color[i_type] - forKey: NSForegroundColorAttributeName]; -- o_msg = [[[o_notification userInfo] objectForKey: @"Message"] stringByAppendingString: @"\n"]; -- o_msg_color = [[NSAttributedString alloc] -- initWithString: o_msg attributes: o_attr]; -+ o_msg = [NSString stringWithFormat:@"%@\n", [[o_notification userInfo] objectForKey: @"Message"]]; -+ o_msg_color = [[NSAttributedString alloc] initWithString: o_msg attributes: o_attr]; - [o_msg_arr addObject: [o_msg_color autorelease]]; - - b_msg_arr_changed = YES; -diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp -index 6bc2926..6a0567a 100644 ---- a/modules/meta_engine/taglib.cpp -+++ b/modules/meta_engine/taglib.cpp -@@ -74,6 +74,8 @@ - # define TAGLIB_HAVE_AIFF_WAV_H - # include <aifffile.h> - # include <wavfile.h> -+#else -+# include <id3v2tag.h> - #endif - - #if TAGLIB_VERSION >= VERSION_INT(1,6,1) && defined(TAGLIB_WITH_MP4) -diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c -index 9b18f1d..95780ce 100644 ---- a/modules/misc/audioscrobbler.c -+++ b/modules/misc/audioscrobbler.c -@@ -122,7 +122,7 @@ static int PlayingChange ( vlc_object_t *, const char *, vlc_value_t, - - static void AddToQueue ( intf_thread_t * ); - static int Handshake ( intf_thread_t * ); --static int ReadMetaData ( intf_thread_t * ); -+static void ReadMetaData ( intf_thread_t * ); - static void DeleteSong ( audioscrobbler_song_t* ); - static int ParseURL ( char *, char **, char **, int * ); - static void HandleInterval ( mtime_t *, unsigned int * ); -@@ -927,7 +927,7 @@ static void DeleteSong( audioscrobbler_song_t* p_song ) - /***************************************************************************** - * ReadMetaData : Read meta data when parsed by vlc - *****************************************************************************/ --static int ReadMetaData( intf_thread_t *p_this ) -+static void ReadMetaData( intf_thread_t *p_this ) - { - input_thread_t *p_input; - input_item_t *p_item; -@@ -936,81 +936,65 @@ static int ReadMetaData( intf_thread_t *p_this ) - - p_input = playlist_CurrentInput( pl_Get( p_this ) ); - if( !p_input ) -- return( VLC_SUCCESS ); -+ return; - - p_item = input_GetItem( p_input ); - if( !p_item ) -- return VLC_SUCCESS; -- -- char *psz_meta; --#define ALLOC_ITEM_META( a, b ) \ -- psz_meta = input_item_Get##b( p_item ); \ -- if( psz_meta && *psz_meta ) \ -- { \ -- a = encode_URI_component( psz_meta ); \ -- if( !a ) \ -- { \ -- vlc_mutex_unlock( &p_sys->lock ); \ -- vlc_object_release( p_input ); \ -- free( psz_meta ); \ -- return VLC_ENOMEM; \ -- } \ -+ { -+ vlc_object_release( p_input ); -+ return; - } - -+#define ALLOC_ITEM_META( a, b ) do { \ -+ char *psz_meta = input_item_Get##b( p_item ); \ -+ if( psz_meta && *psz_meta ) \ -+ a = encode_URI_component( psz_meta ); \ -+ free( psz_meta ); \ -+ } while(0) -+ - vlc_mutex_lock( &p_sys->lock ); - - p_sys->b_meta_read = true; - -- ALLOC_ITEM_META( p_sys->p_current_song.psz_a, Artist ) -- else -+ ALLOC_ITEM_META( p_sys->p_current_song.psz_a, Artist ); -+ if( !p_sys->p_current_song.psz_a ) - { -- vlc_mutex_unlock( &p_sys->lock ); - msg_Dbg( p_this, "No artist.." ); -- vlc_object_release( p_input ); -- free( psz_meta ); -- return VLC_EGENERIC; -+ DeleteSong( &p_sys->p_current_song ); -+ goto end; - } -- free( psz_meta ); - -- ALLOC_ITEM_META( p_sys->p_current_song.psz_t, Title ) -- else -+ ALLOC_ITEM_META( p_sys->p_current_song.psz_t, Title ); -+ if( !p_sys->p_current_song.psz_t ) - { -- vlc_mutex_unlock( &p_sys->lock ); - msg_Dbg( p_this, "No track name.." ); -- vlc_object_release( p_input ); -- free( p_sys->p_current_song.psz_a ); -- free( psz_meta ); -- return VLC_EGENERIC; -+ DeleteSong( &p_sys->p_current_song ); -+ goto end; - } -- free( psz_meta ); - - /* Now we have read the mandatory meta data, so we can submit that info */ - p_sys->b_submit = true; - -- ALLOC_ITEM_META( p_sys->p_current_song.psz_b, Album ) -- else -+ ALLOC_ITEM_META( p_sys->p_current_song.psz_b, Album ); -+ if( !p_sys->p_current_song.psz_b ) - p_sys->p_current_song.psz_b = calloc( 1, 1 ); -- free( psz_meta ); - -- ALLOC_ITEM_META( p_sys->p_current_song.psz_m, TrackID ) -- else -+ ALLOC_ITEM_META( p_sys->p_current_song.psz_m, TrackID ); -+ if( !p_sys->p_current_song.psz_m ) - p_sys->p_current_song.psz_m = calloc( 1, 1 ); -- free( psz_meta ); - - p_sys->p_current_song.i_l = input_item_GetDuration( p_item ) / 1000000; - -- ALLOC_ITEM_META( p_sys->p_current_song.psz_n, TrackNum ) -- else -+ ALLOC_ITEM_META( p_sys->p_current_song.psz_n, TrackNum ); -+ if( !p_sys->p_current_song.psz_n ) - p_sys->p_current_song.psz_n = calloc( 1, 1 ); -- free( psz_meta ); - #undef ALLOC_ITEM_META - - msg_Dbg( p_this, "Meta data registered" ); - -+end: - vlc_mutex_unlock( &p_sys->lock ); - vlc_object_release( p_input ); -- return VLC_SUCCESS; -- - } - - static void HandleInterval( mtime_t *next, unsigned int *i_interval ) -diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c -index 71876b5..328e019 100644 ---- a/modules/misc/gnutls.c -+++ b/modules/misc/gnutls.c -@@ -130,7 +130,7 @@ static int gnutls_Init (vlc_object_t *p_this) - goto error; - } - -- const char *psz_version = gnutls_check_version ("1.3.3"); -+ const char *psz_version = gnutls_check_version ("1.7.4"); - if (psz_version == NULL) - { - msg_Err (p_this, "unsupported GnuTLS version"); -@@ -356,8 +356,8 @@ gnutls_HandshakeAndValidate( tls_session_t *session ) - goto error; - } - -- assert( p_sys->psz_hostname != NULL ); -- if ( !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) ) -+ if( p_sys->psz_hostname != NULL -+ && !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) ) - { - msg_Err( session, "Certificate does not match \"%s\"", - p_sys->psz_hostname ); -@@ -731,7 +731,7 @@ static int OpenClient (vlc_object_t *obj) - - char *servername = var_GetNonEmptyString (p_session, "tls-server-name"); - if (servername == NULL ) -- msg_Err (p_session, "server name missing for TLS session"); -+ abort (); - else - gnutls_server_name_set (p_sys->session.session, GNUTLS_NAME_DNS, - servername, strlen (servername)); -@@ -1046,7 +1046,7 @@ gnutls_ServerAddCRL( tls_server_t *p_server, const char *psz_crl_path ) - (p_server->p_sys))->x509_cred, - psz_local_path, - GNUTLS_X509_FMT_PEM ); -- LocaleFree( psz_crl_path ); -+ LocaleFree( psz_local_path ); - if( val < 0 ) - { - msg_Err( p_server, "cannot add CRL (%s): %s", psz_crl_path, -diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c -index e6a247a..954a3c1 100644 ---- a/modules/stream_out/rtp.c -+++ b/modules/stream_out/rtp.c -@@ -42,6 +42,8 @@ - #include <vlc_rand.h> - #ifdef HAVE_SRTP - # include <srtp.h> -+# include <gcrypt.h> -+# include <vlc_gcrypt.h> - #endif - - #include "rtp.h" -@@ -1006,6 +1008,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - char *key = var_CreateGetNonEmptyString (p_stream, SOUT_CFG_PREFIX"key"); - if (key) - { -+ vlc_gcrypt_init (); - id->srtp = srtp_create (SRTP_ENCR_AES_CM, SRTP_AUTH_HMAC_SHA1, 10, - SRTP_PRF_AES_CM, SRTP_RCC_MODE1); - if (id->srtp == NULL) -diff --git a/modules/stream_out/smem.c b/modules/stream_out/smem.c -index 784c31b..59f27cf 100644 ---- a/modules/stream_out/smem.c -+++ b/modules/stream_out/smem.c -@@ -369,6 +369,13 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id, - int i_samples = 0; - - i_size = p_buffer->i_buffer; -+ if (id->format->audio.i_channels <= 0) -+ { -+ msg_Warn( p_stream, "No buffer given!" ); -+ block_ChainRelease( p_buffer ); -+ return VLC_EGENERIC; -+ } -+ - i_samples = i_size / ( ( id->format->audio.i_bitspersample / 8 ) * id->format->audio.i_channels ); - /* Calling the prerender callback to get user buffer */ - p_sys->pf_audio_prerender_callback( id->p_data, &p_pcm_buffer, i_size ); -diff --git a/modules/video_filter/Modules.am b/modules/video_filter/Modules.am -index c07f263..afa6330 100644 ---- a/modules/video_filter/Modules.am -+++ b/modules/video_filter/Modules.am -@@ -1,4 +1,5 @@ - SUBDIRS = dynamicoverlay -+ - SOURCES_mosaic = mosaic.c mosaic.h - SOURCES_transform = transform.c - SOURCES_invert = invert.c -@@ -17,7 +18,13 @@ SOURCES_marq = marq.c - SOURCES_rss = rss.c - SOURCES_motiondetect = motiondetect.c - SOURCES_rv32 = rv32.c --SOURCES_osdmenu = osdmenu.c -+ -+libosdmenu_plugin_la_SOURCES = osdmenu.c -+libosdmenu_plugin_la_CFLAGS = $(AM_CFLAGS) -DPKGDATADIR=\"$(vlcdatadir)\" -+libosdmenu_plugin_la_LIBADD = $(AM_LIBADD) -+libosdmenu_plugin_la_DEPENDENCIES = -+EXTRA_LTLIBRARIES += libosdmenu_plugin.la -+ - SOURCES_remoteosd = remoteosd.c remoteosd_rfbproto.h - SOURCES_magnify = magnify.c - SOURCES_wave = wave.c -diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c -index 377f740..87416bf 100644 ---- a/modules/video_filter/osdmenu.c -+++ b/modules/video_filter/osdmenu.c -@@ -105,7 +105,7 @@ static int MouseEvent( vlc_object_t *, char const *, - #if defined( WIN32 ) || defined( UNDER_CE ) - #define OSD_DEFAULT_CFG "osdmenu/default.cfg" - #else --#define OSD_DEFAULT_CFG "share/osdmenu/default.cfg" -+#define OSD_DEFAULT_CFG PKGDATADIR"/osdmenu/default.cfg" - #endif - - #define OSD_UPDATE_MIN 0 -diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c -index d2d5e26..3a40829 100644 ---- a/modules/video_output/msw/events.c -+++ b/modules/video_output/msw/events.c -@@ -122,6 +122,8 @@ struct event_thread_t - video_format_t source; - vout_display_place_t place; - -+ HICON vlc_icon; -+ - bool has_moved; - }; - -@@ -498,7 +500,6 @@ static int DirectXCreateWindow( event_thread_t *p_event ) - HMENU hMenu; - RECT rect_window; - WNDCLASS wc; /* window class components */ -- HICON vlc_icon; - char vlc_path[MAX_PATH+1]; - int i_style, i_stylex; - -@@ -537,11 +538,11 @@ static int DirectXCreateWindow( event_thread_t *p_event ) - #endif - - /* Get the Icon from the main app */ -- vlc_icon = NULL; -+ p_event->vlc_icon = NULL; - #ifndef UNDER_CE - if( GetModuleFileName( NULL, vlc_path, MAX_PATH ) ) - { -- vlc_icon = ExtractIcon( hInstance, vlc_path, 0 ); -+ p_event->vlc_icon = ExtractIcon( hInstance, vlc_path, 0 ); - } - #endif - -@@ -551,7 +552,7 @@ static int DirectXCreateWindow( event_thread_t *p_event ) - wc.cbClsExtra = 0; /* no extra class data */ - wc.cbWndExtra = 0; /* no extra window data */ - wc.hInstance = hInstance; /* instance */ -- wc.hIcon = vlc_icon; /* load the vlc big icon */ -+ wc.hIcon = p_event->vlc_icon; /* load the vlc big icon */ - wc.hCursor = p_event->is_cursor_hidden ? p_event->cursor_empty : - p_event->cursor_arrow; - wc.hbrBackground = GetStockObject(BLACK_BRUSH); /* background color */ -@@ -561,8 +562,8 @@ static int DirectXCreateWindow( event_thread_t *p_event ) - /* Register the window class */ - if( !RegisterClass(&wc) ) - { -- if( vlc_icon ) -- DestroyIcon( vlc_icon ); -+ if( p_event->vlc_icon ) -+ DestroyIcon( p_event->vlc_icon ); - - msg_Err( vd, "DirectXCreateWindow RegisterClass FAILED (err=%lu)", GetLastError() ); - return VLC_EGENERIC; -@@ -607,6 +608,12 @@ static int DirectXCreateWindow( event_thread_t *p_event ) - { - i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD; - i_stylex = 0; -+ -+ /* allow user to regain control over input events if requested */ -+ bool b_mouse_support = var_InheritBool( vd, "mouse-events" ); -+ bool b_key_support = var_InheritBool( vd, "keyboard-events" ); -+ if( !b_mouse_support && !b_key_support ) -+ i_style |= WS_DISABLED; - } - - p_event->i_window_style = i_style; -@@ -711,6 +718,9 @@ static void DirectXCloseWindow( event_thread_t *p_event ) - vout_display_DeleteWindow( vd, p_event->parent_window ); - p_event->hwnd = NULL; - -+ if( p_event->vlc_icon ) -+ DestroyIcon( p_event->vlc_icon ); -+ - HINSTANCE hInstance = GetModuleHandle(NULL); - UnregisterClass( p_event->class_video, hInstance ); - UnregisterClass( p_event->class_main, hInstance ); -diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c -index 356f3c5..d899a17 100644 ---- a/modules/video_output/xcb/xvideo.c -+++ b/modules/video_output/xcb/xvideo.c -@@ -297,10 +297,11 @@ FindFormat (vout_display_t *vd, - static int Open (vlc_object_t *obj) - { - vout_display_t *vd = (vout_display_t *)obj; -- vout_display_sys_t *p_sys = malloc (sizeof (*p_sys)); -+ vout_display_sys_t *p_sys; - - if (!var_CreateGetBool (obj, "overlay")) - return VLC_EGENERIC; -+ p_sys = malloc (sizeof (*p_sys)); - if (p_sys == NULL) - return VLC_ENOMEM; - -diff --git a/src/control/audio.c b/src/control/audio.c -index edde5b7..90333a8 100644 ---- a/src/control/audio.c -+++ b/src/control/audio.c -@@ -266,9 +266,9 @@ void libvlc_audio_output_device_set( libvlc_media_player_t *mp, - return; - if( asprintf( &psz_config_name, "%s-audio-device", psz_audio_output ) == -1 ) - return; -- if( !var_Type( mp, psz_audio_output ) ) -+ if( !var_Type( mp, psz_config_name ) ) - /* Don't recreate the same variable over and over and over... */ -- var_Create( mp, psz_audio_output, VLC_VAR_STRING ); -+ var_Create( mp, psz_config_name, VLC_VAR_STRING ); - var_SetString( mp, psz_config_name, psz_device_id ); - free( psz_config_name ); - } -diff --git a/src/input/demux.c b/src/input/demux.c -index 981799f..ab01a13 100644 ---- a/src/input/demux.c -+++ b/src/input/demux.c -@@ -162,8 +162,9 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input, - /* ID3/APE tags will mess-up demuxer probing so we skip it here. - * ID3/APE parsers will called later on in the demuxer to access the - * skipped info. */ -- if( !SkipID3Tag( p_demux ) ) -- SkipAPETag( p_demux ); -+ while (SkipID3Tag( p_demux )) -+ ; -+ SkipAPETag( p_demux ); - - p_demux->p_module = - module_need( p_demux, "demux", psz_module, -diff --git a/libs/srtp/Makefile.am b/libs/srtp/Makefile.am -index 8b7522b..b90bed1 100644 ---- a/libs/srtp/Makefile.am -+++ b/libs/srtp/Makefile.am -@@ -32,11 +32,6 @@ srtp_LDADD = libvlc_srtp.la - test_recv_LDADD = libvlc_srtp.la - test_aes_LDADD = @GCRYPT_LIBS@ - --if !HAVE_WIN32 --libvlc_srtp_la_LIBADD += -lpthread --test_aes_LDADD += -lpthread --endif -- - lcov-run: - rm -Rf *.gcda lcov - $(MAKE) $(AM_MAKEFLAGS) check -diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c -index f2f2c95..766834c 100644 ---- a/libs/srtp/srtp.c -+++ b/libs/srtp/srtp.c -@@ -43,8 +43,6 @@ - # include <winsock2.h> - #else - # include <netinet/in.h> --# include <pthread.h> --GCRY_THREAD_OPTION_PTHREAD_IMPL; - #endif - - #define debug( ... ) (void)0 -@@ -86,41 +84,6 @@ static inline unsigned rcc_mode (const srtp_session_t *s) - return (s->flags >> 4) & 3; - } - --static bool libgcrypt_usable = false; -- --static void initonce_libgcrypt (void) --{ --#ifndef WIN32 -- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); --#endif -- -- if ((gcry_check_version ("1.1.94") == NULL) -- || gcry_control (GCRYCTL_DISABLE_SECMEM, 0) -- || gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0)) -- return; -- -- libgcrypt_usable = true; --} -- --static int init_libgcrypt (void) --{ -- int retval; --#ifndef WIN32 -- static pthread_once_t once = PTHREAD_ONCE_INIT; -- -- pthread_once (&once, initonce_libgcrypt); --#else --# warning FIXME: This is not thread-safe. -- if (!libgcrypt_usable) -- initonce_libgcrypt (); --#endif -- -- retval = libgcrypt_usable ? 0 : -1; -- -- return retval; -- --} -- - - static void proto_destroy (srtp_proto_t *p) - { -@@ -170,7 +133,7 @@ static int proto_create (srtp_proto_t *p, int gcipher, int gmd) - srtp_session_t * - srtp_create (int encr, int auth, unsigned tag_len, int prf, unsigned flags) - { -- if ((flags & ~SRTP_FLAGS_MASK) || init_libgcrypt ()) -+ if ((flags & ~SRTP_FLAGS_MASK)) - return NULL; - - int cipher, md; -@@ -833,7 +796,7 @@ srtcp_send (srtp_session_t *s, uint8_t *buf, size_t *lenp, size_t bufsize) - - len += 4; /* Digests SRTCP index too */ - -- const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len); -+ const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len); - memcpy (buf + len, tag, s->tag_len); - *lenp = len + s->tag_len; - return 0; -@@ -861,7 +824,7 @@ srtcp_recv (srtp_session_t *s, uint8_t *buf, size_t *lenp) - return EINVAL; - len -= s->tag_len; - -- const uint8_t *tag = rtcp_digest (s->rtp.mac, buf, len); -+ const uint8_t *tag = rtcp_digest (s->rtcp.mac, buf, len); - if (memcmp (buf + len, tag, s->tag_len)) - return EACCES; - -diff --git a/libs/srtp/srtp.h b/libs/srtp/srtp.h -index b58b9d6..67e8026 100644 ---- a/libs/srtp/srtp.h -+++ b/libs/srtp/srtp.h -@@ -24,36 +24,36 @@ typedef struct srtp_session_t srtp_session_t; - - enum - { -- SRTP_UNENCRYPTED=0x1, // do not encrypt SRTP packets -- SRTCP_UNENCRYPTED=0x2, // do not encrypt SRTCP packets -- SRTP_UNAUTHENTICATED=0x4, // authenticate only SRTCP packets -+ SRTP_UNENCRYPTED=0x1, //< do not encrypt SRTP packets -+ SRTCP_UNENCRYPTED=0x2, //< do not encrypt SRTCP packets -+ SRTP_UNAUTHENTICATED=0x4, //< authenticate only SRTCP packets - -- SRTP_RCC_MODE1=0x10, // use Roll-over-Counter Carry mode 1 -- SRTP_RCC_MODE2=0x20, // use Roll-over-Counter Carry mode 2 -- SRTP_RCC_MODE3=0x30, // use Roll-over-Counter Carry mode 3 (insecure) -+ SRTP_RCC_MODE1=0x10, //< use Roll-over-Counter Carry mode 1 -+ SRTP_RCC_MODE2=0x20, //< use Roll-over-Counter Carry mode 2 -+ SRTP_RCC_MODE3=0x30, //< use Roll-over-Counter Carry mode 3 (insecure) - -- SRTP_FLAGS_MASK=0x38 -+ SRTP_FLAGS_MASK=0x37 //< mask for valid flags - }; - --/* SRTP encryption algorithms (ciphers); same values as MIKEY */ -+/** SRTP encryption algorithms (ciphers); same values as MIKEY */ - enum - { -- SRTP_ENCR_NULL=0, -- SRTP_ENCR_AES_CM=1, -- SRTP_ENCR_AES_F8=2 // not implemented -+ SRTP_ENCR_NULL=0, //< no encryption -+ SRTP_ENCR_AES_CM=1, //< AES counter mode -+ SRTP_ENCR_AES_F8=2, //< AES F8 mode (not implemented) - }; - --/* SRTP authenticaton algorithms; same values as MIKEY */ -+/** SRTP authenticaton algorithms; same values as MIKEY */ - enum - { -- SRTP_AUTH_NULL=0, -- SRTP_AUTH_HMAC_SHA1=1 -+ SRTP_AUTH_NULL=0, //< no authentication code -+ SRTP_AUTH_HMAC_SHA1=1, //< HMAC-SHA1 - }; - --/* SRTP pseudo random function; same values as MIKEY */ -+/** SRTP pseudo random function; same values as MIKEY */ - enum - { -- SRTP_PRF_AES_CM=0 -+ SRTP_PRF_AES_CM=0, //< AES counter mode - }; - - # ifdef __cplusplus -diff --git a/libs/srtp/test-aes.c b/libs/srtp/test-aes.c -index 463f0b1..ae55f34 100644 ---- a/libs/srtp/test-aes.c -+++ b/libs/srtp/test-aes.c -@@ -143,8 +143,6 @@ static void test_keystream (void) - - static void srtp_test (void) - { -- if (init_libgcrypt ()) -- fatal ("Libgcrypt initialization error"); - test_derivation (); - test_keystream (); - } diff --git a/vlc.spec b/vlc.spec index 3fd790f..3aae3d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ #global live555_date 2009.07.28 #global vlc_rc -rc3 %global vlc_bootstrap 1 -%global tarball_version 1.1.11 +%global tarball_version 1.1.12 %global _with_workaround_circle_deps 1 %global _with_freeworld 1 %if 0%{?_with_freeworld:1} @@ -25,8 +25,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.11 -Release: 2%{?dist} +Version: 1.1.12 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -38,8 +38,6 @@ Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch -Patch6: vlc-1.1-bugfix-20110920.patch -Patch7: 0001-port-to-FFmpeg-0.8-API.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -253,8 +251,6 @@ JACK audio plugin for the VLC media player. %patch5 -p1 -b .opencv22 %endif sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in -%patch6 -p1 -%patch7 -p1 -b .ff08 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -565,6 +561,9 @@ fi || : %changelog +* Fri Oct 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-1 +- Update to 1.1.12 + * Tue Sep 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-2 - Update to current bugfix - Add patch for FFmpeg-0.8 From 91bb53a08ddf85127038353a16c7a960cca92f54 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 7 Oct 2011 08:27:35 +0000 Subject: [PATCH 159/671] Update source --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c1821e1..2917294 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.11.tar.bz2 +vlc-1.1.12.tar.bz2 diff --git a/sources b/sources index 26fbcbb..3af0ce4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a64846d6f21ea179ae8e8bfb6f9447fe vlc-1.1.11.tar.bz2 +91de1ad308c947e35380f9d747ff5713 vlc-1.1.12.tar.bz2 From 65b006ec84b844bd93bf62f2bdf940da00fa0ce9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 7 Oct 2011 19:58:43 +0000 Subject: [PATCH 160/671] Add 2 already merged patches --- 0001-Fix-typo-in-vlc.desktop.patch | 25 ++++++++++++ ...ss-the-renderer-if-it-fails-to-initi.patch | 40 +++++++++++++++++++ vlc.spec | 7 +++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-typo-in-vlc.desktop.patch create mode 100644 0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch diff --git a/0001-Fix-typo-in-vlc.desktop.patch b/0001-Fix-typo-in-vlc.desktop.patch new file mode 100644 index 0000000..5ef5ef0 --- /dev/null +++ b/0001-Fix-typo-in-vlc.desktop.patch @@ -0,0 +1,25 @@ +From 5694c98039d550984e3e8d3a13341cc9543d3950 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Fri, 7 Oct 2011 21:46:37 +0200 +Subject: [PATCH] Fix typo in vlc.desktop + +--- + share/vlc.desktop | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/share/vlc.desktop b/share/vlc.desktop +index abc39d9..71bbb43 100644 +--- a/share/vlc.desktop ++++ b/share/vlc.desktop +@@ -38,7 +38,7 @@ Name[nl]=VLC Mediaspeler + GenericName[nl]=Mediaspeler + Comment[nl]=Uw multimediastreams afspelen, opnemen en uitzenden + Name[nn]=VLC mediespelar +-Name[nn]=Mediespelar ++GenericName[nn]=Mediespelar + Comment[nn]=Spel av, ta opp og send ut multimedia + Name[pa]=VLC ਮੀਡਿਆ ਪਲੇਅਰ + Comment[pa]=ਆਪਣੀ ਮਲਟੀਮੀਡਿਆ ਸਟਰੀਮ ਪੜ੍ਹੋ, ਕੈਪਚਰ ਤੇ ਬਰਾਡਕਾਸਟ ਕਰੋ +-- +1.7.4.4 + diff --git a/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch b/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch new file mode 100644 index 0000000..662042a --- /dev/null +++ b/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch @@ -0,0 +1,40 @@ +From 95ae1809a18f37d50e7746324daccc46a317246d Mon Sep 17 00:00:00 2001 +From: Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> +Date: Wed, 5 Oct 2011 22:07:50 +0100 +Subject: [PATCH] kate: do not access the renderer if it fails to initialize + +--- + modules/codec/kate.c | 17 +++++++++-------- + 1 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/modules/codec/kate.c b/modules/codec/kate.c +index 49177da..769e0d9 100644 +--- a/modules/codec/kate.c ++++ b/modules/codec/kate.c +@@ -404,14 +404,15 @@ static int OpenDecoder( vlc_object_t *p_this ) + p_sys->p_tr = NULL; + p_sys->b_use_tiger = false; + } +- +- CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) ); +- +- UpdateTigerFontEffect( p_dec ); +- UpdateTigerFontColor( p_dec ); +- UpdateTigerBackgroundColor( p_dec ); +- UpdateTigerQuality( p_dec ); +- UpdateTigerFontDesc( p_dec ); ++ else { ++ CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) ); ++ ++ UpdateTigerFontEffect( p_dec ); ++ UpdateTigerFontColor( p_dec ); ++ UpdateTigerBackgroundColor( p_dec ); ++ UpdateTigerQuality( p_dec ); ++ UpdateTigerFontDesc( p_dec ); ++ } + } + + #else +-- +1.7.1 + diff --git a/vlc.spec b/vlc.spec index 3aae3d4..aee2535 100644 --- a/vlc.spec +++ b/vlc.spec @@ -37,7 +37,9 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch Patch3: vlc-1.1.6-hardode_font_patch.patch Patch4: vlc-1.1.4-tls_path.patch -Patch5: vlc-1.1.8-bugfix.opencv22.patch +Patch5: vlc-1.1.8-bugfix.opencv22.patch +Patch6: 0001-Fix-typo-in-vlc.desktop.patch +Patch7: 0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -251,6 +253,8 @@ JACK audio plugin for the VLC media player. %patch5 -p1 -b .opencv22 %endif sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in +%patch6 -p1 +%patch7 -p1 rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -563,6 +567,7 @@ fi || : %changelog * Fri Oct 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-1 - Update to 1.1.12 +- Add 2 already merged patches * Tue Sep 20 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.11-2 - Update to current bugfix From e9db4bdf810ab790977ba07240464baf0c756b17 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 23 Nov 2011 19:21:45 +0000 Subject: [PATCH 161/671] Rebuilt for libcdio/libmatroska --- vlc.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vlc.spec b/vlc.spec index aee2535..9bdb72a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -26,7 +26,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.12 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -209,13 +209,6 @@ web browsers. %package core Summary: VLC media player core Group: Applications/Multimedia -%if 0%{?fedora} >= 13 -Conflicts: selinux-policy-targeted < 3.7.19-51 -%endif -Provides: ffmpeg4vlc-libs = 0.6-0.5 -Provides: ffmpeg4vlc-devel = 0.6-0.5 -Obsoletes: ffmpeg4vlc-libs < 0.6-0.5 -Obsoletes: ffmpeg4vlc-devel < 0.6-0.5 Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 %{?live555date:Requires: live555date%{_isa} = %{live555date}} @@ -565,6 +558,9 @@ fi || : %changelog +* Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-2 +- Rebuilf for libcdio/libmatroska + * Fri Oct 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-1 - Update to 1.1.12 - Add 2 already merged patches From cd38c46959e9680baa6cf4f5b2972071277606c8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 23 Nov 2011 19:55:18 +0000 Subject: [PATCH 162/671] Disable mozilla-vlc for F-17 --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9bdb72a..50c6f03 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,11 +22,12 @@ %if 0%{?fedora} < 15 %global _with_gnomevfs 1 %endif +%global _without_mozilla 1 Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.12 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -558,6 +559,9 @@ fi || : %changelog +* Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-3 +- Disable mozilla-vlc for F-17 + * Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-2 - Rebuilf for libcdio/libmatroska From b6e98d64ba05b40ff5435a3ad1c4e67f6bf77db8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 7 Dec 2011 19:19:45 +0000 Subject: [PATCH 163/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 50c6f03..3c7b187 100644 --- a/vlc.spec +++ b/vlc.spec @@ -27,7 +27,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.1.12 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -559,6 +559,9 @@ fi || : %changelog +* Wed Dec 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-4 +- Rebuilt for xcb + * Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-3 - Disable mozilla-vlc for F-17 From dcba57bffa1bc7fd56d762e34ffa9bce8d047732 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 7 Dec 2011 20:18:05 +0000 Subject: [PATCH 164/671] Add BR --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 3c7b187..598984f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -150,6 +150,7 @@ BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel BuildRequires: xcb-util-devel +BuildRequires: pkgconfig(xcb-keysyms) BuildRequires: xorg-x11-proto-devel From 127fedc574d7c080faace8c2c897222898c58536 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 7 Dec 2011 21:00:17 +0000 Subject: [PATCH 165/671] - Update to 1.2.0-pre2 - Reverse build conditional to --without freeworld So it can be tested with Fedora only (patches welcomed) --- .gitignore | 2 +- 0001-Fix-typo-in-vlc.desktop.patch | 25 ---- ...ss-the-renderer-if-it-fails-to-initi.patch | 40 ------ sources | 2 +- vlc-1.1.0-vlc-cache-gen_noerror.patch | 22 --- vlc-1.1.4-tls_path.patch | 14 -- vlc-1.1.6-hardode_font_patch.patch | 15 -- vlc.spec | 134 ++++-------------- 8 files changed, 27 insertions(+), 227 deletions(-) delete mode 100644 0001-Fix-typo-in-vlc.desktop.patch delete mode 100644 0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch delete mode 100644 vlc-1.1.0-vlc-cache-gen_noerror.patch delete mode 100644 vlc-1.1.4-tls_path.patch delete mode 100644 vlc-1.1.6-hardode_font_patch.patch diff --git a/.gitignore b/.gitignore index 2917294..8706cd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.1.12.tar.bz2 +vlc-1.2.0-pre2.tar.xz diff --git a/0001-Fix-typo-in-vlc.desktop.patch b/0001-Fix-typo-in-vlc.desktop.patch deleted file mode 100644 index 5ef5ef0..0000000 --- a/0001-Fix-typo-in-vlc.desktop.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5694c98039d550984e3e8d3a13341cc9543d3950 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Fri, 7 Oct 2011 21:46:37 +0200 -Subject: [PATCH] Fix typo in vlc.desktop - ---- - share/vlc.desktop | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/share/vlc.desktop b/share/vlc.desktop -index abc39d9..71bbb43 100644 ---- a/share/vlc.desktop -+++ b/share/vlc.desktop -@@ -38,7 +38,7 @@ Name[nl]=VLC Mediaspeler - GenericName[nl]=Mediaspeler - Comment[nl]=Uw multimediastreams afspelen, opnemen en uitzenden - Name[nn]=VLC mediespelar --Name[nn]=Mediespelar -+GenericName[nn]=Mediespelar - Comment[nn]=Spel av, ta opp og send ut multimedia - Name[pa]=VLC ਮੀਡਿਆ ਪਲੇਅਰ - Comment[pa]=ਆਪਣੀ ਮਲਟੀਮੀਡਿਆ ਸਟਰੀਮ ਪੜ੍ਹੋ, ਕੈਪਚਰ ਤੇ ਬਰਾਡਕਾਸਟ ਕਰੋ --- -1.7.4.4 - diff --git a/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch b/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch deleted file mode 100644 index 662042a..0000000 --- a/0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 95ae1809a18f37d50e7746324daccc46a317246d Mon Sep 17 00:00:00 2001 -From: Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> -Date: Wed, 5 Oct 2011 22:07:50 +0100 -Subject: [PATCH] kate: do not access the renderer if it fails to initialize - ---- - modules/codec/kate.c | 17 +++++++++-------- - 1 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/modules/codec/kate.c b/modules/codec/kate.c -index 49177da..769e0d9 100644 ---- a/modules/codec/kate.c -+++ b/modules/codec/kate.c -@@ -404,14 +404,15 @@ static int OpenDecoder( vlc_object_t *p_this ) - p_sys->p_tr = NULL; - p_sys->b_use_tiger = false; - } -- -- CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) ); -- -- UpdateTigerFontEffect( p_dec ); -- UpdateTigerFontColor( p_dec ); -- UpdateTigerBackgroundColor( p_dec ); -- UpdateTigerQuality( p_dec ); -- UpdateTigerFontDesc( p_dec ); -+ else { -+ CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) ); -+ -+ UpdateTigerFontEffect( p_dec ); -+ UpdateTigerFontColor( p_dec ); -+ UpdateTigerBackgroundColor( p_dec ); -+ UpdateTigerQuality( p_dec ); -+ UpdateTigerFontDesc( p_dec ); -+ } - } - - #else --- -1.7.1 - diff --git a/sources b/sources index 3af0ce4..de5d148 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -91de1ad308c947e35380f9d747ff5713 vlc-1.1.12.tar.bz2 +13bf48d8e20bc9a04e53733861a249bc vlc-1.2.0-pre2.tar.xz diff --git a/vlc-1.1.0-vlc-cache-gen_noerror.patch b/vlc-1.1.0-vlc-cache-gen_noerror.patch deleted file mode 100644 index 710629f..0000000 --- a/vlc-1.1.0-vlc-cache-gen_noerror.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up vlc-1.1.0/modules/Makefile.am.mock vlc-1.1.0/modules/Makefile.am ---- vlc-1.1.0/modules/Makefile.am.mock 2010-04-05 19:46:04.000000000 -0500 -+++ vlc-1.1.0/modules/Makefile.am 2010-04-16 12:24:52.745993752 -0500 -@@ -63,7 +63,7 @@ MOSTLYCLEANFILES = stamp-cache plugins-* - - stamp-cache: - $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ -- ../bin/vlc-cache-gen$(EXEEXT) . ; \ -+ ../bin/vlc-cache-gen$(EXEEXT) . ||: ; \ - else \ - echo "Cross-compilation: cache generation skipped!" ; \ - fi -@@ -71,7 +71,7 @@ stamp-cache: - - install-exec-hook: - if test -z "$(DESTDIR)"; then \ -- ../bin/vlc-cache-gen$(EXEEXT) "$(vlclibdir)/plugins" ; \ -+ ../bin/vlc-cache-gen$(EXEEXT) "$(vlclibdir)/plugins" ||: ; \ - else \ - echo "Staged installation: cache generation skipped!" ; \ - fi - diff --git a/vlc-1.1.4-tls_path.patch b/vlc-1.1.4-tls_path.patch deleted file mode 100644 index cea8ebe..0000000 --- a/vlc-1.1.4-tls_path.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up vlc-1.1.4/modules/misc/gnutls.c.tls_path vlc-1.1.4/modules/misc/gnutls.c ---- vlc-1.1.4/modules/misc/gnutls.c.tls_path 2010-06-08 00:57:45.000000000 +0200 -+++ vlc-1.1.4/modules/misc/gnutls.c 2010-11-10 23:13:01.390977175 +0100 -@@ -695,8 +695,8 @@ static int OpenClient (vlc_object_t *obj - const char *confdir = config_GetConfDir (); - { - char path[strlen (confdir) -- + sizeof ("/ssl/certs/ca-certificates.crt")]; -- sprintf (path, "%s/ssl/certs/ca-certificates.crt", confdir); -+ + sizeof ("/pki/tls/certs/ca-bundle.crt")]; -+ sprintf (path, "%s/pki/tls/certs/ca-bundle.crt", confdir); - gnutls_Addx509File (VLC_OBJECT (p_session), - p_sys->x509_cred, path, false); - } diff --git a/vlc-1.1.6-hardode_font_patch.patch b/vlc-1.1.6-hardode_font_patch.patch deleted file mode 100644 index 0383c33..0000000 --- a/vlc-1.1.6-hardode_font_patch.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up vlc-1.1.6/modules/visualization/projectm.cpp.hardode_path vlc-1.1.6/modules/visualization/projectm.cpp ---- vlc-1.1.6/modules/visualization/projectm.cpp.hardode_path 2011-01-17 17:30:54.000000000 +0100 -+++ vlc-1.1.6/modules/visualization/projectm.cpp 2011-01-25 10:55:30.791607002 +0100 -@@ -89,9 +89,9 @@ vlc_module_begin () - add_directory( "projectm-preset-path", "/usr/share/projectM/presets", NULL, - #endif - PRESET_PATH_TXT, PRESET_PATH_LONGTXT, true ) -- add_file( "projectm-title-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", NULL, -+ add_file( "projectm-title-font", "/usr/share/fonts/dejavu/DejaVuSans.ttf", NULL, - TITLE_FONT_TXT, TITLE_FONT_LONGTXT, true ) -- add_file( "projectm-menu-font", "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf", NULL, -+ add_file( "projectm-menu-font", "/usr/share/fonts/dejavu/DejaVuSansMono.ttf", NULL, - MENU_FONT_TXT, MENU_FONT_LONGTXT, true ) - #endif - add_integer( "projectm-width", 800, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, diff --git a/vlc.spec b/vlc.spec index 598984f..d0fc6e1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,10 +1,8 @@ #global live555_date 2009.07.28 -#global vlc_rc -rc3 -%global vlc_bootstrap 1 -%global tarball_version 1.1.12 +%global vlc_rc -pre2 +#global _with_bootstrap 1 %global _with_workaround_circle_deps 1 -%global _with_freeworld 1 -%if 0%{?_with_freeworld:1} +%if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec %global _with_faad2 --with-faad2 %global _with_ffmpeg --with-ffmpeg @@ -18,39 +16,32 @@ %global _with_xvidcore --with-xvidcore %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi +%global _without_opencv 1 %endif -%if 0%{?fedora} < 15 -%global _with_gnomevfs 1 -%endif -%global _without_mozilla 1 + Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.1.12 -Release: 4%{?dist} +Version: 1.2.0 +Release: 0.2_pre2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.bz2 +Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz %if 0%{?live555_date:1} Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz %endif -Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch -Patch3: vlc-1.1.6-hardode_font_patch.patch -Patch4: vlc-1.1.4-tls_path.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch -Patch6: 0001-Fix-typo-in-vlc.desktop.patch -Patch7: 0001-kate-do-not-access-the-renderer-if-it-fails-to-initi.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: prelink -%if 0%{?vlc_bootstrap:1} +%{?_with_bootstrap: BuildRequires: gettext-devel BuildRequires: libtool -%endif +} %{?_with_a52dec:BuildRequires: a52dec-devel} BuildRequires: aalib-devel @@ -72,9 +63,11 @@ BuildRequires: jack-audio-connection-kit-devel BuildRequires: kde-filesystem BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 +BuildRequires: libbluray-devel BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 +BuildRequires: libcrystalhd-devel BuildRequires: libdc1394-devel >= 2.1.0 %{?_with_libdca:BuildRequires: libdca-devel} BuildRequires: libdv-devel @@ -89,9 +82,6 @@ BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel >= 1.0.0 -%if 0%{?fedora} < 15 -BuildRequires: libnotify-devel -%endif BuildRequires: libprojectM-qt-devel BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 @@ -116,6 +106,7 @@ BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libmusicbrainz-devel +BuildRequires: libsamplerate-devel BuildRequires: libshout-devel BuildRequires: lua-devel BuildRequires: minizip-devel @@ -128,16 +119,13 @@ BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel BuildRequires: qt4-devel >= 4.5.2 BuildRequires: schroedinger-devel +BuildRequires: sqlite-devel BuildRequires: SDL_image-devel BuildRequires: speex-devel >= 1.1.5 -%ifarch %{ix86} x86_64 -BuildRequires: svgalib-devel -%endif BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} %{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} %{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} -%{?_with_xosd:BuildRequires: xosd-devel} %{?_with_xvidcore:BuildRequires: xvidcore-devel} BuildRequires: zlib-devel BuildRequires: zvbi-devel @@ -150,12 +138,9 @@ BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel BuildRequires: xcb-util-devel -BuildRequires: pkgconfig(xcb-keysyms) BuildRequires: xorg-x11-proto-devel -%{!?_without_mozilla:BuildRequires: gecko-devel nspr-devel} -%{?_without_mozilla:Obsoletes: mozilla-vlc < %{version}-%{release}} %{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} @@ -195,24 +180,12 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%{!?_without_mozilla: -%package -n mozilla-vlc -Summary: VLC media player plugin for Mozilla compatible web browsers -Group: Applications/Multimedia -Requires: %{name}-xorg%{_isa} = %{version}-%{release} -Requires: %{_libdir}/mozilla/plugins - -%description -n mozilla-vlc -This package contains a VLC media player plugging for Mozilla compatible -web browsers. - -} - %package core Summary: VLC media player core Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 +Obsoletes: mozilla-vlc < 1.2.0 %{?live555date:Requires: live555date%{_isa} = %{live555date}} %description core @@ -237,26 +210,18 @@ JACK audio plugin for the VLC media player. %prep -%setup -q -n %{name}-%{tarball_version}%{?vlc_rc} +%setup -q -n %{name}-%{version}%{?vlc_rc} %if 0%{?live555_date:1} %setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} %endif -%patch0 -p1 -b .noerror -%patch3 -p1 -b .hardode_path -%patch4 -p1 -b .tls_path %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif -sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in -%patch6 -p1 -%patch7 -p1 -rm modules/access/videodev2.h -ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h -%if 0%{?vlc_bootstrap:1} +%{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap -%endif +} @@ -292,7 +257,7 @@ popd %{!?_without_opencv:--enable-opencv} \ --enable-sftp \ --enable-pvr \ -%{?_with_gnomevfs:--enable-gnomevfs} \ +%{?_with_gnomevfs:--enable-gnomevfs} \ %{?_with_vcdimager:--enable-vcdx} \ %if 0 %{?_with_freeworld:--enable-wma-fixed} \ @@ -315,10 +280,6 @@ popd --enable-shout \ --enable-xcb \ --enable-svg \ - --enable-snapshot \ -%ifarch %{ix86} x86_64 - --enable-svgalib \ -%endif %{!?_without_directfb:--enable-directfb} \ --enable-aa \ --enable-caca \ @@ -326,7 +287,6 @@ popd --enable-portaudio \ --enable-pulse \ --enable-ncurses \ -%{?_with_xosd:--enable-xosd} \ --enable-fbosd \ --enable-lirc \ %ifarch %{ix86} @@ -334,10 +294,9 @@ popd %else --without-contrib \ %endif -%{!?_without_mozilla:--enable-mozilla} \ -%if 1 +%if 0 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -366,13 +325,6 @@ desktop-file-install --vendor "" \ --mode 644 \ $RPM_BUILD_ROOT%{_datadir}/applications/vlc.desktop -# Remove installed fonts for skin2 -rm -rf $RPM_BUILD_ROOT%{_datadir}/vlc/skin2/fonts/*.ttf -ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ - $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSans.ttf -ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ - $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf - #Clear execstak %ifarch %{ix86} execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so @@ -433,7 +385,7 @@ fi %preun core if [ $1 == 0 ] ; then - rm -rf %{_libdir}/vlc/plugins-*-*.dat + rm -f %{_libdir}/vlc/plugins*.dat fi || : @@ -444,7 +396,6 @@ fi || : %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png %{_datadir}/icons/hicolor/*/apps/vlc*.xpm -%{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc %{_libdir}/vlc/plugins/gui/libqt4_plugin.so @@ -453,18 +404,13 @@ fi || : } %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so -%{_libdir}/vlc/plugins/misc/libsvg_plugin.so %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{?_with_xosd:%{_libdir}/vlc/plugins/misc/libxosd_plugin.so} -%{_libdir}/vlc/plugins/gui/libskins2_plugin.so -%if 0%{?fedora} > 11 || 0%{?rhel} > 5 %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so -%endif %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so @@ -475,7 +421,6 @@ fi || : %{_bindir}/nvlc %{_bindir}/rvlc %{_bindir}/vlc-wrapper -%exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/plugins/gui/libqt4_plugin.so @@ -486,31 +431,20 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so -%exclude %{_libdir}/vlc/plugins/misc/libsvg_plugin.so -%if 0%{?fedora} < 15 -%exclude %{_libdir}/vlc/plugins/misc/libnotify_plugin.so -%endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{?_with_xosd:%exclude %{_libdir}/vlc/plugins/misc/libxosd_plugin.so} -%ifarch %{ix86} x86_64 -%exclude %{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so -%endif %{!?_without_directfb: %exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } -%exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{!?_without_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so } -%if 0%{?fedora} > 11 || 0%{?rhel} > 5 %exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so -%endif %exclude %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so @@ -530,44 +464,26 @@ fi || : %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } -%if 0%{?fedora} < 15 -%{_libdir}/vlc/plugins/misc/libnotify_plugin.so -%endif %{!?_without_opencv: %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so } -%ifarch %{ix86} x86_64 -%{_libdir}/vlc/plugins/video_output/libsvgalib_plugin.so -%endif %files devel %defattr(-,root,root,-) -%doc HACKING %dir %{_includedir}/vlc %{_includedir}/vlc/* -%{_mandir}/man1/vlc-config.1* %{_libdir}/*.so %{_libdir}/pkgconfig/vlc-plugin.pc %{_libdir}/pkgconfig/libvlc.pc -%{!?_without_mozilla: -%files -n mozilla-vlc -%defattr(-,root,root,-) -%{_libdir}/mozilla/plugins/libvlcplugin.so -} - %changelog -* Wed Dec 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-4 -- Rebuilt for xcb - -* Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-3 -- Disable mozilla-vlc for F-17 - -* Wed Nov 23 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-2 -- Rebuilf for libcdio/libmatroska +* Wed Dec 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.2_pre2 +- Update to 1.2.0-pre2 +- Reverse build conditional to --without freeworld + So it can be tested with Fedora only (patches welcomed) * Fri Oct 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-1 - Update to 1.1.12 From 214fc0403ed969d6039e1657692705ad27156879 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 7 Dec 2011 21:43:16 +0000 Subject: [PATCH 166/671] Fix Build conditional --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d0fc6e1..80b0669 100644 --- a/vlc.spec +++ b/vlc.spec @@ -270,7 +270,7 @@ popd %{?_with_faad2:--enable-faad} \ %{!?_with_libmad:--disable-mad} \ %{?_with_twolame:--enable-twolame} \ -%{?_with_freeworld:--enable-real --enable-realrtsp} \ +%{?!_without_freeworld:--enable-real --enable-realrtsp} \ --enable-flac \ --enable-tremor \ --enable-speex \ From 1d147c2f7854e265660adb1747bd9af71bf8ea36 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 10 Dec 2011 22:26:31 +0000 Subject: [PATCH 167/671] Disable globalhotkeys in F-17/Rawhide --- vlc.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vlc.spec b/vlc.spec index 80b0669..140ba53 100644 --- a/vlc.spec +++ b/vlc.spec @@ -403,7 +403,9 @@ fi || : %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so +%if 0%{?fedora} >= 17 %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so +%endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so @@ -430,7 +432,9 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +%if 0%{?fedora} >= 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so +%endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so @@ -484,6 +488,7 @@ fi || : - Update to 1.2.0-pre2 - Reverse build conditional to --without freeworld So it can be tested with Fedora only (patches welcomed) +- Disable xcb globalhotkeys in Rawhide/F-17 * Fri Oct 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.1.12-1 - Update to 1.1.12 From 43b9a9c7194e2004a08988c650735dc25b94380a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 10 Dec 2011 22:35:04 +0000 Subject: [PATCH 168/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 140ba53..c38912b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.2.0 -Release: 0.2_pre2%{?dist} +Release: 0.3_pre2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -484,6 +484,9 @@ fi || : %changelog +* Sat Dec 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.3_pre2 +- Rebuilt + * Wed Dec 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.2_pre2 - Update to 1.2.0-pre2 - Reverse build conditional to --without freeworld From 3c95a81c95cdb81be633bc88c51ac915b7b08801 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 10 Dec 2011 22:44:47 +0000 Subject: [PATCH 169/671] Add xz to workaround buildroot issue --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c38912b..4d53bbe 100644 --- a/vlc.spec +++ b/vlc.spec @@ -37,6 +37,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: prelink +Buildrequires: xz %{?_with_bootstrap: BuildRequires: gettext-devel @@ -485,7 +486,7 @@ fi || : %changelog * Sat Dec 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.3_pre2 -- Rebuilt +- Rebuilt with xz to workaround rfbz#2086 * Wed Dec 07 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.2_pre2 - Update to 1.2.0-pre2 From 755928ad0f3edacb85033f094d2e2c41d043eb18 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 11 Dec 2011 19:38:00 +0000 Subject: [PATCH 170/671] Fix version check --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 4d53bbe..b3a51fd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -404,7 +404,7 @@ fi || : %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%if 0%{?fedora} >= 17 +%if 0%{?fedora} < 17 %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %endif %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -433,7 +433,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -%if 0%{?fedora} >= 17 +%if 0%{?fedora} < 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so From 5bcb6ce4667d701d09eafc77e65f9b781dd60274 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Dec 2011 22:18:43 +0000 Subject: [PATCH 171/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index b3a51fd..522970d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.2.0 -Release: 0.3_pre2%{?dist} +Release: 0.4_pre2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -485,6 +485,9 @@ fi || : %changelog +* Tue Dec 13 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.4_pre2 +- Rebuild for libbluray + * Sat Dec 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.3_pre2 - Rebuilt with xz to workaround rfbz#2086 From 603b8c0590dd15af0a8a5e2b9536ede4f8d18eb8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 28 Dec 2011 22:54:48 +0000 Subject: [PATCH 172/671] Update to 1.2.0-pre3 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8706cd9..aba6282 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.2.0-pre2.tar.xz +vlc-1.2.0-pre3.tar.xz diff --git a/sources b/sources index de5d148..58e49f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13bf48d8e20bc9a04e53733861a249bc vlc-1.2.0-pre2.tar.xz +a2af9f78b24ea434c2599e638d54a550 vlc-1.2.0-pre3.tar.xz diff --git a/vlc.spec b/vlc.spec index 522970d..a099a83 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ #global live555_date 2009.07.28 -%global vlc_rc -pre2 -#global _with_bootstrap 1 +%global vlc_rc -pre3 +%global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.2.0 -Release: 0.4_pre2%{?dist} +Release: 0.5_pre3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -186,7 +186,6 @@ Summary: VLC media player core Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 -Obsoletes: mozilla-vlc < 1.2.0 %{?live555date:Requires: live555date%{_isa} = %{live555date}} %description core @@ -485,6 +484,9 @@ fi || : %changelog +* Wed Dec 28 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.5_pre3 +- Update to 1.2.0-pre3 + * Tue Dec 13 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.4_pre2 - Rebuild for libbluray From a0932afd1016100c31fa82aa2af92aadae5f604d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 2 Jan 2012 21:33:58 +0000 Subject: [PATCH 173/671] - Add BR game-music-emu-devel - move vcdimager plugin to vlc-extras --- vlc.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a099a83..401baeb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.2.0 -Release: 0.5_pre3%{?dist} +Release: 0.6_pre3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -62,6 +62,7 @@ BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: kde-filesystem +BuildRequires: game-music-emu-devel BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 BuildRequires: libbluray-devel @@ -431,6 +432,11 @@ fi || : } %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so +%{?_with_vcdimager: +%exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so +%exclude %{_libdir}/vlc/plugins/access/libvcdx_plugin.so +%exclude %{_libdir}/vlc/plugins/codec/libsvcdsub_plugin.so +} %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so %if 0%{?fedora} < 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so @@ -472,6 +478,11 @@ fi || : %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so } +%{?_with_vcdimager: +%{_libdir}/vlc/plugins/access/libvcd_plugin.so +%{_libdir}/vlc/plugins/access/libvcdx_plugin.so +%{_libdir}/vlc/plugins/codec/libsvcdsub_plugin.so +} %files devel %defattr(-,root,root,-) @@ -484,6 +495,10 @@ fi || : %changelog +* Mon Jan 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.6_pre3 +- Add BR game-music-emu-devel +- move vcdimager plugin to vlc-extras + * Wed Dec 28 2011 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.5_pre3 - Update to 1.2.0-pre3 From 4fef54cd510de06f710068b8938b5d37e872b1e4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 9 Jan 2012 10:13:02 +0000 Subject: [PATCH 174/671] Update to 1.2.0-pre4 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index aba6282..250195d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.2.0-pre3.tar.xz +vlc-1.2.0-pre4.tar.xz diff --git a/sources b/sources index 58e49f2..17651c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a2af9f78b24ea434c2599e638d54a550 vlc-1.2.0-pre3.tar.xz +0daff5a1ddf9358dea6c56dd5ba50363 vlc-1.2.0-pre4.tar.xz diff --git a/vlc.spec b/vlc.spec index 401baeb..9478655 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -pre3 +%global vlc_rc -pre4 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 1.2.0 -Release: 0.6_pre3%{?dist} +Release: 0.7_pre4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -495,6 +495,9 @@ fi || : %changelog +* Mon Jan 09 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.7_pre4 +- Update to 1.2.0-pre4 + * Mon Jan 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.6_pre3 - Add BR game-music-emu-devel - move vcdimager plugin to vlc-extras From 590d5245cb106767893a87bf2c193b123af2c294 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 25 Jan 2012 16:43:41 +0000 Subject: [PATCH 175/671] Update to 2.0.0-rc1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 250195d..653acc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-1.2.0-pre4.tar.xz +vlc-2.0.0-rc1.tar.xz diff --git a/sources b/sources index 17651c6..c747acd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0daff5a1ddf9358dea6c56dd5ba50363 vlc-1.2.0-pre4.tar.xz +8c4bfbc5e79ff0bdfff572d53b03a92a vlc-2.0.0-rc1.tar.xz diff --git a/vlc.spec b/vlc.spec index 9478655..e595ac7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global live555_date 2009.07.28 -%global vlc_rc -pre4 +%global vlc_rc -rc1 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -22,8 +22,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 1.2.0 -Release: 0.7_pre4%{?dist} +Version: 2.0.0 +Release: 0.9_rc1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -495,6 +495,9 @@ fi || : %changelog +* Wed Jan 25 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-0.9_rc1 +- Update to 2.0.0-rc1 + * Mon Jan 09 2012 Nicolas Chauvet <kwizart@gmail.com> - 1.2.0-0.7_pre4 - Update to 1.2.0-pre4 From 269c2b79390e5fa160e647968a021a91d04ed8af Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 22 Feb 2012 22:56:46 +0000 Subject: [PATCH 176/671] Rebuilt --- vlc.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index e595ac7..69c582e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -#global live555_date 2009.07.28 -%global vlc_rc -rc1 +#global live555_date 2012.01.26 +#global vlc_rc -rc1 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -23,7 +23,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.0 -Release: 0.9_rc1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -495,6 +495,12 @@ fi || : %changelog +* Wed Feb 22 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-2 +- Rebuilt for x264/FFmpeg + +* Sun Feb 19 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-1 +- Update to 2.0.0 (Final) + * Wed Jan 25 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-0.9_rc1 - Update to 2.0.0-rc1 From cfd720463a95fa45b344c974df27c725a2f855ee Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 22 Feb 2012 22:57:22 +0000 Subject: [PATCH 177/671] Update to 2.0.0 --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 653acc9..82e6c25 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.0-rc1.tar.xz +vlc-2.0.0.tar.xz diff --git a/sources b/sources index c747acd..4d31c2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c4bfbc5e79ff0bdfff572d53b03a92a vlc-2.0.0-rc1.tar.xz +8806bff2ea9c76791123d444a92f708c vlc-2.0.0.tar.xz From 7485ca8ed469b691b143213ad839bdb8d318e7b3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 26 Feb 2012 11:16:36 +0000 Subject: [PATCH 178/671] Reenable skins2 --- vlc.spec | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/vlc.spec b/vlc.spec index 69c582e..c122140 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,4 @@ -#global live555_date 2012.01.26 -#global vlc_rc -rc1 +#global vlc_rc -rc1 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -23,14 +22,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -%if 0%{?live555_date:1} -Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz -%endif Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -103,7 +99,7 @@ BuildRequires: libv4l-devel BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel -%{?_with_live555:BuildRequires: live555-devel >= 0-0.19.2008.04.03} +%{?_with_live555:BuildRequires: live555-devel >= 0-0.33.2011.12.23} BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel @@ -212,9 +208,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%if 0%{?live555_date:1} -%setup -q -D -T -a 2 -n %{name}-%{version}%{?vlc_rc} -%endif %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif @@ -225,17 +218,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : } - %build -%if 0%{?live555_date:1} -# Then bundled live555 - not needed -pushd live -# Force the use of our CFLAGS -%{__perl} -pi -e 's|-O2|%{optflags} -fPIC -DPIC|g' config.linux -# Configure and build -./genMakefiles linux && make -popd -%endif %configure \ @@ -251,9 +234,6 @@ popd %{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ --enable-live555 \ -%if 0%{?live555_date:1} - --with-live555-tree=live \ -%endif --enable-dv \ %{!?_without_opencv:--enable-opencv} \ --enable-sftp \ @@ -326,6 +306,13 @@ desktop-file-install --vendor "" \ --mode 644 \ $RPM_BUILD_ROOT%{_datadir}/applications/vlc.desktop +# Remove installed fonts for skins2 +rm -f $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/*.ttf +ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ + $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSans.ttf +ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ + $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf + #Clear execstak %ifarch %{ix86} execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so @@ -397,6 +384,7 @@ fi || : %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png %{_datadir}/icons/hicolor/*/apps/vlc*.xpm +%{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc %{_libdir}/vlc/plugins/gui/libqt4_plugin.so @@ -413,6 +401,7 @@ fi || : %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +%{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so @@ -424,6 +413,7 @@ fi || : %{_bindir}/nvlc %{_bindir}/rvlc %{_bindir}/vlc-wrapper +%exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/plugins/gui/libqt4_plugin.so @@ -450,6 +440,7 @@ fi || : %{!?_without_directfb: %exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } +%exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{!?_without_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so @@ -495,6 +486,10 @@ fi || : %changelog +* Sun Feb 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-3 +- Reenable skins2 - rfbz#2195 +- Disable internal live555 build + * Wed Feb 22 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-2 - Rebuilt for x264/FFmpeg @@ -902,7 +897,7 @@ Security updates: * Thu Jan 10 2008 kwizart < kwizart at gmail.com > - 0.8.6d-3.1 - Remove BR portaudio arts -- Move skin2 to main vlc package +- Move skins2 to main vlc package - Enable libopendaap (included within Fedora) * Mon Dec 3 2007 kwizart < kwizart at gmail.com > - 0.8.6d-3 @@ -943,7 +938,7 @@ Security updates: * Thu Aug 23 2007 kwizart < kwizart at gmail.com > - 0.8.6c-4 - Change default font to dejavu-lgc/DejaVuLGCSerif.ttf http://bugzilla.livna.org/show_bug.cgi?id=1605 -- Remove unneeded fonts provided by skin2 +- Remove unneeded fonts provided by skins2 * Tue Aug 14 2007 kwizart < kwizart at gmail.com > - 0.8.6c-3.2 - clean-up with svn From 003284c25272808c8e168503d17a15fd47febe1d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Mar 2012 22:18:26 +0000 Subject: [PATCH 179/671] * Fri Mar 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-4 - Rebuilt for c++ ABI breakage --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c122140..cf1958b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -486,6 +486,9 @@ fi || : %changelog +* Fri Mar 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-4 +- Rebuilt for c++ ABI breakage + * Sun Feb 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-3 - Reenable skins2 - rfbz#2195 - Disable internal live555 build From a4a1104e29f4f1db89afb10c563e5b1703e4de62 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Mar 2012 08:42:41 +0000 Subject: [PATCH 180/671] * Tue Mar 13 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-5 - Rebuilt for x264 ABI 0.120 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index cf1958b..7f6a20b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -486,6 +486,9 @@ fi || : %changelog +* Tue Mar 13 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-5 +- Rebuilt for x264 ABI 0.120 + * Fri Mar 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-4 - Rebuilt for c++ ABI breakage From 3e779bd6cfdf903ce9e0ba79a67b95f73e3a3cd9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 May 2012 22:46:20 +0000 Subject: [PATCH 181/671] Update to 2.0.1 --- .gitignore | 2 +- sources | 2 +- vlc-2.0.1-fftype.patch | 47 ++++++++++++++++++++++++++++++++++++++++++ vlc.spec | 7 +++++-- 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 vlc-2.0.1-fftype.patch diff --git a/.gitignore b/.gitignore index 82e6c25..70026a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.0.tar.xz +vlc-2.0.1.tar.xz diff --git a/sources b/sources index 4d31c2f..ac4f074 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8806bff2ea9c76791123d444a92f708c vlc-2.0.0.tar.xz +5ad114755670e4881a2b35354e2f79bc vlc-2.0.1.tar.xz diff --git a/vlc-2.0.1-fftype.patch b/vlc-2.0.1-fftype.patch new file mode 100644 index 0000000..991d01b --- /dev/null +++ b/vlc-2.0.1-fftype.patch @@ -0,0 +1,47 @@ +diff -up vlc-2.0.1/modules/stream_out/switcher.c.orig vlc-2.0.1/modules/stream_out/switcher.c +--- vlc-2.0.1/modules/stream_out/switcher.c.orig 2012-05-01 16:31:41.036832197 +0200 ++++ vlc-2.0.1/modules/stream_out/switcher.c 2012-05-01 16:35:53.694838241 +0200 +@@ -844,7 +844,7 @@ static block_t *VideoGetBuffer( sout_str + + if ( id->i_nb_pred >= p_sys->i_gop ) + { +- id->p_frame->pict_type = FF_I_TYPE; ++ id->p_frame->pict_type = AV_PICTURE_TYPE_I; + #if 0 + id->p_frame->me_threshold = 0; + id->p_frame->mb_threshold = 0; +@@ -853,7 +853,7 @@ static block_t *VideoGetBuffer( sout_str + } + else + { +- id->p_frame->pict_type = FF_P_TYPE; ++ id->p_frame->pict_type = AV_PICTURE_TYPE_P; + #if 0 + if ( id->p_frame->mb_type != NULL ) + { +@@ -873,7 +873,7 @@ static block_t *VideoGetBuffer( sout_str + + #if 0 + if ( id->p_frame->mb_type == NULL +- && id->ff_enc_c->coded_frame->pict_type != FF_I_TYPE ) ++ && id->ff_enc_c->coded_frame->pict_type != AV_PICTURE_TYPE_I ) + { + int mb_width = (id->ff_enc_c->width + 15) / 16; + int mb_height = (id->ff_enc_c->height + 15) / 16; +@@ -926,13 +926,13 @@ static block_t *VideoGetBuffer( sout_str + + switch ( id->ff_enc_c->coded_frame->pict_type ) + { +- case FF_I_TYPE: ++ case AV_PICTURE_TYPE_I: + p_out->i_flags |= BLOCK_FLAG_TYPE_I; + break; +- case FF_P_TYPE: ++ case AV_PICTURE_TYPE_P: + p_out->i_flags |= BLOCK_FLAG_TYPE_P; + break; +- case FF_B_TYPE: ++ case AV_PICTURE_TYPE_B: + p_out->i_flags |= BLOCK_FLAG_TYPE_B; + break; + default: diff --git a/vlc.spec b/vlc.spec index 7f6a20b..46a655e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,8 +21,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.0 -Release: 5%{?dist} +Version: 2.0.1 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -486,6 +486,9 @@ fi || : %changelog +* Wed May 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-1 +- Update to 2.0.1 + * Tue Mar 13 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.0-5 - Rebuilt for x264 ABI 0.120 From c371dc8be50fc93976d90b273144fdb9ae51abe1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 May 2012 22:49:21 +0000 Subject: [PATCH 182/671] Missing patch --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 46a655e..afeaf13 100644 --- a/vlc.spec +++ b/vlc.spec @@ -27,6 +27,7 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +Patch0: vlc-2.0.1-fftype.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -208,6 +209,7 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} +%patch0 -p1 %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif From f7286bd60210d33f832fc3172b2df34251292344 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 18 Jun 2012 12:21:29 +0000 Subject: [PATCH 183/671] Backport merged patch available since March --- vlc-2.0.1-fftype.patch | 47 -------------- vlc-backport-ffmpeg54.patch | 121 ++++++++++++++++++++++++++++++++++++ vlc.spec | 7 ++- 3 files changed, 126 insertions(+), 49 deletions(-) delete mode 100644 vlc-2.0.1-fftype.patch create mode 100644 vlc-backport-ffmpeg54.patch diff --git a/vlc-2.0.1-fftype.patch b/vlc-2.0.1-fftype.patch deleted file mode 100644 index 991d01b..0000000 --- a/vlc-2.0.1-fftype.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up vlc-2.0.1/modules/stream_out/switcher.c.orig vlc-2.0.1/modules/stream_out/switcher.c ---- vlc-2.0.1/modules/stream_out/switcher.c.orig 2012-05-01 16:31:41.036832197 +0200 -+++ vlc-2.0.1/modules/stream_out/switcher.c 2012-05-01 16:35:53.694838241 +0200 -@@ -844,7 +844,7 @@ static block_t *VideoGetBuffer( sout_str - - if ( id->i_nb_pred >= p_sys->i_gop ) - { -- id->p_frame->pict_type = FF_I_TYPE; -+ id->p_frame->pict_type = AV_PICTURE_TYPE_I; - #if 0 - id->p_frame->me_threshold = 0; - id->p_frame->mb_threshold = 0; -@@ -853,7 +853,7 @@ static block_t *VideoGetBuffer( sout_str - } - else - { -- id->p_frame->pict_type = FF_P_TYPE; -+ id->p_frame->pict_type = AV_PICTURE_TYPE_P; - #if 0 - if ( id->p_frame->mb_type != NULL ) - { -@@ -873,7 +873,7 @@ static block_t *VideoGetBuffer( sout_str - - #if 0 - if ( id->p_frame->mb_type == NULL -- && id->ff_enc_c->coded_frame->pict_type != FF_I_TYPE ) -+ && id->ff_enc_c->coded_frame->pict_type != AV_PICTURE_TYPE_I ) - { - int mb_width = (id->ff_enc_c->width + 15) / 16; - int mb_height = (id->ff_enc_c->height + 15) / 16; -@@ -926,13 +926,13 @@ static block_t *VideoGetBuffer( sout_str - - switch ( id->ff_enc_c->coded_frame->pict_type ) - { -- case FF_I_TYPE: -+ case AV_PICTURE_TYPE_I: - p_out->i_flags |= BLOCK_FLAG_TYPE_I; - break; -- case FF_P_TYPE: -+ case AV_PICTURE_TYPE_P: - p_out->i_flags |= BLOCK_FLAG_TYPE_P; - break; -- case FF_B_TYPE: -+ case AV_PICTURE_TYPE_B: - p_out->i_flags |= BLOCK_FLAG_TYPE_B; - break; - default: diff --git a/vlc-backport-ffmpeg54.patch b/vlc-backport-ffmpeg54.patch new file mode 100644 index 0000000..4a829a7 --- /dev/null +++ b/vlc-backport-ffmpeg54.patch @@ -0,0 +1,121 @@ +X-Git-Url: http://git.videolan.org/?p=vlc%2Fvlc-2.0.git;a=blobdiff_plain;f=modules%2Fstream_out%2Fswitcher.c;h=18301329e33fe413b3d8f4da18966d6205581274;hp=372eef81c9ae3b9ee5b1405bdd5b7be8254fd3f0;hb=HEAD;hpb=caf2a08a0507ab9e9ae34038854f3f218e820581 + +diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c +index 372eef8..1830132 100644 +--- a/modules/stream_out/switcher.c ++++ b/modules/stream_out/switcher.c +@@ -51,12 +51,6 @@ + # include <avcodec.h> + #endif + +-#ifdef HAVE_POSTPROC_POSTPROCESS_H +-# include <postproc/postprocess.h> +-#else +-# include <libpostproc/postprocess.h> +-#endif +- + #include "../codec/avcodec/avcodec.h" + + #define SOUT_CFG_PREFIX "sout-switcher-" +@@ -292,7 +286,9 @@ static int Open( vlc_object_t *p_this ) + p_stream->pf_send = Send; + p_stream->p_sys = p_sys; + ++#if LIBAVCODEC_VERSION_MAJOR < 54 + avcodec_init(); ++#endif + avcodec_register_all(); + + return VLC_SUCCESS; +@@ -355,7 +351,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + return NULL; + } + ++#if LIBAVCODEC_VERSION_MAJOR < 54 + id->ff_enc_c = avcodec_alloc_context(); ++#else ++ id->ff_enc_c = avcodec_alloc_context3( id->ff_enc ); ++#endif + + /* Set CPU capabilities */ + unsigned i_cpu = vlc_CPU(); +@@ -388,7 +388,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) + id->ff_enc_c->bit_rate = p_fmt->i_bitrate; + + vlc_avcodec_lock(); ++#if LIBAVCODEC_VERSION_MAJOR >= 54 ++ if( avcodec_open2( id->ff_enc_c, id->ff_enc, NULL /* options */ ) ) ++#else + if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) ++#endif + { + vlc_avcodec_unlock(); + msg_Err( p_stream, "cannot open encoder" ); +@@ -748,7 +752,11 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) + return 0; + } + ++#if LIBAVCODEC_VERSION_MAJOR < 54 + id->ff_enc_c = avcodec_alloc_context(); ++#else ++ id->ff_enc_c = avcodec_alloc_context3( id->ff_enc ); ++#endif + + /* Set CPU capabilities */ + unsigned i_cpu = vlc_CPU(); +@@ -803,7 +811,11 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) + id->ff_enc_c->pix_fmt = PIX_FMT_YUV420P; + + vlc_avcodec_lock(); ++#if LIBAVCODEC_VERSION_MAJOR >= 54 ++ if( avcodec_open2( id->ff_enc_c, id->ff_enc, NULL /* options */ ) ) ++#else + if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) ++#endif + { + vlc_avcodec_unlock(); + msg_Err( p_stream, "cannot open encoder" ); +@@ -844,7 +856,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, + + if ( id->i_nb_pred >= p_sys->i_gop ) + { +- id->p_frame->pict_type = FF_I_TYPE; ++ id->p_frame->pict_type = AV_PICTURE_TYPE_I; + #if 0 + id->p_frame->me_threshold = 0; + id->p_frame->mb_threshold = 0; +@@ -853,7 +865,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, + } + else + { +- id->p_frame->pict_type = FF_P_TYPE; ++ id->p_frame->pict_type = AV_PICTURE_TYPE_P; + #if 0 + if ( id->p_frame->mb_type != NULL ) + { +@@ -873,7 +885,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, + + #if 0 + if ( id->p_frame->mb_type == NULL +- && id->ff_enc_c->coded_frame->pict_type != FF_I_TYPE ) ++ && id->ff_enc_c->coded_frame->pict_type != AV_PICTURE_TYPE_I ) + { + int mb_width = (id->ff_enc_c->width + 15) / 16; + int mb_height = (id->ff_enc_c->height + 15) / 16; +@@ -926,13 +938,13 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, + + switch ( id->ff_enc_c->coded_frame->pict_type ) + { +- case FF_I_TYPE: ++ case AV_PICTURE_TYPE_I: + p_out->i_flags |= BLOCK_FLAG_TYPE_I; + break; +- case FF_P_TYPE: ++ case AV_PICTURE_TYPE_P: + p_out->i_flags |= BLOCK_FLAG_TYPE_P; + break; +- case FF_B_TYPE: ++ case AV_PICTURE_TYPE_B: + p_out->i_flags |= BLOCK_FLAG_TYPE_B; + break; + default: diff --git a/vlc.spec b/vlc.spec index afeaf13..e5c8780 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,12 +22,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: vlc-2.0.1-fftype.patch +Patch0: vlc-backport-ffmpeg54.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -488,6 +488,9 @@ fi || : %changelog +* Mon Jun 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-2 +- Backport patch for ffmpeg54 + * Wed May 02 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-1 - Update to 2.0.1 From 40bc99fe2a0b7e33d5992e29fca5e3d1d6baa67c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 24 Jun 2012 14:11:25 +0000 Subject: [PATCH 184/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e5c8780..e01d397 100644 --- a/vlc.spec +++ b/vlc.spec @@ -22,7 +22,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Sun Jun 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-3 +- Rebuild for FFmpeg/x264 + * Mon Jun 18 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-2 - Backport patch for ffmpeg54 From 1d4a2af502f7cd2bb22bd78862ab9fa5d8938082 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 29 Jun 2012 09:57:24 +0000 Subject: [PATCH 185/671] Update to 2.0.2 --- .gitignore | 2 +- sources | 2 +- vlc-backport-ffmpeg54.patch | 121 ------------------------------------ vlc.spec | 9 +-- 4 files changed, 7 insertions(+), 127 deletions(-) delete mode 100644 vlc-backport-ffmpeg54.patch diff --git a/.gitignore b/.gitignore index 70026a0..6222163 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.1.tar.xz +vlc-2.0.2.tar.xz diff --git a/sources b/sources index ac4f074..b2626ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5ad114755670e4881a2b35354e2f79bc vlc-2.0.1.tar.xz +93e729cc970a4535b3213dbef0e69528 vlc-2.0.2.tar.xz diff --git a/vlc-backport-ffmpeg54.patch b/vlc-backport-ffmpeg54.patch deleted file mode 100644 index 4a829a7..0000000 --- a/vlc-backport-ffmpeg54.patch +++ /dev/null @@ -1,121 +0,0 @@ -X-Git-Url: http://git.videolan.org/?p=vlc%2Fvlc-2.0.git;a=blobdiff_plain;f=modules%2Fstream_out%2Fswitcher.c;h=18301329e33fe413b3d8f4da18966d6205581274;hp=372eef81c9ae3b9ee5b1405bdd5b7be8254fd3f0;hb=HEAD;hpb=caf2a08a0507ab9e9ae34038854f3f218e820581 - -diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c -index 372eef8..1830132 100644 ---- a/modules/stream_out/switcher.c -+++ b/modules/stream_out/switcher.c -@@ -51,12 +51,6 @@ - # include <avcodec.h> - #endif - --#ifdef HAVE_POSTPROC_POSTPROCESS_H --# include <postproc/postprocess.h> --#else --# include <libpostproc/postprocess.h> --#endif -- - #include "../codec/avcodec/avcodec.h" - - #define SOUT_CFG_PREFIX "sout-switcher-" -@@ -292,7 +286,9 @@ static int Open( vlc_object_t *p_this ) - p_stream->pf_send = Send; - p_stream->p_sys = p_sys; - -+#if LIBAVCODEC_VERSION_MAJOR < 54 - avcodec_init(); -+#endif - avcodec_register_all(); - - return VLC_SUCCESS; -@@ -355,7 +351,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - return NULL; - } - -+#if LIBAVCODEC_VERSION_MAJOR < 54 - id->ff_enc_c = avcodec_alloc_context(); -+#else -+ id->ff_enc_c = avcodec_alloc_context3( id->ff_enc ); -+#endif - - /* Set CPU capabilities */ - unsigned i_cpu = vlc_CPU(); -@@ -388,7 +388,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) - id->ff_enc_c->bit_rate = p_fmt->i_bitrate; - - vlc_avcodec_lock(); -+#if LIBAVCODEC_VERSION_MAJOR >= 54 -+ if( avcodec_open2( id->ff_enc_c, id->ff_enc, NULL /* options */ ) ) -+#else - if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) -+#endif - { - vlc_avcodec_unlock(); - msg_Err( p_stream, "cannot open encoder" ); -@@ -748,7 +752,11 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) - return 0; - } - -+#if LIBAVCODEC_VERSION_MAJOR < 54 - id->ff_enc_c = avcodec_alloc_context(); -+#else -+ id->ff_enc_c = avcodec_alloc_context3( id->ff_enc ); -+#endif - - /* Set CPU capabilities */ - unsigned i_cpu = vlc_CPU(); -@@ -803,7 +811,11 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) - id->ff_enc_c->pix_fmt = PIX_FMT_YUV420P; - - vlc_avcodec_lock(); -+#if LIBAVCODEC_VERSION_MAJOR >= 54 -+ if( avcodec_open2( id->ff_enc_c, id->ff_enc, NULL /* options */ ) ) -+#else - if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) -+#endif - { - vlc_avcodec_unlock(); - msg_Err( p_stream, "cannot open encoder" ); -@@ -844,7 +856,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, - - if ( id->i_nb_pred >= p_sys->i_gop ) - { -- id->p_frame->pict_type = FF_I_TYPE; -+ id->p_frame->pict_type = AV_PICTURE_TYPE_I; - #if 0 - id->p_frame->me_threshold = 0; - id->p_frame->mb_threshold = 0; -@@ -853,7 +865,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, - } - else - { -- id->p_frame->pict_type = FF_P_TYPE; -+ id->p_frame->pict_type = AV_PICTURE_TYPE_P; - #if 0 - if ( id->p_frame->mb_type != NULL ) - { -@@ -873,7 +885,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, - - #if 0 - if ( id->p_frame->mb_type == NULL -- && id->ff_enc_c->coded_frame->pict_type != FF_I_TYPE ) -+ && id->ff_enc_c->coded_frame->pict_type != AV_PICTURE_TYPE_I ) - { - int mb_width = (id->ff_enc_c->width + 15) / 16; - int mb_height = (id->ff_enc_c->height + 15) / 16; -@@ -926,13 +938,13 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, - - switch ( id->ff_enc_c->coded_frame->pict_type ) - { -- case FF_I_TYPE: -+ case AV_PICTURE_TYPE_I: - p_out->i_flags |= BLOCK_FLAG_TYPE_I; - break; -- case FF_P_TYPE: -+ case AV_PICTURE_TYPE_P: - p_out->i_flags |= BLOCK_FLAG_TYPE_P; - break; -- case FF_B_TYPE: -+ case AV_PICTURE_TYPE_B: - p_out->i_flags |= BLOCK_FLAG_TYPE_B; - break; - default: diff --git a/vlc.spec b/vlc.spec index e01d397..0e54c6b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -21,13 +21,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.1 -Release: 3%{?dist} +Version: 2.0.2 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: vlc-backport-ffmpeg54.patch Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -209,7 +208,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%patch0 -p1 %if 0%{?fedora} >= 15 %patch5 -p1 -b .opencv22 %endif @@ -488,6 +486,9 @@ fi || : %changelog +* Thu Jun 28 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-1 +- Update to 2.0.2 + * Sun Jun 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.1-3 - Rebuild for FFmpeg/x264 From 07d030b0910ef10cfb4f390e52a1ff99ca5d7835 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 4 Jul 2012 16:44:29 +0000 Subject: [PATCH 186/671] Rework BR --- vlc-1.1.8-bugfix.opencv22.patch | 12 ------ vlc.spec | 75 +++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 43 deletions(-) delete mode 100644 vlc-1.1.8-bugfix.opencv22.patch diff --git a/vlc-1.1.8-bugfix.opencv22.patch b/vlc-1.1.8-bugfix.opencv22.patch deleted file mode 100644 index b0c911d..0000000 --- a/vlc-1.1.8-bugfix.opencv22.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-1.1.8/modules/video_filter/opencv_example.c.opencv22 vlc-1.1.8/modules/video_filter/opencv_example.c ---- vlc-1.1.8/modules/video_filter/opencv_example.c.opencv22 2010-04-13 02:22:27.000000000 +0200 -+++ vlc-1.1.8/modules/video_filter/opencv_example.c 2011-03-23 10:47:05.053097995 +0100 -@@ -191,7 +191,7 @@ static picture_t *Filter( filter_t *p_fi - 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) ); -+ cvSize(0, 0), cvSize(0, 0) ); - //create the video_filter_region_info_t struct - if (faces && (faces->total > 0)) - { diff --git a/vlc.spec b/vlc.spec index 0e54c6b..1f3f0ae 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global vlc_rc -rc1 -%global _with_bootstrap 1 +#global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec @@ -15,19 +15,24 @@ %global _with_xvidcore --with-xvidcore %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi -%global _without_opencv 1 +%endif +%if 0%{?fedora} +%global _with_fluidsyth 1 +%global _with_bluray 1 +%global _with_crystalhd 1 +%global _with_projectm 1 +%global _with_schroedinger 1 %endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch5: vlc-1.1.8-bugfix.opencv22.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -51,7 +56,7 @@ BuildRequires: dirac-devel >= 1.0.0 %{?_with_faad2:BuildRequires: faad2-devel} %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel -BuildRequires: fluidsynth-devel +%{?_with_fluidsynth:BuildRequires: fluidsynth-devel} BuildRequires: fribidi-devel %{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 @@ -61,11 +66,11 @@ BuildRequires: kde-filesystem BuildRequires: game-music-emu-devel BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 -BuildRequires: libbluray-devel +%{?_with_bluray:BuildRequires: libbluray-devel >= 0.2.1} BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 -BuildRequires: libcrystalhd-devel +%{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: libdc1394-devel >= 2.1.0 %{?_with_libdca:BuildRequires: libdca-devel} BuildRequires: libdv-devel @@ -80,10 +85,9 @@ BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmtp-devel >= 1.0.0 -BuildRequires: libprojectM-qt-devel +%{?_with_projectm:BuildRequires: libprojectM-qt-devel} BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 -BuildRequires: librtmp-devel BuildRequires: libssh2-devel BuildRequires: libsysfs-devel BuildRequires: libshout-devel @@ -99,7 +103,7 @@ BuildRequires: libv4l-devel BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel -%{?_with_live555:BuildRequires: live555-devel >= 0-0.33.2011.12.23} +%{?_with_live555:BuildRequires: live555-devel >= 0-0.33} BuildRequires: kernel-headers BuildRequires: libGL-devel BuildRequires: libGLU-devel @@ -110,15 +114,16 @@ BuildRequires: lua-devel BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel -%{!?_without_opencv:BuildRequires: opencv-devel} +%{?_with_opencv:BuildRequires: opencv-devel} BuildRequires: openslp-devel BuildRequires: pcre-devel BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel BuildRequires: qt4-devel >= 4.5.2 -BuildRequires: schroedinger-devel +%{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel BuildRequires: SDL_image-devel +%{?_with_sidplay:BuildRequires: sidplay-libs-devel} BuildRequires: speex-devel >= 1.1.5 BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} @@ -146,13 +151,9 @@ Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} Requires: kde-filesystem -%if 0%{?fedora} > 10 || 0%{?rhel} > 5 Requires: dejavu-sans-fonts Requires: dejavu-sans-mono-fonts Requires: dejavu-serif-fonts -%else -Requires: dejavu-fonts -%endif Requires: qt4%{?_isa} >= %{_qt4_version} #For xdg-sreensaver @@ -208,9 +209,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%if 0%{?fedora} >= 15 -%patch5 -p1 -b .opencv22 -%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -227,15 +225,13 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --disable-rpath \ --with-binary-version=%{version} \ --with-tuning=no \ -%if 0%{?fedora} > 14 --disable-notify \ -%endif --with-kde-solid=%{_kde4_appsdir}/solid/actions \ %{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ - --enable-live555 \ +%{?_with_live555:--enable-live555} \ --enable-dv \ -%{!?_without_opencv:--enable-opencv} \ +%{?_with_opencv:--enable-opencv} \ --enable-sftp \ --enable-pvr \ %{?_with_gnomevfs:--enable-gnomevfs} \ @@ -259,7 +255,8 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-dirac \ --enable-libass \ --enable-shout \ - --enable-xcb \ +%{?_with_xcb:--enable-xcb --enable-xvideo} \ +%{!?_with_xcb:--disable-xcb --disable-xvideo} \ --enable-svg \ %{!?_without_directfb:--enable-directfb} \ --enable-aa \ @@ -391,19 +388,23 @@ fi || : %{?_with_gnomevfs: %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } +%{_libdir}/vlc/plugins/video_output/libaa_plugin.so +%{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%{?_with_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %if 0%{?fedora} < 17 %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %endif -%{_libdir}/vlc/plugins/video_output/libaa_plugin.so -%{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +} +%{_libdir}/vlc/plugins/gui/libskins2_plugin.so +%{?_with_projectm: %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so +} %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %files core -f %{name}.lang @@ -421,13 +422,16 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so -%exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{?_with_vcdimager: %exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so %exclude %{_libdir}/vlc/plugins/access/libvcdx_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libsvcdsub_plugin.so } +%{?_with_fluidsynth: %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +} +%{?_with_xcb: +%exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %if 0%{?fedora} < 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %endif @@ -437,16 +441,19 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +%exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +} %{!?_without_directfb: %exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so -%{!?_without_opencv: +%{?_with_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so } -%exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +%{?_with_projectm: %exclude %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so +} %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so @@ -458,14 +465,16 @@ fi || : %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so +%{?_with_fluidsynth: %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +} %files extras %defattr(-,root,root,-) %{!?_without_directfb: %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so } -%{!?_without_opencv: +%{?_with_opencv: %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so } @@ -486,6 +495,10 @@ fi || : %changelog +* Wed Jul 04 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-2 +- Rework BR and RPM conditionals +- Drop support for anything below EL-6 and current Fedora. + * Thu Jun 28 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-1 - Update to 2.0.2 From 475076c204d5ec6349e457faf3ca0667bb7e3ec3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 11 Jul 2012 18:26:16 +0000 Subject: [PATCH 187/671] Switch to pkgconfig(libudev) --- vlc-2.0.2-xcb_discard.patch | 15 +++++++++++++++ vlc.spec | 23 ++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 vlc-2.0.2-xcb_discard.patch diff --git a/vlc-2.0.2-xcb_discard.patch b/vlc-2.0.2-xcb_discard.patch new file mode 100644 index 0000000..aca164f --- /dev/null +++ b/vlc-2.0.2-xcb_discard.patch @@ -0,0 +1,15 @@ +diff -up vlc-2.0.2/modules/access/screen/xcb.c.discard vlc-2.0.2/modules/access/screen/xcb.c +--- vlc-2.0.2/modules/access/screen/xcb.c.discard 2011-12-08 19:00:26.000000000 +0100 ++++ vlc-2.0.2/modules/access/screen/xcb.c 2012-07-11 15:07:43.092366202 +0200 +@@ -319,7 +319,11 @@ static void Demux (void *data) + msg_Err (demux, "bad X11 drawable 0x%08"PRIx32, sys->window); + discard: + if (sys->follow_mouse) ++#if 0 + xcb_discard_reply (conn, gc.sequence); ++#else ++ msg_Warn (demux, "xcb_discard_reply not available in libxcb < 1.6") ; ++#endif + return; + } + diff --git a/vlc.spec b/vlc.spec index 1f3f0ae..3adf734 100644 --- a/vlc.spec +++ b/vlc.spec @@ -15,6 +15,7 @@ %global _with_xvidcore --with-xvidcore %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi +%global _with_xcb 1 %endif %if 0%{?fedora} %global _with_fluidsyth 1 @@ -28,11 +29,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +Patch0: vlc-2.0.2-xcb_discard.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -96,7 +98,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel -BuildRequires: libudev-devel >= 142 +BuildRequires: pkgconfig(libudev) BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} @@ -140,7 +142,10 @@ BuildRequires: libXxf86vm-devel BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -BuildRequires: xcb-util-devel +%{?_with_xcb: +BuildRequires: libxcb-devel +BuildRequires: xcb-util-devel +} BuildRequires: xorg-x11-proto-devel @@ -210,6 +215,14 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} +%if 0%{?rhel} +%patch0 -p1 -b .xcb_discard +%{?_with_xcb: +sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac +touch -r config.h.in configure configure.ac +} +%endif + %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -495,6 +508,10 @@ fi || : %changelog +* Wed Jul 11 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-3 +- Fix build of xcb +- Switch to pkgconfig(libudev) + * Wed Jul 04 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-2 - Rework BR and RPM conditionals - Drop support for anything below EL-6 and current Fedora. From 086720ec4a44fd0c954ac26ab464ee7da0e7d7be Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 20 Jul 2012 20:07:24 +0000 Subject: [PATCH 188/671] Update to 2.0.3 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6222163..95b6805 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.2.tar.xz +vlc-2.0.3.tar.xz diff --git a/sources b/sources index b2626ca..9b3e588 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -93e729cc970a4535b3213dbef0e69528 vlc-2.0.2.tar.xz +a7e79565e3df07dcf9abc6cad3ac26bb vlc-2.0.3.tar.xz diff --git a/vlc.spec b/vlc.spec index 3adf734..6e2a425 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,8 +28,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.2 -Release: 3%{?dist} +Version: 2.0.3 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -508,6 +508,9 @@ fi || : %changelog +* Fri Jul 20 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-1 +- Update to 2.0.3 + * Wed Jul 11 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.2-3 - Fix build of xcb - Switch to pkgconfig(libudev) From 4d3285b2c7acf2101f8c36c6f7ba219f0a3e3ff9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 21 Jul 2012 10:49:56 +0000 Subject: [PATCH 189/671] Only supported on x86_64 i686 for now --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 6e2a425..9c3a614 100644 --- a/vlc.spec +++ b/vlc.spec @@ -20,7 +20,9 @@ %if 0%{?fedora} %global _with_fluidsyth 1 %global _with_bluray 1 +%ifarch x86_64 i686 %global _with_crystalhd 1 +%endif %global _with_projectm 1 %global _with_schroedinger 1 %endif From 064ac8a152f18429d4383fc98d6f35b424e29ebb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 5 Sep 2012 22:18:54 +0000 Subject: [PATCH 190/671] * Wed Sep 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-2 - Rebuilt for x264 ABI 125 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9c3a614..61ee8d7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -510,6 +510,9 @@ fi || : %changelog +* Wed Sep 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-2 +- Rebuilt for x264 ABI 125 + * Fri Jul 20 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-1 - Update to 2.0.3 From 9293be8558f8d54dc3f0d21fa53c50cc89f0c335 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 26 Sep 2012 22:13:56 +0000 Subject: [PATCH 191/671] Fix typo --- vlc.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 61ee8d7..54202ff 100644 --- a/vlc.spec +++ b/vlc.spec @@ -18,7 +18,7 @@ %global _with_xcb 1 %endif %if 0%{?fedora} -%global _with_fluidsyth 1 +%global _with_fluidsynth 1 %global _with_bluray 1 %ifarch x86_64 i686 %global _with_crystalhd 1 @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -127,7 +127,7 @@ BuildRequires: qt4-devel >= 4.5.2 %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel BuildRequires: SDL_image-devel -%{?_with_sidplay:BuildRequires: sidplay-libs-devel} +%{?_with_sidplay:BuildRequires: pkgconfig(libsidplay2)} BuildRequires: speex-devel >= 1.1.5 BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} @@ -147,6 +147,7 @@ BuildRequires: libXpm-devel %{?_with_xcb: BuildRequires: libxcb-devel BuildRequires: xcb-util-devel +BuildRequires: pkgconfig(xcb-keysyms) } BuildRequires: xorg-x11-proto-devel @@ -510,6 +511,9 @@ fi || : %changelog +* Wed Sep 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-3 +- Fix --with fluidsynth typo + * Wed Sep 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-2 - Rebuilt for x264 ABI 125 From 647026a736b3584de26dd339296ad802f1a72d56 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Oct 2012 14:41:57 +0000 Subject: [PATCH 192/671] Update to 2.0.4 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 95b6805..df74552 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.3.tar.xz +vlc-2.0.4.tar.xz diff --git a/sources b/sources index 9b3e588..53da35f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7e79565e3df07dcf9abc6cad3ac26bb vlc-2.0.3.tar.xz +f36dab8f126922c56b372388b7fade47 vlc-2.0.4.tar.xz diff --git a/vlc.spec b/vlc.spec index 54202ff..5ae7faf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,8 +30,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.3 -Release: 3%{?dist} +Version: 2.0.4 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -511,6 +511,9 @@ fi || : %changelog +* Fri Oct 19 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-1 +- Update to 2.0.4 + * Wed Sep 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-3 - Fix --with fluidsynth typo From 0afb7a1b3c8603ca038b4b3a5e946e67799a415e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Oct 2012 21:19:01 +0000 Subject: [PATCH 193/671] Enable opus --- vlc-2.0.4-cache.patch | 12 ++++++++++++ vlc.spec | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 vlc-2.0.4-cache.patch diff --git a/vlc-2.0.4-cache.patch b/vlc-2.0.4-cache.patch new file mode 100644 index 0000000..84e66e8 --- /dev/null +++ b/vlc-2.0.4-cache.patch @@ -0,0 +1,12 @@ +diff -up vlc-2.0.4/bin/Makefile.am.cache vlc-2.0.4/bin/Makefile.am +--- vlc-2.0.4/bin/Makefile.am.cache 2011-12-08 19:00:25.000000000 +0100 ++++ vlc-2.0.4/bin/Makefile.am 2012-10-19 23:14:23.302736639 +0200 +@@ -80,7 +80,5 @@ MOSTLYCLEANFILES = $(noinst_DATA) + ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) + $(AM_V_at)rm -f ../modules/plugins.dat + $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ +- ./vlc-cache-gen$(EXEEXT) ../modules ; \ +- else \ +- echo "Cross-compilation: cache generation skipped!" ; \ ++ echo "Builder compilation: cache generation skipped!" ; \ + fi diff --git a/vlc.spec b/vlc.spec index 5ae7faf..6e6ad9c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global vlc_rc -rc1 -#global _with_bootstrap 1 +%global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec @@ -37,6 +37,7 @@ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-2.0.2-xcb_discard.patch +Patch1: vlc-2.0.4-cache.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -120,6 +121,7 @@ BuildRequires: minizip-devel BuildRequires: ncurses-devel %{?_with_opencv:BuildRequires: opencv-devel} BuildRequires: openslp-devel +Buildrequires: opus-devel BuildRequires: pcre-devel BuildRequires: pulseaudio-libs-devel >= 0.9.8 BuildRequires: portaudio-devel @@ -225,6 +227,7 @@ sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac touch -r config.h.in configure configure.ac } %endif +%patch1 -p1 -b .vlc_cache %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -283,14 +286,14 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-ncurses \ --enable-fbosd \ --enable-lirc \ -%ifarch %{ix86} +%if 0 --enable-loader \ %else --without-contrib \ %endif -%if 0 +%if 1 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -513,6 +516,9 @@ fi || : %changelog * Fri Oct 19 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-1 - Update to 2.0.4 +- Enable opus +- Disable x86 loader +- Avoid rpath * Wed Sep 26 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.3-3 - Fix --with fluidsynth typo From 79cc8ad0d146554d0b7b72b79b613ef3590d13a1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Oct 2012 21:30:27 +0000 Subject: [PATCH 194/671] Fix loader --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6e6ad9c..5cc7c40 100644 --- a/vlc.spec +++ b/vlc.spec @@ -331,7 +331,7 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Clear execstak %ifarch %{ix86} -execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so +#execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/librealvideo_plugin.so %endif From 12e5811802e4a3a52a9f26db985631ef6d827d9d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Nov 2012 08:17:23 +0000 Subject: [PATCH 195/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5cc7c40..e803c55 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -514,6 +514,9 @@ fi || : %changelog +* Fri Nov 23 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-2 +- Rebuilt for x264 + * Fri Oct 19 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-1 - Update to 2.0.4 - Enable opus From 3177bf18e1b09fb36758b77c8b6ca1f9b01fc6f4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 24 Nov 2012 17:12:44 +0000 Subject: [PATCH 196/671] Rebuilt for kernel 3.7 --- vlc-backport-dvb58.patch | 29 +++++++++++++++++++++++++++++ vlc.spec | 9 +++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 vlc-backport-dvb58.patch diff --git a/vlc-backport-dvb58.patch b/vlc-backport-dvb58.patch new file mode 100644 index 0000000..0843778 --- /dev/null +++ b/vlc-backport-dvb58.patch @@ -0,0 +1,29 @@ +commit a1f6bd08356a7ab76655a54362511db6e54646c9 +Author: Rémi Denis-Courmont <remi@remlab.net> +Date: Sat Nov 24 17:49:43 2012 +0200 + + dtv: fix compilation with Linux 3.7 / DVB >= 5.8 (fixes #7763) + + (cherry picked from commit cd1e58d9d37bc97bd4981faaa075e9d13c75bc3b) + + Conflicts: + modules/access/dtv/linux.c + +diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c +index b349365..bf4215c 100644 +--- a/modules/access/dtv/linux.c ++++ b/modules/access/dtv/linux.c +@@ -917,7 +917,12 @@ int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id) + return -1; + return dvb_set_props (d, 5, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ISDBS, + DTV_FREQUENCY, freq, +- DTV_ISDBS_TS_ID, (uint32_t)ts_id); ++#if DVBv5(8) ++ DTV_STREAM_ID, ++#else ++ DTV_ISDBS_TS_ID, ++#endif ++ (uint32_t)ts_id); + #else + # warning ISDB-S needs Linux DVB version 5.1 or later. + msg_Err (d->obj, "ISDB-S support not compiled-in"); diff --git a/vlc.spec b/vlc.spec index e803c55..750e173 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,13 +31,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-2.0.2-xcb_discard.patch Patch1: vlc-2.0.4-cache.patch +Patch2: vlc-backport-dvb58.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -228,6 +229,7 @@ touch -r config.h.in configure configure.ac } %endif %patch1 -p1 -b .vlc_cache +%patch2 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -293,7 +295,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %endif -%if 1 +%if 0 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -514,6 +516,9 @@ fi || : %changelog +* Sat Nov 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-3 +- Fix build with kernel-3.7 + * Fri Nov 23 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-2 - Rebuilt for x264 From 8db4d0e017dc6f80188af06c01ca29d32ae6eb9b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 14 Dec 2012 22:46:57 +0000 Subject: [PATCH 197/671] Update to 2.0.5 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index df74552..6cc3654 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.4.tar.xz +vlc-2.0.5.tar.xz diff --git a/sources b/sources index 53da35f..b0e0e65 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f36dab8f126922c56b372388b7fade47 vlc-2.0.4.tar.xz +4f959c0766ada8cea5a72c65fce94ebe vlc-2.0.5.tar.xz diff --git a/vlc.spec b/vlc.spec index 750e173..9af7463 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,15 +30,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.4 -Release: 3%{?dist} +Version: 2.0.5 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-2.0.2-xcb_discard.patch -Patch1: vlc-2.0.4-cache.patch -Patch2: vlc-backport-dvb58.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -228,8 +226,6 @@ sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac touch -r config.h.in configure configure.ac } %endif -%patch1 -p1 -b .vlc_cache -%patch2 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -516,6 +512,9 @@ fi || : %changelog +* Fri Dec 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-1 +- Update to 2.0.5 + * Sat Nov 24 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.4-3 - Fix build with kernel-3.7 From 26346ef7c75c7edb1c3b40c3c3442f3092a99ba3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 1 Jan 2013 21:59:56 +0000 Subject: [PATCH 198/671] Fix date --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9af7463..f093267 100644 --- a/vlc.spec +++ b/vlc.spec @@ -736,7 +736,7 @@ fi || : - Update bugfix to 20091025 - Clean dc1394 sub-package -* Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 +* Fri Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 - Update to 1.0-bugfix 20091016 - Rebuild for x264/ffmpeg @@ -1159,7 +1159,7 @@ Security updates: - Test Updated static live555 to 2007.02.22 - Clean up svn to release changes -* Tue Mar 22 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.4 +* Thu Mar 22 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.4 - WIP changes - ld.conf is unusefull... * Wed Mar 21 2007 kwizart < kwizart at gmail.com > - 0.8.6a-4.3 From 45cb4a97da3f7ca5e6cfbaaaae20b8bfc7aa0bc5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Jan 2013 18:27:06 +0000 Subject: [PATCH 199/671] Fix build with recent FLAC --- ...Fix-build-with-unreleased-FLAC-1.3.x.patch | 36 +++++++++++++++++++ vlc.spec | 9 +++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-build-with-unreleased-FLAC-1.3.x.patch diff --git a/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch b/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch new file mode 100644 index 0000000..fc4a026 --- /dev/null +++ b/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch @@ -0,0 +1,36 @@ +From 606908a31b2dae46899601fe88b6443d024c8d09 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Wed, 2 Jan 2013 19:05:27 +0100 +Subject: [PATCH] Fix build with unreleased FLAC 1.3.x + +The issue was initialy reported here: +http://bugzilla.redhat.com/891123 + +FLAC upstream has always expected to include headers as +as shown in examples/c/decode/file/main.c + +The FLAC suffix will not be be made available in the flac.pc +for the next release: +http://lists.xiph.org/pipermail/flac-dev/2012-April/003355.html +--- + modules/codec/flac.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/codec/flac.c b/modules/codec/flac.c +index 4cfbfa9..543e8bb 100644 +--- a/modules/codec/flac.c ++++ b/modules/codec/flac.c +@@ -37,8 +37,8 @@ + #include <vlc_plugin.h> + #include <vlc_codec.h> + +-#include <stream_decoder.h> +-#include <stream_encoder.h> ++#include <FLAC/stream_decoder.h> ++#include <FLAC/stream_encoder.h> + + #include <vlc_block_helper.h> + #include <vlc_bits.h> +-- +1.7.11.7 + diff --git a/vlc.spec b/vlc.spec index f093267..186de35 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,12 +31,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-2.0.2-xcb_discard.patch +Patch1: 0001-Fix-build-with-unreleased-FLAC-1.3.x.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -220,7 +221,8 @@ JACK audio plugin for the VLC media player. %setup -q -n %{name}-%{version}%{?vlc_rc} %if 0%{?rhel} -%patch0 -p1 -b .xcb_discard +%patch0 -p1 -b .xcb_discard +%patch1 -p1 -b .FLAC13 %{?_with_xcb: sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac touch -r config.h.in configure configure.ac @@ -512,6 +514,9 @@ fi || : %changelog +* Wed Jan 02 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-2 +- Fix build with FLAC-1.3.x + * Fri Dec 14 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-1 - Update to 2.0.5 From 4f36a6ae4848394232ce5157a06033420d8177fc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Jan 2013 19:46:12 +0000 Subject: [PATCH 200/671] Replace the FLAC patch --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 186de35..3b11608 100644 --- a/vlc.spec +++ b/vlc.spec @@ -222,12 +222,12 @@ JACK audio plugin for the VLC media player. %if 0%{?rhel} %patch0 -p1 -b .xcb_discard -%patch1 -p1 -b .FLAC13 %{?_with_xcb: sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac touch -r config.h.in configure configure.ac } %endif +%patch1 -p1 -b .FLAC13 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From 0ae79b146866fea6f2f58b8b282e2acfcdeaaf23 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Jan 2013 19:51:59 +0000 Subject: [PATCH 201/671] This patch will apply on 2.0-bugfix --- ...Fix-build-with-unreleased-FLAC-1.3.x.patch | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch b/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch index fc4a026..c33baec 100644 --- a/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch +++ b/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch @@ -1,28 +1,9 @@ -From 606908a31b2dae46899601fe88b6443d024c8d09 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Wed, 2 Jan 2013 19:05:27 +0100 -Subject: [PATCH] Fix build with unreleased FLAC 1.3.x - -The issue was initialy reported here: -http://bugzilla.redhat.com/891123 - -FLAC upstream has always expected to include headers as -as shown in examples/c/decode/file/main.c - -The FLAC suffix will not be be made available in the flac.pc -for the next release: -http://lists.xiph.org/pipermail/flac-dev/2012-April/003355.html ---- - modules/codec/flac.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/codec/flac.c b/modules/codec/flac.c -index 4cfbfa9..543e8bb 100644 ---- a/modules/codec/flac.c -+++ b/modules/codec/flac.c -@@ -37,8 +37,8 @@ - #include <vlc_plugin.h> +diff -up vlc-2.0.5/modules/codec/flac.c.FLAC13 vlc-2.0.5/modules/codec/flac.c +--- vlc-2.0.5/modules/codec/flac.c.FLAC13 2011-12-08 19:00:26.000000000 +0100 ++++ vlc-2.0.5/modules/codec/flac.c 2013-01-02 20:48:33.569532663 +0100 +@@ -38,8 +38,8 @@ #include <vlc_codec.h> + #include <vlc_aout.h> -#include <stream_decoder.h> -#include <stream_encoder.h> @@ -31,6 +12,3 @@ index 4cfbfa9..543e8bb 100644 #include <vlc_block_helper.h> #include <vlc_bits.h> --- -1.7.11.7 - From 9f353848366c4c6c5f31421c32c9f442a4d2bdef Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 20 Jan 2013 22:11:49 +0000 Subject: [PATCH 202/671] * Sun Jan 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-3 - Rebuilt for ffmpeg/x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3b11608..5d6cd46 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -514,6 +514,9 @@ fi || : %changelog +* Sun Jan 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-3 +- Rebuilt for ffmpeg/x264 + * Wed Jan 02 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-2 - Fix build with FLAC-1.3.x From 3ce68e8b3c981cec5868df4f8a3d207557d33d0f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 30 Jan 2013 08:04:03 +0000 Subject: [PATCH 203/671] Add new live555 requirement --- vlc.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5d6cd46..699f8ac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -194,7 +194,10 @@ Summary: VLC media player core Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 +#Deprecated since F-19, can be dropped by F-21/EL-7 %{?live555date:Requires: live555date%{_isa} = %{live555date}} +#Introduced in F-19 +%{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %description core VLC media player core components @@ -514,6 +517,9 @@ fi || : %changelog +* Wed Jan 30 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-4 +- Add new live555 requires + * Sun Jan 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-3 - Rebuilt for ffmpeg/x264 From 93e32d00af4b5650018785f21c287e1900e28225 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 23 Feb 2013 16:25:55 +0000 Subject: [PATCH 204/671] Add patch to fix smb detection --- ...-of-smbclient-from-header-to-pkgconf.patch | 43 +++++++++++++++++++ vlc.spec | 7 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch diff --git a/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch b/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch new file mode 100644 index 0000000..fbd933a --- /dev/null +++ b/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch @@ -0,0 +1,43 @@ +From 9cbe32f2d9542a4a8d17a0828c1a7c0046397f57 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Sat, 23 Feb 2013 16:39:23 +0100 +Subject: [PATCH] Switch detection of smbclient from header to pkgconfig + +--- + configure.ac | 5 +++-- + modules/access/Modules.am | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 65377ac..6c634f2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1874,9 +1874,10 @@ dnl + AC_ARG_ENABLE(smb, + [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])]) + if test "${enable_smb}" != "no"; then +- AC_CHECK_HEADERS(libsmbclient.h, ++ PKG_CHECK_MODULES(SMBCLIENT, smbclient, + [ VLC_ADD_PLUGIN([access_smb]) +- VLC_ADD_LIBS([access_smb],[-lsmbclient]) ], ++ VLC_ADD_CFLAGS([access_smb],[$SMBCLIENT_CFLAGS]) ++ VLC_ADD_LIBS([access_smb],[$SMBCLIENT_LIBS])], + [ if test -n "${enable_smb}"; then + AC_MSG_ERROR([cannot find libsmbclient headers]) + fi ]) +diff --git a/modules/access/Modules.am b/modules/access/Modules.am +index ff6047e..c06c89b 100644 +--- a/modules/access/Modules.am ++++ b/modules/access/Modules.am +@@ -35,7 +35,7 @@ libsdp_plugin_la_LIBADD = $(AM_LIBADD) + libsdp_plugin_la_DEPENDENCIES = + + libaccess_smb_plugin_la_SOURCES = smb.c +-libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) ++libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_access_smb) + libaccess_smb_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_access_smb) + if HAVE_WIN32 + libaccess_smb_plugin_la_LIBADD += -lmpr +-- +1.7.11.7 + diff --git a/vlc.spec b/vlc.spec index 699f8ac..8141923 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,13 +31,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-2.0.2-xcb_discard.patch Patch1: 0001-Fix-build-with-unreleased-FLAC-1.3.x.patch +Patch2: 0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -231,6 +232,7 @@ touch -r config.h.in configure configure.ac } %endif %patch1 -p1 -b .FLAC13 +%patch2 -p1 -b .samba4 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -517,6 +519,9 @@ fi || : %changelog +* Sat Feb 23 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-5 +- Fix samba4 detection rfbz#2659 + * Wed Jan 30 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-4 - Add new live555 requires From 559c8cefafd95a19b6b37a570776895a499a3e8f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 26 Mar 2013 20:54:03 +0000 Subject: [PATCH 205/671] Rebuilt for libmatroska --- vlc.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8141923..644daaf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -343,6 +343,11 @@ execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/librealvideo_plugin.so #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc +#Workaround config file provided in %%{_datadir} +#https://bugzilla.rpmfusion.org/show_bug.cgi?id=2726 +mv $RPM_BUILD_ROOT%{_datadir}/vlc/lua/http/.hosts \ + $RPM_BUILD_ROOT%{_datadir}/vlc/lua/http/hosts-sample + %find_lang %{name} @@ -519,6 +524,10 @@ fi || : %changelog +* Tue Mar 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-6 +- Move %%{_datadir}/vlc/lua/http/.hosts to hosts-sample to avoid + config file - https://bugzilla.rpmfusion.org/2726 + * Sat Feb 23 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-5 - Fix samba4 detection rfbz#2659 From 3eded0f058ff7959a5dc88943437ebadd7cff4e2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 26 Mar 2013 20:54:52 +0000 Subject: [PATCH 206/671] Remove unused patch --- vlc-backport-dvb58.patch | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 vlc-backport-dvb58.patch diff --git a/vlc-backport-dvb58.patch b/vlc-backport-dvb58.patch deleted file mode 100644 index 0843778..0000000 --- a/vlc-backport-dvb58.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit a1f6bd08356a7ab76655a54362511db6e54646c9 -Author: Rémi Denis-Courmont <remi@remlab.net> -Date: Sat Nov 24 17:49:43 2012 +0200 - - dtv: fix compilation with Linux 3.7 / DVB >= 5.8 (fixes #7763) - - (cherry picked from commit cd1e58d9d37bc97bd4981faaa075e9d13c75bc3b) - - Conflicts: - modules/access/dtv/linux.c - -diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c -index b349365..bf4215c 100644 ---- a/modules/access/dtv/linux.c -+++ b/modules/access/dtv/linux.c -@@ -917,7 +917,12 @@ int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id) - return -1; - return dvb_set_props (d, 5, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ISDBS, - DTV_FREQUENCY, freq, -- DTV_ISDBS_TS_ID, (uint32_t)ts_id); -+#if DVBv5(8) -+ DTV_STREAM_ID, -+#else -+ DTV_ISDBS_TS_ID, -+#endif -+ (uint32_t)ts_id); - #else - # warning ISDB-S needs Linux DVB version 5.1 or later. - msg_Err (d->obj, "ISDB-S support not compiled-in"); From a809eb56e98eecb149c2d462b0052cfe584800ae Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 7 May 2013 15:16:53 +0000 Subject: [PATCH 207/671] Sync with F-19 and rebuilt --- sources | 2 +- vlc.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b0e0e65..324bdab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4f959c0766ada8cea5a72c65fce94ebe vlc-2.0.5.tar.xz +b45be633c71dca04ca7d6c3d64dd728b vlc-2.0.6.tar.xz diff --git a/vlc.spec b/vlc.spec index 644daaf..6fb4be7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,8 +30,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.5 -Release: 6%{?dist} +Version: 2.0.6 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -245,6 +245,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %configure \ --disable-dependency-tracking \ + --disable-silent-rules \ --with-pic \ --disable-rpath \ --with-binary-version=%{version} \ @@ -524,6 +525,9 @@ fi || : %changelog +* Mon Apr 08 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.6-1 +- Update to 2.0.6 + * Tue Mar 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.5-6 - Move %%{_datadir}/vlc/lua/http/.hosts to hosts-sample to avoid config file - https://bugzilla.rpmfusion.org/2726 From 0dbf01afa9dc20fd100ddb33509e36d01b154796 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 19 Jun 2013 06:21:28 +0000 Subject: [PATCH 208/671] Update to 2.1.x pre1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 62 ++++++++++++++---------------------------------------- 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 6cc3654..6816da0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.0.5.tar.xz +vlc-2.1.0-pre1.tar.xz diff --git a/sources b/sources index 324bdab..5a49a7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b45be633c71dca04ca7d6c3d64dd728b vlc-2.0.6.tar.xz +e500407f9acbbcaf771e5a98229e618b vlc-2.1.0-pre1.tar.xz diff --git a/vlc.spec b/vlc.spec index 6fb4be7..cb0a247 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -#global vlc_rc -rc1 +%global vlc_rc -pre1 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -10,12 +10,10 @@ %global _with_libmad --with-libmad %global _with_libmpeg2 --with-libmpeg2 %global _with_twolame --with-twolame -%global _with_vcdimager --with-vcdimager %global _with_x264 --with-x264 %global _with_xvidcore --with-xvidcore %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi -%global _with_xcb 1 %endif %if 0%{?fedora} %global _with_fluidsynth 1 @@ -30,15 +28,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.0.6 -Release: 1%{?dist} +Version: 2.1.0 +Release: 0.pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: vlc-2.0.2-xcb_discard.patch -Patch1: 0001-Fix-build-with-unreleased-FLAC-1.3.x.patch -Patch2: 0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -63,6 +58,7 @@ BuildRequires: dirac-devel >= 1.0.0 %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} +BuildRequires: freerdp-devel BuildRequires: fribidi-devel %{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 @@ -106,6 +102,7 @@ BuildRequires: pkgconfig(libudev) BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} +BuildRequires: pkgconfig(vdpau) BuildRequires: libvorbis-devel BuildRequires: libxml2-devel BuildRequires: lirc-devel @@ -125,7 +122,6 @@ BuildRequires: openslp-devel Buildrequires: opus-devel BuildRequires: pcre-devel BuildRequires: pulseaudio-libs-devel >= 0.9.8 -BuildRequires: portaudio-devel BuildRequires: qt4-devel >= 4.5.2 %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel @@ -147,7 +143,7 @@ BuildRequires: libXxf86vm-devel BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -%{?_with_xcb: +%{!?_without_xcb: BuildRequires: libxcb-devel BuildRequires: xcb-util-devel BuildRequires: pkgconfig(xcb-keysyms) @@ -224,16 +220,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%if 0%{?rhel} -%patch0 -p1 -b .xcb_discard -%{?_with_xcb: -sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac -touch -r config.h.in configure configure.ac -} -%endif -%patch1 -p1 -b .FLAC13 -%patch2 -p1 -b .samba4 - %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -249,16 +235,11 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --with-pic \ --disable-rpath \ --with-binary-version=%{version} \ - --with-tuning=no \ - --disable-notify \ --with-kde-solid=%{_kde4_appsdir}/solid/actions \ -%{?_with_ffmpeg:--enable-switcher} \ --enable-lua \ %{?_with_live555:--enable-live555} \ - --enable-dv \ %{?_with_opencv:--enable-opencv} \ --enable-sftp \ - --enable-pvr \ %{?_with_gnomevfs:--enable-gnomevfs} \ %{?_with_vcdimager:--enable-vcdx} \ %if 0 @@ -266,13 +247,17 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_freeworld:--enable-shine} \ %endif --enable-omxil \ +%ifarch armv5tel armv6l armv6hl + --enable-omxil-vout \ + --enable-rpi-omxil \ +%endif %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ --disable-swscale --disable-postproc} \ %{?_with_faad2:--enable-faad} \ %{!?_with_libmad:--disable-mad} \ %{?_with_twolame:--enable-twolame} \ -%{?!_without_freeworld:--enable-real --enable-realrtsp} \ +%{?!_without_freeworld: --enable-realrtsp} \ --enable-flac \ --enable-tremor \ --enable-speex \ @@ -280,23 +265,16 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-dirac \ --enable-libass \ --enable-shout \ -%{?_with_xcb:--enable-xcb --enable-xvideo} \ -%{!?_with_xcb:--disable-xcb --disable-xvideo} \ +%{!?_without_xcb:--enable-xcb --enable-xvideo} \ +%{?_without_xcb:--disable-xcb --disable-xvideo} \ --enable-svg \ %{!?_without_directfb:--enable-directfb} \ --enable-aa \ --enable-caca \ --enable-jack \ - --enable-portaudio \ --enable-pulse \ --enable-ncurses \ - --enable-fbosd \ - --enable-lirc \ -%if 0 - --enable-loader \ -%else - --without-contrib \ -%endif + --enable-lirc %if 0 @@ -337,18 +315,12 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Clear execstak %ifarch %{ix86} -#execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/libdmo_plugin.so execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/librealvideo_plugin.so %endif #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc -#Workaround config file provided in %%{_datadir} -#https://bugzilla.rpmfusion.org/show_bug.cgi?id=2726 -mv $RPM_BUILD_ROOT%{_datadir}/vlc/lua/http/.hosts \ - $RPM_BUILD_ROOT%{_datadir}/vlc/lua/http/hosts-sample - %find_lang %{name} @@ -420,7 +392,7 @@ fi || : } %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so -%{?_with_xcb: +%{!?_without_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %if 0%{?fedora} < 17 %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so @@ -460,7 +432,7 @@ fi || : %{?_with_fluidsynth: %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } -%{?_with_xcb: +%{!?_without_xcb: %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %if 0%{?fedora} < 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so @@ -485,7 +457,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so } %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so -%exclude %{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* @@ -493,7 +464,6 @@ fi || : %files plugin-jack %defattr(-,root,root,-) %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so -%{_libdir}/vlc/plugins/audio_output/libportaudio_plugin.so %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{?_with_fluidsynth: %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so From 76de0f8cbd9987aea055c09eeb41ce1a24527cff Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 19 Jun 2013 06:21:54 +0000 Subject: [PATCH 209/671] Remove obsoltes patches --- ...Fix-build-with-unreleased-FLAC-1.3.x.patch | 14 ------ ...-of-smbclient-from-header-to-pkgconf.patch | 43 ------------------- vlc-2.0.2-xcb_discard.patch | 15 ------- vlc-2.0.4-cache.patch | 12 ------ 4 files changed, 84 deletions(-) delete mode 100644 0001-Fix-build-with-unreleased-FLAC-1.3.x.patch delete mode 100644 0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch delete mode 100644 vlc-2.0.2-xcb_discard.patch delete mode 100644 vlc-2.0.4-cache.patch diff --git a/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch b/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch deleted file mode 100644 index c33baec..0000000 --- a/0001-Fix-build-with-unreleased-FLAC-1.3.x.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up vlc-2.0.5/modules/codec/flac.c.FLAC13 vlc-2.0.5/modules/codec/flac.c ---- vlc-2.0.5/modules/codec/flac.c.FLAC13 2011-12-08 19:00:26.000000000 +0100 -+++ vlc-2.0.5/modules/codec/flac.c 2013-01-02 20:48:33.569532663 +0100 -@@ -38,8 +38,8 @@ - #include <vlc_codec.h> - #include <vlc_aout.h> - --#include <stream_decoder.h> --#include <stream_encoder.h> -+#include <FLAC/stream_decoder.h> -+#include <FLAC/stream_encoder.h> - - #include <vlc_block_helper.h> - #include <vlc_bits.h> diff --git a/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch b/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch deleted file mode 100644 index fbd933a..0000000 --- a/0001-Switch-detection-of-smbclient-from-header-to-pkgconf.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9cbe32f2d9542a4a8d17a0828c1a7c0046397f57 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Sat, 23 Feb 2013 16:39:23 +0100 -Subject: [PATCH] Switch detection of smbclient from header to pkgconfig - ---- - configure.ac | 5 +++-- - modules/access/Modules.am | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 65377ac..6c634f2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1874,9 +1874,10 @@ dnl - AC_ARG_ENABLE(smb, - [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])]) - if test "${enable_smb}" != "no"; then -- AC_CHECK_HEADERS(libsmbclient.h, -+ PKG_CHECK_MODULES(SMBCLIENT, smbclient, - [ VLC_ADD_PLUGIN([access_smb]) -- VLC_ADD_LIBS([access_smb],[-lsmbclient]) ], -+ VLC_ADD_CFLAGS([access_smb],[$SMBCLIENT_CFLAGS]) -+ VLC_ADD_LIBS([access_smb],[$SMBCLIENT_LIBS])], - [ if test -n "${enable_smb}"; then - AC_MSG_ERROR([cannot find libsmbclient headers]) - fi ]) -diff --git a/modules/access/Modules.am b/modules/access/Modules.am -index ff6047e..c06c89b 100644 ---- a/modules/access/Modules.am -+++ b/modules/access/Modules.am -@@ -35,7 +35,7 @@ libsdp_plugin_la_LIBADD = $(AM_LIBADD) - libsdp_plugin_la_DEPENDENCIES = - - libaccess_smb_plugin_la_SOURCES = smb.c --libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) -+libaccess_smb_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_access_smb) - libaccess_smb_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_access_smb) - if HAVE_WIN32 - libaccess_smb_plugin_la_LIBADD += -lmpr --- -1.7.11.7 - diff --git a/vlc-2.0.2-xcb_discard.patch b/vlc-2.0.2-xcb_discard.patch deleted file mode 100644 index aca164f..0000000 --- a/vlc-2.0.2-xcb_discard.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up vlc-2.0.2/modules/access/screen/xcb.c.discard vlc-2.0.2/modules/access/screen/xcb.c ---- vlc-2.0.2/modules/access/screen/xcb.c.discard 2011-12-08 19:00:26.000000000 +0100 -+++ vlc-2.0.2/modules/access/screen/xcb.c 2012-07-11 15:07:43.092366202 +0200 -@@ -319,7 +319,11 @@ static void Demux (void *data) - msg_Err (demux, "bad X11 drawable 0x%08"PRIx32, sys->window); - discard: - if (sys->follow_mouse) -+#if 0 - xcb_discard_reply (conn, gc.sequence); -+#else -+ msg_Warn (demux, "xcb_discard_reply not available in libxcb < 1.6") ; -+#endif - return; - } - diff --git a/vlc-2.0.4-cache.patch b/vlc-2.0.4-cache.patch deleted file mode 100644 index 84e66e8..0000000 --- a/vlc-2.0.4-cache.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up vlc-2.0.4/bin/Makefile.am.cache vlc-2.0.4/bin/Makefile.am ---- vlc-2.0.4/bin/Makefile.am.cache 2011-12-08 19:00:25.000000000 +0100 -+++ vlc-2.0.4/bin/Makefile.am 2012-10-19 23:14:23.302736639 +0200 -@@ -80,7 +80,5 @@ MOSTLYCLEANFILES = $(noinst_DATA) - ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) - $(AM_V_at)rm -f ../modules/plugins.dat - $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ -- ./vlc-cache-gen$(EXEEXT) ../modules ; \ -- else \ -- echo "Cross-compilation: cache generation skipped!" ; \ -+ echo "Builder compilation: cache generation skipped!" ; \ - fi From 1e166b32574c0abd7b451276d65e35e0cefccb51 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 19 Jun 2013 11:05:41 +0000 Subject: [PATCH 210/671] Remove execstack clearing --- vlc.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index cb0a247..c3ce6cc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext -BuildRequires: prelink Buildrequires: xz %{?_with_bootstrap: @@ -313,11 +312,6 @@ ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf -#Clear execstak -%ifarch %{ix86} -execstack -c $RPM_BUILD_ROOT%{_libdir}/vlc/plugins/codec/librealvideo_plugin.so -%endif - #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc From 2549bc57c64ca0a1c57205b89051b230f7d3bbbb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 26 Jun 2013 21:56:19 +0000 Subject: [PATCH 211/671] Update to post pre1 --- vlc.spec | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/vlc.spec b/vlc.spec index c3ce6cc..c18ed15 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ %global vlc_rc -pre1 -%global _with_bootstrap 1 +#global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec @@ -29,7 +29,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.pre1%{?dist} +Release: 0.2.pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -37,8 +37,6 @@ Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils -BuildRequires: gettext -Buildrequires: xz %{?_with_bootstrap: BuildRequires: gettext-devel @@ -50,7 +48,7 @@ BuildRequires: aalib-devel BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel -BuildRequires: dbus-devel +BuildRequires: pkgconfig(dbus-1) BuildRequires: dirac-devel >= 1.0.0 %{!?_without_directfb:BuildRequires: directfb-devel} %{?_with_faad2:BuildRequires: faad2-devel} @@ -71,6 +69,7 @@ BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 +BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: libdc1394-devel >= 2.1.0 %{?_with_libdca:BuildRequires: libdca-devel} @@ -102,13 +101,13 @@ BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} BuildRequires: pkgconfig(vdpau) -BuildRequires: libvorbis-devel -BuildRequires: libxml2-devel +BuildRequires: pkgconfig(vorbis) +BuildRequires: pkgconfig(libxml-2.0) BuildRequires: lirc-devel %{?_with_live555:BuildRequires: live555-devel >= 0-0.33} BuildRequires: kernel-headers -BuildRequires: libGL-devel -BuildRequires: libGLU-devel +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glu) BuildRequires: libmusicbrainz-devel BuildRequires: libsamplerate-devel BuildRequires: libshout-devel @@ -116,11 +115,11 @@ BuildRequires: lua-devel BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel -%{?_with_opencv:BuildRequires: opencv-devel} +%{?_with_opencv:BuildRequires: pkgconfig(opencv)} BuildRequires: openslp-devel Buildrequires: opus-devel BuildRequires: pcre-devel -BuildRequires: pulseaudio-libs-devel >= 0.9.8 +BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: qt4-devel >= 4.5.2 %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel @@ -241,10 +240,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-sftp \ %{?_with_gnomevfs:--enable-gnomevfs} \ %{?_with_vcdimager:--enable-vcdx} \ -%if 0 -%{?_with_freeworld:--enable-wma-fixed} \ -%{?_with_freeworld:--enable-shine} \ -%endif --enable-omxil \ %ifarch armv5tel armv6l armv6hl --enable-omxil-vout \ @@ -273,7 +268,10 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-jack \ --enable-pulse \ --enable-ncurses \ - --enable-lirc + --enable-lirc \ +%if 0%{?fedora} < 19 + --disable-vdpau +%endif %if 0 @@ -489,6 +487,9 @@ fi || : %changelog +* Wed Jun 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.2.pre1 +- Update to 2.1.0-pre1 + * Mon Apr 08 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.0.6-1 - Update to 2.0.6 From 3311434e63069a0adb074ff7523e99dc1e9e6d18 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jun 2013 05:47:46 +0000 Subject: [PATCH 212/671] HACK for build on fedora-20 --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c18ed15..bd0cae1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -18,6 +18,7 @@ %if 0%{?fedora} %global _with_fluidsynth 1 %global _with_bluray 1 +%global _with_opencv 1 %ifarch x86_64 i686 %global _with_crystalhd 1 %endif @@ -97,6 +98,7 @@ BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} @@ -270,7 +272,9 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-ncurses \ --enable-lirc \ %if 0%{?fedora} < 19 - --disable-vdpau + --disable-vdpau \ +%else + --disable-vaapi \ %endif From 8a06eae2f1de87b6a48ca7c9886da4a4a61eefb0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 13 Jul 2013 22:16:32 +0000 Subject: [PATCH 213/671] Update to officially tagged 2.1.0-pre1 --- sources | 2 +- vlc.spec | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 5a49a7d..bd1e2d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e500407f9acbbcaf771e5a98229e618b vlc-2.1.0-pre1.tar.xz +83a39ff92287dc74de046b30f466a60e vlc-2.1.0-pre1.tar.xz diff --git a/vlc.spec b/vlc.spec index bd0cae1..ddfdb86 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.2.pre1%{?dist} +Release: 0.3.pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -273,8 +273,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-lirc \ %if 0%{?fedora} < 19 --disable-vdpau \ -%else - --disable-vaapi \ %endif @@ -491,6 +489,9 @@ fi || : %changelog +* Fri Jul 12 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.3.pre1 +- Use Officially tagged 2.1.0-pre1 + * Wed Jun 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.2.pre1 - Update to 2.1.0-pre1 From 53d43bde482030055dacb4850563623f1fc6f972 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 20 Jul 2013 09:58:45 +0000 Subject: [PATCH 214/671] * Sat Jul 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.4.pre1 - Rebuilt for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ddfdb86..6c8c0c0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.3.pre1%{?dist} +Release: 0.4.pre1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -489,6 +489,9 @@ fi || : %changelog +* Sat Jul 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.4.pre1 +- Rebuilt for x264 + * Fri Jul 12 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.3.pre1 - Use Officially tagged 2.1.0-pre1 From fa55636eb066908025b486dde43af84eec4179ae Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 20 Jul 2013 17:54:35 +0000 Subject: [PATCH 215/671] Add missing BR --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 6c8c0c0..abc58dc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -78,6 +78,7 @@ BuildRequires: libdv-devel %{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel BuildRequires: libebml-devel +BuildRequires: libgcrypt-devel BuildRequires: libid3tag-devel BuildRequires: libkate-devel %{?_with_libmad:BuildRequires: libmad-devel} From f0a93087a326a4945eb77a247899dcfc7c06d6ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 26 Jul 2013 08:57:03 +0000 Subject: [PATCH 216/671] Update to -pre2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6816da0..4eca490 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.0-pre1.tar.xz +vlc-2.1.0-pre2.tar.xz diff --git a/sources b/sources index bd1e2d9..3388d89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -83a39ff92287dc74de046b30f466a60e vlc-2.1.0-pre1.tar.xz +0a3c4e224ccc36ae2d2d4981ee944c08 vlc-2.1.0-pre2.tar.xz diff --git a/vlc.spec b/vlc.spec index abc58dc..80d354b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -pre1 +%global vlc_rc -pre2 #global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.4.pre1%{?dist} +Release: 0.5.pre2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -490,6 +490,9 @@ fi || : %changelog +* Fri Jul 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.5.pre2 +- Update to 2.1.0-pre2 + * Sat Jul 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.4.pre1 - Rebuilt for x264 From 587cb05771b2b0fa1fb8a7f726578a473fe3a2b6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 15 Aug 2013 10:19:13 +0000 Subject: [PATCH 217/671] * Thu Aug 15 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.6.pre2 - Rebuilt for FFmpeg 2.0.x --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 80d354b..02c8f4e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.5.pre2%{?dist} +Release: 0.6.pre2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -490,6 +490,9 @@ fi || : %changelog +* Thu Aug 15 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.6.pre2 +- Rebuilt for FFmpeg 2.0.x + * Fri Jul 26 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.5.pre2 - Update to 2.1.0-pre2 From b4668fe82125280aba6dbedd4bbaf6275026ad47 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Aug 2013 16:38:38 +0000 Subject: [PATCH 218/671] Update to 2.1.0-rc1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4eca490..4d468b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.0-pre2.tar.xz +vlc-2.1.0-rc1.tar.xz diff --git a/sources b/sources index 3388d89..d7384ed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0a3c4e224ccc36ae2d2d4981ee944c08 vlc-2.1.0-pre2.tar.xz +165785c95f7484e6a939091d626448f0 vlc-2.1.0-rc1.tar.xz diff --git a/vlc.spec b/vlc.spec index 02c8f4e..811a3ac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -pre2 +%global vlc_rc -rc1 #global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.6.pre2%{?dist} +Release: 0.7.rc1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -490,6 +490,9 @@ fi || : %changelog +* Wed Aug 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.7.rc1 +- Update to 2.1.0-rc1 + * Thu Aug 15 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.6.pre2 - Rebuilt for FFmpeg 2.0.x From 9ae61088e31b00b39e35da47b8bec626ba3da4d9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 1 Sep 2013 15:18:58 +0000 Subject: [PATCH 219/671] Disable directfb and rpath --- vlc.spec | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/vlc.spec b/vlc.spec index 811a3ac..904cae5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.7.rc1%{?dist} +Release: 0.8.rc1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -51,7 +51,6 @@ BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: pkgconfig(dbus-1) BuildRequires: dirac-devel >= 1.0.0 -%{!?_without_directfb:BuildRequires: directfb-devel} %{?_with_faad2:BuildRequires: faad2-devel} %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel @@ -265,7 +264,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{!?_without_xcb:--enable-xcb --enable-xvideo} \ %{?_without_xcb:--disable-xcb --disable-xvideo} \ --enable-svg \ -%{!?_without_directfb:--enable-directfb} \ --enable-aa \ --enable-caca \ --enable-jack \ @@ -277,7 +275,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %endif -%if 0 +%if 1 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -440,9 +438,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so %exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so } -%{!?_without_directfb: -%exclude %{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so -} %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so @@ -466,9 +461,6 @@ fi || : %files extras %defattr(-,root,root,-) -%{!?_without_directfb: -%{_libdir}/vlc/plugins/video_output/libdirectfb_plugin.so -} %{?_with_opencv: %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so @@ -490,7 +482,7 @@ fi || : %changelog -* Wed Aug 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.7.rc1 +* Wed Aug 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.8.rc1 - Update to 2.1.0-rc1 * Thu Aug 15 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.6.pre2 From b814cff23a0e409232de0a19cb871247b299044c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 3 Sep 2013 21:31:45 +0000 Subject: [PATCH 220/671] Add patch from rfbz#2835 --- vlc.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vlc.spec b/vlc.spec index 904cae5..946894f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -422,6 +422,9 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libvcdx_plugin.so %exclude %{_libdir}/vlc/plugins/codec/libsvcdsub_plugin.so } +%{?_with_crystalhd: +%exclude %{_libdir}/vlc/plugins/codec/libcrystalhd_plugin.so +} %{?_with_fluidsynth: %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } @@ -470,6 +473,9 @@ fi || : %{_libdir}/vlc/plugins/access/libvcdx_plugin.so %{_libdir}/vlc/plugins/codec/libsvcdsub_plugin.so } +%{?_with_crystalhd: +%{_libdir}/vlc/plugins/codec/libcrystalhd_plugin.so +} %files devel %defattr(-,root,root,-) From e8c308f366b90c09c274cdd636a577f09c7ade08 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 1 Oct 2013 16:45:19 +0000 Subject: [PATCH 221/671] Update to 2.1.0 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4d468b5..a8a9e60 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.0-rc1.tar.xz +vlc-2.1.0.tar.xz diff --git a/sources b/sources index d7384ed..c5ec051 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -165785c95f7484e6a939091d626448f0 vlc-2.1.0-rc1.tar.xz +8c77bda671821f5b9ede96b6816e2ade vlc-2.1.0.tar.xz diff --git a/vlc.spec b/vlc.spec index 946894f..1376ec8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -rc1 +#global vlc_rc -rc1 #global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 0.8.rc1%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Tue Oct 01 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-1 +- Update to 2.1.0 + * Wed Aug 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-0.8.rc1 - Update to 2.1.0-rc1 From 99ba2d0df3b2b9461068e620f7c32fa8e1bb109a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 1 Oct 2013 21:19:56 +0000 Subject: [PATCH 222/671] Force rebootstrap --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1376ec8..36e3f12 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global vlc_rc -rc1 -#global _with_bootstrap 1 +%global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec --with-a52dec From 1980a7d92804e1741f5deb12d6b8aa469d2ffdb6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 2 Oct 2013 07:49:04 +0000 Subject: [PATCH 223/671] Disable rpath hack --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 36e3f12..8a2bc41 100644 --- a/vlc.spec +++ b/vlc.spec @@ -275,7 +275,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %endif -%if 1 +%if 0 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool From 9a532e484bc9bd3a67729a3173d54fffa19f809d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 22 Oct 2013 18:42:14 +0000 Subject: [PATCH 224/671] * Tue Oct 22 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-2 - Rebuilt for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8a2bc41..dae42aa 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Tue Oct 22 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-2 +- Rebuilt for x264 + * Tue Oct 01 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-1 - Update to 2.1.0 From 1c438ef02c06ad36b7f62225751ba0848c94ab16 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 5 Nov 2013 20:09:03 +0000 Subject: [PATCH 225/671] * Tue Nov 05 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-3 - Rebuilt for x264/FFmpeg --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index dae42aa..c191bbd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Tue Nov 05 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-3 +- Rebuilt for x264/FFmpeg + * Tue Oct 22 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-2 - Rebuilt for x264 From 4b5a184eb8fda6056494561ffae834eb53316717 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 14 Nov 2013 12:11:51 +0000 Subject: [PATCH 226/671] Update to 2.1.1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a8a9e60..f2b5c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.0.tar.xz +vlc-2.1.1.tar.xz diff --git a/sources b/sources index c5ec051..0262048 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c77bda671821f5b9ede96b6816e2ade vlc-2.1.0.tar.xz +1331cd853d56762c96afcb92dd498348 vlc-2.1.1.tar.xz diff --git a/vlc.spec b/vlc.spec index c191bbd..a9e23d7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,8 +29,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.0 -Release: 3%{?dist} +Version: 2.1.1 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Thu Nov 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.1-1 +- Update to 2.1.1 + * Tue Nov 05 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.0-3 - Rebuilt for x264/FFmpeg From dad446dd77e9fe41516c9d9bc5f8c36d0020c7ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 28 Nov 2013 23:12:38 +0000 Subject: [PATCH 227/671] Rebuilt for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a9e23d7..0967e8b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Thu Nov 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.1-2 +- Rebuilt for live555 + * Thu Nov 14 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.1-1 - Update to 2.1.1 From c38c39289bdb5668ba5337319491c17599bbb033 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 10 Dec 2013 20:08:26 +0000 Subject: [PATCH 228/671] Update to 2.1.2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f2b5c1b..ea92be6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.1.tar.xz +vlc-2.1.2.tar.xz diff --git a/sources b/sources index 0262048..4de9a93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1331cd853d56762c96afcb92dd498348 vlc-2.1.1.tar.xz +fb6787ad749aadcfaeab3471939b3426 vlc-2.1.2.tar.xz diff --git a/vlc.spec b/vlc.spec index 0967e8b..2bad406 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,8 +29,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.1 -Release: 2%{?dist} +Version: 2.1.2 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -488,6 +488,9 @@ fi || : %changelog +* Tue Dec 10 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.2-1 +- Update to 2.1.2 + * Thu Nov 28 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.1-2 - Rebuilt for live555 From 81cb98786997d514d03242422cc731162783a7af Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 17 Jan 2014 12:58:08 +0000 Subject: [PATCH 229/671] Disable freerdp --- vlc.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 2bad406..10bf032 100644 --- a/vlc.spec +++ b/vlc.spec @@ -25,12 +25,15 @@ %global _with_projectm 1 %global _with_schroedinger 1 %endif +%if 0%{?fedora} < 21 +%global _with_freerdp 1 +%endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -55,7 +58,7 @@ BuildRequires: dirac-devel >= 1.0.0 %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} -BuildRequires: freerdp-devel +%{?_with_freerdp:BuildRequires: freerdp-devel} BuildRequires: fribidi-devel %{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 @@ -488,6 +491,9 @@ fi || : %changelog +* Fri Jan 17 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.2-2 +- Disable freerdp for f21 + * Tue Dec 10 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.1.2-1 - Update to 2.1.2 From ecccbc9038741373c08bc43e2ce4de8d8a77b9a1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 6 Feb 2014 10:12:13 +0000 Subject: [PATCH 230/671] Update to 2.1.3 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ea92be6..60b9ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.2.tar.xz +vlc-2.1.3.tar.xz diff --git a/sources b/sources index 4de9a93..0578229 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fb6787ad749aadcfaeab3471939b3426 vlc-2.1.2.tar.xz +56a489d093ffef9aa29809116985adba vlc-2.1.3.tar.xz diff --git a/vlc.spec b/vlc.spec index 10bf032..9f3b7a5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,8 +32,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.2 -Release: 2%{?dist} +Version: 2.1.3 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Thu Feb 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.3-1 +- Update to 2.1.3 + * Fri Jan 17 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.2-2 - Disable freerdp for f21 From fbaebd34ed6f541204d6b19074b4ca2b507fa1bf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 21 Feb 2014 20:27:13 +0000 Subject: [PATCH 231/671] Update to 2.1.4 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 60b9ddf..e70a04d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.3.tar.xz +vlc-2.1.4.tar.xz diff --git a/sources b/sources index 0578229..b9a0bb8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -56a489d093ffef9aa29809116985adba vlc-2.1.3.tar.xz +7ed67d22f7425011078772bfc62ac222 vlc-2.1.4.tar.xz diff --git a/vlc.spec b/vlc.spec index 9f3b7a5..e6afee1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.3 +Version: 2.1.4 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -491,6 +491,9 @@ fi || : %changelog +* Fri Feb 21 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-1 +- Update to 2.1.4 + * Thu Feb 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.3-1 - Update to 2.1.3 From c0c0747008dcd70fc39cb85b143f4900c5de92e1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 6 Mar 2014 09:19:12 +0000 Subject: [PATCH 232/671] * Thu Mar 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-2 - Rebuilt for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e6afee1..0edbe3f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Thu Mar 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-2 +- Rebuilt for x264 + * Fri Feb 21 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-1 - Update to 2.1.4 From ea76cb6e2ce432a6faaa40dae3e611619e6fa355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sat, 22 Mar 2014 00:14:41 +0000 Subject: [PATCH 233/671] =?UTF-8?q?*=20Sat=20Mar=2022=202014=20S=C3=A9rgio?= =?UTF-8?q?=20Basto=20<sergio@serjux.com>=20-=202.1.4-3=20-=20Rebuilt=20fo?= =?UTF-8?q?r=20x264?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0edbe3f..fde8569 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Sat Mar 22 2014 Sérgio Basto <sergio@serjux.com> - 2.1.4-3 +- Rebuilt for x264 + * Thu Mar 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-2 - Rebuilt for x264 From 84219ce391dc52ba8fc564874357ff9239b71fa3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 29 Mar 2014 10:12:24 +0000 Subject: [PATCH 234/671] Rebuilt for ffmpeg --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index fde8569..429a89f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Sat Mar 29 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-4 +- Rebuilt for ffmpeg + * Sat Mar 22 2014 Sérgio Basto <sergio@serjux.com> - 2.1.4-3 - Rebuilt for x264 From a57e44d781696606c6203fb15fc501daccad88ce Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 26 Apr 2014 12:50:45 +0000 Subject: [PATCH 235/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 429a89f..0fb039b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-5 +- Rebuilt for libgcrypt + * Sat Mar 29 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-4 - Rebuilt for ffmpeg From 9fdd7b61b2d3bc5f5b596cfeb4ec3afb752bf540 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 26 Jul 2014 14:34:33 +0000 Subject: [PATCH 236/671] Update to 2.1.5 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e70a04d..7747e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.4.tar.xz +vlc-2.1.5.tar.xz diff --git a/sources b/sources index b9a0bb8..8e96438 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ed67d22f7425011078772bfc62ac222 vlc-2.1.4.tar.xz +3941b561f590cc95ca5e795213cba2f2 vlc-2.1.5.tar.xz diff --git a/vlc.spec b/vlc.spec index 0fb039b..f9c726a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,8 +32,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.4 -Release: 5%{?dist} +Version: 2.1.5 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Sat Jul 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-1 +- Update to 2.1.5 + * Sat Apr 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.4-5 - Rebuilt for libgcrypt From 010959221b2e6a310cf34eb1229d4add8965ea00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Thu, 7 Aug 2014 01:46:21 +0000 Subject: [PATCH 237/671] Rebuilt for ffmpeg-2.3 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f9c726a..8811d8d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Thu Aug 07 2014 Sérgio Basto <sergio@serjux.com> - 2.1.5-2 +- Rebuilt for ffmpeg-2.3 + * Sat Jul 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-1 - Update to 2.1.5 From a90c73b6f0e40d4f107b28776c5bfb5a534f2429 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 26 Sep 2014 19:07:18 +0000 Subject: [PATCH 238/671] * Fri Sep 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-3 - Rebuilt for FFmpeg 2.4.x --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8811d8d..8632f47 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -491,6 +491,9 @@ fi || : %changelog +* Fri Sep 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-3 +- Rebuilt for FFmpeg 2.4.x + * Thu Aug 07 2014 Sérgio Basto <sergio@serjux.com> - 2.1.5-2 - Rebuilt for ffmpeg-2.3 From daaf0fb5d5da800faad4ad6d0735b896ea90a3cd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 28 Sep 2014 16:44:50 +0000 Subject: [PATCH 239/671] Allow building with ffmpeg24 --- vlc-2.1.5-ffmpeg-2.4.patch | 16 ++++++++++++++++ vlc.spec | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 vlc-2.1.5-ffmpeg-2.4.patch diff --git a/vlc-2.1.5-ffmpeg-2.4.patch b/vlc-2.1.5-ffmpeg-2.4.patch new file mode 100644 index 0000000..ed1651c --- /dev/null +++ b/vlc-2.1.5-ffmpeg-2.4.patch @@ -0,0 +1,16 @@ +diff --git a/configure.ac b/configure.ac +index a684338..053713a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2242,8 +2242,8 @@ AC_ARG_ENABLE(avcodec, + [ --enable-avcodec libavcodec codec (default enabled)]) + AS_IF([test "${enable_avcodec}" != "no"], [ + PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [ +- PKG_CHECK_EXISTS([libavcodec < 56],, [ +- AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.]) ++ PKG_CHECK_EXISTS([libavcodec < 57],, [ ++ AC_MSG_ERROR([libavcodec versions 57 and later are not supported yet.]) + ]) + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" + diff --git a/vlc.spec b/vlc.spec index 8632f47..d670f5a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,12 +33,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: vlc-2.1.5-ffmpeg-2.4.patch BuildRequires: desktop-file-utils @@ -222,6 +223,7 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} +%patch0 -p1 -b .ffmpeg24 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -491,6 +493,9 @@ fi || : %changelog +* Sun Sep 28 2014 kwizart <kwizart@gmail.com> - 2.1.5-4 +- Allow build with ffmpeg24 + * Fri Sep 26 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-3 - Rebuilt for FFmpeg 2.4.x From 13e9ed208fb28e6080287c39024efcc435d2dad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sun, 19 Oct 2014 22:02:12 +0000 Subject: [PATCH 240/671] Rebuilt for FFmpeg 2.4.3 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d670f5a..7c05420 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -493,6 +493,9 @@ fi || : %changelog +* Sun Oct 19 2014 Sérgio Basto <sergio@serjux.com> - 2.1.5-5 +- Rebuilt for FFmpeg 2.4.3 + * Sun Sep 28 2014 kwizart <kwizart@gmail.com> - 2.1.5-4 - Allow build with ffmpeg24 From f430d390b84638873487de4a566097928bf82abd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 5 Nov 2014 09:54:03 +0000 Subject: [PATCH 241/671] Rebuilt for vaapi 0.36 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7c05420..445542d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -493,6 +493,9 @@ fi || : %changelog +* Wed Nov 05 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-6 +- Rebuilt for vaapi 0.36 + * Sun Oct 19 2014 Sérgio Basto <sergio@serjux.com> - 2.1.5-5 - Rebuilt for FFmpeg 2.4.3 From 71897acdcdefca95bbce22ffc6802c2c5eab48ba Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 6 Nov 2014 10:49:06 +0000 Subject: [PATCH 242/671] Fix for flv --- vlc-2.1.5-ffmpeg-2.4-bug.patch | 11 +++++++++++ vlc.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 vlc-2.1.5-ffmpeg-2.4-bug.patch diff --git a/vlc-2.1.5-ffmpeg-2.4-bug.patch b/vlc-2.1.5-ffmpeg-2.4-bug.patch new file mode 100644 index 0000000..bcb5324 --- /dev/null +++ b/vlc-2.1.5-ffmpeg-2.4-bug.patch @@ -0,0 +1,11 @@ +--- a/modules/demux/avformat/demux.c 2013-12-03 10:12:34.000000000 +0100 ++++ b/modules/demux/avformat/demux.c 2014-10-12 22:07:54.044769366 +0200 +@@ -106,7 +106,7 @@ int OpenDemux( vlc_object_t *p_this ) + { + demux_t *p_demux = (demux_t*)p_this; + demux_sys_t *p_sys; +- AVProbeData pd; ++ AVProbeData pd = {0}; + AVInputFormat *fmt = NULL; + unsigned int i; + int64_t i_start_time = -1; diff --git a/vlc.spec b/vlc.spec index 445542d..e2b908b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,13 +33,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.1.5 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: vlc-2.1.5-ffmpeg-2.4.patch +Patch1: vlc-2.1.5-ffmpeg-2.4-bug.patch BuildRequires: desktop-file-utils @@ -224,6 +225,7 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} %patch0 -p1 -b .ffmpeg24 +%patch1 -p1 -b .ffmpeg24bug %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -493,6 +495,9 @@ fi || : %changelog +* Thu Nov 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-7 +- Fix for flv - rfbz#3401 + * Wed Nov 05 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-6 - Rebuilt for vaapi 0.36 From c1f38c75bc66ab42bbcfc82cb0a12d6a35664ec5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 14 Nov 2014 21:28:41 +0000 Subject: [PATCH 243/671] Update to 2.2.0-rc1 --- .gitignore | 2 +- sources | 2 +- vlc-2.1.5-ffmpeg-2.4-bug.patch | 11 ---- vlc-2.1.5-ffmpeg-2.4.patch | 16 ------ vlc.spec | 94 ++++++++++++---------------------- 5 files changed, 35 insertions(+), 90 deletions(-) delete mode 100644 vlc-2.1.5-ffmpeg-2.4-bug.patch delete mode 100644 vlc-2.1.5-ffmpeg-2.4.patch diff --git a/.gitignore b/.gitignore index 7747e6c..00db2d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.1.5.tar.xz +vlc-2.2.0-rc1.tar.xz diff --git a/sources b/sources index 8e96438..552a5e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3941b561f590cc95ca5e795213cba2f2 vlc-2.1.5.tar.xz +0aac1f5f1f6e659770db225768f31f29 vlc-2.2.0-rc1.tar.xz diff --git a/vlc-2.1.5-ffmpeg-2.4-bug.patch b/vlc-2.1.5-ffmpeg-2.4-bug.patch deleted file mode 100644 index bcb5324..0000000 --- a/vlc-2.1.5-ffmpeg-2.4-bug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/modules/demux/avformat/demux.c 2013-12-03 10:12:34.000000000 +0100 -+++ b/modules/demux/avformat/demux.c 2014-10-12 22:07:54.044769366 +0200 -@@ -106,7 +106,7 @@ int OpenDemux( vlc_object_t *p_this ) - { - demux_t *p_demux = (demux_t*)p_this; - demux_sys_t *p_sys; -- AVProbeData pd; -+ AVProbeData pd = {0}; - AVInputFormat *fmt = NULL; - unsigned int i; - int64_t i_start_time = -1; diff --git a/vlc-2.1.5-ffmpeg-2.4.patch b/vlc-2.1.5-ffmpeg-2.4.patch deleted file mode 100644 index ed1651c..0000000 --- a/vlc-2.1.5-ffmpeg-2.4.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index a684338..053713a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2242,8 +2242,8 @@ AC_ARG_ENABLE(avcodec, - [ --enable-avcodec libavcodec codec (default enabled)]) - AS_IF([test "${enable_avcodec}" != "no"], [ - PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [ -- PKG_CHECK_EXISTS([libavcodec < 56],, [ -- AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.]) -+ PKG_CHECK_EXISTS([libavcodec < 57],, [ -+ AC_MSG_ERROR([libavcodec versions 57 and later are not supported yet.]) - ]) - VLC_SAVE_FLAGS - CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" - diff --git a/vlc.spec b/vlc.spec index e2b908b..3a3c912 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,46 +1,45 @@ -#global vlc_rc -rc1 +%global vlc_rc -rc1 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} -%global _with_a52dec --with-a52dec -%global _with_faad2 --with-faad2 -%global _with_ffmpeg --with-ffmpeg -%global _with_libdca --with-libdca -%global _with_libdvbpsi --with-libdvbpsi -%global _with_libmad --with-libmad -%global _with_libmpeg2 --with-libmpeg2 -%global _with_twolame --with-twolame -%global _with_x264 --with-x264 -%global _with_xvidcore --with-xvidcore -%global _with_live555 --with-live555 -%global _with_vaapi --with-vaapi +%global _with_a52dec 1 +%global _with_faad2 1 +%global _with_ffmpeg 1 +%global _with_libdca 1 +%global _with_libdvbpsi 1 +%global _with_libmad 1 +%global _with_libmpeg2 1 +%global _with_twolame 1 +%global _with_x264 1 +%ifarch x86_64 i686 +# Currenly broken on armhfp +%global _with_x265 1 +%endif +%global _with_xvidcore 1 +%global _with_live555 1 +%global _with_vaapi 1 %endif -%if 0%{?fedora} -%global _with_fluidsynth 1 %global _with_bluray 1 %global _with_opencv 1 -%ifarch x86_64 i686 -%global _with_crystalhd 1 -%endif +%global _with_fluidsynth 1 +%if 0%{?fedora} +%global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 %endif -%if 0%{?fedora} < 21 -%global _with_freerdp 1 +%ifarch x86_64 i686 +%global _with_crystalhd 1 %endif Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.1.5 -Release: 7%{?dist} +Version: 2.2.0 +Release: 0.1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Patch0: vlc-2.1.5-ffmpeg-2.4.patch -Patch1: vlc-2.1.5-ffmpeg-2.4-bug.patch BuildRequires: desktop-file-utils @@ -55,7 +54,6 @@ BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel BuildRequires: pkgconfig(dbus-1) -BuildRequires: dirac-devel >= 1.0.0 %{?_with_faad2:BuildRequires: faad2-devel} %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel @@ -137,6 +135,7 @@ BuildRequires: taglib-devel %{?_with_twolame:BuildRequires: twolame-devel} %{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} %{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} +%{?_with_x265:BuildRequires: x265-devel} %{?_with_xvidcore:BuildRequires: xvidcore-devel} BuildRequires: zlib-devel BuildRequires: zvbi-devel @@ -196,9 +195,6 @@ Summary: VLC media player core Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 -#Deprecated since F-19, can be dropped by F-21/EL-7 -%{?live555date:Requires: live555date%{_isa} = %{live555date}} -#Introduced in F-19 %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %description core @@ -224,8 +220,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%patch0 -p1 -b .ffmpeg24 -%patch1 -p1 -b .ffmpeg24bug %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -250,9 +244,11 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_gnomevfs:--enable-gnomevfs} \ %{?_with_vcdimager:--enable-vcdx} \ --enable-omxil \ -%ifarch armv5tel armv6l armv6hl --enable-omxil-vout \ +%ifarch armv6hl --enable-rpi-omxil \ + --enable-mmal-codec \ + --enable-mmal-vout \ %endif %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ @@ -265,7 +261,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-tremor \ --enable-speex \ --enable-theora \ - --enable-dirac \ --enable-libass \ --enable-shout \ %{!?_without_xcb:--enable-xcb --enable-xvideo} \ @@ -276,10 +271,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-jack \ --enable-pulse \ --enable-ncurses \ - --enable-lirc \ -%if 0%{?fedora} < 19 - --disable-vdpau \ -%endif + --enable-lirc %if 0 @@ -299,8 +291,6 @@ make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT - make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' @@ -325,10 +315,6 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc %find_lang %{name} -%clean -rm -rf $RPM_BUILD_ROOT - - %post touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then @@ -377,7 +363,6 @@ fi || : %files -%defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README THANKS %{_datadir}/applications/*%{name}.desktop %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop @@ -394,14 +379,11 @@ fi || : %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{!?_without_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%if 0%{?fedora} < 17 -%{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so -%endif %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +#{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so } %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_projectm: @@ -410,7 +392,6 @@ fi || : %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %files core -f %{name}.lang -%defattr(-,root,root,-) %{_bindir}/vlc %{_bindir}/cvlc %{_bindir}/nvlc @@ -446,7 +427,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%exclude %{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so +#{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so } %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: @@ -462,7 +443,6 @@ fi || : %{_mandir}/man1/vlc*.1* %files plugin-jack -%defattr(-,root,root,-) %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %{?_with_fluidsynth: @@ -470,7 +450,6 @@ fi || : } %files extras -%defattr(-,root,root,-) %{?_with_opencv: %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so %{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so @@ -485,7 +464,6 @@ fi || : } %files devel -%defattr(-,root,root,-) %dir %{_includedir}/vlc %{_includedir}/vlc/* %{_libdir}/*.so @@ -495,14 +473,8 @@ fi || : %changelog -* Thu Nov 06 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-7 -- Fix for flv - rfbz#3401 - -* Wed Nov 05 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.1.5-6 -- Rebuilt for vaapi 0.36 - -* Sun Oct 19 2014 Sérgio Basto <sergio@serjux.com> - 2.1.5-5 -- Rebuilt for FFmpeg 2.4.3 +* Fri Nov 14 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-0.1 +- Update to 2.2.0-rc1 * Sun Sep 28 2014 kwizart <kwizart@gmail.com> - 2.1.5-4 - Allow build with ffmpeg24 From de945a2ed90cd2d21138537a94eabe22331b1a86 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Nov 2014 09:33:46 +0000 Subject: [PATCH 244/671] Update to rc2 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 00db2d9..7e99f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.2.0-rc1.tar.xz +vlc-2.2.0-rc2.tar.xz diff --git a/sources b/sources index 552a5e0..56460b3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0aac1f5f1f6e659770db225768f31f29 vlc-2.2.0-rc1.tar.xz +2b4d2288605d0b02c22aee4bbcce66ca vlc-2.2.0-rc2.tar.xz diff --git a/vlc.spec b/vlc.spec index 3a3c912..6d3ba04 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -rc1 +%global vlc_rc -rc2 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -35,7 +35,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.0 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -473,6 +473,9 @@ fi || : %changelog +* Tue Nov 25 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-0.2 +- Update to 2.2.0-rc2 + * Fri Nov 14 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-0.1 - Update to 2.2.0-rc1 From 25a5a4f82ccf6084b865b30b469f5fb1231c502a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 27 Feb 2015 15:29:27 +0000 Subject: [PATCH 245/671] Update to 2.2.0 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7e99f70..7ff6d76 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.2.0-rc2.tar.xz +vlc-2.2.0.tar.xz diff --git a/sources b/sources index 56460b3..15436b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2b4d2288605d0b02c22aee4bbcce66ca vlc-2.2.0-rc2.tar.xz +faeceb614bf3946e5f90ef0d1f51db45 vlc-2.2.0.tar.xz diff --git a/vlc.spec b/vlc.spec index 6d3ba04..26b4b43 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -rc2 +#global vlc_rc -rc2 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -35,7 +35,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.0 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -473,6 +473,9 @@ fi || : %changelog +* Fri Feb 27 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-1 +- Update to 2.2.0 + * Tue Nov 25 2014 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-0.2 - Update to 2.2.0-rc2 From 23ea9a01a43fc061f2ea199a8209b3879365fd3f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 13 Apr 2015 10:19:07 +0000 Subject: [PATCH 246/671] Update to 2.2.1 --- .gitignore | 2 +- sources | 2 +- vlc.spec | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7ff6d76..a7db8ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.2.0.tar.xz +vlc-2.2.1.tar.xz diff --git a/sources b/sources index 15436b6..1bd0712 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -faeceb614bf3946e5f90ef0d1f51db45 vlc-2.2.0.tar.xz +42273945758b521c408fabc7fd6d9946 vlc-2.2.1.tar.xz diff --git a/vlc.spec b/vlc.spec index 26b4b43..a804734 100644 --- a/vlc.spec +++ b/vlc.spec @@ -11,10 +11,7 @@ %global _with_libmpeg2 1 %global _with_twolame 1 %global _with_x264 1 -%ifarch x86_64 i686 -# Currenly broken on armhfp %global _with_x265 1 -%endif %global _with_xvidcore 1 %global _with_live555 1 %global _with_vaapi 1 @@ -34,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -245,11 +242,11 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_vcdimager:--enable-vcdx} \ --enable-omxil \ --enable-omxil-vout \ -%ifarch armv6hl +%{?_with_rpi: --enable-rpi-omxil \ --enable-mmal-codec \ --enable-mmal-vout \ -%endif +} %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ --disable-swscale --disable-postproc} \ @@ -473,6 +470,11 @@ fi || : %changelog +* Mon Apr 13 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-1 +- Update to 2.2.1 +- Enable x265 on armhfp +- Add --with rpi conditional for raspberrypi and mmal + * Fri Feb 27 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.0-1 - Update to 2.2.0 From 9e1fe1d5a63f4a6a4a255f627e231ecbfc991fec Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 13 Apr 2015 10:47:41 +0000 Subject: [PATCH 247/671] Fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a804734..943ba7e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -246,7 +246,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-rpi-omxil \ --enable-mmal-codec \ --enable-mmal-vout \ -} +} \ %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ --disable-swscale --disable-postproc} \ From 067c0e0b1adcb0ec36744b8ccd20aa72a3468286 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 16 Apr 2015 10:23:12 +0000 Subject: [PATCH 248/671] Rebuilt for x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 943ba7e..ab95050 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -470,6 +470,9 @@ fi || : %changelog +* Thu Apr 16 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-2 +- Rebuilt for x265 + * Mon Apr 13 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-1 - Update to 2.2.1 - Enable x265 on armhfp From 371fc317ed574fff168626d4115ac4f8f2e51c8a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 26 Apr 2015 19:10:12 +0000 Subject: [PATCH 249/671] Fix for freerdp and f22 --- vlc-backport-freerdp.patch | 54 ++++++++++++++++++++++++++++++++++++++ vlc.spec | 8 +++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 vlc-backport-freerdp.patch diff --git a/vlc-backport-freerdp.patch b/vlc-backport-freerdp.patch new file mode 100644 index 0000000..dc8cb9d --- /dev/null +++ b/vlc-backport-freerdp.patch @@ -0,0 +1,54 @@ +commit 5c07f87a773153c128b3a771ed61e7915cd8fe18 +Author: Vinson Lee <vlee@freedesktop.org> +Date: Fri Feb 20 06:05:09 2015 +0000 + + rdp: Support FreeRDP-1.2.0-beta1-android9 + + Fix build errors. + + CC access/librdp_plugin_la-rdp.lo + access/rdp.c: In function ‘Open’: + access/rdp.c:431:5: error: implicit declaration of function ‘freerdp_channels_global_init’ [-Werror=implicit-function-declaration] + freerdp_channels_global_init(); + ^ + access/rdp.c: In function ‘Close’: + access/rdp.c:507:5: error: implicit declaration of function ‘freerdp_channels_global_uninit’ [-Werror=implicit-function-declaration] + freerdp_channels_global_uninit(); + ^ + + freerdp channels global functions were removed from FreeRDP repository + in commit 2a82684521dc8b23ae92e284e866227e5194a7bb. + + commit 2a82684521dc8b23ae92e284e866227e5194a7bb + Author: Marc-André Moreau <marcandre.moreau@gmail.com> + Date: Wed Jun 11 16:27:31 2014 -0400 + + channels: cleanup unused freerdp channels global functions + + Signed-off-by: Vinson Lee <vlee@freedesktop.org> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +diff --git a/modules/access/rdp.c b/modules/access/rdp.c +index 1dca8ae..769ba60 100644 +--- a/modules/access/rdp.c ++++ b/modules/access/rdp.c +@@ -428,7 +428,9 @@ static int Open( vlc_object_t *p_this ) + if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; + p_sys->i_frame_interval = 1000000 / p_sys->f_fps; + ++#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 + freerdp_channels_global_init(); ++#endif + + p_sys->p_instance = freerdp_new(); + if ( !p_sys->p_instance ) +@@ -504,7 +506,9 @@ static void Close( vlc_object_t *p_this ) + + freerdp_disconnect( p_sys->p_instance ); + freerdp_free( p_sys->p_instance ); ++#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 + freerdp_channels_global_uninit(); ++#endif + + if ( p_sys->p_block ) + block_Release( p_sys->p_block ); diff --git a/vlc.spec b/vlc.spec index ab95050..fdc2cdb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,11 +32,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +Patch0: vlc-backport-freerdp.patch BuildRequires: desktop-file-utils @@ -223,6 +224,8 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap } +%patch0 -p1 + %build @@ -470,6 +473,9 @@ fi || : %changelog +* Sun Apr 26 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-3 +- Fix build with freerdp for f22 + * Thu Apr 16 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-2 - Rebuilt for x265 From ed0d69314368c254b0fbaffc8177beae87882ac0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 26 Apr 2015 19:13:31 +0000 Subject: [PATCH 250/671] Fixup --- vlc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index fdc2cdb..5257518 100644 --- a/vlc.spec +++ b/vlc.spec @@ -218,13 +218,12 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} - +%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap } -%patch0 -p1 %build From cba47ecdae291f1c5688ce2766ab0c5e3b56f860 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 26 Apr 2015 21:15:47 +0000 Subject: [PATCH 251/671] Update to SSE2 --- vlc-backport-chroma_dead_CYUV.patch | 560 ++++++++++++++++++++++++++++ vlc-video_chroma-sse2.patch | 33 ++ vlc.spec | 4 + 3 files changed, 597 insertions(+) create mode 100644 vlc-backport-chroma_dead_CYUV.patch create mode 100644 vlc-video_chroma-sse2.patch diff --git a/vlc-backport-chroma_dead_CYUV.patch b/vlc-backport-chroma_dead_CYUV.patch new file mode 100644 index 0000000..55288a9 --- /dev/null +++ b/vlc-backport-chroma_dead_CYUV.patch @@ -0,0 +1,560 @@ +commit 5d17bd9d2db93b7a653f870232bf0c0e95a1de3c +Author: Rémi Denis-Courmont <remi@remlab.net> +Date: Thu Jan 29 20:09:56 2015 +0200 + + chroma: remove dead CYUV support + + CYUV is not a pixel format, at least it is not treated as such in VLC + outputs and encoders. CYUV is decoded to YUV 4:1:1 by libavcodec. + +diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c +index cd99dd6..4584f9e 100644 +--- a/modules/video_chroma/i420_yuy2.c ++++ b/modules/video_chroma/i420_yuy2.c +@@ -44,13 +44,13 @@ + #define SRC_FOURCC "I420,IYUV,YV12" + + #if defined (MODULE_NAME_IS_i420_yuy2) +-# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211" ++# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,Y211" + # define VLC_TARGET + #elif defined (MODULE_NAME_IS_i420_yuy2_mmx) +-# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" ++# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" + # define VLC_TARGET VLC_MMX + #elif defined (MODULE_NAME_IS_i420_yuy2_sse2) +-# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" ++# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" + # define VLC_TARGET VLC_SSE + #elif defined (MODULE_NAME_IS_i420_yuy2_altivec) + # define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" +@@ -70,9 +70,7 @@ static picture_t *I420_YVYU_Filter ( filter_t *, picture_t * ); + static picture_t *I420_UYVY_Filter ( filter_t *, picture_t * ); + #if !defined (MODULE_NAME_IS_i420_yuy2_altivec) + static void I420_IUYV ( filter_t *, picture_t *, picture_t * ); +-static void I420_cyuv ( filter_t *, picture_t *, picture_t * ); + static picture_t *I420_IUYV_Filter ( filter_t *, picture_t * ); +-static picture_t *I420_cyuv_Filter ( filter_t *, picture_t * ); + #endif + #if defined (MODULE_NAME_IS_i420_yuy2) + static void I420_Y211 ( filter_t *, picture_t *, picture_t * ); +@@ -153,10 +151,6 @@ static int Activate( vlc_object_t *p_this ) + case VLC_FOURCC('I','U','Y','V'): + p_filter->pf_video_filter = I420_IUYV_Filter; + break; +- +- case VLC_CODEC_CYUV: +- p_filter->pf_video_filter = I420_cyuv_Filter; +- break; + #endif + + #if defined (MODULE_NAME_IS_i420_yuy2) +@@ -194,7 +188,6 @@ VIDEO_FILTER_WRAPPER( I420_YVYU ) + VIDEO_FILTER_WRAPPER( I420_UYVY ) + #if !defined (MODULE_NAME_IS_i420_yuy2_altivec) + VIDEO_FILTER_WRAPPER( I420_IUYV ) +-VIDEO_FILTER_WRAPPER( I420_cyuv ) + #endif + #if defined (MODULE_NAME_IS_i420_yuy2) + VIDEO_FILTER_WRAPPER( I420_Y211 ) +@@ -849,136 +842,6 @@ static void I420_IUYV( filter_t *p_filter, picture_t *p_source, + /* FIXME: TODO ! */ + msg_Err( p_filter, "I420_IUYV unimplemented, please harass <sam@zoy.org>" ); + } +- +-/***************************************************************************** +- * I420_cyuv: planar YUV 4:2:0 to upside-down packed UYVY 4:2:2 +- *****************************************************************************/ +-VLC_TARGET +-static void I420_cyuv( filter_t *p_filter, picture_t *p_source, +- picture_t *p_dest ) +-{ +- uint8_t *p_line1 = p_dest->p->p_pixels + +- p_dest->p->i_visible_lines * p_dest->p->i_pitch +- + p_dest->p->i_pitch; +- uint8_t *p_line2 = p_dest->p->p_pixels + +- p_dest->p->i_visible_lines * p_dest->p->i_pitch; +- uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS; +- uint8_t *p_u = p_source->U_PIXELS; +- uint8_t *p_v = p_source->V_PIXELS; +- +- int i_x, i_y; +- +- const int i_source_margin = p_source->p[0].i_pitch +- - p_source->p[0].i_visible_pitch; +- const int i_source_margin_c = p_source->p[1].i_pitch +- - p_source->p[1].i_visible_pitch; +- const int i_dest_margin = p_dest->p->i_pitch +- - p_dest->p->i_visible_pitch; +- +-#if !defined(MODULE_NAME_IS_i420_yuy2_sse2) +- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) +- { +- p_line1 -= 3 * p_dest->p->i_pitch; +- p_line2 -= 3 * p_dest->p->i_pitch; +- +- p_y1 = p_y2; +- p_y2 += p_source->p[Y_PLANE].i_pitch; +- +- for( i_x = p_filter->fmt_in.video.i_width / 8 ; i_x-- ; ) +- { +-#if !defined (MODULE_NAME_IS_i420_yuy2_mmx) +- C_YUV420_UYVY( ); +- C_YUV420_UYVY( ); +- C_YUV420_UYVY( ); +- C_YUV420_UYVY( ); +-#else +- MMX_CALL( MMX_YUV420_UYVY ); +-#endif +- } +- for( i_x = ( p_filter->fmt_in.video.i_width % 8 ) / 2; i_x-- ; ) +- { +- C_YUV420_UYVY( ); +- } +- +- p_y1 += i_source_margin; +- p_y2 += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line1 += i_dest_margin; +- p_line2 += i_dest_margin; +- } +- +-#if defined (MODULE_NAME_IS_i420_yuy2_mmx) +- /* re-enable FPU registers */ +- MMX_END; +-#endif +- +-#else // defined(MODULE_NAME_IS_i420_yuy2_sse2) +- /* +- ** SSE2 128 bits fetch/store instructions are faster +- ** if memory access is 16 bytes aligned +- */ +- if( 0 == (15 & (p_source->p[Y_PLANE].i_pitch|p_dest->p->i_pitch| +- ((intptr_t)p_line2|(intptr_t)p_y2))) ) +- { +- /* use faster SSE2 aligned fetch and store */ +- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) +- { +- p_line1 = p_line2; +- p_line2 += p_dest->p->i_pitch; +- +- p_y1 = p_y2; +- p_y2 += p_source->p[Y_PLANE].i_pitch; +- +- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) +- { +- SSE2_CALL( SSE2_YUV420_UYVY_ALIGNED ); +- } +- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) +- { +- C_YUV420_UYVY( ); +- } +- +- p_y1 += i_source_margin; +- p_y2 += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line1 += i_dest_margin; +- p_line2 += i_dest_margin; +- } +- } +- else +- { +- /* use slower SSE2 unaligned fetch and store */ +- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) +- { +- p_line1 = p_line2; +- p_line2 += p_dest->p->i_pitch; +- +- p_y1 = p_y2; +- p_y2 += p_source->p[Y_PLANE].i_pitch; +- +- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) +- { +- SSE2_CALL( SSE2_YUV420_UYVY_UNALIGNED ); +- } +- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) +- { +- C_YUV420_UYVY( ); +- } +- +- p_y1 += i_source_margin; +- p_y2 += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line1 += i_dest_margin; +- p_line2 += i_dest_margin; +- } +- } +- /* make sure all SSE2 stores are visible thereafter */ +- SSE2_END; +-#endif // defined(MODULE_NAME_IS_i420_yuy2_sse2) +-} + #endif // !defined (MODULE_NAME_IS_i420_yuy2_altivec) + + /***************************************************************************** +diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c +index 383fb3e..9099cfc 100644 +--- a/modules/video_chroma/i422_yuy2.c ++++ b/modules/video_chroma/i422_yuy2.c +@@ -39,9 +39,9 @@ + + #define SRC_FOURCC "I422" + #if defined (MODULE_NAME_IS_i422_yuy2) +-# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211" ++# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,Y211" + #else +-# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" ++# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" + #endif + + /***************************************************************************** +@@ -53,12 +53,10 @@ static void I422_YUY2 ( filter_t *, picture_t *, picture_t * ); + static void I422_YVYU ( filter_t *, picture_t *, picture_t * ); + static void I422_UYVY ( filter_t *, picture_t *, picture_t * ); + static void I422_IUYV ( filter_t *, picture_t *, picture_t * ); +-static void I422_cyuv ( filter_t *, picture_t *, picture_t * ); + static picture_t *I422_YUY2_Filter ( filter_t *, picture_t * ); + static picture_t *I422_YVYU_Filter ( filter_t *, picture_t * ); + static picture_t *I422_UYVY_Filter ( filter_t *, picture_t * ); + static picture_t *I422_IUYV_Filter ( filter_t *, picture_t * ); +-static picture_t *I422_cyuv_Filter ( filter_t *, picture_t * ); + #if defined (MODULE_NAME_IS_i422_yuy2) + static void I422_Y211 ( filter_t *, picture_t *, picture_t * ); + static picture_t *I422_Y211_Filter ( filter_t *, picture_t * ); +@@ -130,10 +128,6 @@ static int Activate( vlc_object_t *p_this ) + p_filter->pf_video_filter = I422_IUYV_Filter; + break; + +- case VLC_CODEC_CYUV: +- p_filter->pf_video_filter = I422_cyuv_Filter; +- break; +- + #if defined (MODULE_NAME_IS_i422_yuy2) + case VLC_CODEC_Y211: + p_filter->pf_video_filter = I422_Y211_Filter; +@@ -157,7 +151,6 @@ VIDEO_FILTER_WRAPPER( I422_YUY2 ) + VIDEO_FILTER_WRAPPER( I422_YVYU ) + VIDEO_FILTER_WRAPPER( I422_UYVY ) + VIDEO_FILTER_WRAPPER( I422_IUYV ) +-VIDEO_FILTER_WRAPPER( I422_cyuv ) + #if defined (MODULE_NAME_IS_i422_yuy2) + VIDEO_FILTER_WRAPPER( I422_Y211 ) + #endif +@@ -456,104 +449,6 @@ static void I422_IUYV( filter_t *p_filter, picture_t *p_source, + } + + /***************************************************************************** +- * I422_cyuv: planar YUV 4:2:2 to upside-down packed UYVY 4:2:2 +- *****************************************************************************/ +-VLC_TARGET +-static void I422_cyuv( filter_t *p_filter, picture_t *p_source, +- picture_t *p_dest ) +-{ +- uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_visible_lines * p_dest->p->i_pitch; +- uint8_t *p_y = p_source->Y_PIXELS; +- uint8_t *p_u = p_source->U_PIXELS; +- uint8_t *p_v = p_source->V_PIXELS; +- +- int i_x, i_y; +- +- const int i_source_margin = p_source->p[0].i_pitch +- - p_source->p[0].i_visible_pitch; +- const int i_source_margin_c = p_source->p[1].i_pitch +- - p_source->p[1].i_visible_pitch; +- const int i_dest_margin = p_dest->p->i_pitch +- - p_dest->p->i_visible_pitch; +- +-#if defined (MODULE_NAME_IS_i422_yuy2_sse2) +- +- if( 0 == (15 & (p_source->p[Y_PLANE].i_pitch|p_dest->p->i_pitch| +- ((intptr_t)p_line|(intptr_t)p_y))) ) +- { +- /* use faster SSE2 aligned fetch and store */ +- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) +- { +- p_line -= 2 * p_dest->p->i_pitch; +- +- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) +- { +- SSE2_CALL( SSE2_YUV422_UYVY_ALIGNED ); +- } +- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) +- { +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +- } +- p_y += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line += i_dest_margin; +- } +- } +- else { +- /* use slower SSE2 unaligned fetch and store */ +- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) +- { +- p_line -= 2 * p_dest->p->i_pitch; +- +- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) +- { +- SSE2_CALL( SSE2_YUV422_UYVY_UNALIGNED ); +- } +- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) +- { +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +- } +- p_y += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line += i_dest_margin; +- } +- } +- SSE2_END; +- +-#else +- +- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) +- { +- for( i_x = p_filter->fmt_in.video.i_width / 8 ; i_x-- ; ) +- { +- p_line -= 2 * p_dest->p->i_pitch; +- +-#if defined (MODULE_NAME_IS_i422_yuy2) +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); +-#elif defined (MODULE_NAME_IS_i422_yuy2_mmx) +- MMX_CALL( MMX_YUV422_UYVY ); +-#endif +- } +- p_y += i_source_margin; +- p_u += i_source_margin_c; +- p_v += i_source_margin_c; +- p_line += i_dest_margin; +- } +-#if defined (MODULE_NAME_IS_i422_yuy2_mmx) +- MMX_END; +-#elif defined (MODULE_NAME_IS_i422_yuy2_sse2) +- SSE2_END; +-#endif +- +-#endif +-} +- +-/***************************************************************************** + * I422_Y211: planar YUV 4:2:2 to packed YUYV 2:1:1 + *****************************************************************************/ + #if defined (MODULE_NAME_IS_i422_yuy2) +diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c +index 134cfa5..4adff8b 100644 +--- a/modules/video_chroma/yuy2_i420.c ++++ b/modules/video_chroma/yuy2_i420.c +@@ -33,7 +33,7 @@ + #include <vlc_plugin.h> + #include <vlc_filter.h> + +-#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv" ++#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" + #define DEST_FOURCC "I420" + + /***************************************************************************** +@@ -44,12 +44,10 @@ static int Activate ( vlc_object_t * ); + static void YUY2_I420 ( filter_t *, picture_t *, picture_t * ); + static void YVYU_I420 ( filter_t *, picture_t *, picture_t * ); + static void UYVY_I420 ( filter_t *, picture_t *, picture_t * ); +-static void cyuv_I420 ( filter_t *, picture_t *, picture_t * ); + + static picture_t *YUY2_I420_Filter ( filter_t *, picture_t * ); + static picture_t *YVYU_I420_Filter ( filter_t *, picture_t * ); + static picture_t *UYVY_I420_Filter ( filter_t *, picture_t * ); +-static picture_t *cyuv_I420_Filter ( filter_t *, picture_t * ); + + /***************************************************************************** + * Module descriptor +@@ -97,10 +95,6 @@ static int Activate( vlc_object_t *p_this ) + p_filter->pf_video_filter = UYVY_I420_Filter; + break; + +- case VLC_CODEC_CYUV: +- p_filter->pf_video_filter = cyuv_I420_Filter; +- break; +- + default: + return -1; + } +@@ -116,7 +110,6 @@ static int Activate( vlc_object_t *p_this ) + VIDEO_FILTER_WRAPPER( YUY2_I420 ) + VIDEO_FILTER_WRAPPER( YVYU_I420 ) + VIDEO_FILTER_WRAPPER( UYVY_I420 ) +-VIDEO_FILTER_WRAPPER( cyuv_I420 ) + + /***************************************************************************** + * YUY2_I420: packed YUY2 4:2:2 to planar YUV 4:2:0 +@@ -321,72 +314,3 @@ static void UYVY_I420( filter_t *p_filter, picture_t *p_source, + b_skip = !b_skip; + } + } +- +-/***************************************************************************** +- * cyuv_I420: upside-down packed UYVY 4:2:2 to planar YUV 4:2:0 +- * FIXME +- *****************************************************************************/ +-static void cyuv_I420( filter_t *p_filter, picture_t *p_source, +- picture_t *p_dest ) +-{ +- uint8_t *p_line = p_source->p->p_pixels; +- +- uint8_t *p_y = p_dest->Y_PIXELS; +- uint8_t *p_u = p_dest->U_PIXELS; +- uint8_t *p_v = p_dest->V_PIXELS; +- +- int i_x, i_y; +- +- const int i_dest_margin = p_dest->p[0].i_pitch +- - p_dest->p[0].i_visible_pitch; +- const int i_dest_margin_c = p_dest->p[1].i_pitch +- - p_dest->p[1].i_visible_pitch; +- const int i_source_margin = p_source->p->i_pitch +- - p_source->p->i_visible_pitch; +- +- bool b_skip = false; +- +- for( i_y = p_filter->fmt_out.video.i_height ; i_y-- ; ) +- { +- if( b_skip ) +- { +- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) +- { +- #define C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ) \ +- *p_y++ = *p_line++; p_line++; \ +- *p_y++ = *p_line++; p_line++ +- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); +- } +- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) +- { +- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); +- } +- } +- else +- { +- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) +- { +- #define C_cyuv_YUV422( p_line, p_y, p_u, p_v ) \ +- *p_y++ = *p_line++; *p_v++ = *p_line++; \ +- *p_y++ = *p_line++; *p_u++ = *p_line++ +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- } +- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) +- { +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- } +- } +- p_line += i_source_margin; +- p_y += i_dest_margin; +- p_u += i_dest_margin_c; +- p_v += i_dest_margin_c; +- +- b_skip = !b_skip; +- } +-} +diff --git a/modules/video_chroma/yuy2_i422.c b/modules/video_chroma/yuy2_i422.c +index 8ab149e..d748be6 100644 +--- a/modules/video_chroma/yuy2_i422.c ++++ b/modules/video_chroma/yuy2_i422.c +@@ -33,7 +33,7 @@ + #include <vlc_plugin.h> + #include <vlc_filter.h> + +-#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv" ++#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" + #define DEST_FOURCC "I422" + + /***************************************************************************** +@@ -44,11 +44,9 @@ static int Activate ( vlc_object_t * ); + static void YUY2_I422 ( filter_t *, picture_t *, picture_t * ); + static void YVYU_I422 ( filter_t *, picture_t *, picture_t * ); + static void UYVY_I422 ( filter_t *, picture_t *, picture_t * ); +-static void cyuv_I422 ( filter_t *, picture_t *, picture_t * ); + static picture_t *YUY2_I422_Filter ( filter_t *, picture_t * ); + static picture_t *YVYU_I422_Filter ( filter_t *, picture_t * ); + static picture_t *UYVY_I422_Filter ( filter_t *, picture_t * ); +-static picture_t *cyuv_I422_Filter ( filter_t *, picture_t * ); + + /***************************************************************************** + * Module descriptor +@@ -96,10 +94,6 @@ static int Activate( vlc_object_t *p_this ) + p_filter->pf_video_filter = UYVY_I422_Filter; + break; + +- case VLC_CODEC_CYUV: +- p_filter->pf_video_filter = cyuv_I422_Filter; +- break; +- + default: + return -1; + } +@@ -116,7 +110,6 @@ static int Activate( vlc_object_t *p_this ) + VIDEO_FILTER_WRAPPER( YUY2_I422 ) + VIDEO_FILTER_WRAPPER( YVYU_I422 ) + VIDEO_FILTER_WRAPPER( UYVY_I422 ) +-VIDEO_FILTER_WRAPPER( cyuv_I422 ) + + /***************************************************************************** + * YUY2_I422: packed YUY2 4:2:2 to planar YUV 4:2:2 +@@ -249,48 +242,3 @@ static void UYVY_I422( filter_t *p_filter, picture_t *p_source, + p_v += i_dest_margin_c; + } + } +- +-/***************************************************************************** +- * cyuv_I422: upside-down packed UYVY 4:2:2 to planar YUV 4:2:2 +- * FIXME +- *****************************************************************************/ +-static void cyuv_I422( filter_t *p_filter, picture_t *p_source, +- picture_t *p_dest ) +-{ +- uint8_t *p_line = p_source->p->p_pixels; +- +- uint8_t *p_y = p_dest->Y_PIXELS; +- uint8_t *p_u = p_dest->U_PIXELS; +- uint8_t *p_v = p_dest->V_PIXELS; +- +- int i_x, i_y; +- +- const int i_dest_margin = p_dest->p[0].i_pitch +- - p_dest->p[0].i_visible_pitch; +- const int i_dest_margin_c = p_dest->p[1].i_pitch +- - p_dest->p[1].i_visible_pitch; +- const int i_source_margin = p_source->p->i_pitch +- - p_source->p->i_visible_pitch; +- +- for( i_y = p_filter->fmt_out.video.i_height ; i_y-- ; ) +- { +- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) +- { +-#define C_cyuv_YUV422( p_line, p_y, p_u, p_v ) \ +- *p_y++ = *p_line++; *p_v++ = *p_line++; \ +- *p_y++ = *p_line++; *p_u++ = *p_line++ +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- } +- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) +- { +- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); +- } +- p_line += i_source_margin; +- p_y += i_dest_margin; +- p_u += i_dest_margin_c; +- p_v += i_dest_margin_c; +- } +-} diff --git a/vlc-video_chroma-sse2.patch b/vlc-video_chroma-sse2.patch new file mode 100644 index 0000000..e7d1ec1 --- /dev/null +++ b/vlc-video_chroma-sse2.patch @@ -0,0 +1,33 @@ +commit 0dd405cca1425b3496e0659c7b124cb188cf3166 +Author: Nicolas Chauvet <kwizart@gmail.com> +Date: Sun Apr 26 23:01:57 2015 +0200 + + Fix SSE caling convention without SSE/SSE2 enabled + + video_chroma/i420_yuy2.c: In function 'I420_YVYU_Filter': + video_chroma/i420_yuy2.c:187:23: error: calling 'I420_YVYU.isra.1' + with SSE caling convention without SSE/SSE2 enabled + VIDEO_FILTER_WRAPPER( I420_YVYU ) + ^ + ../include/vlc_filter.h:266:13: note: in definition of macro 'VIDEO_FILTER_WRAPPER' + name( p_filter, p_pic, p_outpic ); \ + ^ + +diff --git a/modules/video_chroma/Makefile.am b/modules/video_chroma/Makefile.am +index aa1a826..b1bb426 100644 +--- a/modules/video_chroma/Makefile.am ++++ b/modules/video_chroma/Makefile.am +@@ -84,11 +84,11 @@ libi420_rgb_sse2_plugin_la_SOURCES = video_chroma/i420_rgb.c video_chroma/i420_r + libi420_rgb_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 + + libi420_yuy2_sse2_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h +-libi420_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ ++libi420_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 \ + -DMODULE_NAME_IS_i420_yuy2_sse2 + + libi422_yuy2_sse2_plugin_la_SOURCES = video_chroma/i422_yuy2.c video_chroma/i422_yuy2.h +-libi422_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ ++libi422_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 \ + -DMODULE_NAME_IS_i422_yuy2_sse2 + + if HAVE_SSE2 diff --git a/vlc.spec b/vlc.spec index 5257518..e68f4c1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,6 +38,8 @@ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-backport-freerdp.patch +Patch1: vlc-backport-chroma_dead_CYUV.patch +Patch2: vlc-video_chroma-sse2.patch BuildRequires: desktop-file-utils @@ -219,6 +221,8 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 -b .sse2 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From 40c9b0990baf4e2a04c8255281009bf49252d101 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 28 Apr 2015 22:00:06 +0000 Subject: [PATCH 252/671] Fix build on f22 --- vlc-video_chroma-sse2.patch | 33 --------------------------------- vlc.spec | 10 ++++++++-- 2 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 vlc-video_chroma-sse2.patch diff --git a/vlc-video_chroma-sse2.patch b/vlc-video_chroma-sse2.patch deleted file mode 100644 index e7d1ec1..0000000 --- a/vlc-video_chroma-sse2.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 0dd405cca1425b3496e0659c7b124cb188cf3166 -Author: Nicolas Chauvet <kwizart@gmail.com> -Date: Sun Apr 26 23:01:57 2015 +0200 - - Fix SSE caling convention without SSE/SSE2 enabled - - video_chroma/i420_yuy2.c: In function 'I420_YVYU_Filter': - video_chroma/i420_yuy2.c:187:23: error: calling 'I420_YVYU.isra.1' - with SSE caling convention without SSE/SSE2 enabled - VIDEO_FILTER_WRAPPER( I420_YVYU ) - ^ - ../include/vlc_filter.h:266:13: note: in definition of macro 'VIDEO_FILTER_WRAPPER' - name( p_filter, p_pic, p_outpic ); \ - ^ - -diff --git a/modules/video_chroma/Makefile.am b/modules/video_chroma/Makefile.am -index aa1a826..b1bb426 100644 ---- a/modules/video_chroma/Makefile.am -+++ b/modules/video_chroma/Makefile.am -@@ -84,11 +84,11 @@ libi420_rgb_sse2_plugin_la_SOURCES = video_chroma/i420_rgb.c video_chroma/i420_r - libi420_rgb_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 - - libi420_yuy2_sse2_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h --libi420_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ -+libi420_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 \ - -DMODULE_NAME_IS_i420_yuy2_sse2 - - libi422_yuy2_sse2_plugin_la_SOURCES = video_chroma/i422_yuy2.c video_chroma/i422_yuy2.h --libi422_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ -+libi422_yuy2_sse2_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSSE2 \ - -DMODULE_NAME_IS_i422_yuy2_sse2 - - if HAVE_SSE2 diff --git a/vlc.spec b/vlc.spec index e68f4c1..935033c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,6 @@ URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: vlc-backport-freerdp.patch Patch1: vlc-backport-chroma_dead_CYUV.patch -Patch2: vlc-video_chroma-sse2.patch BuildRequires: desktop-file-utils @@ -222,7 +221,6 @@ JACK audio plugin for the VLC media player. %setup -q -n %{name}-%{version}%{?vlc_rc} %patch0 -p1 %patch1 -p1 -%patch2 -p1 -b .sse2 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -235,6 +233,12 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %configure \ --disable-dependency-tracking \ + --disable-optimizations \ +%if 0%{?fedora} >= 22 +%ifarch i686 + --disable-mmx --disable-sse \ +%endif +%endif --disable-silent-rules \ --with-pic \ --disable-rpath \ @@ -478,6 +482,8 @@ fi || : %changelog * Sun Apr 26 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-3 - Fix build with freerdp for f22 +- Disable optimizations +- Disable mmx and sse on fedora >= 22 * Thu Apr 16 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-2 - Rebuilt for x265 From 4629e74286d8f56a924f6dc7d5bddf015cf29234 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 9 May 2015 07:44:38 +0000 Subject: [PATCH 253/671] fix rfbz#3639 --- vlc.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 935033c..456d673 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -318,11 +318,15 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ #Fix unowned directories rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc +#Ghost the plugins cache +touch $RPM_BUILD_ROOT%{_libdir}/vlc/plugins.dat + %find_lang %{name} %post +%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -332,6 +336,7 @@ fi %post core -p /sbin/ldconfig %postun +%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then @@ -446,6 +451,7 @@ fi || : } %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so +%ghost %{_libdir}/vlc/plugins.dat %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* @@ -480,6 +486,10 @@ fi || : %changelog +* Sat May 09 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-4 +- Recreate the plugins cache on post for main - rfbz#3639 +- %%ghost the cache plugins + * Sun Apr 26 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-3 - Fix build with freerdp for f22 - Disable optimizations From 6fa6783a36253a69017cc9688bf548365433afe4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 13 May 2015 16:10:22 +0000 Subject: [PATCH 254/671] Update to current bugfix --- vlc-2.2x-bugfix-20150513.patch | 1883 +++++++++++++++++++++++++++ vlc-backport-chroma_dead_CYUV.patch | 560 -------- vlc-backport-freerdp.patch | 54 - vlc.spec | 9 +- 4 files changed, 1888 insertions(+), 618 deletions(-) create mode 100644 vlc-2.2x-bugfix-20150513.patch delete mode 100644 vlc-backport-chroma_dead_CYUV.patch delete mode 100644 vlc-backport-freerdp.patch diff --git a/vlc-2.2x-bugfix-20150513.patch b/vlc-2.2x-bugfix-20150513.patch new file mode 100644 index 0000000..4b73c02 --- /dev/null +++ b/vlc-2.2x-bugfix-20150513.patch @@ -0,0 +1,1883 @@ +diff --git a/NEWS b/NEWS +index a97c82b..9483432 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,28 @@ ++Changes between 2.2.1 and 2.2.2: ++-------------------------------- ++ ++Access: ++ * Fix SetupFormat for continuous framesize in v4l2 ++ ++Demux: ++ * Fix support for ms-dvr files ++ * HLS: fix hang on stop, crashes and small improvements ++ * Fix mp4 NULL dereference reported by by Fortinet's FortiGuard Labs ++ ++Decoders: ++ * Fix importing surface from main memory in VDPAU ++ ++Audio output: ++ * Fix audio drop after a flush with pulseaudio ++ ++Skins2: ++ * Fix video control that fails to show up ++ ++Misc: ++ * Fix build if one disables XCB but activate VDPAU on Unix ++ * Fix build with recent FreeRDP versions ++ ++ + Changes between 2.2.0 and 2.2.1: + -------------------------------- + +@@ -8,7 +33,7 @@ Codec: + * Fix lpcm channel ordering + * Fix potential NULL dereference in dmo + * Fix teletext framing code in DVB PES packets +- * Fix potential buffer overflow in schroendinger decoder ++ * Fix potential buffer overflow in schroendinger decoder (CVE-2014-9629) + * Fix AAC samplerate + + Demuxers: +@@ -244,13 +269,14 @@ Audio output: + + Security: + * Fix heap overflow in decomp stream filter +- * Fix buffer overflow in updater ++ * Fix buffer overflow in updater (CVE-2014-9625) + * Fix potential buffer overflow in schroedinger encoder + * Fix null-pointer dereference in DMO decoder +- * Fix buffer overflow in parsing of string boxes in mp4 demuxer ++ * Fix buffer overflow in parsing of string boxes in mp4 demuxer (CVE-2014-9626,9627,9628) + * Fix SRTP integer overflow + * Fix potential crash in zip access + * Fix read overflow in Ogg demuxer ++ * Fix RTP overflow (CVE-2014-9630) + + Win32 installer: + * Update translations and greek encoding +diff --git a/configure.ac b/configure.ac +index 121e8c9..35fb2df 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,10 +2,10 @@ dnl Autoconf settings for vlc + + AC_COPYRIGHT([Copyright 1999-2015 VLC authors and VideoLAN]) + +-AC_INIT(vlc, 2.2.1) ++AC_INIT(vlc, 2.2.2) + VERSION_MAJOR=2 + VERSION_MINOR=2 +-VERSION_REVISION=1 ++VERSION_REVISION=2 + VERSION_EXTRA=0 + VERSION_DEV= + +@@ -13,7 +13,7 @@ PKGDIR="vlc" + AC_SUBST(PKGDIR) + + CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" +-CODENAME="Terry Pratchett (Weatherwax)" ++CODENAME="Weatherwax" + COPYRIGHT_YEARS="1996-2015" + + AC_CONFIG_SRCDIR(src/libvlc.c) +diff --git a/contrib/src/dvdnav/rules.mak b/contrib/src/dvdnav/rules.mak +index bb5f958..9080930 100644 +--- a/contrib/src/dvdnav/rules.mak ++++ b/contrib/src/dvdnav/rules.mak +@@ -8,7 +8,7 @@ ifdef GPL + PKGS += dvdnav + endif + endif +-ifeq ($(call need_pkg,"dvdnav > 5.0.0"),) ++ifeq ($(call need_pkg,"dvdnav >= 5.0.3"),) + PKGS_FOUND += dvdnav + endif + +diff --git a/contrib/src/dvdread/rules.mak b/contrib/src/dvdread/rules.mak +index 14bfe3e..157c4a9 100644 +--- a/contrib/src/dvdread/rules.mak ++++ b/contrib/src/dvdread/rules.mak +@@ -7,7 +7,7 @@ ifdef GPL + PKGS += dvdread + endif + endif +-ifeq ($(call need_pkg,"dvdread > 5.0.2 "),) ++ifeq ($(call need_pkg,"dvdread >= 5.0.3"),) + PKGS_FOUND += dvdread + endif + +diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak +index 9d87c29..4a5ac16 100644 +--- a/contrib/src/ebml/rules.mak ++++ b/contrib/src/ebml/rules.mak +@@ -14,10 +14,10 @@ libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml + $(MOVE) + + # libebml requires exceptions +-EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" \ ++EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions -fvisibility=hidden" \ + CPPFLAGS="" + + .ebml: libebml +- cd $< && $(HOSTVARS) ./configure $(HOSTCONF) ++ cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(EBML_EXTRA_FLAGS) + cd $< && $(MAKE) install + touch $@ +diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak +index b8d0165..c71ee83 100644 +--- a/contrib/src/matroska/rules.mak ++++ b/contrib/src/matroska/rules.mak +@@ -16,7 +16,9 @@ libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska + $(UNPACK) + $(MOVE) + ++MATROSKA_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" ++ + .matroska: libmatroska +- cd $< && $(HOSTVARS) ./configure $(HOSTCONF) ++ cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(MATROSKA_EXTRA_FLAGS) + cd $< && $(MAKE) install + touch $@ +diff --git a/contrib/src/upnp/missing_win32.patch b/contrib/src/upnp/missing_win32.patch +new file mode 100644 +index 0000000..c5f80d0 +--- /dev/null ++++ b/contrib/src/upnp/missing_win32.patch +@@ -0,0 +1,13 @@ ++--- upnp_clean/upnp/inc/upnp.h 2015-04-30 14:37:26.962425889 +0200 +++++ upnp/upnp/inc/upnp.h 2015-04-30 14:41:48.099528162 +0200 ++@@ -41,6 +41,10 @@ ++ * \file ++ */ ++ +++#ifdef _WIN32 +++# define WIN32 +++#endif +++ ++ #include "ixml.h" ++ #include "upnpconfig.h" ++ #include "UpnpGlobal.h" +diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak +index f6706b1..14d05c0 100644 +--- a/contrib/src/upnp/rules.mak ++++ b/contrib/src/upnp/rules.mak +@@ -25,6 +25,7 @@ ifdef HAVE_WIN32 + endif + $(APPLY) $(SRC)/upnp/libupnp-ipv6.patch + $(APPLY) $(SRC)/upnp/miniserver.patch ++ $(APPLY) $(SRC)/upnp/missing_win32.patch + $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub build-aux/ + $(MOVE) + +diff --git a/contrib/src/vpx/SHA512SUMS b/contrib/src/vpx/SHA512SUMS +index 84d2a30..7923cbc 100644 +--- a/contrib/src/vpx/SHA512SUMS ++++ b/contrib/src/vpx/SHA512SUMS +@@ -1 +1 @@ +-af26766a3336155c5bc7b8cce7c23228de054287b990f9cacdc35273384a7af4999c01bb623d12143f40107036308a8b3207081efe67936748503c30c985fd6b libvpx-v1.3.0.tar.bz2 ++70234220e0ed64db000689ec8bea02dadef938a4f4dea96e5781d361c15245456212c1b6aec2b698d32ed423e73917d2303009e49224a2237669cab416dd6984 libvpx-1.4.0.tar.bz2 +diff --git a/contrib/src/vpx/libvpx-ios.patch b/contrib/src/vpx/libvpx-ios.patch +index 852792d..504860c 100644 +--- a/contrib/src/vpx/libvpx-ios.patch ++++ b/contrib/src/vpx/libvpx-ios.patch +@@ -1,78 +1,75 @@ +-diff -ru libvpx/build/make/configure.sh libvpx/build/make/configure.sh +---- libvpx/build/make/configure.sh 2014-11-04 21:34:04.000000000 +0100 +-+++ libvpx/build/make/configure.sh 2014-11-04 21:36:12.000000000 +0100 +-@@ -714,59 +714,6 @@ +- # PIC is probably what we want when building shared libs +- enabled shared && soft_enable pic ++--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:10:54.667129298 +0200 +++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:13:53.650560142 +0200 ++@@ -745,58 +745,6 @@ ++ # Minimum iOS version for all target platforms (darwin and iphonesimulator). ++ IOS_VERSION_MIN="6.0" + +-- # Handle darwin variants. Newer SDKs allow targeting older +-- # platforms, so find the newest SDK available. +-- case ${toolchain} in +-- *-darwin*) +-- if [ -z "${DEVELOPER_DIR}" ]; then +-- DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null` +-- [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1 +-- fi +-- if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then +-- OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs" +-- OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk" +-- OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk" +-- for v in ${OSX_SDK_VERSIONS}; do +-- if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then +-- osx_sdk_dir="${OSX_SDK_ROOTS}/${v}" +-- fi +-- done +-- fi +-- ;; +-- esac +-- +-- if [ -d "${osx_sdk_dir}" ]; then ++- # Handle darwin variants. Newer SDKs allow targeting older ++- # platforms, so use the newest one available. ++- case ${toolchain} in ++- *-darwin*) ++- osx_sdk_dir="$(show_darwin_sdk_path macosx)" ++- if [ -d "${osx_sdk_dir}" ]; then + - add_cflags "-isysroot ${osx_sdk_dir}" + - add_ldflags "-isysroot ${osx_sdk_dir}" +-- fi ++- fi ++- ;; ++- esac + - +-- case ${toolchain} in +-- *-darwin8-*) +-- add_cflags "-mmacosx-version-min=10.4" +-- add_ldflags "-mmacosx-version-min=10.4" +-- ;; +-- *-darwin9-*) +-- add_cflags "-mmacosx-version-min=10.5" +-- add_ldflags "-mmacosx-version-min=10.5" +-- ;; +-- *-darwin10-*) +-- add_cflags "-mmacosx-version-min=10.6" +-- add_ldflags "-mmacosx-version-min=10.6" +-- ;; +-- *-darwin11-*) +-- add_cflags "-mmacosx-version-min=10.7" +-- add_ldflags "-mmacosx-version-min=10.7" +-- ;; +-- *-darwin12-*) +-- add_cflags "-mmacosx-version-min=10.8" +-- add_ldflags "-mmacosx-version-min=10.8" +-- ;; +-- *-darwin13-*) +-- add_cflags "-mmacosx-version-min=10.9" +-- add_ldflags "-mmacosx-version-min=10.9" +-- ;; +-- esac ++- case ${toolchain} in ++- *-darwin8-*) ++- add_cflags "-mmacosx-version-min=10.4" ++- add_ldflags "-mmacosx-version-min=10.4" ++- ;; ++- *-darwin9-*) ++- add_cflags "-mmacosx-version-min=10.5" ++- add_ldflags "-mmacosx-version-min=10.5" ++- ;; ++- *-darwin10-*) ++- add_cflags "-mmacosx-version-min=10.6" ++- add_ldflags "-mmacosx-version-min=10.6" ++- ;; ++- *-darwin11-*) ++- add_cflags "-mmacosx-version-min=10.7" ++- add_ldflags "-mmacosx-version-min=10.7" ++- ;; ++- *-darwin12-*) ++- add_cflags "-mmacosx-version-min=10.8" ++- add_ldflags "-mmacosx-version-min=10.8" ++- ;; ++- *-darwin13-*) ++- add_cflags "-mmacosx-version-min=10.9" ++- add_ldflags "-mmacosx-version-min=10.9" ++- ;; ++- *-darwin14-*) ++- add_cflags "-mmacosx-version-min=10.10" ++- add_ldflags "-mmacosx-version-min=10.10" ++- ;; ++- *-iphonesimulator-*) ++- add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" ++- add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" ++- iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)" ++- if [ -d "${iossim_sdk_dir}" ]; then ++- add_cflags "-isysroot ${iossim_sdk_dir}" ++- add_ldflags "-isysroot ${iossim_sdk_dir}" ++- fi ++- ;; ++- esac + - +- # Handle Solaris variants. Solaris 10 needs -lposix4 +- case ${toolchain} in +- sparc-solaris-*) +-@@ -1070,7 +1017,13 @@ +- ;; +- gcc*) +- add_cflags -m${bits} +-- add_ldflags -m${bits} +-+ case ${tgt_os} in +-+ darwin*) +-+ ;; +-+ *) +-+ add_ldflags -m${bits} +-+ ;; +-+ esac +- link_with_cc=gcc +- tune_cflags="-march=" +- setup_gnu_toolchain ++ # Handle Solaris variants. Solaris 10 needs -lposix4 ++ case ${toolchain} in ++ sparc-solaris-*) ++@@ -1149,6 +1097,13 @@ ++ case ${tgt_cc} in ++ gcc*) ++ add_cflags -m${bits} +++ case ${tgt_os} in +++ darwin*) +++ ;; +++ *) +++ add_ldflags -m${bits} +++ ;; +++ esac ++ add_ldflags -m${bits} ++ ;; ++ esac +diff --git a/contrib/src/vpx/libvpx-mac.patch b/contrib/src/vpx/libvpx-mac.patch +index ebb868a..7e41283 100644 +--- a/contrib/src/vpx/libvpx-mac.patch ++++ b/contrib/src/vpx/libvpx-mac.patch +@@ -1,18 +1,43 @@ +-libvpx's configure script hard-codes the SDK location of previous Xcode release in the /Developer folder. However, starting with Xcode 4.3, the SDKs moved to /Applications/Xcode.app/blabla +-VLC's contrib system is clever enough to detect this, but libvpx fails miserably. However, they are providing a work-around for iOS and Android, which is expanded by this patch. +- +-diff -ru libvpx/build/make/configure.sh libvpx/build/make/configure.sh +---- libvpx/build/make/configure.sh 2012-06-08 10:26:47.000000000 +0200 +-+++ libvpx-fixed/build/make/configure.sh 2012-06-08 10:26:07.000000000 +0200 +-@@ -628,6 +628,11 @@ +- if [ -d "/Developer/SDKs/MacOSX10.7.sdk" ]; then +- osx_sdk_dir="/Developer/SDKs/MacOSX10.7.sdk" +- fi ++--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:03:00.504713016 +0200 +++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:05:52.358003947 +0200 ++@@ -751,6 +751,12 @@ ++ ;; ++ esac ++ +++ if [ -d "${sdk_path}" ]; then +++ case "${sdk_path}" in +++ darwin*) osx_sdk_dir=${sdk_path} ;; +++ esac +++ fi +++ ++ case ${toolchain} in ++ *-darwin8-*) ++ add_cflags "-mmacosx-version-min=10.4" ++--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:06:31.502087047 +0200 +++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:09:41.525727635 +0200 ++@@ -651,6 +651,12 @@ ++ ;; ++ esac ++ + + if [ -d "${sdk_path}" ]; then + + case "${sdk_path}" in + + darwin*) osx_sdk_dir=${sdk_path} ;; + + esac + + fi +++ ++ # detect tgt_os ++ case "$gcctarget" in ++ *darwin8*) ++@@ -751,12 +757,6 @@ ++ ;; ++ esac + +- case ${toolchain} in +- *-darwin8-*) ++- if [ -d "${sdk_path}" ]; then ++- case "${sdk_path}" in ++- darwin*) osx_sdk_dir=${sdk_path} ;; ++- esac ++- fi ++- ++ case ${toolchain} in ++ *-darwin8-*) ++ add_cflags "-mmacosx-version-min=10.4" +diff --git a/contrib/src/vpx/libvpx-no-cross.patch b/contrib/src/vpx/libvpx-no-cross.patch +index e261dc7..9881624 100644 +--- a/contrib/src/vpx/libvpx-no-cross.patch ++++ b/contrib/src/vpx/libvpx-no-cross.patch +@@ -1,10 +1,10 @@ +---- libvpx-v1.0.0/build/make/configure.sh.orig 2012-01-29 04:59:36.976441000 -0500 +-+++ libvpx-v1.0.0/build/make/configure.sh 2012-01-29 04:59:46.684441001 -0500 +-@@ -680,7 +680,6 @@ ++--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:00:58.682380921 +0200 +++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:02:13.537147158 +0200 ++@@ -831,7 +831,6 @@ + +- case ${tgt_cc} in ++ case ${tgt_cc} in + gcc) +-- CROSS=${CROSS:-arm-none-linux-gnueabi-} +- link_with_cc=gcc +- setup_gnu_toolchain +- arch_int=${tgt_isa##armv} ++- CROSS=${CROSS:-arm-none-linux-gnueabi-} ++ link_with_cc=gcc ++ setup_gnu_toolchain ++ arch_int=${tgt_isa##armv} +diff --git a/contrib/src/vpx/libvpx-sysroot.patch b/contrib/src/vpx/libvpx-sysroot.patch +index 9b84338..0ba43dc 100644 +--- a/contrib/src/vpx/libvpx-sysroot.patch ++++ b/contrib/src/vpx/libvpx-sysroot.patch +@@ -8,24 +8,19 @@ correct sysroot. + + See also https://code.google.com/p/webm/issues/detail?id=809 + +-diff --git a/build/make/configure.sh b/build/make/configure.sh +-index d4124c7..c420d25 100755 +---- a/build/make/configure.sh +-+++ b/build/make/configure.sh +-@@ -939,8 +939,11 @@ EOF +- awk '{ print $1 }' | tail -1` +- fi ++--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 15:57:26.568321902 +0200 +++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 15:59:04.860202562 +0200 ++@@ -941,8 +941,11 @@ ++ awk '{ print $1 }' | tail -1` ++ fi + +-- add_cflags "--sysroot=${alt_libc}" +-- add_ldflags "--sysroot=${alt_libc}" +-+ # this may happen if toolchain binaries are outside the ndk dir +-+ if [ "${alt_libc}" ]; then +-+ add_cflags "--sysroot=${alt_libc}" +-+ add_ldflags "--sysroot=${alt_libc}" +-+ fi ++- add_cflags "--sysroot=${alt_libc}" ++- add_ldflags "--sysroot=${alt_libc}" +++ # this may happen if toolchain binaries are outside the ndk dir +++ if [ "${alt_libc}" ]; then +++ add_cflags "--sysroot=${alt_libc}" +++ add_ldflags "--sysroot=${alt_libc}" +++ fi + +- # linker flag that routes around a CPU bug in some +- # Cortex-A8 implementations (NDK Dev Guide) +--- +-1.8.3.2 +- ++ # linker flag that routes around a CPU bug in some ++ # Cortex-A8 implementations (NDK Dev Guide) +diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak +index b55199d..ac3eace 100644 +--- a/contrib/src/vpx/rules.mak ++++ b/contrib/src/vpx/rules.mak +@@ -1,7 +1,7 @@ + # libvpx + +-VPX_VERSION := v1.3.0 +-VPX_URL := http://webm.googlecode.com/files/libvpx-$(VPX_VERSION).tar.bz2 ++VPX_VERSION := 1.4.0 ++VPX_URL := http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-$(VPX_VERSION).tar.bz2 + + $(TARBALLS)/libvpx-$(VPX_VERSION).tar.bz2: + $(call download,$(VPX_URL)) +diff --git a/extras/package/macosx/build-package.sh b/extras/package/macosx/build-package.sh +index a693c4f..fe4a52a 100644 +--- a/extras/package/macosx/build-package.sh ++++ b/extras/package/macosx/build-package.sh +@@ -248,13 +248,12 @@ done + + ########################## + # Build the lib folder +-vlc_install "lib/${prefix}" "libvlc.5.dylib" "${target_lib}" "library" +-vlc_install "src/${prefix}" "libvlccore.7.dylib" "${target_lib}" "library" +-pushd `pwd` > /dev/null +-cd ${target_lib} +-ln -sf libvlc.5.dylib libvlc.dylib +-ln -sf libvlccore.7.dylib libvlccore.dylib +-popd > /dev/null ++vlc_install "lib/${prefix}" "libvlc.*.dylib" "${target_lib}" "library" ++vlc_install "src/${prefix}" "libvlccore.*.dylib" "${target_lib}" "library" ++ ++# copy symlinks ++cp -RP "lib/${prefix}/libvlc.dylib" "${target_lib}" ++cp -RP "src/${prefix}/libvlccore.dylib" "${target_lib}" + + ########################## + # Build the share folder +diff --git a/extras/package/npapi.am b/extras/package/npapi.am +index e778f7d..da8a4f0 100644 +--- a/extras/package/npapi.am ++++ b/extras/package/npapi.am +@@ -9,8 +9,11 @@ fetch-npapi: + cd npapi-vlc && \ + git fetch origin && \ + git reset --hard origin/master; \ ++ git submodule update; \ + else \ +- git clone git://git.videolan.org/npapi-vlc.git npapi-vlc ; \ ++ git clone git://git.videolan.org/npapi-vlc.git npapi-vlc && \ ++ cd npapi-vlc && \ ++ git submodule update --init; \ + fi + git --git-dir=npapi-vlc/.git describe --long --always > stamp-npapi.tmp + if diff stamp-npapi.tmp stamp-npapi >/dev/null 2>&1; then \ +diff --git a/include/vlc_input.h b/include/vlc_input.h +index 6ec305b..13a944a 100644 +--- a/include/vlc_input.h ++++ b/include/vlc_input.h +@@ -53,6 +53,8 @@ struct seekpoint_t + static inline seekpoint_t *vlc_seekpoint_New( void ) + { + seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) ); ++ if( !point ) ++ return NULL; + point->i_byte_offset = + point->i_time_offset = -1; + point->psz_name = NULL; +@@ -96,6 +98,8 @@ typedef struct input_title_t + static inline input_title_t *vlc_input_title_New(void) + { + input_title_t *t = (input_title_t*)malloc( sizeof( input_title_t ) ); ++ if( !t ) ++ return NULL; + + t->psz_name = NULL; + t->b_menu = false; +diff --git a/modules/access/rdp.c b/modules/access/rdp.c +index a7280a59..0a11f42 100644 +--- a/modules/access/rdp.c ++++ b/modules/access/rdp.c +@@ -428,7 +428,9 @@ static int Open( vlc_object_t *p_this ) + if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; + p_sys->i_frame_interval = 1000000 / p_sys->f_fps; + ++#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 + freerdp_channels_global_init(); ++#endif + + p_sys->p_instance = freerdp_new(); + if ( !p_sys->p_instance ) +@@ -504,7 +506,9 @@ static void Close( vlc_object_t *p_this ) + + freerdp_disconnect( p_sys->p_instance ); + freerdp_free( p_sys->p_instance ); ++#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 + freerdp_channels_global_uninit(); ++#endif + + if ( p_sys->p_block ) + block_Release( p_sys->p_block ); +diff --git a/modules/access/rtsp/rtsp.c b/modules/access/rtsp/rtsp.c +index 7b1e606..f1aabc5 100644 +--- a/modules/access/rtsp/rtsp.c ++++ b/modules/access/rtsp/rtsp.c +@@ -88,7 +88,7 @@ const char rtsp_protocol_version[]="RTSP/1.0"; + + static char *rtsp_get( rtsp_client_t *rtsp ) + { +- char *psz_buffer = malloc( BUF_SIZE ); ++ char *psz_buffer = xmalloc( BUF_SIZE ); + char *psz_string = NULL; + + if( rtsp->pf_read_line( rtsp->p_userdata, (uint8_t*)psz_buffer, (unsigned int)BUF_SIZE ) >= 0 ) +@@ -109,7 +109,7 @@ static char *rtsp_get( rtsp_client_t *rtsp ) + static int rtsp_put( rtsp_client_t *rtsp, const char *psz_string ) + { + unsigned int i_buffer = strlen( psz_string ); +- char *psz_buffer = malloc( i_buffer + 3 ); ++ char *psz_buffer = xmalloc( i_buffer + 3 ); + int i_ret; + + strcpy( psz_buffer, psz_string ); +@@ -162,7 +162,7 @@ static int rtsp_send_request( rtsp_client_t *rtsp, const char *psz_type, + char *psz_buffer; + int i_ret; + +- psz_buffer = malloc( strlen(psz_type) + strlen(psz_what) + ++ psz_buffer = xmalloc( strlen(psz_type) + strlen(psz_what) + + sizeof("RTSP/1.0") + 2 ); + + sprintf( psz_buffer, "%s %s %s", psz_type, psz_what, "RTSP/1.0" ); +@@ -195,7 +195,7 @@ static void rtsp_schedule_standard( rtsp_client_t *rtsp ) + if( rtsp->p_private->session ) + { + char *buf; +- buf = malloc( strlen(rtsp->p_private->session) + 15 ); ++ buf = xmalloc( strlen(rtsp->p_private->session) + 15 ); + sprintf( buf, "Session: %s", rtsp->p_private->session ); + rtsp_schedule_field( rtsp, buf ); + free( buf ); +@@ -239,14 +239,14 @@ static int rtsp_get_answers( rtsp_client_t *rtsp ) + } + if( !strncasecmp( answer, "Server:", 7 ) ) + { +- char *buf = malloc( strlen(answer) ); ++ char *buf = xmalloc( strlen(answer) ); + sscanf( answer, "%*s %s", buf ); + free( rtsp->p_private->server ); + rtsp->p_private->server = buf; + } + if( !strncasecmp( answer, "Session:", 8 ) ) + { +- char *buf = malloc( strlen(answer) ); ++ char *buf = xmalloc( strlen(answer) ); + sscanf( answer, "%*s %s", buf ); + if( rtsp->p_private->session ) + { +@@ -305,7 +305,7 @@ int rtsp_request_options( rtsp_client_t *rtsp, const char *what ) + if( what ) buf = strdup(what); + else + { +- buf = malloc( strlen(rtsp->p_private->host) + 16 ); ++ buf = xmalloc( strlen(rtsp->p_private->host) + 16 ); + sprintf( buf, "rtsp://%s:%i", rtsp->p_private->host, + rtsp->p_private->port ); + } +@@ -325,7 +325,7 @@ int rtsp_request_describe( rtsp_client_t *rtsp, const char *what ) + } + else + { +- buf = malloc( strlen(rtsp->p_private->host) + ++ buf = xmalloc( strlen(rtsp->p_private->host) + + strlen(rtsp->p_private->path) + 16 ); + sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, + rtsp->p_private->port, rtsp->p_private->path ); +@@ -352,7 +352,7 @@ int rtsp_request_setparameter( rtsp_client_t *rtsp, const char *what ) + } + else + { +- buf = malloc( strlen(rtsp->p_private->host) + ++ buf = xmalloc( strlen(rtsp->p_private->host) + + strlen(rtsp->p_private->path) + 16 ); + sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, + rtsp->p_private->port, rtsp->p_private->path ); +@@ -374,7 +374,7 @@ int rtsp_request_play( rtsp_client_t *rtsp, const char *what ) + } + else + { +- buf = malloc( strlen(rtsp->p_private->host) + ++ buf = xmalloc( strlen(rtsp->p_private->host) + + strlen(rtsp->p_private->path) + 16 ); + sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, + rtsp->p_private->port, rtsp->p_private->path ); +@@ -431,7 +431,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, uint8_t *buffer, unsigned int size ) + + /* lets make the server happy */ + rtsp_put( rtsp, "RTSP/1.0 451 Parameter Not Understood" ); +- rest = malloc(17); ++ rest = xmalloc(17); + sprintf( rest,"CSeq: %u", seq ); + rtsp_put( rtsp, rest ); + rtsp_put( rtsp, "" ); +@@ -464,7 +464,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl, + unsigned int hostend, pathbegin, i; + + if( !psz_mrl ) return -1; +- s = malloc( sizeof(rtsp_t) ); ++ s = xmalloc( sizeof(rtsp_t) ); + rtsp->p_private = s; + + if( !strncmp( psz_mrl, "rtsp://", 7 ) ) psz_mrl += 7; +@@ -502,7 +502,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl, + pathbegin = slash - mrl_ptr; + hostend = colon - mrl_ptr; + +- s->host = malloc(hostend+1); ++ s->host = xmalloc(hostend+1); + strncpy( s->host, mrl_ptr, hostend ); + s->host[hostend] = 0; + +diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c +index fe5d1c9..b8544ea 100644 +--- a/modules/access/v4l2/video.c ++++ b/modules/access/v4l2/video.c +@@ -508,7 +508,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc, + width <= fse.stepwise.max_width; + width += fse.stepwise.step_width) + for (uint32_t height = fse.stepwise.min_height; +- height <= fse.stepwise.max_width; ++ height <= fse.stepwise.max_height; + height += fse.stepwise.step_height) + { + struct v4l2_fract cur_it; +diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c +index 4645306..48e0c6d 100644 +--- a/modules/audio_output/audiounit_ios.c ++++ b/modules/audio_output/audiounit_ios.c +@@ -252,13 +252,6 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt) + return false; + } + +- /* AU init */ +- status = AudioUnitInitialize(p_sys->au_unit); +- if (status != noErr) { +- msg_Err(p_aout, "failed to init AudioUnit (%i)", (int)status); +- return false; +- } +- + /* setup circular buffer */ + TPCircularBufferInit(&p_sys->circular_buffer, AUDIO_BUFFER_SIZE_IN_SECONDS * fmt->i_rate * fmt->i_bytes_per_frame); + +@@ -268,10 +261,17 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt) + NULL, + NULL); + +- /* Set audio session to mediaplayback */ +- UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; +- AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); +- AudioSessionSetActive(true); ++ /* Set audio session to mediaplayback */ ++ UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; ++ AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); ++ AudioSessionSetActive(true); ++ ++ /* AU init */ ++ status = AudioUnitInitialize(p_sys->au_unit); ++ if (status != noErr) { ++ msg_Err(p_aout, "failed to init AudioUnit (%i)", (int)status); ++ return false; ++ } + + /* start the unit */ + status = AudioOutputUnitStart(p_sys->au_unit); +@@ -292,6 +292,10 @@ static void Stop(audio_output_t *p_aout) + if (status != noErr) + msg_Warn(p_aout, "failed to stop AudioUnit (%i)", (int)status); + ++ status = AudioUnitUninitialize(p_sys->au_unit); ++ if (status != noErr) ++ msg_Warn(p_aout, "failed to uninit AudioUnit (%i)", (int)status); ++ + status = AudioComponentInstanceDispose(p_sys->au_unit); + if (status != noErr) + msg_Warn(p_aout, "failed to dispose Audio Component instance (%i)", (int)status); +@@ -340,10 +344,10 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date) + AudioOutputUnitStop(p_sys->au_unit); + AudioSessionSetActive(false); + } else { +- AudioOutputUnitStart(p_sys->au_unit); + UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; + AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); + AudioSessionSetActive(true); ++ AudioOutputUnitStart(p_sys->au_unit); + } + } + +@@ -411,11 +415,13 @@ static OSStatus RenderCallback(vlc_object_t *p_obj, + /* Pull audio from buffer */ + int32_t availableBytes; + Float32 *buffer = TPCircularBufferTail(&p_sys->circular_buffer, &availableBytes); ++ if (unlikely(bytesRequested == 0)) /* cannot be negative */ ++ return noErr; + + /* check if we have enough data */ + if (!availableBytes || p_sys->b_paused) { + /* return an empty buffer so silence is played until we have data */ +- memset(targetBuffer, 0, ioData->mBuffers[0].mDataByteSize); ++ memset(targetBuffer, 0, bytesRequested); + } else { + int32_t bytesToCopy = __MIN(bytesRequested, availableBytes); + +diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c +index 069cf6a..231769d 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -561,6 +561,9 @@ static void Flush(audio_output_t *aout, bool wait) + op = pa_stream_flush(s, NULL, NULL); + if (op != NULL) + pa_operation_unref(op); ++ sys->first_pts = VLC_TS_INVALID; ++ stream_stop(s, aout); ++ + pa_threaded_mainloop_unlock(sys->mainloop); + } + +diff --git a/modules/codec/png.c b/modules/codec/png.c +index 33f7515..36ed444 100644 +--- a/modules/codec/png.c ++++ b/modules/codec/png.c +@@ -372,6 +372,11 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic) + return NULL; + } + ++ /* Disable filtering to speed-up encoding */ ++ png_set_filter( p_png, 0, PNG_NO_FILTERS ); ++ /* 1 == best speed */ ++ png_set_compression_level( p_png, 1 ); ++ + /* save buffer start */ + uint8_t *p_start = p_block->p_buffer; + size_t i_start = p_block->i_buffer; +diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c +index b133410..f8406ed 100644 +--- a/modules/demux/asf/asf.c ++++ b/modules/demux/asf/asf.c +@@ -1344,7 +1344,7 @@ static int DemuxInit( demux_t *p_demux ) + if( fmt.i_codec == VLC_FOURCC( 'D','V','R',' ') ) + { + /* DVR-MS special ASF */ +- fmt.i_codec = VLC_FOURCC( 'm','p','g','2' ) ; ++ fmt.i_codec = VLC_CODEC_MPGV; + fmt.b_packetized = false; + } + +diff --git a/modules/demux/image.c b/modules/demux/image.c +index 5b56913..7809312 100644 +--- a/modules/demux/image.c ++++ b/modules/demux/image.c +@@ -147,8 +147,7 @@ static block_t *Decode(demux_t *demux, + + size_t size = 0; + for (int i = 0; i < image->i_planes; i++) +- size += image->p[i].i_visible_pitch * +- image->p[i].i_visible_lines; ++ size += image->p[i].i_pitch * image->p[i].i_lines; + + data = block_Alloc(size); + if (!data) { +diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c +index 3912e7e..331262b 100644 +--- a/modules/demux/mp4/libmp4.c ++++ b/modules/demux/mp4/libmp4.c +@@ -3576,6 +3576,15 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father ) + free( p_box ); + return NULL; + } ++ ++ if( p_father && p_father->i_size > 0 && ++ p_father->i_pos + p_father->i_size < p_box->i_pos + p_box->i_size ) ++ { ++ msg_Dbg( p_stream, "out of bound child" ); ++ free( p_box ); ++ return NULL; ++ } ++ + if( !p_box->i_size ) + { + msg_Dbg( p_stream, "found an empty box (null size)" ); +diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c +index 7a52103..46c5f9a 100644 +--- a/modules/demux/mp4/mp4.c ++++ b/modules/demux/mp4/mp4.c +@@ -4864,13 +4864,16 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track, + es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_nzdts ); + } + +- if ( p_track->p_es ) ++ if ( p_block ) + { +- p_block->i_dts = VLC_TS_0 + i_nzdts; +- p_block->i_pts = VLC_TS_0 + i_nzpts; +- es_out_Send( p_demux->out, p_track->p_es, p_block ); ++ if ( p_track->p_es ) ++ { ++ p_block->i_dts = VLC_TS_0 + i_nzdts; ++ p_block->i_pts = VLC_TS_0 + i_nzpts; ++ es_out_Send( p_demux->out, p_track->p_es, p_block ); ++ } ++ else block_Release( p_block ); + } +- else free( p_block ); + + chunk_size += len; + } +diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m +index 1fc4d6e..b749512 100644 +--- a/modules/gui/macosx/CoreInteraction.m ++++ b/modules/gui/macosx/CoreInteraction.m +@@ -258,12 +258,14 @@ static VLCCoreInteraction *_o_sharedInstance = nil; + return nil; + } + +- NSString *o_name; ++ NSString *o_name = @""; + char *format = var_InheritString(VLCIntf, "input-title-format"); +- char *formated = str_format_meta(p_input, format); +- free(format); +- o_name = [NSString stringWithUTF8String:formated]; +- free(formated); ++ if (format) { ++ char *formated = str_format_meta(p_input, format); ++ free(format); ++ o_name = toNSStr(formated); ++ free(formated); ++ } + + NSURL * o_url = [NSURL URLWithString:[NSString stringWithUTF8String:psz_uri]]; + free(psz_uri); +diff --git a/modules/gui/macosx/ExtensionsDialogProvider.m b/modules/gui/macosx/ExtensionsDialogProvider.m +index c7d6d08..d15966c 100644 +--- a/modules/gui/macosx/ExtensionsDialogProvider.m ++++ b/modules/gui/macosx/ExtensionsDialogProvider.m +@@ -111,6 +111,7 @@ static NSView *createControlFromWidget(extension_widget_t *widget, id self) + VLCDialogList *list = [[VLCDialogList alloc] init]; + [list setUsesAlternatingRowBackgroundColors:YES]; + [list setHeaderView:nil]; ++ [list setAllowsMultipleSelection:YES]; + [scrollView setDocumentView:list]; + [scrollView setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; + +@@ -203,7 +204,8 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget, + [popup removeAllItems]; + struct extension_widget_value_t *value; + for (value = widget->p_values; value != NULL; value = value->p_next) +- [popup addItemWithTitle:[NSString stringWithUTF8String:value->psz_text]]; ++ [[popup menu] addItemWithTitle:toNSStr(value->psz_text) action:nil keyEquivalent:@""]; ++ + [popup synchronizeTitleAndSelectedItem]; + [self popUpSelectionChanged:popup]; + break; +@@ -365,8 +367,9 @@ static ExtensionsDialogProvider *_o_sharedInstance = nil; + + struct extension_widget_value_t *value; + unsigned i = 0; ++ NSIndexSet *selectedIndexes = [list selectedRowIndexes]; + for (value = [list widget]->p_values; value != NULL; value = value->p_next, i++) +- value->b_selected = (i == [list selectedRow]); ++ value->b_selected = (YES == [selectedIndexes containsIndex:i]); + } + + - (void)popUpSelectionChanged:(id)sender +diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m +index 875c71f..b712413 100644 +--- a/modules/gui/macosx/MainWindow.m ++++ b/modules/gui/macosx/MainWindow.m +@@ -695,14 +695,16 @@ static VLCMainWindow *_o_sharedInstance = nil; + input_thread_t * p_input; + p_input = pl_CurrentInput(VLCIntf); + if (p_input) { +- NSString *aString; ++ NSString *aString = @""; + + if (!config_GetPsz(VLCIntf, "video-title")) { + char *format = var_InheritString(VLCIntf, "input-title-format"); +- char *formated = str_format_meta(p_input, format); +- free(format); +- aString = [NSString stringWithUTF8String:formated]; +- free(formated); ++ if (format) { ++ char *formated = str_format_meta(p_input, format); ++ free(format); ++ aString = toNSStr(formated); ++ free(formated); ++ } + } else + aString = [NSString stringWithUTF8String:config_GetPsz(VLCIntf, "video-title")]; + +diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m +index ddc0957..43bbe82 100644 +--- a/modules/gui/macosx/simple_prefs.m ++++ b/modules/gui/macosx/simple_prefs.m +@@ -105,6 +105,7 @@ static const char *const ppsz_language[] = + "es", + "es_MX", + "sv", ++ "ta", + "te", + "th", + "tr", +@@ -179,6 +180,7 @@ static const char *const ppsz_language_text[] = + "Español", + "Español mexicano", + "Svenska", ++ "தமிழ்", + "తెలుగు", + "ภาษาไทย", + "Türkçe", +diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp +index 831ccdf..8feeecd 100644 +--- a/modules/gui/qt4/components/simple_preferences.cpp ++++ b/modules/gui/qt4/components/simple_preferences.cpp +@@ -119,6 +119,7 @@ static const char *const ppsz_language[] = + "es", + "es_MX", + "sv", ++ "ta", + "te", + "th", + "tr", +@@ -193,6 +194,7 @@ static const char *const ppsz_language_text[] = + "Español", + "Español mexicano", + "Svenska", ++ "தமிழ்", + "తెలుగు", + "ภาษาไทย", + "Türkçe", +diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp +index 8283fdc..16c89fe 100644 +--- a/modules/gui/qt4/input_manager.cpp ++++ b/modules/gui/qt4/input_manager.cpp +@@ -512,10 +512,17 @@ void InputManager::UpdateName() + + /* Try to get the nowplaying */ + char *format = var_InheritString( p_intf, "input-title-format" ); +- char *formated = str_format_meta( p_input, format ); +- free( format ); +- name = qfu(formated); +- free( formated ); ++ char *formatted = NULL; ++ if (format != NULL) ++ { ++ formatted = str_format_meta( p_input, format ); ++ free( format ); ++ if( formatted != NULL ) ++ { ++ name = qfu(formatted); ++ free( formatted ); ++ } ++ } + + /* If we have Nothing */ + if( name.simplified().isEmpty() ) +diff --git a/modules/gui/skins2/controls/ctrl_video.cpp b/modules/gui/skins2/controls/ctrl_video.cpp +index 7c9dcae..c722755 100644 +--- a/modules/gui/skins2/controls/ctrl_video.cpp ++++ b/modules/gui/skins2/controls/ctrl_video.cpp +@@ -113,6 +113,7 @@ void CtrlVideo::setLayout( GenericLayout *pLayout, + { + CtrlGeneric::setLayout( pLayout, rPosition ); + m_pLayout->getActiveVar().addObserver( this ); ++ getWindow()->getVisibleVar().addObserver( this ); + + // register Video Control + VoutManager::instance( getIntf() )->registerCtrlVideo( this ); +@@ -125,6 +126,7 @@ void CtrlVideo::setLayout( GenericLayout *pLayout, + void CtrlVideo::unsetLayout() + { + m_pLayout->getActiveVar().delObserver( this ); ++ getWindow()->getVisibleVar().delObserver( this ); + CtrlGeneric::unsetLayout(); + } + +@@ -162,27 +164,28 @@ void CtrlVideo::resizeControl( int width, int height ) + void CtrlVideo::onUpdate( Subject<VarBool> &rVariable, void *arg ) + { + (void)arg; ++ VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); + +- // Visibility changed + if( &rVariable == m_pVisible ) + { +- msg_Dbg( getIntf(), "VideoCtrl : Visibility changed (visible=%d)", +- isVisible() ); ++ msg_Dbg( getIntf(), "VideoCtrl(%p) : control visibility changed (%i)", ++ this, isVisible() ); + notifyLayout(); + } +- +- // Active Layout changed +- if( &rVariable == &m_pLayout->getActiveVar() ) ++ else if( &rVariable == &m_pLayout->getActiveVar() ) + { +- msg_Dbg( getIntf(), "VideoCtrl : Active Layout changed (isActive=%d)", +- m_pLayout->getActiveVar().get() ); ++ msg_Dbg( getIntf(), "VideoCtrl(%p) : Active Layout changed (%i)", ++ this, m_pLayout->getActiveVar().get() ); + } +- +- VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); +- if( &rVariable == &rFullscreen ) ++ else if( &rVariable == &getWindow()->getVisibleVar() ) ++ { ++ msg_Dbg( getIntf(), "VideoCtrl(%p) : Window visibility changed (%i)", ++ this, getWindow()->getVisibleVar().get() ); ++ } ++ else if( &rVariable == &rFullscreen ) + { +- msg_Dbg( getIntf(), "VideoCtrl : fullscreen toggled (fullscreen = %d)", +- rFullscreen.get() ); ++ msg_Dbg( getIntf(), "VideoCtrl(%p) : fullscreen toggled (%i)", ++ this, rFullscreen.get() ); + } + + if( isUseable() && !isUsed() ) +@@ -232,9 +235,10 @@ bool CtrlVideo::isUseable( ) const + { + VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); + +- return isVisible() && // video control is visible +- m_pLayout->isVisible() && // layout is visible +- !rFullscreen.get(); // fullscreen is off ++ return isVisible() // video control is visible ++ && m_pLayout->getActiveVar().get() // layout is active ++ && getWindow()->getVisibleVar().get() // window is visible ++ && !rFullscreen.get(); // fullscreen is off + } + + +diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp +index dcf3b30..f490737 100644 +--- a/modules/gui/skins2/src/vlcproc.cpp ++++ b/modules/gui/skins2/src/vlcproc.cpp +@@ -738,9 +738,15 @@ void VlcProc::update_current_input() + { + // Update short name (as defined by --input-title-format) + char *psz_fmt = var_InheritString( getIntf(), "input-title-format" ); +- char *psz_name = str_format_meta( pInput, psz_fmt ); +- SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) ); +- free( psz_fmt ); ++ char *psz_name = NULL; ++ if( psz_fmt != NULL ) ++ { ++ psz_name = str_format_meta( pInput, psz_fmt ); ++ free( psz_fmt ); ++ } ++ ++ SET_TEXT( m_cVarStreamName, UString( getIntf(), ++ psz_name ? psz_name : "" ) ); + free( psz_name ); + + // Update local path (if possible) or full uri +diff --git a/modules/gui/skins2/src/vout_manager.cpp b/modules/gui/skins2/src/vout_manager.cpp +index f6ea8eb..5c9e67c 100644 +--- a/modules/gui/skins2/src/vout_manager.cpp ++++ b/modules/gui/skins2/src/vout_manager.cpp +@@ -182,15 +182,6 @@ CtrlVideo* VoutManager::getBestCtrlVideo( ) + } + } + +- // as a fallback, look up any video control that is unused +- for( it = m_pCtrlVideoVec.begin(); it != m_pCtrlVideoVec.end(); ++it ) +- { +- if( !(*it)->isUsed() ) +- { +- return (*it); +- } +- } +- + return NULL; + } + +diff --git a/modules/hw/vdpau/Makefile.am b/modules/hw/vdpau/Makefile.am +index 731eb3d..4d112e7 100644 +--- a/modules/hw/vdpau/Makefile.am ++++ b/modules/hw/vdpau/Makefile.am +@@ -51,4 +51,6 @@ libvdpau_display_plugin_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS) + libvdpau_display_plugin_la_LIBADD = libvlc_vdpau.la \ + ../../video_output/libvlc_xcb_events.la \ + $(AM_LIBADD) $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XCB_LIBS) ++if HAVE_XCB + vdpau_LTLIBRARIES += libvdpau_display_plugin.la ++endif +diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c +index 1fe511c..00f5ad7 100644 +--- a/modules/hw/vdpau/chroma.c ++++ b/modules/hw/vdpau/chroma.c +@@ -65,7 +65,8 @@ static VdpStatus MixerSetupColors(filter_t *filter, const VdpProcamp *procamp, + { + filter_sys_t *sys = filter->p_sys; + VdpStatus err; +- VdpColorStandard std = (filter->fmt_in.video.i_height > 576) ++ /* XXX: add some margin for padding... */ ++ VdpColorStandard std = (filter->fmt_in.video.i_height > 576 + 16) + ? VDP_COLOR_STANDARD_ITUR_BT_709 + : VDP_COLOR_STANDARD_ITUR_BT_601; + +@@ -95,7 +96,7 @@ static VdpStatus MixerSetupColors(filter_t *filter, const VdpProcamp *procamp, + } + + /** Create VDPAU video mixer */ +-static VdpVideoMixer MixerCreate(filter_t *filter) ++static VdpVideoMixer MixerCreate(filter_t *filter, bool import) + { + filter_sys_t *sys = filter->p_sys; + VdpVideoMixer mixer; +@@ -187,7 +188,8 @@ static VdpVideoMixer MixerCreate(filter_t *filter) + VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE, + }; + uint32_t width = filter->fmt_in.video.i_width; +- uint32_t height = filter->fmt_in.video.i_height; ++ uint32_t height = import ? filter->fmt_in.video.i_visible_height ++ : filter->fmt_in.video.i_height; + const void *values[3] = { &width, &height, &sys->chroma, }; + + err = vdp_video_mixer_create(sys->vdp, sys->device, featc, featv, +@@ -279,6 +281,8 @@ static void Flush(filter_t *filter) + } + } + ++static picture_t *YCbCrRender(filter_t *filter, picture_t *src); ++ + /** Get a VLC picture for a VDPAU output surface */ + static picture_t *OutputAllocate(filter_t *filter) + { +@@ -300,7 +304,7 @@ static picture_t *OutputAllocate(filter_t *filter) + /* First picture: get the context and allocate the mixer */ + sys->vdp = vdp_hold_x11(psys->vdp, NULL); + sys->device = psys->device; +- sys->mixer = MixerCreate(filter); ++ sys->mixer = MixerCreate(filter, filter->pf_video_filter == YCbCrRender); + if (sys->mixer != VDP_INVALID_HANDLE) + return pic; + +@@ -362,7 +366,8 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) + /* Create surface (TODO: reuse?) */ + err = vdp_video_surface_create(sys->vdp, sys->device, sys->chroma, + filter->fmt_in.video.i_width, +- filter->fmt_in.video.i_height, &surface); ++ filter->fmt_in.video.i_visible_height, ++ &surface); + if (err != VDP_STATUS_OK) + { + msg_Err(filter, "video %s %s failure: %s", "surface", "creation", +@@ -375,7 +380,8 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) + uint32_t pitches[3]; + for (int i = 0; i < src->i_planes; i++) + { +- planes[i] = src->p[i].p_pixels; ++ planes[i] = src->p[i].p_pixels ++ + filter->fmt_in.video.i_y_offset * src->p[i].i_pitch; + pitches[i] = src->p[i].i_pitch; + } + if (src->format.i_chroma == VLC_CODEC_I420) +@@ -385,6 +391,15 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) + pitches[1] = src->p[2].i_pitch; + pitches[2] = src->p[1].i_pitch; + } ++ if (src->format.i_chroma == VLC_CODEC_I420 ++ || src->format.i_chroma == VLC_CODEC_YV12 ++ || src->format.i_chroma == VLC_CODEC_NV12) ++ { ++ for (int i = 1; i < src->i_planes; i++) ++ planes[i] = ((const uint8_t *)planes[i]) ++ + (filter->fmt_in.video.i_y_offset / 2) * src->p[i].i_pitch; ++ } ++ + err = vdp_video_surface_put_bits_y_cb_cr(sys->vdp, surface, sys->format, + planes, pitches); + if (err != VDP_STATUS_OK) +@@ -399,6 +414,7 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) + fmt.i_chroma = (sys->chroma == VDP_CHROMA_TYPE_420) + ? VLC_CODEC_VDPAU_VIDEO_420 : VLC_CODEC_VDPAU_VIDEO_422; + ++ + picture_t *dst = picture_NewFromFormat(&fmt); + if (unlikely(dst == NULL)) + goto error; +@@ -425,7 +441,7 @@ static inline VdpVideoSurface picture_GetVideoSurface(const picture_t *pic) + return field->frame->surface; + } + +-static picture_t *VideoRender(filter_t *filter, picture_t *src) ++static picture_t *Render(filter_t *filter, picture_t *src, bool import) + { + filter_sys_t *sys = filter->p_sys; + VdpStatus err; +@@ -608,9 +624,11 @@ static picture_t *VideoRender(filter_t *filter, picture_t *src) + VdpVideoSurface future[MAX_FUTURE]; + VdpRect src_rect = { + filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset, +- filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset ++ filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset, + }; + ++ if (import) ++ src_rect.y0 = src_rect.y1 = 0; + if (hflip) + src_rect.x0 += filter->fmt_in.video.i_visible_width; + else +@@ -678,6 +696,12 @@ error: + goto skip; + } + ++static picture_t *VideoRender(filter_t *filter, picture_t *src) ++{ ++ return Render(filter, src, false); ++} ++ ++ + static picture_t *YCbCrRender(filter_t *filter, picture_t *src) + { + /* FIXME: Define a way to initialize the mixer in Open() instead. */ +@@ -689,7 +713,7 @@ static picture_t *YCbCrRender(filter_t *filter, picture_t *src) + } + + src = VideoImport(filter, src); +- return (src != NULL) ? VideoRender(filter, src) : NULL; ++ return (src != NULL) ? Render(filter, src, true) : NULL; + } + + static int OutputOpen(vlc_object_t *obj) +diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c +index 9b39eb2..0cf146d 100644 +--- a/modules/mux/mp4.c ++++ b/modules/mux/mp4.c +@@ -479,7 +479,7 @@ static int Mux(sout_mux_t *p_mux) + block_t *p_next = block_FifoShow(p_input->p_fifo); + if ( p_next->i_flags & BLOCK_FLAG_DISCONTINUITY ) + { /* we have no way to know real length except by decoding */ +- if ( p_stream->fmt.i_cat == VIDEO_ES ) ++ if ( p_stream->fmt.i_cat == VIDEO_ES && p_stream->fmt.video.i_frame_rate ) + { + p_data->i_length = CLOCK_FREQ * + p_stream->fmt.video.i_frame_rate_base / +@@ -489,7 +489,7 @@ static int Mux(sout_mux_t *p_mux) + } + else if ( p_stream->fmt.i_cat == AUDIO_ES && + p_stream->fmt.audio.i_rate && +- p_data->i_nb_samples ) ++ p_data->i_nb_samples && p_stream->fmt.audio.i_rate ) + { + p_data->i_length = CLOCK_FREQ * p_data->i_nb_samples / + p_stream->fmt.audio.i_rate; +diff --git a/modules/stream_filter/Makefile.am b/modules/stream_filter/Makefile.am +index 158b46a..527a26a 100644 +--- a/modules/stream_filter/Makefile.am ++++ b/modules/stream_filter/Makefile.am +@@ -106,7 +106,7 @@ stream_filter_LTLIBRARIES += libsmooth_plugin.la + + libhttplive_plugin_la_SOURCES = stream_filter/httplive.c + libhttplive_plugin_la_CFLAGS = $(AM_CFLAGS) $(GCRYPT_CFLAGS) +-libhttplive_plugin_la_LIBADD = $(GCRYPT_LIBS) -lgpg-error ++libhttplive_plugin_la_LIBADD = $(GCRYPT_LIBS) -lgpg-error $(LIBPTHREAD) + if HAVE_GCRYPT + stream_filter_LTLIBRARIES += libhttplive_plugin.la + endif +diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c +index 72abf15..e94dad5 100644 +--- a/modules/stream_filter/httplive.c ++++ b/modules/stream_filter/httplive.c +@@ -42,6 +42,7 @@ + #include <vlc_stream.h> + #include <vlc_memory.h> + #include <vlc_gcrypt.h> ++#include <vlc_atomic.h> + + /***************************************************************************** + * Module descriptor +@@ -153,6 +154,8 @@ struct stream_sys_t + vlc_cond_t wait; + vlc_mutex_t lock; + bool paused; ++ atomic_bool closing; ++ atomic_bool eof; + }; + + /**************************************************************************** +@@ -1588,13 +1591,16 @@ static int hls_DownloadSegmentData(stream_t *s, hls_stream_t *hls, segment_t *se + } + + mtime_t start = mdate(); +- if (hls_Download(s, segment) != VLC_SUCCESS) ++ ++ int i_ret = hls_Download(s, segment); ++ if (i_ret != VLC_SUCCESS) + { + msg_Err(s, "downloading segment %d from stream %d failed", + segment->sequence, *cur_stream); + vlc_mutex_unlock(&segment->lock); +- return VLC_EGENERIC; ++ return i_ret; + } ++ + mtime_t duration = mdate() - start; + if (hls->bandwidth == 0 && segment->duration > 0) + { +@@ -1603,14 +1609,13 @@ static int hls_DownloadSegmentData(stream_t *s, hls_stream_t *hls, segment_t *se + } + + /* If the segment is encrypted, decode it */ +- if (hls_DecodeSegmentData(s, hls, segment) != VLC_SUCCESS) +- { +- vlc_mutex_unlock(&segment->lock); +- return VLC_EGENERIC; +- } ++ i_ret = hls_DecodeSegmentData(s, hls, segment); + + vlc_mutex_unlock(&segment->lock); + ++ if(i_ret != VLC_SUCCESS) ++ return i_ret; ++ + msg_Dbg(s, "downloaded segment %d from stream %d", + segment->sequence, *cur_stream); + +@@ -1636,9 +1641,7 @@ static void* hls_Thread(void *p_this) + stream_t *s = (stream_t *)p_this; + stream_sys_t *p_sys = s->p_sys; + +- int canc = vlc_savecancel(); +- +- while (vlc_object_alive(s)) ++ for( ;; ) + { + hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->download.stream); + assert(hls); +@@ -1654,42 +1657,56 @@ static void* hls_Thread(void *p_this) + { + /* wait */ + vlc_mutex_lock(&p_sys->download.lock_wait); ++ mutex_cleanup_push(&p_sys->download.lock_wait); //CO + while (((p_sys->download.segment - p_sys->playback.segment > 6) || + (p_sys->download.segment >= count)) && + (p_sys->download.seek == -1)) + { ++ ++ if(!p_sys->b_live && p_sys->download.segment >= count) ++ { ++ /* this was last segment to read */ ++ atomic_store(&p_sys->eof, true); ++ } ++ + vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait); + if (p_sys->b_live /*&& (mdate() >= p_sys->playlist.wakeup)*/) + break; +- if (!vlc_object_alive(s)) +- break; + } ++ vlc_cleanup_pop( ); //CO ++ + /* */ + if (p_sys->download.seek >= 0) + { + p_sys->download.segment = p_sys->download.seek; + p_sys->download.seek = -1; ++ atomic_store(&p_sys->eof, false); + } ++ + vlc_mutex_unlock(&p_sys->download.lock_wait); + } + +- if (!vlc_object_alive(s)) break; ++ vlc_mutex_lock(&p_sys->lock); ++ mutex_cleanup_push(&p_sys->lock); //C1 ++ while (p_sys->paused) ++ vlc_cond_wait(&p_sys->wait, &p_sys->lock); ++ vlc_cleanup_run( ); //C1 vlc_mutex_unlock(&p_sys->lock); + + vlc_mutex_lock(&hls->lock); + segment_t *segment = segment_GetSegment(hls, p_sys->download.segment); + vlc_mutex_unlock(&hls->lock); + ++ int i_canc = vlc_savecancel(); + if ((segment != NULL) && + (hls_DownloadSegmentData(s, hls, segment, &p_sys->download.stream) != VLC_SUCCESS)) + { +- if (!vlc_object_alive(s)) break; +- + if (!p_sys->b_live) + { + p_sys->b_error = true; + break; + } + } ++ vlc_restorecancel(i_canc); + + /* download succeeded */ + /* determine next segment to download */ +@@ -1708,9 +1725,10 @@ static void* hls_Thread(void *p_this) + vlc_mutex_lock(&p_sys->read.lock_wait); + vlc_cond_signal(&p_sys->read.wait); + vlc_mutex_unlock(&p_sys->read.lock_wait); ++ ++ vlc_testcancel(); + } + +- vlc_restorecancel(canc); + return NULL; + } + +@@ -1721,14 +1739,14 @@ static void* hls_Reload(void *p_this) + + assert(p_sys->b_live); + +- int canc = vlc_savecancel(); +- + double wait = 1.0; +- while (vlc_object_alive(s)) ++ for ( ;; ) + { + mtime_t now = mdate(); + if (now >= p_sys->playlist.wakeup) + { ++ int canc = vlc_savecancel(); ++ + /* reload the m3u8 if there are less than 3 segments what aren't downloaded */ + if ( ( p_sys->download.segment - p_sys->playback.segment < 3 ) && + ( hls_ReloadPlaylist(s) != VLC_SUCCESS) ) +@@ -1752,6 +1770,8 @@ static void* hls_Reload(void *p_this) + wait = 1.0; + } + ++ vlc_restorecancel(canc); ++ + hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->download.stream); + assert(hls); + +@@ -1768,7 +1788,6 @@ static void* hls_Reload(void *p_this) + mwait(p_sys->playlist.wakeup); + } + +- vlc_restorecancel(canc); + return NULL; + } + +@@ -1788,7 +1807,7 @@ static int Prefetch(stream_t *s, int *current) + + /* Download ~10s worth of segments of this HLS stream if they exist */ + unsigned segment_amount = (0.5f + 10/hls->duration); +- for (int i = 0; i < __MIN(vlc_array_count(hls->segments), segment_amount); i++) ++ for (unsigned i = 0; i < __MIN((unsigned)vlc_array_count(hls->segments), segment_amount); i++) + { + segment_t *segment = segment_GetSegment(hls, p_sys->download.segment); + if (segment == NULL ) +@@ -1824,138 +1843,124 @@ static int Prefetch(stream_t *s, int *current) + /**************************************************************************** + * + ****************************************************************************/ ++#define HLS_READ_SIZE 65536 ++ + static int hls_Download(stream_t *s, segment_t *segment) + { + stream_sys_t *p_sys = s->p_sys; + assert(segment); + +- vlc_mutex_lock(&p_sys->lock); +- while (p_sys->paused) +- vlc_cond_wait(&p_sys->wait, &p_sys->lock); +- vlc_mutex_unlock(&p_sys->lock); +- + stream_t *p_ts = stream_UrlNew(s, segment->url); + if (p_ts == NULL) + return VLC_EGENERIC; + +- segment->size = stream_Size(p_ts); +- +- if (segment->size == 0) { +- int chunk_size = 65536; +- segment->data = block_Alloc(chunk_size); +- if (!segment->data) +- goto nomem; +- do { +- if (segment->data->i_buffer - segment->size < chunk_size) { +- chunk_size *= 2; +- block_t *p_block = block_Realloc(segment->data, 0, segment->data->i_buffer + chunk_size); +- if (!p_block) { +- block_Release(segment->data); +- segment->data = NULL; +- goto nomem; +- } +- segment->data = p_block; +- } ++ int64_t size = stream_Size(p_ts); ++ if (size < 0) ++ size = 0; + +- ssize_t length = stream_Read(p_ts, segment->data->p_buffer + segment->size, chunk_size); +- if (length <= 0) { +- segment->data->i_buffer = segment->size; +- break; +- } +- segment->size += length; +- } while (vlc_object_alive(s)); ++ unsigned i_total_read = 0; ++ int i_return = VLC_SUCCESS; + +- stream_Delete(p_ts); +- return VLC_SUCCESS; ++ block_t *p_segment_data = block_Alloc(size ? size : HLS_READ_SIZE); ++ if (!p_segment_data) ++ { ++ i_return = VLC_ENOMEM; ++ goto end; + } +- +- segment->data = block_Alloc(segment->size); +- if (segment->data == NULL) +- goto nomem; +- +- assert(segment->data->i_buffer == segment->size); +- +- ssize_t curlen = 0; +- do ++ for( ;; ) + { + /* NOTE: Beware the size reported for a segment by the HLS server may not + * be correct, when downloading the segment data. Therefore check the size + * and enlarge the segment data block if necessary. + */ +- uint64_t size = stream_Size(p_ts); +- if (size > segment->size) ++ uint64_t i_toread = (size > 0) ? (uint64_t) size - i_total_read: HLS_READ_SIZE; ++ ++ if (i_total_read + i_toread > p_segment_data->i_buffer) + { +- msg_Dbg(s, "size changed %"PRIu64, segment->size); +- block_t *p_block = block_Realloc(segment->data, 0, size); +- if (p_block == NULL) ++ msg_Dbg(s, "size changed to %"PRIu64, i_total_read + i_toread); ++ block_t *p_realloc_block = block_Realloc(p_segment_data, 0, i_total_read + i_toread); ++ if (p_realloc_block == NULL) + { +- block_Release(segment->data); +- segment->data = NULL; +- goto nomem; ++ if(p_segment_data) ++ block_Release(p_segment_data); ++ i_return = VLC_ENOMEM; ++ goto end; + } +- segment->data = p_block; +- segment->size = size; +- assert(segment->data->i_buffer == segment->size); +- p_block = NULL; ++ p_segment_data = p_realloc_block; + } +- ssize_t length = stream_Read(p_ts, segment->data->p_buffer + curlen, segment->size - curlen); +- if (length <= 0) ++ ++ int i_canc = vlc_savecancel(); ++ int i_length = stream_Read(p_ts, &p_segment_data->p_buffer[i_total_read], ++ (i_toread >= HLS_READ_SIZE) ? HLS_READ_SIZE : i_toread); ++ vlc_restorecancel(i_canc); ++ ++ if (i_length <= 0) ++ { ++ if(size > 0 && i_total_read < size) ++ msg_Warn(s, "segment read %"PRIu64"/%"PRIu64, size - i_total_read, size ); ++ p_segment_data->i_buffer = i_total_read; + break; +- curlen += length; +- } while (vlc_object_alive(s)); ++ } + +- stream_Delete(p_ts); +- return VLC_SUCCESS; ++ i_total_read += i_length; ++ ++ if (atomic_load(&p_sys->closing)) ++ break; ++ }; ++ ++ segment->data = p_segment_data; ++ segment->size = p_segment_data->i_buffer; + +-nomem: ++end: + stream_Delete(p_ts); +- return VLC_ENOMEM; ++ return i_return; + } + + /* Read M3U8 file */ + static ssize_t read_M3U8_from_stream(stream_t *s, uint8_t **buffer) + { +- int64_t total_bytes = 0; +- int64_t total_allocated = 0; + uint8_t *p = NULL; ++ int64_t size = stream_Size(s); ++ size = VLC_CLIP(size, 0, INT64_MAX - 1); ++ int64_t i_alloc_size = 0; ++ ssize_t i_total_read = 0; ++ unsigned i_chunk_size = HLS_READ_SIZE; + +- while (1) ++ for( ;; ) + { +- char buf[4096]; +- int64_t bytes; ++ int i_toread = (size) ? size - i_total_read : i_chunk_size; ++ if(i_toread + i_total_read > INT64_MAX - 1) ++ break; ++ if(i_alloc_size < i_toread) ++ { ++ i_alloc_size += i_toread; ++ p = realloc_or_free(p, 1 + i_alloc_size); ++ if (p == NULL) ++ return VLC_ENOMEM; ++ if (i_chunk_size < (1 << 26)) ++ i_chunk_size <<= 1; ++ } + +- bytes = stream_Read(s, buf, sizeof(buf)); +- if (bytes == 0) ++ int i_read = stream_Read(s, & p[i_total_read], i_toread); ++ if (i_read == 0) ++ { + break; /* EOF ? */ +- else if (bytes < 0) ++ } ++ else if (i_read < 0) + { + free (p); +- return bytes; ++ return i_read; + } +- +- if ( (total_bytes + bytes + 1) > total_allocated ) ++ else + { +- if (total_allocated) +- total_allocated *= 2; +- else +- total_allocated = __MIN((uint64_t)bytes+1, sizeof(buf)); +- +- p = realloc_or_free(p, total_allocated); +- if (p == NULL) +- return VLC_ENOMEM; ++ i_total_read += i_read; + } +- +- memcpy(p+total_bytes, buf, bytes); +- total_bytes += bytes; + } + +- if (total_allocated == 0) +- return VLC_EGENERIC; +- +- p[total_bytes] = '\0'; ++ p[i_total_read] = '\0'; + *buffer = p; + +- return total_bytes; ++ return i_total_read; + } + + static ssize_t read_M3U8_from_url(stream_t *s, const char* psz_url, uint8_t **buffer) +@@ -2068,6 +2073,8 @@ static int Open(vlc_object_t *p_this) + s->pf_control = Control; + + p_sys->paused = false; ++ atomic_init(&p_sys->closing, false); ++ atomic_init(&p_sys->eof, false); + + vlc_cond_init(&p_sys->wait); + vlc_mutex_init(&p_sys->lock); +@@ -2128,7 +2135,10 @@ static int Open(vlc_object_t *p_this) + if (vlc_clone(&p_sys->thread, hls_Thread, s, VLC_THREAD_PRIORITY_INPUT)) + { + if (p_sys->b_live) ++ { ++ vlc_cancel(p_sys->reload); + vlc_join(p_sys->reload, NULL); ++ } + goto fail_thread; + } + +@@ -2171,6 +2181,7 @@ static void Close(vlc_object_t *p_this) + + vlc_mutex_lock(&p_sys->lock); + p_sys->paused = false; ++ atomic_store(&p_sys->closing, true); + vlc_cond_signal(&p_sys->wait); + vlc_mutex_unlock(&p_sys->lock); + +@@ -2182,10 +2193,18 @@ static void Close(vlc_object_t *p_this) + vlc_cond_signal(&p_sys->download.wait); + vlc_mutex_unlock(&p_sys->download.lock_wait); + ++ vlc_cond_signal(&p_sys->read.wait); /* set closing first */ ++ + /* */ + if (p_sys->b_live) ++ { ++ vlc_cancel(p_sys->reload); + vlc_join(p_sys->reload, NULL); ++ } ++ ++ vlc_cancel(p_sys->thread); + vlc_join(p_sys->thread, NULL); ++ + vlc_mutex_destroy(&p_sys->download.lock_wait); + vlc_cond_destroy(&p_sys->download.wait); + +@@ -2387,7 +2406,7 @@ static int Read(stream_t *s, void *buffer, unsigned int i_read) + while (length == 0) + { + // In case an error occurred or the stream was closed return 0 +- if (p_sys->b_error || !vlc_object_alive(s)) ++ if (p_sys->b_error || atomic_load(&p_sys->closing)) + return 0; + + // Lock the mutex before trying to read to avoid a race condition with the download thread +@@ -2411,6 +2430,12 @@ static int Read(stream_t *s, void *buffer, unsigned int i_read) + // running this read operation is also responsible for closing the stream + if (length == 0) + { ++ if(atomic_load(&p_sys->eof)) /* finished reading last segment */ ++ { ++ vlc_mutex_unlock(&p_sys->read.lock_wait); ++ return 0; ++ } ++ + mtime_t start = mdate(); + + // Wait for 10 seconds +@@ -2666,7 +2691,8 @@ static int segment_Seek(stream_t *s, const uint64_t pos) + (p_sys->download.segment < count))) + { + vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait); +- if (!vlc_object_alive(s) || s->b_error) break; ++ if (p_sys->b_error || atomic_load(&p_sys->closing)) ++ break; + } + vlc_mutex_unlock(&p_sys->download.lock_wait); + +diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c +index 1251b85..5248b57 100644 +--- a/modules/video_output/fb.c ++++ b/modules/video_output/fb.c +@@ -68,10 +68,7 @@ + "the values 0=QCIF 1=CIF 2=NTSC 3=PAL, 4=auto (default 4=auto)") + + #define HW_ACCEL_TEXT N_("Framebuffer uses hw acceleration") +-#define HW_ACCEL_LONGTEXT N_(\ +- "If your framebuffer supports hardware acceleration or does double buffering " \ +- "in hardware then you must disable this option. It then does double buffering " \ +- "in software.") ++#define HW_ACCEL_LONGTEXT N_("Disable for double buffering in software.") + + #define CHROMA_TEXT N_("Image format (default RGB)") + #define CHROMA_LONGTEXT N_("Chroma fourcc used by the framebuffer. Default is RGB since the fb device has no way to report its chroma.") +diff --git a/po/vlc.pot b/po/vlc.pot +index 3d5108d..219ad0e 100644 +--- a/po/vlc.pot ++++ b/po/vlc.pot +@@ -6,9 +6,9 @@ + #, fuzzy + msgid "" + msgstr "" +-"Project-Id-Version: vlc 2.2.1\n" ++"Project-Id-Version: vlc 2.2.2\n" + "Report-Msgid-Bugs-To: vlc-devel@videolan.org\n" +-"POT-Creation-Date: 2015-04-13 00:13+0200\n" ++"POT-Creation-Date: 2015-04-15 07:39-0400\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" + "Language-Team: LANGUAGE <LL@li.org>\n" +@@ -25692,11 +25692,8 @@ msgstr "" + msgid "Framebuffer uses hw acceleration" + msgstr "" + +-#: modules/video_output/fb.c:72 +-msgid "" +-"If your framebuffer supports hardware acceleration or does double buffering " +-"in hardware then you must disable this option. It then does double buffering " +-"in software." ++#: modules/video_output/fb.c:71 ++msgid "Disable for double buffering in software." + msgstr "" + + #: modules/video_output/fb.c:76 +diff --git a/src/misc/messages.c b/src/misc/messages.c +index f75fd67..3f4122c 100644 +--- a/src/misc/messages.c ++++ b/src/misc/messages.c +@@ -120,9 +120,11 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module, + #endif + + if (priv) { ++ int canc = vlc_savecancel (); + vlc_rwlock_rdlock (&priv->log.lock); + priv->log.cb (priv->log.opaque, type, &msg, format, args); + vlc_rwlock_unlock (&priv->log.lock); ++ vlc_restorecancel (canc); + } + } + +diff --git a/src/text/strings.c b/src/text/strings.c +index d864211..398c8bc 100644 +--- a/src/text/strings.c ++++ b/src/text/strings.c +@@ -548,6 +548,8 @@ char *str_format_meta(input_thread_t *input, const char *s) + bool b_is_format = false; + bool b_empty_if_na = false; + ++ assert(s != NULL); ++ + while ((c = *s) != '\0') + { + s++; diff --git a/vlc-backport-chroma_dead_CYUV.patch b/vlc-backport-chroma_dead_CYUV.patch deleted file mode 100644 index 55288a9..0000000 --- a/vlc-backport-chroma_dead_CYUV.patch +++ /dev/null @@ -1,560 +0,0 @@ -commit 5d17bd9d2db93b7a653f870232bf0c0e95a1de3c -Author: Rémi Denis-Courmont <remi@remlab.net> -Date: Thu Jan 29 20:09:56 2015 +0200 - - chroma: remove dead CYUV support - - CYUV is not a pixel format, at least it is not treated as such in VLC - outputs and encoders. CYUV is decoded to YUV 4:1:1 by libavcodec. - -diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c -index cd99dd6..4584f9e 100644 ---- a/modules/video_chroma/i420_yuy2.c -+++ b/modules/video_chroma/i420_yuy2.c -@@ -44,13 +44,13 @@ - #define SRC_FOURCC "I420,IYUV,YV12" - - #if defined (MODULE_NAME_IS_i420_yuy2) --# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211" -+# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,Y211" - # define VLC_TARGET - #elif defined (MODULE_NAME_IS_i420_yuy2_mmx) --# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" -+# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" - # define VLC_TARGET VLC_MMX - #elif defined (MODULE_NAME_IS_i420_yuy2_sse2) --# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" -+# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" - # define VLC_TARGET VLC_SSE - #elif defined (MODULE_NAME_IS_i420_yuy2_altivec) - # define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" -@@ -70,9 +70,7 @@ static picture_t *I420_YVYU_Filter ( filter_t *, picture_t * ); - static picture_t *I420_UYVY_Filter ( filter_t *, picture_t * ); - #if !defined (MODULE_NAME_IS_i420_yuy2_altivec) - static void I420_IUYV ( filter_t *, picture_t *, picture_t * ); --static void I420_cyuv ( filter_t *, picture_t *, picture_t * ); - static picture_t *I420_IUYV_Filter ( filter_t *, picture_t * ); --static picture_t *I420_cyuv_Filter ( filter_t *, picture_t * ); - #endif - #if defined (MODULE_NAME_IS_i420_yuy2) - static void I420_Y211 ( filter_t *, picture_t *, picture_t * ); -@@ -153,10 +151,6 @@ static int Activate( vlc_object_t *p_this ) - case VLC_FOURCC('I','U','Y','V'): - p_filter->pf_video_filter = I420_IUYV_Filter; - break; -- -- case VLC_CODEC_CYUV: -- p_filter->pf_video_filter = I420_cyuv_Filter; -- break; - #endif - - #if defined (MODULE_NAME_IS_i420_yuy2) -@@ -194,7 +188,6 @@ VIDEO_FILTER_WRAPPER( I420_YVYU ) - VIDEO_FILTER_WRAPPER( I420_UYVY ) - #if !defined (MODULE_NAME_IS_i420_yuy2_altivec) - VIDEO_FILTER_WRAPPER( I420_IUYV ) --VIDEO_FILTER_WRAPPER( I420_cyuv ) - #endif - #if defined (MODULE_NAME_IS_i420_yuy2) - VIDEO_FILTER_WRAPPER( I420_Y211 ) -@@ -849,136 +842,6 @@ static void I420_IUYV( filter_t *p_filter, picture_t *p_source, - /* FIXME: TODO ! */ - msg_Err( p_filter, "I420_IUYV unimplemented, please harass <sam@zoy.org>" ); - } -- --/***************************************************************************** -- * I420_cyuv: planar YUV 4:2:0 to upside-down packed UYVY 4:2:2 -- *****************************************************************************/ --VLC_TARGET --static void I420_cyuv( filter_t *p_filter, picture_t *p_source, -- picture_t *p_dest ) --{ -- uint8_t *p_line1 = p_dest->p->p_pixels + -- p_dest->p->i_visible_lines * p_dest->p->i_pitch -- + p_dest->p->i_pitch; -- uint8_t *p_line2 = p_dest->p->p_pixels + -- p_dest->p->i_visible_lines * p_dest->p->i_pitch; -- uint8_t *p_y1, *p_y2 = p_source->Y_PIXELS; -- uint8_t *p_u = p_source->U_PIXELS; -- uint8_t *p_v = p_source->V_PIXELS; -- -- int i_x, i_y; -- -- const int i_source_margin = p_source->p[0].i_pitch -- - p_source->p[0].i_visible_pitch; -- const int i_source_margin_c = p_source->p[1].i_pitch -- - p_source->p[1].i_visible_pitch; -- const int i_dest_margin = p_dest->p->i_pitch -- - p_dest->p->i_visible_pitch; -- --#if !defined(MODULE_NAME_IS_i420_yuy2_sse2) -- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) -- { -- p_line1 -= 3 * p_dest->p->i_pitch; -- p_line2 -= 3 * p_dest->p->i_pitch; -- -- p_y1 = p_y2; -- p_y2 += p_source->p[Y_PLANE].i_pitch; -- -- for( i_x = p_filter->fmt_in.video.i_width / 8 ; i_x-- ; ) -- { --#if !defined (MODULE_NAME_IS_i420_yuy2_mmx) -- C_YUV420_UYVY( ); -- C_YUV420_UYVY( ); -- C_YUV420_UYVY( ); -- C_YUV420_UYVY( ); --#else -- MMX_CALL( MMX_YUV420_UYVY ); --#endif -- } -- for( i_x = ( p_filter->fmt_in.video.i_width % 8 ) / 2; i_x-- ; ) -- { -- C_YUV420_UYVY( ); -- } -- -- p_y1 += i_source_margin; -- p_y2 += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line1 += i_dest_margin; -- p_line2 += i_dest_margin; -- } -- --#if defined (MODULE_NAME_IS_i420_yuy2_mmx) -- /* re-enable FPU registers */ -- MMX_END; --#endif -- --#else // defined(MODULE_NAME_IS_i420_yuy2_sse2) -- /* -- ** SSE2 128 bits fetch/store instructions are faster -- ** if memory access is 16 bytes aligned -- */ -- if( 0 == (15 & (p_source->p[Y_PLANE].i_pitch|p_dest->p->i_pitch| -- ((intptr_t)p_line2|(intptr_t)p_y2))) ) -- { -- /* use faster SSE2 aligned fetch and store */ -- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) -- { -- p_line1 = p_line2; -- p_line2 += p_dest->p->i_pitch; -- -- p_y1 = p_y2; -- p_y2 += p_source->p[Y_PLANE].i_pitch; -- -- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) -- { -- SSE2_CALL( SSE2_YUV420_UYVY_ALIGNED ); -- } -- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) -- { -- C_YUV420_UYVY( ); -- } -- -- p_y1 += i_source_margin; -- p_y2 += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line1 += i_dest_margin; -- p_line2 += i_dest_margin; -- } -- } -- else -- { -- /* use slower SSE2 unaligned fetch and store */ -- for( i_y = p_filter->fmt_in.video.i_height / 2 ; i_y-- ; ) -- { -- p_line1 = p_line2; -- p_line2 += p_dest->p->i_pitch; -- -- p_y1 = p_y2; -- p_y2 += p_source->p[Y_PLANE].i_pitch; -- -- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) -- { -- SSE2_CALL( SSE2_YUV420_UYVY_UNALIGNED ); -- } -- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) -- { -- C_YUV420_UYVY( ); -- } -- -- p_y1 += i_source_margin; -- p_y2 += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line1 += i_dest_margin; -- p_line2 += i_dest_margin; -- } -- } -- /* make sure all SSE2 stores are visible thereafter */ -- SSE2_END; --#endif // defined(MODULE_NAME_IS_i420_yuy2_sse2) --} - #endif // !defined (MODULE_NAME_IS_i420_yuy2_altivec) - - /***************************************************************************** -diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c -index 383fb3e..9099cfc 100644 ---- a/modules/video_chroma/i422_yuy2.c -+++ b/modules/video_chroma/i422_yuy2.c -@@ -39,9 +39,9 @@ - - #define SRC_FOURCC "I422" - #if defined (MODULE_NAME_IS_i422_yuy2) --# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv,Y211" -+# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,Y211" - #else --# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV,cyuv" -+# define DEST_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,IUYV" - #endif - - /***************************************************************************** -@@ -53,12 +53,10 @@ static void I422_YUY2 ( filter_t *, picture_t *, picture_t * ); - static void I422_YVYU ( filter_t *, picture_t *, picture_t * ); - static void I422_UYVY ( filter_t *, picture_t *, picture_t * ); - static void I422_IUYV ( filter_t *, picture_t *, picture_t * ); --static void I422_cyuv ( filter_t *, picture_t *, picture_t * ); - static picture_t *I422_YUY2_Filter ( filter_t *, picture_t * ); - static picture_t *I422_YVYU_Filter ( filter_t *, picture_t * ); - static picture_t *I422_UYVY_Filter ( filter_t *, picture_t * ); - static picture_t *I422_IUYV_Filter ( filter_t *, picture_t * ); --static picture_t *I422_cyuv_Filter ( filter_t *, picture_t * ); - #if defined (MODULE_NAME_IS_i422_yuy2) - static void I422_Y211 ( filter_t *, picture_t *, picture_t * ); - static picture_t *I422_Y211_Filter ( filter_t *, picture_t * ); -@@ -130,10 +128,6 @@ static int Activate( vlc_object_t *p_this ) - p_filter->pf_video_filter = I422_IUYV_Filter; - break; - -- case VLC_CODEC_CYUV: -- p_filter->pf_video_filter = I422_cyuv_Filter; -- break; -- - #if defined (MODULE_NAME_IS_i422_yuy2) - case VLC_CODEC_Y211: - p_filter->pf_video_filter = I422_Y211_Filter; -@@ -157,7 +151,6 @@ VIDEO_FILTER_WRAPPER( I422_YUY2 ) - VIDEO_FILTER_WRAPPER( I422_YVYU ) - VIDEO_FILTER_WRAPPER( I422_UYVY ) - VIDEO_FILTER_WRAPPER( I422_IUYV ) --VIDEO_FILTER_WRAPPER( I422_cyuv ) - #if defined (MODULE_NAME_IS_i422_yuy2) - VIDEO_FILTER_WRAPPER( I422_Y211 ) - #endif -@@ -456,104 +449,6 @@ static void I422_IUYV( filter_t *p_filter, picture_t *p_source, - } - - /***************************************************************************** -- * I422_cyuv: planar YUV 4:2:2 to upside-down packed UYVY 4:2:2 -- *****************************************************************************/ --VLC_TARGET --static void I422_cyuv( filter_t *p_filter, picture_t *p_source, -- picture_t *p_dest ) --{ -- uint8_t *p_line = p_dest->p->p_pixels + p_dest->p->i_visible_lines * p_dest->p->i_pitch; -- uint8_t *p_y = p_source->Y_PIXELS; -- uint8_t *p_u = p_source->U_PIXELS; -- uint8_t *p_v = p_source->V_PIXELS; -- -- int i_x, i_y; -- -- const int i_source_margin = p_source->p[0].i_pitch -- - p_source->p[0].i_visible_pitch; -- const int i_source_margin_c = p_source->p[1].i_pitch -- - p_source->p[1].i_visible_pitch; -- const int i_dest_margin = p_dest->p->i_pitch -- - p_dest->p->i_visible_pitch; -- --#if defined (MODULE_NAME_IS_i422_yuy2_sse2) -- -- if( 0 == (15 & (p_source->p[Y_PLANE].i_pitch|p_dest->p->i_pitch| -- ((intptr_t)p_line|(intptr_t)p_y))) ) -- { -- /* use faster SSE2 aligned fetch and store */ -- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) -- { -- p_line -= 2 * p_dest->p->i_pitch; -- -- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) -- { -- SSE2_CALL( SSE2_YUV422_UYVY_ALIGNED ); -- } -- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) -- { -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); -- } -- p_y += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line += i_dest_margin; -- } -- } -- else { -- /* use slower SSE2 unaligned fetch and store */ -- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) -- { -- p_line -= 2 * p_dest->p->i_pitch; -- -- for( i_x = p_filter->fmt_in.video.i_width / 16 ; i_x-- ; ) -- { -- SSE2_CALL( SSE2_YUV422_UYVY_UNALIGNED ); -- } -- for( i_x = ( p_filter->fmt_in.video.i_width % 16 ) / 2; i_x-- ; ) -- { -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); -- } -- p_y += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line += i_dest_margin; -- } -- } -- SSE2_END; -- --#else -- -- for( i_y = p_filter->fmt_in.video.i_height ; i_y-- ; ) -- { -- for( i_x = p_filter->fmt_in.video.i_width / 8 ; i_x-- ; ) -- { -- p_line -= 2 * p_dest->p->i_pitch; -- --#if defined (MODULE_NAME_IS_i422_yuy2) -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); -- C_YUV422_UYVY( p_line, p_y, p_u, p_v ); --#elif defined (MODULE_NAME_IS_i422_yuy2_mmx) -- MMX_CALL( MMX_YUV422_UYVY ); --#endif -- } -- p_y += i_source_margin; -- p_u += i_source_margin_c; -- p_v += i_source_margin_c; -- p_line += i_dest_margin; -- } --#if defined (MODULE_NAME_IS_i422_yuy2_mmx) -- MMX_END; --#elif defined (MODULE_NAME_IS_i422_yuy2_sse2) -- SSE2_END; --#endif -- --#endif --} -- --/***************************************************************************** - * I422_Y211: planar YUV 4:2:2 to packed YUYV 2:1:1 - *****************************************************************************/ - #if defined (MODULE_NAME_IS_i422_yuy2) -diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c -index 134cfa5..4adff8b 100644 ---- a/modules/video_chroma/yuy2_i420.c -+++ b/modules/video_chroma/yuy2_i420.c -@@ -33,7 +33,7 @@ - #include <vlc_plugin.h> - #include <vlc_filter.h> - --#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv" -+#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" - #define DEST_FOURCC "I420" - - /***************************************************************************** -@@ -44,12 +44,10 @@ static int Activate ( vlc_object_t * ); - static void YUY2_I420 ( filter_t *, picture_t *, picture_t * ); - static void YVYU_I420 ( filter_t *, picture_t *, picture_t * ); - static void UYVY_I420 ( filter_t *, picture_t *, picture_t * ); --static void cyuv_I420 ( filter_t *, picture_t *, picture_t * ); - - static picture_t *YUY2_I420_Filter ( filter_t *, picture_t * ); - static picture_t *YVYU_I420_Filter ( filter_t *, picture_t * ); - static picture_t *UYVY_I420_Filter ( filter_t *, picture_t * ); --static picture_t *cyuv_I420_Filter ( filter_t *, picture_t * ); - - /***************************************************************************** - * Module descriptor -@@ -97,10 +95,6 @@ static int Activate( vlc_object_t *p_this ) - p_filter->pf_video_filter = UYVY_I420_Filter; - break; - -- case VLC_CODEC_CYUV: -- p_filter->pf_video_filter = cyuv_I420_Filter; -- break; -- - default: - return -1; - } -@@ -116,7 +110,6 @@ static int Activate( vlc_object_t *p_this ) - VIDEO_FILTER_WRAPPER( YUY2_I420 ) - VIDEO_FILTER_WRAPPER( YVYU_I420 ) - VIDEO_FILTER_WRAPPER( UYVY_I420 ) --VIDEO_FILTER_WRAPPER( cyuv_I420 ) - - /***************************************************************************** - * YUY2_I420: packed YUY2 4:2:2 to planar YUV 4:2:0 -@@ -321,72 +314,3 @@ static void UYVY_I420( filter_t *p_filter, picture_t *p_source, - b_skip = !b_skip; - } - } -- --/***************************************************************************** -- * cyuv_I420: upside-down packed UYVY 4:2:2 to planar YUV 4:2:0 -- * FIXME -- *****************************************************************************/ --static void cyuv_I420( filter_t *p_filter, picture_t *p_source, -- picture_t *p_dest ) --{ -- uint8_t *p_line = p_source->p->p_pixels; -- -- uint8_t *p_y = p_dest->Y_PIXELS; -- uint8_t *p_u = p_dest->U_PIXELS; -- uint8_t *p_v = p_dest->V_PIXELS; -- -- int i_x, i_y; -- -- const int i_dest_margin = p_dest->p[0].i_pitch -- - p_dest->p[0].i_visible_pitch; -- const int i_dest_margin_c = p_dest->p[1].i_pitch -- - p_dest->p[1].i_visible_pitch; -- const int i_source_margin = p_source->p->i_pitch -- - p_source->p->i_visible_pitch; -- -- bool b_skip = false; -- -- for( i_y = p_filter->fmt_out.video.i_height ; i_y-- ; ) -- { -- if( b_skip ) -- { -- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) -- { -- #define C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ) \ -- *p_y++ = *p_line++; p_line++; \ -- *p_y++ = *p_line++; p_line++ -- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); -- } -- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) -- { -- C_cyuv_YUV422_skip( p_line, p_y, p_u, p_v ); -- } -- } -- else -- { -- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) -- { -- #define C_cyuv_YUV422( p_line, p_y, p_u, p_v ) \ -- *p_y++ = *p_line++; *p_v++ = *p_line++; \ -- *p_y++ = *p_line++; *p_u++ = *p_line++ -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- } -- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) -- { -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- } -- } -- p_line += i_source_margin; -- p_y += i_dest_margin; -- p_u += i_dest_margin_c; -- p_v += i_dest_margin_c; -- -- b_skip = !b_skip; -- } --} -diff --git a/modules/video_chroma/yuy2_i422.c b/modules/video_chroma/yuy2_i422.c -index 8ab149e..d748be6 100644 ---- a/modules/video_chroma/yuy2_i422.c -+++ b/modules/video_chroma/yuy2_i422.c -@@ -33,7 +33,7 @@ - #include <vlc_plugin.h> - #include <vlc_filter.h> - --#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422,cyuv" -+#define SRC_FOURCC "YUY2,YUNV,YVYU,UYVY,UYNV,Y422" - #define DEST_FOURCC "I422" - - /***************************************************************************** -@@ -44,11 +44,9 @@ static int Activate ( vlc_object_t * ); - static void YUY2_I422 ( filter_t *, picture_t *, picture_t * ); - static void YVYU_I422 ( filter_t *, picture_t *, picture_t * ); - static void UYVY_I422 ( filter_t *, picture_t *, picture_t * ); --static void cyuv_I422 ( filter_t *, picture_t *, picture_t * ); - static picture_t *YUY2_I422_Filter ( filter_t *, picture_t * ); - static picture_t *YVYU_I422_Filter ( filter_t *, picture_t * ); - static picture_t *UYVY_I422_Filter ( filter_t *, picture_t * ); --static picture_t *cyuv_I422_Filter ( filter_t *, picture_t * ); - - /***************************************************************************** - * Module descriptor -@@ -96,10 +94,6 @@ static int Activate( vlc_object_t *p_this ) - p_filter->pf_video_filter = UYVY_I422_Filter; - break; - -- case VLC_CODEC_CYUV: -- p_filter->pf_video_filter = cyuv_I422_Filter; -- break; -- - default: - return -1; - } -@@ -116,7 +110,6 @@ static int Activate( vlc_object_t *p_this ) - VIDEO_FILTER_WRAPPER( YUY2_I422 ) - VIDEO_FILTER_WRAPPER( YVYU_I422 ) - VIDEO_FILTER_WRAPPER( UYVY_I422 ) --VIDEO_FILTER_WRAPPER( cyuv_I422 ) - - /***************************************************************************** - * YUY2_I422: packed YUY2 4:2:2 to planar YUV 4:2:2 -@@ -249,48 +242,3 @@ static void UYVY_I422( filter_t *p_filter, picture_t *p_source, - p_v += i_dest_margin_c; - } - } -- --/***************************************************************************** -- * cyuv_I422: upside-down packed UYVY 4:2:2 to planar YUV 4:2:2 -- * FIXME -- *****************************************************************************/ --static void cyuv_I422( filter_t *p_filter, picture_t *p_source, -- picture_t *p_dest ) --{ -- uint8_t *p_line = p_source->p->p_pixels; -- -- uint8_t *p_y = p_dest->Y_PIXELS; -- uint8_t *p_u = p_dest->U_PIXELS; -- uint8_t *p_v = p_dest->V_PIXELS; -- -- int i_x, i_y; -- -- const int i_dest_margin = p_dest->p[0].i_pitch -- - p_dest->p[0].i_visible_pitch; -- const int i_dest_margin_c = p_dest->p[1].i_pitch -- - p_dest->p[1].i_visible_pitch; -- const int i_source_margin = p_source->p->i_pitch -- - p_source->p->i_visible_pitch; -- -- for( i_y = p_filter->fmt_out.video.i_height ; i_y-- ; ) -- { -- for( i_x = p_filter->fmt_out.video.i_width / 8 ; i_x-- ; ) -- { --#define C_cyuv_YUV422( p_line, p_y, p_u, p_v ) \ -- *p_y++ = *p_line++; *p_v++ = *p_line++; \ -- *p_y++ = *p_line++; *p_u++ = *p_line++ -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- } -- for( i_x = ( p_filter->fmt_out.video.i_width % 8 ) / 2; i_x-- ; ) -- { -- C_cyuv_YUV422( p_line, p_y, p_u, p_v ); -- } -- p_line += i_source_margin; -- p_y += i_dest_margin; -- p_u += i_dest_margin_c; -- p_v += i_dest_margin_c; -- } --} diff --git a/vlc-backport-freerdp.patch b/vlc-backport-freerdp.patch deleted file mode 100644 index dc8cb9d..0000000 --- a/vlc-backport-freerdp.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit 5c07f87a773153c128b3a771ed61e7915cd8fe18 -Author: Vinson Lee <vlee@freedesktop.org> -Date: Fri Feb 20 06:05:09 2015 +0000 - - rdp: Support FreeRDP-1.2.0-beta1-android9 - - Fix build errors. - - CC access/librdp_plugin_la-rdp.lo - access/rdp.c: In function ‘Open’: - access/rdp.c:431:5: error: implicit declaration of function ‘freerdp_channels_global_init’ [-Werror=implicit-function-declaration] - freerdp_channels_global_init(); - ^ - access/rdp.c: In function ‘Close’: - access/rdp.c:507:5: error: implicit declaration of function ‘freerdp_channels_global_uninit’ [-Werror=implicit-function-declaration] - freerdp_channels_global_uninit(); - ^ - - freerdp channels global functions were removed from FreeRDP repository - in commit 2a82684521dc8b23ae92e284e866227e5194a7bb. - - commit 2a82684521dc8b23ae92e284e866227e5194a7bb - Author: Marc-André Moreau <marcandre.moreau@gmail.com> - Date: Wed Jun 11 16:27:31 2014 -0400 - - channels: cleanup unused freerdp channels global functions - - Signed-off-by: Vinson Lee <vlee@freedesktop.org> - Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> - -diff --git a/modules/access/rdp.c b/modules/access/rdp.c -index 1dca8ae..769ba60 100644 ---- a/modules/access/rdp.c -+++ b/modules/access/rdp.c -@@ -428,7 +428,9 @@ static int Open( vlc_object_t *p_this ) - if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; - p_sys->i_frame_interval = 1000000 / p_sys->f_fps; - -+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 - freerdp_channels_global_init(); -+#endif - - p_sys->p_instance = freerdp_new(); - if ( !p_sys->p_instance ) -@@ -504,7 +506,9 @@ static void Close( vlc_object_t *p_this ) - - freerdp_disconnect( p_sys->p_instance ); - freerdp_free( p_sys->p_instance ); -+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 - freerdp_channels_global_uninit(); -+#endif - - if ( p_sys->p_block ) - block_Release( p_sys->p_block ); diff --git a/vlc.spec b/vlc.spec index 456d673..b98715e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,13 +32,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: vlc-backport-freerdp.patch -Patch1: vlc-backport-chroma_dead_CYUV.patch +Patch0: vlc-2.2x-bugfix-20150513.patch BuildRequires: desktop-file-utils @@ -220,7 +219,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} %patch0 -p1 -%patch1 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -486,6 +484,9 @@ fi || : %changelog +* Wed May 13 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-5 +- Update to current bugfix + * Sat May 09 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-4 - Recreate the plugins cache on post for main - rfbz#3639 - %%ghost the cache plugins From e5275999c8235b03f2e08bb4d87ea992e311b1b9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 16 May 2015 15:22:05 +0000 Subject: [PATCH 255/671] Rebuilt for x265 in f22 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index b98715e..81bf4e8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -484,6 +484,9 @@ fi || : %changelog +* Sat May 16 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-6 +- Rebuilt for x265 + * Wed May 13 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-5 - Update to current bugfix From dac8d35b1873d09baa80ad6a082dce71906bd3eb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 6 Oct 2015 17:04:46 +0000 Subject: [PATCH 256/671] Update to 2.2.0 pre-version --- .gitignore | 2 +- sources | 2 +- vlc.spec | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a7db8ad..d006c68 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.2.1.tar.xz +vlc-2.2.2-pre20151006.tar.xz diff --git a/sources b/sources index 1bd0712..b4803e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -42273945758b521c408fabc7fd6d9946 vlc-2.2.1.tar.xz +ad6422e9b3d8a1dfdda7a753ce56e8b3 vlc-2.2.2-pre20151006.tar.xz diff --git a/vlc.spec b/vlc.spec index 81bf4e8..a511469 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -#global vlc_rc -rc2 +%global vlc_rc -pre20151006 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -31,13 +31,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.2.1 -Release: 6%{?dist} +Version: 2.2.2 +Release: 0.1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: vlc-2.2x-bugfix-20150513.patch BuildRequires: desktop-file-utils @@ -218,7 +217,6 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -484,6 +482,9 @@ fi || : %changelog +* Tue Oct 06 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.2-0.1 +- Update to 2.2.2 pre-version + * Sat May 16 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.1-6 - Rebuilt for x265 From 2d4a3f156371372a602dbdc6e0114d21a1f735ed Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 7 Oct 2015 14:23:41 +0000 Subject: [PATCH 257/671] Fixup --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a511469..87c82e2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -216,7 +216,8 @@ JACK audio plugin for the VLC media player. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc} +#setup -q -n %{name}-%{version}%{?vlc_rc} +%setup -q -n %{name}-%{version} %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From f2d6c8c0ac8a08317e9a4ea10b0af50e39ad094c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 6 Feb 2016 14:11:03 +0100 Subject: [PATCH 258/671] Update to 2.2.2 --- .gitignore | 2 +- sources | 2 +- vlc-2.2x-bugfix-20150513.patch | 1883 -------------------------------- vlc.spec | 10 +- 4 files changed, 8 insertions(+), 1889 deletions(-) delete mode 100644 vlc-2.2x-bugfix-20150513.patch diff --git a/.gitignore b/.gitignore index d006c68..6d32910 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -vlc-2.2.2-pre20151006.tar.xz +vlc-*.tar.xz diff --git a/sources b/sources index b4803e6..02c6944 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad6422e9b3d8a1dfdda7a753ce56e8b3 vlc-2.2.2-pre20151006.tar.xz +f98d60f0f59ef72b6e3407f2ff09bda6 vlc-2.2.2.tar.xz diff --git a/vlc-2.2x-bugfix-20150513.patch b/vlc-2.2x-bugfix-20150513.patch deleted file mode 100644 index 4b73c02..0000000 --- a/vlc-2.2x-bugfix-20150513.patch +++ /dev/null @@ -1,1883 +0,0 @@ -diff --git a/NEWS b/NEWS -index a97c82b..9483432 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,28 @@ -+Changes between 2.2.1 and 2.2.2: -+-------------------------------- -+ -+Access: -+ * Fix SetupFormat for continuous framesize in v4l2 -+ -+Demux: -+ * Fix support for ms-dvr files -+ * HLS: fix hang on stop, crashes and small improvements -+ * Fix mp4 NULL dereference reported by by Fortinet's FortiGuard Labs -+ -+Decoders: -+ * Fix importing surface from main memory in VDPAU -+ -+Audio output: -+ * Fix audio drop after a flush with pulseaudio -+ -+Skins2: -+ * Fix video control that fails to show up -+ -+Misc: -+ * Fix build if one disables XCB but activate VDPAU on Unix -+ * Fix build with recent FreeRDP versions -+ -+ - Changes between 2.2.0 and 2.2.1: - -------------------------------- - -@@ -8,7 +33,7 @@ Codec: - * Fix lpcm channel ordering - * Fix potential NULL dereference in dmo - * Fix teletext framing code in DVB PES packets -- * Fix potential buffer overflow in schroendinger decoder -+ * Fix potential buffer overflow in schroendinger decoder (CVE-2014-9629) - * Fix AAC samplerate - - Demuxers: -@@ -244,13 +269,14 @@ Audio output: - - Security: - * Fix heap overflow in decomp stream filter -- * Fix buffer overflow in updater -+ * Fix buffer overflow in updater (CVE-2014-9625) - * Fix potential buffer overflow in schroedinger encoder - * Fix null-pointer dereference in DMO decoder -- * Fix buffer overflow in parsing of string boxes in mp4 demuxer -+ * Fix buffer overflow in parsing of string boxes in mp4 demuxer (CVE-2014-9626,9627,9628) - * Fix SRTP integer overflow - * Fix potential crash in zip access - * Fix read overflow in Ogg demuxer -+ * Fix RTP overflow (CVE-2014-9630) - - Win32 installer: - * Update translations and greek encoding -diff --git a/configure.ac b/configure.ac -index 121e8c9..35fb2df 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2,10 +2,10 @@ dnl Autoconf settings for vlc - - AC_COPYRIGHT([Copyright 1999-2015 VLC authors and VideoLAN]) - --AC_INIT(vlc, 2.2.1) -+AC_INIT(vlc, 2.2.2) - VERSION_MAJOR=2 - VERSION_MINOR=2 --VERSION_REVISION=1 -+VERSION_REVISION=2 - VERSION_EXTRA=0 - VERSION_DEV= - -@@ -13,7 +13,7 @@ PKGDIR="vlc" - AC_SUBST(PKGDIR) - - CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" --CODENAME="Terry Pratchett (Weatherwax)" -+CODENAME="Weatherwax" - COPYRIGHT_YEARS="1996-2015" - - AC_CONFIG_SRCDIR(src/libvlc.c) -diff --git a/contrib/src/dvdnav/rules.mak b/contrib/src/dvdnav/rules.mak -index bb5f958..9080930 100644 ---- a/contrib/src/dvdnav/rules.mak -+++ b/contrib/src/dvdnav/rules.mak -@@ -8,7 +8,7 @@ ifdef GPL - PKGS += dvdnav - endif - endif --ifeq ($(call need_pkg,"dvdnav > 5.0.0"),) -+ifeq ($(call need_pkg,"dvdnav >= 5.0.3"),) - PKGS_FOUND += dvdnav - endif - -diff --git a/contrib/src/dvdread/rules.mak b/contrib/src/dvdread/rules.mak -index 14bfe3e..157c4a9 100644 ---- a/contrib/src/dvdread/rules.mak -+++ b/contrib/src/dvdread/rules.mak -@@ -7,7 +7,7 @@ ifdef GPL - PKGS += dvdread - endif - endif --ifeq ($(call need_pkg,"dvdread > 5.0.2 "),) -+ifeq ($(call need_pkg,"dvdread >= 5.0.3"),) - PKGS_FOUND += dvdread - endif - -diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak -index 9d87c29..4a5ac16 100644 ---- a/contrib/src/ebml/rules.mak -+++ b/contrib/src/ebml/rules.mak -@@ -14,10 +14,10 @@ libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml - $(MOVE) - - # libebml requires exceptions --EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" \ -+EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions -fvisibility=hidden" \ - CPPFLAGS="" - - .ebml: libebml -- cd $< && $(HOSTVARS) ./configure $(HOSTCONF) -+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(EBML_EXTRA_FLAGS) - cd $< && $(MAKE) install - touch $@ -diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak -index b8d0165..c71ee83 100644 ---- a/contrib/src/matroska/rules.mak -+++ b/contrib/src/matroska/rules.mak -@@ -16,7 +16,9 @@ libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska - $(UNPACK) - $(MOVE) - -+MATROSKA_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" -+ - .matroska: libmatroska -- cd $< && $(HOSTVARS) ./configure $(HOSTCONF) -+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(MATROSKA_EXTRA_FLAGS) - cd $< && $(MAKE) install - touch $@ -diff --git a/contrib/src/upnp/missing_win32.patch b/contrib/src/upnp/missing_win32.patch -new file mode 100644 -index 0000000..c5f80d0 ---- /dev/null -+++ b/contrib/src/upnp/missing_win32.patch -@@ -0,0 +1,13 @@ -+--- upnp_clean/upnp/inc/upnp.h 2015-04-30 14:37:26.962425889 +0200 -++++ upnp/upnp/inc/upnp.h 2015-04-30 14:41:48.099528162 +0200 -+@@ -41,6 +41,10 @@ -+ * \file -+ */ -+ -++#ifdef _WIN32 -++# define WIN32 -++#endif -++ -+ #include "ixml.h" -+ #include "upnpconfig.h" -+ #include "UpnpGlobal.h" -diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak -index f6706b1..14d05c0 100644 ---- a/contrib/src/upnp/rules.mak -+++ b/contrib/src/upnp/rules.mak -@@ -25,6 +25,7 @@ ifdef HAVE_WIN32 - endif - $(APPLY) $(SRC)/upnp/libupnp-ipv6.patch - $(APPLY) $(SRC)/upnp/miniserver.patch -+ $(APPLY) $(SRC)/upnp/missing_win32.patch - $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub build-aux/ - $(MOVE) - -diff --git a/contrib/src/vpx/SHA512SUMS b/contrib/src/vpx/SHA512SUMS -index 84d2a30..7923cbc 100644 ---- a/contrib/src/vpx/SHA512SUMS -+++ b/contrib/src/vpx/SHA512SUMS -@@ -1 +1 @@ --af26766a3336155c5bc7b8cce7c23228de054287b990f9cacdc35273384a7af4999c01bb623d12143f40107036308a8b3207081efe67936748503c30c985fd6b libvpx-v1.3.0.tar.bz2 -+70234220e0ed64db000689ec8bea02dadef938a4f4dea96e5781d361c15245456212c1b6aec2b698d32ed423e73917d2303009e49224a2237669cab416dd6984 libvpx-1.4.0.tar.bz2 -diff --git a/contrib/src/vpx/libvpx-ios.patch b/contrib/src/vpx/libvpx-ios.patch -index 852792d..504860c 100644 ---- a/contrib/src/vpx/libvpx-ios.patch -+++ b/contrib/src/vpx/libvpx-ios.patch -@@ -1,78 +1,75 @@ --diff -ru libvpx/build/make/configure.sh libvpx/build/make/configure.sh ----- libvpx/build/make/configure.sh 2014-11-04 21:34:04.000000000 +0100 --+++ libvpx/build/make/configure.sh 2014-11-04 21:36:12.000000000 +0100 --@@ -714,59 +714,6 @@ -- # PIC is probably what we want when building shared libs -- enabled shared && soft_enable pic -+--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:10:54.667129298 +0200 -++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:13:53.650560142 +0200 -+@@ -745,58 +745,6 @@ -+ # Minimum iOS version for all target platforms (darwin and iphonesimulator). -+ IOS_VERSION_MIN="6.0" - --- # Handle darwin variants. Newer SDKs allow targeting older --- # platforms, so find the newest SDK available. --- case ${toolchain} in --- *-darwin*) --- if [ -z "${DEVELOPER_DIR}" ]; then --- DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null` --- [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1 --- fi --- if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then --- OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs" --- OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk" --- OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk" --- for v in ${OSX_SDK_VERSIONS}; do --- if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then --- osx_sdk_dir="${OSX_SDK_ROOTS}/${v}" --- fi --- done --- fi --- ;; --- esac --- --- if [ -d "${osx_sdk_dir}" ]; then -+- # Handle darwin variants. Newer SDKs allow targeting older -+- # platforms, so use the newest one available. -+- case ${toolchain} in -+- *-darwin*) -+- osx_sdk_dir="$(show_darwin_sdk_path macosx)" -+- if [ -d "${osx_sdk_dir}" ]; then - - add_cflags "-isysroot ${osx_sdk_dir}" - - add_ldflags "-isysroot ${osx_sdk_dir}" --- fi -+- fi -+- ;; -+- esac - - --- case ${toolchain} in --- *-darwin8-*) --- add_cflags "-mmacosx-version-min=10.4" --- add_ldflags "-mmacosx-version-min=10.4" --- ;; --- *-darwin9-*) --- add_cflags "-mmacosx-version-min=10.5" --- add_ldflags "-mmacosx-version-min=10.5" --- ;; --- *-darwin10-*) --- add_cflags "-mmacosx-version-min=10.6" --- add_ldflags "-mmacosx-version-min=10.6" --- ;; --- *-darwin11-*) --- add_cflags "-mmacosx-version-min=10.7" --- add_ldflags "-mmacosx-version-min=10.7" --- ;; --- *-darwin12-*) --- add_cflags "-mmacosx-version-min=10.8" --- add_ldflags "-mmacosx-version-min=10.8" --- ;; --- *-darwin13-*) --- add_cflags "-mmacosx-version-min=10.9" --- add_ldflags "-mmacosx-version-min=10.9" --- ;; --- esac -+- case ${toolchain} in -+- *-darwin8-*) -+- add_cflags "-mmacosx-version-min=10.4" -+- add_ldflags "-mmacosx-version-min=10.4" -+- ;; -+- *-darwin9-*) -+- add_cflags "-mmacosx-version-min=10.5" -+- add_ldflags "-mmacosx-version-min=10.5" -+- ;; -+- *-darwin10-*) -+- add_cflags "-mmacosx-version-min=10.6" -+- add_ldflags "-mmacosx-version-min=10.6" -+- ;; -+- *-darwin11-*) -+- add_cflags "-mmacosx-version-min=10.7" -+- add_ldflags "-mmacosx-version-min=10.7" -+- ;; -+- *-darwin12-*) -+- add_cflags "-mmacosx-version-min=10.8" -+- add_ldflags "-mmacosx-version-min=10.8" -+- ;; -+- *-darwin13-*) -+- add_cflags "-mmacosx-version-min=10.9" -+- add_ldflags "-mmacosx-version-min=10.9" -+- ;; -+- *-darwin14-*) -+- add_cflags "-mmacosx-version-min=10.10" -+- add_ldflags "-mmacosx-version-min=10.10" -+- ;; -+- *-iphonesimulator-*) -+- add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" -+- add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" -+- iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)" -+- if [ -d "${iossim_sdk_dir}" ]; then -+- add_cflags "-isysroot ${iossim_sdk_dir}" -+- add_ldflags "-isysroot ${iossim_sdk_dir}" -+- fi -+- ;; -+- esac - - -- # Handle Solaris variants. Solaris 10 needs -lposix4 -- case ${toolchain} in -- sparc-solaris-*) --@@ -1070,7 +1017,13 @@ -- ;; -- gcc*) -- add_cflags -m${bits} --- add_ldflags -m${bits} --+ case ${tgt_os} in --+ darwin*) --+ ;; --+ *) --+ add_ldflags -m${bits} --+ ;; --+ esac -- link_with_cc=gcc -- tune_cflags="-march=" -- setup_gnu_toolchain -+ # Handle Solaris variants. Solaris 10 needs -lposix4 -+ case ${toolchain} in -+ sparc-solaris-*) -+@@ -1149,6 +1097,13 @@ -+ case ${tgt_cc} in -+ gcc*) -+ add_cflags -m${bits} -++ case ${tgt_os} in -++ darwin*) -++ ;; -++ *) -++ add_ldflags -m${bits} -++ ;; -++ esac -+ add_ldflags -m${bits} -+ ;; -+ esac -diff --git a/contrib/src/vpx/libvpx-mac.patch b/contrib/src/vpx/libvpx-mac.patch -index ebb868a..7e41283 100644 ---- a/contrib/src/vpx/libvpx-mac.patch -+++ b/contrib/src/vpx/libvpx-mac.patch -@@ -1,18 +1,43 @@ --libvpx's configure script hard-codes the SDK location of previous Xcode release in the /Developer folder. However, starting with Xcode 4.3, the SDKs moved to /Applications/Xcode.app/blabla --VLC's contrib system is clever enough to detect this, but libvpx fails miserably. However, they are providing a work-around for iOS and Android, which is expanded by this patch. -- --diff -ru libvpx/build/make/configure.sh libvpx/build/make/configure.sh ----- libvpx/build/make/configure.sh 2012-06-08 10:26:47.000000000 +0200 --+++ libvpx-fixed/build/make/configure.sh 2012-06-08 10:26:07.000000000 +0200 --@@ -628,6 +628,11 @@ -- if [ -d "/Developer/SDKs/MacOSX10.7.sdk" ]; then -- osx_sdk_dir="/Developer/SDKs/MacOSX10.7.sdk" -- fi -+--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:03:00.504713016 +0200 -++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:05:52.358003947 +0200 -+@@ -751,6 +751,12 @@ -+ ;; -+ esac -+ -++ if [ -d "${sdk_path}" ]; then -++ case "${sdk_path}" in -++ darwin*) osx_sdk_dir=${sdk_path} ;; -++ esac -++ fi -++ -+ case ${toolchain} in -+ *-darwin8-*) -+ add_cflags "-mmacosx-version-min=10.4" -+--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:06:31.502087047 +0200 -++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:09:41.525727635 +0200 -+@@ -651,6 +651,12 @@ -+ ;; -+ esac -+ - + if [ -d "${sdk_path}" ]; then - + case "${sdk_path}" in - + darwin*) osx_sdk_dir=${sdk_path} ;; - + esac - + fi -++ -+ # detect tgt_os -+ case "$gcctarget" in -+ *darwin8*) -+@@ -751,12 +757,6 @@ -+ ;; -+ esac - -- case ${toolchain} in -- *-darwin8-*) -+- if [ -d "${sdk_path}" ]; then -+- case "${sdk_path}" in -+- darwin*) osx_sdk_dir=${sdk_path} ;; -+- esac -+- fi -+- -+ case ${toolchain} in -+ *-darwin8-*) -+ add_cflags "-mmacosx-version-min=10.4" -diff --git a/contrib/src/vpx/libvpx-no-cross.patch b/contrib/src/vpx/libvpx-no-cross.patch -index e261dc7..9881624 100644 ---- a/contrib/src/vpx/libvpx-no-cross.patch -+++ b/contrib/src/vpx/libvpx-no-cross.patch -@@ -1,10 +1,10 @@ ----- libvpx-v1.0.0/build/make/configure.sh.orig 2012-01-29 04:59:36.976441000 -0500 --+++ libvpx-v1.0.0/build/make/configure.sh 2012-01-29 04:59:46.684441001 -0500 --@@ -680,7 +680,6 @@ -+--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 16:00:58.682380921 +0200 -++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 16:02:13.537147158 +0200 -+@@ -831,7 +831,6 @@ - -- case ${tgt_cc} in -+ case ${tgt_cc} in - gcc) --- CROSS=${CROSS:-arm-none-linux-gnueabi-} -- link_with_cc=gcc -- setup_gnu_toolchain -- arch_int=${tgt_isa##armv} -+- CROSS=${CROSS:-arm-none-linux-gnueabi-} -+ link_with_cc=gcc -+ setup_gnu_toolchain -+ arch_int=${tgt_isa##armv} -diff --git a/contrib/src/vpx/libvpx-sysroot.patch b/contrib/src/vpx/libvpx-sysroot.patch -index 9b84338..0ba43dc 100644 ---- a/contrib/src/vpx/libvpx-sysroot.patch -+++ b/contrib/src/vpx/libvpx-sysroot.patch -@@ -8,24 +8,19 @@ correct sysroot. - - See also https://code.google.com/p/webm/issues/detail?id=809 - --diff --git a/build/make/configure.sh b/build/make/configure.sh --index d4124c7..c420d25 100755 ----- a/build/make/configure.sh --+++ b/build/make/configure.sh --@@ -939,8 +939,11 @@ EOF -- awk '{ print $1 }' | tail -1` -- fi -+--- libvpx-1.4.0/build/make/configure.sh.orig 2015-05-05 15:57:26.568321902 +0200 -++++ libvpx-1.4.0/build/make/configure.sh 2015-05-05 15:59:04.860202562 +0200 -+@@ -941,8 +941,11 @@ -+ awk '{ print $1 }' | tail -1` -+ fi - --- add_cflags "--sysroot=${alt_libc}" --- add_ldflags "--sysroot=${alt_libc}" --+ # this may happen if toolchain binaries are outside the ndk dir --+ if [ "${alt_libc}" ]; then --+ add_cflags "--sysroot=${alt_libc}" --+ add_ldflags "--sysroot=${alt_libc}" --+ fi -+- add_cflags "--sysroot=${alt_libc}" -+- add_ldflags "--sysroot=${alt_libc}" -++ # this may happen if toolchain binaries are outside the ndk dir -++ if [ "${alt_libc}" ]; then -++ add_cflags "--sysroot=${alt_libc}" -++ add_ldflags "--sysroot=${alt_libc}" -++ fi - -- # linker flag that routes around a CPU bug in some -- # Cortex-A8 implementations (NDK Dev Guide) ---- --1.8.3.2 -- -+ # linker flag that routes around a CPU bug in some -+ # Cortex-A8 implementations (NDK Dev Guide) -diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak -index b55199d..ac3eace 100644 ---- a/contrib/src/vpx/rules.mak -+++ b/contrib/src/vpx/rules.mak -@@ -1,7 +1,7 @@ - # libvpx - --VPX_VERSION := v1.3.0 --VPX_URL := http://webm.googlecode.com/files/libvpx-$(VPX_VERSION).tar.bz2 -+VPX_VERSION := 1.4.0 -+VPX_URL := http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-$(VPX_VERSION).tar.bz2 - - $(TARBALLS)/libvpx-$(VPX_VERSION).tar.bz2: - $(call download,$(VPX_URL)) -diff --git a/extras/package/macosx/build-package.sh b/extras/package/macosx/build-package.sh -index a693c4f..fe4a52a 100644 ---- a/extras/package/macosx/build-package.sh -+++ b/extras/package/macosx/build-package.sh -@@ -248,13 +248,12 @@ done - - ########################## - # Build the lib folder --vlc_install "lib/${prefix}" "libvlc.5.dylib" "${target_lib}" "library" --vlc_install "src/${prefix}" "libvlccore.7.dylib" "${target_lib}" "library" --pushd `pwd` > /dev/null --cd ${target_lib} --ln -sf libvlc.5.dylib libvlc.dylib --ln -sf libvlccore.7.dylib libvlccore.dylib --popd > /dev/null -+vlc_install "lib/${prefix}" "libvlc.*.dylib" "${target_lib}" "library" -+vlc_install "src/${prefix}" "libvlccore.*.dylib" "${target_lib}" "library" -+ -+# copy symlinks -+cp -RP "lib/${prefix}/libvlc.dylib" "${target_lib}" -+cp -RP "src/${prefix}/libvlccore.dylib" "${target_lib}" - - ########################## - # Build the share folder -diff --git a/extras/package/npapi.am b/extras/package/npapi.am -index e778f7d..da8a4f0 100644 ---- a/extras/package/npapi.am -+++ b/extras/package/npapi.am -@@ -9,8 +9,11 @@ fetch-npapi: - cd npapi-vlc && \ - git fetch origin && \ - git reset --hard origin/master; \ -+ git submodule update; \ - else \ -- git clone git://git.videolan.org/npapi-vlc.git npapi-vlc ; \ -+ git clone git://git.videolan.org/npapi-vlc.git npapi-vlc && \ -+ cd npapi-vlc && \ -+ git submodule update --init; \ - fi - git --git-dir=npapi-vlc/.git describe --long --always > stamp-npapi.tmp - if diff stamp-npapi.tmp stamp-npapi >/dev/null 2>&1; then \ -diff --git a/include/vlc_input.h b/include/vlc_input.h -index 6ec305b..13a944a 100644 ---- a/include/vlc_input.h -+++ b/include/vlc_input.h -@@ -53,6 +53,8 @@ struct seekpoint_t - static inline seekpoint_t *vlc_seekpoint_New( void ) - { - seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) ); -+ if( !point ) -+ return NULL; - point->i_byte_offset = - point->i_time_offset = -1; - point->psz_name = NULL; -@@ -96,6 +98,8 @@ typedef struct input_title_t - static inline input_title_t *vlc_input_title_New(void) - { - input_title_t *t = (input_title_t*)malloc( sizeof( input_title_t ) ); -+ if( !t ) -+ return NULL; - - t->psz_name = NULL; - t->b_menu = false; -diff --git a/modules/access/rdp.c b/modules/access/rdp.c -index a7280a59..0a11f42 100644 ---- a/modules/access/rdp.c -+++ b/modules/access/rdp.c -@@ -428,7 +428,9 @@ static int Open( vlc_object_t *p_this ) - if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; - p_sys->i_frame_interval = 1000000 / p_sys->f_fps; - -+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 - freerdp_channels_global_init(); -+#endif - - p_sys->p_instance = freerdp_new(); - if ( !p_sys->p_instance ) -@@ -504,7 +506,9 @@ static void Close( vlc_object_t *p_this ) - - freerdp_disconnect( p_sys->p_instance ); - freerdp_free( p_sys->p_instance ); -+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 - freerdp_channels_global_uninit(); -+#endif - - if ( p_sys->p_block ) - block_Release( p_sys->p_block ); -diff --git a/modules/access/rtsp/rtsp.c b/modules/access/rtsp/rtsp.c -index 7b1e606..f1aabc5 100644 ---- a/modules/access/rtsp/rtsp.c -+++ b/modules/access/rtsp/rtsp.c -@@ -88,7 +88,7 @@ const char rtsp_protocol_version[]="RTSP/1.0"; - - static char *rtsp_get( rtsp_client_t *rtsp ) - { -- char *psz_buffer = malloc( BUF_SIZE ); -+ char *psz_buffer = xmalloc( BUF_SIZE ); - char *psz_string = NULL; - - if( rtsp->pf_read_line( rtsp->p_userdata, (uint8_t*)psz_buffer, (unsigned int)BUF_SIZE ) >= 0 ) -@@ -109,7 +109,7 @@ static char *rtsp_get( rtsp_client_t *rtsp ) - static int rtsp_put( rtsp_client_t *rtsp, const char *psz_string ) - { - unsigned int i_buffer = strlen( psz_string ); -- char *psz_buffer = malloc( i_buffer + 3 ); -+ char *psz_buffer = xmalloc( i_buffer + 3 ); - int i_ret; - - strcpy( psz_buffer, psz_string ); -@@ -162,7 +162,7 @@ static int rtsp_send_request( rtsp_client_t *rtsp, const char *psz_type, - char *psz_buffer; - int i_ret; - -- psz_buffer = malloc( strlen(psz_type) + strlen(psz_what) + -+ psz_buffer = xmalloc( strlen(psz_type) + strlen(psz_what) + - sizeof("RTSP/1.0") + 2 ); - - sprintf( psz_buffer, "%s %s %s", psz_type, psz_what, "RTSP/1.0" ); -@@ -195,7 +195,7 @@ static void rtsp_schedule_standard( rtsp_client_t *rtsp ) - if( rtsp->p_private->session ) - { - char *buf; -- buf = malloc( strlen(rtsp->p_private->session) + 15 ); -+ buf = xmalloc( strlen(rtsp->p_private->session) + 15 ); - sprintf( buf, "Session: %s", rtsp->p_private->session ); - rtsp_schedule_field( rtsp, buf ); - free( buf ); -@@ -239,14 +239,14 @@ static int rtsp_get_answers( rtsp_client_t *rtsp ) - } - if( !strncasecmp( answer, "Server:", 7 ) ) - { -- char *buf = malloc( strlen(answer) ); -+ char *buf = xmalloc( strlen(answer) ); - sscanf( answer, "%*s %s", buf ); - free( rtsp->p_private->server ); - rtsp->p_private->server = buf; - } - if( !strncasecmp( answer, "Session:", 8 ) ) - { -- char *buf = malloc( strlen(answer) ); -+ char *buf = xmalloc( strlen(answer) ); - sscanf( answer, "%*s %s", buf ); - if( rtsp->p_private->session ) - { -@@ -305,7 +305,7 @@ int rtsp_request_options( rtsp_client_t *rtsp, const char *what ) - if( what ) buf = strdup(what); - else - { -- buf = malloc( strlen(rtsp->p_private->host) + 16 ); -+ buf = xmalloc( strlen(rtsp->p_private->host) + 16 ); - sprintf( buf, "rtsp://%s:%i", rtsp->p_private->host, - rtsp->p_private->port ); - } -@@ -325,7 +325,7 @@ int rtsp_request_describe( rtsp_client_t *rtsp, const char *what ) - } - else - { -- buf = malloc( strlen(rtsp->p_private->host) + -+ buf = xmalloc( strlen(rtsp->p_private->host) + - strlen(rtsp->p_private->path) + 16 ); - sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, - rtsp->p_private->port, rtsp->p_private->path ); -@@ -352,7 +352,7 @@ int rtsp_request_setparameter( rtsp_client_t *rtsp, const char *what ) - } - else - { -- buf = malloc( strlen(rtsp->p_private->host) + -+ buf = xmalloc( strlen(rtsp->p_private->host) + - strlen(rtsp->p_private->path) + 16 ); - sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, - rtsp->p_private->port, rtsp->p_private->path ); -@@ -374,7 +374,7 @@ int rtsp_request_play( rtsp_client_t *rtsp, const char *what ) - } - else - { -- buf = malloc( strlen(rtsp->p_private->host) + -+ buf = xmalloc( strlen(rtsp->p_private->host) + - strlen(rtsp->p_private->path) + 16 ); - sprintf( buf, "rtsp://%s:%i/%s", rtsp->p_private->host, - rtsp->p_private->port, rtsp->p_private->path ); -@@ -431,7 +431,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, uint8_t *buffer, unsigned int size ) - - /* lets make the server happy */ - rtsp_put( rtsp, "RTSP/1.0 451 Parameter Not Understood" ); -- rest = malloc(17); -+ rest = xmalloc(17); - sprintf( rest,"CSeq: %u", seq ); - rtsp_put( rtsp, rest ); - rtsp_put( rtsp, "" ); -@@ -464,7 +464,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl, - unsigned int hostend, pathbegin, i; - - if( !psz_mrl ) return -1; -- s = malloc( sizeof(rtsp_t) ); -+ s = xmalloc( sizeof(rtsp_t) ); - rtsp->p_private = s; - - if( !strncmp( psz_mrl, "rtsp://", 7 ) ) psz_mrl += 7; -@@ -502,7 +502,7 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl, - pathbegin = slash - mrl_ptr; - hostend = colon - mrl_ptr; - -- s->host = malloc(hostend+1); -+ s->host = xmalloc(hostend+1); - strncpy( s->host, mrl_ptr, hostend ); - s->host[hostend] = 0; - -diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c -index fe5d1c9..b8544ea 100644 ---- a/modules/access/v4l2/video.c -+++ b/modules/access/v4l2/video.c -@@ -508,7 +508,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc, - width <= fse.stepwise.max_width; - width += fse.stepwise.step_width) - for (uint32_t height = fse.stepwise.min_height; -- height <= fse.stepwise.max_width; -+ height <= fse.stepwise.max_height; - height += fse.stepwise.step_height) - { - struct v4l2_fract cur_it; -diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c -index 4645306..48e0c6d 100644 ---- a/modules/audio_output/audiounit_ios.c -+++ b/modules/audio_output/audiounit_ios.c -@@ -252,13 +252,6 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt) - return false; - } - -- /* AU init */ -- status = AudioUnitInitialize(p_sys->au_unit); -- if (status != noErr) { -- msg_Err(p_aout, "failed to init AudioUnit (%i)", (int)status); -- return false; -- } -- - /* setup circular buffer */ - TPCircularBufferInit(&p_sys->circular_buffer, AUDIO_BUFFER_SIZE_IN_SECONDS * fmt->i_rate * fmt->i_bytes_per_frame); - -@@ -268,10 +261,17 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt) - NULL, - NULL); - -- /* Set audio session to mediaplayback */ -- UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; -- AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); -- AudioSessionSetActive(true); -+ /* Set audio session to mediaplayback */ -+ UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; -+ AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); -+ AudioSessionSetActive(true); -+ -+ /* AU init */ -+ status = AudioUnitInitialize(p_sys->au_unit); -+ if (status != noErr) { -+ msg_Err(p_aout, "failed to init AudioUnit (%i)", (int)status); -+ return false; -+ } - - /* start the unit */ - status = AudioOutputUnitStart(p_sys->au_unit); -@@ -292,6 +292,10 @@ static void Stop(audio_output_t *p_aout) - if (status != noErr) - msg_Warn(p_aout, "failed to stop AudioUnit (%i)", (int)status); - -+ status = AudioUnitUninitialize(p_sys->au_unit); -+ if (status != noErr) -+ msg_Warn(p_aout, "failed to uninit AudioUnit (%i)", (int)status); -+ - status = AudioComponentInstanceDispose(p_sys->au_unit); - if (status != noErr) - msg_Warn(p_aout, "failed to dispose Audio Component instance (%i)", (int)status); -@@ -340,10 +344,10 @@ static void Pause (audio_output_t *p_aout, bool pause, mtime_t date) - AudioOutputUnitStop(p_sys->au_unit); - AudioSessionSetActive(false); - } else { -- AudioOutputUnitStart(p_sys->au_unit); - UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; - AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory); - AudioSessionSetActive(true); -+ AudioOutputUnitStart(p_sys->au_unit); - } - } - -@@ -411,11 +415,13 @@ static OSStatus RenderCallback(vlc_object_t *p_obj, - /* Pull audio from buffer */ - int32_t availableBytes; - Float32 *buffer = TPCircularBufferTail(&p_sys->circular_buffer, &availableBytes); -+ if (unlikely(bytesRequested == 0)) /* cannot be negative */ -+ return noErr; - - /* check if we have enough data */ - if (!availableBytes || p_sys->b_paused) { - /* return an empty buffer so silence is played until we have data */ -- memset(targetBuffer, 0, ioData->mBuffers[0].mDataByteSize); -+ memset(targetBuffer, 0, bytesRequested); - } else { - int32_t bytesToCopy = __MIN(bytesRequested, availableBytes); - -diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c -index 069cf6a..231769d 100644 ---- a/modules/audio_output/pulse.c -+++ b/modules/audio_output/pulse.c -@@ -561,6 +561,9 @@ static void Flush(audio_output_t *aout, bool wait) - op = pa_stream_flush(s, NULL, NULL); - if (op != NULL) - pa_operation_unref(op); -+ sys->first_pts = VLC_TS_INVALID; -+ stream_stop(s, aout); -+ - pa_threaded_mainloop_unlock(sys->mainloop); - } - -diff --git a/modules/codec/png.c b/modules/codec/png.c -index 33f7515..36ed444 100644 ---- a/modules/codec/png.c -+++ b/modules/codec/png.c -@@ -372,6 +372,11 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic) - return NULL; - } - -+ /* Disable filtering to speed-up encoding */ -+ png_set_filter( p_png, 0, PNG_NO_FILTERS ); -+ /* 1 == best speed */ -+ png_set_compression_level( p_png, 1 ); -+ - /* save buffer start */ - uint8_t *p_start = p_block->p_buffer; - size_t i_start = p_block->i_buffer; -diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c -index b133410..f8406ed 100644 ---- a/modules/demux/asf/asf.c -+++ b/modules/demux/asf/asf.c -@@ -1344,7 +1344,7 @@ static int DemuxInit( demux_t *p_demux ) - if( fmt.i_codec == VLC_FOURCC( 'D','V','R',' ') ) - { - /* DVR-MS special ASF */ -- fmt.i_codec = VLC_FOURCC( 'm','p','g','2' ) ; -+ fmt.i_codec = VLC_CODEC_MPGV; - fmt.b_packetized = false; - } - -diff --git a/modules/demux/image.c b/modules/demux/image.c -index 5b56913..7809312 100644 ---- a/modules/demux/image.c -+++ b/modules/demux/image.c -@@ -147,8 +147,7 @@ static block_t *Decode(demux_t *demux, - - size_t size = 0; - for (int i = 0; i < image->i_planes; i++) -- size += image->p[i].i_visible_pitch * -- image->p[i].i_visible_lines; -+ size += image->p[i].i_pitch * image->p[i].i_lines; - - data = block_Alloc(size); - if (!data) { -diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c -index 3912e7e..331262b 100644 ---- a/modules/demux/mp4/libmp4.c -+++ b/modules/demux/mp4/libmp4.c -@@ -3576,6 +3576,15 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father ) - free( p_box ); - return NULL; - } -+ -+ if( p_father && p_father->i_size > 0 && -+ p_father->i_pos + p_father->i_size < p_box->i_pos + p_box->i_size ) -+ { -+ msg_Dbg( p_stream, "out of bound child" ); -+ free( p_box ); -+ return NULL; -+ } -+ - if( !p_box->i_size ) - { - msg_Dbg( p_stream, "found an empty box (null size)" ); -diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c -index 7a52103..46c5f9a 100644 ---- a/modules/demux/mp4/mp4.c -+++ b/modules/demux/mp4/mp4.c -@@ -4864,13 +4864,16 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track, - es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_nzdts ); - } - -- if ( p_track->p_es ) -+ if ( p_block ) - { -- p_block->i_dts = VLC_TS_0 + i_nzdts; -- p_block->i_pts = VLC_TS_0 + i_nzpts; -- es_out_Send( p_demux->out, p_track->p_es, p_block ); -+ if ( p_track->p_es ) -+ { -+ p_block->i_dts = VLC_TS_0 + i_nzdts; -+ p_block->i_pts = VLC_TS_0 + i_nzpts; -+ es_out_Send( p_demux->out, p_track->p_es, p_block ); -+ } -+ else block_Release( p_block ); - } -- else free( p_block ); - - chunk_size += len; - } -diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m -index 1fc4d6e..b749512 100644 ---- a/modules/gui/macosx/CoreInteraction.m -+++ b/modules/gui/macosx/CoreInteraction.m -@@ -258,12 +258,14 @@ static VLCCoreInteraction *_o_sharedInstance = nil; - return nil; - } - -- NSString *o_name; -+ NSString *o_name = @""; - char *format = var_InheritString(VLCIntf, "input-title-format"); -- char *formated = str_format_meta(p_input, format); -- free(format); -- o_name = [NSString stringWithUTF8String:formated]; -- free(formated); -+ if (format) { -+ char *formated = str_format_meta(p_input, format); -+ free(format); -+ o_name = toNSStr(formated); -+ free(formated); -+ } - - NSURL * o_url = [NSURL URLWithString:[NSString stringWithUTF8String:psz_uri]]; - free(psz_uri); -diff --git a/modules/gui/macosx/ExtensionsDialogProvider.m b/modules/gui/macosx/ExtensionsDialogProvider.m -index c7d6d08..d15966c 100644 ---- a/modules/gui/macosx/ExtensionsDialogProvider.m -+++ b/modules/gui/macosx/ExtensionsDialogProvider.m -@@ -111,6 +111,7 @@ static NSView *createControlFromWidget(extension_widget_t *widget, id self) - VLCDialogList *list = [[VLCDialogList alloc] init]; - [list setUsesAlternatingRowBackgroundColors:YES]; - [list setHeaderView:nil]; -+ [list setAllowsMultipleSelection:YES]; - [scrollView setDocumentView:list]; - [scrollView setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; - -@@ -203,7 +204,8 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget, - [popup removeAllItems]; - struct extension_widget_value_t *value; - for (value = widget->p_values; value != NULL; value = value->p_next) -- [popup addItemWithTitle:[NSString stringWithUTF8String:value->psz_text]]; -+ [[popup menu] addItemWithTitle:toNSStr(value->psz_text) action:nil keyEquivalent:@""]; -+ - [popup synchronizeTitleAndSelectedItem]; - [self popUpSelectionChanged:popup]; - break; -@@ -365,8 +367,9 @@ static ExtensionsDialogProvider *_o_sharedInstance = nil; - - struct extension_widget_value_t *value; - unsigned i = 0; -+ NSIndexSet *selectedIndexes = [list selectedRowIndexes]; - for (value = [list widget]->p_values; value != NULL; value = value->p_next, i++) -- value->b_selected = (i == [list selectedRow]); -+ value->b_selected = (YES == [selectedIndexes containsIndex:i]); - } - - - (void)popUpSelectionChanged:(id)sender -diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m -index 875c71f..b712413 100644 ---- a/modules/gui/macosx/MainWindow.m -+++ b/modules/gui/macosx/MainWindow.m -@@ -695,14 +695,16 @@ static VLCMainWindow *_o_sharedInstance = nil; - input_thread_t * p_input; - p_input = pl_CurrentInput(VLCIntf); - if (p_input) { -- NSString *aString; -+ NSString *aString = @""; - - if (!config_GetPsz(VLCIntf, "video-title")) { - char *format = var_InheritString(VLCIntf, "input-title-format"); -- char *formated = str_format_meta(p_input, format); -- free(format); -- aString = [NSString stringWithUTF8String:formated]; -- free(formated); -+ if (format) { -+ char *formated = str_format_meta(p_input, format); -+ free(format); -+ aString = toNSStr(formated); -+ free(formated); -+ } - } else - aString = [NSString stringWithUTF8String:config_GetPsz(VLCIntf, "video-title")]; - -diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m -index ddc0957..43bbe82 100644 ---- a/modules/gui/macosx/simple_prefs.m -+++ b/modules/gui/macosx/simple_prefs.m -@@ -105,6 +105,7 @@ static const char *const ppsz_language[] = - "es", - "es_MX", - "sv", -+ "ta", - "te", - "th", - "tr", -@@ -179,6 +180,7 @@ static const char *const ppsz_language_text[] = - "Español", - "Español mexicano", - "Svenska", -+ "தமிழ்", - "తెలుగు", - "ภาษาไทย", - "Türkçe", -diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp -index 831ccdf..8feeecd 100644 ---- a/modules/gui/qt4/components/simple_preferences.cpp -+++ b/modules/gui/qt4/components/simple_preferences.cpp -@@ -119,6 +119,7 @@ static const char *const ppsz_language[] = - "es", - "es_MX", - "sv", -+ "ta", - "te", - "th", - "tr", -@@ -193,6 +194,7 @@ static const char *const ppsz_language_text[] = - "Español", - "Español mexicano", - "Svenska", -+ "தமிழ்", - "తెలుగు", - "ภาษาไทย", - "Türkçe", -diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp -index 8283fdc..16c89fe 100644 ---- a/modules/gui/qt4/input_manager.cpp -+++ b/modules/gui/qt4/input_manager.cpp -@@ -512,10 +512,17 @@ void InputManager::UpdateName() - - /* Try to get the nowplaying */ - char *format = var_InheritString( p_intf, "input-title-format" ); -- char *formated = str_format_meta( p_input, format ); -- free( format ); -- name = qfu(formated); -- free( formated ); -+ char *formatted = NULL; -+ if (format != NULL) -+ { -+ formatted = str_format_meta( p_input, format ); -+ free( format ); -+ if( formatted != NULL ) -+ { -+ name = qfu(formatted); -+ free( formatted ); -+ } -+ } - - /* If we have Nothing */ - if( name.simplified().isEmpty() ) -diff --git a/modules/gui/skins2/controls/ctrl_video.cpp b/modules/gui/skins2/controls/ctrl_video.cpp -index 7c9dcae..c722755 100644 ---- a/modules/gui/skins2/controls/ctrl_video.cpp -+++ b/modules/gui/skins2/controls/ctrl_video.cpp -@@ -113,6 +113,7 @@ void CtrlVideo::setLayout( GenericLayout *pLayout, - { - CtrlGeneric::setLayout( pLayout, rPosition ); - m_pLayout->getActiveVar().addObserver( this ); -+ getWindow()->getVisibleVar().addObserver( this ); - - // register Video Control - VoutManager::instance( getIntf() )->registerCtrlVideo( this ); -@@ -125,6 +126,7 @@ void CtrlVideo::setLayout( GenericLayout *pLayout, - void CtrlVideo::unsetLayout() - { - m_pLayout->getActiveVar().delObserver( this ); -+ getWindow()->getVisibleVar().delObserver( this ); - CtrlGeneric::unsetLayout(); - } - -@@ -162,27 +164,28 @@ void CtrlVideo::resizeControl( int width, int height ) - void CtrlVideo::onUpdate( Subject<VarBool> &rVariable, void *arg ) - { - (void)arg; -+ VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); - -- // Visibility changed - if( &rVariable == m_pVisible ) - { -- msg_Dbg( getIntf(), "VideoCtrl : Visibility changed (visible=%d)", -- isVisible() ); -+ msg_Dbg( getIntf(), "VideoCtrl(%p) : control visibility changed (%i)", -+ this, isVisible() ); - notifyLayout(); - } -- -- // Active Layout changed -- if( &rVariable == &m_pLayout->getActiveVar() ) -+ else if( &rVariable == &m_pLayout->getActiveVar() ) - { -- msg_Dbg( getIntf(), "VideoCtrl : Active Layout changed (isActive=%d)", -- m_pLayout->getActiveVar().get() ); -+ msg_Dbg( getIntf(), "VideoCtrl(%p) : Active Layout changed (%i)", -+ this, m_pLayout->getActiveVar().get() ); - } -- -- VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); -- if( &rVariable == &rFullscreen ) -+ else if( &rVariable == &getWindow()->getVisibleVar() ) -+ { -+ msg_Dbg( getIntf(), "VideoCtrl(%p) : Window visibility changed (%i)", -+ this, getWindow()->getVisibleVar().get() ); -+ } -+ else if( &rVariable == &rFullscreen ) - { -- msg_Dbg( getIntf(), "VideoCtrl : fullscreen toggled (fullscreen = %d)", -- rFullscreen.get() ); -+ msg_Dbg( getIntf(), "VideoCtrl(%p) : fullscreen toggled (%i)", -+ this, rFullscreen.get() ); - } - - if( isUseable() && !isUsed() ) -@@ -232,9 +235,10 @@ bool CtrlVideo::isUseable( ) const - { - VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar(); - -- return isVisible() && // video control is visible -- m_pLayout->isVisible() && // layout is visible -- !rFullscreen.get(); // fullscreen is off -+ return isVisible() // video control is visible -+ && m_pLayout->getActiveVar().get() // layout is active -+ && getWindow()->getVisibleVar().get() // window is visible -+ && !rFullscreen.get(); // fullscreen is off - } - - -diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp -index dcf3b30..f490737 100644 ---- a/modules/gui/skins2/src/vlcproc.cpp -+++ b/modules/gui/skins2/src/vlcproc.cpp -@@ -738,9 +738,15 @@ void VlcProc::update_current_input() - { - // Update short name (as defined by --input-title-format) - char *psz_fmt = var_InheritString( getIntf(), "input-title-format" ); -- char *psz_name = str_format_meta( pInput, psz_fmt ); -- SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) ); -- free( psz_fmt ); -+ char *psz_name = NULL; -+ if( psz_fmt != NULL ) -+ { -+ psz_name = str_format_meta( pInput, psz_fmt ); -+ free( psz_fmt ); -+ } -+ -+ SET_TEXT( m_cVarStreamName, UString( getIntf(), -+ psz_name ? psz_name : "" ) ); - free( psz_name ); - - // Update local path (if possible) or full uri -diff --git a/modules/gui/skins2/src/vout_manager.cpp b/modules/gui/skins2/src/vout_manager.cpp -index f6ea8eb..5c9e67c 100644 ---- a/modules/gui/skins2/src/vout_manager.cpp -+++ b/modules/gui/skins2/src/vout_manager.cpp -@@ -182,15 +182,6 @@ CtrlVideo* VoutManager::getBestCtrlVideo( ) - } - } - -- // as a fallback, look up any video control that is unused -- for( it = m_pCtrlVideoVec.begin(); it != m_pCtrlVideoVec.end(); ++it ) -- { -- if( !(*it)->isUsed() ) -- { -- return (*it); -- } -- } -- - return NULL; - } - -diff --git a/modules/hw/vdpau/Makefile.am b/modules/hw/vdpau/Makefile.am -index 731eb3d..4d112e7 100644 ---- a/modules/hw/vdpau/Makefile.am -+++ b/modules/hw/vdpau/Makefile.am -@@ -51,4 +51,6 @@ libvdpau_display_plugin_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS) - libvdpau_display_plugin_la_LIBADD = libvlc_vdpau.la \ - ../../video_output/libvlc_xcb_events.la \ - $(AM_LIBADD) $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XCB_LIBS) -+if HAVE_XCB - vdpau_LTLIBRARIES += libvdpau_display_plugin.la -+endif -diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c -index 1fe511c..00f5ad7 100644 ---- a/modules/hw/vdpau/chroma.c -+++ b/modules/hw/vdpau/chroma.c -@@ -65,7 +65,8 @@ static VdpStatus MixerSetupColors(filter_t *filter, const VdpProcamp *procamp, - { - filter_sys_t *sys = filter->p_sys; - VdpStatus err; -- VdpColorStandard std = (filter->fmt_in.video.i_height > 576) -+ /* XXX: add some margin for padding... */ -+ VdpColorStandard std = (filter->fmt_in.video.i_height > 576 + 16) - ? VDP_COLOR_STANDARD_ITUR_BT_709 - : VDP_COLOR_STANDARD_ITUR_BT_601; - -@@ -95,7 +96,7 @@ static VdpStatus MixerSetupColors(filter_t *filter, const VdpProcamp *procamp, - } - - /** Create VDPAU video mixer */ --static VdpVideoMixer MixerCreate(filter_t *filter) -+static VdpVideoMixer MixerCreate(filter_t *filter, bool import) - { - filter_sys_t *sys = filter->p_sys; - VdpVideoMixer mixer; -@@ -187,7 +188,8 @@ static VdpVideoMixer MixerCreate(filter_t *filter) - VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE, - }; - uint32_t width = filter->fmt_in.video.i_width; -- uint32_t height = filter->fmt_in.video.i_height; -+ uint32_t height = import ? filter->fmt_in.video.i_visible_height -+ : filter->fmt_in.video.i_height; - const void *values[3] = { &width, &height, &sys->chroma, }; - - err = vdp_video_mixer_create(sys->vdp, sys->device, featc, featv, -@@ -279,6 +281,8 @@ static void Flush(filter_t *filter) - } - } - -+static picture_t *YCbCrRender(filter_t *filter, picture_t *src); -+ - /** Get a VLC picture for a VDPAU output surface */ - static picture_t *OutputAllocate(filter_t *filter) - { -@@ -300,7 +304,7 @@ static picture_t *OutputAllocate(filter_t *filter) - /* First picture: get the context and allocate the mixer */ - sys->vdp = vdp_hold_x11(psys->vdp, NULL); - sys->device = psys->device; -- sys->mixer = MixerCreate(filter); -+ sys->mixer = MixerCreate(filter, filter->pf_video_filter == YCbCrRender); - if (sys->mixer != VDP_INVALID_HANDLE) - return pic; - -@@ -362,7 +366,8 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) - /* Create surface (TODO: reuse?) */ - err = vdp_video_surface_create(sys->vdp, sys->device, sys->chroma, - filter->fmt_in.video.i_width, -- filter->fmt_in.video.i_height, &surface); -+ filter->fmt_in.video.i_visible_height, -+ &surface); - if (err != VDP_STATUS_OK) - { - msg_Err(filter, "video %s %s failure: %s", "surface", "creation", -@@ -375,7 +380,8 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) - uint32_t pitches[3]; - for (int i = 0; i < src->i_planes; i++) - { -- planes[i] = src->p[i].p_pixels; -+ planes[i] = src->p[i].p_pixels -+ + filter->fmt_in.video.i_y_offset * src->p[i].i_pitch; - pitches[i] = src->p[i].i_pitch; - } - if (src->format.i_chroma == VLC_CODEC_I420) -@@ -385,6 +391,15 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) - pitches[1] = src->p[2].i_pitch; - pitches[2] = src->p[1].i_pitch; - } -+ if (src->format.i_chroma == VLC_CODEC_I420 -+ || src->format.i_chroma == VLC_CODEC_YV12 -+ || src->format.i_chroma == VLC_CODEC_NV12) -+ { -+ for (int i = 1; i < src->i_planes; i++) -+ planes[i] = ((const uint8_t *)planes[i]) -+ + (filter->fmt_in.video.i_y_offset / 2) * src->p[i].i_pitch; -+ } -+ - err = vdp_video_surface_put_bits_y_cb_cr(sys->vdp, surface, sys->format, - planes, pitches); - if (err != VDP_STATUS_OK) -@@ -399,6 +414,7 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) - fmt.i_chroma = (sys->chroma == VDP_CHROMA_TYPE_420) - ? VLC_CODEC_VDPAU_VIDEO_420 : VLC_CODEC_VDPAU_VIDEO_422; - -+ - picture_t *dst = picture_NewFromFormat(&fmt); - if (unlikely(dst == NULL)) - goto error; -@@ -425,7 +441,7 @@ static inline VdpVideoSurface picture_GetVideoSurface(const picture_t *pic) - return field->frame->surface; - } - --static picture_t *VideoRender(filter_t *filter, picture_t *src) -+static picture_t *Render(filter_t *filter, picture_t *src, bool import) - { - filter_sys_t *sys = filter->p_sys; - VdpStatus err; -@@ -608,9 +624,11 @@ static picture_t *VideoRender(filter_t *filter, picture_t *src) - VdpVideoSurface future[MAX_FUTURE]; - VdpRect src_rect = { - filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset, -- filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset -+ filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset, - }; - -+ if (import) -+ src_rect.y0 = src_rect.y1 = 0; - if (hflip) - src_rect.x0 += filter->fmt_in.video.i_visible_width; - else -@@ -678,6 +696,12 @@ error: - goto skip; - } - -+static picture_t *VideoRender(filter_t *filter, picture_t *src) -+{ -+ return Render(filter, src, false); -+} -+ -+ - static picture_t *YCbCrRender(filter_t *filter, picture_t *src) - { - /* FIXME: Define a way to initialize the mixer in Open() instead. */ -@@ -689,7 +713,7 @@ static picture_t *YCbCrRender(filter_t *filter, picture_t *src) - } - - src = VideoImport(filter, src); -- return (src != NULL) ? VideoRender(filter, src) : NULL; -+ return (src != NULL) ? Render(filter, src, true) : NULL; - } - - static int OutputOpen(vlc_object_t *obj) -diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c -index 9b39eb2..0cf146d 100644 ---- a/modules/mux/mp4.c -+++ b/modules/mux/mp4.c -@@ -479,7 +479,7 @@ static int Mux(sout_mux_t *p_mux) - block_t *p_next = block_FifoShow(p_input->p_fifo); - if ( p_next->i_flags & BLOCK_FLAG_DISCONTINUITY ) - { /* we have no way to know real length except by decoding */ -- if ( p_stream->fmt.i_cat == VIDEO_ES ) -+ if ( p_stream->fmt.i_cat == VIDEO_ES && p_stream->fmt.video.i_frame_rate ) - { - p_data->i_length = CLOCK_FREQ * - p_stream->fmt.video.i_frame_rate_base / -@@ -489,7 +489,7 @@ static int Mux(sout_mux_t *p_mux) - } - else if ( p_stream->fmt.i_cat == AUDIO_ES && - p_stream->fmt.audio.i_rate && -- p_data->i_nb_samples ) -+ p_data->i_nb_samples && p_stream->fmt.audio.i_rate ) - { - p_data->i_length = CLOCK_FREQ * p_data->i_nb_samples / - p_stream->fmt.audio.i_rate; -diff --git a/modules/stream_filter/Makefile.am b/modules/stream_filter/Makefile.am -index 158b46a..527a26a 100644 ---- a/modules/stream_filter/Makefile.am -+++ b/modules/stream_filter/Makefile.am -@@ -106,7 +106,7 @@ stream_filter_LTLIBRARIES += libsmooth_plugin.la - - libhttplive_plugin_la_SOURCES = stream_filter/httplive.c - libhttplive_plugin_la_CFLAGS = $(AM_CFLAGS) $(GCRYPT_CFLAGS) --libhttplive_plugin_la_LIBADD = $(GCRYPT_LIBS) -lgpg-error -+libhttplive_plugin_la_LIBADD = $(GCRYPT_LIBS) -lgpg-error $(LIBPTHREAD) - if HAVE_GCRYPT - stream_filter_LTLIBRARIES += libhttplive_plugin.la - endif -diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c -index 72abf15..e94dad5 100644 ---- a/modules/stream_filter/httplive.c -+++ b/modules/stream_filter/httplive.c -@@ -42,6 +42,7 @@ - #include <vlc_stream.h> - #include <vlc_memory.h> - #include <vlc_gcrypt.h> -+#include <vlc_atomic.h> - - /***************************************************************************** - * Module descriptor -@@ -153,6 +154,8 @@ struct stream_sys_t - vlc_cond_t wait; - vlc_mutex_t lock; - bool paused; -+ atomic_bool closing; -+ atomic_bool eof; - }; - - /**************************************************************************** -@@ -1588,13 +1591,16 @@ static int hls_DownloadSegmentData(stream_t *s, hls_stream_t *hls, segment_t *se - } - - mtime_t start = mdate(); -- if (hls_Download(s, segment) != VLC_SUCCESS) -+ -+ int i_ret = hls_Download(s, segment); -+ if (i_ret != VLC_SUCCESS) - { - msg_Err(s, "downloading segment %d from stream %d failed", - segment->sequence, *cur_stream); - vlc_mutex_unlock(&segment->lock); -- return VLC_EGENERIC; -+ return i_ret; - } -+ - mtime_t duration = mdate() - start; - if (hls->bandwidth == 0 && segment->duration > 0) - { -@@ -1603,14 +1609,13 @@ static int hls_DownloadSegmentData(stream_t *s, hls_stream_t *hls, segment_t *se - } - - /* If the segment is encrypted, decode it */ -- if (hls_DecodeSegmentData(s, hls, segment) != VLC_SUCCESS) -- { -- vlc_mutex_unlock(&segment->lock); -- return VLC_EGENERIC; -- } -+ i_ret = hls_DecodeSegmentData(s, hls, segment); - - vlc_mutex_unlock(&segment->lock); - -+ if(i_ret != VLC_SUCCESS) -+ return i_ret; -+ - msg_Dbg(s, "downloaded segment %d from stream %d", - segment->sequence, *cur_stream); - -@@ -1636,9 +1641,7 @@ static void* hls_Thread(void *p_this) - stream_t *s = (stream_t *)p_this; - stream_sys_t *p_sys = s->p_sys; - -- int canc = vlc_savecancel(); -- -- while (vlc_object_alive(s)) -+ for( ;; ) - { - hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->download.stream); - assert(hls); -@@ -1654,42 +1657,56 @@ static void* hls_Thread(void *p_this) - { - /* wait */ - vlc_mutex_lock(&p_sys->download.lock_wait); -+ mutex_cleanup_push(&p_sys->download.lock_wait); //CO - while (((p_sys->download.segment - p_sys->playback.segment > 6) || - (p_sys->download.segment >= count)) && - (p_sys->download.seek == -1)) - { -+ -+ if(!p_sys->b_live && p_sys->download.segment >= count) -+ { -+ /* this was last segment to read */ -+ atomic_store(&p_sys->eof, true); -+ } -+ - vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait); - if (p_sys->b_live /*&& (mdate() >= p_sys->playlist.wakeup)*/) - break; -- if (!vlc_object_alive(s)) -- break; - } -+ vlc_cleanup_pop( ); //CO -+ - /* */ - if (p_sys->download.seek >= 0) - { - p_sys->download.segment = p_sys->download.seek; - p_sys->download.seek = -1; -+ atomic_store(&p_sys->eof, false); - } -+ - vlc_mutex_unlock(&p_sys->download.lock_wait); - } - -- if (!vlc_object_alive(s)) break; -+ vlc_mutex_lock(&p_sys->lock); -+ mutex_cleanup_push(&p_sys->lock); //C1 -+ while (p_sys->paused) -+ vlc_cond_wait(&p_sys->wait, &p_sys->lock); -+ vlc_cleanup_run( ); //C1 vlc_mutex_unlock(&p_sys->lock); - - vlc_mutex_lock(&hls->lock); - segment_t *segment = segment_GetSegment(hls, p_sys->download.segment); - vlc_mutex_unlock(&hls->lock); - -+ int i_canc = vlc_savecancel(); - if ((segment != NULL) && - (hls_DownloadSegmentData(s, hls, segment, &p_sys->download.stream) != VLC_SUCCESS)) - { -- if (!vlc_object_alive(s)) break; -- - if (!p_sys->b_live) - { - p_sys->b_error = true; - break; - } - } -+ vlc_restorecancel(i_canc); - - /* download succeeded */ - /* determine next segment to download */ -@@ -1708,9 +1725,10 @@ static void* hls_Thread(void *p_this) - vlc_mutex_lock(&p_sys->read.lock_wait); - vlc_cond_signal(&p_sys->read.wait); - vlc_mutex_unlock(&p_sys->read.lock_wait); -+ -+ vlc_testcancel(); - } - -- vlc_restorecancel(canc); - return NULL; - } - -@@ -1721,14 +1739,14 @@ static void* hls_Reload(void *p_this) - - assert(p_sys->b_live); - -- int canc = vlc_savecancel(); -- - double wait = 1.0; -- while (vlc_object_alive(s)) -+ for ( ;; ) - { - mtime_t now = mdate(); - if (now >= p_sys->playlist.wakeup) - { -+ int canc = vlc_savecancel(); -+ - /* reload the m3u8 if there are less than 3 segments what aren't downloaded */ - if ( ( p_sys->download.segment - p_sys->playback.segment < 3 ) && - ( hls_ReloadPlaylist(s) != VLC_SUCCESS) ) -@@ -1752,6 +1770,8 @@ static void* hls_Reload(void *p_this) - wait = 1.0; - } - -+ vlc_restorecancel(canc); -+ - hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->download.stream); - assert(hls); - -@@ -1768,7 +1788,6 @@ static void* hls_Reload(void *p_this) - mwait(p_sys->playlist.wakeup); - } - -- vlc_restorecancel(canc); - return NULL; - } - -@@ -1788,7 +1807,7 @@ static int Prefetch(stream_t *s, int *current) - - /* Download ~10s worth of segments of this HLS stream if they exist */ - unsigned segment_amount = (0.5f + 10/hls->duration); -- for (int i = 0; i < __MIN(vlc_array_count(hls->segments), segment_amount); i++) -+ for (unsigned i = 0; i < __MIN((unsigned)vlc_array_count(hls->segments), segment_amount); i++) - { - segment_t *segment = segment_GetSegment(hls, p_sys->download.segment); - if (segment == NULL ) -@@ -1824,138 +1843,124 @@ static int Prefetch(stream_t *s, int *current) - /**************************************************************************** - * - ****************************************************************************/ -+#define HLS_READ_SIZE 65536 -+ - static int hls_Download(stream_t *s, segment_t *segment) - { - stream_sys_t *p_sys = s->p_sys; - assert(segment); - -- vlc_mutex_lock(&p_sys->lock); -- while (p_sys->paused) -- vlc_cond_wait(&p_sys->wait, &p_sys->lock); -- vlc_mutex_unlock(&p_sys->lock); -- - stream_t *p_ts = stream_UrlNew(s, segment->url); - if (p_ts == NULL) - return VLC_EGENERIC; - -- segment->size = stream_Size(p_ts); -- -- if (segment->size == 0) { -- int chunk_size = 65536; -- segment->data = block_Alloc(chunk_size); -- if (!segment->data) -- goto nomem; -- do { -- if (segment->data->i_buffer - segment->size < chunk_size) { -- chunk_size *= 2; -- block_t *p_block = block_Realloc(segment->data, 0, segment->data->i_buffer + chunk_size); -- if (!p_block) { -- block_Release(segment->data); -- segment->data = NULL; -- goto nomem; -- } -- segment->data = p_block; -- } -+ int64_t size = stream_Size(p_ts); -+ if (size < 0) -+ size = 0; - -- ssize_t length = stream_Read(p_ts, segment->data->p_buffer + segment->size, chunk_size); -- if (length <= 0) { -- segment->data->i_buffer = segment->size; -- break; -- } -- segment->size += length; -- } while (vlc_object_alive(s)); -+ unsigned i_total_read = 0; -+ int i_return = VLC_SUCCESS; - -- stream_Delete(p_ts); -- return VLC_SUCCESS; -+ block_t *p_segment_data = block_Alloc(size ? size : HLS_READ_SIZE); -+ if (!p_segment_data) -+ { -+ i_return = VLC_ENOMEM; -+ goto end; - } -- -- segment->data = block_Alloc(segment->size); -- if (segment->data == NULL) -- goto nomem; -- -- assert(segment->data->i_buffer == segment->size); -- -- ssize_t curlen = 0; -- do -+ for( ;; ) - { - /* NOTE: Beware the size reported for a segment by the HLS server may not - * be correct, when downloading the segment data. Therefore check the size - * and enlarge the segment data block if necessary. - */ -- uint64_t size = stream_Size(p_ts); -- if (size > segment->size) -+ uint64_t i_toread = (size > 0) ? (uint64_t) size - i_total_read: HLS_READ_SIZE; -+ -+ if (i_total_read + i_toread > p_segment_data->i_buffer) - { -- msg_Dbg(s, "size changed %"PRIu64, segment->size); -- block_t *p_block = block_Realloc(segment->data, 0, size); -- if (p_block == NULL) -+ msg_Dbg(s, "size changed to %"PRIu64, i_total_read + i_toread); -+ block_t *p_realloc_block = block_Realloc(p_segment_data, 0, i_total_read + i_toread); -+ if (p_realloc_block == NULL) - { -- block_Release(segment->data); -- segment->data = NULL; -- goto nomem; -+ if(p_segment_data) -+ block_Release(p_segment_data); -+ i_return = VLC_ENOMEM; -+ goto end; - } -- segment->data = p_block; -- segment->size = size; -- assert(segment->data->i_buffer == segment->size); -- p_block = NULL; -+ p_segment_data = p_realloc_block; - } -- ssize_t length = stream_Read(p_ts, segment->data->p_buffer + curlen, segment->size - curlen); -- if (length <= 0) -+ -+ int i_canc = vlc_savecancel(); -+ int i_length = stream_Read(p_ts, &p_segment_data->p_buffer[i_total_read], -+ (i_toread >= HLS_READ_SIZE) ? HLS_READ_SIZE : i_toread); -+ vlc_restorecancel(i_canc); -+ -+ if (i_length <= 0) -+ { -+ if(size > 0 && i_total_read < size) -+ msg_Warn(s, "segment read %"PRIu64"/%"PRIu64, size - i_total_read, size ); -+ p_segment_data->i_buffer = i_total_read; - break; -- curlen += length; -- } while (vlc_object_alive(s)); -+ } - -- stream_Delete(p_ts); -- return VLC_SUCCESS; -+ i_total_read += i_length; -+ -+ if (atomic_load(&p_sys->closing)) -+ break; -+ }; -+ -+ segment->data = p_segment_data; -+ segment->size = p_segment_data->i_buffer; - --nomem: -+end: - stream_Delete(p_ts); -- return VLC_ENOMEM; -+ return i_return; - } - - /* Read M3U8 file */ - static ssize_t read_M3U8_from_stream(stream_t *s, uint8_t **buffer) - { -- int64_t total_bytes = 0; -- int64_t total_allocated = 0; - uint8_t *p = NULL; -+ int64_t size = stream_Size(s); -+ size = VLC_CLIP(size, 0, INT64_MAX - 1); -+ int64_t i_alloc_size = 0; -+ ssize_t i_total_read = 0; -+ unsigned i_chunk_size = HLS_READ_SIZE; - -- while (1) -+ for( ;; ) - { -- char buf[4096]; -- int64_t bytes; -+ int i_toread = (size) ? size - i_total_read : i_chunk_size; -+ if(i_toread + i_total_read > INT64_MAX - 1) -+ break; -+ if(i_alloc_size < i_toread) -+ { -+ i_alloc_size += i_toread; -+ p = realloc_or_free(p, 1 + i_alloc_size); -+ if (p == NULL) -+ return VLC_ENOMEM; -+ if (i_chunk_size < (1 << 26)) -+ i_chunk_size <<= 1; -+ } - -- bytes = stream_Read(s, buf, sizeof(buf)); -- if (bytes == 0) -+ int i_read = stream_Read(s, & p[i_total_read], i_toread); -+ if (i_read == 0) -+ { - break; /* EOF ? */ -- else if (bytes < 0) -+ } -+ else if (i_read < 0) - { - free (p); -- return bytes; -+ return i_read; - } -- -- if ( (total_bytes + bytes + 1) > total_allocated ) -+ else - { -- if (total_allocated) -- total_allocated *= 2; -- else -- total_allocated = __MIN((uint64_t)bytes+1, sizeof(buf)); -- -- p = realloc_or_free(p, total_allocated); -- if (p == NULL) -- return VLC_ENOMEM; -+ i_total_read += i_read; - } -- -- memcpy(p+total_bytes, buf, bytes); -- total_bytes += bytes; - } - -- if (total_allocated == 0) -- return VLC_EGENERIC; -- -- p[total_bytes] = '\0'; -+ p[i_total_read] = '\0'; - *buffer = p; - -- return total_bytes; -+ return i_total_read; - } - - static ssize_t read_M3U8_from_url(stream_t *s, const char* psz_url, uint8_t **buffer) -@@ -2068,6 +2073,8 @@ static int Open(vlc_object_t *p_this) - s->pf_control = Control; - - p_sys->paused = false; -+ atomic_init(&p_sys->closing, false); -+ atomic_init(&p_sys->eof, false); - - vlc_cond_init(&p_sys->wait); - vlc_mutex_init(&p_sys->lock); -@@ -2128,7 +2135,10 @@ static int Open(vlc_object_t *p_this) - if (vlc_clone(&p_sys->thread, hls_Thread, s, VLC_THREAD_PRIORITY_INPUT)) - { - if (p_sys->b_live) -+ { -+ vlc_cancel(p_sys->reload); - vlc_join(p_sys->reload, NULL); -+ } - goto fail_thread; - } - -@@ -2171,6 +2181,7 @@ static void Close(vlc_object_t *p_this) - - vlc_mutex_lock(&p_sys->lock); - p_sys->paused = false; -+ atomic_store(&p_sys->closing, true); - vlc_cond_signal(&p_sys->wait); - vlc_mutex_unlock(&p_sys->lock); - -@@ -2182,10 +2193,18 @@ static void Close(vlc_object_t *p_this) - vlc_cond_signal(&p_sys->download.wait); - vlc_mutex_unlock(&p_sys->download.lock_wait); - -+ vlc_cond_signal(&p_sys->read.wait); /* set closing first */ -+ - /* */ - if (p_sys->b_live) -+ { -+ vlc_cancel(p_sys->reload); - vlc_join(p_sys->reload, NULL); -+ } -+ -+ vlc_cancel(p_sys->thread); - vlc_join(p_sys->thread, NULL); -+ - vlc_mutex_destroy(&p_sys->download.lock_wait); - vlc_cond_destroy(&p_sys->download.wait); - -@@ -2387,7 +2406,7 @@ static int Read(stream_t *s, void *buffer, unsigned int i_read) - while (length == 0) - { - // In case an error occurred or the stream was closed return 0 -- if (p_sys->b_error || !vlc_object_alive(s)) -+ if (p_sys->b_error || atomic_load(&p_sys->closing)) - return 0; - - // Lock the mutex before trying to read to avoid a race condition with the download thread -@@ -2411,6 +2430,12 @@ static int Read(stream_t *s, void *buffer, unsigned int i_read) - // running this read operation is also responsible for closing the stream - if (length == 0) - { -+ if(atomic_load(&p_sys->eof)) /* finished reading last segment */ -+ { -+ vlc_mutex_unlock(&p_sys->read.lock_wait); -+ return 0; -+ } -+ - mtime_t start = mdate(); - - // Wait for 10 seconds -@@ -2666,7 +2691,8 @@ static int segment_Seek(stream_t *s, const uint64_t pos) - (p_sys->download.segment < count))) - { - vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait); -- if (!vlc_object_alive(s) || s->b_error) break; -+ if (p_sys->b_error || atomic_load(&p_sys->closing)) -+ break; - } - vlc_mutex_unlock(&p_sys->download.lock_wait); - -diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c -index 1251b85..5248b57 100644 ---- a/modules/video_output/fb.c -+++ b/modules/video_output/fb.c -@@ -68,10 +68,7 @@ - "the values 0=QCIF 1=CIF 2=NTSC 3=PAL, 4=auto (default 4=auto)") - - #define HW_ACCEL_TEXT N_("Framebuffer uses hw acceleration") --#define HW_ACCEL_LONGTEXT N_(\ -- "If your framebuffer supports hardware acceleration or does double buffering " \ -- "in hardware then you must disable this option. It then does double buffering " \ -- "in software.") -+#define HW_ACCEL_LONGTEXT N_("Disable for double buffering in software.") - - #define CHROMA_TEXT N_("Image format (default RGB)") - #define CHROMA_LONGTEXT N_("Chroma fourcc used by the framebuffer. Default is RGB since the fb device has no way to report its chroma.") -diff --git a/po/vlc.pot b/po/vlc.pot -index 3d5108d..219ad0e 100644 ---- a/po/vlc.pot -+++ b/po/vlc.pot -@@ -6,9 +6,9 @@ - #, fuzzy - msgid "" - msgstr "" --"Project-Id-Version: vlc 2.2.1\n" -+"Project-Id-Version: vlc 2.2.2\n" - "Report-Msgid-Bugs-To: vlc-devel@videolan.org\n" --"POT-Creation-Date: 2015-04-13 00:13+0200\n" -+"POT-Creation-Date: 2015-04-15 07:39-0400\n" - "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" - "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" - "Language-Team: LANGUAGE <LL@li.org>\n" -@@ -25692,11 +25692,8 @@ msgstr "" - msgid "Framebuffer uses hw acceleration" - msgstr "" - --#: modules/video_output/fb.c:72 --msgid "" --"If your framebuffer supports hardware acceleration or does double buffering " --"in hardware then you must disable this option. It then does double buffering " --"in software." -+#: modules/video_output/fb.c:71 -+msgid "Disable for double buffering in software." - msgstr "" - - #: modules/video_output/fb.c:76 -diff --git a/src/misc/messages.c b/src/misc/messages.c -index f75fd67..3f4122c 100644 ---- a/src/misc/messages.c -+++ b/src/misc/messages.c -@@ -120,9 +120,11 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module, - #endif - - if (priv) { -+ int canc = vlc_savecancel (); - vlc_rwlock_rdlock (&priv->log.lock); - priv->log.cb (priv->log.opaque, type, &msg, format, args); - vlc_rwlock_unlock (&priv->log.lock); -+ vlc_restorecancel (canc); - } - } - -diff --git a/src/text/strings.c b/src/text/strings.c -index d864211..398c8bc 100644 ---- a/src/text/strings.c -+++ b/src/text/strings.c -@@ -548,6 +548,8 @@ char *str_format_meta(input_thread_t *input, const char *s) - bool b_is_format = false; - bool b_empty_if_na = false; - -+ assert(s != NULL); -+ - while ((c = *s) != '\0') - { - s++; diff --git a/vlc.spec b/vlc.spec index 87c82e2..6aebbfc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -pre20151006 +#global vlc_rc -pre20151006 %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.2.2 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -216,8 +216,7 @@ JACK audio plugin for the VLC media player. %prep -#setup -q -n %{name}-%{version}%{?vlc_rc} -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{version}%{?vlc_rc} %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -483,6 +482,9 @@ fi || : %changelog +* Sat Feb 06 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.2-1 +- Update to 2.2.2 + * Tue Oct 06 2015 Nicolas Chauvet <kwizart@gmail.com> - 2.2.2-0.1 - Update to 2.2.2 pre-version From f6c49aac80dfcd48556a56ae889a17b2a15f6dc2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 4 May 2016 18:15:59 +0200 Subject: [PATCH 259/671] Update to 2.2.3 --- vlc.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6aebbfc..7abaa65 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.2.2 +Version: 2.2.3 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -110,7 +110,9 @@ BuildRequires: lirc-devel BuildRequires: kernel-headers BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) +%if 0%{?fedora} < 24 BuildRequires: libmusicbrainz-devel +%endif BuildRequires: libsamplerate-devel BuildRequires: libshout-devel BuildRequires: lua-devel @@ -482,6 +484,9 @@ fi || : %changelog +* Wed May 04 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.3-1 +- Update to 2.2.3 + * Sat Feb 06 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.2-1 - Update to 2.2.2 From cbac958f7a04eeb5c970d26f3db59197a5f57f63 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 6 Jun 2016 15:17:53 +0200 Subject: [PATCH 260/671] Update to 2.2.4 --- sources | 2 +- vlc.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 02c6944..4ddc118 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f98d60f0f59ef72b6e3407f2ff09bda6 vlc-2.2.2.tar.xz +55666c9898f658c7fcca12725bf7dd1b vlc-2.2.4.tar.xz diff --git a/vlc.spec b/vlc.spec index 7abaa65..d1186fb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.2.3 +Version: 2.2.4 Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia @@ -484,6 +484,9 @@ fi || : %changelog +* Mon Jun 06 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.4-1 +- Update to 2.2.4 + * Wed May 04 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.3-1 - Update to 2.2.3 From fa361526dc121bd570adbd4f7e67c7b940f368a0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jun 2016 13:29:28 +0200 Subject: [PATCH 261/671] Update to vlc-3.0.0-git --- sources | 2 +- vlc.spec | 30 +++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/sources b/sources index 4ddc118..3982174 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -55666c9898f658c7fcca12725bf7dd1b vlc-2.2.4.tar.xz +116dc8ed2d01337693d893eb93e36f36 vlc-3.0.0-git.tar.xz diff --git a/vlc.spec b/vlc.spec index d1186fb..8243983 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -#global vlc_rc -pre20151006 +%global vlc_rc -git %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -31,12 +31,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 2.2.4 -Release: 1%{?dist} +Version: 3.0.0 +Release: 0.1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +#Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +# nightly for 3.0 +Source0: http://nightlies.videolan.org/build/source/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz BuildRequires: desktop-file-utils @@ -60,6 +62,7 @@ BuildRequires: fribidi-devel %{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel +BuildRequires: hostname BuildRequires: jack-audio-connection-kit-devel BuildRequires: kde-filesystem BuildRequires: game-music-emu-devel @@ -123,8 +126,16 @@ BuildRequires: ncurses-devel BuildRequires: openslp-devel Buildrequires: opus-devel BuildRequires: pcre-devel +BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libpulse) >= 0.9.8 -BuildRequires: qt4-devel >= 4.5.2 +BuildRequires: pkgconfig(libsecret-1) >= 0.18 +BuildRequires: pkgconfig(protobuf-lite) >= 2.5 +BuildRequires: pkgconfig(Qt5Core) >= 5.2 +BuildRequires: pkgconfig(Qt5X11Extras) >= 5.2 +BuildRequires: pkgconfig(Qt5Gui) >= 5.5 +BuildRequires: pkgconfig(speexdsp) >= 1.0.5 +BuildRequires: pkgconfig(wayland-client) >= 1.5.91 +BuildRequires: pkgconfig(wayland-egl) %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel BuildRequires: SDL_image-devel @@ -381,7 +392,7 @@ fi || : %{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc -%{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%{_libdir}/vlc/plugins/gui/libqt_plugin.so %{?_with_gnomevfs: %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } @@ -410,7 +421,7 @@ fi || : %exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ %{_libdir}/*.so.* -%exclude %{_libdir}/vlc/plugins/gui/libqt4_plugin.so +%exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so %{?_with_gnomevfs: %exclude %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } @@ -484,6 +495,11 @@ fi || : %changelog +* Tue Jun 14 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.1 +- Update to 3.0.0 - snapshot 20160614 +- Switch to qt5 +- Update Build Dependencies + * Mon Jun 06 2016 Nicolas Chauvet <kwizart@gmail.com> - 2.2.4-1 - Update to 2.2.4 From 8dcb8e2a5b47711d0cdbfb500e6a7435a050003f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 1 Jul 2016 13:40:31 +0200 Subject: [PATCH 262/671] Update to today's snapshoot --- sources | 2 +- vlc.spec | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 3982174..fcb22c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -116dc8ed2d01337693d893eb93e36f36 vlc-3.0.0-git.tar.xz +73283699864f11cdfa8317a60e04c952 vlc-3.0.0-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 8243983..ce4dfde 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -175,7 +175,6 @@ Requires: kde-filesystem Requires: dejavu-sans-fonts Requires: dejavu-sans-mono-fonts Requires: dejavu-serif-fonts -Requires: qt4%{?_isa} >= %{_qt4_version} #For xdg-sreensaver Requires: xdg-utils @@ -398,13 +397,18 @@ fi || : } %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so +%{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so +%{_libdir}/vlc/plugins/video_output/libgl_plugin.so +%{_libdir}/vlc/plugins/video_output/libglx_plugin.so +%{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so +%{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so %{!?_without_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -#{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so } %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_projectm: @@ -444,11 +448,16 @@ fi || : %endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libgl_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -#{_libdir}/vlc/plugins/video_filter/libpanoramix_plugin.so } %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: @@ -495,6 +504,9 @@ fi || : %changelog +* Fri Jul 01 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.2 +- Update to today snapshot + * Tue Jun 14 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.1 - Update to 3.0.0 - snapshot 20160614 - Switch to qt5 From f98b9a4e7166f04fc8c847d0b4a4f4d5cb80cfcb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 29 Jul 2016 17:14:03 +0200 Subject: [PATCH 263/671] Update to today's snapshot --- sources | 2 +- vlc.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index fcb22c0..7a1df40 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -73283699864f11cdfa8317a60e04c952 vlc-3.0.0-git.tar.xz +c7710363d580e9a0a5670e96823ef240 vlc-3.0.0-git.tar.xz diff --git a/vlc.spec b/vlc.spec index ce4dfde..51657e2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -504,6 +504,9 @@ fi || : %changelog +* Fri Jul 29 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.3 +- Update to today snapshoot + * Fri Jul 01 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.2 - Update to today snapshot From 5f40c5a7ca8211f7d90a8177b62e845144aa16d4 Mon Sep 17 00:00:00 2001 From: Julian Sikorski <belegdol@fedoraproject.org> Date: Sat, 30 Jul 2016 15:55:44 +0200 Subject: [PATCH 264/671] Rebuilt for ffmpeg-3.1.1 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 51657e2..7515008 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -504,6 +504,9 @@ fi || : %changelog +* Sat Jul 30 2016 Julian Sikorski <belegdol@fedoraproject.org> - 3.0.0-0.4 +- Rebuilt for ffmpeg-3.1.1 + * Fri Jul 29 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.3 - Update to today snapshoot From af0cfd6950f756ed3c278297c1f1482f29fc0103 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 4 Aug 2016 14:31:21 +0100 Subject: [PATCH 265/671] Remove -f from vlc-cache-gen scriptlets rfbz#4167 --- vlc.spec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/vlc.spec b/vlc.spec index 7515008..bbce7a2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -334,8 +334,8 @@ touch $RPM_BUILD_ROOT%{_libdir}/vlc/plugins.dat %post -%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null -touch --no-create %{_datadir}/icons/hicolor +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null +%{_bindir}/touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi @@ -344,9 +344,9 @@ fi %post core -p /sbin/ldconfig %postun -%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null -touch --no-create %{_datadir}/icons/hicolor +%{_bindir}/touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi || : @@ -354,26 +354,26 @@ fi || : %postun core -p /sbin/ldconfig %posttrans core -%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : %post extras if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : fi %post plugin-jack if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : fi %postun extras if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : fi %postun plugin-jack if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : fi %preun core @@ -504,6 +504,9 @@ fi || : %changelog +* Thu Aug 04 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.5 +- Remove -f from vlc-cache-gen scriptlets rfbz#4167 + * Sat Jul 30 2016 Julian Sikorski <belegdol@fedoraproject.org> - 3.0.0-0.4 - Rebuilt for ffmpeg-3.1.1 From c866a27280b107e91da4b91a93bdceeca3772ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Thu, 18 Aug 2016 04:06:24 +0100 Subject: [PATCH 266/671] Clean spec, Vascom patches series, rfbz #4196, add license tag --- vlc.spec | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/vlc.spec b/vlc.spec index bbce7a2..74cbda3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.5%{?dist} +Release: 0.6%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -179,6 +179,7 @@ Requires: dejavu-serif-fonts #For xdg-sreensaver Requires: xdg-utils +Requires: hicolor-icon-theme %description @@ -302,32 +303,32 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' +%make_install INSTALL="install -p" CPPROG="cp -p" +find %{buildroot} -name '*.la' -exec rm -f {} ';' +find %{buildroot} -name '*.a' -exec rm -f {} ';' desktop-file-install --vendor "" \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --dir %{buildroot}%{_datadir}/applications \ --delete-original \ --mode 644 \ - $RPM_BUILD_ROOT%{_datadir}/applications/vlc.desktop + %{buildroot}%{_datadir}/applications/vlc.desktop # Remove installed fonts for skins2 -rm -f $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/*.ttf +rm -f %{buildroot}%{_datadir}/vlc/skins2/fonts/*.ttf ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ - $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSans.ttf + %{buildroot}%{_datadir}/vlc/skins2/fonts/FreeSans.ttf ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ - $RPM_BUILD_ROOT%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf + %{buildroot}%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf #Fix unowned directories -rm -rf $RPM_BUILD_ROOT%{_docdir}/vlc +rm -rf %{buildroot}%{_docdir}/vlc #Ghost the plugins cache -touch $RPM_BUILD_ROOT%{_libdir}/vlc/plugins.dat +touch %{buildroot}%{_libdir}/vlc/plugins.dat %find_lang %{name} @@ -383,7 +384,8 @@ fi || : %files -%doc AUTHORS COPYING ChangeLog NEWS README THANKS +%doc AUTHORS ChangeLog NEWS README THANKS +%license COPYING %{_datadir}/applications/*%{name}.desktop %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png @@ -504,6 +506,9 @@ fi || : %changelog +* Thu Aug 18 2016 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.6 +- Clean spec, Vascom patches series, rfbz #4196, add license tag + * Thu Aug 04 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.5 - Remove -f from vlc-cache-gen scriptlets rfbz#4167 From f31107e0c4856668bdf73c0c26fe3ba338f8259c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Sep 2016 18:38:01 +0200 Subject: [PATCH 267/671] Update to 20160901 --- sources | 2 +- vlc.spec | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sources b/sources index 7a1df40..5f999e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c7710363d580e9a0a5670e96823ef240 vlc-3.0.0-git.tar.xz +f4e1ea2323b576936ea55c7938d4f1c5 vlc-3.0.0-20160901-0221-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 74cbda3..0c8ba54 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.6%{?dist} +Release: 0.7%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -328,14 +328,14 @@ ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ rm -rf %{buildroot}%{_docdir}/vlc #Ghost the plugins cache -touch %{buildroot}%{_libdir}/vlc/plugins.dat +touch %{buildroot}%{_libdir}/vlc/plugins/plugins.dat %find_lang %{name} %post -%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null %{_bindir}/touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -345,7 +345,7 @@ fi %post core -p /sbin/ldconfig %postun -%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null %{_bindir}/touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then @@ -355,26 +355,26 @@ fi || : %postun core -p /sbin/ldconfig %posttrans core -%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : +%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : %post extras if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %post plugin-jack if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %postun extras if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %postun plugin-jack if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc &>/dev/null || : + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %preun core @@ -471,7 +471,7 @@ fi || : } %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so -%ghost %{_libdir}/vlc/plugins.dat +%ghost %{_libdir}/vlc/plugins/plugins.dat %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* @@ -506,6 +506,10 @@ fi || : %changelog +* Fri Sep 02 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.7 +- Bump to 20160901 nightly +- Fix plugins.dat path - rfbz#4184 + * Thu Aug 18 2016 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.6 - Clean spec, Vascom patches series, rfbz #4196, add license tag @@ -515,10 +519,10 @@ fi || : * Sat Jul 30 2016 Julian Sikorski <belegdol@fedoraproject.org> - 3.0.0-0.4 - Rebuilt for ffmpeg-3.1.1 -* Fri Jul 29 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.3 +* Fri Jul 29 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.3 - Update to today snapshoot -* Fri Jul 01 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.2 +* Fri Jul 01 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.2 - Update to today snapshot * Tue Jun 14 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.1 From 5231d0d5513bca93deb25070eff11fa1d4e8a88c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Sep 2016 18:46:46 +0200 Subject: [PATCH 268/671] Add missing vlc_rc --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 0c8ba54..5cc082f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_rc -git -%global _with_bootstrap 1 +%global vlc_rc -20160901-0221-git +#global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec 1 From afd8e3f868d336a616c5650e1f036c37c8bd6dd3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Sep 2016 20:32:12 +0200 Subject: [PATCH 269/671] Fixup from a lost commit --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5cc082f..c50f0f4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -229,7 +229,7 @@ JACK audio plugin for the VLC media player. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc} +%setup -q -n %{name}-%{version}%{?vlc_rc:-git} %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From dd1328fd0986313083a6a93de56a1d85f986bf86 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 8 Sep 2016 11:50:00 +0200 Subject: [PATCH 270/671] Re-enable cleaning and rpath fix as we don't rebootstrap --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index c50f0f4..acef6f5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -290,13 +290,13 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-lirc -%if 0 +%if 1 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %endif -%if 0 +%if 1 # clean unused-direct-shlib-dependencies sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool %endif From d59aa5c65d39c7ab3855cab746c8e36be34bb8a8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 8 Sep 2016 11:50:29 +0200 Subject: [PATCH 271/671] Bump and comment --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index acef6f5..a8e001a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.7%{?dist} +Release: 0.8%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -506,6 +506,9 @@ fi || : %changelog +* Thu Sep 08 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.8 +- Re-enable cleaning and rpath fix as we don't rebootstrap + * Fri Sep 02 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.7 - Bump to 20160901 nightly - Fix plugins.dat path - rfbz#4184 From c12cd16a5044e3c1b99e2609b13ad24f1d1430f4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 8 Sep 2016 11:51:56 +0200 Subject: [PATCH 272/671] fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a8e001a..438f9db 100644 --- a/vlc.spec +++ b/vlc.spec @@ -506,7 +506,7 @@ fi || : %changelog -* Thu Sep 08 2016 Nicolas Chauvet <nicolas.chauvet@kwizart.fr> - 3.0.0-0.8 +* Thu Sep 08 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.8 - Re-enable cleaning and rpath fix as we don't rebootstrap * Fri Sep 02 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.7 From c19bdd7eac500424db817b56c426ede744a80703 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 8 Sep 2016 12:32:46 +0200 Subject: [PATCH 273/671] Re-enable bootstrap Disable libtool patch --- vlc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 438f9db..7373ef5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ %global vlc_rc -20160901-0221-git -#global _with_bootstrap 1 +%global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec 1 @@ -38,7 +38,7 @@ Group: Applications/Multimedia URL: http://www.videolan.org #Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz # nightly for 3.0 -Source0: http://nightlies.videolan.org/build/source/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +Source0: http://nightlies.videolan.org/build/source/vlc-%{version}%{?vlc_rc}.tar.xz BuildRequires: desktop-file-utils @@ -290,7 +290,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-lirc -%if 1 +%if 0 # remove rpath from libtool sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -507,7 +507,7 @@ fi || : %changelog * Thu Sep 08 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.8 -- Re-enable cleaning and rpath fix as we don't rebootstrap +- Re-enable bootstrap * Fri Sep 02 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.7 - Bump to 20160901 nightly From 4ffbc39ca826bd4f108bb8360329a8514d7a0232 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Oct 2016 13:09:46 +0200 Subject: [PATCH 274/671] Update snapshot merge jack into main --- sources | 2 +- vlc.spec | 41 +++++++++++++++-------------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/sources b/sources index 5f999e5..b4f808c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4e1ea2323b576936ea55c7938d4f1c5 vlc-3.0.0-20160901-0221-git.tar.xz +5fe68fda2cf92e0c677737203ec91721 vlc-3.0.0-20161026-0238-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 7373ef5..4b906b0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20160901-0221-git +%global vlc_rc -20161026-0238-git %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.8%{?dist} +Release: 0.9%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -181,6 +181,10 @@ Requires: xdg-utils Requires: hicolor-icon-theme +#Merge back jack plugin into main +Obsoletes: vlc-plugin-jack < %{version}-%{release} +Provides: vlc-plugin-jack = %{version}-%{release} + %description VLC media player is a highly portable multimedia player and multimedia framework @@ -219,14 +223,6 @@ Requires: vlc-core%{_isa} = %{version}-%{release} %description extras VLC media player extras modules. -%package plugin-jack -Summary: JACK audio plugin for VLC -Group: Applications/Multimedia -Requires: vlc-core%{_isa} = %{version}-%{release} - -%description plugin-jack -JACK audio plugin for the VLC media player. - %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} @@ -362,21 +358,11 @@ if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi -%post plugin-jack -if [ $1 == 1 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : -fi - %postun extras if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi -%postun plugin-jack -if [ $1 == 0 ] ; then - %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : -fi - %preun core if [ $1 == 0 ] ; then rm -f %{_libdir}/vlc/plugins*.dat @@ -416,7 +402,12 @@ fi || : %{?_with_projectm: %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so } +%{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so +%{_libdir}/vlc/plugins/audio_output/libjack_plugin.so +%{?_with_fluidsynth: +%{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so +} %files core -f %{name}.lang %{_bindir}/vlc @@ -475,12 +466,6 @@ fi || : %{_libdir}/vlc/ %{_mandir}/man1/vlc*.1* -%files plugin-jack -%{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so -%{_libdir}/vlc/plugins/audio_output/libjack_plugin.so -%{?_with_fluidsynth: -%{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so -} %files extras %{?_with_opencv: @@ -506,6 +491,10 @@ fi || : %changelog +* Fri Oct 28 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.9 +- Updateto 3.0.0 20161026-0238-git +- Merge vlc-plugin-jack into main + * Thu Sep 08 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.8 - Re-enable bootstrap From f0652be8512d126068f2e02d6a45bc5a39aeeee0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Oct 2016 13:48:39 +0200 Subject: [PATCH 275/671] Add support for appdata --- vlc.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlc.spec b/vlc.spec index 4b906b0..6d772ae 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,6 +41,7 @@ URL: http://www.videolan.org Source0: http://nightlies.videolan.org/build/source/vlc-%{version}%{?vlc_rc}.tar.xz BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib %{?_with_bootstrap: BuildRequires: gettext-devel @@ -326,6 +327,10 @@ rm -rf %{buildroot}%{_docdir}/vlc #Ghost the plugins cache touch %{buildroot}%{_libdir}/vlc/plugins/plugins.dat +#Appdata +appstream-util validate-relax --nonet \ + %{buildroot}/%{_datadir}/appdata/*.appdata.xml + %find_lang %{name} @@ -372,6 +377,7 @@ fi || : %files %doc AUTHORS ChangeLog NEWS README THANKS %license COPYING +%{_datadir}/appdata/vlc.appdata.xml %{_datadir}/applications/*%{name}.desktop %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png @@ -494,6 +500,7 @@ fi || : * Fri Oct 28 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.9 - Updateto 3.0.0 20161026-0238-git - Merge vlc-plugin-jack into main +- Add support for appdata * Thu Sep 08 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.8 - Re-enable bootstrap From 3a12cc1ef0c7501d3252137d8684bfadef69a5fa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Oct 2016 14:19:48 +0200 Subject: [PATCH 276/671] Avoid failing --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6d772ae..debe3a0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -329,7 +329,7 @@ touch %{buildroot}%{_libdir}/vlc/plugins/plugins.dat #Appdata appstream-util validate-relax --nonet \ - %{buildroot}/%{_datadir}/appdata/*.appdata.xml + %{buildroot}/%{_datadir}/appdata/*.appdata.xml || : %find_lang %{name} From 153e2ea3f187a912b068e2e17c63d54d8569f7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Tue, 8 Nov 2016 11:38:40 +0000 Subject: [PATCH 277/671] Rebuild for x265-2.1 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index debe3a0..876e63f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.9%{?dist} +Release: 0.10%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -497,6 +497,9 @@ fi || : %changelog +* Tue Nov 08 2016 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.10 +- Rebuild for x265-2.1 + * Fri Oct 28 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.9 - Updateto 3.0.0 20161026-0238-git - Merge vlc-plugin-jack into main From a75b044187f00eb438867f272e002967b033044d Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Tue, 22 Nov 2016 15:36:29 +0000 Subject: [PATCH 278/671] add patch to disable HIDPI scaling - rfbz#4272 --- disable_hidpi_scaling.patch | 14 ++++++++++++++ vlc.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 disable_hidpi_scaling.patch diff --git a/disable_hidpi_scaling.patch b/disable_hidpi_scaling.patch new file mode 100644 index 0000000..116edb5 --- /dev/null +++ b/disable_hidpi_scaling.patch @@ -0,0 +1,14 @@ +--- a/modules/gui/qt/qt.cpp 2016-11-18 02:24:10.000000000 +0000 ++++ b/modules/gui/qt/qt.cpp 2016-11-22 14:28:23.503056877 +0000 +@@ -478,9 +478,10 @@ static void *Thread( void *obj ) + + Q_INIT_RESOURCE( vlc ); + ++ /* Disable scaling as it's broken + #if HAS_QT56 + QApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); +-#endif ++#endif */ + + /* Start the QApplication here */ + QVLCApp app( argc, argv ); diff --git a/vlc.spec b/vlc.spec index 876e63f..3b2a7ff 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,13 +32,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.10%{?dist} +Release: 0.11%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org #Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz # nightly for 3.0 Source0: http://nightlies.videolan.org/build/source/vlc-%{version}%{?vlc_rc}.tar.xz +Patch0: disable_hidpi_scaling.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -227,6 +228,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} +%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -497,6 +499,9 @@ fi || : %changelog +* Tue Nov 22 2016 leigh scott <leigh123linux@googlemail.com> - 3.0.0-0.11 +- add patch to disable HIDPI scaling - rfbz#4272 + * Tue Nov 08 2016 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.10 - Rebuild for x265-2.1 From 0987d121d6373454d3624c9162684f402981a99b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 12 Dec 2016 16:34:31 +0100 Subject: [PATCH 279/671] - Update to 20161212 snapshot --- sources | 2 +- vlc.spec | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sources b/sources index b4f808c..78b5048 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5fe68fda2cf92e0c677737203ec91721 vlc-3.0.0-20161026-0238-git.tar.xz +cc1111ea6d5e84bdd7ac54876b9b9977 vlc-3.0.0-20161212-0236-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 3b2a7ff..36da1bc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20161026-0238-git +%global vlc_rc -20161212-0236-git %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.11%{?dist} +Release: 0.12%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -87,9 +87,11 @@ BuildRequires: libid3tag-devel BuildRequires: libkate-devel %{?_with_libmad:BuildRequires: libmad-devel} BuildRequires: libmatroska-devel >= 0.7.6 +BuildRequires: libmfx-devel BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel +BuildRequires: libmpg123-devel BuildRequires: libmtp-devel >= 1.0.0 %{?_with_projectm:BuildRequires: libprojectM-qt-devel} BuildRequires: libproxy-devel @@ -109,6 +111,7 @@ BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(vorbis) +BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: lirc-devel %{?_with_live555:BuildRequires: live555-devel >= 0-0.33} @@ -401,7 +404,6 @@ fi || : %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so %{!?_without_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so @@ -455,7 +457,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_glx_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so @@ -499,6 +500,10 @@ fi || : %changelog +* Mon Dec 12 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.12 +- Update to 20161212 snapshot +- Add BR: vpx, mpg123 and mfx + * Tue Nov 22 2016 leigh scott <leigh123linux@googlemail.com> - 3.0.0-0.11 - add patch to disable HIDPI scaling - rfbz#4272 From ad17b1c582c44444478a38cf1efe2169ca6a60a2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 12 Dec 2016 17:23:16 +0100 Subject: [PATCH 280/671] Arch condition for libmfx --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 36da1bc..6e58063 100644 --- a/vlc.spec +++ b/vlc.spec @@ -87,7 +87,9 @@ BuildRequires: libid3tag-devel BuildRequires: libkate-devel %{?_with_libmad:BuildRequires: libmad-devel} BuildRequires: libmatroska-devel >= 0.7.6 +%ifarch x86_64 i686 BuildRequires: libmfx-devel +%endif BuildRequires: libmodplug-devel BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel From 7eac4beeb952d0ec182d0b8d9573bd5796738fe8 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> Date: Tue, 3 Jan 2017 12:59:18 +0100 Subject: [PATCH 281/671] rebuild for x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6e58063..c204ac2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.12%{?dist} +Release: 0.13%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -502,6 +502,9 @@ fi || : %changelog +* Tue Jan 03 2017 Dominik Mierzejewski <rpm@greysector.net> - 3.0.0-0.13 +- rebuild for x265 + * Mon Dec 12 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.12 - Update to 20161212 snapshot - Add BR: vpx, mpg123 and mfx From e5e07d62eff11578af0100e38ad1e5ab0d2c8214 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 9 Jan 2017 14:33:53 +0100 Subject: [PATCH 282/671] Update to 20170109 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 78b5048..d95895f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cc1111ea6d5e84bdd7ac54876b9b9977 vlc-3.0.0-20161212-0236-git.tar.xz +b56db6077cdc228b11b4772335ad1b07 vlc-3.0.0-20170109-0241-git.tar.xz diff --git a/vlc.spec b/vlc.spec index c204ac2..6e65921 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20161212-0236-git +%global vlc_rc -20170109-0241-git %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -32,7 +32,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.13%{?dist} +Release: 0.14%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -502,6 +502,9 @@ fi || : %changelog +* Mon Jan 09 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.14 +- Update to 20170109 + * Tue Jan 03 2017 Dominik Mierzejewski <rpm@greysector.net> - 3.0.0-0.13 - rebuild for x265 From a0ee390bf176a4646687d0bfa0fac9e93bb96888 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 9 Jan 2017 17:12:16 +0100 Subject: [PATCH 283/671] Disable wayland - move plugins --- vlc.spec | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 6e65921..c785871 100644 --- a/vlc.spec +++ b/vlc.spec @@ -141,8 +141,10 @@ BuildRequires: pkgconfig(Qt5Core) >= 5.2 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.2 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 BuildRequires: pkgconfig(speexdsp) >= 1.0.5 +%{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 BuildRequires: pkgconfig(wayland-egl) +} %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel BuildRequires: SDL_image-devel @@ -283,6 +285,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-theora \ --enable-libass \ --enable-shout \ +%{!?_with_wayland: --disable-wayland} \ %{!?_without_xcb:--enable-xcb --enable-xvideo} \ %{?_without_xcb:--disable-xcb --disable-xvideo} \ --enable-svg \ @@ -392,18 +395,21 @@ fi || : %{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc +%{_libdir}/vlc/*.so* %{_libdir}/vlc/plugins/gui/libqt_plugin.so %{?_with_gnomevfs: %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so } %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so +%{?_with_wayland: %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so +%{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so +%{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so +} %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libgl_plugin.so %{_libdir}/vlc/plugins/video_output/libglx_plugin.so -%{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so -%{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so %{!?_without_xcb: %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so @@ -453,12 +459,14 @@ fi || : %endif %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libgl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so +%{?_with_wayland: +%exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so +} %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so @@ -474,7 +482,10 @@ fi || : %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %ghost %{_libdir}/vlc/plugins/plugins.dat -%{_libdir}/vlc/ +%dir %{_libdir}/vlc/ +%{_libdir}/vlc/vlc-cache-gen +%{_libdir}/vlc/plugins +%{_libdir}/vlc/lua %{_mandir}/man1/vlc*.1* @@ -504,6 +515,8 @@ fi || : %changelog * Mon Jan 09 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.14 - Update to 20170109 +- Disable wayland for now - rhbz#4380 +- Move libvlc pulse,vdpau,xcb from -core to main * Tue Jan 03 2017 Dominik Mierzejewski <rpm@greysector.net> - 3.0.0-0.13 - rebuild for x265 From 6e8b6770dfd57c49ce196f8cdb4b9ee2511bb739 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Jan 2017 12:08:21 +0100 Subject: [PATCH 284/671] lirc + wayland fixes --- ...-Fix-lirc-activation-after-detection.patch | 32 +++ ...rt-qt-add-Wayland-run-time-detection.patch | 191 ++++++++++++++++++ vlc.spec | 11 +- 3 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-lirc-activation-after-detection.patch create mode 100644 0001-Revert-qt-add-Wayland-run-time-detection.patch diff --git a/0001-Fix-lirc-activation-after-detection.patch b/0001-Fix-lirc-activation-after-detection.patch new file mode 100644 index 0000000..c4fd0b9 --- /dev/null +++ b/0001-Fix-lirc-activation-after-detection.patch @@ -0,0 +1,32 @@ +From 72846370b9f0e93a51838b567064c6a6b62c37be Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 16 Jan 2017 12:09:10 +0100 +Subject: [PATCH] Fix lirc activation after detection + +This fix build time activation of lirc. +"true" isn't "yes", so the HAVE_LIRC condition isn't met + +This bug was initialy reported as +https://bugzilla.rpmfusion.org/4420 + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 29eaed9..864ff98 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3931,7 +3931,7 @@ have_lirc="no" + AS_IF([test "${enable_lirc}" = "yes"], [ + AC_CHECK_HEADER(lirc/lirc_client.h, [ + AC_CHECK_LIB(lirc_client, lirc_init, [ +- have_lirc="true" ++ have_lirc="yes" + ]) + ]) + ]) +-- +2.7.4 + diff --git a/0001-Revert-qt-add-Wayland-run-time-detection.patch b/0001-Revert-qt-add-Wayland-run-time-detection.patch new file mode 100644 index 0000000..20ce795 --- /dev/null +++ b/0001-Revert-qt-add-Wayland-run-time-detection.patch @@ -0,0 +1,191 @@ +From 82e73a6fa15cb7cf62decdd8ba44df4d1685301d Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 16 Jan 2017 12:03:14 +0100 +Subject: [PATCH] Revert "qt: add Wayland run-time detection" + +This reverts commit 785b0f18d70815288c8a673bcd0f3849af7ef6f7. +--- + modules/gui/qt/Makefile.am | 4 -- + modules/gui/qt/qt.cpp | 104 +++++++++++++-------------------------------- + 2 files changed, 29 insertions(+), 79 deletions(-) + +diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am +index 7e5f5ae..16e3596 100644 +--- a/modules/gui/qt/Makefile.am ++++ b/modules/gui/qt/Makefile.am +@@ -24,10 +24,6 @@ if HAVE_QT5_X11 + libqt_plugin_la_CXXFLAGS += $(QT5_X11_CFLAGS) -DQT5_HAS_X11 + libqt_plugin_la_LIBADD += $(QT5_X11_LIBS) $(X_LIBS) $(X_PRE_LIB) -lX11 + endif +-if HAVE_WAYLAND +-libqt_plugin_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) -DQT5_HAS_WAYLAND +-libqt_plugin_la_LIBADD += $(WAYLAND_CLIENT_LIBS) +-endif + if HAVE_WIN32 + libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid + endif +diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp +index 6015b2a..0229f6e 100644 +--- a/modules/gui/qt/qt.cpp ++++ b/modules/gui/qt/qt.cpp +@@ -48,6 +48,10 @@ + #include "util/qvlcapp.hpp" /* QVLCApplication definition */ + #include "components/playlist/playlist_model.hpp" /* for ~PLModel() */ + ++#if defined (QT5_HAS_X11) || defined (Q_WS_X11) ++ #include <vlc_xlib.h> ++#endif ++ + #include <vlc_plugin.h> + #include <vlc_vout_window.h> + +@@ -75,6 +79,7 @@ static int Open ( vlc_object_t *, bool ); + static void Close ( vlc_object_t * ); + static int WindowOpen ( vout_window_t *, const vout_window_cfg_t * ); + static void WindowClose ( vout_window_t * ); ++static void *Thread ( void * ); + static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); + + /***************************************************************************** +@@ -332,13 +337,6 @@ static bool active = false; + * Module callbacks + *****************************************************************************/ + +-static void *ThreadPlatform( void *, char * ); +- +-static void *Thread( void *data ) +-{ +- return ThreadPlatform( data, NULL ); +-} +- + #ifdef Q_OS_MAC + /* Used to abort the app.exec() on OSX after libvlc_Quit is called */ + #include "../../../lib/libvlc_internal.h" /* libvlc_SetExitHandler */ +@@ -348,67 +346,22 @@ static void Abort( void *obj ) + } + #endif + +-#if defined (QT5_HAS_X11) +-# include <vlc_xlib.h> +- +-static void *ThreadXCB( void *data ) +-{ +- char platform_name[] = "xcb"; +- return ThreadPlatform( data, platform_name ); +-} +- +-static bool HasX11( vlc_object_t *obj ) +-{ +- if( !vlc_xlib_init( obj ) ) +- return false; +- +- Display *dpy = XOpenDisplay( NULL ); +- if( dpy == NULL ) +- return false; +- +- XCloseDisplay( dpy ); +- return true; +-} +-#endif +- +-#ifdef QT5_HAS_WAYLAND +-# include <wayland-client.h> +- +-static void *ThreadWayland( void *data ) +-{ +- char platform_name[] = "wayland"; +- return ThreadPlatform( data, platform_name ); +-} +- +-static bool HasWayland( void ) +-{ +- struct wl_display *dpy = wl_display_connect( NULL ); +- if( dpy == NULL ) +- return false; +- +- wl_display_disconnect( dpy ); +- return true; +-} +-#endif +- + /* Open Interface */ + static int Open( vlc_object_t *p_this, bool isDialogProvider ) + { + intf_thread_t *p_intf = (intf_thread_t *)p_this; +- void *(*thread)(void *) = Thread; + +-#ifdef QT5_HAS_WAYLAND +- if( HasWayland() ) +- thread = ThreadWayland; +- else +-#endif +-#ifdef QT5_HAS_X11 +- if( HasX11( p_this ) ) +- thread = ThreadXCB; +- else +-#endif +-#if defined (QT5_HAS_X11) || defined (QT5_HAS_WAYLAND) ++#if defined (QT5_HAS_X11) || defined (Q_WS_X11) ++ if( !vlc_xlib_init( p_this ) ) ++ return VLC_EGENERIC; ++ ++ Display *p_display = XOpenDisplay( NULL ); ++ if( !p_display ) ++ { ++ msg_Err( p_intf, "Could not connect to X server" ); + return VLC_EGENERIC; ++ } ++ XCloseDisplay( p_display ); + #endif + + QMutexLocker locker (&lock); +@@ -435,9 +388,9 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) + #ifdef Q_OS_MAC + /* Run mainloop on the main thread as Cocoa requires */ + libvlc_SetExitHandler( p_intf->obj.libvlc, Abort, p_intf ); +- thread( (void *)p_intf ); ++ Thread( (void *)p_intf ); + #else +- if( vlc_clone( &p_sys->thread, thread, p_intf, VLC_THREAD_PRIORITY_LOW ) ) ++ if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) ) + { + delete p_sys; + return VLC_ENOMEM; +@@ -493,22 +446,23 @@ static void Close( vlc_object_t *p_this ) + busy = false; + } + +-static void *ThreadPlatform( void *obj, char *platform_name ) ++static void *Thread( void *obj ) + { + intf_thread_t *p_intf = (intf_thread_t *)obj; + intf_sys_t *p_sys = p_intf->p_sys; + char vlc_name[] = "vlc"; /* for WM_CLASS */ ++#ifdef QT5_HAS_X11 + char platform_parm[] = "-platform"; +- char *argv[4]; +- int argc = 0; +- +- argv[argc++] = vlc_name; +- if( platform_name != NULL ) +- { +- argv[argc++] = platform_parm; +- argv[argc++] = platform_name; +- } +- argv[argc] = NULL; ++ char platform_value[] = "xcb"; ++#endif ++ char *argv[] = { ++ vlc_name, ++#ifdef QT5_HAS_X11 ++ platform_parm, platform_value, ++#endif ++ NULL, ++ }; ++ int argc = sizeof(argv) / sizeof(argv[0]) - 1; + + Q_INIT_RESOURCE( vlc ); + +-- +2.7.4 + diff --git a/vlc.spec b/vlc.spec index c785871..06ec402 100644 --- a/vlc.spec +++ b/vlc.spec @@ -23,6 +23,7 @@ %global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 +%global _with_wayland 1 %endif %ifarch x86_64 i686 %global _with_crystalhd 1 @@ -32,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.14%{?dist} +Release: 0.15%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -40,6 +41,8 @@ URL: http://www.videolan.org # nightly for 3.0 Source0: http://nightlies.videolan.org/build/source/vlc-%{version}%{?vlc_rc}.tar.xz Patch0: disable_hidpi_scaling.patch +Patch1: 0001-Fix-lirc-activation-after-detection.patch +Patch2: 0001-Revert-qt-add-Wayland-run-time-detection.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -236,6 +239,8 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -513,6 +518,10 @@ fi || : %changelog +* Tue Jan 17 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.15 +- Fix lirc activation - rhbz#4420 +- Revert upstream commit 785b0f18d7 for wayland detection - rfbz#4380 + * Mon Jan 09 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.14 - Update to 20170109 - Disable wayland for now - rhbz#4380 From 44c167d798c68eb43ad8b085f4758693af0d51ce Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 31 Jan 2017 15:45:46 +0100 Subject: [PATCH 285/671] Add daala support --- vlc.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 06ec402..ef15d0a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -33,7 +33,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.15%{?dist} +Release: 0.16%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -79,6 +79,8 @@ BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} +BuildRequires: pkgconfig(daaladec) +BuildRequires: pkgconfig(daalaenc) BuildRequires: libdc1394-devel >= 2.1.0 %{?_with_libdca:BuildRequires: libdca-devel} BuildRequires: libdv-devel @@ -518,6 +520,9 @@ fi || : %changelog +* Tue Jan 31 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.16 +- Add daala support + * Tue Jan 17 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.15 - Fix lirc activation - rhbz#4420 - Revert upstream commit 785b0f18d7 for wayland detection - rfbz#4380 From 942cfaa24b4ec5e08b1234d85e989ea69d114ae4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 17:30:37 +0100 Subject: [PATCH 286/671] Bump for today --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ef15d0a..52bfb79 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20170109-0241-git +%global vlc_rc -20170220-0237-git %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} From c507e73d031628cecbf4998dfa373e2d48dd3cb6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 17:38:08 +0100 Subject: [PATCH 287/671] Switch source url on purpose --- vlc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 52bfb79..2409cf6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,9 @@ %global vlc_rc -20170220-0237-git +%if 0%{?vlc_rc:1} +%global vlc_url http://nightlies.videolan.org/build/source/ +%else +%global vlc_url http://download.videolan.org/pub/videolan/vlc/ +%endif %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} @@ -37,9 +42,7 @@ Release: 0.16%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -#Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz -# nightly for 3.0 -Source0: http://nightlies.videolan.org/build/source/vlc-%{version}%{?vlc_rc}.tar.xz +Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz Patch0: disable_hidpi_scaling.patch Patch1: 0001-Fix-lirc-activation-after-detection.patch Patch2: 0001-Revert-qt-add-Wayland-run-time-detection.patch From 67f13a8f32cef7d4081a4d14fccf5b954f958b91 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 17:39:41 +0100 Subject: [PATCH 288/671] Clean merged patch, disable wayland runtime detection revert --- ...-Fix-lirc-activation-after-detection.patch | 32 ------------------- vlc.spec | 4 +-- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 0001-Fix-lirc-activation-after-detection.patch diff --git a/0001-Fix-lirc-activation-after-detection.patch b/0001-Fix-lirc-activation-after-detection.patch deleted file mode 100644 index c4fd0b9..0000000 --- a/0001-Fix-lirc-activation-after-detection.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 72846370b9f0e93a51838b567064c6a6b62c37be Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Mon, 16 Jan 2017 12:09:10 +0100 -Subject: [PATCH] Fix lirc activation after detection - -This fix build time activation of lirc. -"true" isn't "yes", so the HAVE_LIRC condition isn't met - -This bug was initialy reported as -https://bugzilla.rpmfusion.org/4420 - -Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 29eaed9..864ff98 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3931,7 +3931,7 @@ have_lirc="no" - AS_IF([test "${enable_lirc}" = "yes"], [ - AC_CHECK_HEADER(lirc/lirc_client.h, [ - AC_CHECK_LIB(lirc_client, lirc_init, [ -- have_lirc="true" -+ have_lirc="yes" - ]) - ]) - ]) --- -2.7.4 - diff --git a/vlc.spec b/vlc.spec index 2409cf6..8bb2948 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,6 @@ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz Patch0: disable_hidpi_scaling.patch -Patch1: 0001-Fix-lirc-activation-after-detection.patch Patch2: 0001-Revert-qt-add-Wayland-run-time-detection.patch BuildRequires: desktop-file-utils @@ -244,8 +243,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 +#patch2 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From 308f0750d7f4942f3ad0cbeae18673ab19b45366 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 17:51:25 +0100 Subject: [PATCH 289/671] Update changelog --- sources | 2 +- vlc.spec | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sources b/sources index d95895f..12f2529 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b56db6077cdc228b11b4772335ad1b07 vlc-3.0.0-20170109-0241-git.tar.xz +68b532bf5162405b89011d5fbf8dacce vlc-3.0.0-20170220-0237-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 8bb2948..7d66457 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.16%{?dist} +Release: 0.17%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -521,6 +521,11 @@ fi || : %changelog +* Mon Feb 20 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.17 +- Update to 20170220 snapshot +- Clean merged patch, unrevert wayland runtime detection +- Switch source url on purpose + * Tue Jan 31 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.16 - Add daala support From feda414a4ae490e586d39f3b3285a88428ceb31b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 18:02:58 +0100 Subject: [PATCH 290/671] Add BRs --- vlc.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 7d66457..47042b3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -151,6 +151,7 @@ BuildRequires: pkgconfig(speexdsp) >= 1.0.5 %{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-protocols) } %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel @@ -412,8 +413,9 @@ fi || : %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{?_with_wayland: %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so -%{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so +%{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so + } %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libgl_plugin.so @@ -472,7 +474,7 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so %{?_with_wayland: %exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_surface_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so } %exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so From 06401810e6c4d3080ddc77d7f8af35ce8a1dddeb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 20 Feb 2017 21:55:49 +0100 Subject: [PATCH 291/671] Fixup macosx --- vlc.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlc.spec b/vlc.spec index 47042b3..3e76023 100644 --- a/vlc.spec +++ b/vlc.spec @@ -350,6 +350,9 @@ touch %{buildroot}%{_libdir}/vlc/plugins/plugins.dat appstream-util validate-relax --nonet \ %{buildroot}/%{_datadir}/appdata/*.appdata.xml || : +#Fixup +rm -rf %{buildroot}/%{_datadir}/macosx + %find_lang %{name} From ea52934d54ae358af70f4e84b8423a3acbdfdbab Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 23 Feb 2017 09:21:59 +0000 Subject: [PATCH 292/671] Rebuild for libvncserver .so version bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3e76023..e7a638a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.17%{?dist} +Release: 0.18%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -526,6 +526,9 @@ fi || : %changelog +* Thu Feb 23 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.18 +- Rebuild for libvncserver .so version bump + * Mon Feb 20 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.17 - Update to 20170220 snapshot - Clean merged patch, unrevert wayland runtime detection From b40f74173043d256ae089fc377ff864290cae2d7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 16 Mar 2017 13:21:17 +0100 Subject: [PATCH 293/671] Update to 20170316 --- sources | 2 +- vlc.spec | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 12f2529..01bcf11 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -68b532bf5162405b89011d5fbf8dacce vlc-3.0.0-20170220-0237-git.tar.xz +3e19b48d356f2dc8ba2644d82d639587 vlc-3.0.0-20170316-0243-git.tar.xz diff --git a/vlc.spec b/vlc.spec index e7a638a..89d37d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20170220-0237-git +%global vlc_rc -20170316-0243-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -38,13 +38,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.18%{?dist} +Release: 0.19%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz -Patch0: disable_hidpi_scaling.patch -Patch2: 0001-Revert-qt-add-Wayland-run-time-detection.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -184,6 +182,12 @@ BuildRequires: xorg-x11-proto-devel %{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} +# Fedora 25 Workstation default to wayland but not all +# Boolean deps will handle this better when allowed +%if 0%{?fedora} >= 25 +Recommends: qt5-qtwayland%{_isa} +%endif + Provides: %{name}-xorg%{_isa} = %{version}-%{release} Requires: vlc-core%{_isa} = %{version}-%{release} @@ -243,8 +247,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} -%patch0 -p1 -#patch2 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -526,6 +528,11 @@ fi || : %changelog +* Thu Mar 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.19 +- Update to 20170318 snapshoot +- Drop hidpi revert rfbz#4272 +- Recommends qt5-wayland + * Thu Feb 23 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.18 - Rebuild for libvncserver .so version bump From 37df6abba40898b0d69bbefada825de470486127 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 16 Mar 2017 13:30:50 +0100 Subject: [PATCH 294/671] Fixup typo --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 89d37d4..ac3db78 100644 --- a/vlc.spec +++ b/vlc.spec @@ -531,7 +531,7 @@ fi || : * Thu Mar 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.19 - Update to 20170318 snapshoot - Drop hidpi revert rfbz#4272 -- Recommends qt5-wayland +- Recommends qt5-qtwayland * Thu Feb 23 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.18 - Rebuild for libvncserver .so version bump From fa652388773c9bb96162ca69838629092652b4ef Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 21 Mar 2017 00:11:07 +0100 Subject: [PATCH 295/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ac3db78..a79ccb8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.19%{?dist} +Release: 0.20%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -528,6 +528,9 @@ fi || : %changelog +* Mon Mar 20 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 3.0.0-0.20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Mar 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.19 - Update to 20170318 snapshoot - Drop hidpi revert rfbz#4272 From 9202f765b6406667913c8a434e4bbf8316c705ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 5 Apr 2017 14:00:40 +0200 Subject: [PATCH 296/671] Update snapshot and rework library split --- sources | 2 +- vlc.spec | 35 ++++++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/sources b/sources index 01bcf11..006a9ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e19b48d356f2dc8ba2644d82d639587 vlc-3.0.0-20170316-0243-git.tar.xz +501dbc54f8f78e8882afb58065f93855 vlc-3.0.0-20170405-0244-git.tar.xz diff --git a/vlc.spec b/vlc.spec index a79ccb8..4686934 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20170316-0243-git +%global vlc_rc -20170405-0244-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.20%{?dist} +Release: 0.21%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -417,6 +417,7 @@ fi || : %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{?_with_wayland: +%{_libdir}/vlc/plugins/access/libwl_screenshooter_plugin.so %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so @@ -430,17 +431,27 @@ fi || : %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +%{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so +%{_libdir}/vlc/plugins/services_discovery/libxcb_apps_plugin.so } %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_projectm: %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so } +#jack in main %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so -%{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so +#pulseaudio in main +%{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so +%{_libdir}/vlc/plugins/access/libpulsesrc_plugin.so +%{_libdir}/vlc/plugins/services_discovery/libpulselist_plugin.so %{?_with_fluidsynth: %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } +#vdpau in main +%dir %{_libdir}/vlc/plugins/vdpau +%{_libdir}/vlc/plugins/vdpau/libvdpau_*_plugin.so + %files core -f %{name}.lang %{_bindir}/vlc @@ -472,20 +483,23 @@ fi || : %if 0%{?fedora} < 17 %exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so %endif +%exclude %{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so +%exclude %{_libdir}/vlc/plugins/services_discovery/libxcb_apps_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libgl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so +%exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so +} %{?_with_wayland: +%exclude %{_libdir}/vlc/plugins/access/libwl_screenshooter_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so } -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -} %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so @@ -496,6 +510,9 @@ fi || : } %exclude %{_libdir}/vlc/plugins/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so +%exclude %{_libdir}/vlc/plugins/access/libpulsesrc_plugin.so +%exclude %{_libdir}/vlc/plugins/services_discovery/libpulselist_plugin.so +%exclude %{_libdir}/vlc/plugins/vdpau %ghost %{_libdir}/vlc/plugins/plugins.dat %dir %{_libdir}/vlc/ %{_libdir}/vlc/vlc-cache-gen @@ -528,6 +545,10 @@ fi || : %changelog +* Wed Apr 05 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.21 +- Update to 20170405 snapshoot +- Rework main -core library split + * Mon Mar 20 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 3.0.0-0.20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 0a786ea28b35fdcb9371aff389f34f159d574bb3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 27 Apr 2017 13:58:05 +0200 Subject: [PATCH 297/671] Update to 20170427 --- sources | 2 +- vlc.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 006a9ae..30e2114 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -501dbc54f8f78e8882afb58065f93855 vlc-3.0.0-20170405-0244-git.tar.xz +ace49eb8107dfba21de8f9ae5f8b1ca7 vlc-3.0.0-20170427-0240-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 4686934..ba14745 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20170405-0244-git +%global vlc_rc -20170427-0240-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -545,6 +545,9 @@ fi || : %changelog +* Thu Apr 27 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.22 +- Update ot 20170427 snapshot + * Wed Apr 05 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.21 - Update to 20170405 snapshoot - Rework main -core library split From 3f4d73b4dfadb2274ef5aeddcf1cc9aacb0b3ada Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 27 Apr 2017 13:58:41 +0200 Subject: [PATCH 298/671] bump --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ba14745..bf9dd63 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.21%{?dist} +Release: 0.22%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org From ddb959cbc6d5c702c8992cdf83acf21c50247cdf Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 29 Apr 2017 23:33:33 +0100 Subject: [PATCH 299/671] Rebuild for ffmpeg update --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bf9dd63..0212217 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.22%{?dist} +Release: 0.23%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -545,6 +545,9 @@ fi || : %changelog +* Sat Apr 29 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.23 +- Rebuild for ffmpeg update + * Thu Apr 27 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.22 - Update ot 20170427 snapshot From a47ab769855f96b16941c12535659c846bb76e4d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 23 May 2017 17:29:56 +0200 Subject: [PATCH 300/671] Update to 20170523 snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 30e2114..802c8e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ace49eb8107dfba21de8f9ae5f8b1ca7 vlc-3.0.0-20170427-0240-git.tar.xz +f10a372468ff16c45acdef90017a7e3c vlc-3.0.0-20170523-0239-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 0212217..8a5988b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_rc -20170427-0240-git +%global vlc_rc -20170523-0239-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.23%{?dist} +Release: 0.24%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -545,6 +545,9 @@ fi || : %changelog +* Tue May 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.24 +- Update to 20170523 snapshot + * Sat Apr 29 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.23 - Rebuild for ffmpeg update From 5d476994c7b5409fbfe569ca0288e75796b16781 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 25 May 2017 07:23:04 +0200 Subject: [PATCH 301/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8a5988b..e3cd0b4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -38,7 +38,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.24%{?dist} +Release: 0.25%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -545,6 +545,9 @@ fi || : %changelog +* Thu May 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.25 +- Rebuilt for live555 + * Tue May 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.24 - Update to 20170523 snapshot From d189058ea8abc7c90ad6e14bb809dd48c9a18e8c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 1 Jun 2017 08:31:38 +0200 Subject: [PATCH 302/671] Update to 20170601 --- sources | 2 +- vlc.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 802c8e3..2e5f0c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f10a372468ff16c45acdef90017a7e3c vlc-3.0.0-20170523-0239-git.tar.xz +9ab20cd4701953312516a55c253981df vlc-3.0.0-20170601-0240-git.tar.xz diff --git a/vlc.spec b/vlc.spec index e3cd0b4..9a7a9d5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,5 @@ -%global vlc_rc -20170523-0239-git +%global vlc_date 20170601 +%global vlc_rc -%{?vlc_date}-0240-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -38,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.25%{?dist} +Release: 0.26%{?vlc_date:%{vlc_date}git}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -545,6 +546,9 @@ fi || : %changelog +* Thu Jun 01 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.2620170601git +- Update to 20170601 snapshot + * Thu May 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.25 - Rebuilt for live555 From 1ca99a17c87f41b9c50bba4f6297b244ae527c67 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 1 Jun 2017 08:37:09 +0200 Subject: [PATCH 303/671] Update verrel --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9a7a9d5..0e4c882 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.26%{?vlc_date:%{vlc_date}git}%{?dist} +Release: 0.26%{?vlc_date:snap.%{vlc_date}git}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org From d7e2d9788d10cf3cf372ee0cdb1db086842ebf40 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 22 Jun 2017 15:00:22 +0200 Subject: [PATCH 304/671] Update to 20170622 Disable wayland --- sources | 2 +- vlc.spec | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 2e5f0c8..cdf0c5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9ab20cd4701953312516a55c253981df vlc-3.0.0-20170601-0240-git.tar.xz +bdfcc87417a09e5d2eff2eb488364214 vlc-3.0.0-20170622-0939-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 0e4c882..3b47c7e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20170601 -%global vlc_rc -%{?vlc_date}-0240-git +%global vlc_date 20170622 +%global vlc_rc -%{?vlc_date}-0939-git %if 0%{?vlc_rc:1} %global vlc_url http://nightlies.videolan.org/build/source/ %else @@ -29,7 +29,7 @@ %global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 -%global _with_wayland 1 +%global _with_wayland 0 %endif %ifarch x86_64 i686 %global _with_crystalhd 1 @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.26%{?vlc_date:snap.%{vlc_date}git}%{?dist} +Release: 0.28%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -183,11 +183,13 @@ BuildRequires: xorg-x11-proto-devel %{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} +%{?_with_wayland: # Fedora 25 Workstation default to wayland but not all # Boolean deps will handle this better when allowed %if 0%{?fedora} >= 25 Recommends: qt5-qtwayland%{_isa} %endif +} Provides: %{name}-xorg%{_isa} = %{version}-%{release} @@ -546,6 +548,11 @@ fi || : %changelog +* Thu Jun 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.28.git20170622 +- Update snapshoot +- Disable wayland support for now +- Update release field + * Thu Jun 01 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.2620170601git - Update to 20170601 snapshot From 7e3651dbf73be9eae6e52f49f3dfb7930f3257c7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 24 Jun 2017 08:35:14 +0200 Subject: [PATCH 305/671] Restore wayland with a patch - rhbz#4552 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3b47c7e..524564e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,7 +29,7 @@ %global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 -%global _with_wayland 0 +%global _with_wayland 1 %endif %ifarch x86_64 i686 %global _with_crystalhd 1 @@ -44,6 +44,8 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz +#https://trac.videolan.org/vlc/ticket/18383 +Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -250,6 +252,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} +%patch0 -p1 -b .wl %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From fc67f81ff36ecf211069c7094c3ba41f63854577 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 24 Jun 2017 08:46:11 +0200 Subject: [PATCH 306/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 524564e..458404a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.28%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.29%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -551,6 +551,9 @@ fi || : %changelog +* Sat Jun 24 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.29.git20170622 +- Restore wayland with a patch - rhbz#4552 + * Thu Jun 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.28.git20170622 - Update snapshoot - Disable wayland support for now From e473e9b49a6347d5348cc504d4f2fb4e6fc323d2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 24 Jun 2017 08:58:50 +0200 Subject: [PATCH 307/671] Add patch --- 0001-qt-Prefer-XCB-over-Wayland.patch | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 0001-qt-Prefer-XCB-over-Wayland.patch diff --git a/0001-qt-Prefer-XCB-over-Wayland.patch b/0001-qt-Prefer-XCB-over-Wayland.patch new file mode 100644 index 0000000..71872c0 --- /dev/null +++ b/0001-qt-Prefer-XCB-over-Wayland.patch @@ -0,0 +1,43 @@ +From 781dee40c6f32941207322561ebab7166a90569c Mon Sep 17 00:00:00 2001 +From: Martin Briza <mbriza@redhat.com> +Date: Fri, 23 Jun 2017 16:30:09 +0200 +Subject: [PATCH] qt: Prefer XCB over Wayland + +Wayland users now have no choice (except setting WAYLAND_DISPLAY to '') how to avoid getting VLC under Wayland which may not be optimal yet. + +This patch ensures the XCB backend is preferred. This means the developers who want to work on Wayland support will have to clear their DISPLAY variable instead. + +Related to https://trac.videolan.org/vlc/ticket/18383 . +--- + modules/gui/qt/qt.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp +index 2ad68eb401..3224361ecb 100644 +--- a/modules/gui/qt/qt.cpp ++++ b/modules/gui/qt/qt.cpp +@@ -411,16 +411,16 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) + intf_thread_t *p_intf = (intf_thread_t *)p_this; + void *(*thread)(void *) = Thread; + +-#ifdef QT5_HAS_WAYLAND +- if( HasWayland() ) +- thread = ThreadWayland; +- else +-#endif + #ifdef QT5_HAS_X11 + if( HasX11( p_this ) ) + thread = ThreadXCB; + else + #endif ++#ifdef QT5_HAS_WAYLAND ++ if( HasWayland() ) ++ thread = ThreadWayland; ++ else ++#endif + #if defined (QT5_HAS_X11) || defined (QT5_HAS_WAYLAND) + return VLC_EGENERIC; + #endif +-- +2.13.0 + From 5b8f9fe2730fc0ce6f02c840ed3b4b49cfa322f4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 4 Jul 2017 18:55:37 +0200 Subject: [PATCH 308/671] Update snapshot --- sources | 2 +- vlc.spec | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sources b/sources index cdf0c5e..bf49998 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bdfcc87417a09e5d2eff2eb488364214 vlc-3.0.0-20170622-0939-git.tar.xz +996a9b8e8f3b1e1126bb6765fc2ebb38 vlc-3.0.0-20170704-0240-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 458404a..3e4f699 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,9 +1,9 @@ -%global vlc_date 20170622 -%global vlc_rc -%{?vlc_date}-0939-git +%global vlc_date 20170704 +%global vlc_rc -%{?vlc_date}-0240-git %if 0%{?vlc_rc:1} -%global vlc_url http://nightlies.videolan.org/build/source/ +%global vlc_url https://nightlies.videolan.org/build/source/ %else -%global vlc_url http://download.videolan.org/pub/videolan/vlc/ +%global vlc_url https://download.videolan.org/pub/videolan/vlc/ %endif %global _with_bootstrap 1 %global _with_workaround_circle_deps 1 @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.29%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.30%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -551,6 +551,10 @@ fi || : %changelog +* Tue Jul 04 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.30.git20170704 +- Update snapshot +- Use https for downloads - rhbz#4584 + * Sat Jun 24 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.29.git20170622 - Restore wayland with a patch - rhbz#4552 From 6f6e437e72d6dfbe57839aa48cd5607bf97e12c1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Jul 2017 11:04:43 +0200 Subject: [PATCH 309/671] Update snapshot --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index bf49998..0b77aec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -996a9b8e8f3b1e1126bb6765fc2ebb38 vlc-3.0.0-20170704-0240-git.tar.xz +7f8aed98b53cb513b94681ba1d832f7f vlc-3.0.0-20170717-0244-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 3e4f699..147e281 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20170704 -%global vlc_rc -%{?vlc_date}-0240-git +%global vlc_date 20170717 +%global vlc_rc -%{?vlc_date}-0244-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.30%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.31%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -551,6 +551,9 @@ fi || : %changelog +* Mon Jul 17 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.31.git20170717 +- Update snapshot + * Tue Jul 04 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.30.git20170704 - Update snapshot - Use https for downloads - rhbz#4584 From bb30a5d5ec7c853a6bba461a8fd7ef4d9fc95984 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Jul 2017 14:55:01 +0200 Subject: [PATCH 310/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 147e281..6e45fba 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.31%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.32%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -551,6 +551,9 @@ fi || : %changelog +* Tue Jul 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.32.git20170717 +- Rebuilt for live555 + * Mon Jul 17 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.31.git20170717 - Update snapshot From 6c10db48c73531d30e2888be57c48b79224336f9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 31 Jul 2017 10:45:54 +0200 Subject: [PATCH 311/671] Fixup lua directory search path --- ...don-t-call-directly-config_GetLibDir.patch | 38 +++++++++++++++++++ vlc.spec | 2 + 2 files changed, 40 insertions(+) create mode 100644 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch diff --git a/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch b/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch new file mode 100644 index 0000000..fa98769 --- /dev/null +++ b/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch @@ -0,0 +1,38 @@ +From 9bec043da70def3adf0a69747ebe3601f1886fe1 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 31 Jul 2017 10:42:39 +0200 +Subject: [PATCH] Revert "lua: don't call directly config_GetLibDir" + +libdir and datadir are different kind of directories on Linux. +So they are unrelated + +This reverts commit d5ac6c4ce3d9f50b7bf9e9325b8c9f93b376c574. +--- + modules/lua/vlc.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c +index 512d9e505c..57dc7d8e49 100644 +--- a/modules/lua/vlc.c ++++ b/modules/lua/vlc.c +@@ -214,6 +214,17 @@ int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list ) + i++; + free( datadir ); + ++#if !(defined(__APPLE__) || defined(_WIN32)) ++ char *psz_libpath = config_GetLibDir(); ++ if( likely(psz_libpath != NULL) ) ++ { ++ if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s", ++ psz_libpath, luadirname ) != -1) ) ++ i++; ++ free( psz_libpath ); ++ } ++#endif ++ + char *psz_datapath = config_GetDataDir(); + if( likely(psz_datapath != NULL) ) + { +-- +2.13.3 + diff --git a/vlc.spec b/vlc.spec index 6e45fba..65c5e48 100644 --- a/vlc.spec +++ b/vlc.spec @@ -46,6 +46,7 @@ URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch +Patch1: 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -253,6 +254,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -b .wl +%patch1 -p1 -b .lua %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From 16df78e525ef61821f824f5994afb005ceb89b6c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 31 Jul 2017 10:47:18 +0200 Subject: [PATCH 312/671] Fix lua directory search path --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 65c5e48..54a7a44 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.32%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.33%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -553,6 +553,9 @@ fi || : %changelog +* Mon Jul 31 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.33.git20170717 +- Fix lua directory search path + * Tue Jul 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.32.git20170717 - Rebuilt for live555 From c0e83f922e3f1ff30a92ba6be37da3bb06d2d365 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 31 Jul 2017 12:00:54 +0200 Subject: [PATCH 313/671] Enforce lua(abi) version --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 54a7a44..37ac833 100644 --- a/vlc.spec +++ b/vlc.spec @@ -237,6 +237,7 @@ Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} +Requires: lua(abi) = %{lua_version} %description core VLC media player core components From 95a68c2b2cee72be399c8d8978fdd76b784d563e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 23 Aug 2017 13:50:23 +0200 Subject: [PATCH 314/671] Update snapshot --- sources | 2 +- vlc.spec | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 0b77aec..c758172 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7f8aed98b53cb513b94681ba1d832f7f vlc-3.0.0-20170717-0244-git.tar.xz +f8beb4af233ac35a47570871b1e350a4 vlc-3.0.0-20170823-0243-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 37ac833..6dd9bf8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20170717 -%global vlc_rc -%{?vlc_date}-0244-git +%global vlc_date 20170823 +%global vlc_rc -%{?vlc_date}-0243-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,14 +39,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.33%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.34%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch -Patch1: 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -157,7 +156,6 @@ BuildRequires: pkgconfig(wayland-protocols) } %{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} BuildRequires: sqlite-devel -BuildRequires: SDL_image-devel %{?_with_sidplay:BuildRequires: pkgconfig(libsidplay2)} BuildRequires: speex-devel >= 1.1.5 BuildRequires: taglib-devel @@ -255,7 +253,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -b .wl -%patch1 -p1 -b .lua %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -554,6 +551,9 @@ fi || : %changelog +* Wed Aug 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.34.git20170823 +- Update snapshot + * Mon Jul 31 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.33.git20170717 - Fix lua directory search path From 2d97f330813309df55bf2ecdab056590accc10b4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 23 Aug 2017 18:40:18 +0200 Subject: [PATCH 315/671] Fixup lua content --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6dd9bf8..6f1c6d6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -523,7 +523,6 @@ fi || : %dir %{_libdir}/vlc/ %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins -%{_libdir}/vlc/lua %{_mandir}/man1/vlc*.1* From 665d289f4e987cabe7392f44b7665f0c17d91e26 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 22 Sep 2017 20:31:10 +0200 Subject: [PATCH 316/671] Update to vdd2017 --- sources | 2 +- vlc.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index c758172..5293529 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f8beb4af233ac35a47570871b1e350a4 vlc-3.0.0-20170823-0243-git.tar.xz +9947671bbf29c2ab46c919d8e7a853e4 vlc-3.0.0-20170922-0239-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 6f1c6d6..f6d23ad 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20170823 -%global vlc_rc -%{?vlc_date}-0243-git +%global vlc_date 20170922 +%global vlc_rc -%{?vlc_date}-0239-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.34%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.35%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -550,6 +550,10 @@ fi || : %changelog +* Fri Sep 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.35.git20170922 +- Update to VDD2017 edition +- https://www.videolan.org/videolan/events/vdd17/ + * Wed Aug 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.34.git20170823 - Update snapshot From a770b74ec8cb1e9d5cbe4f33bb2e9d5df34f7906 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 25 Sep 2017 15:55:26 +0200 Subject: [PATCH 317/671] rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f6d23ad..2fe0d48 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.35%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.36%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -550,6 +550,9 @@ fi || : %changelog +* Mon Sep 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.36.git20170922 +- Rebuilt for live555 + * Fri Sep 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.35.git20170922 - Update to VDD2017 edition - https://www.videolan.org/videolan/events/vdd17/ From eabba11346d2c9567f372630908f75fdfa91afb4 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Tue, 10 Oct 2017 14:34:27 +0100 Subject: [PATCH 318/671] Fix libvlc vdpau issue (rfbz #4678) --- libvlc_remove_xid.patch | 29 +++++++++++++++++++++++++++++ sources | 2 +- vlc.spec | 16 +++++++++++----- 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 libvlc_remove_xid.patch diff --git a/libvlc_remove_xid.patch b/libvlc_remove_xid.patch new file mode 100644 index 0000000..afe01b6 --- /dev/null +++ b/libvlc_remove_xid.patch @@ -0,0 +1,29 @@ +From 0014603e717efc39242acc5c3dafc9390304415b Mon Sep 17 00:00:00 2001 +From: Thomas Guillem <thomas@gllm.fr> +Date: Tue, 10 Oct 2017 15:01:26 +0200 +Subject: [PATCH] libvlc: don't force the xid "vout display" + +libvlc_media_player_set_xwindow() should only force the embed-xid "vout window" +plugin but not the xid "vout display" plugin. + +This allows to use the GL "vout display" via EGL/GLX (with full hardware +acceleration) with an embedded X window. + +Fixes #18907 +--- + lib/media_player.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/media_player.c b/lib/media_player.c +index 7247cdea857..ef34125aa5a 100644 +--- a/lib/media_player.c ++++ b/lib/media_player.c +@@ -1175,7 +1175,7 @@ void libvlc_media_player_set_xwindow( libvlc_media_player_t *p_mi, + assert (p_mi != NULL); + + var_SetString (p_mi, "avcodec-hw", ""); +- var_SetString (p_mi, "vout", drawable ? "xid" : ""); ++ var_SetString (p_mi, "vout", ""); + var_SetString (p_mi, "window", drawable ? "embed-xid,any" : ""); + var_SetInteger (p_mi, "drawable-xid", drawable); + } diff --git a/sources b/sources index 5293529..e71444f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9947671bbf29c2ab46c919d8e7a853e4 vlc-3.0.0-20170922-0239-git.tar.xz +fcea04f4a76dcc36c9ed2450b72d87b1 vlc-3.0.0-20171009-0241-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 2fe0d48..542a5df 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20170922 -%global vlc_rc -%{?vlc_date}-0239-git +%global vlc_date 20171009 +%global vlc_rc -%{?vlc_date}-0241-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,13 +39,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.36%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.37%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch +Patch1: libvlc_remove_xid.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -253,6 +254,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -b .wl +%patch1 -p1 -b .xid %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -356,7 +358,7 @@ touch %{buildroot}%{_libdir}/vlc/plugins/plugins.dat #Appdata appstream-util validate-relax --nonet \ - %{buildroot}/%{_datadir}/appdata/*.appdata.xml || : + %{buildroot}/%{_datadir}/metainfo/*.appdata.xml || : #Fixup rm -rf %{buildroot}/%{_datadir}/macosx @@ -407,7 +409,7 @@ fi || : %files %doc AUTHORS ChangeLog NEWS README THANKS %license COPYING -%{_datadir}/appdata/vlc.appdata.xml +%{_datadir}/metainfo/vlc.appdata.xml %{_datadir}/applications/*%{name}.desktop %{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png @@ -550,6 +552,10 @@ fi || : %changelog +* Mon Oct 09 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.37.git20171009 +- Update snapshot +- Fix libvlc vdpau issue (rfbz #4678) + * Mon Sep 25 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.36.git20170922 - Rebuilt for live555 From d46f776dbadba0347aa1622d94fd5ec7c04141db Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Mon, 16 Oct 2017 20:29:22 +0100 Subject: [PATCH 319/671] Rebuild for ffmpeg update --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 542a5df..dfbcf85 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.37%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.38%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -552,6 +552,9 @@ fi || : %changelog +* Mon Oct 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.38.git20171009 +- Rebuild for ffmpeg update + * Mon Oct 09 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.37.git20171009 - Update snapshot - Fix libvlc vdpau issue (rfbz #4678) From 0a9ad50e9d65084929a60f5a89e43a7654d1e93f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 16 Oct 2017 21:44:03 +0200 Subject: [PATCH 320/671] Fixup lua_version macro usage --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index dfbcf85..0192196 100644 --- a/vlc.spec +++ b/vlc.spec @@ -236,7 +236,7 @@ Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} -Requires: lua(abi) = %{lua_version} +%{?lua_version:Requires: lua(abi) = %{lua_version}} %description core VLC media player core components From e128264e9c8505977393ee62e451aa71b160937f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 3 Nov 2017 21:33:49 +0100 Subject: [PATCH 321/671] Update vlc --- libvlc_remove_xid.patch | 29 ----------------------------- sources | 2 +- vlc.spec | 16 +++++++++------- 3 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 libvlc_remove_xid.patch diff --git a/libvlc_remove_xid.patch b/libvlc_remove_xid.patch deleted file mode 100644 index afe01b6..0000000 --- a/libvlc_remove_xid.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0014603e717efc39242acc5c3dafc9390304415b Mon Sep 17 00:00:00 2001 -From: Thomas Guillem <thomas@gllm.fr> -Date: Tue, 10 Oct 2017 15:01:26 +0200 -Subject: [PATCH] libvlc: don't force the xid "vout display" - -libvlc_media_player_set_xwindow() should only force the embed-xid "vout window" -plugin but not the xid "vout display" plugin. - -This allows to use the GL "vout display" via EGL/GLX (with full hardware -acceleration) with an embedded X window. - -Fixes #18907 ---- - lib/media_player.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/media_player.c b/lib/media_player.c -index 7247cdea857..ef34125aa5a 100644 ---- a/lib/media_player.c -+++ b/lib/media_player.c -@@ -1175,7 +1175,7 @@ void libvlc_media_player_set_xwindow( libvlc_media_player_t *p_mi, - assert (p_mi != NULL); - - var_SetString (p_mi, "avcodec-hw", ""); -- var_SetString (p_mi, "vout", drawable ? "xid" : ""); -+ var_SetString (p_mi, "vout", ""); - var_SetString (p_mi, "window", drawable ? "embed-xid,any" : ""); - var_SetInteger (p_mi, "drawable-xid", drawable); - } diff --git a/sources b/sources index e71444f..d882724 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fcea04f4a76dcc36c9ed2450b72d87b1 vlc-3.0.0-20171009-0241-git.tar.xz +90ae508248c66715ccd7c167e341feed vlc-3.0.0-20171103-0240-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 0192196..24ee9ee 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20171009 -%global vlc_rc -%{?vlc_date}-0241-git +%global vlc_date 20171103 +%global vlc_rc -%{?vlc_date}-0240-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,14 +39,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.38%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.39%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch -Patch1: libvlc_remove_xid.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -146,9 +145,10 @@ BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 BuildRequires: pkgconfig(protobuf-lite) >= 2.5 -BuildRequires: pkgconfig(Qt5Core) >= 5.2 -BuildRequires: pkgconfig(Qt5X11Extras) >= 5.2 +BuildRequires: pkgconfig(Qt5Core) >= 5.5 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 +BuildRequires: pkgconfig(Qt5Svg) >= 5.5 +BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 BuildRequires: pkgconfig(speexdsp) >= 1.0.5 %{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 @@ -254,7 +254,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -b .wl -%patch1 -p1 -b .xid %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -552,6 +551,9 @@ fi || : %changelog +* Fri Nov 03 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.39.git20171103 +- Update to 20171103 snapshoot + * Mon Oct 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.38.git20171009 - Rebuild for ffmpeg update From cbc2f707d5786af45fa23011003f307443694f9c Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 16 Nov 2017 10:24:21 +0000 Subject: [PATCH 322/671] Rebuild for new protobuf version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 24ee9ee..6e74f32 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.39%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.40%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -551,6 +551,9 @@ fi || : %changelog +* Thu Nov 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.40.git20171103 +- Rebuild for new protobuf version + * Fri Nov 03 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.39.git20171103 - Update to 20171103 snapshoot From 847ed70973a7c01ab1e1a882e8409f5c458275b2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 22 Nov 2017 20:03:30 +0100 Subject: [PATCH 323/671] Update vlc snapshot --- sources | 2 +- vlc.spec | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sources b/sources index d882724..29cc2f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90ae508248c66715ccd7c167e341feed vlc-3.0.0-20171103-0240-git.tar.xz +32bec6d7e6202d8c33ce7c372c539ab8 vlc-3.0.0-20171122-0234-git.tar.xz diff --git a/vlc.spec b/vlc.spec index 6e74f32..7711943 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20171103 -%global vlc_rc -%{?vlc_date}-0240-git +%global vlc_date 20171122 +%global vlc_rc -%{?vlc_date}-0234-git %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -367,7 +367,10 @@ rm -rf %{buildroot}/%{_datadir}/macosx %post -%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null +if [ $1 == 1 ] ; then + %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null +fi || : + %{_bindir}/touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor @@ -551,6 +554,9 @@ fi || : %changelog +* Wed Nov 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.40.git20171122 +- Update to 20171122 snapshot + * Thu Nov 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.40.git20171103 - Rebuild for new protobuf version From 383e50072fedb9ab4ee9f1ed26af757869a9add9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 26 Nov 2017 19:44:18 +0100 Subject: [PATCH 324/671] Rebuilt for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7711943..3b74b0c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.40%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.41%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -554,6 +554,9 @@ fi || : %changelog +* Sun Nov 26 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.41.git20171122 +- Rebuilt for live555 + * Wed Nov 22 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.40.git20171122 - Update to 20171122 snapshot From 0796745c9608b15815dcca5fc2a7375d32bfa3b1 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 1 Dec 2017 10:20:35 +0000 Subject: [PATCH 325/671] Rebuild against new libmfx (rhbz#1471768) --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3b74b0c..01dff91 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.41%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.42%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -554,6 +554,10 @@ fi || : %changelog +* Fri Dec 01 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.42.git20171122 +- Rebuild for new protobuf version +- Rebuild against new libmfx (rhbz#1471768) + * Sun Nov 26 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.41.git20171122 - Rebuilt for live555 From de94ad5ed1e5825596568c8892692888a4b5ab0a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 8 Dec 2017 09:08:52 +0100 Subject: [PATCH 326/671] Update snapshot --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 29cc2f7..ed8255a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -32bec6d7e6202d8c33ce7c372c539ab8 vlc-3.0.0-20171122-0234-git.tar.xz +a50a2e61fb12fa9960d2816198e4ad25 vlc-3.0.0-20171208-0223-rc1.tar.xz diff --git a/vlc.spec b/vlc.spec index 01dff91..cd721d7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global vlc_date 20171122 -%global vlc_rc -%{?vlc_date}-0234-git +%global vlc_date 20171208 +%global vlc_rc -%{?vlc_date}-0233-rc1 %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,7 +39,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.42%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.43%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -554,6 +554,9 @@ fi || : %changelog +* Fri Dec 08 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.43.git20171208 +- Update to 20171208 + * Fri Dec 01 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.42.git20171122 - Rebuild for new protobuf version - Rebuild against new libmfx (rhbz#1471768) From dd8d9c3fbdc7370c8084b35b7040d890f065ae05 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 8 Dec 2017 09:12:19 +0100 Subject: [PATCH 327/671] update --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index cd721d7..c96bd57 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ %global vlc_date 20171208 -%global vlc_rc -%{?vlc_date}-0233-rc1 +%global vlc_rc -%{?vlc_date}-0223-rc1 %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else From 7029c105a5038b57a2612fa43df09ca0b67cefcd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 8 Dec 2017 09:42:11 +0100 Subject: [PATCH 328/671] Update to rc1 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c96bd57..5697e11 100644 --- a/vlc.spec +++ b/vlc.spec @@ -252,7 +252,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc:-git} +%setup -q -n %{name}-%{version}%{?vlc_rc:-rc1} %patch0 -p1 -b .wl %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From ea1fce48eeaa3df40559d46c0d7ed33f1da3946d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 16 Dec 2017 00:16:21 +0100 Subject: [PATCH 329/671] Update snapshot --- sources | 2 +- vlc.spec | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sources b/sources index ed8255a..0e6f807 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a50a2e61fb12fa9960d2816198e4ad25 vlc-3.0.0-20171208-0223-rc1.tar.xz +dc04590647f51b07027560efe19aecd4 vlc-3.0.0-20171215-0223-rc2.tar.xz diff --git a/vlc.spec b/vlc.spec index 5697e11..a0ddc56 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,6 @@ -%global vlc_date 20171208 -%global vlc_rc -%{?vlc_date}-0223-rc1 +%global vlc_date 20171215 +%global vlc_rc rc2 +%global vlc_tag -%{?vlc_date}-0223-%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -39,11 +40,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.0 -Release: 0.43%{?vlc_date:.git%{vlc_date}}%{?dist} +Release: 0.44%{?vlc_date:.git%{vlc_date}}%{?vlc_rc}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz +Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch @@ -128,9 +129,6 @@ BuildRequires: lirc-devel BuildRequires: kernel-headers BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) -%if 0%{?fedora} < 24 -BuildRequires: libmusicbrainz-devel -%endif BuildRequires: libsamplerate-devel BuildRequires: libshout-devel BuildRequires: lua-devel @@ -252,7 +250,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc:-rc1} +%setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} %patch0 -p1 -b .wl %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -490,9 +488,6 @@ fi || : } %{!?_without_xcb: %exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%if 0%{?fedora} < 17 -%exclude %{_libdir}/vlc/plugins/control/libglobalhotkeys_plugin.so -%endif %exclude %{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so %exclude %{_libdir}/vlc/plugins/services_discovery/libxcb_apps_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so @@ -554,6 +549,9 @@ fi || : %changelog +* Fri Dec 15 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.44.git20171215 +- Update to 20171215 + * Fri Dec 08 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.43.git20171208 - Update to 20171208 From 816e5dd3ab760de265443bf9cd7cd812cff090c4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 16 Dec 2017 09:16:16 +0100 Subject: [PATCH 330/671] Update pre-version --- vlc.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vlc.spec b/vlc.spec index a0ddc56..9544ab2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,3 +1,4 @@ +%global vlc_vers 3.0.0 %global vlc_date 20171215 %global vlc_rc rc2 %global vlc_tag -%{?vlc_date}-0223-%{?vlc_rc} @@ -39,12 +40,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 3.0.0 -Release: 0.44%{?vlc_date:.git%{vlc_date}}%{?vlc_rc}%{?dist} +Version: %{vlc_vers}%{?vlc_rc:~%{vlc_rc}} +Release: 0.45%{?vlc_date:.git%{vlc_date}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org -Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch @@ -250,7 +251,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} +%setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} %patch0 -p1 -b .wl %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -265,11 +266,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %configure \ --disable-dependency-tracking \ --disable-optimizations \ -%if 0%{?fedora} >= 22 -%ifarch i686 - --disable-mmx --disable-sse \ -%endif -%endif --disable-silent-rules \ --with-pic \ --disable-rpath \ @@ -549,6 +545,10 @@ fi || : %changelog +* Sat Dec 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0~rc2-0.45.git20171215 +- Improve pre-version +- Re-enable i686 mmx/sse (autodetected) + * Fri Dec 15 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.44.git20171215 - Update to 20171215 From 1e461522cacdd8b49295759d5769c81c3f5e1ce2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 21 Dec 2017 17:32:33 +0100 Subject: [PATCH 331/671] Update snapshot --- vlc.spec | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9544ab2..550d39c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ %global vlc_vers 3.0.0 -%global vlc_date 20171215 +%global vlc_date 20171221 %global vlc_rc rc2 -%global vlc_tag -%{?vlc_date}-0223-%{?vlc_rc} +%global vlc_tag -%{?vlc_date}-0227-%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -40,8 +40,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: %{vlc_vers}%{?vlc_rc:~%{vlc_rc}} -Release: 0.45%{?vlc_date:.git%{vlc_date}}%{?dist} +Version: %{vlc_vers} +Release: 0.46%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -53,6 +53,8 @@ BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %{?_with_bootstrap: +BuildRequires: bison +BuildRequires: flex BuildRequires: gettext-devel BuildRequires: libtool } @@ -67,7 +69,6 @@ BuildRequires: pkgconfig(dbus-1) %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} -%{?_with_freerdp:BuildRequires: freerdp-devel} BuildRequires: fribidi-devel %{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 @@ -76,6 +77,10 @@ BuildRequires: hostname BuildRequires: jack-audio-connection-kit-devel BuildRequires: kde-filesystem BuildRequires: game-music-emu-devel +%ifarch %{arm} aarch64 +BuildRequires: pkgconfig(gstreamer-app-1.0) +BuildRequires: pkgconfig(gstreamer-video-1.0) +%endif BuildRequires: libavc1394-devel BuildRequires: libass-devel >= 0.9.7 %{?_with_bluray:BuildRequires: libbluray-devel >= 0.2.1} @@ -267,6 +272,10 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --disable-dependency-tracking \ --disable-optimizations \ --disable-silent-rules \ + --with-default-font=%{_fontbasedir}/dejavu/DejaVuSans.ttf \ + --with-default-font-family=DejaVuSans \ + --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ + --with-default-monospace-font-family=DejaVuSansMono \ --with-pic \ --disable-rpath \ --with-binary-version=%{version} \ @@ -330,18 +339,10 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool find %{buildroot} -name '*.la' -exec rm -f {} ';' find %{buildroot} -name '*.a' -exec rm -f {} ';' -desktop-file-install --vendor "" \ - --dir %{buildroot}%{_datadir}/applications \ - --delete-original \ - --mode 644 \ - %{buildroot}%{_datadir}/applications/vlc.desktop +desktop-file-validate %{buildroot}%{_datadir}/applications/vlc.desktop # Remove installed fonts for skins2 -rm -f %{buildroot}%{_datadir}/vlc/skins2/fonts/*.ttf -ln -sf ../../../fonts/dejavu/DejaVuSans.ttf \ - %{buildroot}%{_datadir}/vlc/skins2/fonts/FreeSans.ttf -ln -sf ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ - %{buildroot}%{_datadir}/vlc/skins2/fonts/FreeSansBold.ttf +rm -f %{buildroot}%{_datadir}/vlc/skins2/fonts #Fix unowned directories rm -rf %{buildroot}%{_docdir}/vlc @@ -545,6 +546,12 @@ fi || : %changelog +* Thu Dec 21 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.46.git20171221.rc2 +- Update to 20171221 +- Drop pre-version +- Set defaults fonts +- Enable gstreamer on %%{arm} and aarch64 + * Sat Dec 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0~rc2-0.45.git20171215 - Improve pre-version - Re-enable i686 mmx/sse (autodetected) From 3c12d734f94e6554e881b92ec060683f710d96e2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 21 Dec 2017 18:15:40 +0100 Subject: [PATCH 332/671] Drop wayland patch --- sources | 2 +- vlc.spec | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 0e6f807..8ea8599 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc04590647f51b07027560efe19aecd4 vlc-3.0.0-20171215-0223-rc2.tar.xz +7c8b6f50ce1b529ab72545f7a818619e vlc-3.0.0-20171221-0227-rc2.tar.xz diff --git a/vlc.spec b/vlc.spec index 550d39c..9355fbb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -46,8 +46,6 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz -#https://trac.videolan.org/vlc/ticket/18383 -Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -257,7 +255,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} -%patch0 -p1 -b .wl %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -342,7 +339,7 @@ find %{buildroot} -name '*.a' -exec rm -f {} ';' desktop-file-validate %{buildroot}%{_datadir}/applications/vlc.desktop # Remove installed fonts for skins2 -rm -f %{buildroot}%{_datadir}/vlc/skins2/fonts +rm -rf %{buildroot}%{_datadir}/vlc/skins2/fonts #Fix unowned directories rm -rf %{buildroot}%{_docdir}/vlc @@ -422,7 +419,6 @@ fi || : %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{?_with_wayland: -%{_libdir}/vlc/plugins/access/libwl_screenshooter_plugin.so %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so @@ -497,7 +493,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so } %{?_with_wayland: -%exclude %{_libdir}/vlc/plugins/access/libwl_screenshooter_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so %exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so @@ -551,6 +546,7 @@ fi || : - Drop pre-version - Set defaults fonts - Enable gstreamer on %%{arm} and aarch64 +- Drop wayland patch * Sat Dec 16 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0~rc2-0.45.git20171215 - Improve pre-version From 63bfd6f208f7a08bca405a821e7304bceb4124b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sun, 31 Dec 2017 04:22:23 +0000 Subject: [PATCH 333/671] Mass rebuild for x264 and x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9355fbb..03b72ef 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.46%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.47%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -541,6 +541,9 @@ fi || : %changelog +* Sun Dec 31 2017 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.47.git20171221.rc2 +- Mass rebuild for x264 and x265 + * Thu Dec 21 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.46.git20171221.rc2 - Update to 20171221 - Drop pre-version From 505fda6e4ad52c46038b27bd37d6c68dd6768580 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 9 Jan 2018 10:05:30 +0100 Subject: [PATCH 334/671] Update snapshot --- sources | 2 +- vlc.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 8ea8599..9af5898 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c8b6f50ce1b529ab72545f7a818619e vlc-3.0.0-20171221-0227-rc2.tar.xz +f670c4f293c8abebc9cceb0f97ffd849 vlc-3.0.0-20180109-0224-rc5.tar.xz diff --git a/vlc.spec b/vlc.spec index 03b72ef..5f7178b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ %global vlc_vers 3.0.0 -%global vlc_date 20171221 -%global vlc_rc rc2 -%global vlc_tag -%{?vlc_date}-0227-%{?vlc_rc} +%global vlc_date 20180109 +%global vlc_rc rc5 +%global vlc_tag -%{?vlc_date}-0224-%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.47%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.48%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -541,6 +541,9 @@ fi || : %changelog +* Tue Jan 09 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.48.git20180109.rc5 +- Update to 20180109 -rc5 + * Sun Dec 31 2017 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.47.git20171221.rc2 - Mass rebuild for x264 and x265 From 7eaabe5a822103f470ef7c37b842642c04fc4cb8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Jan 2018 21:52:54 +0100 Subject: [PATCH 335/671] rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5f7178b..a3a1cd6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.48%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.49%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -541,6 +541,9 @@ fi || : %changelog +* Mon Jan 15 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.49.git20180109.rc5 +- Rebuilt for VA-API 1.0.0 + * Tue Jan 09 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.48.git20180109.rc5 - Update to 20180109 -rc5 From 52b375ee55d32ed4ea7fcb445c2a3a06a02eddd5 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 18 Jan 2018 00:06:01 +0000 Subject: [PATCH 336/671] Rebuilt for ffmpeg-3.5 git --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a3a1cd6..b8edc4c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.49%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.50%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -541,6 +541,9 @@ fi || : %changelog +* Thu Jan 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.50.git20180109.rc5 +- Rebuilt for ffmpeg-3.5 git + * Mon Jan 15 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.49.git20180109.rc5 - Rebuilt for VA-API 1.0.0 From 3953598760d75aea9a80571be1d5b68f74279117 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 27 Jan 2018 11:33:30 +0000 Subject: [PATCH 337/671] Update to 20180127 -rc8 --- sources | 2 +- vlc.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 9af5898..870d601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f670c4f293c8abebc9cceb0f97ffd849 vlc-3.0.0-20180109-0224-rc5.tar.xz +dd0442421202d8289bed960ef14b91ec vlc-3.0.0-20180127-0224-rc8.tar.xz diff --git a/vlc.spec b/vlc.spec index b8edc4c..dd0592c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ %global vlc_vers 3.0.0 -%global vlc_date 20180109 -%global vlc_rc rc5 +%global vlc_date 20180127 +%global vlc_rc rc8 %global vlc_tag -%{?vlc_date}-0224-%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.50%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.51%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -541,6 +541,10 @@ fi || : %changelog +* Sat Jan 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.51.git20180127.rc8 +- Update to 20180127 -rc8 +- Rebuild for new libcdio and libvpx + * Thu Jan 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.50.git20180109.rc5 - Rebuilt for ffmpeg-3.5 git From 40666333d50fba0a50ecf5970fd1c4fa114f60a4 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 27 Jan 2018 11:57:38 +0000 Subject: [PATCH 338/671] fix build, lua moved to libdir --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index dd0592c..2e3b8a1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -462,6 +462,7 @@ fi || : %{_bindir}/vlc-wrapper %exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ +%{_libdir}/vlc/lua/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so %{?_with_gnomevfs: From 9558ce12a1c0371e1518028d8a0eaa9698102322 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Feb 2018 11:51:20 +0100 Subject: [PATCH 339/671] Update to rc9 --- sources | 2 +- vlc.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 870d601..828dc72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dd0442421202d8289bed960ef14b91ec vlc-3.0.0-20180127-0224-rc8.tar.xz +8d3e779564f2381341c1eb14cb6133f6 vlc-3.0.0-20180202-0233-rc9.tar.xz diff --git a/vlc.spec b/vlc.spec index 2e3b8a1..35bccac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ %global vlc_vers 3.0.0 -%global vlc_date 20180127 -%global vlc_rc rc8 -%global vlc_tag -%{?vlc_date}-0224-%{?vlc_rc} +%global vlc_date 20180202 +%global vlc_rc rc9 +%global vlc_tag -%{?vlc_date}-0233-%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -41,7 +41,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.51%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.52%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -542,6 +542,9 @@ fi || : %changelog +* Fri Feb 02 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.52.git20180202.rc9 +- Update to rc9 + * Sat Jan 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-0.51.git20180127.rc8 - Update to 20180127 -rc8 - Rebuild for new libcdio and libvpx From b0cd75ca2f20bcabf26bb59aa515811f09a99473 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Feb 2018 12:24:51 +0100 Subject: [PATCH 340/671] Workaround opencv failure --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 35bccac..8996b01 100644 --- a/vlc.spec +++ b/vlc.spec @@ -139,7 +139,9 @@ BuildRequires: lua-devel BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel +%if 0%{?fedora} && 0%{?fedora} < 28 %{?_with_opencv:BuildRequires: pkgconfig(opencv)} +%endif BuildRequires: openslp-devel Buildrequires: opus-devel BuildRequires: pcre-devel From 967f8a8b877c64e57b9964d42639160fa3e63f9f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Feb 2018 12:37:15 +0100 Subject: [PATCH 341/671] Revert "Workaround opencv failure" This reverts commit b0cd75ca2f20bcabf26bb59aa515811f09a99473. --- vlc.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 8996b01..35bccac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -139,9 +139,7 @@ BuildRequires: lua-devel BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} BuildRequires: ncurses-devel -%if 0%{?fedora} && 0%{?fedora} < 28 %{?_with_opencv:BuildRequires: pkgconfig(opencv)} -%endif BuildRequires: openslp-devel Buildrequires: opus-devel BuildRequires: pcre-devel From 9a5f0737fc220e7091a32b277a19d6879dc243ce Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 2 Feb 2018 12:37:55 +0100 Subject: [PATCH 342/671] Better workaround --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 35bccac..7e15949 100644 --- a/vlc.spec +++ b/vlc.spec @@ -25,7 +25,9 @@ %global _with_vaapi 1 %endif %global _with_bluray 1 +%if 0%{?fedora} && 0%{?fedora} < 28 %global _with_opencv 1 +%endif %global _with_fluidsynth 1 %if 0%{?fedora} %global _with_freerdp 1 From 95bbfb9b46eb268d878ccdb23ff54583452cfa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sun, 4 Feb 2018 16:56:24 +0000 Subject: [PATCH 343/671] Rebuild (live555-2018.01.29) --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7e15949..a985f45 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.52%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 0.53%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -544,6 +544,9 @@ fi || : %changelog +* Sun Feb 04 2018 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.53.git20180202.rc9 +- Rebuild (live555-2018.01.29) + * Fri Feb 02 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-0.52.git20180202.rc9 - Update to rc9 From 0d6a7d36a62b5ccc0cf0172b5fd2bee1d59dff57 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 8 Feb 2018 23:06:04 +0100 Subject: [PATCH 344/671] Minor updates --- vlc.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index a985f45..ca57768 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,6 +51,7 @@ Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz BuildRequires: desktop-file-utils BuildRequires: libappstream-glib +BuildRequires: fontpackages-devel %{?_with_bootstrap: BuildRequires: bison @@ -70,7 +71,6 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} BuildRequires: fribidi-devel -%{?_with_gnomevfs:BuildRequires: gnome-vfs2-devel} BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: hostname @@ -186,6 +186,12 @@ BuildRequires: pkgconfig(xcb-keysyms) } BuildRequires: xorg-x11-proto-devel +%ifarch armv7hl +%{?_with_rpi: +BuildRequires: raspberrypi-vc-devel +} +%endif + %{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} @@ -283,14 +289,12 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_live555:--enable-live555} \ %{?_with_opencv:--enable-opencv} \ --enable-sftp \ -%{?_with_gnomevfs:--enable-gnomevfs} \ %{?_with_vcdimager:--enable-vcdx} \ --enable-omxil \ --enable-omxil-vout \ %{?_with_rpi: --enable-rpi-omxil \ - --enable-mmal-codec \ - --enable-mmal-vout \ + --enable-mmal \ } \ %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ From 65ce92654aae0b0dd2b86d6eb4bd8cc5d2f9f354 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 9 Feb 2018 13:22:43 +0000 Subject: [PATCH 345/671] Update to 3.0.0 release --- ...don-t-call-directly-config_GetLibDir.patch | 38 ---- ...rt-qt-add-Wayland-run-time-detection.patch | 191 ------------------ 0001-qt-Prefer-XCB-over-Wayland.patch | 43 ---- disable_hidpi_scaling.patch | 14 -- sources | 2 +- vlc.spec | 13 +- 6 files changed, 8 insertions(+), 293 deletions(-) delete mode 100644 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch delete mode 100644 0001-Revert-qt-add-Wayland-run-time-detection.patch delete mode 100644 0001-qt-Prefer-XCB-over-Wayland.patch delete mode 100644 disable_hidpi_scaling.patch diff --git a/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch b/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch deleted file mode 100644 index fa98769..0000000 --- a/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 9bec043da70def3adf0a69747ebe3601f1886fe1 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Mon, 31 Jul 2017 10:42:39 +0200 -Subject: [PATCH] Revert "lua: don't call directly config_GetLibDir" - -libdir and datadir are different kind of directories on Linux. -So they are unrelated - -This reverts commit d5ac6c4ce3d9f50b7bf9e9325b8c9f93b376c574. ---- - modules/lua/vlc.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c -index 512d9e505c..57dc7d8e49 100644 ---- a/modules/lua/vlc.c -+++ b/modules/lua/vlc.c -@@ -214,6 +214,17 @@ int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list ) - i++; - free( datadir ); - -+#if !(defined(__APPLE__) || defined(_WIN32)) -+ char *psz_libpath = config_GetLibDir(); -+ if( likely(psz_libpath != NULL) ) -+ { -+ if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s", -+ psz_libpath, luadirname ) != -1) ) -+ i++; -+ free( psz_libpath ); -+ } -+#endif -+ - char *psz_datapath = config_GetDataDir(); - if( likely(psz_datapath != NULL) ) - { --- -2.13.3 - diff --git a/0001-Revert-qt-add-Wayland-run-time-detection.patch b/0001-Revert-qt-add-Wayland-run-time-detection.patch deleted file mode 100644 index 20ce795..0000000 --- a/0001-Revert-qt-add-Wayland-run-time-detection.patch +++ /dev/null @@ -1,191 +0,0 @@ -From 82e73a6fa15cb7cf62decdd8ba44df4d1685301d Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Mon, 16 Jan 2017 12:03:14 +0100 -Subject: [PATCH] Revert "qt: add Wayland run-time detection" - -This reverts commit 785b0f18d70815288c8a673bcd0f3849af7ef6f7. ---- - modules/gui/qt/Makefile.am | 4 -- - modules/gui/qt/qt.cpp | 104 +++++++++++++-------------------------------- - 2 files changed, 29 insertions(+), 79 deletions(-) - -diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am -index 7e5f5ae..16e3596 100644 ---- a/modules/gui/qt/Makefile.am -+++ b/modules/gui/qt/Makefile.am -@@ -24,10 +24,6 @@ if HAVE_QT5_X11 - libqt_plugin_la_CXXFLAGS += $(QT5_X11_CFLAGS) -DQT5_HAS_X11 - libqt_plugin_la_LIBADD += $(QT5_X11_LIBS) $(X_LIBS) $(X_PRE_LIB) -lX11 - endif --if HAVE_WAYLAND --libqt_plugin_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) -DQT5_HAS_WAYLAND --libqt_plugin_la_LIBADD += $(WAYLAND_CLIENT_LIBS) --endif - if HAVE_WIN32 - libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid - endif -diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp -index 6015b2a..0229f6e 100644 ---- a/modules/gui/qt/qt.cpp -+++ b/modules/gui/qt/qt.cpp -@@ -48,6 +48,10 @@ - #include "util/qvlcapp.hpp" /* QVLCApplication definition */ - #include "components/playlist/playlist_model.hpp" /* for ~PLModel() */ - -+#if defined (QT5_HAS_X11) || defined (Q_WS_X11) -+ #include <vlc_xlib.h> -+#endif -+ - #include <vlc_plugin.h> - #include <vlc_vout_window.h> - -@@ -75,6 +79,7 @@ static int Open ( vlc_object_t *, bool ); - static void Close ( vlc_object_t * ); - static int WindowOpen ( vout_window_t *, const vout_window_cfg_t * ); - static void WindowClose ( vout_window_t * ); -+static void *Thread ( void * ); - static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); - - /***************************************************************************** -@@ -332,13 +337,6 @@ static bool active = false; - * Module callbacks - *****************************************************************************/ - --static void *ThreadPlatform( void *, char * ); -- --static void *Thread( void *data ) --{ -- return ThreadPlatform( data, NULL ); --} -- - #ifdef Q_OS_MAC - /* Used to abort the app.exec() on OSX after libvlc_Quit is called */ - #include "../../../lib/libvlc_internal.h" /* libvlc_SetExitHandler */ -@@ -348,67 +346,22 @@ static void Abort( void *obj ) - } - #endif - --#if defined (QT5_HAS_X11) --# include <vlc_xlib.h> -- --static void *ThreadXCB( void *data ) --{ -- char platform_name[] = "xcb"; -- return ThreadPlatform( data, platform_name ); --} -- --static bool HasX11( vlc_object_t *obj ) --{ -- if( !vlc_xlib_init( obj ) ) -- return false; -- -- Display *dpy = XOpenDisplay( NULL ); -- if( dpy == NULL ) -- return false; -- -- XCloseDisplay( dpy ); -- return true; --} --#endif -- --#ifdef QT5_HAS_WAYLAND --# include <wayland-client.h> -- --static void *ThreadWayland( void *data ) --{ -- char platform_name[] = "wayland"; -- return ThreadPlatform( data, platform_name ); --} -- --static bool HasWayland( void ) --{ -- struct wl_display *dpy = wl_display_connect( NULL ); -- if( dpy == NULL ) -- return false; -- -- wl_display_disconnect( dpy ); -- return true; --} --#endif -- - /* Open Interface */ - static int Open( vlc_object_t *p_this, bool isDialogProvider ) - { - intf_thread_t *p_intf = (intf_thread_t *)p_this; -- void *(*thread)(void *) = Thread; - --#ifdef QT5_HAS_WAYLAND -- if( HasWayland() ) -- thread = ThreadWayland; -- else --#endif --#ifdef QT5_HAS_X11 -- if( HasX11( p_this ) ) -- thread = ThreadXCB; -- else --#endif --#if defined (QT5_HAS_X11) || defined (QT5_HAS_WAYLAND) -+#if defined (QT5_HAS_X11) || defined (Q_WS_X11) -+ if( !vlc_xlib_init( p_this ) ) -+ return VLC_EGENERIC; -+ -+ Display *p_display = XOpenDisplay( NULL ); -+ if( !p_display ) -+ { -+ msg_Err( p_intf, "Could not connect to X server" ); - return VLC_EGENERIC; -+ } -+ XCloseDisplay( p_display ); - #endif - - QMutexLocker locker (&lock); -@@ -435,9 +388,9 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) - #ifdef Q_OS_MAC - /* Run mainloop on the main thread as Cocoa requires */ - libvlc_SetExitHandler( p_intf->obj.libvlc, Abort, p_intf ); -- thread( (void *)p_intf ); -+ Thread( (void *)p_intf ); - #else -- if( vlc_clone( &p_sys->thread, thread, p_intf, VLC_THREAD_PRIORITY_LOW ) ) -+ if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) ) - { - delete p_sys; - return VLC_ENOMEM; -@@ -493,22 +446,23 @@ static void Close( vlc_object_t *p_this ) - busy = false; - } - --static void *ThreadPlatform( void *obj, char *platform_name ) -+static void *Thread( void *obj ) - { - intf_thread_t *p_intf = (intf_thread_t *)obj; - intf_sys_t *p_sys = p_intf->p_sys; - char vlc_name[] = "vlc"; /* for WM_CLASS */ -+#ifdef QT5_HAS_X11 - char platform_parm[] = "-platform"; -- char *argv[4]; -- int argc = 0; -- -- argv[argc++] = vlc_name; -- if( platform_name != NULL ) -- { -- argv[argc++] = platform_parm; -- argv[argc++] = platform_name; -- } -- argv[argc] = NULL; -+ char platform_value[] = "xcb"; -+#endif -+ char *argv[] = { -+ vlc_name, -+#ifdef QT5_HAS_X11 -+ platform_parm, platform_value, -+#endif -+ NULL, -+ }; -+ int argc = sizeof(argv) / sizeof(argv[0]) - 1; - - Q_INIT_RESOURCE( vlc ); - --- -2.7.4 - diff --git a/0001-qt-Prefer-XCB-over-Wayland.patch b/0001-qt-Prefer-XCB-over-Wayland.patch deleted file mode 100644 index 71872c0..0000000 --- a/0001-qt-Prefer-XCB-over-Wayland.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 781dee40c6f32941207322561ebab7166a90569c Mon Sep 17 00:00:00 2001 -From: Martin Briza <mbriza@redhat.com> -Date: Fri, 23 Jun 2017 16:30:09 +0200 -Subject: [PATCH] qt: Prefer XCB over Wayland - -Wayland users now have no choice (except setting WAYLAND_DISPLAY to '') how to avoid getting VLC under Wayland which may not be optimal yet. - -This patch ensures the XCB backend is preferred. This means the developers who want to work on Wayland support will have to clear their DISPLAY variable instead. - -Related to https://trac.videolan.org/vlc/ticket/18383 . ---- - modules/gui/qt/qt.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp -index 2ad68eb401..3224361ecb 100644 ---- a/modules/gui/qt/qt.cpp -+++ b/modules/gui/qt/qt.cpp -@@ -411,16 +411,16 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) - intf_thread_t *p_intf = (intf_thread_t *)p_this; - void *(*thread)(void *) = Thread; - --#ifdef QT5_HAS_WAYLAND -- if( HasWayland() ) -- thread = ThreadWayland; -- else --#endif - #ifdef QT5_HAS_X11 - if( HasX11( p_this ) ) - thread = ThreadXCB; - else - #endif -+#ifdef QT5_HAS_WAYLAND -+ if( HasWayland() ) -+ thread = ThreadWayland; -+ else -+#endif - #if defined (QT5_HAS_X11) || defined (QT5_HAS_WAYLAND) - return VLC_EGENERIC; - #endif --- -2.13.0 - diff --git a/disable_hidpi_scaling.patch b/disable_hidpi_scaling.patch deleted file mode 100644 index 116edb5..0000000 --- a/disable_hidpi_scaling.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/modules/gui/qt/qt.cpp 2016-11-18 02:24:10.000000000 +0000 -+++ b/modules/gui/qt/qt.cpp 2016-11-22 14:28:23.503056877 +0000 -@@ -478,9 +478,10 @@ static void *Thread( void *obj ) - - Q_INIT_RESOURCE( vlc ); - -+ /* Disable scaling as it's broken - #if HAS_QT56 - QApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); --#endif -+#endif */ - - /* Start the QApplication here */ - QVLCApp app( argc, argv ); diff --git a/sources b/sources index 828dc72..60c16f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8d3e779564f2381341c1eb14cb6133f6 vlc-3.0.0-20180202-0233-rc9.tar.xz +a953d8b90e56f06828c4ca8e390c5c9b vlc-3.0.0.tar.xz diff --git a/vlc.spec b/vlc.spec index ca57768..2c261cc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ %global vlc_vers 3.0.0 -%global vlc_date 20180202 -%global vlc_rc rc9 -%global vlc_tag -%{?vlc_date}-0233-%{?vlc_rc} +#global vlc_date 20180202 +#global vlc_rc rc9 +#global vlc_tag -%%{?vlc_date}-0233-%%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 0.53%{?vlc_date:.git%{vlc_date}}%{?vlc_rc:.%{vlc_rc}}%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -271,8 +271,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %build - - %configure \ --disable-dependency-tracking \ --disable-optimizations \ @@ -548,6 +546,9 @@ fi || : %changelog +* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-1 +- Update to 3.0.0 release + * Sun Feb 04 2018 Sérgio Basto <sergio@serjux.com> - 3.0.0-0.53.git20180202.rc9 - Rebuild (live555-2018.01.29) From 58002093f529da4b4f5c7e286e768fdfedbbb79c Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sun, 18 Feb 2018 14:08:02 +0000 Subject: [PATCH 346/671] Enable microdns (rfbz#4793) --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2c261cc..8ecc155 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -148,6 +148,7 @@ BuildRequires: pcre-devel BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 +BuildRequires: pkgconfig(microdns) BuildRequires: pkgconfig(protobuf-lite) >= 2.5 BuildRequires: pkgconfig(Qt5Core) >= 5.5 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 @@ -546,6 +547,9 @@ fi || : %changelog +* Sun Feb 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-2 +- Enable microdns (rfbz#4793) + * Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-1 - Update to 3.0.0 release From 18729794b52498df2a90842af8ccb3d03cf3851c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 26 Feb 2018 23:08:08 +0100 Subject: [PATCH 347/671] Update for libplacebo --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8ecc155..d7d66ad 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -121,6 +121,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel +BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel @@ -547,6 +548,9 @@ fi || : %changelog +* Mon Feb 26 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-3 +- Add libplacebo support + * Sun Feb 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-2 - Enable microdns (rfbz#4793) From 394a600156ddda355d1dd754838319bda85487f0 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Tue, 27 Feb 2018 08:40:45 +0000 Subject: [PATCH 348/671] update for libplacebo v0.4.0 API changes --- ...deo_output_opengl_fragment_shaders.c.patch | 40 +++++++++++++++++++ vlc.spec | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 modules_video_output_opengl_fragment_shaders.c.patch diff --git a/modules_video_output_opengl_fragment_shaders.c.patch b/modules_video_output_opengl_fragment_shaders.c.patch new file mode 100644 index 0000000..6e0ffc6 --- /dev/null +++ b/modules_video_output_opengl_fragment_shaders.c.patch @@ -0,0 +1,40 @@ +X-Git-Url: https://git.videolan.org/?p=vlc%2Fvlc-3.0.git;a=blobdiff_plain;f=modules%2Fvideo_output%2Fopengl%2Ffragment_shaders.c;h=0c91a4db766314350178d5f566853a46f2a2188d;hp=f959d9a69c4f8493da9f7ec8ef10653586ae3ca9;hb=f33a7b19f0a55e70f1a6dd1fd3542cdec1d29ac6;hpb=674d5d6f4c04b3a099100b9869277362ca34e12d + +diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c +index f959d9a69c..0c91a4db76 100644 +--- a/modules/video_output/opengl/fragment_shaders.c ++++ b/modules/video_output/opengl/fragment_shaders.c +@@ -399,11 +399,18 @@ tc_base_prepare_shader(const opengl_tex_converter_t *tc, + continue; + + struct pl_shader_var sv = res->variables[i]; ++#if PL_API_VER >= 4 ++ struct pl_var var = sv.var; ++ // libplacebo doesn't need anything else anyway ++ if (var.type != PL_VAR_FLOAT) ++ continue; ++#else + struct ra_var var = sv.var; +- + // libplacebo doesn't need anything else anyway + if (var.type != RA_VAR_FLOAT) + continue; ++#endif ++ + if (var.dim_m > 1 && var.dim_m != var.dim_v) + continue; + +@@ -657,7 +664,12 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, + tc->uloc.pl_vars = calloc(res->num_variables, sizeof(GLint)); + for (int i = 0; i < res->num_variables; i++) { + struct pl_shader_var sv = res->variables[i]; +- ADDF("uniform %s %s;\n", ra_var_glsl_type_name(sv.var), sv.var.name); ++#if PL_API_VER >= 4 ++ const char *glsl_type_name = pl_var_glsl_type_name(sv.var); ++#else ++ const char *glsl_type_name = ra_var_glsl_type_name(sv.var); ++#endif ++ ADDF("uniform %s %s;\n", glsl_type_name, sv.var.name); + } + + // We can't handle these yet, but nothing we use requires them, either diff --git a/vlc.spec b/vlc.spec index d7d66ad..400e8b0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -48,6 +48,9 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz +# opengl: update for libplacebo v0.4.0 API changes +# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=f33a7b19f0a55e70f1a6dd1fd3542cdec1d29ac6 +Patch0: modules_video_output_opengl_fragment_shaders.c.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -265,6 +268,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} +%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From 473cfc94931724b95c78706e0fdf8150b10ec58c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Feb 2018 18:59:56 +0100 Subject: [PATCH 349/671] Revert "update for libplacebo v0.4.0 API changes" This reverts commit 394a600156ddda355d1dd754838319bda85487f0. --- ...deo_output_opengl_fragment_shaders.c.patch | 40 ------------------- vlc.spec | 4 -- 2 files changed, 44 deletions(-) delete mode 100644 modules_video_output_opengl_fragment_shaders.c.patch diff --git a/modules_video_output_opengl_fragment_shaders.c.patch b/modules_video_output_opengl_fragment_shaders.c.patch deleted file mode 100644 index 6e0ffc6..0000000 --- a/modules_video_output_opengl_fragment_shaders.c.patch +++ /dev/null @@ -1,40 +0,0 @@ -X-Git-Url: https://git.videolan.org/?p=vlc%2Fvlc-3.0.git;a=blobdiff_plain;f=modules%2Fvideo_output%2Fopengl%2Ffragment_shaders.c;h=0c91a4db766314350178d5f566853a46f2a2188d;hp=f959d9a69c4f8493da9f7ec8ef10653586ae3ca9;hb=f33a7b19f0a55e70f1a6dd1fd3542cdec1d29ac6;hpb=674d5d6f4c04b3a099100b9869277362ca34e12d - -diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c -index f959d9a69c..0c91a4db76 100644 ---- a/modules/video_output/opengl/fragment_shaders.c -+++ b/modules/video_output/opengl/fragment_shaders.c -@@ -399,11 +399,18 @@ tc_base_prepare_shader(const opengl_tex_converter_t *tc, - continue; - - struct pl_shader_var sv = res->variables[i]; -+#if PL_API_VER >= 4 -+ struct pl_var var = sv.var; -+ // libplacebo doesn't need anything else anyway -+ if (var.type != PL_VAR_FLOAT) -+ continue; -+#else - struct ra_var var = sv.var; -- - // libplacebo doesn't need anything else anyway - if (var.type != RA_VAR_FLOAT) - continue; -+#endif -+ - if (var.dim_m > 1 && var.dim_m != var.dim_v) - continue; - -@@ -657,7 +664,12 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, - tc->uloc.pl_vars = calloc(res->num_variables, sizeof(GLint)); - for (int i = 0; i < res->num_variables; i++) { - struct pl_shader_var sv = res->variables[i]; -- ADDF("uniform %s %s;\n", ra_var_glsl_type_name(sv.var), sv.var.name); -+#if PL_API_VER >= 4 -+ const char *glsl_type_name = pl_var_glsl_type_name(sv.var); -+#else -+ const char *glsl_type_name = ra_var_glsl_type_name(sv.var); -+#endif -+ ADDF("uniform %s %s;\n", glsl_type_name, sv.var.name); - } - - // We can't handle these yet, but nothing we use requires them, either diff --git a/vlc.spec b/vlc.spec index 400e8b0..d7d66ad 100644 --- a/vlc.spec +++ b/vlc.spec @@ -48,9 +48,6 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz -# opengl: update for libplacebo v0.4.0 API changes -# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=f33a7b19f0a55e70f1a6dd1fd3542cdec1d29ac6 -Patch0: modules_video_output_opengl_fragment_shaders.c.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -268,7 +265,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} -%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap From 210c68c930dfc3d6c8c67486cc96b20639875715 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Feb 2018 19:07:29 +0100 Subject: [PATCH 350/671] Update to 3.0.1 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 60c16f7..69626ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a953d8b90e56f06828c4ca8e390c5c9b vlc-3.0.0.tar.xz +32292f9fc6eab0b00432cdd574fc9eae vlc-3.0.1.tar.xz diff --git a/vlc.spec b/vlc.spec index d7d66ad..233572f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_vers 3.0.0 +%global vlc_vers 3.0.1 #global vlc_date 20180202 #global vlc_rc rc9 #global vlc_tag -%%{?vlc_date}-0233-%%{?vlc_rc} @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 3%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -548,6 +548,9 @@ fi || : %changelog +* Tue Feb 27 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-1 +- Update to 3.0.1 + * Mon Feb 26 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.0-3 - Add libplacebo support From 32a338eec2debaca9607505496edaf50d9118aeb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Feb 2018 19:47:31 +0100 Subject: [PATCH 351/671] Add missing file --- .gitignore | 1 + sources | 1 + vlc.spec | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 6d32910..08ea01d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vlc-*.tar.xz +/asm.S diff --git a/sources b/sources index 69626ea..32b1dd7 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +09a713c9aba8dac5ccb5a982c62ed811 asm.S 32292f9fc6eab0b00432cdd574fc9eae vlc-3.0.1.tar.xz diff --git a/vlc.spec b/vlc.spec index 233572f..88f4275 100644 --- a/vlc.spec +++ b/vlc.spec @@ -48,6 +48,8 @@ License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz +# Missing file from tarball +Source1: asm.S BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -270,6 +272,8 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap } +install -pm 0644 %{SOURCE1} modules/arm_neon + %build From a71e0a6f2d6875bbb3beec2c96b55a3f9ad4acf9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 28 Feb 2018 19:43:52 +0100 Subject: [PATCH 352/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 88f4275..c064d9f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -552,6 +552,9 @@ fi || : %changelog +* Wed Feb 28 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-2 +- Rebuilt for x265 + * Tue Feb 27 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-1 - Update to 3.0.1 From 619bcc46958c54dac484166426a63e43c0e485b1 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 8 Mar 2018 19:59:39 +0000 Subject: [PATCH 353/671] - Rebuilt for new ffmpeg snapshot Signed-off-by: leigh123linux <leigh123linux@googlemail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c064d9f..e7229c4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -552,6 +552,9 @@ fi || : %changelog +* Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 3.0.1-3 +- Rebuilt for new ffmpeg snapshot + * Wed Feb 28 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-2 - Rebuilt for x265 From 80ff95329128685a1ba044fd13fbabf575966dee Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 8 Mar 2018 20:55:27 +0000 Subject: [PATCH 354/671] Patch for fribidi version 1.0 --- ...text_renderer_freetype_text_layout.c.patch | 69 +++++++++++++++++++ vlc.spec | 4 ++ 2 files changed, 73 insertions(+) create mode 100644 modules_text_renderer_freetype_text_layout.c.patch diff --git a/modules_text_renderer_freetype_text_layout.c.patch b/modules_text_renderer_freetype_text_layout.c.patch new file mode 100644 index 0000000..b6290a6 --- /dev/null +++ b/modules_text_renderer_freetype_text_layout.c.patch @@ -0,0 +1,69 @@ +X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=modules%2Ftext_renderer%2Ffreetype%2Ftext_layout.c;h=1a28786d097959e246b85913eef82f78013d4108;hp=13efd567b46a30bb159c974a4c12e603275cb1c8;hb=26e2d3906658c30f2f88f4b1bc9630ec43bf5525;hpb=f391a2a3b0410a4361ca0b93209b6e5ec79ff918 + +diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c +index 13efd567b4..1a28786d09 100644 +--- a/modules/text_renderer/freetype/text_layout.c ++++ b/modules/text_renderer/freetype/text_layout.c +@@ -153,6 +153,9 @@ typedef struct paragraph_t + + #ifdef HAVE_FRIBIDI + FriBidiCharType *p_types; ++#if FRIBIDI_MAJOR_VERSION >= 1 ++ FriBidiBracketType *p_btypes; ++#endif + FriBidiLevel *p_levels; + FriBidiStrIndex *pi_reordered_indices; + FriBidiParType paragraph_type; +@@ -361,6 +364,9 @@ static paragraph_t *NewParagraph( filter_t *p_filter, + #ifdef HAVE_FRIBIDI + p_paragraph->p_levels = vlc_alloc( i_size, sizeof( *p_paragraph->p_levels ) ); + p_paragraph->p_types = vlc_alloc( i_size, sizeof( *p_paragraph->p_types ) ); ++#if FRIBIDI_MAJOR_VERSION >= 1 ++ p_paragraph->p_btypes = vlc_alloc( i_size, sizeof( *p_paragraph->p_btypes ) ); ++#endif + p_paragraph->pi_reordered_indices = + vlc_alloc( i_size, sizeof( *p_paragraph->pi_reordered_indices ) ); + +@@ -398,6 +404,9 @@ error: + #ifdef HAVE_FRIBIDI + if( p_paragraph->p_levels ) free( p_paragraph->p_levels ); + if( p_paragraph->p_types ) free( p_paragraph->p_types ); ++#if FRIBIDI_MAJOR_VERSION >= 1 ++ if( p_paragraph->p_btypes ) free( p_paragraph->p_btypes ); ++#endif + if( p_paragraph->pi_reordered_indices ) + free( p_paragraph->pi_reordered_indices ); + #endif +@@ -424,6 +433,9 @@ static void FreeParagraph( paragraph_t *p_paragraph ) + #ifdef HAVE_FRIBIDI + free( p_paragraph->pi_reordered_indices ); + free( p_paragraph->p_types ); ++#if FRIBIDI_MAJOR_VERSION >= 1 ++ free( p_paragraph->p_btypes ); ++#endif + free( p_paragraph->p_levels ); + #endif + +@@ -436,10 +448,22 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph ) + fribidi_get_bidi_types( p_paragraph->p_code_points, + p_paragraph->i_size, + p_paragraph->p_types ); ++#if FRIBIDI_MAJOR_VERSION >= 1 ++ fribidi_get_bracket_types( p_paragraph->p_code_points, ++ p_paragraph->i_size, ++ p_paragraph->p_types, ++ p_paragraph->p_btypes ); ++ fribidi_get_par_embedding_levels_ex( p_paragraph->p_types, ++ p_paragraph->p_btypes, ++ p_paragraph->i_size, ++ &p_paragraph->paragraph_type, ++ p_paragraph->p_levels ); ++#else + fribidi_get_par_embedding_levels( p_paragraph->p_types, + p_paragraph->i_size, + &p_paragraph->paragraph_type, + p_paragraph->p_levels ); ++#endif + + #ifdef HAVE_HARFBUZZ + hb_unicode_funcs_t *p_funcs = hb_unicode_funcs_get_default(); diff --git a/vlc.spec b/vlc.spec index e7229c4..9d9c788 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,6 +50,8 @@ URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz # Missing file from tarball Source1: asm.S +# https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525 +Patch0: modules_text_renderer_freetype_text_layout.c.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -267,6 +269,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} +%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -554,6 +557,7 @@ fi || : %changelog * Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 3.0.1-3 - Rebuilt for new ffmpeg snapshot +- Patch for fribidi version 1.0 * Wed Feb 28 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-2 - Rebuilt for x265 From a5e56c2f83729f62679bb0ed5e4b97764417810b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 10 Mar 2018 14:59:09 +0100 Subject: [PATCH 355/671] Fix url --- vlc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9d9c788..1c878b1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -45,8 +45,7 @@ Name: vlc Version: %{vlc_vers} Release: 3%{?dist} License: GPLv2+ -Group: Applications/Multimedia -URL: http://www.videolan.org +URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz # Missing file from tarball Source1: asm.S From 156b471bb9694e7b0081ef98aa4e61a1b10a7b96 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 17 Mar 2018 16:16:00 +0100 Subject: [PATCH 356/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1c878b1..b6116a5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: %{vlc_vers} -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz @@ -554,6 +554,9 @@ fi || : %changelog +* Sat Mar 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-4 +- Rebuilt for live555 + * Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 3.0.1-3 - Rebuilt for new ffmpeg snapshot - Patch for fribidi version 1.0 From efef6f5df904bf6bbb1aebdf671c465f98c2e989 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Mar 2018 16:52:20 +0100 Subject: [PATCH 357/671] Update version field --- vlc.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index b6116a5..c950f9a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,3 @@ -%global vlc_vers 3.0.1 #global vlc_date 20180202 #global vlc_rc rc9 #global vlc_tag -%%{?vlc_date}-0233-%%{?vlc_rc} @@ -42,11 +41,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: %{vlc_vers} -Release: 4%{?dist} +Version: 3.0.1 +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org -Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz +Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz # Missing file from tarball Source1: asm.S # https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525 @@ -158,6 +157,7 @@ BuildRequires: pkgconfig(Qt5Core) >= 5.5 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 BuildRequires: pkgconfig(Qt5Svg) >= 5.5 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 +BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) >= 1.0.5 %{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 @@ -554,6 +554,10 @@ fi || : %changelog +* Fri Mar 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-5 +- Rework version tag +- Add soxr + * Sat Mar 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-4 - Rebuilt for live555 From febeeb0ccd7dfbbe93f07e9e6a2d92bcf4dbd02e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Mar 2018 17:00:39 +0100 Subject: [PATCH 358/671] Fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c950f9a..3c24cd1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -267,7 +267,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}} +%setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} %patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From b2dbd2ee77e4af51f9a964f321c5e9b984bac521 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Mar 2018 17:03:06 +0100 Subject: [PATCH 359/671] Add ldconfig_scriptlets --- vlc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 3c24cd1..7be66a6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -370,6 +370,10 @@ rm -rf %{buildroot}/%{_datadir}/macosx %find_lang %{name} +%ldconfig_scriptlets +%ldconfig_scriptlets core +%ldconfig_scriptlets extras + %post if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null @@ -381,8 +385,6 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null || : -%post core -p /sbin/ldconfig - %postun %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null @@ -391,8 +393,6 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi || : -%postun core -p /sbin/ldconfig - %posttrans core %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : From 8a1931331f76d5c6cbf8fdbaae5d10685b9c1865 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Mar 2018 17:03:33 +0100 Subject: [PATCH 360/671] Update changelog --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 7be66a6..74b65b3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -557,6 +557,7 @@ fi || : * Fri Mar 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-5 - Rework version tag - Add soxr +- Add ldconfig_scriptlets * Sat Mar 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-4 - Rebuilt for live555 From 9b9a7dc30fb65a861c4b6880b07e99ade8809d45 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Mar 2018 17:29:24 +0100 Subject: [PATCH 361/671] fixup ldconfig call --- vlc.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 74b65b3..f83838f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -370,11 +370,10 @@ rm -rf %{buildroot}/%{_datadir}/macosx %find_lang %{name} -%ldconfig_scriptlets %ldconfig_scriptlets core -%ldconfig_scriptlets extras %post +%ldconfig if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null fi || : @@ -386,6 +385,7 @@ fi %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null || : %postun +%ldconfig %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null %{_bindir}/touch --no-create %{_datadir}/icons/hicolor @@ -397,11 +397,13 @@ fi || : %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : %post extras +%ldconfig if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %postun extras +%ldconfig if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi From c12b53e0f40043cfcd5a2d4c37ba7de0630aaf60 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Apr 2018 08:22:20 +0200 Subject: [PATCH 362/671] Rebuilt for libupnp --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f83838f..f2b7334 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -556,6 +556,9 @@ fi || : %changelog +* Tue Apr 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-6 +- Rebuilt for libupnp + * Fri Mar 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-5 - Rework version tag - Add soxr From 49631e85fcf4e8a7f75177f6a5c97e234535b5bd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 23 Apr 2018 19:45:02 +0200 Subject: [PATCH 363/671] Update to 3.0.2 --- sources | 3 +-- vlc.spec | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 32b1dd7..0410d35 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -09a713c9aba8dac5ccb5a982c62ed811 asm.S -32292f9fc6eab0b00432cdd574fc9eae vlc-3.0.1.tar.xz +bdca57018d772fd270b4243eab46f978 vlc-3.0.2.tar.xz diff --git a/vlc.spec b/vlc.spec index f2b7334..1e114f6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,13 +41,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 3.0.1 -Release: 6%{?dist} +Version: 3.0.2 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -# Missing file from tarball -Source1: asm.S # https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525 Patch0: modules_text_renderer_freetype_text_layout.c.patch @@ -268,7 +266,6 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} -%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -556,6 +553,9 @@ fi || : %changelog +* Mon Apr 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.2-1 +- Update to 3.0.2 + * Tue Apr 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.1-6 - Rebuilt for libupnp From c3d5f5e09a372b8aea5ea0513af033f0746684dc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 23 Apr 2018 20:04:22 +0200 Subject: [PATCH 364/671] Remove previous hack --- vlc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 1e114f6..1c03cd5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -271,9 +271,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap } -install -pm 0644 %{SOURCE1} modules/arm_neon - - %build %configure \ From 58e4532558dae7ab20799a16e412a57c2c34bfe3 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Tue, 24 Apr 2018 00:28:47 +0100 Subject: [PATCH 365/671] Readd lost patch --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1c03cd5..d3c11d4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -266,6 +266,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} +%patch0 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -550,6 +551,9 @@ fi || : %changelog +* Mon Apr 23 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.2-2 +- Readd lost patch + * Mon Apr 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.2-1 - Update to 3.0.2 From 75f8c6eada9cfe39c6d2aefad2dcd13e300d8073 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 14 May 2018 09:27:00 +0200 Subject: [PATCH 366/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d3c11d4..bc4c9f9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -551,6 +551,9 @@ fi || : %changelog +* Mon May 14 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.2-3 +- Rebuilt + * Mon Apr 23 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.2-2 - Readd lost patch From a3ddeb9ff9f2fee683d8774e3d3797d9094caca8 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Mon, 14 May 2018 09:55:24 +0100 Subject: [PATCH 367/671] Switch to proper devel name --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bc4c9f9..3004b98 100644 --- a/vlc.spec +++ b/vlc.spec @@ -140,7 +140,7 @@ BuildRequires: libsamplerate-devel BuildRequires: libshout-devel BuildRequires: lua-devel BuildRequires: minizip-devel -%{?_with_libmpeg2:BuildRequires: mpeg2dec-devel >= 0.3.2} +%{?_with_libmpeg2:BuildRequires: libmpeg2-devel >= 0.3.2} BuildRequires: ncurses-devel %{?_with_opencv:BuildRequires: pkgconfig(opencv)} BuildRequires: openslp-devel From 904d849b2a5c635b0c76e88afc1d112804aba4fa Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 21 May 2018 15:15:08 +0200 Subject: [PATCH 368/671] Add preliminary work for vlc-3.x in el7 --- vlc.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vlc.spec b/vlc.spec index 3004b98..19fdaf4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -195,6 +195,10 @@ BuildRequires: raspberrypi-vc-devel } %endif +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel +%endif + %{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} @@ -267,6 +271,11 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} %patch0 -p1 + +%if 0%{?rhel} == 7 +. /opt/rh/devtoolset-7/enable +%endif + %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -274,6 +283,10 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %build +%if 0%{?rhel} == 7 +. /opt/rh/devtoolset-7/enable +%endif + %configure \ --disable-dependency-tracking \ --disable-optimizations \ From 40b0378fa8c814da0196204997ce6d5ee7d73d33 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Mon, 28 May 2018 11:54:56 +0100 Subject: [PATCH 369/671] Update to 3.0.3 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 0410d35..d391171 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bdca57018d772fd270b4243eab46f978 vlc-3.0.2.tar.xz +cf01d4755c719fe1c8605ceb40d8f1d2 vlc-3.0.3.tar.xz diff --git a/vlc.spec b/vlc.spec index 19fdaf4..0979eda 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,8 +41,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 3.0.2 -Release: 3%{?dist} +Version: 3.0.3 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -564,6 +564,9 @@ fi || : %changelog +* Mon May 28 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-1 +- Update to 3.0.3 + * Mon May 14 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.2-3 - Rebuilt From 2abed9d689636563931bc485470996d140bf945d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 1 Jun 2018 22:21:09 +0200 Subject: [PATCH 370/671] Add missing libjpeg --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0979eda..f11bdc8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -121,6 +121,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel +BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) @@ -564,6 +565,9 @@ fi || : %changelog +* Fri Jun 01 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.3-2 +- Add missing libjpeg + * Mon May 28 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-1 - Update to 3.0.3 From 177501b2efefb071a35b3bc72b2c28ae2ebd99d0 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 2 Jun 2018 14:18:16 +0100 Subject: [PATCH 371/671] Fix build against Qt 5.11 --- buildfix_qt511.patch | 28 ++++++++++++++++++++++++++++ vlc.spec | 11 +++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 buildfix_qt511.patch diff --git a/buildfix_qt511.patch b/buildfix_qt511.patch new file mode 100644 index 0000000..ee84452 --- /dev/null +++ b/buildfix_qt511.patch @@ -0,0 +1,28 @@ +From 39b0590165501cdeb85595a19bf076d06bcc594c Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger <dimstar@opensuse.org> +Date: Thu, 17 May 2018 17:40:37 +0200 +Subject: [PATCH] qt: fix build against Qt 5.11 + +Qt 5.11 is in RC phase now, and some headers need to be explicitly +included in order to build successfully. + +Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> +--- + modules/gui/qt/components/simple_preferences.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp +index b48ea7b67f..7a9c2dbf28 100644 +--- a/modules/gui/qt/components/simple_preferences.cpp ++++ b/modules/gui/qt/components/simple_preferences.cpp +@@ -36,6 +36,7 @@ + #include <QString> + #include <QFont> + #include <QToolButton> ++#include <QButtonGroup> + #include <QSignalMapper> + #include <QVBoxLayout> + #include <QScrollArea> +-- +2.11.0 + diff --git a/vlc.spec b/vlc.spec index f11bdc8..a6ae4d7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,13 +42,14 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz # https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525 Patch0: modules_text_renderer_freetype_text_layout.c.patch - +# https://git.videolan.org/?p=vlc.git;a=commit;h=39b0590165501cdeb85595a19bf076d06bcc594c +Patch1: buildfix_qt511.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -270,8 +271,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} -%patch0 -p1 +%autosetup -p1 -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -565,6 +565,9 @@ fi || : %changelog +* Sat Jun 02 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-3 +- Fix build against Qt 5.11 + * Fri Jun 01 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.3-2 - Add missing libjpeg From d323b5e840eb8e3326f2041f7d4b6b2bfc7cd1e5 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 16 Jun 2018 14:13:36 +0100 Subject: [PATCH 372/671] Rebuild for new libass version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a6ae4d7..2dc63ed 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -565,6 +565,9 @@ fi || : %changelog +* Sat Jun 16 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-4 +- Rebuild for new libass version + * Sat Jun 02 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-3 - Fix build against Qt 5.11 From 6d9dbdab81d5d22ccd12ced931e4c2c3d4487f75 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 16 Jun 2018 16:09:31 +0100 Subject: [PATCH 373/671] Make libplacebo x86 only due to vulkan changes --- vlc.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlc.spec b/vlc.spec index 2dc63ed..8b9cf78 100644 --- a/vlc.spec +++ b/vlc.spec @@ -123,7 +123,9 @@ BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libjpeg) +%ifarch x86_64 i686 BuildRequires: pkgconfig(libplacebo) +%endif BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel @@ -567,6 +569,7 @@ fi || : %changelog * Sat Jun 16 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-4 - Rebuild for new libass version +- Make libplacebo x86 only due to vulkan changes * Sat Jun 02 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-3 - Fix build against Qt 5.11 From bc3b86d04b3b18fb3013c93b7f7a1ab9b18af81d Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Wed, 27 Jun 2018 13:32:36 +0100 Subject: [PATCH 374/671] Revert last commit --- vlc.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 8b9cf78..9ee0e69 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -123,9 +123,7 @@ BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libjpeg) -%ifarch x86_64 i686 BuildRequires: pkgconfig(libplacebo) -%endif BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel @@ -567,6 +565,9 @@ fi || : %changelog +* Wed Jun 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-5 +- Revert last commit + * Sat Jun 16 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-4 - Rebuild for new libass version - Make libplacebo x86 only due to vulkan changes From 17385d7e5f61fd02ca520e34ff772d65d864dadf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 24 Jul 2018 09:32:14 +0200 Subject: [PATCH 375/671] Remove Group --- vlc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9ee0e69..472a335 100644 --- a/vlc.spec +++ b/vlc.spec @@ -241,7 +241,6 @@ multi-cast in IPv4 or IPv6 on networks. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name}-core%{_isa} = %{version}-%{release} %description devel @@ -251,7 +250,6 @@ developing applications that use %{name}. %package core Summary: VLC media player core -Group: Applications/Multimedia Provides: vlc-nox = %{version}-%{release} Obsoletes: vlc-nox < 1.1.5-2 %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} @@ -262,7 +260,6 @@ VLC media player core components %package extras Summary: VLC media player with extras modules -Group: Applications/Multimedia Requires: vlc-core%{_isa} = %{version}-%{release} From 309f21e2d00dfb7652812718250e084fa9fcb8ee Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 24 Jul 2018 09:32:31 +0200 Subject: [PATCH 376/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 472a335..0989bff 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -562,6 +562,9 @@ fi || : %changelog +* Tue Jul 24 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.3-6 +- Rebuilt for libplacebo + * Wed Jun 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-5 - Revert last commit From 125f9ecd09b1161b774bc3e4606501d2200074c3 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 4 Aug 2018 14:14:49 +0100 Subject: [PATCH 377/671] Add patch from vlc mailing list to fix wayland freeze (rfbz#4596) --- fix_wayland_freeze.patch | 21 +++++++++++++++++++++ vlc.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 fix_wayland_freeze.patch diff --git a/fix_wayland_freeze.patch b/fix_wayland_freeze.patch new file mode 100644 index 0000000..7addcf8 --- /dev/null +++ b/fix_wayland_freeze.patch @@ -0,0 +1,21 @@ +Closes: https://gitlab.gnome.org/GNOME/mutter/issues/244 +Signed-off-by: Olivier Fourdan <ofourdan at redhat.com> +--- + modules/gui/qt/util/timetooltip.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp +index 1314b520ea..7a63a9d7d9 100644 +--- a/modules/gui/qt/util/timetooltip.cpp ++++ b/modules/gui/qt/util/timetooltip.cpp +@@ -73,7 +73,7 @@ void TimeTooltip::adjustPosition() + #if defined( Q_OS_WIN ) + mTarget.y() - 2 * size.height() - TIP_HEIGHT / 2 ); + #else +- mTarget.y() - size.height() + TIP_HEIGHT / 2 ); ++ mTarget.y() - size.height() - TIP_HEIGHT / 2 ); + #endif + + // Keep the tooltip on the same screen if possible +-- +2.17.1 diff --git a/vlc.spec b/vlc.spec index 0989bff..4053548 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -50,6 +50,9 @@ Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: modules_text_renderer_freetype_text_layout.c.patch # https://git.videolan.org/?p=vlc.git;a=commit;h=39b0590165501cdeb85595a19bf076d06bcc594c Patch1: buildfix_qt511.patch +# https://mailman.videolan.org/pipermail/vlc-devel/2018-July/120638.html +# https://bugzilla.rpmfusion.org/show_bug.cgi?id=4596 +Patch2: fix_wayland_freeze.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -562,6 +565,9 @@ fi || : %changelog +* Sat Aug 04 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-7 +- Add patch from vlc mailing list to fix wayland freeze (rfbz#4596) + * Tue Jul 24 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.3-6 - Rebuilt for libplacebo From eb71c5aa3ef555b11c0f4dbad303d4c0f799caa7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 9 Aug 2018 08:16:48 +0200 Subject: [PATCH 378/671] Add gcc-c++ --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 4053548..2458198 100644 --- a/vlc.spec +++ b/vlc.spec @@ -62,6 +62,7 @@ BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel BuildRequires: libtool +BuildRequires: gcc-c++ } %{?_with_a52dec:BuildRequires: a52dec-devel} From e8e5e3d007cca55dde1a8a0f53f58e875244ac0b Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 9 Aug 2018 12:26:14 +0100 Subject: [PATCH 379/671] use upstream commit --- fix_wayland_freeze.patch | 45 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/fix_wayland_freeze.patch b/fix_wayland_freeze.patch index 7addcf8..aff8207 100644 --- a/fix_wayland_freeze.patch +++ b/fix_wayland_freeze.patch @@ -1,5 +1,44 @@ +From 33849a7fc3a948da2ddd6a96533e057583ef8e54 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan <ofourdan@redhat.com> +Date: Tue, 31 Jul 2018 10:55:45 +0200 +Subject: [PATCH] Qt: Fix tooltip position +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +commit 5815534 ("qt: make the time tooltip a tooltip") reintroduced the +bug fixed by previous commit ea99237 ("remove X11BypassWindowManagerHint +from time tooltip") meant to fix #17829. + +The tooltip window is a shaped, override-redirect window which shows +when the pointer enters the slider and disappears when it leaves the +slider. + +By placing the tooltip window too low, above the slider, vlc causes a +constant map/unmap of that window which will flood Xwayland and the +Wayland compositori.window manager and can up with a deadlock situation. + +When the tooltip window is showing, the pointer will enter the tooltip +window and thus leave the slider, which will cause the tooltip to be +unmapped, which in turn causes the pointer to re-enter the slider area, +which will cause the tooltip to show again, so on and so forth. + +On Wayland/Xwayland where the Wayland compositor (i.e. the display +server) is also the window manager, that can lead to a deadlock +situation because some X11 requests are blocking on rountrips to the +Xserver, which in the case of Xwayland is also a Wayland client, waiting +on the Wayland compositor for some operations, the Wayland compositor +being also a Window manager and an X11 client at the same time... + +Avoid the issue by placing the tooltip so that it does not show up at +the same location where the slider is, without overlap, to avoid that +map/unmap requests storm. + Closes: https://gitlab.gnome.org/GNOME/mutter/issues/244 -Signed-off-by: Olivier Fourdan <ofourdan at redhat.com> +Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +(cherry picked from commit 6579a36c56ed30b72de584bf0e8cf21af1a90cf7) +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> --- modules/gui/qt/util/timetooltip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -18,4 +57,6 @@ index 1314b520ea..7a63a9d7d9 100644 // Keep the tooltip on the same screen if possible -- -2.17.1 +2.11.0 + + From 0e7c0886ef61d7e3757485fb5b1e2aa926065748 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 31 Aug 2018 21:04:08 +0100 Subject: [PATCH 380/671] Update to 3.0.4 --- buildfix_qt511.patch | 28 -------- fix_wayland_freeze.patch | 62 ----------------- ...text_renderer_freetype_text_layout.c.patch | 69 ------------------- sources | 2 +- vlc.spec | 16 ++--- 5 files changed, 7 insertions(+), 170 deletions(-) delete mode 100644 buildfix_qt511.patch delete mode 100644 fix_wayland_freeze.patch delete mode 100644 modules_text_renderer_freetype_text_layout.c.patch diff --git a/buildfix_qt511.patch b/buildfix_qt511.patch deleted file mode 100644 index ee84452..0000000 --- a/buildfix_qt511.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 39b0590165501cdeb85595a19bf076d06bcc594c Mon Sep 17 00:00:00 2001 -From: Dominique Leuenberger <dimstar@opensuse.org> -Date: Thu, 17 May 2018 17:40:37 +0200 -Subject: [PATCH] qt: fix build against Qt 5.11 - -Qt 5.11 is in RC phase now, and some headers need to be explicitly -included in order to build successfully. - -Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> ---- - modules/gui/qt/components/simple_preferences.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp -index b48ea7b67f..7a9c2dbf28 100644 ---- a/modules/gui/qt/components/simple_preferences.cpp -+++ b/modules/gui/qt/components/simple_preferences.cpp -@@ -36,6 +36,7 @@ - #include <QString> - #include <QFont> - #include <QToolButton> -+#include <QButtonGroup> - #include <QSignalMapper> - #include <QVBoxLayout> - #include <QScrollArea> --- -2.11.0 - diff --git a/fix_wayland_freeze.patch b/fix_wayland_freeze.patch deleted file mode 100644 index aff8207..0000000 --- a/fix_wayland_freeze.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 33849a7fc3a948da2ddd6a96533e057583ef8e54 Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan <ofourdan@redhat.com> -Date: Tue, 31 Jul 2018 10:55:45 +0200 -Subject: [PATCH] Qt: Fix tooltip position -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -commit 5815534 ("qt: make the time tooltip a tooltip") reintroduced the -bug fixed by previous commit ea99237 ("remove X11BypassWindowManagerHint -from time tooltip") meant to fix #17829. - -The tooltip window is a shaped, override-redirect window which shows -when the pointer enters the slider and disappears when it leaves the -slider. - -By placing the tooltip window too low, above the slider, vlc causes a -constant map/unmap of that window which will flood Xwayland and the -Wayland compositori.window manager and can up with a deadlock situation. - -When the tooltip window is showing, the pointer will enter the tooltip -window and thus leave the slider, which will cause the tooltip to be -unmapped, which in turn causes the pointer to re-enter the slider area, -which will cause the tooltip to show again, so on and so forth. - -On Wayland/Xwayland where the Wayland compositor (i.e. the display -server) is also the window manager, that can lead to a deadlock -situation because some X11 requests are blocking on rountrips to the -Xserver, which in the case of Xwayland is also a Wayland client, waiting -on the Wayland compositor for some operations, the Wayland compositor -being also a Window manager and an X11 client at the same time... - -Avoid the issue by placing the tooltip so that it does not show up at -the same location where the slider is, without overlap, to avoid that -map/unmap requests storm. - -Closes: https://gitlab.gnome.org/GNOME/mutter/issues/244 -Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> -(cherry picked from commit 6579a36c56ed30b72de584bf0e8cf21af1a90cf7) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> ---- - modules/gui/qt/util/timetooltip.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp -index 1314b520ea..7a63a9d7d9 100644 ---- a/modules/gui/qt/util/timetooltip.cpp -+++ b/modules/gui/qt/util/timetooltip.cpp -@@ -73,7 +73,7 @@ void TimeTooltip::adjustPosition() - #if defined( Q_OS_WIN ) - mTarget.y() - 2 * size.height() - TIP_HEIGHT / 2 ); - #else -- mTarget.y() - size.height() + TIP_HEIGHT / 2 ); -+ mTarget.y() - size.height() - TIP_HEIGHT / 2 ); - #endif - - // Keep the tooltip on the same screen if possible --- -2.11.0 - - diff --git a/modules_text_renderer_freetype_text_layout.c.patch b/modules_text_renderer_freetype_text_layout.c.patch deleted file mode 100644 index b6290a6..0000000 --- a/modules_text_renderer_freetype_text_layout.c.patch +++ /dev/null @@ -1,69 +0,0 @@ -X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=modules%2Ftext_renderer%2Ffreetype%2Ftext_layout.c;h=1a28786d097959e246b85913eef82f78013d4108;hp=13efd567b46a30bb159c974a4c12e603275cb1c8;hb=26e2d3906658c30f2f88f4b1bc9630ec43bf5525;hpb=f391a2a3b0410a4361ca0b93209b6e5ec79ff918 - -diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c -index 13efd567b4..1a28786d09 100644 ---- a/modules/text_renderer/freetype/text_layout.c -+++ b/modules/text_renderer/freetype/text_layout.c -@@ -153,6 +153,9 @@ typedef struct paragraph_t - - #ifdef HAVE_FRIBIDI - FriBidiCharType *p_types; -+#if FRIBIDI_MAJOR_VERSION >= 1 -+ FriBidiBracketType *p_btypes; -+#endif - FriBidiLevel *p_levels; - FriBidiStrIndex *pi_reordered_indices; - FriBidiParType paragraph_type; -@@ -361,6 +364,9 @@ static paragraph_t *NewParagraph( filter_t *p_filter, - #ifdef HAVE_FRIBIDI - p_paragraph->p_levels = vlc_alloc( i_size, sizeof( *p_paragraph->p_levels ) ); - p_paragraph->p_types = vlc_alloc( i_size, sizeof( *p_paragraph->p_types ) ); -+#if FRIBIDI_MAJOR_VERSION >= 1 -+ p_paragraph->p_btypes = vlc_alloc( i_size, sizeof( *p_paragraph->p_btypes ) ); -+#endif - p_paragraph->pi_reordered_indices = - vlc_alloc( i_size, sizeof( *p_paragraph->pi_reordered_indices ) ); - -@@ -398,6 +404,9 @@ error: - #ifdef HAVE_FRIBIDI - if( p_paragraph->p_levels ) free( p_paragraph->p_levels ); - if( p_paragraph->p_types ) free( p_paragraph->p_types ); -+#if FRIBIDI_MAJOR_VERSION >= 1 -+ if( p_paragraph->p_btypes ) free( p_paragraph->p_btypes ); -+#endif - if( p_paragraph->pi_reordered_indices ) - free( p_paragraph->pi_reordered_indices ); - #endif -@@ -424,6 +433,9 @@ static void FreeParagraph( paragraph_t *p_paragraph ) - #ifdef HAVE_FRIBIDI - free( p_paragraph->pi_reordered_indices ); - free( p_paragraph->p_types ); -+#if FRIBIDI_MAJOR_VERSION >= 1 -+ free( p_paragraph->p_btypes ); -+#endif - free( p_paragraph->p_levels ); - #endif - -@@ -436,10 +448,22 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph ) - fribidi_get_bidi_types( p_paragraph->p_code_points, - p_paragraph->i_size, - p_paragraph->p_types ); -+#if FRIBIDI_MAJOR_VERSION >= 1 -+ fribidi_get_bracket_types( p_paragraph->p_code_points, -+ p_paragraph->i_size, -+ p_paragraph->p_types, -+ p_paragraph->p_btypes ); -+ fribidi_get_par_embedding_levels_ex( p_paragraph->p_types, -+ p_paragraph->p_btypes, -+ p_paragraph->i_size, -+ &p_paragraph->paragraph_type, -+ p_paragraph->p_levels ); -+#else - fribidi_get_par_embedding_levels( p_paragraph->p_types, - p_paragraph->i_size, - &p_paragraph->paragraph_type, - p_paragraph->p_levels ); -+#endif - - #ifdef HAVE_HARFBUZZ - hb_unicode_funcs_t *p_funcs = hb_unicode_funcs_get_default(); diff --git a/sources b/sources index d391171..bf8b694 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf01d4755c719fe1c8605ceb40d8f1d2 vlc-3.0.3.tar.xz +f5e49a0fb9594ab8debf934a710e92f1 vlc-3.0.4.tar.xz diff --git a/vlc.spec b/vlc.spec index 2458198..1c03ae5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,18 +41,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 3.0.3 -Release: 7%{?dist} +Version: 3.0.4 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -# https://git.videolan.org/?p=vlc.git;a=commit;h=26e2d3906658c30f2f88f4b1bc9630ec43bf5525 -Patch0: modules_text_renderer_freetype_text_layout.c.patch -# https://git.videolan.org/?p=vlc.git;a=commit;h=39b0590165501cdeb85595a19bf076d06bcc594c -Patch1: buildfix_qt511.patch -# https://mailman.videolan.org/pipermail/vlc-devel/2018-July/120638.html -# https://bugzilla.rpmfusion.org/show_bug.cgi?id=4596 -Patch2: fix_wayland_freeze.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -325,7 +318,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-theora \ --enable-libass \ --enable-shout \ -%{!?_with_wayland: --disable-wayland} \ +%{?_with_wayland: --enable-wayland} \ %{!?_without_xcb:--enable-xcb --enable-xvideo} \ %{?_without_xcb:--disable-xcb --disable-xvideo} \ --enable-svg \ @@ -566,6 +559,9 @@ fi || : %changelog +* Fri Aug 31 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-1 +- Update to 3.0.4 + * Sat Aug 04 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.3-7 - Add patch from vlc mailing list to fix wayland freeze (rfbz#4596) From 7360bf18bffb119b406b5073708900624821092e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 1 Sep 2018 11:53:11 +0200 Subject: [PATCH 381/671] Add missing libidn --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 1c03ae5..1c8382e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -119,6 +119,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel +BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libudev) From 923ecd23c8d2e4ca2c404579cedc94b98add92ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 1 Sep 2018 11:54:47 +0200 Subject: [PATCH 382/671] fix without bootstrap --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1c8382e..67aea6f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -55,8 +55,8 @@ BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel BuildRequires: libtool -BuildRequires: gcc-c++ } +BuildRequires: gcc-c++ %{?_with_a52dec:BuildRequires: a52dec-devel} BuildRequires: aalib-devel From a468d4c39c2ed156bee228209ee2dcbdeb29b18a Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Wed, 12 Sep 2018 07:32:34 +0100 Subject: [PATCH 383/671] Fix unexpanded ldconfig macro (rfbz#5018) --- vlc.spec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index 67aea6f..73d74e3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -224,6 +224,9 @@ Requires: xdg-utils Requires: hicolor-icon-theme +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + #Merge back jack plugin into main Obsoletes: vlc-plugin-jack < %{version}-%{release} Provides: vlc-plugin-jack = %{version}-%{release} @@ -259,7 +262,8 @@ VLC media player core components %package extras Summary: VLC media player with extras modules Requires: vlc-core%{_isa} = %{version}-%{release} - +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description extras VLC media player extras modules. @@ -377,7 +381,7 @@ rm -rf %{buildroot}/%{_datadir}/macosx %ldconfig_scriptlets core %post -%ldconfig +%{?ldconfig} if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null fi || : @@ -389,7 +393,7 @@ fi %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null || : %postun -%ldconfig +%{?ldconfig} %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null %{_bindir}/update-desktop-database %{_datadir}/applications &>/dev/null %{_bindir}/touch --no-create %{_datadir}/icons/hicolor @@ -401,13 +405,13 @@ fi || : %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : %post extras -%ldconfig +%{?ldconfig} if [ $1 == 1 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi %postun extras -%ldconfig +%{?ldconfig} if [ $1 == 0 ] ; then %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins &>/dev/null || : fi @@ -560,6 +564,9 @@ fi || : %changelog +* Wed Sep 12 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-2 +- Fix unexpanded ldconfig macro (rfbz#5018) + * Fri Aug 31 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-1 - Update to 3.0.4 From 9b30f228b1922e21150e799e0f6d2642c794867c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Sep 2018 12:34:10 +0200 Subject: [PATCH 384/671] expunge qt-devel from buildroot --- vlc.spec | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 73d74e3..de0d6d9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,7 +42,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -108,7 +108,7 @@ BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmpg123-devel BuildRequires: libmtp-devel >= 1.0.0 -%{?_with_projectm:BuildRequires: libprojectM-qt-devel} +%{?_with_projectm:BuildRequires: libprojectM-devel} BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 BuildRequires: libssh2-devel @@ -119,6 +119,11 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel +%if 0%{?fedora} +BuildRequires: phonon-qt5-devel +%else +BuildRequires: phonon-devel +%endif BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libplacebo) @@ -200,7 +205,13 @@ BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif -%{?_with_workaround_circle_deps:BuildRequires: phonon-backend-gstreamer} +%{?_with_workaround_circle_deps: +%if 0%{?fedora} +BuildRequires: phonon-qt5-backend-gstreamer +%else +BuildRequires: phonon-backend-gstreamer +%endif +} %{?_with_wayland: # Fedora 25 Workstation default to wayland but not all @@ -564,6 +575,9 @@ fi || : %changelog +* Tue Sep 18 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.4-3 +- Expunge qt-devel from buildroot + * Wed Sep 12 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-2 - Fix unexpanded ldconfig macro (rfbz#5018) From 36e9b180ac9c8ff08cb10c2f76409b79c5971465 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Tue, 18 Sep 2018 12:29:39 +0100 Subject: [PATCH 385/671] Add BR: libXinerama-devel, needed for skins --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index de0d6d9..be8e8bc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -186,6 +186,7 @@ BuildRequires: libXv-devel BuildRequires: libXxf86vm-devel BuildRequires: libX11-devel BuildRequires: libXext-devel +BuildRequires: libXinerama-devel BuildRequires: libXpm-devel %{!?_without_xcb: BuildRequires: libxcb-devel From 346c9b7c70724277d62aa50387a252e46b1fbd22 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 21 Sep 2018 15:50:32 +0200 Subject: [PATCH 386/671] Update snapshot --- sources | 2 +- vlc.spec | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sources b/sources index bf8b694..1cf2410 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5e49a0fb9594ab8debf934a710e92f1 vlc-3.0.4.tar.xz +48bc1ebf01f0968e48caf853d9271373 vlc-3.0.5-20180921-0223.tar.xz diff --git a/vlc.spec b/vlc.spec index be8e8bc..99a6f7a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -#global vlc_date 20180202 +%global vlc_date 20180921 #global vlc_rc rc9 -#global vlc_tag -%%{?vlc_date}-0233-%%{?vlc_rc} +%global vlc_tag -%%{?vlc_date}-0223-%%{?vlc_rc} %if 0%{?vlc_rc:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -29,6 +29,7 @@ %endif %global _with_fluidsynth 1 %if 0%{?fedora} +%global _with_aom 1 %global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 @@ -41,11 +42,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc -Version: 3.0.4 -Release: 3%{?dist} +Version: 3.0.5 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +Patch0: 0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch + BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -59,6 +62,7 @@ BuildRequires: libtool BuildRequires: gcc-c++ %{?_with_a52dec:BuildRequires: a52dec-devel} +%{?_with_aom:BuildRequires: libaom-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel BuildRequires: avahi-devel @@ -322,6 +326,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-rpi-omxil \ --enable-mmal \ } \ +%{?_with_aom:--enable-aom} \ %{!?_with_a52dec:--disable-a52} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ --disable-swscale --disable-postproc} \ @@ -576,6 +581,11 @@ fi || : %changelog +* Fri Sep 21 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-1 +- Update to 3.0.5 snapshot from today +- Enable aom support +- Workaound a bug with vlc-cache-gen on armhfp + * Tue Sep 18 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.4-3 - Expunge qt-devel from buildroot From 1348a40191835be8c995c05ca943ed305c099703 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 21 Sep 2018 15:51:05 +0200 Subject: [PATCH 387/671] Add patch --- ...a-bug-with-.-vlc-cache-gen-on-armhfp.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch diff --git a/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch b/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch new file mode 100644 index 0000000..c07396e --- /dev/null +++ b/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch @@ -0,0 +1,25 @@ +From d30fc3d6d588d51ab9db67eef753f8d16881f0b4 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Fri, 21 Sep 2018 15:45:21 +0200 +Subject: [PATCH] Workaround a bug with ./vlc-cache-gen on armhfp + +--- + bin/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/Makefile.am b/bin/Makefile.am +index 2877e8b0ea..521111e734 100644 +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -142,7 +142,7 @@ endif + ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) + $(AM_V_at)rm -f ../modules/plugins.dat + $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ +- ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \ ++ ./vlc-cache-gen$(EXEEXT) `realpath ../modules` || : ; \ + else \ + echo "Cross-compilation: cache generation skipped!" ; \ + fi +-- +2.17.1 + From 1a4511cc0f2a340233b2e87ddbaf0a2227ecd58d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 21 Sep 2018 16:22:28 +0200 Subject: [PATCH 388/671] Rework vlc_tag/rc --- vlc.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index 99a6f7a..78e1800 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,7 +1,7 @@ %global vlc_date 20180921 -#global vlc_rc rc9 -%global vlc_tag -%%{?vlc_date}-0223-%%{?vlc_rc} -%if 0%{?vlc_rc:1} +#global vlc_rc -rc9 +%global vlc_tag -%{?vlc_date}-0223 +%if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else %global vlc_url https://download.videolan.org/pub/videolan/vlc/ @@ -46,7 +46,7 @@ Version: 3.0.5 Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org -Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: 0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch BuildRequires: desktop-file-utils @@ -286,7 +286,7 @@ VLC media player extras modules. %prep -%autosetup -p1 -n %{name}-%{version}%{?vlc_rc:-%{vlc_rc}} +%autosetup -p1 -n %{name}-%{version}%{?vlc_rc} %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable From 583d02a19e4b8b0919d6a2039b58508a66229991 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Sep 2018 17:37:01 +0200 Subject: [PATCH 389/671] Revert "Add patch" This reverts commit 1348a40191835be8c995c05ca943ed305c099703. --- ...a-bug-with-.-vlc-cache-gen-on-armhfp.patch | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch diff --git a/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch b/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch deleted file mode 100644 index c07396e..0000000 --- a/0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d30fc3d6d588d51ab9db67eef753f8d16881f0b4 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Fri, 21 Sep 2018 15:45:21 +0200 -Subject: [PATCH] Workaround a bug with ./vlc-cache-gen on armhfp - ---- - bin/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/Makefile.am b/bin/Makefile.am -index 2877e8b0ea..521111e734 100644 ---- a/bin/Makefile.am -+++ b/bin/Makefile.am -@@ -142,7 +142,7 @@ endif - ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) - $(AM_V_at)rm -f ../modules/plugins.dat - $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ -- ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \ -+ ./vlc-cache-gen$(EXEEXT) `realpath ../modules` || : ; \ - else \ - echo "Cross-compilation: cache generation skipped!" ; \ - fi --- -2.17.1 - From 262a9edc8491fd72cfd9f218f06d1a00bf3e6ffd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 25 Sep 2018 17:37:52 +0200 Subject: [PATCH 390/671] Remove uneeded patch --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 78e1800..2033a22 100644 --- a/vlc.spec +++ b/vlc.spec @@ -47,7 +47,6 @@ Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: 0001-Workaround-a-bug-with-.-vlc-cache-gen-on-armhfp.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib From 3a82244f5fb29cbc632f62e3d2df9bf6f4057b25 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 3 Oct 2018 14:54:50 +0200 Subject: [PATCH 391/671] Update snapshot --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 1cf2410..ba10e70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -48bc1ebf01f0968e48caf853d9271373 vlc-3.0.5-20180921-0223.tar.xz +e8ff8fb5d93293dc6c5d947ddd6235a9 vlc-3.0.5-20181003-0222.tar.xz diff --git a/vlc.spec b/vlc.spec index 2033a22..731b859 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20180921 +%global vlc_date 20181003 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0223 +%global vlc_tag -%{?vlc_date}-0222 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -580,6 +580,9 @@ fi || : %changelog +* Wed Oct 03 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-2 +- Update to 20181003 snapshot + * Fri Sep 21 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-1 - Update to 3.0.5 snapshot from today - Enable aom support From 7a6d996c4f36d59ab6538719a4387a2b81a315db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Thu, 4 Oct 2018 22:14:49 +0100 Subject: [PATCH 392/671] Mass rebuild for x264 and/or x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 731b859..34ef0af 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -580,6 +580,9 @@ fi || : %changelog +* Thu Oct 04 2018 Sérgio Basto <sergio@serjux.com> - 3.0.5-3 +- Mass rebuild for x264 and/or x265 + * Wed Oct 03 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-2 - Update to 20181003 snapshot From 83fac7aa45332d60ba70aa3e377791ec2ba58a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Fri, 5 Oct 2018 00:05:30 +0100 Subject: [PATCH 393/671] Fix build with x264 >= 0.153 --- vlc.spec | 2 ++ x264-Fix-build-with-a-newer-version-of-x264.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 x264-Fix-build-with-a-newer-version-of-x264.patch diff --git a/vlc.spec b/vlc.spec index 34ef0af..d78d2c9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -47,6 +47,7 @@ Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +Patch1: x264-Fix-build-with-a-newer-version-of-x264.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -582,6 +583,7 @@ fi || : %changelog * Thu Oct 04 2018 Sérgio Basto <sergio@serjux.com> - 3.0.5-3 - Mass rebuild for x264 and/or x265 +- Fix build with x264 >= 0.153 * Wed Oct 03 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-2 - Update to 20181003 snapshot diff --git a/x264-Fix-build-with-a-newer-version-of-x264.patch b/x264-Fix-build-with-a-newer-version-of-x264.patch new file mode 100644 index 0000000..aa774a9 --- /dev/null +++ b/x264-Fix-build-with-a-newer-version-of-x264.patch @@ -0,0 +1,13 @@ +diff --git a/modules/codec/x264.c b/modules/codec/x264.c +index e02048f075..dec95a9c78 100644 +--- a/modules/codec/x264.c ++++ b/modules/codec/x264.c +@@ -842,7 +842,7 @@ static int Open ( vlc_object_t *p_this ) + fullrange |= p_enc->fmt_in.video.b_color_range_full; + p_enc->fmt_in.i_codec = fullrange ? VLC_CODEC_J420 : VLC_CODEC_I420; + p_sys->i_colorspace = X264_CSP_I420; +-#if X264_BUILD >= 118 ++#if X264_BUILD >= 118 && X264_BUILD < 153 + char *psz_profile = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" ); + if( psz_profile ) + { From b22590434d16aa425bbe347eb7c2062329c57dd5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 20 Oct 2018 20:58:05 +0200 Subject: [PATCH 394/671] Update snapshot --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index ba10e70..6e7a117 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e8ff8fb5d93293dc6c5d947ddd6235a9 vlc-3.0.5-20181003-0222.tar.xz +1cb3b2a64ca6413de954c0eb38697ebe vlc-3.0.5-20181020-0221.tar.xz diff --git a/vlc.spec b/vlc.spec index d78d2c9..536f74a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20181003 +%global vlc_date 20181020 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0222 +%global vlc_tag -%{?vlc_date}-0221 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -581,6 +581,9 @@ fi || : %changelog +* Sat Oct 20 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-4 +- Update to 20181020 + * Thu Oct 04 2018 Sérgio Basto <sergio@serjux.com> - 3.0.5-3 - Mass rebuild for x264 and/or x265 - Fix build with x264 >= 0.153 From 4316568810caade24fd2d48b997cf43d415f0694 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 5 Nov 2018 15:45:08 +0100 Subject: [PATCH 395/671] Move vdpau to core core avcodec libraries now rely on libvdpau --- vlc.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 536f74a..1bbdf91 100644 --- a/vlc.spec +++ b/vlc.spec @@ -488,10 +488,6 @@ fi || : %{?_with_fluidsynth: %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } -#vdpau in main -%dir %{_libdir}/vlc/plugins/vdpau -%{_libdir}/vlc/plugins/vdpau/libvdpau_*_plugin.so - %files core -f %{name}.lang %{_bindir}/vlc @@ -552,6 +548,9 @@ fi || : %exclude %{_libdir}/vlc/plugins/vdpau %ghost %{_libdir}/vlc/plugins/plugins.dat %dir %{_libdir}/vlc/ +%dir %{_libdir}/vlc/plugins +%dir %{_libdir}/vlc/plugins/vdpau +%{_libdir}/vlc/plugins/vdpau/libvdpau_*_plugin.so %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins %{_mandir}/man1/vlc*.1* From bdc25f6874a44a16493ece459eb8084a55e5ecab Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Sun, 11 Nov 2018 12:14:46 +0000 Subject: [PATCH 396/671] Update to 20181111 --- sources | 2 +- vlc.spec | 8 +++++--- x264-Fix-build-with-a-newer-version-of-x264.patch | 13 ------------- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 x264-Fix-build-with-a-newer-version-of-x264.patch diff --git a/sources b/sources index 6e7a117..99b4782 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1cb3b2a64ca6413de954c0eb38697ebe vlc-3.0.5-20181020-0221.tar.xz +5a3d4db577d07bf2d6486f7e7af1b05e vlc-3.0.5-20181111-0221.tar.xz diff --git a/vlc.spec b/vlc.spec index 1bbdf91..900d691 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_date 20181020 +%global vlc_date 20181111 #global vlc_rc -rc9 %global vlc_tag -%{?vlc_date}-0221 %if 0%{?vlc_tag:1} @@ -43,11 +43,10 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch1: x264-Fix-build-with-a-newer-version-of-x264.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -580,6 +579,9 @@ fi || : %changelog +* Sun Nov 11 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-5 +- Update to 20181111 + * Sat Oct 20 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.0.5-4 - Update to 20181020 diff --git a/x264-Fix-build-with-a-newer-version-of-x264.patch b/x264-Fix-build-with-a-newer-version-of-x264.patch deleted file mode 100644 index aa774a9..0000000 --- a/x264-Fix-build-with-a-newer-version-of-x264.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules/codec/x264.c b/modules/codec/x264.c -index e02048f075..dec95a9c78 100644 ---- a/modules/codec/x264.c -+++ b/modules/codec/x264.c -@@ -842,7 +842,7 @@ static int Open ( vlc_object_t *p_this ) - fullrange |= p_enc->fmt_in.video.b_color_range_full; - p_enc->fmt_in.i_codec = fullrange ? VLC_CODEC_J420 : VLC_CODEC_I420; - p_sys->i_colorspace = X264_CSP_I420; --#if X264_BUILD >= 118 -+#if X264_BUILD >= 118 && X264_BUILD < 153 - char *psz_profile = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" ); - if( psz_profile ) - { From d7c172f263772e7a8573e28b8847f9b0d5c2e354 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Sun, 18 Nov 2018 12:09:09 +0000 Subject: [PATCH 397/671] Rebuild for new x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 900d691..3748754 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -579,6 +579,9 @@ fi || : %changelog +* Sun Nov 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-6 +- Rebuild for new x265 + * Sun Nov 11 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-5 - Update to 20181111 From 496fe9543acb607fb652a80edd18328cc7669ac9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Thu, 29 Nov 2018 10:01:48 +0000 Subject: [PATCH 398/671] Update to 20181129 --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 99b4782..98a4d37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a3d4db577d07bf2d6486f7e7af1b05e vlc-3.0.5-20181111-0221.tar.xz +a205c0b4a810dd864f8e065856dc8ba4 vlc-3.0.5-20181129-0232.tar.xz diff --git a/vlc.spec b/vlc.spec index 3748754..5fe0056 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20181111 +%global vlc_date 20181129 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0221 +%global vlc_tag -%{?vlc_date}-0232 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 3.0.5 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -579,6 +579,9 @@ fi || : %changelog +* Thu Nov 29 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-7 +- Update to 20181129 + * Sun Nov 18 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-6 - Rebuild for new x265 From 08cdcfe810fa4f4d323b9ad8503bd638d273a2f3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 13 Dec 2018 09:44:42 +0100 Subject: [PATCH 399/671] Bump epoch --- vlc.spec | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/vlc.spec b/vlc.spec index 5fe0056..c67c592 100644 --- a/vlc.spec +++ b/vlc.spec @@ -41,9 +41,10 @@ Summary: The cross-platform open-source multimedia framework, player and server +Epoch: 1 Name: vlc Version: 3.0.5 -Release: 7%{?dist} +Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -226,8 +227,8 @@ Recommends: qt5-qtwayland%{_isa} } -Provides: %{name}-xorg%{_isa} = %{version}-%{release} -Requires: vlc-core%{_isa} = %{version}-%{release} +Provides: %{name}-xorg%{_isa} = %{epoch}:%{version}-%{release} +Requires: vlc-core%{_isa} = %{epoch}:%{version}-%{release} Requires: kde-filesystem Requires: dejavu-sans-fonts @@ -242,10 +243,6 @@ Requires: hicolor-icon-theme Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -#Merge back jack plugin into main -Obsoletes: vlc-plugin-jack < %{version}-%{release} -Provides: vlc-plugin-jack = %{version}-%{release} - %description VLC media player is a highly portable multimedia player and multimedia framework @@ -257,7 +254,7 @@ multi-cast in IPv4 or IPv6 on networks. %package devel Summary: Development files for %{name} -Requires: %{name}-core%{_isa} = %{version}-%{release} +Requires: %{name}-core%{_isa} = %{epoch}:%{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for @@ -266,8 +263,7 @@ developing applications that use %{name}. %package core Summary: VLC media player core -Provides: vlc-nox = %{version}-%{release} -Obsoletes: vlc-nox < 1.1.5-2 +Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} @@ -276,7 +272,7 @@ VLC media player core components %package extras Summary: VLC media player with extras modules -Requires: vlc-core%{_isa} = %{version}-%{release} +Requires: vlc-core%{_isa} = %{epoch}:%{version}-%{release} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig From 43877d8f7eece2c4026d7e9200ac95b98ad02c8a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 13 Dec 2018 10:02:50 +0100 Subject: [PATCH 400/671] Updates --- .gitignore | 1 - sources | 2 +- vlc.spec | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 08ea01d..6d32910 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ vlc-*.tar.xz -/asm.S diff --git a/sources b/sources index 98a4d37..684e48d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a205c0b4a810dd864f8e065856dc8ba4 vlc-3.0.5-20181129-0232.tar.xz +beeaf85bb4d86246bc11c35fdfd22c0f vlc-3.0.5-20181213-0221.tar.xz diff --git a/vlc.spec b/vlc.spec index c67c592..9127500 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20181129 +%global vlc_date 20181213 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0232 +%global vlc_tag -%{?vlc_date}-0221 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -575,6 +575,10 @@ fi || : %changelog +* Thu Dec 13 2018 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-0.1 +- Bump Epoch +- Update to 20181213 + * Thu Nov 29 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-7 - Update to 20181129 From b9db1fb2723763977e6ba94ac04af6f55726492f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Dec 2018 15:25:55 +0100 Subject: [PATCH 401/671] Add armv7hnl to _with_rpi --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9127500..ef3502a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -199,7 +199,7 @@ BuildRequires: pkgconfig(xcb-keysyms) } BuildRequires: xorg-x11-proto-devel -%ifarch armv7hl +%ifarch armv7hl armv7hnl %{?_with_rpi: BuildRequires: raspberrypi-vc-devel } From 1b1b9344d33f3b08b9ddf6142d401fe05357687e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Dec 2018 16:17:03 +0100 Subject: [PATCH 402/671] fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ef3502a..8649944 100644 --- a/vlc.spec +++ b/vlc.spec @@ -317,7 +317,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_vcdimager:--enable-vcdx} \ --enable-omxil \ --enable-omxil-vout \ -%{?_with_rpi: +%{?_with_rpi: \ --enable-rpi-omxil \ --enable-mmal \ } \ From aae04322673caec5ba18deea56766fed8924d50b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 20 Dec 2018 18:59:26 +0100 Subject: [PATCH 403/671] Add mmal support --- mmal_1.patch | 6570 ++++++++++++++++++++++++++++++++++++++++++++++++++ vlc.spec | 2 + 2 files changed, 6572 insertions(+) create mode 100644 mmal_1.patch diff --git a/mmal_1.patch b/mmal_1.patch new file mode 100644 index 0000000..35bdeb2 --- /dev/null +++ b/mmal_1.patch @@ -0,0 +1,6570 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -3406,7 +3406,7 @@ + VLC_ADD_PLUGIN([mmal]) + VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) + VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) +- VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [ ++ VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif -lvchiq_arm -lvcsm ]) ], [ + AS_IF([test "${enable_mmal}" = "yes"], + [ AC_MSG_ERROR([Cannot find bcm library...]) ], + [ AC_MSG_WARN([Cannot find bcm library...]) ]) +--- a/modules/hw/mmal/Makefile.am ++++ b/modules/hw/mmal/Makefile.am +@@ -1,23 +1,30 @@ + include $(top_srcdir)/modules/common.am + mmaldir = $(pluginsdir)/mmal + +-AM_CFLAGS += $(CFLAGS_mmal) +-AM_LDFLAGS += -rpath '$(mmaldir)' $(LDFLAGS_mmal) ++AM_CFLAGS += -pthread $(CFLAGS_mmal) ++AM_LDFLAGS += -pthread -rpath '$(mmaldir)' $(LDFLAGS_mmal) + +-libmmal_vout_plugin_la_SOURCES = vout.c mmal_picture.c mmal_picture.h ++libmmal_vout_plugin_la_SOURCES = vout.c subpic.c mmal_picture.c subpic.h mmal_picture.h + libmmal_vout_plugin_la_CFLAGS = $(AM_CFLAGS) + libmmal_vout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -lm + libmmal_vout_plugin_la_LIBADD = $(LIBS_mmal) + mmal_LTLIBRARIES = libmmal_vout_plugin.la + +-libmmal_codec_plugin_la_SOURCES = codec.c ++libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h + libmmal_codec_plugin_la_CFLAGS = $(AM_CFLAGS) + libmmal_codec_plugin_la_LDFLAGS = $(AM_LDFLAGS) + libmmal_codec_plugin_la_LIBADD = $(LIBS_mmal) + mmal_LTLIBRARIES += libmmal_codec_plugin.la + +-libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c ++libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c mmal_picture.h + libmmal_deinterlace_plugin_la_CFLAGS = $(AM_CFLAGS) + libmmal_deinterlace_plugin_la_LDFLAGS = $(AM_LDFLAGS) + libmmal_deinterlace_plugin_la_LIBADD = $(LIBS_mmal) + mmal_LTLIBRARIES += libmmal_deinterlace_plugin.la ++ ++libmmal_xsplitter_plugin_la_SOURCES = xsplitter.c mmal_picture.c mmal_picture.h ++libmmal_xsplitter_plugin_la_CFLAGS = $(AM_CFLAGS) ++libmmal_xsplitter_plugin_la_LDFLAGS = $(AM_LDFLAGS) ++libmmal_xsplitter_plugin_la_LIBADD = $(LIBS_mmal) ++mmal_LTLIBRARIES += libmmal_xsplitter_plugin.la ++ +--- /dev/null ++++ b/modules/hw/mmal/blend_rgba_neon.S +@@ -0,0 +1,185 @@ ++ .syntax unified ++ .arm ++// .thumb ++ .text ++ .align 16 ++ ++@ Deal with tail ++@ As the calculation on each pel is independant it doesn't matter ++@ where the pels are in in the registers as long as we are consistant ++@ with what we use for load & store. (Unused register fields will just ++@ calculate garbage that we then ignore.) ++ ++tail_rgbx_rgba: ++ lsls r2, r3, #30 @ b2 -> C, b1 -> N ++ mov r12, r0 ++ vldmcs r1!, {d2,d3} ++ vldmcs r0!, {d30, d31} ++ vldmmi r1!, {d1} ++ vldmmi r0!, {d29} ++ tst r3, #1 ++ vldrne s1, [r1] ++ vldrne s9, [r0] ++ addne r1, #4 ++ addne r0, #4 ++ ++ @ Alpha in hi byte of each word ++ vshr.u32 q9, q1, #24 ++ vshr.u32 q8, q0, #24 ++ vmov d28, d4 @ Can't load "s57" so cheat ++ vmul.u32 q9, q9, d8[0] ++ vmul.u32 q8, q8, d8[0] ++ vrshr.u32 q9, q9, #16 ++ vrshr.u32 q8, q8, #16 @ 4 mix alpha values ++ vmul.u32 q9, q10 ++ vmul.u32 q8, q10 @ dup every alpha into all 4 bytes of its word ++ ++ vmull.u8 q3, d3, d19 ++ vmull.u8 q2, d2, d18 ++ vsub.u8 q9, q11, q9 @ gen the cplmnt ++ ++ vmull.u8 q1, d1, d17 ++ vmull.u8 q0, d0, d16 ++ vsub.u8 q8, q11, q8 ++ ++ vmlal.u8 q3, d31, d19 ++ vmlal.u8 q2, d30, d18 ++ vmlal.u8 q1, d29, d17 ++ vmlal.u8 q0, d28, d16 ++ ++ vsra.u16 q3, q3, #8 ++ vsra.u16 q2, q2, #8 ++ vsra.u16 q1, q1, #8 ++ vsra.u16 q0, q0, #8 ++ ++ vrshrn.u16 d7, q3, #8 ++ vrshrn.u16 d6, q2, #8 ++ vrshrn.u16 d5, q1, #8 ++ vrshrn.u16 d4, q0, #8 ++ ++ vbit q3, q12, q12 @ Set alpha to #255 ++ vbit q2, q12, q12 ++ ++ lsls r2, r3, #30 @ b2 -> C, b1 -> N ++ vstmcs r12!, {d6,d7} ++ vstmmi r12!, {d5} ++ tst r3, #1 ++ vstrne s9, [r12] ++ bx lr ++ ++ ++@ blend_rgbx_rgba_neon ++ ++@ [r0] RGBx dest (Byte order: R, G, B, x) ++@ [r1] RGBA src merge (Byte order: R, G, B, A) ++@ r2 plane alpha ++@ r3 count (pixels) ++ ++@ Whilst specified as RGBx+RGBA the only important part is the position of ++@ alpha, the other components are all treated the same ++@ Assumes little endian i.e. Alpha ends up in hi 8 bits of uint32_t ++ ++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ ++#error Only little endian written (should be easy fix) ++#endif ++ ++@ Implements /255 as ((x * 257) + 0x8000) >> 16 ++@ This generates something in the range [(x+126)/255, (x+127)/255] which is good enough ++ ++@ There is advantage to aligning src and/or dest - dest gives a bit more due to being used twice ++ ++ .align 16 ++ .global blend_rgbx_rgba_neon ++#ifdef __ELF__ ++ .type blend_rgbx_rgba_neon, %function ++#endif ++ ++blend_rgbx_rgba_neon: ++ ++ push { r4, lr } ++ vpush { q4 } @ With reworked reg alloc this could be avoided ++ movw r12, #257 ++ vmov.i8 q11, #0xff ++ mul r2, r12 ++ vmov.u8 q10, #1 ++ subs r3, #8 ++ vmov s16, r2 ++ vmov.u32 q12, #0xff000000 ++ blt 2f ++ ++ @ If < 16 bytes to move then don't bother trying to align ++ @ (a) This means the the align doesn't need to worry about r3 underflow ++ @ (b) The overhead would be greater than any gain ++ cmp r3, #8 ++ ble 1f ++ ++ @ Align r1 on a 32 byte boundary ++ mov r4, r3 ++ neg r3, r0 ++ ubfx r3, r3, #2, #3 ++ ++ cmp r3, #0 ++ blne tail_rgbx_rgba ++ ++ sub r3, r4, r3 ++ ++1: ++ vld1.32 { q0,q1 }, [r1] ++ ++1: ++ @ Alpha in hi byte of each word ++ vshr.u32 q9, q1, #24 ++ vshr.u32 q8, q0, #24 ++ vmul.u32 q9, q9, d8[0] ++ vmul.u32 q8, q8, d8[0] ++ ++ vrshr.u32 q9, q9, #16 ++ vrshr.u32 q8, q8, #16 @ 4 mix alpha values ++ vmul.u32 q9, q10 ++ vmul.u32 q8, q10 @ dup every alpha into all 4 bytes of its word ++ ++ vld1.32 {q14,q15}, [r0] ++ subs r3, #8 ++ ++ vmull.u8 q3, d3, d19 ++ vmull.u8 q2, d2, d18 ++ vsub.u8 q9, q11, q9 @ gen the cplmnt ++ ++ vmull.u8 q1, d1, d17 ++ vmull.u8 q0, d0, d16 ++ vsub.u8 q8, q11, q8 ++ addge r1, #32 ++ ++ vmlal.u8 q3, d31, d19 ++ vmlal.u8 q2, d30, d18 ++ vmlal.u8 q1, d29, d17 ++ vmlal.u8 q0, d28, d16 ++ ++ vsra.u16 q3, q3, #8 ++ vsra.u16 q2, q2, #8 ++ vsra.u16 q1, q1, #8 ++ vsra.u16 q0, q0, #8 ++ ++ vrshrn.u16 d7, q3, #8 ++ vrshrn.u16 d6, q2, #8 ++ vrshrn.u16 d5, q1, #8 ++ vrshrn.u16 d4, q0, #8 ++ ++ vld1.32 { q0,q1 }, [r1] ++ ++ vbit q3, q12, q12 @ Set alpha to #255 ++ vbit q2, q12, q12 ++ ++ vst1.32 { q2,q3 }, [r0]! ++ bge 1b ++ add r1, #32 ++ ++2: ++ cmp r3, #-8 ++ blgt tail_rgbx_rgba ++ ++ vpop { q4 } ++ pop { r4, pc } ++ ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/blend_rgba_neon.h +@@ -0,0 +1,15 @@ ++#ifndef HW_MMAL_BLEND_RGBA_NEON_H ++#define HW_MMAL_BLEND_RGBA_NEON_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++extern void blend_rgbx_rgba_neon(void * dest, const void * src, int alpha, unsigned int n); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif ++ +--- /dev/null ++++ b/modules/hw/mmal/blend_test.c +@@ -0,0 +1,116 @@ ++#include <stdio.h> ++#include <stdint.h> ++#include <memory.h> ++ ++#include "blend_rgba_neon.h" ++ ++#define RPI_PROFILE 1 ++#define RPI_PROC_ALLOC 1 ++#include "rpi_prof.h" ++ ++static inline unsigned div255(unsigned v) ++{ ++ // This models what we we do in the asm for / 255 ++ // It generates something in the range [(i+126)/255, (i+127)/255] which is good enough ++ return ((v * 257) + 0x8000) >> 16; ++} ++ ++static inline unsigned int a_merge(unsigned int dst, unsigned src, unsigned f) ++{ ++ return div255((255 - f) * (dst) + src * f); ++} ++ ++ ++static void merge_line(void * dest, const void * src, int alpha, unsigned int n) ++{ ++ unsigned int i; ++ const uint8_t * s_data = src; ++ uint8_t * d_data = dest; ++ ++ for (i = 0; i != n; ++i) { ++ const uint32_t s_pel = ((const uint32_t *)s_data)[i]; ++ const uint32_t d_pel = ((const uint32_t *)d_data)[i]; ++ const unsigned int a = div255(alpha * (s_pel >> 24)); ++ ((uint32_t *)d_data)[i] = 0xff000000 | ++ (a_merge((d_pel >> 16) & 0xff, (s_pel >> 16) & 0xff, a) << 16) | ++ (a_merge((d_pel >> 8) & 0xff, (s_pel >> 8) & 0xff, a) << 8 ) | ++ (a_merge((d_pel >> 0) & 0xff, (s_pel >> 0) & 0xff, a) << 0 ); ++ } ++} ++ ++#define BUF_SIZE 256 ++#define BUF_SLACK 16 ++#define BUF_ALIGN 64 ++#define BUF_ALLOC (BUF_SIZE + 2*BUF_SLACK + BUF_ALIGN) ++ ++static void test_line(const uint32_t * const dx, const unsigned int d_off, ++ const uint32_t * const sx, const unsigned int s_off, ++ const unsigned int alpha, const unsigned int len, const int prof_no) ++{ ++ uint32_t d0_buf[BUF_ALLOC]; ++ uint32_t d1_buf[BUF_ALLOC]; ++ const uint32_t * const s0 = sx + s_off; ++ ++ uint32_t * const d0 = (uint32_t *)(((uintptr_t)d0_buf + (BUF_ALIGN - 1)) & ~(BUF_ALIGN - 1)) + d_off; ++ uint32_t * const d1 = (uint32_t *)(((uintptr_t)d1_buf + (BUF_ALIGN - 1)) & ~(BUF_ALIGN - 1)) + d_off; ++ unsigned int i; ++ ++ memcpy(d0, dx, (BUF_SIZE + BUF_SLACK*2)*4); ++ memcpy(d1, dx, (BUF_SIZE + BUF_SLACK*2)*4); ++ ++ merge_line(d0 + BUF_SLACK, s0 + BUF_SLACK, alpha, len); ++ ++ PROFILE_START(); ++ blend_rgbx_rgba_neon(d1 + BUF_SLACK, s0 + BUF_SLACK, alpha, len); ++ PROFILE_ACC_N(prof_no); ++ ++ for (i = 0; i != BUF_SIZE + BUF_SLACK*2; ++i) { ++ if (d0[i] != d1[i]) { ++ printf("%3d: %08x + %08x * %02x: %08x / %08x: len=%d\n", (int)(i - BUF_SLACK), dx[i], s0[i], alpha, d0[i], d1[i], len); ++ } ++ } ++} ++ ++ ++int main(int argc, char *argv[]) ++{ ++ unsigned int i, j; ++ uint32_t d0_buf[BUF_ALLOC]; ++ uint32_t s0_buf[BUF_ALLOC]; ++ ++ uint32_t * const d0 = (uint32_t *)(((uintptr_t)d0_buf + 63) & ~63) + 0; ++ uint32_t * const s0 = (uint32_t *)(((uintptr_t)s0_buf + 63) & ~63) + 0; ++ ++ PROFILE_INIT(); ++ ++ for (i = 0; i != 255*255; ++i) { ++ unsigned int a = div255(i); ++ unsigned int b = (i + 127)/255; ++ unsigned int c = (i + 126)/255; ++ if (a != b && a != c) ++ printf("%d/255: %d != %d/%d\n", i, a, b, c); ++ } ++ ++ for (i = 0; i != BUF_ALLOC; ++i) { ++ d0_buf[i] = 0xff00 | i; ++ s0_buf[i] = (i << 24) | 0xffffff; ++ } ++ for (i = 0; i != 256; ++i) { ++ test_line(d0, 0, s0, 0, i, 256, -1); ++ } ++ for (i = 0; i != 256; ++i) { ++ test_line(d0, 0, s0, 0, 128, i, -1); ++ } ++ ++ for (j = 0; j != 16; ++j) { ++ for (i = 0; i != 256; ++i) { ++ test_line(d0, j & 3, s0, j >> 2, i, 256, j); ++ } ++ PROFILE_PRINTF_N(j); ++ } ++ ++ printf("Done\n"); ++ ++ return 0; ++} ++ +--- a/modules/hw/mmal/codec.c ++++ b/modules/hw/mmal/codec.c +@@ -26,10 +26,12 @@ + #include "config.h" + #endif + ++#include <stdatomic.h> ++ + #include <vlc_common.h> +-#include <vlc_atomic.h> + #include <vlc_plugin.h> + #include <vlc_codec.h> ++#include <vlc_filter.h> + #include <vlc_threads.h> + + #include <bcm_host.h> +@@ -38,255 +40,380 @@ + #include <interface/mmal/util/mmal_default_components.h> + + #include "mmal_picture.h" ++#include "subpic.h" ++#include "blend_rgba_neon.h" ++ ++#define TRACE_ALL 0 + + /* + * This seems to be a bit high, but reducing it causes instabilities + */ +-#define NUM_EXTRA_BUFFERS 5 ++#define NUM_EXTRA_BUFFERS 3 ++//#define NUM_EXTRA_BUFFERS 6 ++//#define NUM_EXTRA_BUFFERS 10 + #define NUM_DECODER_BUFFER_HEADERS 30 + + #define MIN_NUM_BUFFERS_IN_TRANSIT 2 + ++#define MMAL_COMPONENT_DEFAULT_RESIZER "vc.ril.resize" ++#define MMAL_COMPONENT_ISP_RESIZER "vc.ril.isp" ++#define MMAL_COMPONENT_HVS "vc.ril.hvs" ++ ++#define MMAL_SLICE_HEIGHT 16 ++#define MMAL_ALIGN_W 32 ++#define MMAL_ALIGN_H 16 ++ + #define MMAL_OPAQUE_NAME "mmal-opaque" + #define MMAL_OPAQUE_TEXT N_("Decode frames directly into RPI VideoCore instead of host memory.") + #define MMAL_OPAQUE_LONGTEXT N_("Decode frames directly into RPI VideoCore instead of host memory. This option must only be used with the MMAL video output plugin.") + +-static int OpenDecoder(decoder_t *dec); +-static void CloseDecoder(decoder_t *dec); ++#define MMAL_RESIZE_NAME "mmal-resize" ++#define MMAL_RESIZE_TEXT N_("Use mmal resizer rather than hvs.") ++#define MMAL_RESIZE_LONGTEXT N_("Use mmal resizer rather than isp. This uses less gpu memory than the ISP but is slower.") ++ ++#define MMAL_ISP_NAME "mmal-isp" ++#define MMAL_ISP_TEXT N_("Use mmal isp rather than hvs.") ++#define MMAL_ISP_LONGTEXT N_("Use mmal isp rather than hvs. This may be faster but has no blend.") + +-vlc_module_begin() +- set_shortname(N_("MMAL decoder")) +- set_description(N_("MMAL-based decoder plugin for Raspberry Pi")) +- set_capability("video decoder", 90) +- add_shortcut("mmal_decoder") +- add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false) +- set_callbacks(OpenDecoder, CloseDecoder) +-vlc_module_end() + +-struct decoder_sys_t { +- bool opaque; ++typedef struct decoder_sys_t ++{ + MMAL_COMPONENT_T *component; + MMAL_PORT_T *input; + MMAL_POOL_T *input_pool; + MMAL_PORT_T *output; +- MMAL_POOL_T *output_pool; /* only used for non-opaque mode */ ++ hw_mmal_port_pool_ref_t *ppr; + MMAL_ES_FORMAT_T *output_format; +- vlc_sem_t sem; + ++ MMAL_STATUS_T err_stream; + bool b_top_field_first; + bool b_progressive; + ++ bool b_flushed; ++ + /* statistics */ +- int output_in_transit; +- int input_in_transit; + atomic_bool started; +-}; ++} decoder_sys_t; + +-/* Utilities */ +-static int change_output_format(decoder_t *dec); +-static int send_output_buffer(decoder_t *dec); +-static void fill_output_port(decoder_t *dec); +- +-/* VLC decoder callback */ +-static int decode(decoder_t *dec, block_t *block); +-static void flush_decoder(decoder_t *dec); +- +-/* MMAL callbacks */ +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); + +-static int OpenDecoder(decoder_t *dec) ++typedef struct supported_mmal_enc_s { ++ struct { ++ MMAL_PARAMETER_HEADER_T header; ++ MMAL_FOURCC_T encodings[64]; ++ } supported; ++ int n; ++} supported_mmal_enc_t; ++ ++static supported_mmal_enc_t supported_mmal_enc = + { +- int ret = VLC_SUCCESS; +- decoder_sys_t *sys; +- MMAL_PARAMETER_UINT32_T extra_buffers; +- MMAL_STATUS_T status; ++ {{MMAL_PARAMETER_SUPPORTED_ENCODINGS, sizeof(((supported_mmal_enc_t *)0)->supported)}, {0}}, ++ -1 ++}; + +- if (dec->fmt_in.i_codec != VLC_CODEC_MPGV && +- dec->fmt_in.i_codec != VLC_CODEC_H264) +- return VLC_EGENERIC; ++#if TRACE_ALL || 1 ++static const char * str_fourcc(char * buf, unsigned int fcc) ++{ ++ if (fcc == 0) ++ return "----"; ++ buf[0] = (fcc >> 0) & 0xff; ++ buf[1] = (fcc >> 8) & 0xff; ++ buf[2] = (fcc >> 16) & 0xff; ++ buf[3] = (fcc >> 24) & 0xff; ++ buf[4] = 0; ++ return buf; ++} ++#endif + +- sys = calloc(1, sizeof(decoder_sys_t)); +- if (!sys) { +- ret = VLC_ENOMEM; +- goto out; ++static bool is_enc_supported(const MMAL_FOURCC_T fcc) ++{ ++ int i; ++ ++ if (fcc == 0) ++ return false; ++ if (supported_mmal_enc.n == -1) ++ return true; // Unknown - say OK ++ for (i = 0; i < supported_mmal_enc.n; ++i) { ++ if (supported_mmal_enc.supported.encodings[i] == fcc) ++ return true; + } +- dec->p_sys = sys; ++ return false; ++} + +- sys->opaque = var_InheritBool(dec, MMAL_OPAQUE_NAME); +- bcm_host_init(); ++static bool set_and_test_enc_supported(MMAL_PORT_T * port, const MMAL_FOURCC_T fcc) ++{ ++ if (supported_mmal_enc.n >= 0) ++ /* already done */; ++ else if (mmal_port_parameter_get(port, (MMAL_PARAMETER_HEADER_T *)&supported_mmal_enc.supported) != MMAL_SUCCESS) ++ supported_mmal_enc.n = 0; ++ else ++ supported_mmal_enc.n = (supported_mmal_enc.supported.header.size - sizeof(supported_mmal_enc.supported.header)) / ++ sizeof(supported_mmal_enc.supported.encodings[0]); + +- status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, &sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to create MMAL component %s (status=%"PRIx32" %s)", +- MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++ return is_enc_supported(fcc); ++} + +- sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)dec; +- status = mmal_port_enable(sys->component->control, control_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to enable control port %s (status=%"PRIx32" %s)", +- sys->component->control->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++static MMAL_FOURCC_T vlc_to_mmal_es_fourcc(const unsigned int fcc) ++{ ++ switch (fcc){ ++ case VLC_CODEC_MJPG: ++ return MMAL_ENCODING_MJPEG; ++ case VLC_CODEC_MP1V: ++ return MMAL_ENCODING_MP1V; ++ case VLC_CODEC_MPGV: ++ case VLC_CODEC_MP2V: ++ return MMAL_ENCODING_MP2V; ++ case VLC_CODEC_H263: ++ return MMAL_ENCODING_H263; ++ case VLC_CODEC_MP4V: ++ return MMAL_ENCODING_MP4V; ++ case VLC_CODEC_H264: ++ return MMAL_ENCODING_H264; ++ case VLC_CODEC_VP6: ++ return MMAL_ENCODING_VP6; ++ case VLC_CODEC_VP8: ++ return MMAL_ENCODING_VP8; ++ case VLC_CODEC_WMV1: ++ return MMAL_ENCODING_WMV1; ++ case VLC_CODEC_WMV2: ++ return MMAL_ENCODING_WMV2; ++ case VLC_CODEC_WMV3: ++ return MMAL_ENCODING_WMV3; ++ case VLC_CODEC_VC1: ++ return MMAL_ENCODING_WVC1; ++ case VLC_CODEC_THEORA: ++ return MMAL_ENCODING_THEORA; ++ default: ++ break; + } ++ return 0; ++} + +- sys->input = sys->component->input[0]; +- sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)dec; +- if (dec->fmt_in.i_codec == VLC_CODEC_MPGV) +- sys->input->format->encoding = MMAL_ENCODING_MP2V; +- else +- sys->input->format->encoding = MMAL_ENCODING_H264; +- +- if (dec->fmt_in.i_codec == VLC_CODEC_H264) { +- if (dec->fmt_in.i_extra > 0) { +- status = mmal_format_extradata_alloc(sys->input->format, +- dec->fmt_in.i_extra); +- if (status == MMAL_SUCCESS) { +- memcpy(sys->input->format->extradata, dec->fmt_in.p_extra, +- dec->fmt_in.i_extra); +- sys->input->format->extradata_size = dec->fmt_in.i_extra; +- } else { +- msg_Err(dec, "Failed to allocate extra format data on input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- } +- } ++static MMAL_FOURCC_T vlc_to_mmal_pic_fourcc(const unsigned int fcc) ++{ ++ switch (fcc){ ++ case VLC_CODEC_I420: ++ return MMAL_ENCODING_I420; ++ case VLC_CODEC_RGB32: // _RGB32 doesn't exist in mmal magic mapping table ++ case VLC_CODEC_RGBA: ++ return MMAL_ENCODING_BGRA; ++ case VLC_CODEC_MMAL_OPAQUE: ++ return MMAL_ENCODING_OPAQUE; ++ default: ++ break; + } ++ return 0; ++} + +- status = mmal_port_format_commit(sys->input); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to commit format for input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++static MMAL_FOURCC_T pic_to_slice_mmal_fourcc(const MMAL_FOURCC_T fcc) ++{ ++ switch (fcc){ ++ case MMAL_ENCODING_I420: ++ return MMAL_ENCODING_I420_SLICE; ++ case MMAL_ENCODING_I422: ++ return MMAL_ENCODING_I422_SLICE; ++ case MMAL_ENCODING_ARGB: ++ return MMAL_ENCODING_ARGB_SLICE; ++ case MMAL_ENCODING_RGBA: ++ return MMAL_ENCODING_RGBA_SLICE; ++ case MMAL_ENCODING_ABGR: ++ return MMAL_ENCODING_ABGR_SLICE; ++ case MMAL_ENCODING_BGRA: ++ return MMAL_ENCODING_BGRA_SLICE; ++ case MMAL_ENCODING_RGB16: ++ return MMAL_ENCODING_RGB16_SLICE; ++ case MMAL_ENCODING_RGB24: ++ return MMAL_ENCODING_RGB24_SLICE; ++ case MMAL_ENCODING_RGB32: ++ return MMAL_ENCODING_RGB32_SLICE; ++ case MMAL_ENCODING_BGR16: ++ return MMAL_ENCODING_BGR16_SLICE; ++ case MMAL_ENCODING_BGR24: ++ return MMAL_ENCODING_BGR24_SLICE; ++ case MMAL_ENCODING_BGR32: ++ return MMAL_ENCODING_BGR32_SLICE; ++ default: ++ break; + } +- sys->input->buffer_size = sys->input->buffer_size_recommended; +- sys->input->buffer_num = sys->input->buffer_num_recommended; ++ return 0; ++} + +- status = mmal_port_enable(sys->input, input_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to enable input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++#if 0 ++static inline void draw_line(void * pic_buf, size_t pic_stride, unsigned int x, unsigned int y, unsigned int len, int inc) ++{ ++ uint32_t * p = (uint32_t *)pic_buf + y * pic_stride + x; ++ while (len-- != 0) { ++ *p = ~0U; ++ p += inc; + } ++} + +- sys->output = sys->component->output[0]; +- sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)dec; + +- if (sys->opaque) { +- extra_buffers.hdr.id = MMAL_PARAMETER_EXTRA_BUFFERS; +- extra_buffers.hdr.size = sizeof(MMAL_PARAMETER_UINT32_T); +- extra_buffers.value = NUM_EXTRA_BUFFERS; +- status = mmal_port_parameter_set(sys->output, &extra_buffers.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++static void draw_corners(void * pic_buf, size_t pic_stride, unsigned int x, unsigned int y, unsigned int w, unsigned int h) ++{ ++ const unsigned int len = 20; ++ draw_line(pic_buf, pic_stride, x, y, len, 1); ++ draw_line(pic_buf, pic_stride, x, y, len, pic_stride); ++ draw_line(pic_buf, pic_stride, x + w - 1, y, len, -1); ++ draw_line(pic_buf, pic_stride, x + w - 1, y, len, pic_stride); ++ draw_line(pic_buf, pic_stride, x + w - 1, y + h - 1, len, -1); ++ draw_line(pic_buf, pic_stride, x + w - 1, y + h - 1, len, -(int)pic_stride); ++ draw_line(pic_buf, pic_stride, x, y + h - 1, len, 1); ++ draw_line(pic_buf, pic_stride, x, y + h - 1, len, -(int)pic_stride); ++} ++#endif + +- msg_Dbg(dec, "Activate zero-copy for output port"); +- MMAL_PARAMETER_BOOLEAN_T zero_copy = { +- { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, +- 1 +- }; ++// Buffer either attached to pic or released ++static picture_t * alloc_opaque_pic(decoder_t * const dec, MMAL_BUFFER_HEADER_T * const buf) ++{ ++ decoder_sys_t *const dec_sys = dec->p_sys; ++ picture_t * const pic = decoder_NewPicture(dec); + +- status = mmal_port_parameter_set(sys->output, &zero_copy.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", +- sys->output->name, status, mmal_status_to_string(status)); +- goto out; +- } +- } ++ if (pic == NULL) ++ goto fail1; + +- status = mmal_port_enable(sys->output, output_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to enable output port %s (status=%"PRIx32" %s)", +- sys->output->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++ if (buf->length == 0) { ++ msg_Err(dec, "%s: Empty buffer", __func__); ++ goto fail2; + } + +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++ if ((pic->context = hw_mmal_gen_context(buf, dec_sys->ppr)) == NULL) ++ goto fail2; + +- sys->input_pool = mmal_pool_create(sys->input->buffer_num, 0); ++ buf_to_pic_copy_props(pic, buf); + +- if (sys->opaque) { +- dec->fmt_out.i_codec = VLC_CODEC_MMAL_OPAQUE; +- dec->fmt_out.video.i_chroma = VLC_CODEC_MMAL_OPAQUE; +- } else { +- dec->fmt_out.i_codec = VLC_CODEC_I420; +- dec->fmt_out.video.i_chroma = VLC_CODEC_I420; ++#if TRACE_ALL ++ msg_Dbg(dec, "pic: prog=%d, tff=%d, date=%lld", pic->b_progressive, pic->b_top_field_first, (long long)pic->date); ++#endif ++ ++ return pic; ++ ++fail2: ++ picture_Release(pic); ++fail1: ++ // * maybe should recycle rather than release? ++ mmal_buffer_header_release(buf); ++ return NULL; ++} ++ ++static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ ++ decoder_t *dec = (decoder_t *)port->userdata; ++ MMAL_STATUS_T status; ++ ++#if TRACE_ALL ++ msg_Dbg(dec, "<<< %s: cmd=%d, data=%p", __func__, buffer->cmd, buffer->data); ++#endif ++ ++ if (buffer->cmd == MMAL_EVENT_ERROR) { ++ status = *(uint32_t *)buffer->data; ++ dec->p_sys->err_stream = status; ++ msg_Err(dec, "MMAL error %"PRIx32" \"%s\"", status, ++ mmal_status_to_string(status)); + } + +- dec->pf_decode = decode; +- dec->pf_flush = flush_decoder; ++ mmal_buffer_header_release(buffer); ++} ++ ++static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ ++ block_t * const block = (block_t *)buffer->user_data; + +- vlc_sem_init(&sys->sem, 0); ++ (void)port; // Unused + +-out: +- if (ret != VLC_SUCCESS) +- CloseDecoder(dec); ++#if TRACE_ALL ++ msg_Dbg((decoder_t *)port->userdata, "<<< %s: cmd=%d, data=%p, len=%d/%d, pts=%lld", __func__, ++ buffer->cmd, buffer->data, buffer->length, buffer->alloc_size, (long long)buffer->pts); ++#endif + +- return ret; ++ mmal_buffer_header_reset(buffer); ++ mmal_buffer_header_release(buffer); ++ ++ if (block != NULL) ++ block_Release(block); + } + +-static void CloseDecoder(decoder_t *dec) ++static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) + { +- decoder_sys_t *sys = dec->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; ++ // decoder structure only guaranteed valid if we have contents + +- if (!sys) ++ if (buffer->cmd == 0 && buffer->length != 0) ++ { ++ decoder_t * const dec = (decoder_t *)port->userdata; ++ ++#if TRACE_ALL ++ msg_Dbg((decoder_t *)port->userdata, "<<< %s: cmd=%d, data=%p, len=%d/%d, pts=%lld", __func__, ++ buffer->cmd, buffer->data, buffer->length, buffer->alloc_size, (long long)buffer->pts); ++#endif ++ ++ picture_t *pic = alloc_opaque_pic(dec, buffer); ++#if TRACE_ALL ++ msg_Dbg(dec, "flags=%#x, video flags=%#x", buffer->flags, buffer->type->video.flags); ++#endif ++ if (pic == NULL) ++ msg_Err(dec, "Failed to allocate new picture"); ++ else ++ decoder_QueueVideo(dec, pic); ++ // Buffer released or attached to pic - do not release again + return; ++ } ++ else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) ++ { ++ decoder_t * const dec = (decoder_t *)port->userdata; ++ decoder_sys_t * const sys = dec->p_sys; ++ MMAL_EVENT_FORMAT_CHANGED_T * const fmt = mmal_event_format_changed_get(buffer); ++ MMAL_ES_FORMAT_T * const format = mmal_format_alloc(); + +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); ++ if (format == NULL) ++ msg_Err(dec, "Failed to allocate new format"); ++ else ++ { ++ mmal_format_full_copy(format, fmt->format); ++ format->encoding = MMAL_ENCODING_OPAQUE; + +- if (sys->input && sys->input->is_enabled) +- mmal_port_disable(sys->input); ++ if (sys->output_format != NULL) ++ mmal_format_free(sys->output_format); + +- if (sys->output && sys->output->is_enabled) +- mmal_port_disable(sys->output); ++ sys->output_format = format; ++ } ++ } + +- if (sys->component && sys->component->is_enabled) +- mmal_component_disable(sys->component); ++ mmal_buffer_header_reset(buffer); ++ buffer->user_data = NULL; ++ mmal_buffer_header_release(buffer); ++} + +- if (sys->input_pool) +- mmal_pool_destroy(sys->input_pool); + +- if (sys->output_format) +- mmal_format_free(sys->output_format); + +- if (sys->output_pool) +- mmal_pool_destroy(sys->output_pool); ++static void fill_output_port(decoder_t *dec) ++{ ++ decoder_sys_t *sys = dec->p_sys; + +- if (sys->component) +- mmal_component_release(sys->component); ++ if (decoder_UpdateVideoFormat(dec) != 0) ++ { ++ // If we have a new format don't bother stuffing the buffer ++ // We should get a reset RSN ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: Updated", __func__); ++#endif + +- vlc_sem_destroy(&sys->sem); +- free(sys); ++ return; ++ } + +- bcm_host_deinit(); ++ hw_mmal_port_pool_ref_fill(sys->ppr); ++ return; + } + + static int change_output_format(decoder_t *dec) + { + MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T interlace_type; +- decoder_sys_t *sys = dec->p_sys; ++ decoder_sys_t * const sys = dec->p_sys; + MMAL_STATUS_T status; +- int pool_size; + int ret = 0; + ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: <<<", __func__); ++#endif ++ + if (atomic_load(&sys->started)) { + mmal_format_full_copy(sys->output->format, sys->output_format); + status = mmal_port_format_commit(sys->output); +@@ -300,7 +427,9 @@ + } + + port_reset: ++#if TRACE_ALL + msg_Dbg(dec, "%s: Do full port reset", __func__); ++#endif + status = mmal_port_disable(sys->output); + if (status != MMAL_SUCCESS) { + msg_Err(dec, "Failed to disable output port (status=%"PRIx32" %s)", +@@ -318,15 +447,7 @@ + goto out; + } + +- if (sys->opaque) { +- sys->output->buffer_num = NUM_DECODER_BUFFER_HEADERS; +- pool_size = NUM_DECODER_BUFFER_HEADERS; +- } else { +- sys->output->buffer_num = __MAX(sys->output->buffer_num_recommended, +- MIN_NUM_BUFFERS_IN_TRANSIT); +- pool_size = sys->output->buffer_num; +- } +- ++ sys->output->buffer_num = NUM_DECODER_BUFFER_HEADERS; + sys->output->buffer_size = sys->output->buffer_size_recommended; + + status = mmal_port_enable(sys->output, output_port_cb); +@@ -338,25 +459,14 @@ + } + + if (!atomic_load(&sys->started)) { +- if (!sys->opaque) { +- sys->output_pool = mmal_port_pool_create(sys->output, pool_size, 0); +- msg_Dbg(dec, "Created output pool with %d pictures", sys->output_pool->headers_num); +- } +- + atomic_store(&sys->started, true); + + /* we need one picture from vout for each buffer header on the output + * port */ +- dec->i_extra_picture_buffers = pool_size; +- +- /* remove what VLC core reserves as it is part of the pool_size +- * already */ +- if (dec->fmt_in.i_codec == VLC_CODEC_H264) +- dec->i_extra_picture_buffers -= 19; +- else +- dec->i_extra_picture_buffers -= 3; +- ++ dec->i_extra_picture_buffers = 10; ++#if TRACE_ALL + msg_Dbg(dec, "Request %d extra pictures", dec->i_extra_picture_buffers); ++#endif + } + + apply_fmt: +@@ -382,12 +492,17 @@ + sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive); + sys->b_top_field_first = sys->b_progressive ? true : + (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst); ++#if TRACE_ALL + msg_Dbg(dec, "Detected %s%s video (%d)", + sys->b_progressive ? "progressive" : "interlaced", + sys->b_progressive ? "" : (sys->b_top_field_first ? " tff" : " bff"), + interlace_type.eMode); ++#endif + } + ++ // Tell the reset of the world we have changed format ++ ret = decoder_UpdateVideoFormat(dec); ++ + out: + mmal_format_free(sys->output_format); + sys->output_format = NULL; +@@ -395,144 +510,85 @@ + return ret; + } + +-static int send_output_buffer(decoder_t *dec) ++static MMAL_STATUS_T ++set_extradata_and_commit(decoder_t * const dec, decoder_sys_t * const sys) + { +- decoder_sys_t *sys = dec->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; +- picture_sys_t *p_sys; +- picture_t *picture = NULL; + MMAL_STATUS_T status; +- unsigned buffer_size = 0; +- int ret = 0; + +- if (!sys->output->is_enabled) +- return VLC_EGENERIC; +- +- /* If local output pool is allocated, use it - this is only the case for +- * non-opaque modes */ +- if (sys->output_pool) { +- buffer = mmal_queue_get(sys->output_pool->queue); +- if (!buffer) { +- msg_Warn(dec, "Failed to get new buffer"); +- return VLC_EGENERIC; +- } +- } +- +- if (!decoder_UpdateVideoFormat(dec)) +- picture = decoder_NewPicture(dec); +- if (!picture) { +- msg_Warn(dec, "Failed to get new picture"); +- ret = -1; +- goto err; +- } +- +- p_sys = picture->p_sys; +- for (int i = 0; i < picture->i_planes; i++) +- buffer_size += picture->p[i].i_lines * picture->p[i].i_pitch; +- +- if (sys->output_pool) { +- mmal_buffer_header_reset(buffer); +- buffer->alloc_size = sys->output->buffer_size; +- if (buffer_size < sys->output->buffer_size) { +- msg_Err(dec, "Retrieved picture with too small data block (%d < %d)", +- buffer_size, sys->output->buffer_size); +- ret = VLC_EGENERIC; +- goto err; +- } +- +- if (!sys->opaque) +- buffer->data = picture->p[0].p_pixels; +- } else { +- buffer = p_sys->buffer; +- if (!buffer) { +- msg_Warn(dec, "Picture has no buffer attached"); +- picture_Release(picture); +- return VLC_EGENERIC; +- } +- buffer->data = p_sys->buffer->data; +- } +- buffer->user_data = picture; +- buffer->cmd = 0; +- +- status = mmal_port_send_buffer(sys->output, buffer); ++ status = mmal_port_format_commit(sys->input); + if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to send buffer to output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- ret = -1; +- goto err; +- } +- atomic_fetch_add(&sys->output_in_transit, 1); +- +- return ret; +- +-err: +- if (picture) +- picture_Release(picture); +- if (sys->output_pool && buffer) { +- buffer->data = NULL; +- mmal_buffer_header_release(buffer); ++ msg_Err(dec, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); + } +- return ret; ++ return status; + } + +-static void fill_output_port(decoder_t *dec) ++static MMAL_STATUS_T decoder_send_extradata(decoder_t * const dec, decoder_sys_t *const sys) + { +- decoder_sys_t *sys = dec->p_sys; +- +- unsigned max_buffers_in_transit = 0; +- int buffers_available = 0; +- int buffers_to_send = 0; +- int i; ++ if (dec->fmt_in.i_codec == VLC_CODEC_H264 && ++ dec->fmt_in.i_extra > 0) ++ { ++ MMAL_BUFFER_HEADER_T * const buf = mmal_queue_wait(sys->input_pool->queue); ++ MMAL_STATUS_T status; ++ ++ mmal_buffer_header_reset(buf); ++ buf->cmd = 0; ++ buf->user_data = NULL; ++ buf->alloc_size = sys->input->buffer_size; ++ buf->length = dec->fmt_in.i_extra; ++ buf->data = dec->fmt_in.p_extra; ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_CONFIG; + +- if (sys->output_pool) { +- max_buffers_in_transit = __MAX(sys->output_pool->headers_num, +- MIN_NUM_BUFFERS_IN_TRANSIT); +- buffers_available = mmal_queue_length(sys->output_pool->queue); +- } else { +- max_buffers_in_transit = NUM_DECODER_BUFFER_HEADERS; +- buffers_available = NUM_DECODER_BUFFER_HEADERS - atomic_load(&sys->output_in_transit); ++ status = mmal_port_send_buffer(sys->input, buf); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to send extradata buffer to input port (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ return status; ++ } + } +- buffers_to_send = max_buffers_in_transit - atomic_load(&sys->output_in_transit); +- +- if (buffers_to_send > buffers_available) +- buffers_to_send = buffers_available; + +-#ifndef NDEBUG +- msg_Dbg(dec, "Send %d buffers to output port (available: %d, " +- "in_transit: %d, buffer_num: %d)", +- buffers_to_send, buffers_available, +- atomic_load(&sys->output_in_transit), +- sys->output->buffer_num); +-#endif +- for (i = 0; i < buffers_to_send; ++i) +- if (send_output_buffer(dec) < 0) +- break; ++ return MMAL_SUCCESS; + } + + static void flush_decoder(decoder_t *dec) + { +- decoder_sys_t *sys = dec->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; +- MMAL_STATUS_T status; ++ decoder_sys_t *const sys = dec->p_sys; + +- msg_Dbg(dec, "Flushing decoder ports..."); +- mmal_port_flush(sys->output); +- mmal_port_flush(sys->input); +- +- while (atomic_load(&sys->output_in_transit) || +- atomic_load(&sys->input_in_transit)) +- vlc_sem_wait(&sys->sem); ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: <<<", __func__); ++#endif ++ ++ if (!sys->b_flushed) { ++ mmal_port_disable(sys->input); ++ mmal_port_disable(sys->output); ++ // We can leave the input disabled, but we want the output enabled ++ // in order to sink any buffers returning from other modules ++ mmal_port_enable(sys->output, output_port_cb); ++ sys->b_flushed = true; ++ } ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: >>>", __func__); ++#endif + } + + static int decode(decoder_t *dec, block_t *block) + { + decoder_sys_t *sys = dec->p_sys; + MMAL_BUFFER_HEADER_T *buffer; +- bool need_flush = false; + uint32_t len; + uint32_t flags = 0; + MMAL_STATUS_T status; + ++#if TRACE_ALL ++ msg_Dbg(dec, "<<< %s: %lld/%lld", __func__, block == NULL ? -1LL : block->i_dts, block == NULL ? -1LL : block->i_pts); ++#endif ++ ++ if (sys->err_stream != MMAL_SUCCESS) { ++ msg_Err(dec, "MMAL error reported by ctrl"); ++ flush_decoder(dec); ++ return VLCDEC_ECRITICAL; /// I think they are all fatal ++ } ++ + /* + * Configure output port if necessary + */ +@@ -541,18 +597,50 @@ + msg_Err(dec, "Failed to change output port format"); + } + +- if (!block) +- goto out; ++ if (block == NULL) ++ return VLCDEC_SUCCESS; + + /* + * Check whether full flush is required + */ +- if (block && block->i_flags & BLOCK_FLAG_DISCONTINUITY) { ++ if (block->i_flags & BLOCK_FLAG_DISCONTINUITY) { ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: >>> Discontinuity", __func__); ++#endif + flush_decoder(dec); ++ } ++ ++ if (block->i_buffer == 0) ++ { + block_Release(block); + return VLCDEC_SUCCESS; + } + ++ // Reenable stuff if the last thing we did was flush ++ if (!sys->output->is_enabled && ++ (status = mmal_port_enable(sys->output, output_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(dec, "Output port enable failed"); ++ goto fail; ++ } ++ ++ if (!sys->input->is_enabled) ++ { ++ if ((status = set_extradata_and_commit(dec, sys)) != MMAL_SUCCESS) ++ goto fail; ++ ++ if ((status = mmal_port_enable(sys->input, input_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(dec, "Input port enable failed"); ++ goto fail; ++ } ++ ++ if ((status = decoder_send_extradata(dec, sys)) != MMAL_SUCCESS) ++ goto fail; ++ } ++ ++ // *** We cannot get a picture to put the result in 'till we have ++ // reported the size & the output stages have been set up + if (atomic_load(&sys->started)) + fill_output_port(dec); + +@@ -563,18 +651,21 @@ + if (block->i_flags & BLOCK_FLAG_CORRUPTED) + flags |= MMAL_BUFFER_HEADER_FLAG_CORRUPTED; + +- while (block && block->i_buffer > 0) { +- buffer = mmal_queue_timedwait(sys->input_pool->queue, 100); ++ while (block != NULL) ++ { ++ buffer = mmal_queue_wait(sys->input_pool->queue); + if (!buffer) { + msg_Err(dec, "Failed to retrieve buffer header for input data"); +- need_flush = true; +- break; ++ goto fail; + } ++ + mmal_buffer_header_reset(buffer); + buffer->cmd = 0; +- buffer->pts = block->i_pts != 0 ? block->i_pts : block->i_dts; ++ buffer->pts = block->i_pts != VLC_TICK_INVALID ? block->i_pts : ++ block->i_dts != VLC_TICK_INVALID ? block->i_dts : MMAL_TIME_UNKNOWN; + buffer->dts = block->i_dts; + buffer->alloc_size = sys->input->buffer_size; ++ buffer->user_data = NULL; + + len = block->i_buffer; + if (len > buffer->alloc_size) +@@ -590,89 +681,1304 @@ + } + buffer->flags = flags; + ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: -- Send buffer: len=%d", __func__, len); ++#endif + status = mmal_port_send_buffer(sys->input, buffer); + if (status != MMAL_SUCCESS) { + msg_Err(dec, "Failed to send buffer to input port (status=%"PRIx32" %s)", + status, mmal_status_to_string(status)); +- break; ++ goto fail; + } +- atomic_fetch_add(&sys->input_in_transit, 1); ++ ++ // Reset flushed flag once we have sent a buf ++ sys->b_flushed = false; + } ++ return VLCDEC_SUCCESS; + +-out: +- if (need_flush) +- flush_decoder(dec); ++fail: ++ flush_decoder(dec); ++ return VLCDEC_ECRITICAL; + +- return VLCDEC_SUCCESS; + } + +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++ ++static void CloseDecoder(decoder_t *dec) + { +- decoder_t *dec = (decoder_t *)port->userdata; ++ decoder_sys_t *sys = dec->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: <<<", __func__); ++#endif ++ ++ if (!sys) ++ return; ++ ++ if (sys->component != NULL) { ++ if (sys->input->is_enabled) ++ mmal_port_disable(sys->input); ++ ++ if (sys->output->is_enabled) ++ mmal_port_disable(sys->output); ++ ++ if (sys->component->control->is_enabled) ++ mmal_port_disable(sys->component->control); ++ ++ if (sys->component->is_enabled) ++ mmal_component_disable(sys->component); ++ ++ mmal_component_release(sys->component); ++ } ++ ++ if (sys->input_pool != NULL) ++ mmal_pool_destroy(sys->input_pool); ++ ++ if (sys->output_format != NULL) ++ mmal_format_free(sys->output_format); ++ ++ hw_mmal_port_pool_ref_release(sys->ppr, false); ++ ++ free(sys); ++ ++ bcm_host_deinit(); ++} ++ ++static int OpenDecoder(decoder_t *dec) ++{ ++ int ret = VLC_EGENERIC; ++ decoder_sys_t *sys; + MMAL_STATUS_T status; ++ const MMAL_FOURCC_T in_fcc = vlc_to_mmal_es_fourcc(dec->fmt_in.i_codec); ++ ++#if TRACE_ALL ++ { ++ char buf1[5], buf2[5], buf2a[5]; ++ char buf3[5], buf4[5]; ++ msg_Dbg(dec, "%s: <<< (%s/%s)[%s] %dx%d -> (%s/%s) %dx%d", __func__, ++ str_fourcc(buf1, dec->fmt_in.i_codec), ++ str_fourcc(buf2, dec->fmt_in.video.i_chroma), ++ str_fourcc(buf2a, in_fcc), ++ dec->fmt_in.video.i_width, dec->fmt_in.video.i_height, ++ str_fourcc(buf3, dec->fmt_out.i_codec), ++ str_fourcc(buf4, dec->fmt_out.video.i_chroma), ++ dec->fmt_out.video.i_width, dec->fmt_out.video.i_height); ++ } ++#endif ++ ++ if (!is_enc_supported(in_fcc)) ++ return VLC_EGENERIC; ++ ++ sys = calloc(1, sizeof(decoder_sys_t)); ++ if (!sys) { ++ ret = VLC_ENOMEM; ++ goto fail; ++ } ++ dec->p_sys = sys; ++ ++ bcm_host_init(); ++ ++ sys->err_stream = MMAL_SUCCESS; ++ ++ status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, &sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to create MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->input = sys->component->input[0]; ++ sys->output = sys->component->output[0]; ++ ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)dec; ++ sys->input->format->encoding = in_fcc; ++ ++ if (!set_and_test_enc_supported(sys->input, in_fcc)) { ++#if TRACE_ALL ++ char cbuf[5]; ++ msg_Dbg(dec, "Format not supported: %s", str_fourcc(cbuf, in_fcc)); ++#endif ++ goto fail; ++ } ++ ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)dec; ++ status = mmal_port_enable(sys->component->control, control_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ if ((status = set_extradata_and_commit(dec, sys)) != MMAL_SUCCESS) ++ goto fail; ++ ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = sys->input->buffer_num_recommended; ++ ++ status = mmal_port_enable(sys->input, input_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)dec; ++ ++ status = port_parameter_set_uint32(sys->output, MMAL_PARAMETER_EXTRA_BUFFERS, NUM_EXTRA_BUFFERS); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ status = port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, 1); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->output->format->encoding = MMAL_ENCODING_OPAQUE; ++ if ((status = mmal_port_format_commit(sys->output)) != MMAL_SUCCESS) ++ { ++ msg_Err(dec, "Failed to commit format on port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->output->buffer_num = NUM_DECODER_BUFFER_HEADERS; ++ sys->output->buffer_size = sys->output->buffer_size_recommended; ++ ++ sys->ppr = hw_mmal_port_pool_ref_create(sys->output, NUM_DECODER_BUFFER_HEADERS, sys->output->buffer_size); ++ if (sys->ppr == NULL) { ++ msg_Err(dec, "Failed to create output pool"); ++ goto fail; ++ } ++ ++ status = mmal_port_enable(sys->output, output_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to enable output port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ status = mmal_component_enable(sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(dec, "Failed to enable component %s (status=%"PRIx32" %s)", ++ sys->component->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ if ((sys->input_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(dec, "Failed to create input pool"); ++ goto fail; ++ } ++ ++ sys->b_flushed = true; ++ dec->fmt_out.i_codec = VLC_CODEC_MMAL_OPAQUE; ++ dec->fmt_out.video.i_chroma = VLC_CODEC_MMAL_OPAQUE; ++ ++ if ((status = decoder_send_extradata(dec, sys)) != MMAL_SUCCESS) ++ goto fail; ++ ++ dec->pf_decode = decode; ++ dec->pf_flush = flush_decoder; ++ ++#if TRACE_ALL ++ msg_Dbg(dec, ">>> %s: ok", __func__); ++#endif ++ return 0; ++ ++fail: ++ CloseDecoder(dec); ++#if TRACE_ALL ++msg_Dbg(dec, ">>> %s: FAIL: ret=%d", __func__, ret); ++#endif ++ return ret; ++} ++ ++// ---------------------------- ++ ++#define CONV_MAX_LATENCY 1 // In frames ++ ++typedef struct pic_fifo_s { ++ picture_t * head; ++ picture_t * tail; ++} pic_fifo_t; ++ ++static inline picture_t * pic_fifo_get(pic_fifo_t * const pf) ++{ ++ picture_t * const pic = pf->head;; ++ if (pic != NULL) { ++ pf->head = pic->p_next; ++ pic->p_next = NULL; ++ } ++ return pic; ++} ++ ++static inline picture_t * pic_fifo_get_all(pic_fifo_t * const pf) ++{ ++ picture_t * const pic = pf->head;; ++ pf->head = NULL; ++ return pic; ++} ++ ++static inline void pic_fifo_release_all(pic_fifo_t * const pf) ++{ ++ picture_t * pic; ++ while ((pic = pic_fifo_get(pf)) != NULL) { ++ picture_Release(pic); ++ } ++} ++ ++static inline void pic_fifo_init(pic_fifo_t * const pf) ++{ ++ pf->head = NULL; ++ pf->tail = NULL; // Not strictly needed ++} ++ ++static inline void pic_fifo_put(pic_fifo_t * const pf, picture_t * pic) ++{ ++ pic->p_next = NULL; ++ if (pf->head == NULL) ++ pf->head = pic; ++ else ++ pf->tail->p_next = pic; ++ pf->tail = pic; ++} ++ ++#define SUBS_MAX 3 ++ ++typedef struct filter_sys_t { ++ MMAL_COMPONENT_T *component; ++ MMAL_PORT_T *input; ++ MMAL_PORT_T *output; ++ MMAL_POOL_T *out_pool; // Free output buffers ++ MMAL_POOL_T *in_pool; // Input pool to get BH for replication ++ ++ subpic_reg_stash_t subs[SUBS_MAX]; ++ ++ pic_fifo_t ret_pics; ++ ++ vlc_sem_t sem; ++ vlc_mutex_t lock; ++ ++ bool b_top_field_first; ++ bool b_progressive; ++ ++ MMAL_STATUS_T err_stream; ++ int in_count; ++ ++ bool zero_copy; ++ const char * component_name; ++ MMAL_PORT_BH_CB_T in_port_cb_fn; ++ MMAL_PORT_BH_CB_T out_port_cb_fn; ++ ++ uint64_t frame_seq; ++ mtime_t pts_stash[16]; ++ ++ // Slice specific tracking stuff ++ struct { ++ pic_fifo_t pics; ++ unsigned int line; // Lines filled ++ } slice; ++ ++} filter_sys_t; ++ ++ ++static void pic_to_format(MMAL_ES_FORMAT_T * const es_fmt, const picture_t * const pic) ++{ ++ unsigned int bpp = (pic->format.i_bits_per_pixel + 7) >> 3; ++ MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; ++ ++ es_fmt->type = MMAL_ES_TYPE_VIDEO; ++ es_fmt->encoding_variant = es_fmt->encoding = ++ vlc_to_mmal_pic_fourcc(pic->format.i_chroma); ++ ++ // Fill in crop etc. ++ vlc_to_mmal_video_fmt(es_fmt, &pic->format); ++ // Override width / height with strides ++ v_fmt->width = pic->p[0].i_pitch / bpp; ++ v_fmt->height = pic->p[0].i_lines; ++} ++ ++ ++static MMAL_STATUS_T conv_enable_in(filter_t * const p_filter, filter_sys_t * const sys) ++{ ++ MMAL_STATUS_T err = MMAL_SUCCESS; ++ ++ if (!sys->input->is_enabled && ++ (err = mmal_port_enable(sys->input, sys->in_port_cb_fn)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, err, mmal_status_to_string(err)); ++ } ++ return err; ++} ++ ++static MMAL_STATUS_T conv_enable_out(filter_t * const p_filter, filter_sys_t * const sys) ++{ ++ MMAL_STATUS_T err = MMAL_SUCCESS; ++ ++ if (!sys->output->is_enabled && ++ (err = mmal_port_enable(sys->output, sys->out_port_cb_fn)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Failed to enable output port %s (status=%"PRIx32" %s)", ++ sys->output->name, err, mmal_status_to_string(err)); ++ } ++ return err; ++} ++ ++static void conv_control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s: <<< cmd=%d, data=%p, pic=%p", __func__, buffer->cmd, buffer->data, buffer->user_data); ++#endif + + if (buffer->cmd == MMAL_EVENT_ERROR) { +- status = *(uint32_t *)buffer->data; +- msg_Err(dec, "MMAL error %"PRIx32" \"%s\"", status, ++ MMAL_STATUS_T status = *(uint32_t *)buffer->data; ++ ++ p_filter->p_sys->err_stream = status; ++ ++ msg_Err(p_filter, "MMAL error %"PRIx32" \"%s\"", status, + mmal_status_to_string(status)); + } + + mmal_buffer_header_release(buffer); + } + +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++static void conv_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) + { +- block_t *block = (block_t *)buffer->user_data; +- decoder_t *dec = (decoder_t *)port->userdata; +- decoder_sys_t *sys = dec->p_sys; +- buffer->user_data = NULL; ++#if TRACE_ALL ++ picture_context_t * ctx = buf->user_data; ++// filter_sys_t *const sys = ((filter_t *)port->userdata)->p_sys; ++ ++ msg_Dbg((filter_t *)port->userdata, "<<< %s cmd=%d, ctx=%p, buf=%p, flags=%#x, len=%d/%d, pts=%lld", ++ __func__, buf->cmd, ctx, buf, buf->flags, buf->length, buf->alloc_size, (long long)buf->pts); ++#else ++ VLC_UNUSED(port); ++#endif ++ ++ mmal_buffer_header_release(buf); ++ ++#if TRACE_ALL ++ msg_Dbg((filter_t *)port->userdata, ">>> %s", __func__); ++#endif ++} ++ ++static void conv_out_q_pic(filter_sys_t * const sys, picture_t * const pic) ++{ ++ pic->p_next = NULL; ++ ++ vlc_mutex_lock(&sys->lock); ++ pic_fifo_put(&sys->ret_pics, pic); ++ vlc_mutex_unlock(&sys->lock); + +- mmal_buffer_header_release(buffer); +- if (block) +- block_Release(block); +- atomic_fetch_sub(&sys->input_in_transit, 1); + vlc_sem_post(&sys->sem); + } + +-static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++static void conv_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) + { +- decoder_t *dec = (decoder_t *)port->userdata; +- decoder_sys_t *sys = dec->p_sys; +- picture_t *picture; +- MMAL_EVENT_FORMAT_CHANGED_T *fmt; +- MMAL_ES_FORMAT_T *format; +- +- if (buffer->cmd == 0) { +- picture = (picture_t *)buffer->user_data; +- if (buffer->length > 0) { +- picture->date = buffer->pts; +- picture->b_progressive = sys->b_progressive; +- picture->b_top_field_first = sys->b_top_field_first; +- decoder_QueueVideo(dec, picture); +- } else { +- picture_Release(picture); +- if (sys->output_pool) { +- buffer->user_data = NULL; +- buffer->alloc_size = 0; +- buffer->data = NULL; +- mmal_buffer_header_release(buffer); ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ filter_sys_t * const sys = p_filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s: cmd=%d, flags=%#x, pic=%p, data=%p, len=%d/%d, pts=%lld/%lld", __func__, ++ buf->cmd, buf->flags, buf->user_data, buf->data, buf->length, buf->alloc_size, ++ (long long)buf->pts, (long long)sys->pts_stash[(unsigned int)(buf->pts & 0xf)]); ++#endif ++ if (buf->cmd == 0) { ++ picture_t * const pic = (picture_t *)buf->user_data; ++ ++ if (pic == NULL) { ++ msg_Err(p_filter, "%s: Buffer has no attached picture", __func__); ++ } ++ else if (buf->data == NULL || buf->length == 0) ++ { ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s: Buffer has no data", __func__); ++#endif ++ picture_Release(pic); ++ } ++ else ++ { ++ buf_to_pic_copy_props(pic, buf); ++ pic->date = sys->pts_stash[(unsigned int)(buf->pts & 0xf)]; ++ ++// draw_corners(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 0, 0, pic->p[0].i_visible_pitch / 4, pic->p[0].i_visible_lines); ++ ++ conv_out_q_pic(sys, pic); ++ } ++ } ++ ++ buf->user_data = NULL; // Zap here to make sure we can't reuse later ++ mmal_buffer_header_release(buf); ++} ++ ++ ++static void slice_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ filter_sys_t * const sys = p_filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s: cmd=%d, flags=%#x, pic=%p, data=%p, len=%d/%d, pts=%lld", __func__, ++ buf->cmd, buf->flags, buf->user_data, buf->data, buf->length, buf->alloc_size, (long long)buf->pts); ++#endif ++ ++ if (buf->cmd != 0) ++ { ++ mmal_buffer_header_release(buf); ++ return; ++ } ++ ++ if (buf->data == NULL || buf->length == 0) ++ { ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s: Buffer has no data", __func__); ++#endif ++ } ++ else ++ { ++ // Got slice ++ picture_t *pic = sys->slice.pics.head; ++ const unsigned int scale_lines = sys->output->format->es->video.height; // Expected lines of callback ++ ++ if (pic == NULL) { ++ msg_Err(p_filter, "No output picture"); ++ goto fail; ++ } ++ ++ // Copy lines ++ // * single plane only - fix for I420 ++ { ++ const unsigned int scale_n = __MIN(scale_lines - sys->slice.line, MMAL_SLICE_HEIGHT); ++ const unsigned int pic_lines = pic->p[0].i_lines; ++ const unsigned int copy_n = sys->slice.line + scale_n <= pic_lines ? scale_n : ++ sys->slice.line >= pic_lines ? 0 : ++ pic_lines - sys->slice.line; ++ ++ const unsigned int src_stride = buf->type->video.pitch[0]; ++ const unsigned int dst_stride = pic->p[0].i_pitch; ++ uint8_t *dst = pic->p[0].p_pixels + sys->slice.line * dst_stride; ++ const uint8_t *src = buf->data + buf->type->video.offset[0]; ++ ++ if (src_stride == dst_stride) { ++ if (copy_n != 0) ++ memcpy(dst, src, src_stride * copy_n); ++ } ++ else { ++ unsigned int i; ++ for (i = 0; i != copy_n; ++i) { ++ memcpy(dst, src, __MIN(dst_stride, src_stride)); ++ dst += dst_stride; ++ src += src_stride; ++ } + } ++ sys->slice.line += scale_n; + } +- atomic_fetch_sub(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); +- } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { +- fmt = mmal_event_format_changed_get(buffer); + +- format = mmal_format_alloc(); +- mmal_format_full_copy(format, fmt->format); ++ if ((buf->flags & MMAL_BUFFER_HEADER_FLAG_FRAME_END) != 0 || sys->slice.line >= scale_lines) { + +- if (sys->opaque) +- format->encoding = MMAL_ENCODING_OPAQUE; ++ if ((buf->flags & MMAL_BUFFER_HEADER_FLAG_FRAME_END) == 0 || sys->slice.line != scale_lines) { ++ // Stuff doesn't add up... ++ msg_Err(p_filter, "Line count (%d/%d) & EOF disagree (flags=%#x)", sys->slice.line, scale_lines, buf->flags); ++ goto fail; ++ } ++ else { ++ sys->slice.line = 0; ++ ++ vlc_mutex_lock(&sys->lock); ++ pic_fifo_get(&sys->slice.pics); // Remove head from Q ++ vlc_mutex_unlock(&sys->lock); ++ ++ buf_to_pic_copy_props(pic, buf); ++ conv_out_q_pic(sys, pic); ++ } ++ } ++ } ++ ++ // Put back ++ buf->user_data = NULL; // Zap here to make sure we can't reuse later ++ mmal_buffer_header_reset(buf); ++ ++ if (mmal_port_send_buffer(sys->output, buf) != MMAL_SUCCESS) { ++ mmal_buffer_header_release(buf); ++ } ++ return; ++ ++fail: ++ sys->err_stream = MMAL_EIO; ++ vlc_sem_post(&sys->sem); // If we were waiting then break us out - the flush should fix sem values ++} ++ ++ ++static void conv_flush(filter_t * p_filter) ++{ ++ filter_sys_t * const sys = p_filter->p_sys; ++ unsigned int i; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++ ++ for (i = 0; i != SUBS_MAX; ++i) { ++ hw_mmal_subpic_flush(VLC_OBJECT(p_filter), sys->subs + i); ++ } ++ ++ if (sys->input != NULL && sys->input->is_enabled) ++ mmal_port_disable(sys->input); ++ ++ if (sys->output != NULL && sys->output->is_enabled) ++ mmal_port_disable(sys->output); ++ ++ // Free up anything we may have already lying around ++ // Don't need lock as the above disables should have prevented anything ++ // happening in the background ++ ++ pic_fifo_release_all(&sys->slice.pics); ++ pic_fifo_release_all(&sys->ret_pics); ++ ++ // Reset sem values - easiest & most reliable way is to just kill & re-init ++ // This will also dig us out of situations where we have got out of sync somehow ++ vlc_sem_destroy(&sys->sem); ++ vlc_sem_init(&sys->sem, CONV_MAX_LATENCY); ++ ++ // No buffers in either port now ++ sys->in_count = 0; ++ ++ // Reset error status ++ sys->err_stream = MMAL_SUCCESS; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s", __func__); ++#endif ++} ++ ++static picture_t *conv_filter(filter_t *p_filter, picture_t *p_pic) ++{ ++ filter_sys_t * const sys = p_filter->p_sys; ++ picture_t * ret_pics; ++ MMAL_STATUS_T err; ++ const uint64_t frame_seq = ++sys->frame_seq; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++#if 0 ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] sar:%d/%d", __func__, ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, ++ p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den); ++ } ++#endif ++ ++ if (sys->err_stream != MMAL_SUCCESS) { ++ goto stream_fail; ++ } ++ ++ if (p_pic->context == NULL) { ++ msg_Dbg(p_filter, "%s: No context", __func__); ++ } ++ else ++ { ++ unsigned int sub_no = 0; ++ ++ for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { ++ int rv; ++ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(p_filter), p_pic, sub_no, sys->subs + sub_no, ++ &sys->output->format->es->video.crop, frame_seq)) == 0) ++ break; ++ else if (rv < 0) ++ goto fail; ++ } ++ } ++ ++ // Reenable stuff if the last thing we did was flush ++ if ((err = conv_enable_out(p_filter, sys)) != MMAL_SUCCESS || ++ (err = conv_enable_in(p_filter, sys)) != MMAL_SUCCESS) ++ goto fail; ++ ++ // If ZC then we need to allocate the out pic before we stuff the input ++ if (sys->zero_copy) { ++ MMAL_BUFFER_HEADER_T * out_buf; ++ picture_t * const out_pic = filter_NewPicture(p_filter); ++ ++ if (out_pic == NULL) ++ { ++ msg_Err(p_filter, "Failed to alloc required filter output pic"); ++ goto fail; ++ } ++ ++ vlc_mutex_lock(&sys->lock); ++ pic_fifo_put(&sys->slice.pics, out_pic); ++ vlc_mutex_unlock(&sys->lock); ++ ++ // Poke any returned pic buffers into output ++ // In general this should only happen immediately after enable ++ while ((out_buf = mmal_queue_get(sys->out_pool->queue)) != NULL) ++ mmal_port_send_buffer(sys->output, out_buf); ++ ++ ++sys->in_count; ++ } ++ ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ { ++ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++#if TRACE_ALL ++ msg_Dbg(p_filter, "In buf send: pic=%p, buf=%p, user=%p, pts=%lld/%lld", ++ p_pic, pic_buf, pic_buf->user_data, (long long)frame_seq, (long long)p_pic->date); ++#endif ++ if (pic_buf == NULL) { ++ msg_Err(p_filter, "Pic has no attached buffer"); ++ goto fail; ++ } ++ ++ sys->pts_stash[(frame_seq & 0xf)] = p_pic->date; ++ if ((err = port_send_replicated(sys->input, sys->in_pool, pic_buf, frame_seq)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to input failed"); ++ goto fail; ++ } ++ ++ picture_Release(p_pic); ++ p_pic = NULL; ++ --sys->in_count; ++ } ++ ++ if (!sys->zero_copy) { ++ MMAL_BUFFER_HEADER_T * out_buf; ++ ++ while ((out_buf = sys->in_count < 0 ? ++ mmal_queue_wait(sys->out_pool->queue) : mmal_queue_get(sys->out_pool->queue)) != NULL) ++ { ++ picture_t * const out_pic = filter_NewPicture(p_filter); ++ char dbuf0[5]; ++ ++ if (out_pic == NULL) { ++ msg_Warn(p_filter, "Failed to alloc new filter output pic"); ++ mmal_buffer_header_release(out_buf); ++ break; ++ } ++ ++#if 0 ++ msg_Dbg(p_filter, "out_pic %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", ++ str_fourcc(dbuf0, out_pic->format.i_chroma), ++ out_pic->format.i_width, out_pic->format.i_height, ++ out_pic->format.i_x_offset, out_pic->format.i_y_offset, ++ out_pic->format.i_visible_width, out_pic->format.i_visible_height, ++ out_pic->format.i_sar_num, out_pic->format.i_sar_den); ++#endif ++ ++ mmal_buffer_header_reset(out_buf); ++ out_buf->user_data = out_pic; ++ out_buf->data = out_pic->p[0].p_pixels; ++ out_buf->alloc_size = out_pic->p[0].i_pitch * out_pic->p[0].i_lines; ++ //**** stride ???? ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "Out buf send: pic=%p, buf=%p, flags=%#x, len=%d/%d, pts=%lld", ++ p_pic, out_buf->user_data, out_buf->flags, ++ out_buf->length, out_buf->alloc_size, (long long)out_buf->pts); ++#endif ++ ++ if ((err = mmal_port_send_buffer(sys->output, out_buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to output failed"); ++ mmal_buffer_header_release(out_buf); ++ break; ++ } ++ ++ ++sys->in_count; ++ } ++ } ++ ++ if (sys->in_count < 0) ++ { ++ msg_Err(p_filter, "Buffer count somehow negative"); ++ goto fail; ++ } ++ ++ // Avoid being more than 1 pic behind ++ vlc_sem_wait(&sys->sem); ++ ++ // Return all pending buffers ++ vlc_mutex_lock(&sys->lock); ++ ret_pics = pic_fifo_get_all(&sys->ret_pics); ++ vlc_mutex_unlock(&sys->lock); ++ ++ if (sys->err_stream != MMAL_SUCCESS) ++ goto stream_fail; ++ ++ // Sink as many sem posts as we have pics ++ // (shouldn't normally wait, but there is a small race) ++ if (ret_pics != NULL) ++ { ++ picture_t *next_pic = ret_pics->p_next; ++#if 0 ++ char dbuf0[5]; ++ ++ msg_Dbg(p_filter, "pic_out %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", ++ str_fourcc(dbuf0, ret_pics->format.i_chroma), ++ ret_pics->format.i_width, ret_pics->format.i_height, ++ ret_pics->format.i_x_offset, ret_pics->format.i_y_offset, ++ ret_pics->format.i_visible_width, ret_pics->format.i_visible_height, ++ ret_pics->format.i_sar_num, ret_pics->format.i_sar_den); ++#endif ++ while (next_pic != NULL) { ++ vlc_sem_wait(&sys->sem); ++ next_pic = next_pic->p_next; ++ } ++ } ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); ++#endif ++ ++ return ret_pics; ++ ++stream_fail: ++ msg_Err(p_filter, "MMAL error reported by callback"); ++fail: ++ if (p_pic != NULL) ++ picture_Release(p_pic); ++ conv_flush(p_filter); ++ return NULL; ++} ++ ++ ++static void CloseConverter(vlc_object_t * obj) ++{ ++ filter_t * const p_filter = (filter_t *)obj; ++ filter_sys_t * const sys = p_filter->p_sys; ++ unsigned int i; + +- sys->output_format = format; ++#if TRACE_ALL ++ msg_Dbg(obj, "<<< %s", __func__); ++#endif ++ ++ if (sys == NULL) ++ return; ++ ++ // Disables input & output ports ++ conv_flush(p_filter); ++ ++ if (sys->component && sys->component->control->is_enabled) ++ mmal_port_disable(sys->component->control); ++ ++ if (sys->component && sys->component->is_enabled) ++ mmal_component_disable(sys->component); ++ ++ for (i = 0; i != SUBS_MAX; ++i) { ++ hw_mmal_subpic_close(VLC_OBJECT(p_filter), sys->subs + i); ++ } ++ ++ if (sys->out_pool) ++ { ++ if (sys->zero_copy) ++ mmal_port_pool_destroy(sys->output, sys->out_pool); ++ else ++ mmal_pool_destroy(sys->out_pool); ++ } ++ ++ if (sys->in_pool != NULL) ++ mmal_pool_destroy(sys->in_pool); ++ ++ if (sys->component) ++ mmal_component_release(sys->component); ++ ++ vlc_sem_destroy(&sys->sem); ++ vlc_mutex_destroy(&sys->lock); ++ ++ free(sys); ++} ++ ++ ++static int conv_set_output(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const pic, const MMAL_FOURCC_T pic_enc) ++{ ++ MMAL_STATUS_T status; ++ ++ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; ++ sys->output->format->type = MMAL_ES_TYPE_VIDEO; ++ sys->output->format->encoding = pic_enc; ++ sys->output->format->encoding_variant = sys->output->format->encoding; ++ vlc_to_mmal_video_fmt(sys->output->format, &p_filter->fmt_out.video); ++ ++ // Override default format width/height if we have a pic we need to match ++ if (pic != NULL) ++ { ++ pic_to_format(sys->output->format, pic); ++ MMAL_VIDEO_FORMAT_T *fmt = &sys->output->format->es->video; ++ msg_Dbg(p_filter, "%s: %dx%d [(0,0) %dx%d]", __func__, fmt->width, fmt->height, fmt->crop.width, fmt->crop.height); ++ } ++ ++ mmal_log_dump_format(sys->output->format); ++ ++ status = mmal_port_format_commit(sys->output); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ return -1; ++ } ++ ++ sys->output->buffer_num = __MAX(sys->zero_copy ? 16 : 2, sys->output->buffer_num_recommended); ++ sys->output->buffer_size = sys->output->buffer_size_recommended; ++ ++ if (conv_enable_out(p_filter, sys) != MMAL_SUCCESS) ++ return -1; ++ ++ return 0; ++} ++ ++static int OpenConverter(vlc_object_t * obj) ++{ ++ filter_t * const p_filter = (filter_t *)obj; ++ int ret = VLC_EGENERIC; ++ filter_sys_t *sys; ++ MMAL_STATUS_T status; ++ MMAL_FOURCC_T enc_out; ++ const MMAL_FOURCC_T enc_in = MMAL_ENCODING_OPAQUE; ++ bool use_resizer; ++ bool use_isp; ++ int gpu_mem; ++ ++ if (enc_in != vlc_to_mmal_pic_fourcc(p_filter->fmt_in.i_codec) || ++ (enc_out = vlc_to_mmal_pic_fourcc(p_filter->fmt_out.i_codec)) == 0) ++ return VLC_EGENERIC; + +- mmal_buffer_header_release(buffer); ++ use_resizer = var_InheritBool(p_filter, MMAL_RESIZE_NAME); ++ use_isp = var_InheritBool(p_filter, MMAL_ISP_NAME); ++ ++ if (use_resizer) { ++ // use resizer overrides use_isp ++ use_isp = false; ++ } ++ ++ // Check we have a sliced version of the fourcc if we want the resizer ++ if (use_resizer && ++ (enc_out = pic_to_slice_mmal_fourcc(enc_out)) == 0) ++ return VLC_EGENERIC; ++ ++ gpu_mem = hw_mmal_get_gpu_mem(); ++ ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] sar:%d/%d (gpu=%d)", __func__, ++ use_resizer ? "resize" : use_isp ? "isp" : "hvs", ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, ++ p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den, ++ gpu_mem); ++ } ++ ++ sys = calloc(1, sizeof(filter_sys_t)); ++ if (!sys) { ++ ret = VLC_ENOMEM; ++ goto fail; ++ } ++ p_filter->p_sys = sys; ++ ++ // Init stuff the we destroy unconditionaly in Close first ++ vlc_mutex_init(&sys->lock); ++ vlc_sem_init(&sys->sem, CONV_MAX_LATENCY); ++ sys->err_stream = MMAL_SUCCESS; ++ pic_fifo_init(&sys->ret_pics); ++ pic_fifo_init(&sys->slice.pics); ++ ++ sys->in_port_cb_fn = conv_input_port_cb; ++ if (use_resizer) { ++ sys->zero_copy = true; ++ sys->component_name = MMAL_COMPONENT_DEFAULT_RESIZER; ++ sys->out_port_cb_fn = slice_output_port_cb; ++ } ++ else if (use_isp) { ++ sys->zero_copy = false; // Copy directly into filter picture ++ sys->component_name = MMAL_COMPONENT_ISP_RESIZER; ++ sys->out_port_cb_fn = conv_output_port_cb; + } else { +- mmal_buffer_header_release(buffer); ++ sys->zero_copy = false; // Copy directly into filter picture ++ sys->component_name = MMAL_COMPONENT_HVS; ++ sys->out_port_cb_fn = conv_output_port_cb; ++ } ++ ++ status = mmal_component_create(sys->component_name, &sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ sys->output = sys->component->output[0]; ++ sys->input = sys->component->input[0]; ++ ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; ++ status = mmal_port_enable(sys->component->control, conv_control_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; ++ sys->input->format->type = MMAL_ES_TYPE_VIDEO; ++ sys->input->format->encoding = enc_in; ++ sys->input->format->encoding_variant = MMAL_ENCODING_I420; ++ vlc_to_mmal_video_fmt(sys->input->format, &p_filter->fmt_in.video); ++ port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, 1); ++ ++ mmal_log_dump_format(sys->input->format); ++ ++ status = mmal_port_format_commit(sys->input); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = NUM_DECODER_BUFFER_HEADERS; ++ ++ if (conv_enable_in(p_filter, sys) != MMAL_SUCCESS) ++ goto fail; ++ ++ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, sys->zero_copy); ++ ++ if (sys->zero_copy) { ++ // If zc then we will do stride conversion when we copy to arm side ++ // so no need to worry about actual pic dimensions here ++ if (conv_set_output(p_filter, sys, NULL, enc_out) != 0) ++ goto fail; ++ } ++ else { ++ picture_t *pic = filter_NewPicture(p_filter); ++ int err = conv_set_output(p_filter, sys, pic, enc_out); ++ picture_Release(pic); ++ if (err != 0) { ++ goto fail; ++ } ++ } ++ ++ status = mmal_component_enable(sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to enable component %s (status=%"PRIx32" %s)", ++ sys->component->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ msg_Dbg(p_filter, "Outpool: zc=%d, num=%d, size=%d", sys->zero_copy, sys->output->buffer_num, sys->output->buffer_size); ++ sys->out_pool = sys->zero_copy ? ++ mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size) : ++ mmal_pool_create(sys->output->buffer_num, 0); ++ ++ if (sys->out_pool == NULL) { ++ msg_Err(p_filter, "Failed to create output pool"); ++ goto fail; ++ } ++ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(p_filter, "Failed to create input pool"); ++ goto fail; ++ } ++ ++ { ++ unsigned int i; ++ for (i = 0; i != SUBS_MAX; ++i) { ++ if (hw_mmal_subpic_open(VLC_OBJECT(p_filter), sys->subs + i, sys->component->input[i + 1], i + 1) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Failed to open subpic %d", i); ++ goto fail; ++ } ++ } ++ } ++ ++ p_filter->pf_video_filter = conv_filter; ++ p_filter->pf_flush = conv_flush; ++ // video_drain NIF in filter structure ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: ok", __func__); ++#endif ++ ++ return VLC_SUCCESS; ++ ++fail: ++ CloseConverter(obj); ++#if TRACE_ALL ++msg_Dbg(p_filter, ">>> %s: FAIL: %d", __func__, ret); ++#endif ++ return ret; ++} ++ ++ ++typedef struct blend_sys_s { ++ vzc_pool_ctl_t * vzc; ++ const picture_t * last_dst; // Not a ref, just a hint that we have a new pic ++} blend_sys_t; ++ ++static void FilterBlendMmal(filter_t *p_filter, ++ picture_t *dst, const picture_t * src, ++ int x_offset, int y_offset, int alpha) ++{ ++ blend_sys_t * const sys = (blend_sys_t *)p_filter->p_sys; ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s (%d,%d:%d) pic=%p, pts=%lld, force=%d", __func__, x_offset, y_offset, alpha, src, src->date, src->b_force); ++#endif ++ // If nothing to do then do nothing ++ if (alpha == 0 || ++ src->format.i_visible_height == 0 || ++ src->format.i_visible_width == 0) ++ { ++ return; ++ } ++ ++ if (dst->context == NULL) ++ msg_Err(p_filter, "MMAL pic missing context"); ++ else ++ { ++ // cast away src const so we can ref it ++ MMAL_BUFFER_HEADER_T *buf = hw_mmal_vzc_buf_from_pic(sys->vzc, (picture_t *)src, dst, ++ dst != sys->last_dst || !hw_mmal_pic_has_sub_bufs(dst)); ++ if (buf == NULL) { ++ msg_Err(p_filter, "Failed to allocate vzc buffer for subpic"); ++ return; ++ } ++ MMAL_DISPLAYREGION_T * const reg = hw_mmal_vzc_buf_region(buf); ++ ++ reg->set |= ++ MMAL_DISPLAY_SET_ALPHA | MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_DEST_RECT; ++ ++ reg->fullscreen = 0; ++ ++ reg->alpha = (uint32_t)(alpha & 0xff) | (1U << 31); ++ ++ hw_mmal_vzc_buf_set_dest_rect(buf, x_offset, y_offset, src->format.i_visible_width, src->format.i_visible_height); ++ ++ reg->dest_rect = (MMAL_RECT_T){0, 0, 0, 0}; ++ ++ hw_mmal_pic_sub_buf_add(dst, buf); ++ ++ sys->last_dst = dst; + } + } ++ ++static void FlushBlendMmal(filter_t * p_filter) ++{ ++ blend_sys_t * const sys = (blend_sys_t *)p_filter->p_sys; ++ sys->last_dst = NULL; ++ hw_mmal_vzc_pool_flush(sys->vzc); ++} ++ ++static int OpenBlendMmal(vlc_object_t *object) ++{ ++ filter_t * const p_filter = (filter_t *)object; ++ const vlc_fourcc_t vfcc_src = p_filter->fmt_in.video.i_chroma; ++ const vlc_fourcc_t vfcc_dst = p_filter->fmt_out.video.i_chroma; ++ ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %dx%d]->%s,%dx%d [(%d,%d) %dx%d]", __func__, ++ "blend", ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height); ++ } ++ ++ if (vfcc_dst != VLC_CODEC_MMAL_OPAQUE || vfcc_src != VLC_CODEC_RGBA) { ++ return VLC_EGENERIC; ++ } ++ ++ { ++ blend_sys_t * const sys = calloc(1, sizeof (*sys)); ++ if (sys == NULL) ++ return VLC_ENOMEM; ++ if ((sys->vzc = hw_mmal_vzc_pool_new()) == NULL) ++ { ++ free(sys); ++ return VLC_ENOMEM; ++ } ++ p_filter->p_sys = (filter_sys_t *)sys; ++ } ++ ++ p_filter->pf_video_blend = FilterBlendMmal; ++ p_filter->pf_flush = FlushBlendMmal; ++ ++ return VLC_SUCCESS; ++} ++ ++static void CloseBlendMmal(vlc_object_t *object) ++{ ++ filter_t * const p_filter = (filter_t *)object; ++ blend_sys_t * const sys = (blend_sys_t *)p_filter->p_sys; ++ ++ hw_mmal_vzc_pool_release(sys->vzc); ++ free(sys); ++} ++ ++// --------------------------------------------------------------------------- ++ ++static inline unsigned div255(unsigned v) ++{ ++ /* It is exact for 8 bits, and has a max error of 1 for 9 and 10 bits ++ * while respecting full opacity/transparency */ ++ return ((v >> 8) + v + 1) >> 8; ++ //return v / 255; ++} ++ ++static inline unsigned int a_merge(unsigned int dst, unsigned src, unsigned f) ++{ ++ return div255((255 - f) * (dst) + src * f); ++} ++ ++ ++static void FilterBlendNeon(filter_t *p_filter, ++ picture_t *dst_pic, const picture_t * src_pic, ++ int x_offset, int y_offset, int alpha) ++{ ++ const uint8_t * s_data; ++ uint8_t * d_data; ++ int width = src_pic->format.i_visible_width; ++ int height = src_pic->format.i_visible_height; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s (%d,%d:%d) pic=%p, pts=%lld, force=%d", __func__, x_offset, y_offset, alpha, src_pic, src_pic->date, src_pic->b_force); ++#else ++ VLC_UNUSED(p_filter); ++#endif ++ ++ if (alpha == 0 || ++ src_pic->format.i_visible_height == 0 || ++ src_pic->format.i_visible_width == 0) ++ { ++ return; ++ } ++ ++ x_offset += dst_pic->format.i_x_offset; ++ y_offset += dst_pic->format.i_y_offset; ++ ++ // Deal with R/B overrun ++ if (x_offset + width >= (int)(dst_pic->format.i_x_offset + dst_pic->format.i_visible_width)) ++ width = dst_pic->format.i_x_offset + dst_pic->format.i_visible_width - x_offset; ++ if (y_offset + height >= (int)(dst_pic->format.i_y_offset + dst_pic->format.i_visible_height)) ++ height = dst_pic->format.i_y_offset + dst_pic->format.i_visible_height - y_offset; ++ ++ if (width <= 0 || height <= 0) { ++ return; ++ } ++ ++ // *** L/U overrun ++ ++ s_data = src_pic->p[0].p_pixels + ++ src_pic->p[0].i_pixel_pitch * src_pic->format.i_x_offset + ++ src_pic->p[0].i_pitch * src_pic->format.i_y_offset; ++ d_data = dst_pic->p[0].p_pixels + ++ dst_pic->p[0].i_pixel_pitch * x_offset + ++ dst_pic->p[0].i_pitch * y_offset; ++ ++ ++ do { ++#if 1 ++ blend_rgbx_rgba_neon(d_data, s_data, alpha, width); ++#else ++ int i; ++ for (i = 0; i != width; ++i) { ++ const uint32_t s_pel = ((const uint32_t *)s_data)[i]; ++ const uint32_t d_pel = ((const uint32_t *)d_data)[i]; ++ const unsigned int a = div255(alpha * (s_pel >> 24)); ++ ((uint32_t *)d_data)[i] = 0xff000000 | ++ (a_merge((d_pel >> 16) & 0xff, (s_pel >> 16) & 0xff, a) << 16) | ++ (a_merge((d_pel >> 8) & 0xff, (s_pel >> 8) & 0xff, a) << 8 ) | ++ (a_merge((d_pel >> 0) & 0xff, (s_pel >> 0) & 0xff, a) << 0 ); ++ } ++#endif ++ s_data += src_pic->p[0].i_pitch; ++ d_data += dst_pic->p[0].i_pitch; ++ } while (--height > 0); ++} ++ ++static void CloseBlendNeon(vlc_object_t *object) ++{ ++ VLC_UNUSED(object); ++} ++ ++static int OpenBlendNeon(vlc_object_t *object) ++{ ++ filter_t * const p_filter = (filter_t *)object; ++ const vlc_fourcc_t vfcc_src = p_filter->fmt_in.video.i_chroma; ++ const vlc_fourcc_t vfcc_dst = p_filter->fmt_out.video.i_chroma; ++ ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %dx%d]->%s,%dx%d [(%d,%d) %dx%d]", __func__, ++ "blend", ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height); ++ } ++ ++ if (vfcc_dst != VLC_CODEC_RGB32 || vfcc_src != VLC_CODEC_RGBA) { ++ return VLC_EGENERIC; ++ } ++ ++ p_filter->pf_video_blend = FilterBlendNeon; ++ return VLC_SUCCESS; ++} ++ ++vlc_module_begin() ++ set_category( CAT_INPUT ) ++ set_subcategory( SUBCAT_INPUT_VCODEC ) ++ set_shortname(N_("MMAL decoder")) ++ set_description(N_("MMAL-based decoder plugin for Raspberry Pi")) ++ set_capability("video decoder", 90) ++ add_shortcut("mmal_decoder") ++ add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false) ++ set_callbacks(OpenDecoder, CloseDecoder) ++ ++ add_submodule() ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VFILTER ) ++ set_shortname(N_("MMAL converterer")) ++ set_description(N_("MMAL conversion filter")) ++ add_shortcut("mmal_converter") ++ set_capability( "video converter", 900 ) ++ add_bool(MMAL_RESIZE_NAME, /* default */ false, MMAL_RESIZE_TEXT, MMAL_RESIZE_LONGTEXT, /* advanced option */ false) ++ add_bool(MMAL_ISP_NAME, /* default */ false, MMAL_ISP_TEXT, MMAL_ISP_LONGTEXT, /* advanced option */ false) ++ set_callbacks(OpenConverter, CloseConverter) ++ ++ add_submodule() ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VFILTER ) ++ set_description(N_("Video pictures blending for MMAL")) ++ add_shortcut("mmal_blend") ++ set_capability("video blending", 120) ++ set_callbacks(OpenBlendMmal, CloseBlendMmal) ++ ++ add_submodule() ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VFILTER ) ++ set_description(N_("Video pictures blending for neon")) ++ add_shortcut("neon_blend") ++ set_capability("video blending", 110) ++ set_callbacks(OpenBlendNeon, CloseBlendNeon) ++ ++vlc_module_end() ++ ++ +--- a/modules/hw/mmal/deinterlace.c ++++ b/modules/hw/mmal/deinterlace.c +@@ -26,11 +26,12 @@ + #include "config.h" + #endif + +-#include <vlc_picture_pool.h> ++#include <stdatomic.h> ++ + #include <vlc_common.h> ++#include <vlc_picture_pool.h> + #include <vlc_plugin.h> + #include <vlc_filter.h> +-#include <vlc_atomic.h> + + #include "mmal_picture.h" + +@@ -41,466 +42,602 @@ + + #define MIN_NUM_BUFFERS_IN_TRANSIT 2 + +-#define MMAL_DEINTERLACE_QPU "mmal-deinterlace-adv-qpu" +-#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.") +-#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.") ++#define MMAL_DEINTERLACE_NO_QPU "mmal-deinterlace-no-qpu" ++#define MMAL_DEINTERLACE_NO_QPU_TEXT N_("Do not use QPUs for advanced HD deinterlacing.") ++#define MMAL_DEINTERLACE_NO_QPU_LONGTEXT N_("Do not make use of the QPUs to allow higher quality deinterlacing of HD content.") + +-static int Open(filter_t *filter); +-static void Close(filter_t *filter); ++#define MMAL_DEINTERLACE_ADV "mmal-deinterlace-adv" ++#define MMAL_DEINTERLACE_ADV_TEXT N_("Force advanced deinterlace") ++#define MMAL_DEINTERLACE_ADV_LONGTEXT N_("Force advanced deinterlace") ++ ++#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" ++#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") ++#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") ++ ++#define MMAL_DEINTERLACE_NONE "mmal-deinterlace-none" ++#define MMAL_DEINTERLACE_NONE_TEXT N_("Force no deinterlace") ++#define MMAL_DEINTERLACE_NONE_LONGTEXT N_("Force no interlace. Simply strips off the interlace markers and passes the frame straight through. "\ ++ "This is the default for > SD if < 96M gpu-mem") ++ ++#define MMAL_DEINTERLACE_HALF_RATE "mmal-deinterlace-half-rate" ++#define MMAL_DEINTERLACE_HALF_RATE_TEXT N_("Halve output framerate") ++#define MMAL_DEINTERLACE_HALF_RATE_LONGTEXT N_("Halve output framerate. 1 output frame for each pair of interlaced fields input") ++ ++#define MMAL_DEINTERLACE_FULL_RATE "mmal-deinterlace-full-rate" ++#define MMAL_DEINTERLACE_FULL_RATE_TEXT N_("Full output framerate") ++#define MMAL_DEINTERLACE_FULL_RATE_LONGTEXT N_("Full output framerate. 1 output frame for each interlaced field input") + +-vlc_module_begin() +- set_shortname(N_("MMAL deinterlace")) +- set_description(N_("MMAL-based deinterlace filter plugin")) +- set_capability("video filter", 0) +- set_category(CAT_VIDEO) +- set_subcategory(SUBCAT_VIDEO_VFILTER) +- set_callbacks(Open, Close) +- add_shortcut("deinterlace") +- add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, +- MMAL_DEINTERLACE_QPU_LONGTEXT, true); +-vlc_module_end() + +-struct filter_sys_t { ++typedef struct filter_sys_t ++{ + MMAL_COMPONENT_T *component; + MMAL_PORT_T *input; + MMAL_PORT_T *output; ++ MMAL_POOL_T *in_pool; ++ hw_mmal_port_pool_ref_t *out_ppr; + +- MMAL_QUEUE_T *filtered_pictures; +- vlc_sem_t sem; ++ MMAL_QUEUE_T * out_q; + +- atomic_bool started; ++ bool half_rate; ++ bool use_qpu; ++ bool use_fast; ++ bool use_passthrough; ++ unsigned int seq_in; ++ unsigned int seq_out; ++} filter_sys_t; + +- /* statistics */ +- int output_in_transit; +- int input_in_transit; +-}; +- +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static picture_t *deinterlace(filter_t *filter, picture_t *picture); +-static void flush(filter_t *filter); + + #define MMAL_COMPONENT_DEFAULT_DEINTERLACE "vc.ril.image_fx" + +-static int Open(filter_t *filter) +-{ +- int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ? +- (int64_t)1000000 * filter->fmt_in.video.i_frame_rate_base / +- filter->fmt_in.video.i_frame_rate : 0; +- bool use_qpu = var_InheritBool(filter, MMAL_DEINTERLACE_QPU); ++#define TRACE_ALL 0 + +- MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = { +- { MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param) }, +- MMAL_PARAM_IMAGEFX_DEINTERLACE_ADV, +- 4, +- { 3, frame_duration, 0, use_qpu } +- }; + +- int ret = VLC_SUCCESS; +- MMAL_STATUS_T status; +- filter_sys_t *sys; + +- msg_Dbg(filter, "Try to open mmal_deinterlace filter. frame_duration: %d, QPU %s!", +- frame_duration, use_qpu ? "used" : "unused"); ++// Buffer attached to pic on success, is still valid on failure ++static picture_t * di_alloc_opaque(filter_t * const p_filter, MMAL_BUFFER_HEADER_T * const buf) ++{ ++ filter_sys_t *const filter_sys = p_filter->p_sys; ++ picture_t * const pic = filter_NewPicture(p_filter); + +- if (filter->fmt_in.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) +- return VLC_EGENERIC; ++ if (pic == NULL) ++ goto fail1; + +- if (filter->fmt_out.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) +- return VLC_EGENERIC; ++ if (buf->length == 0) { ++ msg_Err(p_filter, "%s: Empty buffer", __func__); ++ goto fail2; ++ } + +- sys = calloc(1, sizeof(filter_sys_t)); +- if (!sys) +- return VLC_ENOMEM; +- filter->p_sys = sys; ++ if ((pic->context = hw_mmal_gen_context(buf, filter_sys->out_ppr)) == NULL) ++ goto fail2; + +- bcm_host_init(); ++ buf_to_pic_copy_props(pic, buf); + +- status = mmal_component_create(MMAL_COMPONENT_DEFAULT_DEINTERLACE, &sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", +- MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++#if TRACE_ALL ++ msg_Dbg(p_filter, "pic: prog=%d, tff=%d, date=%lld", pic->b_progressive, pic->b_top_field_first, (long long)pic->date); ++#endif + +- status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", +- MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++ return pic; + +- sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; +- status = mmal_port_enable(sys->component->control, control_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", +- sys->component->control->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++fail2: ++ picture_Release(pic); ++fail1: ++// mmal_buffer_header_release(buf); ++ return NULL; ++} + +- sys->input = sys->component->input[0]; +- sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; +- if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) +- sys->input->format->encoding = MMAL_ENCODING_OPAQUE; +- sys->input->format->es->video.width = filter->fmt_in.video.i_width; +- sys->input->format->es->video.height = filter->fmt_in.video.i_height; +- sys->input->format->es->video.crop.x = 0; +- sys->input->format->es->video.crop.y = 0; +- sys->input->format->es->video.crop.width = filter->fmt_in.video.i_width; +- sys->input->format->es->video.crop.height = filter->fmt_in.video.i_height; +- sys->input->format->es->video.par.num = filter->fmt_in.video.i_sar_num; +- sys->input->format->es->video.par.den = filter->fmt_in.video.i_sar_den; ++static void di_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ ++#if TRACE_ALL ++ pic_ctx_mmal_t * ctx = buffer->user_data; ++// filter_sys_t *const sys = ((filter_t *)port->userdata)->p_sys; ++ ++ msg_Dbg((filter_t *)port->userdata, "<<< %s: cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buffer->cmd, ctx, buffer, ++ buffer->flags, (long long)buffer->pts); ++#else ++ VLC_UNUSED(port); ++#endif + +- es_format_Copy(&filter->fmt_out, &filter->fmt_in); +- filter->fmt_out.video.i_frame_rate *= 2; ++ mmal_buffer_header_release(buffer); + +- status = mmal_port_format_commit(sys->input); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++#if TRACE_ALL ++ msg_Dbg((filter_t *)port->userdata, ">>> %s", __func__); ++#endif ++} ++ ++static void di_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++ if (buf->cmd == 0 && buf->length != 0) ++ { ++ // The filter structure etc. should always exist if we have contents ++ // but might not on later flushes as we shut down ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ filter_sys_t * const sys = p_filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s: cmd=%d; flags=%#x, pts=%lld", __func__, buf->cmd, buf->flags, (long long) buf->pts); ++#endif ++ mmal_queue_put(sys->out_q, buf); ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: out Q len=%d", __func__, mmal_queue_length(sys->out_q)); ++#endif + } +- sys->input->buffer_size = sys->input->buffer_size_recommended; +- sys->input->buffer_num = sys->input->buffer_num_recommended; ++ else ++ { ++ mmal_buffer_header_reset(buf); ++ mmal_buffer_header_release(buf); ++ } ++} + +- if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) { +- MMAL_PARAMETER_BOOLEAN_T zero_copy = { +- { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, +- 1 +- }; ++static MMAL_STATUS_T fill_output_from_q(filter_t * const p_filter, filter_sys_t * const sys, MMAL_QUEUE_T * const q) ++{ ++ MMAL_BUFFER_HEADER_T * out_buf; + +- status = mmal_port_parameter_set(sys->input, &zero_copy.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- goto out; ++ while ((out_buf = mmal_queue_get(q)) != NULL) ++ { ++ MMAL_STATUS_T err; ++ if ((err = mmal_port_send_buffer(sys->output, out_buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to output failed"); ++ mmal_queue_put_back(q, out_buf); ++ return err; + } + } ++ return MMAL_SUCCESS; ++} + +- status = mmal_port_enable(sys->input, input_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++static inline unsigned int seq_inc(unsigned int x) ++{ ++ return x + 1 >= 16 ? 1 : x + 1; ++} + +- sys->output = sys->component->output[0]; +- sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)filter; +- mmal_format_full_copy(sys->output->format, sys->input->format); ++static inline unsigned int seq_delta(unsigned int sseq, unsigned int fseq) ++{ ++ return fseq == 0 ? 0 : fseq <= sseq ? sseq - fseq : 15 - (fseq - sseq); ++} + +- status = mmal_port_format_commit(sys->output); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++static picture_t *deinterlace(filter_t * p_filter, picture_t * p_pic) ++{ ++ filter_sys_t * const sys = p_filter->p_sys; ++ picture_t *ret_pics = NULL; ++ MMAL_STATUS_T err; + +- sys->output->buffer_num = 3; ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif + +- if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) { +- MMAL_PARAMETER_UINT32_T extra_buffers = { +- { MMAL_PARAMETER_EXTRA_BUFFERS, sizeof(MMAL_PARAMETER_UINT32_T) }, +- 5 +- }; +- status = mmal_port_parameter_set(sys->output, &extra_buffers.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- goto out; ++ // Reenable stuff if the last thing we did was flush ++ // Output should always be enabled ++ if (!sys->input->is_enabled && ++ (err = mmal_port_enable(sys->input, di_input_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Input port enable failed"); ++ goto fail; ++ } ++ ++ // Fill output from anything that has turned up in pool Q ++ if (hw_mmal_port_pool_ref_fill(sys->out_ppr) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Out port fill fail"); ++ goto fail; ++ } ++ ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ { ++ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->in_pool->queue); ++ ++ if ((err = mmal_buffer_header_replicate(buf, pic_buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Failed to replicate input buffer: %d", err); ++ goto fail; + } + +- MMAL_PARAMETER_BOOLEAN_T zero_copy = { +- { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, +- 1 +- }; ++#if TRACE_ALL ++ msg_Dbg(p_filter, "In buf send: pic=%p, buf=%p/%p, ctx=%p, flags=%#x, len=%d/%d, pts=%lld", ++ p_pic, pic_buf, buf, pic_buf->user_data, buf->flags, buf->length, buf->alloc_size, (long long)buf->pts); ++#endif + +- status = mmal_port_parameter_set(sys->output, &zero_copy.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", +- sys->output->name, status, mmal_status_to_string(status)); +- goto out; ++ picture_Release(p_pic); ++ ++ // Add a sequence to the flags so we can track what we have actually ++ // deinterlaced ++ buf->flags = (buf->flags & ~(0xfU * MMAL_BUFFER_HEADER_FLAG_USER0)) | (sys->seq_in * (MMAL_BUFFER_HEADER_FLAG_USER0)); ++ sys->seq_in = seq_inc(sys->seq_in); ++ ++ if ((err = mmal_port_send_buffer(sys->input, buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to input failed"); ++ goto fail; + } + } + +- status = mmal_port_enable(sys->output, output_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable output port %s (status=%"PRIx32" %s)", +- sys->output->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++ // Return anything that is in the out Q ++ { ++ MMAL_BUFFER_HEADER_T * out_buf; ++ picture_t ** pp_pic = &ret_pics; ++ ++ // Advanced di has a 3 frame latency, so if the seq delta is greater ++ // than that then we are expecting at least two frames of output. Wait ++ // for one of those. ++ while ((out_buf = (seq_delta(sys->seq_in, sys->seq_out) > 3 ? mmal_queue_wait(sys->out_q) : mmal_queue_get(sys->out_q))) != NULL) ++ { ++ picture_t * const out_pic = di_alloc_opaque(p_filter, out_buf); ++ const unsigned int seq_out = (out_buf->flags / MMAL_BUFFER_HEADER_FLAG_USER0) & 0xf; ++ ++ if (out_pic == NULL) { ++ msg_Warn(p_filter, "Failed to alloc new filter output pic"); ++ mmal_queue_put_back(sys->out_q, out_buf); ++ break; ++ } ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "-- %s: Q pic=%p: seq_in=%d, seq_out=%d, delta=%d", __func__, out_pic, sys->seq_in, seq_out, seq_delta(sys->seq_in, seq_out)); ++#endif ++ ++ *pp_pic = out_pic; ++ pp_pic = &out_pic->p_next; ++ ++ // Ignore 0 seqs ++ // Don't think these should actually happen ++ if (seq_out != 0) ++ sys->seq_out = seq_out; ++ } + } + +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); ++#endif ++ ++ return ret_pics; ++ ++fail: ++ picture_Release(p_pic); ++ return NULL; ++} ++ ++static void di_flush(filter_t *p_filter) ++{ ++ filter_sys_t * const sys = p_filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++ ++ if (sys->input != NULL && sys->input->is_enabled) ++ mmal_port_disable(sys->input); ++ ++ if (sys->output != NULL && sys->output->is_enabled) ++ { ++ // Wedge anything we've got into the output port as that will free the underlying buffers ++ fill_output_from_q(p_filter, sys, sys->out_q); ++ ++ mmal_port_disable(sys->output); ++ ++ // If that dumped anything real into the out_q then have another go ++ if (mmal_queue_length(sys->out_q) != 0) ++ { ++ mmal_port_enable(sys->output, di_output_port_cb); ++ fill_output_from_q(p_filter, sys, sys->out_q); ++ mmal_port_disable(sys->output); ++ // Out q should now be empty & should remain so until the input is reenabled ++ } ++ mmal_port_enable(sys->output, di_output_port_cb); ++ ++ // Leaving the input disabled is fine - but we want to leave the output enabled ++ // so we can retrieve buffers that are still bound to pictures + } + +- sys->filtered_pictures = mmal_queue_create(); ++ sys->seq_in = 1; ++ sys->seq_out = 1; + +- filter->pf_video_filter = deinterlace; +- filter->pf_flush = flush; ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s", __func__); ++#endif ++} + +- vlc_sem_init(&sys->sem, 0); + +-out: +- if (ret != VLC_SUCCESS) +- Close(filter); ++static void pass_flush(filter_t *p_filter) ++{ ++ // Nothing to do ++ VLC_UNUSED(p_filter); ++} + +- return ret; ++static picture_t * pass_deinterlace(filter_t * p_filter, picture_t * p_pic) ++{ ++ VLC_UNUSED(p_filter); ++ ++ p_pic->b_progressive = true; ++ return p_pic; + } + +-static void Close(filter_t *filter) ++ ++static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) + { +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; ++ filter_t *filter = (filter_t *)port->userdata; ++ MMAL_STATUS_T status; + +- if (!sys) ++ if (buffer->cmd == MMAL_EVENT_ERROR) { ++ status = *(uint32_t *)buffer->data; ++ msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, ++ mmal_status_to_string(status)); ++ } ++ ++ mmal_buffer_header_reset(buffer); ++ mmal_buffer_header_release(buffer); ++} ++ ++static void CloseMmalDeinterlace(filter_t *filter) ++{ ++ filter_sys_t * const sys = filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(filter, "<<< %s", __func__); ++#endif ++ ++ if (sys == NULL) + return; + +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); ++ if (sys->use_passthrough) ++ { ++ free(sys); ++ return; ++ } + +- if (sys->input && sys->input->is_enabled) +- mmal_port_disable(sys->input); ++ di_flush(filter); + +- if (sys->output && sys->output->is_enabled) +- mmal_port_disable(sys->output); ++ if (sys->component && sys->component->control->is_enabled) ++ mmal_port_disable(sys->component->control); + + if (sys->component && sys->component->is_enabled) + mmal_component_disable(sys->component); + +- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { +- picture_t *pic = (picture_t *)buffer->user_data; +- picture_Release(pic); +- } ++ if (sys->in_pool != NULL) ++ mmal_pool_destroy(sys->in_pool); ++ ++ hw_mmal_port_pool_ref_release(sys->out_ppr, false); ++ // Once we exit filter & sys are invalid so mark as such ++ sys->output->userdata = NULL; + +- if (sys->filtered_pictures) +- mmal_queue_destroy(sys->filtered_pictures); ++ if (sys->out_q != NULL) ++ mmal_queue_destroy(sys->out_q); + + if (sys->component) + mmal_component_release(sys->component); + +- vlc_sem_destroy(&sys->sem); + free(sys); + + bcm_host_deinit(); + } + +-static int send_output_buffer(filter_t *filter) ++ ++static int OpenMmalDeinterlace(filter_t *filter) + { +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; ++ int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ? ++ CLOCK_FREQ * filter->fmt_in.video.i_frame_rate_base / ++ filter->fmt_in.video.i_frame_rate : 0; ++ ++ int ret = VLC_EGENERIC; + MMAL_STATUS_T status; +- picture_t *picture; +- int ret = 0; ++ filter_sys_t *sys; + +- if (!sys->output->is_enabled) { +- ret = VLC_EGENERIC; +- goto out; +- } ++ if (filter->fmt_in.video.i_chroma != VLC_CODEC_MMAL_OPAQUE || ++ filter->fmt_out.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) ++ return VLC_EGENERIC; ++ ++#if TRACE_ALL ++ msg_Dbg(filter, "Try to open mmal_deinterlace filter. frame_duration: %d, QPU %s!", ++ frame_duration, use_qpu ? "used" : "unused"); ++#endif ++ ++ sys = calloc(1, sizeof(filter_sys_t)); ++ if (!sys) ++ return VLC_ENOMEM; ++ filter->p_sys = sys; ++ ++ sys->seq_in = 1; ++ sys->seq_out = 1; ++ sys->half_rate = false; ++ sys->use_qpu = true; ++ sys->use_fast = false; ++ sys->use_passthrough = false; ++ ++ if (filter->fmt_in.video.i_width * filter->fmt_in.video.i_height > 768 * 576) ++ { ++ // We get stressed if we have to try too hard - so make life easier ++ sys->half_rate = true; ++ // Also check we actually have enough memory to do this ++ if (hw_mmal_get_gpu_mem() < (96 << 20)) ++ sys->use_passthrough = true; + +- picture = filter_NewPicture(filter); +- if (!picture) { +- msg_Warn(filter, "Failed to get new picture"); +- ret = -1; +- goto out; + } +- picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate; +- picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base; + +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->cmd = 0; ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_NO_QPU)) ++ sys->use_qpu = false; ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_ADV)) ++ { ++ sys->use_fast = false; ++ sys->use_passthrough = false; ++ } ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_FAST)) ++ { ++ sys->use_fast = true; ++ sys->use_passthrough = false; ++ } ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_NONE)) ++ sys->use_passthrough = true; ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_FULL_RATE)) ++ sys->half_rate = false; ++ if (var_InheritBool(filter, MMAL_DEINTERLACE_HALF_RATE)) ++ sys->half_rate = true; ++ ++ if (sys->use_passthrough) ++ { ++ filter->pf_video_filter = pass_deinterlace; ++ filter->pf_flush = pass_flush; ++ return 0; ++ } + +- mmal_picture_lock(picture); ++ bcm_host_init(); + +- status = mmal_port_send_buffer(sys->output, buffer); ++ status = mmal_component_create(MMAL_COMPONENT_DEFAULT_DEINTERLACE, &sys->component); + if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to send buffer to output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- mmal_buffer_header_release(buffer); +- picture_Release(picture); +- ret = -1; +- } else { +- atomic_fetch_add(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); ++ msg_Err(filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); ++ goto fail; + } + +-out: +- return ret; +-} +- +-static void fill_output_port(filter_t *filter) +-{ +- filter_sys_t *sys = filter->p_sys; +- /* allow at least 2 buffers in transit */ +- unsigned max_buffers_in_transit = __MAX(2, MIN_NUM_BUFFERS_IN_TRANSIT); +- int buffers_available = sys->output->buffer_num - +- atomic_load(&sys->output_in_transit) - +- mmal_queue_length(sys->filtered_pictures); +- int buffers_to_send = max_buffers_in_transit - sys->output_in_transit; +- int i; ++ { ++ const MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = { ++ { MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param) }, ++ sys->use_fast ? ++ MMAL_PARAM_IMAGEFX_DEINTERLACE_FAST : ++ MMAL_PARAM_IMAGEFX_DEINTERLACE_ADV, ++ 4, ++ { 5 /* Frame type: mixed */, frame_duration, sys->half_rate, sys->use_qpu } ++ }; + +- if (buffers_to_send > buffers_available) +- buffers_to_send = buffers_available; ++ status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ } + +-#ifndef NDEBUG +- msg_Dbg(filter, "Send %d buffers to output port (available: %d, in_transit: %d, buffer_num: %d)", +- buffers_to_send, buffers_available, sys->output_in_transit, +- sys->output->buffer_num); +-#endif +- for (i = 0; i < buffers_to_send; ++i) { +- if (send_output_buffer(filter) < 0) +- break; ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ status = mmal_port_enable(sys->component->control, control_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); ++ goto fail; + } +-} + +-static picture_t *deinterlace(filter_t *filter, picture_t *picture) +-{ +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; +- picture_t *out_picture = NULL; +- picture_t *ret = NULL; +- MMAL_STATUS_T status; +- unsigned i = 0; ++ sys->input = sys->component->input[0]; ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) ++ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; ++ vlc_to_mmal_video_fmt(sys->input->format, &filter->fmt_in.video); + +- fill_output_port(filter); ++ es_format_Copy(&filter->fmt_out, &filter->fmt_in); ++ if (!sys->half_rate) ++ filter->fmt_out.video.i_frame_rate *= 2; + +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->pts = picture->date; +- buffer->cmd = 0; ++ status = mmal_port_format_commit(sys->input); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = 30; ++// sys->input->buffer_num = sys->input->buffer_num_recommended; + +- if (!picture->p_sys->displayed) { +- status = mmal_port_send_buffer(sys->input, buffer); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to send buffer to input port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- picture_Release(picture); +- } else { +- picture->p_sys->displayed = true; +- atomic_fetch_add(&sys->input_in_transit, 1); +- vlc_sem_post(&sys->sem); +- } +- } else { +- picture_Release(picture); ++ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; + } + +- /* +- * Send output buffers +- */ +- while(atomic_load(&sys->started) && i < 2) { +- if (buffer = mmal_queue_timedwait(sys->filtered_pictures, 2000)) { +- i++; +- if (!out_picture) { +- out_picture = (picture_t *)buffer->user_data; +- ret = out_picture; +- } else { +- out_picture->p_next = (picture_t *)buffer->user_data; +- out_picture = out_picture->p_next; +- } +- out_picture->date = buffer->pts; +- } else { +- msg_Dbg(filter, "Failed waiting for filtered picture"); +- break; +- } ++ status = mmal_port_enable(sys->input, di_input_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; + } +- if (out_picture) +- out_picture->p_next = NULL; + +- return ret; +-} ++ sys->output = sys->component->output[0]; ++ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ mmal_format_full_copy(sys->output->format, sys->input->format); + +-static void flush(filter_t *filter) +-{ +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; ++ status = port_parameter_set_uint32(sys->output, MMAL_PARAMETER_EXTRA_BUFFERS, 5); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ goto fail; ++ } + +- msg_Dbg(filter, "flush deinterlace filter"); ++ status = port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, true); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } + +- msg_Dbg(filter, "flush: flush ports (input: %d, output: %d in transit)", +- sys->input_in_transit, sys->output_in_transit); +- mmal_port_flush(sys->output); +- mmal_port_flush(sys->input); +- +- msg_Dbg(filter, "flush: wait for all buffers to be returned"); +- while (atomic_load(&sys->input_in_transit) || +- atomic_load(&sys->output_in_transit)) +- vlc_sem_wait(&sys->sem); +- +- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { +- picture_t *pic = (picture_t *)buffer->user_data; +- msg_Dbg(filter, "flush: release already filtered pic %p", +- (void *)pic); +- picture_Release(pic); ++ status = mmal_port_format_commit(sys->output); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; + } +- atomic_store(&sys->started, false); +- msg_Dbg(filter, "flush: done"); +-} + +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +-{ +- filter_t *filter = (filter_t *)port->userdata; +- MMAL_STATUS_T status; ++ sys->output->buffer_size = sys->output->buffer_size_recommended; ++ sys->output->buffer_num = 30; ++// sys->output->buffer_num = sys->output->buffer_num_recommended; + +- if (buffer->cmd == MMAL_EVENT_ERROR) { +- status = *(uint32_t *)buffer->data; +- msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, +- mmal_status_to_string(status)); ++ if ((sys->out_q = mmal_queue_create()) == NULL) ++ { ++ msg_Err(filter, "Failed to create out Q"); ++ goto fail; + } + +- mmal_buffer_header_release(buffer); +-} ++ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(filter, "Failed to create input pool"); ++ goto fail; ++ } + +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +-{ +- picture_t *picture = (picture_t *)buffer->user_data; +- filter_t *filter = (filter_t *)port->userdata; +- filter_sys_t *sys = filter->p_sys; ++ sys->out_ppr = hw_mmal_port_pool_ref_create(sys->output, sys->output->buffer_num, sys->output->buffer_size); ++ if (sys->out_ppr == NULL) { ++ msg_Err(filter, "Failed to create output pool"); ++ goto fail; ++ } + +- if (picture) { +- picture_Release(picture); +- } else { +- msg_Warn(filter, "Got buffer without picture on input port - OOOPS"); +- mmal_buffer_header_release(buffer); ++ status = mmal_port_enable(sys->output, di_output_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable output port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; + } + +- atomic_fetch_sub(&sys->input_in_transit, 1); +- vlc_sem_post(&sys->sem); ++ status = mmal_component_enable(sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", ++ sys->component->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ filter->pf_video_filter = deinterlace; ++ filter->pf_flush = di_flush; ++ return 0; ++ ++fail: ++ CloseMmalDeinterlace(filter); ++ return ret; + } + +-static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +-{ +- filter_t *filter = (filter_t *)port->userdata; +- filter_sys_t *sys = filter->p_sys; +- picture_t *picture; ++vlc_module_begin() ++ set_shortname(N_("MMAL deinterlace")) ++ set_description(N_("MMAL-based deinterlace filter plugin")) ++ set_capability("video filter", 900) ++ set_category(CAT_VIDEO) ++ set_subcategory(SUBCAT_VIDEO_VFILTER) ++ set_callbacks(OpenMmalDeinterlace, CloseMmalDeinterlace) ++ add_shortcut("deinterlace") ++ add_bool(MMAL_DEINTERLACE_NO_QPU, false, MMAL_DEINTERLACE_NO_QPU_TEXT, ++ MMAL_DEINTERLACE_NO_QPU_LONGTEXT, true); ++ add_bool(MMAL_DEINTERLACE_ADV, false, MMAL_DEINTERLACE_ADV_TEXT, ++ MMAL_DEINTERLACE_ADV_LONGTEXT, true); ++ add_bool(MMAL_DEINTERLACE_FAST, false, MMAL_DEINTERLACE_FAST_TEXT, ++ MMAL_DEINTERLACE_FAST_LONGTEXT, true); ++ add_bool(MMAL_DEINTERLACE_NONE, false, MMAL_DEINTERLACE_NONE_TEXT, ++ MMAL_DEINTERLACE_NONE_LONGTEXT, true); ++ add_bool(MMAL_DEINTERLACE_HALF_RATE, false, MMAL_DEINTERLACE_HALF_RATE_TEXT, ++ MMAL_DEINTERLACE_HALF_RATE_LONGTEXT, true); ++ add_bool(MMAL_DEINTERLACE_FULL_RATE, false, MMAL_DEINTERLACE_FULL_RATE_TEXT, ++ MMAL_DEINTERLACE_FULL_RATE_LONGTEXT, true); ++ ++vlc_module_end() + +- if (buffer->cmd == 0) { +- if (buffer->length > 0) { +- atomic_store(&sys->started, true); +- mmal_queue_put(sys->filtered_pictures, buffer); +- picture = (picture_t *)buffer->user_data; +- } else { +- picture = (picture_t *)buffer->user_data; +- picture_Release(picture); +- } + +- atomic_fetch_sub(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); +- } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { +- msg_Warn(filter, "MMAL_EVENT_FORMAT_CHANGED seen but not handled"); +- mmal_buffer_header_release(buffer); +- } else { +- mmal_buffer_header_release(buffer); +- } +-} +--- a/modules/hw/mmal/mmal_picture.c ++++ b/modules/hw/mmal/mmal_picture.c +@@ -21,25 +21,847 @@ + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + ++// We would really like to use vlc_thread.h but the detach thread stuff can't be ++// used here :-( ++#include <pthread.h> ++ ++#include <stdatomic.h> ++ + #include <vlc_common.h> + #include <vlc_picture.h> + #include <interface/mmal/mmal.h> ++#include <interface/mmal/util/mmal_util.h> ++#include <interface/mmal/util/mmal_default_components.h> ++#include <interface/vmcs_host/vcgencmd.h> ++#include <interface/vcsm/user-vcsm.h> + + #include "mmal_picture.h" + +-int mmal_picture_lock(picture_t *picture) ++ ++static void flush_range(void * start, size_t len) ++{ ++ struct vcsm_user_clean_invalid2_s * b = calloc(1, ++ sizeof(struct vcsm_user_clean_invalid2_s) + sizeof(struct vcsm_user_clean_invalid2_block_s)); ++ ++ b->op_count = 1, ++ ++ b->s[0] = (struct vcsm_user_clean_invalid2_block_s){ ++ .invalidate_mode = 3, ++ .block_count = 1, ++ .start_address = start, ++ .block_size = len, ++ .inter_block_stride = 0 ++ }; ++ ++ vcsm_clean_invalid2(b); ++ ++ free(b); ++} ++ ++MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs) ++{ ++ switch (vlc_cs) ++ { ++ case COLOR_SPACE_BT601: ++ return MMAL_COLOR_SPACE_ITUR_BT601; ++ case COLOR_SPACE_BT709: ++ return MMAL_COLOR_SPACE_ITUR_BT709; ++ default: ++ break; ++ } ++ return MMAL_COLOR_SPACE_UNKNOWN; ++} ++ ++void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc) ++{ ++ MMAL_VIDEO_FORMAT_T * const vf_mmal = &es_fmt->es->video; ++ ++ vf_mmal->width = (vf_vlc->i_width + 31) & ~31; ++ vf_mmal->height = (vf_vlc->i_height + 15) & ~15;; ++ vf_mmal->crop.x = vf_vlc->i_x_offset; ++ vf_mmal->crop.y = vf_vlc->i_y_offset; ++ vf_mmal->crop.width = vf_vlc->i_visible_width; ++ vf_mmal->crop.height = vf_vlc->i_visible_height; ++ if (vf_vlc->i_sar_num == 0 || vf_vlc->i_sar_den == 0) { ++ vf_mmal->par.num = 1; ++ vf_mmal->par.den = 1; ++ } else { ++ vf_mmal->par.num = vf_vlc->i_sar_num; ++ vf_mmal->par.den = vf_vlc->i_sar_den; ++ } ++ vf_mmal->frame_rate.num = vf_vlc->i_frame_rate; ++ vf_mmal->frame_rate.den = vf_vlc->i_frame_rate_base; ++ vf_mmal->color_space = vlc_to_mmal_color_space(vf_vlc->space); ++} ++ ++hw_mmal_port_pool_ref_t * hw_mmal_port_pool_ref_create(MMAL_PORT_T * const port, ++ const unsigned int headers, const uint32_t payload_size) ++{ ++ hw_mmal_port_pool_ref_t * ppr = calloc(1, sizeof(hw_mmal_port_pool_ref_t)); ++ if (ppr == NULL) ++ return NULL; ++ ++ if ((ppr->pool = mmal_port_pool_create(port, headers, payload_size)) == NULL) ++ goto fail; ++ ++ ppr->port = port; ++ atomic_store(&ppr->refs, 1); ++ return ppr; ++ ++fail: ++ free(ppr); ++ return NULL; ++} ++ ++static void do_detached(void *(*fn)(void *), void * v) ++{ ++ pthread_t dothread; ++ pthread_create(&dothread, NULL, fn, v); ++ pthread_detach(dothread); ++} ++ ++// Destroy a ppr - aranged s.t. it has the correct prototype for a pthread ++static void * kill_ppr(void * v) ++{ ++ hw_mmal_port_pool_ref_t * const ppr = v; ++ if (ppr->port->is_enabled) ++ mmal_port_disable(ppr->port); // Avoid annoyed messages from MMAL when we kill the pool ++ mmal_port_pool_destroy(ppr->port, ppr->pool); ++ free(ppr); ++ return NULL; ++} ++ ++void hw_mmal_port_pool_ref_release(hw_mmal_port_pool_ref_t * const ppr, const bool in_cb) ++{ ++ if (ppr == NULL) ++ return; ++ if (atomic_fetch_sub(&ppr->refs, 1) != 1) ++ return; ++ if (in_cb) ++ do_detached(kill_ppr, ppr); ++ else ++ kill_ppr(ppr); ++} ++ ++// Put buffer in port if possible - if not then release to pool ++// Returns true if sent, false if recycled ++static bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf) ++{ ++ mmal_buffer_header_reset(buf); ++ buf->user_data = NULL; ++ ++ if (mmal_port_send_buffer(ppr->port, buf) == MMAL_SUCCESS) ++ return true; ++ mmal_buffer_header_release(buf); ++ return false; ++} ++ ++MMAL_STATUS_T hw_mmal_port_pool_ref_fill(hw_mmal_port_pool_ref_t * const ppr) ++{ ++ MMAL_BUFFER_HEADER_T * buf; ++ MMAL_STATUS_T err = MMAL_SUCCESS; ++ ++ while ((buf = mmal_queue_get(ppr->pool->queue)) != NULL) { ++ if ((err = mmal_port_send_buffer(ppr->port, buf)) != MMAL_SUCCESS) ++ { ++ mmal_queue_put_back(ppr->pool->queue, buf); ++ break; ++ } ++ } ++ return err; ++} ++ ++void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn) ++{ ++ pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic_ctx_cmn; ++ unsigned int i; ++ ++ for (i = 0; i != ctx->buf_count; ++i) { ++ mmal_buffer_header_release(ctx->bufs[i]); ++ } ++ free(ctx); ++} ++ ++picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn) ++{ ++ const pic_ctx_mmal_t * const src_ctx = (pic_ctx_mmal_t *)pic_ctx_cmn; ++ pic_ctx_mmal_t * const dst_ctx = calloc(1, sizeof(*dst_ctx)); ++ unsigned int i; ++ ++ if (dst_ctx == NULL) ++ return NULL; ++ ++ // Copy ++ dst_ctx->cmn = src_ctx->cmn; ++ ++ dst_ctx->buf_count = src_ctx->buf_count; ++ for (i = 0; i != src_ctx->buf_count; ++i) { ++ dst_ctx->bufs[i] = src_ctx->bufs[i]; ++ mmal_buffer_header_acquire(dst_ctx->bufs[i]); ++ } ++ ++ return &dst_ctx->cmn; ++} ++ ++static MMAL_BOOL_T ++buf_pre_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) ++{ ++ hw_mmal_port_pool_ref_t * const ppr = userdata; ++ ++ // Kill the callback - otherwise we will go in circles! ++ mmal_buffer_header_pre_release_cb_set(buf, (MMAL_BH_PRE_RELEASE_CB_T)0, NULL); ++ mmal_buffer_header_acquire(buf); // Ref it again ++ ++ // As we have re-acquired the buffer we need a full release ++ // (not continue) to zap the ref count back to zero ++ // This is "safe" 'cos we have already reset the cb ++ hw_mmal_port_pool_ref_recycle(ppr, buf); ++ hw_mmal_port_pool_ref_release(ppr, true); // Assume in callback ++ ++ return MMAL_TRUE; ++} ++ ++// Buffer belongs to context on successful return from this fn ++// is still valid on failure ++picture_context_t * ++hw_mmal_gen_context(MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr) ++{ ++ pic_ctx_mmal_t * const ctx = calloc(1, sizeof(pic_ctx_mmal_t)); ++ ++ if (ctx == NULL) ++ return NULL; ++ ++ hw_mmal_port_pool_ref_acquire(ppr); ++ mmal_buffer_header_pre_release_cb_set(buf, buf_pre_release_cb, ppr); ++ ++ ctx->cmn.copy = hw_mmal_pic_ctx_copy; ++ ctx->cmn.destroy = hw_mmal_pic_ctx_destroy; ++ ++ ctx->bufs[0] = buf; ++ ctx->buf_count = 1; ++ ++ buf->user_data = NULL; ++ return &ctx->cmn; ++} ++ ++int hw_mmal_get_gpu_mem(void) { ++ static int stashed_val = -2; ++ VCHI_INSTANCE_T vchi_instance; ++ VCHI_CONNECTION_T *vchi_connection = NULL; ++ char rbuf[1024] = { 0 }; ++ ++ if (stashed_val >= -1) ++ return stashed_val; ++ ++ if (vchi_initialise(&vchi_instance) != 0) ++ goto fail0; ++ ++ //create a vchi connection ++ if (vchi_connect(NULL, 0, vchi_instance) != 0) ++ goto fail0; ++ ++ vc_vchi_gencmd_init(vchi_instance, &vchi_connection, 1); ++ ++ //send the gencmd for the argument ++ if (vc_gencmd_send("get_mem gpu") != 0) ++ goto fail; ++ ++ if (vc_gencmd_read_response(rbuf, sizeof(rbuf) - 1) != 0) ++ goto fail; ++ ++ if (strncmp(rbuf, "gpu=", 4) != 0) ++ goto fail; ++ ++ char *p; ++ unsigned long m = strtoul(rbuf + 4, &p, 10); ++ ++ if (p[0] != 'M' || p[1] != '\0') ++ stashed_val = -1; ++ else ++ stashed_val = (int)m << 20; ++ ++ vc_gencmd_stop(); ++ ++ //close the vchi connection ++ vchi_disconnect(vchi_instance); ++ ++ return stashed_val; ++ ++fail: ++ vc_gencmd_stop(); ++ vchi_disconnect(vchi_instance); ++fail0: ++ stashed_val = -1; ++ return -1; ++}; ++ ++// =========================================================================== ++ ++typedef struct pool_ent_s ++{ ++ struct pool_ent_s * next; ++ struct pool_ent_s * prev; ++ ++ atomic_int ref_count; ++ unsigned int seq; ++ ++ size_t size; ++ ++ int vcsm_hdl; ++ int vc_hdl; ++ void * buf; ++ ++ unsigned int width; ++ unsigned int height; ++ ++ picture_t * pic; ++} pool_ent_t; ++ ++ ++typedef struct ent_list_hdr_s ++{ ++ pool_ent_t * ents; ++ pool_ent_t * tail; ++ unsigned int n; ++} ent_list_hdr_t; ++ ++#define ENT_LIST_HDR_INIT (ent_list_hdr_t){ \ ++ .ents = NULL, \ ++ .tail = NULL, \ ++ .n = 0 \ ++} ++ ++struct vzc_pool_ctl_s ++{ ++ atomic_int ref_count; ++ ++ ent_list_hdr_t ent_pool; ++ ent_list_hdr_t ents_cur; ++ ent_list_hdr_t ents_prev; ++ ++ unsigned int max_n; ++ unsigned int seq; ++ ++ vlc_mutex_t lock; ++ ++ MMAL_POOL_T * buf_pool; ++}; ++ ++typedef struct vzc_subbuf_ent_s ++{ ++ pool_ent_t * ent; ++ MMAL_RECT_T pic_rect; ++ MMAL_RECT_T orig_dest_rect; ++ MMAL_DISPLAYREGION_T dreg; ++} vzc_subbuf_ent_t; ++ ++ ++static pool_ent_t * ent_extract(ent_list_hdr_t * const elh, pool_ent_t * const ent) ++{ ++// printf("List %p [%d]: Ext %p\n", elh, elh->n, ent); ++ ++ if (ent == NULL) ++ return NULL; ++ ++ if (ent->next == NULL) ++ elh->tail = ent->prev; ++ else ++ ent->next->prev = ent->prev; ++ ++ if (ent->prev == NULL) ++ elh->ents = ent->next; ++ else ++ ent->prev->next = ent->next; ++ ++ ent->prev = ent->next = NULL; ++ ++ --elh->n; ++ ++ return ent; // For convienience ++} ++ ++static inline pool_ent_t * ent_extract_tail(ent_list_hdr_t * const elh) ++{ ++ return ent_extract(elh, elh->tail); ++} ++ ++static void ent_add_head(ent_list_hdr_t * const elh, pool_ent_t * const ent) ++{ ++// printf("List %p [%d]: Add %p\n", elh, elh->n, ent); ++ ++ if ((ent->next = elh->ents) == NULL) ++ elh->tail = ent; ++ else ++ ent->next->prev = ent; ++ ++ ent->prev = NULL; ++ elh->ents = ent; ++ ++elh->n; ++} ++ ++static void ent_free(pool_ent_t * const ent) ++{ ++// printf("Free ent: %p\n", ent); ++ if (ent != NULL) { ++ // If we still have a ref to a pic - kill it now ++ if (ent->pic != NULL) ++ picture_Release(ent->pic); ++ ++ // Free contents ++ vcsm_unlock_hdl(ent->vcsm_hdl); ++ ++ vcsm_free(ent->vcsm_hdl); ++ ++ free(ent); ++ } ++} ++ ++static void ent_free_list(ent_list_hdr_t * const elh) ++{ ++ pool_ent_t * ent = elh->ents; ++ ++// printf("Free list: %p [%d]\n", elh, elh->n); ++ ++ *elh = ENT_LIST_HDR_INIT; ++ ++ while (ent != NULL) { ++ pool_ent_t * const t = ent; ++ ent = t->next; ++ ent_free(t); ++ } ++} ++ ++static void ent_list_move(ent_list_hdr_t * const dst, ent_list_hdr_t * const src) ++{ ++// printf("Move %p->%p\n", src, dst); ++ ++ *dst = *src; ++ *src = ENT_LIST_HDR_INIT; ++} ++ ++// Scans "backwards" as that should give us the fastest match if we are ++// presented with pics in the same order each time ++static pool_ent_t * ent_list_extract_pic_ent(ent_list_hdr_t * const elh, picture_t * const pic) ++{ ++ pool_ent_t *ent = elh->tail; ++ ++// printf("Find list: %p [%d]; pic:%p\n", elh, elh->n, pic); ++ ++ while (ent != NULL) { ++// printf("Check ent: %p, pic:%p\n", ent, ent->pic); ++ ++ if (ent->pic == pic) ++ return ent_extract(elh, ent); ++ ent = ent->prev; ++ } ++ return NULL; ++} ++ ++#define POOL_ENT_ALLOC_BLOCK 0x10000 ++ ++static pool_ent_t * pool_ent_alloc_new(size_t req_size) + { +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++ pool_ent_t * ent = calloc(1, sizeof(*ent)); ++ const size_t alloc_size = (req_size + POOL_ENT_ALLOC_BLOCK - 1) & ~(POOL_ENT_ALLOC_BLOCK - 1); ++ ++ if (ent == NULL) ++ return NULL; ++ ++ ent->next = ent->prev = NULL; ++ ++ // Alloc from vcsm ++ if ((ent->vcsm_hdl = vcsm_malloc_cache(alloc_size, VCSM_CACHE_TYPE_HOST, (char *)"vlc-subpic")) == -1) ++ goto fail1; ++ if ((ent->vc_hdl = vcsm_vc_hdl_from_hdl(ent->vcsm_hdl)) == 0) ++ goto fail2; ++ if ((ent->buf = vcsm_lock(ent->vcsm_hdl)) == NULL) ++ goto fail2; ++ ++ ent->size = alloc_size; ++ return ent; ++ ++fail2: ++ vcsm_free(ent->vcsm_hdl); ++fail1: ++ free(ent); ++ return NULL; ++} ++ ++static inline pool_ent_t * pool_ent_ref(pool_ent_t * const ent) ++{ ++// int n = atomic_fetch_add(&ent->ref_count, 1) + 1; ++// printf("Ref: %p: %d\n", ent, n); ++ atomic_fetch_add(&ent->ref_count, 1); ++ return ent; ++} ++ ++static void pool_recycle(vzc_pool_ctl_t * const pc, pool_ent_t * const ent) ++{ ++ pool_ent_t * xs = NULL; ++ int n; ++ ++ if (ent == NULL) ++ return; ++ ++ n = atomic_fetch_sub(&ent->ref_count, 1) - 1; ++ ++// printf("%s: Pool: %p: Ent: %p: %d\n", __func__, &pc->ent_pool, ent, n); ++ ++ if (n != 0) ++ return; + +- int offset = 0; +- picture->p[0].p_pixels = buffer->data; +- for (int i = 1; i < picture->i_planes; i++) { +- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; +- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ if (ent->pic != NULL) { ++ picture_Release(ent->pic); ++ ent->pic = NULL; + } + +- pic_sys->displayed = false; ++ vlc_mutex_lock(&pc->lock); + +- return VLC_SUCCESS; ++ // If we have a full pool then extract the LRU and free it ++ // Free done outside mutex ++ if (pc->ent_pool.n >= pc->max_n) ++ xs = ent_extract_tail(&pc->ent_pool); ++ ++ ent_add_head(&pc->ent_pool, ent); ++ ++ vlc_mutex_unlock(&pc->lock); ++ ++ ent_free(xs); + } ++ ++// * This could be made more efficient, but this is easy ++static void pool_recycle_list(vzc_pool_ctl_t * const pc, ent_list_hdr_t * const elh) ++{ ++ pool_ent_t * ent; ++ while ((ent = ent_extract_tail(elh)) != NULL) { ++ pool_recycle(pc, ent); ++ } ++} ++ ++static pool_ent_t * pool_best_fit(vzc_pool_ctl_t * const pc, size_t req_size) ++{ ++ pool_ent_t * best = NULL; ++ ++ vlc_mutex_lock(&pc->lock); ++ ++ { ++ pool_ent_t * ent = pc->ent_pool.ents; ++ ++ // Simple scan ++ while (ent != NULL) { ++ if (ent->size >= req_size && ent->size <= req_size * 2 + POOL_ENT_ALLOC_BLOCK && ++ (best == NULL || best->size > ent->size)) ++ best = ent; ++ ent = ent->next; ++ } ++ ++ // extract best from chain if we've found it ++ ent_extract(&pc->ent_pool, best); ++ } ++ ++ vlc_mutex_unlock(&pc->lock); ++ ++ if (best == NULL) ++ best = pool_ent_alloc_new(req_size); ++ ++ if ((best->seq = ++pc->seq) == 0) ++ best->seq = ++pc->seq; // Never allow to be zero ++ ++ atomic_store(&best->ref_count, 1); ++ return best; ++} ++ ++bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt) ++{ ++ const pool_ent_t *const ent = ((vzc_subbuf_ent_t *)buf->user_data)->ent; ++ MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; ++ ++ es_fmt->type = MMAL_ES_TYPE_VIDEO; ++ es_fmt->encoding = MMAL_ENCODING_BGRA; ++ es_fmt->encoding_variant = MMAL_ENCODING_BGRA; ++ ++ v_fmt->width = ent->width; ++ v_fmt->height = ent->height; ++ v_fmt->crop.x = 0; ++ v_fmt->crop.y = 0; ++ v_fmt->crop.width = ent->width; ++ v_fmt->crop.height = ent->height; ++ ++ return true; ++} ++ ++void hw_mmal_vzc_buf_frame_size(MMAL_BUFFER_HEADER_T * const buf, ++ uint32_t * const pWidth, uint32_t * const pHeight) ++{ ++ const pool_ent_t *const ent = ((vzc_subbuf_ent_t *)buf->user_data)->ent; ++ *pWidth = ent->width; ++ *pHeight = ent->height; ++} ++ ++ ++MMAL_DISPLAYREGION_T * hw_mmal_vzc_buf_region(MMAL_BUFFER_HEADER_T * const buf) ++{ ++ vzc_subbuf_ent_t * sb = buf->user_data; ++ return &sb->dreg; ++} ++ ++void hw_mmal_vzc_buf_set_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const int x, const int y, const int w, const int h) ++{ ++ vzc_subbuf_ent_t * sb = buf->user_data; ++ sb->orig_dest_rect.x = x; ++ sb->orig_dest_rect.y = y; ++ sb->orig_dest_rect.width = w; ++ sb->orig_dest_rect.height = h; ++} ++ ++static inline int rescale_x(int x, int mul, int div) ++{ ++ return div == 0 ? x * mul : (x * mul + div/2) / div; ++} ++ ++static void rescale_rect(MMAL_RECT_T * const d, const MMAL_RECT_T * const s, const MMAL_RECT_T * mul_rect, const MMAL_RECT_T * div_rect) ++{ ++ d->x = rescale_x(s->x, mul_rect->width, div_rect->width); ++ d->y = rescale_x(s->y, mul_rect->height, div_rect->height); ++ d->width = rescale_x(s->width, mul_rect->width, div_rect->width); ++ d->height = rescale_x(s->height, mul_rect->height, div_rect->height); ++} ++ ++void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect) ++{ ++ vzc_subbuf_ent_t * sb = buf->user_data; ++ if (scale_rect == NULL) { ++ sb->dreg.dest_rect = sb->orig_dest_rect; ++ } ++ else ++ { ++ rescale_rect(&sb->dreg.dest_rect, &sb->orig_dest_rect, ++ scale_rect, &sb->pic_rect); ++ } ++} ++ ++unsigned int hw_mmal_vzc_buf_seq(MMAL_BUFFER_HEADER_T * const buf) ++{ ++ vzc_subbuf_ent_t * sb = buf->user_data; ++ return sb->ent->seq; ++} ++ ++ ++// The intent with the ents_cur & ents_last stuff is to remember the buffers ++// we used on the last frame and reuse them on the current one if they are the ++// same. Unfortunately detection of "is_first" is only a heuristic (there are ++// no rules governing the order in which things are blended) so we must deal ++// (fairly) gracefully with it never (or always) being set. ++ ++MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, const picture_t * const dst_pic, const bool is_first) ++{ ++ MMAL_BUFFER_HEADER_T * const buf = mmal_queue_get(pc->buf_pool->queue); ++ vzc_subbuf_ent_t * sb; ++ ++ if (buf == NULL) ++ return NULL; ++ ++ if ((sb = calloc(1, sizeof(*sb))) == NULL) ++ goto fail1; ++ ++ // If first or we've had a lot of stuff move everything to the last list ++ // (we could deal more gracefully with the "too many" case but it shouldn't ++ // really happen) ++ if (is_first || pc->ents_cur.n >= CTX_BUFS_MAX) { ++ pool_recycle_list(pc, &pc->ents_prev); ++ ent_list_move(&pc->ents_prev, &pc->ents_cur); ++ } ++ ++ sb->dreg.hdr.id = MMAL_PARAMETER_DISPLAYREGION; ++ sb->dreg.hdr.size = sizeof(sb->dreg); ++ buf->user_data = sb; ++ ++ { ++ // ?? Round start offset as well as length ++ const video_format_t *const fmt = &pic->format; ++ ++ const unsigned int bpp = (fmt->i_bits_per_pixel + 7) >> 3; ++ const unsigned int xl = (fmt->i_x_offset & ~15); ++ const unsigned int xr = (fmt->i_x_offset + fmt->i_visible_width + 15) & ~15; ++ const size_t dst_stride = (xr - xl) * bpp; ++ const size_t dst_lines = ((fmt->i_visible_height + 15) & ~15); ++ const size_t dst_size = dst_stride * dst_lines; ++ ++ pool_ent_t * ent = ent_list_extract_pic_ent(&pc->ents_prev, pic); ++ ++ // If we didn't find ent in last then look in cur in case is_first ++ // isn't working ++ if (ent == NULL) ++ ent = ent_list_extract_pic_ent(&pc->ents_cur, pic); ++ ++// printf("ent_found: %p\n", ent); ++ ++ if (ent == NULL) ++ { ++ if ((ent = pool_best_fit(pc, dst_size)) == NULL) ++ goto fail2; ++ ent->pic = picture_Hold(pic); ++ } ++ ++ ent_add_head(&pc->ents_cur, ent); ++ ++ sb->ent = pool_ent_ref(ent); ++ hw_mmal_vzc_pool_ref(pc); ++ ++ // Copy data ++ buf->next = NULL; ++ buf->cmd = 0; ++ buf->data = (uint8_t *)(ent->vc_hdl); ++ buf->alloc_size = buf->length = dst_size; ++ buf->offset = 0; ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ buf->pts = buf->dts = pic->date != VLC_TICK_INVALID ? pic->date : MMAL_TIME_UNKNOWN; ++ buf->type->video = (MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T){ ++ .planes = 1, ++ .pitch = { dst_stride } ++ }; ++ ++ // Remember offsets ++ sb->dreg.set = MMAL_DISPLAY_SET_SRC_RECT; ++ ++// printf("+++ bpp:%d, vis:%dx%d wxh:%dx%d, d:%dx%d\n", bpp, fmt->i_visible_width, fmt->i_visible_height, fmt->i_width, fmt->i_height, dst_stride, dst_lines); ++ ++ sb->dreg.src_rect = (MMAL_RECT_T){ ++ .x = (fmt->i_x_offset - xl), ++ .y = 0, ++ .width = fmt->i_visible_width, ++ .height = fmt->i_visible_height ++ }; ++ ++ sb->pic_rect = (MMAL_RECT_T){ ++ .x = dst_pic->format.i_x_offset, ++ .y = dst_pic->format.i_y_offset, ++ .width = dst_pic->format.i_visible_width, ++ .height = dst_pic->format.i_visible_height ++ }; ++ ++ ent->width = dst_stride / bpp; ++ ent->height = dst_lines; ++ ++ // 2D copy ++ { ++ unsigned int i; ++ uint8_t *d = ent->buf; ++ const uint8_t *s = pic->p[0].p_pixels + xl * bpp + fmt->i_y_offset * pic->p[0].i_pitch; ++ for (i = 0; i != fmt->i_visible_height; ++i) { ++ memcpy(d, s, dst_stride); ++ d += dst_stride; ++ s += pic->p[0].i_pitch; ++ } ++ ++ // And make sure it is actually in memory ++ flush_range(ent->buf, d - (uint8_t *)ent->buf); ++ } ++ } ++ ++ return buf; ++ ++fail2: ++ free(sb); ++fail1: ++ mmal_buffer_header_release(buf); ++ return NULL; ++} ++ ++void hw_mmal_vzc_pool_flush(vzc_pool_ctl_t * const pc) ++{ ++ pool_recycle_list(pc, &pc->ents_prev); ++ pool_recycle_list(pc, &pc->ents_cur); ++} ++ ++static void hw_mmal_vzc_pool_delete(vzc_pool_ctl_t * const pc) ++{ ++ ++// printf("<<< %s\n", __func__); ++ ++ hw_mmal_vzc_pool_flush(pc); ++ ++ ent_free_list(&pc->ent_pool); ++ ++ if (pc->buf_pool != NULL) ++ mmal_pool_destroy(pc->buf_pool); ++ ++ vlc_mutex_destroy(&pc->lock); ++ ++// memset(pc, 0xba, sizeof(*pc)); // Zap for (hopefully) faster crash ++ ++ free (pc); ++ ++ vcsm_exit(); ++ ++// printf(">>> %s\n", __func__); ++} ++ ++void hw_mmal_vzc_pool_release(vzc_pool_ctl_t * const pc) ++{ ++ int n; ++ ++ if (pc == NULL) ++ return; ++ ++ n = atomic_fetch_sub(&pc->ref_count, 1) - 1; ++ ++ if (n != 0) ++ return; ++ ++ hw_mmal_vzc_pool_delete(pc); ++} ++ ++void hw_mmal_vzc_pool_ref(vzc_pool_ctl_t * const pc) ++{ ++ atomic_fetch_add(&pc->ref_count, 1); ++} ++ ++static MMAL_BOOL_T vcz_pool_release_cb(MMAL_POOL_T * buf_pool, MMAL_BUFFER_HEADER_T *buf, void *userdata) ++{ ++ vzc_pool_ctl_t * const pc = userdata; ++ vzc_subbuf_ent_t * const sb = buf->user_data; ++ ++ VLC_UNUSED(buf_pool); ++ ++// printf("<<< %s\n", __func__); ++ ++ if (sb != NULL) { ++ buf->user_data = NULL; ++ pool_recycle(pc, sb->ent); ++ hw_mmal_vzc_pool_release(pc); ++ free(sb); ++ } ++ ++// printf(">>> %s\n", __func__); ++ ++ return MMAL_TRUE; ++} ++ ++vzc_pool_ctl_t * hw_mmal_vzc_pool_new() ++{ ++ vzc_pool_ctl_t * const pc = calloc(1, sizeof(*pc)); ++ ++ if (pc == NULL) ++ return NULL; ++ ++ vcsm_init(); ++ ++ pc->max_n = 8; ++ vlc_mutex_init(&pc->lock); // Must init before potential destruction ++ ++ if ((pc->buf_pool = mmal_pool_create(64, 0)) == NULL) ++ { ++ hw_mmal_vzc_pool_delete(pc); ++ return NULL; ++ } ++ ++ atomic_store(&pc->ref_count, 1); ++ ++ mmal_pool_callback_set(pc->buf_pool, vcz_pool_release_cb, pc); ++ ++ return pc; ++} ++ ++ ++ +--- a/modules/hw/mmal/mmal_picture.h ++++ b/modules/hw/mmal/mmal_picture.h +@@ -24,19 +24,209 @@ + #ifndef VLC_MMAL_MMAL_PICTURE_H_ + #define VLC_MMAL_MMAL_PICTURE_H_ + ++#include <stdatomic.h> ++ + #include <vlc_common.h> + #include <interface/mmal/mmal.h> + + /* Think twice before changing this. Incorrect values cause havoc. */ + #define NUM_ACTUAL_OPAQUE_BUFFERS 30 + +-struct picture_sys_t { +- vlc_object_t *owner; ++#ifndef VLC_TICK_INVALID ++#define VLC_TICK_INVALID VLC_TS_INVALID ++#define VLC_VER_3 1 ++#else ++#define VLC_VER_3 0 ++#endif ++ ++typedef struct mmal_port_pool_ref_s ++{ ++ atomic_uint refs; ++ MMAL_POOL_T * pool; ++ MMAL_PORT_T * port; ++} hw_mmal_port_pool_ref_t; ++ ++typedef struct pic_ctx_subpic_s { ++ picture_t * subpic; ++ int x, y; ++ int alpha; ++} pic_ctx_subpic_t; ++ ++ ++#define CTX_BUFS_MAX 4 ++ ++typedef struct pic_ctx_mmal_s { ++ picture_context_t cmn; // PARENT: Common els at start ++ ++ unsigned int buf_count; ++ MMAL_BUFFER_HEADER_T * bufs[CTX_BUFS_MAX]; ++ ++#if 0 ++ MMAL_BUFFER_HEADER_T * buf; ++ hw_mmal_port_pool_ref_t * ppr; ++ ++ MMAL_BUFFER_HEADER_T * sub_bufs; ++ MMAL_BUFFER_HEADER_T * sub_tail; ++ ++ vlc_object_t * obj; ++#endif ++} pic_ctx_mmal_t; ++ ++ ++MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs); ++void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc); + +- MMAL_BUFFER_HEADER_T *buffer; +- bool displayed; +-}; ++hw_mmal_port_pool_ref_t * hw_mmal_port_pool_ref_create(MMAL_PORT_T * const port, ++ const unsigned int headers, const uint32_t payload_size); ++void hw_mmal_port_pool_ref_release(hw_mmal_port_pool_ref_t * const ppr, const bool in_cb); ++//bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf); ++MMAL_STATUS_T hw_mmal_port_pool_ref_fill(hw_mmal_port_pool_ref_t * const ppr); ++static inline void hw_mmal_port_pool_ref_acquire(hw_mmal_port_pool_ref_t * const ppr) ++{ ++ atomic_fetch_add(&ppr->refs, 1); ++} ++ ++static inline int hw_mmal_pic_has_sub_bufs(picture_t * const pic) ++{ ++ pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; ++ return ctx->buf_count > 1; ++} ++ ++static inline void hw_mmal_pic_sub_buf_add(picture_t * const pic, MMAL_BUFFER_HEADER_T * const sub) ++{ ++ pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; ++ ++ if (ctx->buf_count >= CTX_BUFS_MAX) { ++ mmal_buffer_header_release(sub); ++ return; ++ } ++ ++ ctx->bufs[ctx->buf_count++] = sub; ++} ++ ++static inline MMAL_BUFFER_HEADER_T * hw_mmal_pic_sub_buf_get(picture_t * const pic, const unsigned int n) ++{ ++ pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; ++ ++ return n + 1 > ctx->buf_count ? NULL : ctx->bufs[n + 1]; ++} ++ ++picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn); ++void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn); ++picture_context_t * hw_mmal_gen_context(MMAL_BUFFER_HEADER_T * buf, ++ hw_mmal_port_pool_ref_t * const ppr); ++ ++int hw_mmal_get_gpu_mem(void); ++ ++ ++static inline MMAL_STATUS_T port_parameter_set_uint32(MMAL_PORT_T * port, uint32_t id, uint32_t val) ++{ ++ const MMAL_PARAMETER_UINT32_T param = { ++ .hdr = {.id = id, .size = sizeof(MMAL_PARAMETER_UINT32_T)}, ++ .value = val ++ }; ++ return mmal_port_parameter_set(port, ¶m.hdr); ++} ++ ++static inline MMAL_STATUS_T port_parameter_set_bool(MMAL_PORT_T * port, uint32_t id, int val) ++{ ++ const MMAL_PARAMETER_BOOLEAN_T param = { ++ .hdr = {.id = id, .size = sizeof(MMAL_PARAMETER_BOOLEAN_T)}, ++ .enable = val ++ }; ++ return mmal_port_parameter_set(port, ¶m.hdr); ++} ++ ++static inline MMAL_STATUS_T port_send_replicated(MMAL_PORT_T * const port, MMAL_POOL_T * const rep_pool, ++ MMAL_BUFFER_HEADER_T * const src_buf, ++ const uint64_t seq) ++{ ++ MMAL_STATUS_T err; ++ MMAL_BUFFER_HEADER_T *const rep_buf = mmal_queue_wait(rep_pool->queue); ++ ++ if (rep_buf == NULL) ++ return MMAL_ENOSPC; ++ ++ if ((err = mmal_buffer_header_replicate(rep_buf, src_buf)) != MMAL_SUCCESS) ++ return err; ++ ++ rep_buf->pts = seq; ++ ++ if ((err = mmal_port_send_buffer(port, rep_buf)) != MMAL_SUCCESS) ++ { ++ mmal_buffer_header_release(rep_buf); ++ return err; ++ } ++ ++ return MMAL_SUCCESS; ++} ++ ++static inline void pic_to_buf_copy_props(MMAL_BUFFER_HEADER_T * const buf, const picture_t * const pic) ++{ ++ if (!pic->b_progressive) ++ { ++ buf->flags |= MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED; ++ buf->type->video.flags |= MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED; ++ } ++ else ++ { ++ buf->flags &= ~MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED; ++ buf->type->video.flags &= ~MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED; ++ } ++ if (pic->b_top_field_first) ++ { ++ buf->flags |= MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST; ++ buf->type->video.flags |= MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST; ++ } ++ else ++ { ++ buf->flags &= ~MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST; ++ buf->type->video.flags &= ~MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST; ++ } ++ buf->pts = pic->date != VLC_TICK_INVALID ? pic->date : MMAL_TIME_UNKNOWN; ++ buf->dts = buf->pts; ++} ++ ++static inline void buf_to_pic_copy_props(picture_t * const pic, const MMAL_BUFFER_HEADER_T * const buf) ++{ ++ // Contrary to docn the interlace & tff flags turn up in the header flags rather than the ++ // video specific flags (which appear to be currently unused). ++ pic->b_progressive = (buf->flags & MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED) == 0; ++ pic->b_top_field_first = (buf->flags & MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST) != 0; ++ ++ pic->date = buf->pts != MMAL_TIME_UNKNOWN ? buf->pts : ++ buf->dts != MMAL_TIME_UNKNOWN ? buf->dts : ++ VLC_TICK_INVALID; ++} ++ ++// Retrieve buf from pic & update with pic props ++static inline MMAL_BUFFER_HEADER_T * pic_mmal_buffer(const picture_t *const pic) ++{ ++ MMAL_BUFFER_HEADER_T * const buf = ((pic_ctx_mmal_t *)pic->context)->bufs[0]; ++ if (buf != NULL) ++ pic_to_buf_copy_props(buf, pic); ++ ++ return buf; ++} ++ ++struct vzc_pool_ctl_s; ++typedef struct vzc_pool_ctl_s vzc_pool_ctl_t; ++ ++bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt); ++MMAL_DISPLAYREGION_T * hw_mmal_vzc_buf_region(MMAL_BUFFER_HEADER_T * const buf); ++void hw_mmal_vzc_buf_set_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const int x, const int y, const int w, const int h); ++void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect); ++unsigned int hw_mmal_vzc_buf_seq(MMAL_BUFFER_HEADER_T * const buf); ++MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, const picture_t * const dst_pic, const bool is_first); ++void hw_mmal_vzc_buf_frame_size(MMAL_BUFFER_HEADER_T * const buf, ++ uint32_t * const pWidth, uint32_t * const pHeight); ++ ++void hw_mmal_vzc_pool_flush(vzc_pool_ctl_t * const pc); ++void hw_mmal_vzc_pool_release(vzc_pool_ctl_t * const pc); ++void hw_mmal_vzc_pool_ref(vzc_pool_ctl_t * const pc); ++vzc_pool_ctl_t * hw_mmal_vzc_pool_new(void); + +-int mmal_picture_lock(picture_t *picture); ++#define VOUT_DISPLAY_CHANGE_MMAL_BASE 1024 ++#define VOUT_DISPLAY_CHANGE_MMAL_HIDE (VOUT_DISPLAY_CHANGE_MMAL_BASE + 0) + + #endif +--- /dev/null ++++ b/modules/hw/mmal/subpic.c +@@ -0,0 +1,222 @@ ++/***************************************************************************** ++ * mmal.c: MMAL-based decoder plugin for Raspberry Pi ++ ***************************************************************************** ++ * Authors: jc@kynesim.co.uk ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU Lesser General Public License as published by ++ * the Free Software Foundation; either version 2.1 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this program; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. ++ *****************************************************************************/ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include <stdatomic.h> ++ ++#include <vlc_common.h> ++#include <vlc_plugin.h> ++#include <vlc_codec.h> ++#include <vlc_filter.h> ++#include <vlc_threads.h> ++ ++#include <bcm_host.h> ++#include <interface/mmal/mmal.h> ++#include <interface/mmal/util/mmal_util.h> ++#include <interface/mmal/util/mmal_default_components.h> ++ ++#include "mmal_picture.h" ++#include "subpic.h" ++ ++ ++#define TRACE_ALL 0 ++ ++static inline bool cmp_rect(const MMAL_RECT_T * const a, const MMAL_RECT_T * const b) ++{ ++ return a->x == b->x && a->y == b->y && a->width == b->width && a->height == b->height; ++} ++ ++void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const sub) ++{ ++ VLC_UNUSED(p_filter); ++ if (sub->port != NULL && sub->port->is_enabled) ++ mmal_port_disable(sub->port); ++ sub->seq = 0; ++} ++ ++void hw_mmal_subpic_close(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe) ++{ ++ hw_mmal_subpic_flush(p_filter, spe); ++ ++ if (spe->pool != NULL) ++ mmal_pool_destroy(spe->pool); ++ ++ // Zap to avoid any accidental reuse ++ *spe = (subpic_reg_stash_t){NULL}; ++} ++ ++MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer) ++{ ++ MMAL_STATUS_T err; ++ ++ // Start by zapping all to zero ++ *spe = (subpic_reg_stash_t){NULL}; ++ ++ if ((err = port_parameter_set_bool(port, MMAL_PARAMETER_ZERO_COPY, true)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Failed to set sub port zero copy"); ++ return err; ++ } ++ ++ if ((spe->pool = mmal_pool_create(30, 0)) == NULL) ++ { ++ msg_Err(p_filter, "Failed to create sub pool"); ++ return MMAL_ENOMEM; ++ } ++ ++ port->userdata = (void *)p_filter; ++ spe->port = port; ++ spe->layer = layer; ++ ++ return MMAL_SUCCESS; ++} ++ ++static void conv_subpic_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++#if TRACE_ALL ++ msg_Dbg((filter_t *)port->userdata, "<<< %s cmd=%d, user=%p, buf=%p, flags=%#x, len=%d/%d, pts=%lld", ++ __func__, buf->cmd, buf->user_data, buf, buf->flags, buf->length, buf->alloc_size, (long long)buf->pts); ++#else ++ VLC_UNUSED(port); ++#endif ++ ++ mmal_buffer_header_release(buf); // Will extract & release pic in pool callback ++} ++ ++ ++int hw_mmal_subpic_update(vlc_object_t * const p_filter, ++ picture_t * const p_pic, const unsigned int sub_no, ++ subpic_reg_stash_t * const spe, ++ const MMAL_RECT_T * const scale_out, ++ const uint64_t pts) ++{ ++ MMAL_STATUS_T err; ++ MMAL_BUFFER_HEADER_T * const sub_buf = hw_mmal_pic_sub_buf_get(p_pic, sub_no); ++ ++ if (sub_buf == NULL) ++ { ++ if (spe->port->is_enabled && spe->seq != 0) ++ { ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(spe->pool->queue); ++ ++ if (buf == NULL) { ++ msg_Err(p_filter, "Buffer get for subpic failed"); ++ return -1; ++ } ++#if TRACE_ALL ++ msg_Dbg(p_filter, "Remove pic for sub %d", sub_no); ++#endif ++ buf->cmd = 0; ++ buf->data = NULL; ++ buf->alloc_size = 0; ++ buf->offset = 0; ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ buf->pts = pts; ++ buf->dts = MMAL_TIME_UNKNOWN; ++ buf->user_data = NULL; ++ ++ if ((err = mmal_port_send_buffer(spe->port, buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to subput failed"); ++ mmal_buffer_header_release(buf); ++ return -1; ++ } ++ ++ spe->seq = 0; ++ } ++ } ++ else ++ { ++ const unsigned int seq = hw_mmal_vzc_buf_seq(sub_buf); ++ bool needs_update = (spe->seq != seq); ++ ++ hw_mmal_vzc_buf_scale_dest_rect(sub_buf, scale_out); ++ ++ if (hw_mmal_vzc_buf_set_format(sub_buf, spe->port->format)) ++ { ++ MMAL_DISPLAYREGION_T * const dreg = hw_mmal_vzc_buf_region(sub_buf); ++ MMAL_VIDEO_FORMAT_T *const v_fmt = &spe->port->format->es->video; ++ ++ v_fmt->frame_rate.den = p_pic->format.i_frame_rate_base; ++ v_fmt->frame_rate.num = p_pic->format.i_frame_rate; ++ v_fmt->par.den = p_pic->format.i_sar_den; ++ v_fmt->par.num = p_pic->format.i_sar_num; ++ v_fmt->color_space = MMAL_COLOR_SPACE_UNKNOWN; ++ ++ ++ if (needs_update || dreg->alpha != spe->alpha || !cmp_rect(&dreg->dest_rect, &spe->dest_rect)) { ++ ++ spe->alpha = dreg->alpha; ++ spe->dest_rect = dreg->dest_rect; ++ needs_update = true; ++#if TRACE_ALL ++ msg_Dbg(p_filter, "Update region for sub %d", sub_no); ++#endif ++ dreg->layer = spe->layer; ++ dreg->set |= MMAL_DISPLAY_SET_LAYER; ++ ++ if ((err = mmal_port_parameter_set(spe->port, &dreg->hdr)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Set display region on subput failed"); ++ return -1; ++ } ++ ++ if ((err = mmal_port_format_commit(spe->port)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(p_filter, "%s: Subpic commit fail: %d", __func__, err); ++ return -1; ++ } ++ } ++ } ++ ++ if (!spe->port->is_enabled) ++ { ++ spe->port->buffer_num = 30; ++ spe->port->buffer_size = spe->port->buffer_size_recommended; // Not used but shuts up the error checking ++ ++ if ((err = mmal_port_enable(spe->port, conv_subpic_cb)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(p_filter, "%s: Subpic enable fail: %d", __func__, err); ++ return -1; ++ } ++ } ++ ++ if (needs_update) ++ { ++#if TRACE_ALL ++ msg_Dbg(p_filter, "Update pic for sub %d", sub_no); ++#endif ++ if ((err = port_send_replicated(spe->port, spe->pool, sub_buf, pts)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to subput failed"); ++ return -1; ++ } ++ ++ spe->seq = seq; ++ } ++ } ++ return 1; ++} ++ ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/subpic.h +@@ -0,0 +1,28 @@ ++#ifndef VLC_HW_MMAL_SUBPIC_H_ ++#define VLC_HW_MMAL_SUBPIC_H_ ++ ++typedef struct subpic_reg_stash_s ++{ ++ MMAL_PORT_T * port; ++ MMAL_POOL_T * pool; ++ unsigned int layer; ++ // Shadow vars so we can tell if stuff has changed ++ MMAL_RECT_T dest_rect; ++ unsigned int alpha; ++ unsigned int seq; ++} subpic_reg_stash_t; ++ ++int hw_mmal_subpic_update(vlc_object_t * const p_filter, ++ picture_t * const p_pic, const unsigned int sub_no, ++ subpic_reg_stash_t * const stash, ++ const MMAL_RECT_T * const scale_out, ++ const uint64_t pts); ++ ++void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); ++ ++void hw_mmal_subpic_close(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); ++ ++MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer); ++ ++#endif ++ +--- a/modules/hw/mmal/vout.c ++++ b/modules/hw/mmal/vout.c +@@ -27,21 +27,24 @@ + #endif + + #include <math.h> ++#include <stdatomic.h> + + #include <vlc_common.h> +-#include <vlc_atomic.h> + #include <vlc_plugin.h> + #include <vlc_threads.h> + #include <vlc_vout_display.h> ++#include <vlc_modules.h> + + #include "mmal_picture.h" ++#include "subpic.h" + + #include <bcm_host.h> + #include <interface/mmal/mmal.h> + #include <interface/mmal/util/mmal_util.h> + #include <interface/mmal/util/mmal_default_components.h> + #include <interface/vmcs_host/vc_tvservice.h> +-#include <interface/vmcs_host/vc_dispmanx.h> ++ ++#define TRACE_ALL 0 + + #define MAX_BUFFERS_IN_TRANSIT 1 + #define VC_TV_MAX_MODE_IDS 127 +@@ -50,11 +53,6 @@ + #define MMAL_LAYER_TEXT N_("VideoCore layer where the video is displayed.") + #define MMAL_LAYER_LONGTEXT N_("VideoCore layer where the video is displayed. Subpictures are displayed directly above and a black background directly below.") + +-#define MMAL_BLANK_BACKGROUND_NAME "mmal-blank-background" +-#define MMAL_BLANK_BACKGROUND_TEXT N_("Blank screen below video.") +-#define MMAL_BLANK_BACKGROUND_LONGTEXT N_("Render blank screen below video. " \ +- "Increases VideoCore load.") +- + #define MMAL_ADJUST_REFRESHRATE_NAME "mmal-adjust-refreshrate" + #define MMAL_ADJUST_REFRESHRATE_TEXT N_("Adjust HDMI refresh rate to the video.") + #define MMAL_ADJUST_REFRESHRATE_LONGTEXT N_("Adjust HDMI refresh rate to the video.") +@@ -68,64 +66,30 @@ + #define PHASE_OFFSET_TARGET ((double)0.25) + #define PHASE_CHECK_INTERVAL 100 + +-static int Open(vlc_object_t *); +-static void Close(vlc_object_t *); ++#define SUBS_MAX 4 + +-vlc_module_begin() +- set_shortname(N_("MMAL vout")) +- set_description(N_("MMAL-based vout plugin for Raspberry Pi")) +- set_capability("vout display", 90) +- add_shortcut("mmal_vout") +- add_integer(MMAL_LAYER_NAME, 1, MMAL_LAYER_TEXT, MMAL_LAYER_LONGTEXT, false) +- add_bool(MMAL_BLANK_BACKGROUND_NAME, true, MMAL_BLANK_BACKGROUND_TEXT, +- MMAL_BLANK_BACKGROUND_LONGTEXT, true); +- add_bool(MMAL_ADJUST_REFRESHRATE_NAME, false, MMAL_ADJUST_REFRESHRATE_TEXT, +- MMAL_ADJUST_REFRESHRATE_LONGTEXT, false) +- add_bool(MMAL_NATIVE_INTERLACED, false, MMAL_NATIVE_INTERLACE_TEXT, +- MMAL_NATIVE_INTERLACE_LONGTEXT, false) +- set_callbacks(Open, Close) +-vlc_module_end() +- +-struct dmx_region_t { +- struct dmx_region_t *next; +- picture_t *picture; +- VC_RECT_T bmp_rect; +- VC_RECT_T src_rect; +- VC_RECT_T dst_rect; +- VC_DISPMANX_ALPHA_T alpha; +- DISPMANX_ELEMENT_HANDLE_T element; +- DISPMANX_RESOURCE_HANDLE_T resource; +- int32_t pos_x; +- int32_t pos_y; +-}; ++typedef struct vout_subpic_s { ++ MMAL_COMPONENT_T *component; ++ subpic_reg_stash_t sub; ++} vout_subpic_t; + + struct vout_display_sys_t { +- vlc_cond_t buffer_cond; +- vlc_mutex_t buffer_mutex; + vlc_mutex_t manage_mutex; + +- plane_t planes[3]; /* Depending on video format up to 3 planes are used */ +- picture_t **pictures; /* Actual list of alloced pictures passed into picture_pool */ +- picture_pool_t *picture_pool; +- + MMAL_COMPONENT_T *component; + MMAL_PORT_T *input; + MMAL_POOL_T *pool; /* mmal buffer headers, used for pushing pictures to component*/ +- struct dmx_region_t *dmx_region; + int i_planes; /* Number of actually used planes, 1 for opaque, 3 for i420 */ + + uint32_t buffer_size; /* size of actual mmal buffers */ + int buffers_in_transit; /* number of buffers currently pushed to mmal component */ + unsigned num_buffers; /* number of buffers allocated at mmal port */ + +- DISPMANX_DISPLAY_HANDLE_T dmx_handle; +- DISPMANX_ELEMENT_HANDLE_T bkg_element; +- DISPMANX_RESOURCE_HANDLE_T bkg_resource; + unsigned display_width; + unsigned display_height; + +- int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ +- int i_frame_rate; ++ unsigned int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ ++ unsigned int i_frame_rate; + + int next_phase_check; /* lowpass for phase check frequency */ + int phase_offset; /* currently applied offset to presentation time in ns */ +@@ -136,32 +100,18 @@ + bool native_interlaced; + bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ + bool b_progressive; +- bool opaque; /* indicated use of opaque picture format (zerocopy) */ +-}; ++ bool force_config; + +-static const vlc_fourcc_t subpicture_chromas[] = { +- VLC_CODEC_RGBA, +- 0 ++ vout_subpic_t subs[SUBS_MAX]; ++ ++ picture_pool_t * pic_pool; + }; + ++ + /* Utility functions */ +-static inline uint32_t align(uint32_t x, uint32_t y); + static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, + const video_format_t *fmt); + +-/* VLC vout display callbacks */ +-static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count); +-static void vd_prepare(vout_display_t *vd, picture_t *picture, +- subpicture_t *subpicture); +-static void vd_display(vout_display_t *vd, picture_t *picture, +- subpicture_t *subpicture); +-static int vd_control(vout_display_t *vd, int query, va_list args); +-static void vd_manage(vout_display_t *vd); +- +-/* MMAL callbacks */ +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); +- + /* TV service */ + static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height); + static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, +@@ -169,221 +119,52 @@ + static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); + static int set_latency_target(vout_display_t *vd, bool enable); + +-/* DispManX */ +-static void display_subpicture(vout_display_t *vd, subpicture_t *subpicture); +-static void close_dmx(vout_display_t *vd); +-static struct dmx_region_t *dmx_region_new(vout_display_t *vd, +- DISPMANX_UPDATE_HANDLE_T update, subpicture_region_t *region); +-static void dmx_region_update(struct dmx_region_t *dmx_region, +- DISPMANX_UPDATE_HANDLE_T update, picture_t *picture); +-static void dmx_region_delete(struct dmx_region_t *dmx_region, +- DISPMANX_UPDATE_HANDLE_T update); +-static void show_background(vout_display_t *vd, bool enable); ++// Mmal + static void maintain_phase_sync(vout_display_t *vd); + +-static int Open(vlc_object_t *object) +-{ +- vout_display_t *vd = (vout_display_t *)object; +- vout_display_sys_t *sys; +- uint32_t buffer_pitch, buffer_height; +- vout_display_place_t place; +- MMAL_DISPLAYREGION_T display_region; +- MMAL_STATUS_T status; +- int ret = VLC_SUCCESS; +- unsigned i; + +- if (vout_display_IsWindowed(vd)) +- return VLC_EGENERIC; +- +- sys = calloc(1, sizeof(struct vout_display_sys_t)); +- if (!sys) +- return VLC_ENOMEM; +- vd->sys = sys; +- +- sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); +- bcm_host_init(); +- +- sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; +- +- status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", +- MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } +- +- sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; +- status = mmal_port_enable(sys->component->control, control_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to enable control port %s (status=%"PRIx32" %s)", +- sys->component->control->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } +- +- sys->input = sys->component->input[0]; +- sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)vd; +- +- if (sys->opaque) { +- sys->input->format->encoding = MMAL_ENCODING_OPAQUE; +- sys->i_planes = 1; +- sys->buffer_size = sys->input->buffer_size_recommended; +- } else { +- sys->input->format->encoding = MMAL_ENCODING_I420; +- vd->fmt.i_chroma = VLC_CODEC_I420; +- buffer_pitch = align(vd->fmt.i_width, 32); +- buffer_height = align(vd->fmt.i_height, 16); +- sys->i_planes = 3; +- sys->buffer_size = 3 * buffer_pitch * buffer_height / 2; +- } +- +- sys->input->format->es->video.width = vd->fmt.i_width; +- sys->input->format->es->video.height = vd->fmt.i_height; +- sys->input->format->es->video.crop.x = 0; +- sys->input->format->es->video.crop.y = 0; +- sys->input->format->es->video.crop.width = vd->fmt.i_width; +- sys->input->format->es->video.crop.height = vd->fmt.i_height; +- sys->input->format->es->video.par.num = vd->source.i_sar_num; +- sys->input->format->es->video.par.den = vd->source.i_sar_den; ++static void vd_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++#if TRACE_ALL ++ vout_display_t * const vd = (vout_display_t *)port->userdata; ++ pic_ctx_mmal_t * ctx = buf->user_data; ++ msg_Dbg(vd, "<<< %s[%d] cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buf->cmd, ctx, buf, ++ buf->flags, (long long)buf->pts); ++#else ++ VLC_UNUSED(port); ++#endif + +- status = mmal_port_format_commit(sys->input); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to commit format for input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } +- sys->input->buffer_size = sys->input->buffer_size_recommended; ++ mmal_buffer_header_release(buf); + +- vout_display_PlacePicture(&place, &vd->source, vd->cfg, false); +- display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; +- display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); +- display_region.fullscreen = MMAL_FALSE; +- display_region.src_rect.x = vd->fmt.i_x_offset; +- display_region.src_rect.y = vd->fmt.i_y_offset; +- display_region.src_rect.width = vd->fmt.i_visible_width; +- display_region.src_rect.height = vd->fmt.i_visible_height; +- display_region.dest_rect.x = place.x; +- display_region.dest_rect.y = place.y; +- display_region.dest_rect.width = place.width; +- display_region.dest_rect.height = place.height; +- display_region.layer = sys->layer; +- display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | +- MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; +- status = mmal_port_parameter_set(sys->input, &display_region.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s", __func__); ++#endif ++} + +- for (i = 0; i < sys->i_planes; ++i) { +- sys->planes[i].i_lines = buffer_height; +- sys->planes[i].i_pitch = buffer_pitch; +- sys->planes[i].i_visible_lines = vd->fmt.i_visible_height; +- sys->planes[i].i_visible_pitch = vd->fmt.i_visible_width; ++static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height) ++{ ++ TV_DISPLAY_STATE_T display_state; ++ int ret = 0; + +- if (i > 0) { +- sys->planes[i].i_lines /= 2; +- sys->planes[i].i_pitch /= 2; +- sys->planes[i].i_visible_lines /= 2; +- sys->planes[i].i_visible_pitch /= 2; ++ if (vc_tv_get_display_state(&display_state) == 0) { ++ if (display_state.state & 0xFF) { ++ *width = display_state.display.hdmi.width; ++ *height = display_state.display.hdmi.height; ++ } else if (display_state.state & 0xFF00) { ++ *width = display_state.display.sdtv.width; ++ *height = display_state.display.sdtv.height; ++ } else { ++ msg_Warn(vd, "Invalid display state %"PRIx32, display_state.state); ++ ret = -1; + } +- } +- +- vlc_mutex_init(&sys->buffer_mutex); +- vlc_cond_init(&sys->buffer_cond); +- vlc_mutex_init(&sys->manage_mutex); +- +- vd->pool = vd_pool; +- vd->prepare = vd_prepare; +- vd->display = vd_display; +- vd->control = vd_control; +- vd->manage = vd_manage; +- +- vc_tv_register_callback(tvservice_cb, vd); +- +- if (query_resolution(vd, &sys->display_width, &sys->display_height) >= 0) { +- vout_display_SendEventDisplaySize(vd, sys->display_width, sys->display_height); + } else { +- sys->display_width = vd->cfg->display.width; +- sys->display_height = vd->cfg->display.height; ++ msg_Warn(vd, "Failed to query display resolution"); ++ ret = -1; + } + +- sys->dmx_handle = vc_dispmanx_display_open(0); +- vd->info.subpicture_chromas = subpicture_chromas; +- +- vout_display_DeleteWindow(vd, NULL); +- +-out: +- if (ret != VLC_SUCCESS) +- Close(object); +- + return ret; + } + +-static void Close(vlc_object_t *object) +-{ +- vout_display_t *vd = (vout_display_t *)object; +- vout_display_sys_t *sys = vd->sys; +- char response[20]; /* answer is hvs_update_fields=%1d */ +- unsigned i; +- +- vc_tv_unregister_callback_full(tvservice_cb, vd); +- +- if (sys->dmx_handle) +- close_dmx(vd); +- +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); +- +- if (sys->input && sys->input->is_enabled) +- mmal_port_disable(sys->input); +- +- if (sys->component && sys->component->is_enabled) +- mmal_component_disable(sys->component); +- +- if (sys->pool) +- mmal_port_pool_destroy(sys->input, sys->pool); +- +- if (sys->component) +- mmal_component_release(sys->component); +- +- if (sys->picture_pool) +- picture_pool_Release(sys->picture_pool); +- else +- for (i = 0; i < sys->num_buffers; ++i) +- if (sys->pictures[i]) { +- mmal_buffer_header_release(sys->pictures[i]->p_sys->buffer); +- picture_Release(sys->pictures[i]); +- } +- +- vlc_mutex_destroy(&sys->buffer_mutex); +- vlc_cond_destroy(&sys->buffer_cond); +- vlc_mutex_destroy(&sys->manage_mutex); +- +- if (sys->native_interlaced) { +- if (vc_gencmd(response, sizeof(response), "hvs_update_fields 0") < 0 || +- response[18] != '0') +- msg_Warn(vd, "Could not reset hvs field mode"); +- } +- +- free(sys->pictures); +- free(sys); +- +- bcm_host_deinit(); +-} +- +-static inline uint32_t align(uint32_t x, uint32_t y) { +- uint32_t mod = x % y; +- if (mod == 0) +- return x; +- else +- return x + y - mod; +-} +- + static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, + const video_format_t *fmt) + { +@@ -426,8 +207,9 @@ + display_region.dest_rect.width = place.width; + display_region.dest_rect.height = place.height; + display_region.layer = sys->layer; ++ display_region.alpha = 0xff | (1 << 29); + display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | +- MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; ++ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER | MMAL_DISPLAY_SET_ALPHA; + status = mmal_port_parameter_set(sys->input, &display_region.hdr); + if (status != MMAL_SUCCESS) { + msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", +@@ -435,7 +217,6 @@ + return -EINVAL; + } + +- show_background(vd, var_InheritBool(vd, MMAL_BLANK_BACKGROUND_NAME)); + sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); + sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); + if (sys->adjust_refresh_rate) { +@@ -446,171 +227,103 @@ + return 0; + } + +-static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) ++static void kill_pool(vout_display_sys_t * const sys) + { +- vout_display_sys_t *sys = vd->sys; +- picture_resource_t picture_res; +- picture_pool_configuration_t picture_pool_cfg; +- video_format_t fmt = vd->fmt; +- MMAL_STATUS_T status; +- unsigned i; +- +- if (sys->picture_pool) { +- if (sys->num_buffers < count) +- msg_Warn(vd, "Picture pool with %u pictures requested, but we already have one with %u pictures", +- count, sys->num_buffers); +- +- goto out; ++ if (sys->pic_pool != NULL) { ++ picture_pool_Release(sys->pic_pool); ++ sys->pic_pool = NULL; + } ++} + +- if (sys->opaque) { +- if (count <= NUM_ACTUAL_OPAQUE_BUFFERS) +- count = NUM_ACTUAL_OPAQUE_BUFFERS; ++// Actual picture pool for MMAL opaques is just a set of trivial containers ++static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) ++{ ++ vout_display_sys_t * const sys = vd->sys; + +- MMAL_PARAMETER_BOOLEAN_T zero_copy = { +- { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, +- 1 +- }; ++ msg_Dbg(vd, "%s: fmt:%dx%d,sar:%d/%d; source:%dx%d", __func__, ++ vd->fmt.i_width, vd->fmt.i_height, vd->fmt.i_sar_num, vd->fmt.i_sar_den, vd->source.i_width, vd->source.i_height); + +- status = mmal_port_parameter_set(sys->input, &zero_copy.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- goto out; +- } ++ if (sys->pic_pool == NULL) { ++ sys->pic_pool = picture_pool_NewFromFormat(&vd->fmt, count); + } ++ return sys->pic_pool; ++} + +- if (count < sys->input->buffer_num_recommended) +- count = sys->input->buffer_num_recommended; ++static void vd_display(vout_display_t *vd, picture_t *p_pic, ++ subpicture_t *subpicture) ++{ ++ vout_display_sys_t * const sys = vd->sys; ++ MMAL_STATUS_T err; + +-#ifndef NDEBUG +- msg_Dbg(vd, "Creating picture pool with %u pictures", count); ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); + #endif + +- sys->input->buffer_num = count; +- status = mmal_port_enable(sys->input, input_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to enable input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- goto out; +- } +- +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); +- goto out; ++ // Not expecting subpictures in the current setup ++ // Subpics should be attached to the main pic ++ if (subpicture != NULL) { ++ subpicture_Delete(subpicture); + } + +- sys->num_buffers = count; +- sys->pool = mmal_port_pool_create(sys->input, sys->num_buffers, +- sys->input->buffer_size); +- if (!sys->pool) { +- msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32, +- count, sys->input->buffer_size); +- goto out; ++ if (sys->force_config || ++ p_pic->format.i_frame_rate != sys->i_frame_rate || ++ p_pic->format.i_frame_rate_base != sys->i_frame_rate_base || ++ p_pic->b_progressive != sys->b_progressive || ++ p_pic->b_top_field_first != sys->b_top_field_first) ++ { ++ sys->force_config = false; ++ sys->b_top_field_first = p_pic->b_top_field_first; ++ sys->b_progressive = p_pic->b_progressive; ++ sys->i_frame_rate = p_pic->format.i_frame_rate; ++ sys->i_frame_rate_base = p_pic->format.i_frame_rate_base; ++ configure_display(vd, NULL, &p_pic->format); + } + +- memset(&picture_res, 0, sizeof(picture_resource_t)); +- sys->pictures = calloc(sys->num_buffers, sizeof(picture_t *)); +- for (i = 0; i < sys->num_buffers; ++i) { +- picture_res.p_sys = calloc(1, sizeof(picture_sys_t)); +- picture_res.p_sys->owner = (vlc_object_t *)vd; +- picture_res.p_sys->buffer = mmal_queue_get(sys->pool->queue); + +- sys->pictures[i] = picture_NewFromResource(&fmt, &picture_res); +- if (!sys->pictures[i]) { +- msg_Err(vd, "Failed to create picture"); +- free(picture_res.p_sys); +- goto out; ++ if (!sys->input->is_enabled && ++ (err = mmal_port_enable(sys->input, vd_input_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Input port enable failed"); ++ goto fail; ++ } ++ ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ { ++ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++ if ((err = port_send_replicated(sys->input, sys->pool, pic_buf, pic_buf->pts)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Send buffer to input failed"); ++ goto fail; + } +- +- sys->pictures[i]->i_planes = sys->i_planes; +- memcpy(sys->pictures[i]->p, sys->planes, sys->i_planes * sizeof(plane_t)); + } + +- memset(&picture_pool_cfg, 0, sizeof(picture_pool_configuration_t)); +- picture_pool_cfg.picture_count = sys->num_buffers; +- picture_pool_cfg.picture = sys->pictures; +- picture_pool_cfg.lock = mmal_picture_lock; +- +- sys->picture_pool = picture_pool_NewExtended(&picture_pool_cfg); +- if (!sys->picture_pool) { +- msg_Err(vd, "Failed to create picture pool"); +- goto out; ++ if (p_pic->context == NULL) { ++ msg_Dbg(vd, "%s: No context", __func__); + } ++ else ++ { ++ unsigned int sub_no = 0; + +-out: +- return sys->picture_pool; +-} +- +-static void vd_prepare(vout_display_t *vd, picture_t *picture, +- subpicture_t *subpicture) +-{ +- vout_display_sys_t *sys = vd->sys; +- picture_sys_t *pic_sys = picture->p_sys; +- +- if (!sys->adjust_refresh_rate || pic_sys->displayed) +- return; +- +- /* Apply the required phase_offset to the picture, so that vd_display() +- * will be called at the corrected time from the core */ +- picture->date += sys->phase_offset; +-} +- +-static void vd_display(vout_display_t *vd, picture_t *picture, +- subpicture_t *subpicture) +-{ +- vout_display_sys_t *sys = vd->sys; +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; +- MMAL_STATUS_T status; +- +- if (picture->format.i_frame_rate != sys->i_frame_rate || +- picture->format.i_frame_rate_base != sys->i_frame_rate_base || +- picture->b_progressive != sys->b_progressive || +- picture->b_top_field_first != sys->b_top_field_first) { +- sys->b_top_field_first = picture->b_top_field_first; +- sys->b_progressive = picture->b_progressive; +- sys->i_frame_rate = picture->format.i_frame_rate; +- sys->i_frame_rate_base = picture->format.i_frame_rate_base; +- configure_display(vd, NULL, &picture->format); +- } +- +- if (!pic_sys->displayed || !sys->opaque) { +- buffer->cmd = 0; +- buffer->length = sys->input->buffer_size; +- buffer->user_data = picture; +- +- status = mmal_port_send_buffer(sys->input, buffer); +- if (status == MMAL_SUCCESS) +- atomic_fetch_add(&sys->buffers_in_transit, 1); +- +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to send buffer to input port. Frame dropped"); +- picture_Release(picture); ++ for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { ++ int rv; ++ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(vd), p_pic, sub_no, &sys->subs[sub_no].sub, ++ &(MMAL_RECT_T){.width = sys->display_width, .height = sys->display_height}, ++ p_pic->date)) == 0) ++ break; ++ else if (rv < 0) ++ goto fail; + } +- +- pic_sys->displayed = true; +- } else { +- picture_Release(picture); + } + +- display_subpicture(vd, subpicture); +- +- if (subpicture) +- subpicture_Delete(subpicture); ++ picture_Release(p_pic); + + if (sys->next_phase_check == 0 && sys->adjust_refresh_rate) + maintain_phase_sync(vd); + sys->next_phase_check = (sys->next_phase_check + 1) % PHASE_CHECK_INTERVAL; + +- if (sys->opaque) { +- vlc_mutex_lock(&sys->buffer_mutex); +- while (atomic_load(&sys->buffers_in_transit) >= MAX_BUFFERS_IN_TRANSIT) +- vlc_cond_wait(&sys->buffer_cond, &sys->buffer_mutex); +- vlc_mutex_unlock(&sys->buffer_mutex); +- } ++fail: ++ /* NOP */; + } + + static int vd_control(vout_display_t *vd, int query, va_list args) +@@ -640,11 +353,39 @@ + break; + + case VOUT_DISPLAY_RESET_PICTURES: +- vlc_assert_unreachable(); ++ msg_Warn(vd, "Reset Pictures"); ++ kill_pool(sys); ++ vd->fmt = vd->source; // Take whatever source wants to give us ++ ret = VLC_SUCCESS; ++ break; ++ + case VOUT_DISPLAY_CHANGE_ZOOM: + msg_Warn(vd, "Unsupported control query %d", query); + break; + ++ case VOUT_DISPLAY_CHANGE_MMAL_HIDE: ++ { ++ MMAL_STATUS_T err; ++ unsigned int i; ++ ++ msg_Dbg(vd, "Hide display"); ++ ++ for (i = 0; i != SUBS_MAX; ++i) ++ hw_mmal_subpic_flush(VLC_OBJECT(vd), &sys->subs[i].sub); ++ ++ if (sys->input->is_enabled && ++ (err = mmal_port_disable(sys->input)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Unable to disable port: err=%d", err); ++ ret = VLC_EGENERIC; ++ break; ++ } ++ sys->force_config = true; ++ ++ ret = VLC_SUCCESS; ++ break; ++ } ++ + default: + msg_Warn(vd, "Unknown control query %d", query); + break; +@@ -661,13 +402,11 @@ + vlc_mutex_lock(&sys->manage_mutex); + + if (sys->need_configure_display) { +- close_dmx(vd); +- sys->dmx_handle = vc_dispmanx_display_open(0); +- + if (query_resolution(vd, &width, &height) >= 0) { + sys->display_width = width; + sys->display_height = height; +- vout_display_SendEventDisplaySize(vd, width, height); ++// msg_Dbg(vd, "%s: %dx%d", __func__, width, height); ++// vout_window_ReportSize(vd->cfg->window, width, height); + } + + sys->need_configure_display = false; +@@ -676,56 +415,45 @@ + vlc_mutex_unlock(&sys->manage_mutex); + } + +-static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +-{ +- vout_display_t *vd = (vout_display_t *)port->userdata; +- MMAL_STATUS_T status; +- +- if (buffer->cmd == MMAL_EVENT_ERROR) { +- status = *(uint32_t *)buffer->data; +- msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); +- } +- +- mmal_buffer_header_release(buffer); +-} +- +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++static void vd_prepare(vout_display_t *vd, picture_t *picture, ++#if VLC_VER_3 ++ subpicture_t *subpicture ++#else ++ subpicture_t *subpicture, vlc_tick_t date ++#endif ++ ) + { +- vout_display_t *vd = (vout_display_t *)port->userdata; ++ VLC_UNUSED(picture); ++ VLC_UNUSED(subpicture); ++// VLC_UNUSED(date); ++ ++ vd_manage(vd); ++#if 0 ++ VLC_UNUSED(date); + vout_display_sys_t *sys = vd->sys; +- picture_t *picture = (picture_t *)buffer->user_data; ++ picture_sys_t *pic_sys = picture->p_sys; + +- if (picture) +- picture_Release(picture); ++ if (!sys->adjust_refresh_rate || pic_sys->displayed) ++ return; + +- vlc_mutex_lock(&sys->buffer_mutex); +- atomic_fetch_sub(&sys->buffers_in_transit, 1); +- vlc_cond_signal(&sys->buffer_cond); +- vlc_mutex_unlock(&sys->buffer_mutex); ++ /* Apply the required phase_offset to the picture, so that vd_display() ++ * will be called at the corrected time from the core */ ++ picture->date += sys->phase_offset; ++#endif + } + +-static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height) ++ ++static void vd_control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) + { +- TV_DISPLAY_STATE_T display_state; +- int ret = 0; ++ vout_display_t *vd = (vout_display_t *)port->userdata; ++ MMAL_STATUS_T status; + +- if (vc_tv_get_display_state(&display_state) == 0) { +- if (display_state.state & 0xFF) { +- *width = display_state.display.hdmi.width; +- *height = display_state.display.hdmi.height; +- } else if (display_state.state & 0xFF00) { +- *width = display_state.display.sdtv.width; +- *height = display_state.display.sdtv.height; +- } else { +- msg_Warn(vd, "Invalid display state %"PRIx32, display_state.state); +- ret = -1; +- } +- } else { +- msg_Warn(vd, "Failed to query display resolution"); +- ret = -1; ++ if (buffer->cmd == MMAL_EVENT_ERROR) { ++ status = *(uint32_t *)buffer->data; ++ msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); + } + +- return ret; ++ mmal_buffer_header_release(buffer); + } + + static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) +@@ -828,148 +556,12 @@ + } + } + +-static void display_subpicture(vout_display_t *vd, subpicture_t *subpicture) +-{ +- vout_display_sys_t *sys = vd->sys; +- struct dmx_region_t **dmx_region = &sys->dmx_region; +- struct dmx_region_t *unused_dmx_region; +- DISPMANX_UPDATE_HANDLE_T update = 0; +- picture_t *picture; +- video_format_t *fmt; +- struct dmx_region_t *dmx_region_next; +- +- if(subpicture) { +- subpicture_region_t *region = subpicture->p_region; +- while(region) { +- picture = region->p_picture; +- fmt = ®ion->fmt; +- +- if(!*dmx_region) { +- if(!update) +- update = vc_dispmanx_update_start(10); +- *dmx_region = dmx_region_new(vd, update, region); +- } else if(((*dmx_region)->bmp_rect.width != (int32_t)fmt->i_visible_width) || +- ((*dmx_region)->bmp_rect.height != (int32_t)fmt->i_visible_height) || +- ((*dmx_region)->pos_x != region->i_x) || +- ((*dmx_region)->pos_y != region->i_y) || +- ((*dmx_region)->alpha.opacity != (uint32_t)region->i_alpha)) { +- dmx_region_next = (*dmx_region)->next; +- if(!update) +- update = vc_dispmanx_update_start(10); +- dmx_region_delete(*dmx_region, update); +- *dmx_region = dmx_region_new(vd, update, region); +- (*dmx_region)->next = dmx_region_next; +- } else if((*dmx_region)->picture != picture) { +- if(!update) +- update = vc_dispmanx_update_start(10); +- dmx_region_update(*dmx_region, update, picture); +- } +- +- dmx_region = &(*dmx_region)->next; +- region = region->p_next; +- } +- } +- +- /* Remove remaining regions */ +- unused_dmx_region = *dmx_region; +- while(unused_dmx_region) { +- dmx_region_next = unused_dmx_region->next; +- if(!update) +- update = vc_dispmanx_update_start(10); +- dmx_region_delete(unused_dmx_region, update); +- unused_dmx_region = dmx_region_next; +- } +- *dmx_region = NULL; +- +- if(update) +- vc_dispmanx_update_submit_sync(update); +-} +- +-static void close_dmx(vout_display_t *vd) +-{ +- vout_display_sys_t *sys = vd->sys; +- DISPMANX_UPDATE_HANDLE_T update = vc_dispmanx_update_start(10); +- struct dmx_region_t *dmx_region = sys->dmx_region; +- struct dmx_region_t *dmx_region_next; +- +- while(dmx_region) { +- dmx_region_next = dmx_region->next; +- dmx_region_delete(dmx_region, update); +- dmx_region = dmx_region_next; +- } +- +- vc_dispmanx_update_submit_sync(update); +- sys->dmx_region = NULL; +- +- show_background(vd, false); +- +- vc_dispmanx_display_close(sys->dmx_handle); +- sys->dmx_handle = DISPMANX_NO_HANDLE; +-} +- +-static struct dmx_region_t *dmx_region_new(vout_display_t *vd, +- DISPMANX_UPDATE_HANDLE_T update, subpicture_region_t *region) +-{ +- vout_display_sys_t *sys = vd->sys; +- video_format_t *fmt = ®ion->fmt; +- struct dmx_region_t *dmx_region = malloc(sizeof(struct dmx_region_t)); +- uint32_t image_handle; +- +- dmx_region->pos_x = region->i_x; +- dmx_region->pos_y = region->i_y; +- +- vc_dispmanx_rect_set(&dmx_region->bmp_rect, 0, 0, fmt->i_visible_width, +- fmt->i_visible_height); +- vc_dispmanx_rect_set(&dmx_region->src_rect, 0, 0, fmt->i_visible_width << 16, +- fmt->i_visible_height << 16); +- vc_dispmanx_rect_set(&dmx_region->dst_rect, region->i_x, region->i_y, +- fmt->i_visible_width, fmt->i_visible_height); +- +- dmx_region->resource = vc_dispmanx_resource_create(VC_IMAGE_RGBA32, +- dmx_region->bmp_rect.width | (region->p_picture->p[0].i_pitch << 16), +- dmx_region->bmp_rect.height | (dmx_region->bmp_rect.height << 16), +- &image_handle); +- vc_dispmanx_resource_write_data(dmx_region->resource, VC_IMAGE_RGBA32, +- region->p_picture->p[0].i_pitch, +- region->p_picture->p[0].p_pixels, &dmx_region->bmp_rect); +- +- dmx_region->alpha.flags = DISPMANX_FLAGS_ALPHA_FROM_SOURCE | DISPMANX_FLAGS_ALPHA_MIX; +- dmx_region->alpha.opacity = region->i_alpha; +- dmx_region->alpha.mask = DISPMANX_NO_HANDLE; +- dmx_region->element = vc_dispmanx_element_add(update, sys->dmx_handle, +- sys->layer + 1, &dmx_region->dst_rect, dmx_region->resource, +- &dmx_region->src_rect, DISPMANX_PROTECTION_NONE, +- &dmx_region->alpha, NULL, VC_IMAGE_ROT0); +- +- dmx_region->next = NULL; +- dmx_region->picture = region->p_picture; +- +- return dmx_region; +-} +- +-static void dmx_region_update(struct dmx_region_t *dmx_region, +- DISPMANX_UPDATE_HANDLE_T update, picture_t *picture) +-{ +- vc_dispmanx_resource_write_data(dmx_region->resource, VC_IMAGE_RGBA32, +- picture->p[0].i_pitch, picture->p[0].p_pixels, &dmx_region->bmp_rect); +- vc_dispmanx_element_change_source(update, dmx_region->element, dmx_region->resource); +- dmx_region->picture = picture; +-} +- +-static void dmx_region_delete(struct dmx_region_t *dmx_region, +- DISPMANX_UPDATE_HANDLE_T update) +-{ +- vc_dispmanx_element_remove(update, dmx_region->element); +- vc_dispmanx_resource_delete(dmx_region->resource); +- free(dmx_region); +-} +- + static void maintain_phase_sync(vout_display_t *vd) + { + MMAL_PARAMETER_VIDEO_RENDER_STATS_T render_stats = { + .hdr = { MMAL_PARAMETER_VIDEO_RENDER_STATS, sizeof(render_stats) }, + }; +- int32_t frame_duration = 1000000 / ++ int32_t frame_duration = CLOCK_FREQ / + ((double)vd->sys->i_frame_rate / + vd->sys->i_frame_rate_base); + vout_display_sys_t *sys = vd->sys; +@@ -1012,32 +604,258 @@ + } + } + +-static void show_background(vout_display_t *vd, bool enable) ++static void CloseMmalVout(vlc_object_t *object) + { +- vout_display_sys_t *sys = vd->sys; +- uint32_t image_ptr, color = 0xFF000000; +- VC_RECT_T dst_rect, src_rect; +- DISPMANX_UPDATE_HANDLE_T update; +- +- if (enable && !sys->bkg_element) { +- sys->bkg_resource = vc_dispmanx_resource_create(VC_IMAGE_RGBA32, 1, 1, +- &image_ptr); +- vc_dispmanx_rect_set(&dst_rect, 0, 0, 1, 1); +- vc_dispmanx_resource_write_data(sys->bkg_resource, VC_IMAGE_RGBA32, +- sizeof(color), &color, &dst_rect); +- vc_dispmanx_rect_set(&src_rect, 0, 0, 1 << 16, 1 << 16); +- vc_dispmanx_rect_set(&dst_rect, 0, 0, 0, 0); +- update = vc_dispmanx_update_start(0); +- sys->bkg_element = vc_dispmanx_element_add(update, sys->dmx_handle, +- sys->layer - 1, &dst_rect, sys->bkg_resource, &src_rect, +- DISPMANX_PROTECTION_NONE, NULL, NULL, VC_IMAGE_ROT0); +- vc_dispmanx_update_submit_sync(update); +- } else if (!enable && sys->bkg_element) { +- update = vc_dispmanx_update_start(0); +- vc_dispmanx_element_remove(update, sys->bkg_element); +- vc_dispmanx_resource_delete(sys->bkg_resource); +- vc_dispmanx_update_submit_sync(update); +- sys->bkg_element = DISPMANX_NO_HANDLE; +- sys->bkg_resource = DISPMANX_NO_HANDLE; ++ vout_display_t * const vd = (vout_display_t *)object; ++ vout_display_sys_t * const sys = vd->sys; ++ char response[20]; /* answer is hvs_update_fields=%1d */ ++ ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); ++#endif ++ ++ kill_pool(sys); ++ ++ vc_tv_unregister_callback_full(tvservice_cb, vd); ++ ++ if (sys->component && sys->component->control->is_enabled) ++ mmal_port_disable(sys->component->control); ++ ++ { ++ unsigned int i; ++ for (i = 0; i != SUBS_MAX; ++i) { ++ vout_subpic_t * const sub = sys->subs + i; ++ if (sub->component != NULL) { ++ hw_mmal_subpic_close(VLC_OBJECT(vd), &sub->sub); ++ if (sub->component->control->is_enabled) ++ mmal_port_disable(sub->component->control); ++ if (sub->component->is_enabled) ++ mmal_component_disable(sub->component); ++ mmal_component_release(sub->component); ++ sub->component = NULL; ++ } ++ } + } ++ ++ if (sys->input && sys->input->is_enabled) ++ mmal_port_disable(sys->input); ++ ++ if (sys->component && sys->component->is_enabled) ++ mmal_component_disable(sys->component); ++ ++ if (sys->pool) ++ mmal_pool_destroy(sys->pool); ++ ++ if (sys->component) ++ mmal_component_release(sys->component); ++ ++ vlc_mutex_destroy(&sys->manage_mutex); ++ ++ if (sys->native_interlaced) { ++ if (vc_gencmd(response, sizeof(response), "hvs_update_fields 0") < 0 || ++ response[18] != '0') ++ msg_Warn(vd, "Could not reset hvs field mode"); ++ } ++ ++ free(sys); ++ ++ bcm_host_deinit(); ++ ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s", __func__); ++#endif + } ++ ++static int OpenMmalVout(vlc_object_t *object) ++{ ++ vout_display_t *vd = (vout_display_t *)object; ++ vout_display_sys_t *sys; ++ vout_display_place_t place; ++ MMAL_DISPLAYREGION_T display_region; ++ MMAL_STATUS_T status; ++ int ret = VLC_EGENERIC; ++ ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); ++#endif ++ if (vd->fmt.i_chroma != VLC_CODEC_MMAL_OPAQUE) ++ { ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s: Format not MMAL", __func__); ++#endif ++ return VLC_EGENERIC; ++ } ++ ++ sys = calloc(1, sizeof(struct vout_display_sys_t)); ++ if (!sys) ++ return VLC_ENOMEM; ++ vd->sys = sys; ++ ++ sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); ++ ++ status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; ++ status = mmal_port_enable(sys->component->control, vd_control_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ sys->input = sys->component->input[0]; ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)vd; ++ ++ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; ++ sys->i_planes = 1; ++ sys->buffer_size = sys->input->buffer_size_recommended; ++ ++ sys->input->format->es->video.width = vd->fmt.i_width; ++ sys->input->format->es->video.height = vd->fmt.i_height; ++ sys->input->format->es->video.crop.x = 0; ++ sys->input->format->es->video.crop.y = 0; ++ sys->input->format->es->video.crop.width = vd->fmt.i_width; ++ sys->input->format->es->video.crop.height = vd->fmt.i_height; ++ sys->input->format->es->video.par.num = vd->source.i_sar_num; ++ sys->input->format->es->video.par.den = vd->source.i_sar_den; ++ ++ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ status = mmal_port_format_commit(sys->input); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = 30; ++ ++ vout_display_PlacePicture(&place, &vd->source, vd->cfg, false); ++ display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; ++ display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); ++ display_region.fullscreen = MMAL_FALSE; ++ display_region.src_rect.x = vd->fmt.i_x_offset; ++ display_region.src_rect.y = vd->fmt.i_y_offset; ++ display_region.src_rect.width = vd->fmt.i_visible_width; ++ display_region.src_rect.height = vd->fmt.i_visible_height; ++ display_region.dest_rect.x = place.x; ++ display_region.dest_rect.y = place.y; ++ display_region.dest_rect.width = place.width; ++ display_region.dest_rect.height = place.height; ++ display_region.layer = sys->layer; ++ display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | ++ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; ++ status = mmal_port_parameter_set(sys->input, &display_region.hdr); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ status = mmal_port_enable(sys->input, vd_input_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ status = mmal_component_enable(sys->component); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", ++ sys->component->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ ++ if ((sys->pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(vd, "Failed to create input pool"); ++ goto fail; ++ } ++ ++ { ++ unsigned int i; ++ for (i = 0; i != SUBS_MAX; ++i) { ++ vout_subpic_t * const sub = sys->subs + i; ++ if ((status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sub->component)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(vd, "Failed to create subpic component %d", i); ++ goto fail; ++ } ++ sub->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; ++ if ((status = mmal_port_enable(sub->component->control, vd_control_port_cb)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable control port %s on sub %d (status=%"PRIx32" %s)", ++ sys->component->control->name, i, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ if ((status = hw_mmal_subpic_open(VLC_OBJECT(vd), &sub->sub, sub->component->input[0], sys->layer + i + 1)) != MMAL_SUCCESS) { ++ msg_Dbg(vd, "Failed to open subpic %d", i); ++ goto fail; ++ } ++ if ((status = mmal_component_enable(sub->component)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(vd, "Failed to enable subpic component %d", i); ++ goto fail; ++ } ++ } ++ } ++ ++ ++ vlc_mutex_init(&sys->manage_mutex); ++ ++ vd->pool = vd_pool; ++ vd->prepare = vd_prepare; ++ vd->display = vd_display; ++ vd->control = vd_control; ++ ++ vc_tv_register_callback(tvservice_cb, vd); ++ ++ if (query_resolution(vd, &sys->display_width, &sys->display_height) >= 0) { ++// vout_window_ReportSize(vd->cfg->window, ++// sys->display_width, sys->display_height); ++ } else { ++ sys->display_width = vd->cfg->display.width; ++ sys->display_height = vd->cfg->display.height; ++ } ++ ++ msg_Dbg(vd, ">>> %s: ok", __func__); ++ return VLC_SUCCESS; ++ ++fail: ++ CloseMmalVout(object); ++ ++ msg_Dbg(vd, ">>> %s: rv=%d", __func__, ret); ++ ++ return ret == VLC_SUCCESS ? VLC_EGENERIC : ret; ++} ++ ++vlc_module_begin() ++ ++ add_submodule() ++ ++ set_shortname(N_("MMAL vout")) ++ set_description(N_("MMAL-based vout plugin for Raspberry Pi")) ++ set_capability("vout display", 0) ++ add_shortcut("mmal_vout") ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VOUT ) ++ ++ add_integer(MMAL_LAYER_NAME, 1, MMAL_LAYER_TEXT, MMAL_LAYER_LONGTEXT, false) ++ add_bool(MMAL_ADJUST_REFRESHRATE_NAME, false, MMAL_ADJUST_REFRESHRATE_TEXT, ++ MMAL_ADJUST_REFRESHRATE_LONGTEXT, false) ++ add_bool(MMAL_NATIVE_INTERLACED, false, MMAL_NATIVE_INTERLACE_TEXT, ++ MMAL_NATIVE_INTERLACE_LONGTEXT, false) ++ set_callbacks(OpenMmalVout, CloseMmalVout) ++ ++vlc_module_end() ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/xsplitter.c +@@ -0,0 +1,365 @@ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include <stdatomic.h> ++ ++#include <vlc_common.h> ++#include <vlc_plugin.h> ++#include <vlc_threads.h> ++#include <vlc_vout_display.h> ++#include <vlc_modules.h> ++ ++#include <bcm_host.h> ++#include <interface/mmal/mmal.h> ++#include <interface/mmal/util/mmal_util.h> ++#include <interface/mmal/util/mmal_default_components.h> ++ ++#include "mmal_picture.h" ++ ++#define TRACE_ALL 0 ++ ++typedef struct mmal_x11_sys_s ++{ ++ bool use_mmal; ++ vout_display_t * cur_vout; ++ vout_display_t * mmal_vout; ++ vout_display_t * x_vout; ++ uint32_t changed; ++} mmal_x11_sys_t; ++ ++static void unload_display_module(vout_display_t * const x_vout) ++{ ++ if (x_vout != NULL) { ++ if (x_vout->module != NULL) { ++ module_unneed(x_vout, x_vout->module); ++ } ++ vlc_object_release(x_vout); ++ } ++} ++ ++static void CloseMmalX11(vlc_object_t *object) ++{ ++ vout_display_t * const vd = (vout_display_t *)object; ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ ++ msg_Dbg(vd, "<<< %s", __func__); ++ ++ if (sys == NULL) ++ return; ++ ++ unload_display_module(sys->x_vout); ++ ++ unload_display_module(sys->mmal_vout); ++ ++ free(sys); ++ ++ msg_Dbg(vd, ">>> %s", __func__); ++} ++ ++static void mmal_x11_event(vout_display_t * x_vd, int cmd, va_list args) ++{ ++ vout_display_t * const vd = x_vd->owner.sys; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s (cmd=%d)", __func__, cmd); ++#endif ++ vd->owner.event(vd, cmd, args); ++} ++ ++static vout_window_t * mmal_x11_window_new(vout_display_t * x_vd, unsigned type) ++{ ++ vout_display_t * const vd = x_vd->owner.sys; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s (type=%d)", __func__, type); ++#endif ++ return vd->owner.window_new(vd, type); ++} ++ ++static void mmal_x11_window_del(vout_display_t * x_vd, vout_window_t * win) ++{ ++ vout_display_t * const vd = x_vd->owner.sys; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); ++#endif ++ vd->owner.window_del(vd, win); ++} ++ ++ ++static vout_display_t * load_display_module(vout_display_t * const vd, ++ const char * const cap, const char * const module_name) ++{ ++ vout_display_t * const x_vout = vlc_object_create(vd, sizeof(*x_vout)); ++ ++ if (!x_vout) ++ return NULL; ++ ++ x_vout->owner.sys = vd; ++ x_vout->owner.event = mmal_x11_event; ++ x_vout->owner.window_new = mmal_x11_window_new; ++ x_vout->owner.window_del = mmal_x11_window_del; ++ ++ x_vout->cfg = vd->cfg; ++ x_vout->source = vd->source; ++ x_vout->info = vd->info; ++ ++ x_vout->fmt = vd->fmt; ++ ++ if ((x_vout->module = module_need(x_vout, cap, module_name, true)) == NULL) ++ { ++ msg_Err(vd, "Failed to find X11 module"); ++ goto fail; ++ } ++ ++ return x_vout; ++ ++fail: ++ vlc_object_release(x_vout); ++ return NULL; ++} ++ ++ ++/* Return a pointer over the current picture_pool_t* (mandatory). ++ * ++ * For performance reasons, it is best to provide at least count ++ * pictures but it is not mandatory. ++ * You can return NULL when you cannot/do not want to allocate ++ * pictures. ++ * The vout display module keeps the ownership of the pool and can ++ * destroy it only when closing or on invalid pictures control. ++ */ ++static picture_pool_t * mmal_x11_pool(vout_display_t * vd, unsigned count) ++{ ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ vout_display_t * const x_vd = sys->cur_vout; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s (count=%d) %dx%d", __func__, count, x_vd->fmt.i_width, x_vd->fmt.i_height); ++#endif ++ return x_vd->pool(x_vd, count); ++} ++ ++/* Prepare a picture and an optional subpicture for display (optional). ++ * ++ * It is called before the next pf_display call to provide as much ++ * time as possible to prepare the given picture and the subpicture ++ * for display. ++ * You are guaranted that pf_display will always be called and using ++ * the exact same picture_t and subpicture_t. ++ * You cannot change the pixel content of the picture_t or of the ++ * subpicture_t. ++ */ ++static void mmal_x11_prepare(vout_display_t * vd, picture_t * pic, subpicture_t * sub) ++{ ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ vout_display_t * const x_vd = sys->cur_vout; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); ++#endif ++ if (x_vd->prepare) ++ x_vd->prepare(x_vd, pic, sub); ++} ++ ++/* Display a picture and an optional subpicture (mandatory). ++ * ++ * The picture and the optional subpicture must be displayed as soon as ++ * possible. ++ * You cannot change the pixel content of the picture_t or of the ++ * subpicture_t. ++ * ++ * This function gives away the ownership of the picture and of the ++ * subpicture, so you must release them as soon as possible. ++ */ ++static void mmal_x11_display(vout_display_t * vd, picture_t * pic, subpicture_t * sub) ++{ ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ vout_display_t * const x_vd = sys->cur_vout; ++ const bool is_mmal_pic = (pic->format.i_chroma == VLC_CODEC_MMAL_OPAQUE); ++ ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s: fmt: %dx%d/%dx%d, pic:%dx%d", __func__, vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, pic->format.i_width, pic->format.i_height); ++#endif ++ ++ if (sys->use_mmal != is_mmal_pic) { ++ msg_Dbg(vd, "%s: Picture dropped", __func__); ++ picture_Release(pic); ++ if (sub != NULL) ++ subpicture_Delete(sub); ++ return; ++ } ++ ++ x_vd->display(x_vd, pic, sub); ++} ++ ++ ++static int vout_display_Control(vout_display_t *vd, int query, ...) ++{ ++ va_list args; ++ int result; ++ ++ va_start(args, query); ++ result = vd->control(vd, query, args); ++ va_end(args); ++ ++ return result; ++} ++ ++/* Control on the module (mandatory) */ ++static int mmal_x11_control(vout_display_t * vd, int ctl, va_list va) ++{ ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ vout_display_t *x_vd = sys->cur_vout; ++ int rv; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s[%d] (ctl=%d)", __func__, sys->use_mmal, ctl); ++#endif ++ // Remember what we've told this vd - unwanted ctls ignored on replay ++ if (ctl >= 0 && ctl <= 31) ++ sys->changed |= (1 << ctl); ++ ++ switch (ctl) { ++ case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: ++ { ++ const vout_display_cfg_t * cfg = va_arg(va, const vout_display_cfg_t *); ++ const bool want_mmal = sys->mmal_vout != NULL && var_InheritBool(vd, "fullscreen"); ++ vout_display_t *new_vd = want_mmal ? sys->mmal_vout : sys->x_vout; ++ ++ msg_Dbg(vd, "Change size: %d, %d", cfg->display.width, cfg->display.height); ++ ++ if (sys->use_mmal != want_mmal) { ++ if (sys->use_mmal) { ++ vout_display_Control(x_vd, VOUT_DISPLAY_CHANGE_MMAL_HIDE); ++ } ++ vout_display_SendEventPicturesInvalid(x_vd); ++ } ++ ++ rv = vout_display_Control(new_vd, ctl, cfg); ++ if (rv == VLC_SUCCESS) { ++ vd->fmt = new_vd->fmt; ++ sys->cur_vout = new_vd; ++ sys->use_mmal = want_mmal; ++ } ++ ++ // Repeat any control calls that we sent to the previous vd ++ if (sys->changed != 0) { ++ const uint32_t changed = sys->changed; ++ sys->changed = 0; ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)) != 0) ++ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, vd->cfg); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_ZOOM)) != 0) ++ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); ++ if ((changed & ((1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP) | (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))) != 0) ++ new_vd->source = vd->source; ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT)) != 0) ++ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP)) != 0) ++ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_VIEWPOINT)) != 0) ++ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); ++ } ++ ++ break; ++ } ++ ++ case VOUT_DISPLAY_RESET_PICTURES: ++ msg_Dbg(vd, "Reset pictures"); ++ rv = x_vd->control(x_vd, ctl, va); ++ msg_Dbg(vd, "<<< %s: Pic reset: fmt: %dx%d<-%dx%d, source: %dx%d/%dx%d", __func__, ++ vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, ++ vd->source.i_width, vd->source.i_height, x_vd->source.i_width, x_vd->source.i_height); ++ vd->fmt = x_vd->fmt; ++ break; ++ ++ case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: ++ case VOUT_DISPLAY_CHANGE_SOURCE_CROP: ++ x_vd->source = vd->source; ++ default: ++ rv = x_vd->control(x_vd, ctl, va); ++// vd->fmt = x_vd->fmt; ++ break; ++ } ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s (rv=%d)", __func__, rv); ++#endif ++ return rv; ++} ++ ++#define DO_MANAGE 0 ++ ++#if DO_MANAGE ++/* Manage pending event (optional) */ ++static void mmal_x11_manage(vout_display_t * vd) ++{ ++ mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; ++ vout_display_t * const x_vd = sys->cur_vout; ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s", __func__); ++#endif ++ x_vd->manage(x_vd); ++} ++#endif ++ ++static const char * str_fourcc(char * buf, unsigned int fcc) ++{ ++ if (fcc == 0) ++ return "----"; ++ buf[0] = (fcc >> 0) & 0xff; ++ buf[1] = (fcc >> 8) & 0xff; ++ buf[2] = (fcc >> 16) & 0xff; ++ buf[3] = (fcc >> 24) & 0xff; ++ buf[4] = 0; ++ return buf; ++} ++ ++ ++static int OpenMmalX11(vlc_object_t *object) ++{ ++ vout_display_t * const vd = (vout_display_t *)object; ++ mmal_x11_sys_t * const sys = calloc(1, sizeof(*sys)); ++ int ret = VLC_SUCCESS; ++ ++ if (sys == NULL) { ++ return VLC_EGENERIC; ++ } ++ vd->sys = (vout_display_sys_t *)sys; ++ ++ if ((sys->x_vout = load_display_module(vd, "vout display", "xcb_x11")) == NULL) ++ goto fail; ++ ++ if ((sys->mmal_vout = load_display_module(vd, "vout display", "mmal_vout")) == NULL) ++ { ++ // Winge but do no more than that - route everything to X ++ char dbuf0[5], dbuf1[5]; ++ msg_Info(vd, "Not a valid format for mmal vout (%s/%s)", str_fourcc(dbuf0, vd->fmt.i_chroma), str_fourcc(dbuf1, vd->source.i_chroma)); ++ } ++ ++ sys->cur_vout = sys->x_vout; ++ vd->info = sys->cur_vout->info; ++ vd->fmt = sys->cur_vout->fmt; ++ ++ vd->pool = mmal_x11_pool; ++ vd->prepare = mmal_x11_prepare; ++ vd->display = mmal_x11_display; ++ vd->control = mmal_x11_control; ++#if DO_MANAGE ++ vd->manage = mmal_x11_manage; ++#endif ++ ++ return VLC_SUCCESS; ++ ++fail: ++ CloseMmalX11(VLC_OBJECT(vd)); ++ return ret == VLC_SUCCESS ? VLC_EGENERIC : ret; ++} ++ ++ ++ ++ ++vlc_module_begin() ++ set_shortname(N_("MMAL x11 splitter")) ++ set_description(N_("MMAL x11 splitter for Raspberry Pi")) ++ set_capability("vout display", 900) ++ add_shortcut("mmal_x11") ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VOUT ) ++ set_callbacks(OpenMmalX11, CloseMmalX11) ++vlc_module_end() ++ diff --git a/vlc.spec b/vlc.spec index 8649944..1c69c50 100644 --- a/vlc.spec +++ b/vlc.spec @@ -48,6 +48,7 @@ Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +Patch0: https://raw.githubusercontent.com/fedberry/vlc/master/mmal_1.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -202,6 +203,7 @@ BuildRequires: xorg-x11-proto-devel %ifarch armv7hl armv7hnl %{?_with_rpi: BuildRequires: raspberrypi-vc-devel +BuildRequires: raspberrypi-vc-static } %endif From 8eb541927097d532028367ffc015cc24f4c4dd75 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 20 Dec 2018 21:30:26 +0100 Subject: [PATCH 404/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1c69c50..18dd3ec 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -577,6 +577,9 @@ fi || : %changelog +* Thu Dec 20 2018 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-0.2 +- Add mmal support + * Thu Dec 13 2018 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-0.1 - Bump Epoch - Update to 20181213 From 1bc04eefc203c958c0bfe3c7d6ddb40294fa5232 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 20 Dec 2018 21:53:51 +0100 Subject: [PATCH 405/671] Rework _with_rpi case with neon --- vlc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 18dd3ec..95ee938 100644 --- a/vlc.spec +++ b/vlc.spec @@ -200,12 +200,11 @@ BuildRequires: pkgconfig(xcb-keysyms) } BuildRequires: xorg-x11-proto-devel -%ifarch armv7hl armv7hnl %{?_with_rpi: +ExclusiveArch: armv7hnl BuildRequires: raspberrypi-vc-devel BuildRequires: raspberrypi-vc-static } -%endif %if 0%{?rhel} == 7 BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel From 785d33b55745a9500bf6e793834f0d10fad6aa71 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Thu, 27 Dec 2018 20:29:23 +0000 Subject: [PATCH 406/671] Update to 3.0.5 --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 684e48d..1db38a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -beeaf85bb4d86246bc11c35fdfd22c0f vlc-3.0.5-20181213-0221.tar.xz +33ecd94ed9568bb19b4ca729eecca076 vlc-3.0.5.tar.xz diff --git a/vlc.spec b/vlc.spec index 95ee938..fd12a97 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20181213 +#global vlc_date 20181213 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0221 +#global vlc_tag -#{?vlc_date}-0221 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -576,6 +576,9 @@ fi || : %changelog +* Thu Dec 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-1 +- Update to 3.0.5 + * Thu Dec 20 2018 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-0.2 - Add mmal support From 7a7047317e54f4f266feefc749f82124f136cfe5 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Thu, 27 Dec 2018 20:33:35 +0000 Subject: [PATCH 407/671] Bump n-v-r to make koji happy --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index fd12a97..1af3144 100644 --- a/vlc.spec +++ b/vlc.spec @@ -576,8 +576,9 @@ fi || : %changelog -* Thu Dec 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-1 +* Thu Dec 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-10 - Update to 3.0.5 +- Bump n-v-r to make koji happy * Thu Dec 20 2018 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-0.2 - Add mmal support From 2fad852869a5715cdad5101b2f8461d8b39b536a Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Thu, 27 Dec 2018 20:34:12 +0000 Subject: [PATCH 408/671] Bump tag --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1af3144..e0396a4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 1%{?dist} +Release: 10%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz From c6c572d31e711a86065e2b447362b495bf28740a Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Sun, 30 Dec 2018 10:38:03 +0000 Subject: [PATCH 409/671] Enable dav1d support --- vlc.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e0396a4..8bc3520 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,6 +30,7 @@ %global _with_fluidsynth 1 %if 0%{?fedora} %global _with_aom 1 +%global _with_dav1d 1 %global _with_freerdp 1 %global _with_projectm 1 %global _with_schroedinger 1 @@ -44,7 +45,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -68,6 +69,7 @@ BuildRequires: aalib-devel BuildRequires: alsa-lib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel +%{?_with_dav1d:BuildRequires: libdav1d-devel} BuildRequires: pkgconfig(dbus-1) %{?_with_faad2:BuildRequires: faad2-devel} %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} @@ -324,6 +326,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : } \ %{?_with_aom:--enable-aom} \ %{!?_with_a52dec:--disable-a52} \ +%{?_with_dav1d:--enable-dav1d} \ %{!?_with_ffmpeg:--disable-avcodec --disable-avformat \ --disable-swscale --disable-postproc} \ %{?_with_faad2:--enable-faad} \ @@ -576,6 +579,9 @@ fi || : %changelog +* Sun Dec 30 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-11 +- Enable dav1d support + * Thu Dec 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-10 - Update to 3.0.5 - Bump n-v-r to make koji happy From 3341d3424335d4323ac1517bb52c4266fd11cbe3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 4 Jan 2019 08:35:23 +0100 Subject: [PATCH 410/671] Restore jack obsoletes/provides --- vlc.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8bc3520..ae365cb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -45,7 +45,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -229,6 +229,9 @@ Recommends: qt5-qtwayland%{_isa} %endif } +#Merge back jack plugin into main +Obsoletes: vlc-plugin-jack < %{version}-%{release} +Provides: vlc-plugin-jack = %{version}-%{release} Provides: %{name}-xorg%{_isa} = %{epoch}:%{version}-%{release} Requires: vlc-core%{_isa} = %{epoch}:%{version}-%{release} @@ -579,6 +582,9 @@ fi || : %changelog +* Fri Jan 04 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-12 +- Restore Obsoletes/Provides vlc-plugin-jack + * Sun Dec 30 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.5-11 - Enable dav1d support From aec9d7b9b6ffcd8ac575716fc10dce7f0c7063d7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 12:57:16 +0100 Subject: [PATCH 411/671] Only enable omxil on rpi for now --- vlc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index ae365cb..c029883 100644 --- a/vlc.spec +++ b/vlc.spec @@ -287,7 +287,10 @@ VLC media player extras modules. %prep -%autosetup -p1 -n %{name}-%{version}%{?vlc_rc} +%setup -q -n %{name}-%{version}%{?vlc_rc} +%ifarch %{arm} +%patch0 -p1 +%endif %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -321,9 +324,9 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?_with_opencv:--enable-opencv} \ --enable-sftp \ %{?_with_vcdimager:--enable-vcdx} \ +%{?_with_rpi: \ --enable-omxil \ --enable-omxil-vout \ -%{?_with_rpi: \ --enable-rpi-omxil \ --enable-mmal \ } \ From 874d90faacbe83339dd6c79dc1bbf4b2689d52c5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 12:57:40 +0100 Subject: [PATCH 412/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c029883..b5423a5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -45,7 +45,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -585,6 +585,9 @@ fi || : %changelog +* Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-13 +- Only enable rpi on pi + * Fri Jan 04 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-12 - Restore Obsoletes/Provides vlc-plugin-jack From 54ffe0cf4ed68996222b99f29e8fd2258f23fb89 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 13:30:50 +0100 Subject: [PATCH 413/671] Fixup with_rpi --- vlc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index b5423a5..aa7a72f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -288,9 +288,9 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} -%ifarch %{arm} +%{?_with_rpi: %patch0 -p1 -%endif +} %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -586,7 +586,7 @@ fi || : %changelog * Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-13 -- Only enable rpi on pi +- Only enable mmal on rpi * Fri Jan 04 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-12 - Restore Obsoletes/Provides vlc-plugin-jack From 2266d45c3cbe2cea33a2e651b0cebfc0d504a43b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 14:20:09 +0100 Subject: [PATCH 414/671] Fixup vdpau on core --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index aa7a72f..18cb0e9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -550,7 +550,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/audio_output/libpulse_plugin.so %exclude %{_libdir}/vlc/plugins/access/libpulsesrc_plugin.so %exclude %{_libdir}/vlc/plugins/services_discovery/libpulselist_plugin.so -%exclude %{_libdir}/vlc/plugins/vdpau %ghost %{_libdir}/vlc/plugins/plugins.dat %dir %{_libdir}/vlc/ %dir %{_libdir}/vlc/plugins @@ -587,6 +586,7 @@ fi || : %changelog * Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-13 - Only enable mmal on rpi +- Fixup vdpau on core * Fri Jan 04 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-12 - Restore Obsoletes/Provides vlc-plugin-jack From 9d451394f2ca5a97e8e2c95b55ace37b2389939e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 14:24:31 +0100 Subject: [PATCH 415/671] Bump --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 18cb0e9..c8f305b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -45,7 +45,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.5 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -584,7 +584,7 @@ fi || : %changelog -* Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-13 +* Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-14 - Only enable mmal on rpi - Fixup vdpau on core From beddbafbef6a9c86db22aa2276dae55bf1da34c1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 8 Jan 2019 14:30:47 +0100 Subject: [PATCH 416/671] Clean-up gnome_vfs --- vlc.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index c8f305b..bcc5426 100644 --- a/vlc.spec +++ b/vlc.spec @@ -457,9 +457,6 @@ fi || : %{_bindir}/svlc %{_libdir}/vlc/*.so* %{_libdir}/vlc/plugins/gui/libqt_plugin.so -%{?_with_gnomevfs: -%{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so -} %{_libdir}/vlc/plugins/video_output/libaa_plugin.so %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so %{?_with_wayland: @@ -505,9 +502,6 @@ fi || : %{_libdir}/vlc/lua/ %{_libdir}/*.so.* %exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so -%{?_with_gnomevfs: -%exclude %{_libdir}/vlc/plugins/access/libaccess_gnomevfs_plugin.so -} %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{?_with_vcdimager: %exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so From 78350a3100625e937d72c1a13317159c1f4717bc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 10 Jan 2019 19:27:43 +0100 Subject: [PATCH 417/671] Rework x11 moving to core --- vlc.spec | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/vlc.spec b/vlc.spec index bcc5426..83f7a62 100644 --- a/vlc.spec +++ b/vlc.spec @@ -456,26 +456,9 @@ fi || : %{_bindir}/qvlc %{_bindir}/svlc %{_libdir}/vlc/*.so* +# qt in main %{_libdir}/vlc/plugins/gui/libqt_plugin.so -%{_libdir}/vlc/plugins/video_output/libaa_plugin.so -%{_libdir}/vlc/plugins/video_output/libcaca_plugin.so -%{?_with_wayland: -%{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so -%{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so -%{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so - -} -%{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so -%{_libdir}/vlc/plugins/video_output/libgl_plugin.so -%{_libdir}/vlc/plugins/video_output/libglx_plugin.so -%{!?_without_xcb: -%{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so -%{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so -%{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -%{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so -%{_libdir}/vlc/plugins/services_discovery/libxcb_apps_plugin.so -} +# skin2 in main %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_projectm: %{_libdir}/vlc/plugins/visualization/libprojectm_plugin.so @@ -501,7 +484,6 @@ fi || : %{_datadir}/vlc/ %{_libdir}/vlc/lua/ %{_libdir}/*.so.* -%exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{?_with_vcdimager: %exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so @@ -514,24 +496,9 @@ fi || : %{?_with_fluidsynth: %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } -%{!?_without_xcb: -%exclude %{_libdir}/vlc/plugins/access/libxcb_screen_plugin.so -%exclude %{_libdir}/vlc/plugins/control/libxcb_hotkeys_plugin.so -%exclude %{_libdir}/vlc/plugins/services_discovery/libxcb_apps_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libaa_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libcaca_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libegl_x11_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libgl_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libglx_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_x11_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_window_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libxcb_xv_plugin.so -} -%{?_with_wayland: -%exclude %{_libdir}/vlc/plugins/video_output/libegl_wl_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libwl_shell_plugin.so -%exclude %{_libdir}/vlc/plugins/video_output/libwl_shm_plugin.so -} +%dir %{_libdir}/vlc/plugins/gui +%{_libdir}/vlc/plugins/gui/libncurses_plugin.so +%exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: %exclude %{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so From f09590aaf64f14d1401c7fb47cb9fb7a7d1057d5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 10 Jan 2019 19:38:37 +0100 Subject: [PATCH 418/671] Update changelog --- sources | 2 +- vlc.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 1db38a5..d784f58 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -33ecd94ed9568bb19b4ca729eecca076 vlc-3.0.5.tar.xz +4ff71d262e070fd19f86a1c3542c7b4e vlc-3.0.6.tar.xz diff --git a/vlc.spec b/vlc.spec index 83f7a62..ed7d8bb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,8 +44,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.5 -Release: 14%{?dist} +Version: 3.0.6 +Release: 15%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +545,10 @@ fi || : %changelog +* Thu Jan 10 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-15 +- Update to 3.0.6 +- Rework xorg/wayland plugins moved to vlc-core + * Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.5-14 - Only enable mmal on rpi - Fixup vdpau on core From b02fbfc61186f96d649d4ae7732e4f0543ca8396 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 17 Jan 2019 12:14:52 +0100 Subject: [PATCH 419/671] Update main/core packaging split --- vlc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index ed7d8bb..1f705fc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -455,7 +455,7 @@ fi || : %{_datadir}/vlc/skins2/ %{_bindir}/qvlc %{_bindir}/svlc -%{_libdir}/vlc/*.so* +%{_libdir}/vlc/libvlc_pulse.so* # qt in main %{_libdir}/vlc/plugins/gui/libqt_plugin.so # skin2 in main @@ -482,8 +482,11 @@ fi || : %{_bindir}/vlc-wrapper %exclude %{_datadir}/vlc/skins2 %{_datadir}/vlc/ -%{_libdir}/vlc/lua/ %{_libdir}/*.so.* +%dir %{_libdir}/vlc +%{_libdir}/vlc/lua/ +%{_libdir}/vlc/libvlc_vdpau.so* +%{_libdir}/vlc/libvlc_xcb_events.so* %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so %{?_with_vcdimager: %exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so From 43e0e047c1045552d67bab4cda7600e1e993b75e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 17 Jan 2019 12:15:32 +0100 Subject: [PATCH 420/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1f705fc..6927fd2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -45,7 +45,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -548,6 +548,9 @@ fi || : %changelog +* Thu Jan 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-16 +- Update main/core packaging split + * Thu Jan 10 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-15 - Update to 3.0.6 - Rework xorg/wayland plugins moved to vlc-core From 97a51e6656bd7f8d98bc1b49e67f1f6f5eeeb4b5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 24 Jan 2019 12:05:12 +0100 Subject: [PATCH 421/671] Drop unmaintained phonon support on el7 --- vlc.spec | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/vlc.spec b/vlc.spec index 6927fd2..46da920 100644 --- a/vlc.spec +++ b/vlc.spec @@ -7,7 +7,6 @@ %global vlc_url https://download.videolan.org/pub/videolan/vlc/ %endif %global _with_bootstrap 1 -%global _with_workaround_circle_deps 1 %if 0%{?!_without_freeworld:1} %global _with_a52dec 1 %global _with_faad2 1 @@ -126,11 +125,6 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel -%if 0%{?fedora} -BuildRequires: phonon-qt5-devel -%else -BuildRequires: phonon-devel -%endif BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libplacebo) @@ -212,14 +206,14 @@ BuildRequires: raspberrypi-vc-static BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif - -%{?_with_workaround_circle_deps: -%if 0%{?fedora} -BuildRequires: phonon-qt5-backend-gstreamer +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: phonon-qt5-devel +BuildRequires: phonon-qt5-backend-gstreamer %else -BuildRequires: phonon-backend-gstreamer +# phonon is unmaintained on EL7 +Obsoletes: phonon-backend-vlc < 0.6.2-3 +Provides: phonon-backend-vlc = 0.6.2-3 %endif -} %{?_with_wayland: # Fedora 25 Workstation default to wayland but not all From 796589571369b9e7ddaa6a281c4d8a42d6b1302a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 24 Jan 2019 12:05:46 +0100 Subject: [PATCH 422/671] Add changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 46da920..b407aba 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -542,6 +542,9 @@ fi || : %changelog +* Thu Jan 24 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-17 +- Drop unmaintained phonon support on el7 + * Thu Jan 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-16 - Update main/core packaging split From af2f2642c54c856f2b20833aadd863b7b02d675d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 27 Feb 2019 08:48:54 +0100 Subject: [PATCH 423/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index b407aba..bb7f4f6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -542,6 +542,9 @@ fi || : %changelog +* Wed Feb 27 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-18 +- Rebuilt + * Thu Jan 24 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-17 - Drop unmaintained phonon support on el7 From b27b4ee4afee3089caee542745671165daa333f7 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Wed, 27 Feb 2019 09:07:16 +0000 Subject: [PATCH 424/671] Patch for libvpx-1.8.0 --- libvpx-1.8-fix.patch | 36 ++++++++++++++++++++++++++++++++++++ vlc.spec | 10 ++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 libvpx-1.8-fix.patch diff --git a/libvpx-1.8-fix.patch b/libvpx-1.8-fix.patch new file mode 100644 index 0000000..7d08b42 --- /dev/null +++ b/libvpx-1.8-fix.patch @@ -0,0 +1,36 @@ +From 2688feb2742a6021ca211ae5c106b12c3d822946 Mon Sep 17 00:00:00 2001 +From: Danny Milosavljevic <dannym@scratchpost.org> +Date: Mon, 11 Feb 2019 16:07:12 +0100 +Subject: [PATCH] codec: vpx: Detect libvpx 1.8.0 and, if detected, use fewer + frame formats in the chroma_table + +Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> +(cherry picked from commit 5575fe3eb3fd46bada8662268b74d03493476a84) +--- + modules/codec/vpx.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c +index 2b1e37818d..aba180361f 100644 +--- a/modules/codec/vpx.c ++++ b/modules/codec/vpx.c +@@ -116,6 +116,7 @@ static const struct + { VLC_CODEC_I440, VPX_IMG_FMT_I440, 8, 0 }, + + { VLC_CODEC_YV12, VPX_IMG_FMT_YV12, 8, 0 }, ++#if VPX_IMAGE_ABI_VERSION < 5 + { VLC_CODEC_YUVA, VPX_IMG_FMT_444A, 8, 0 }, + { VLC_CODEC_YUYV, VPX_IMG_FMT_YUY2, 8, 0 }, + { VLC_CODEC_UYVY, VPX_IMG_FMT_UYVY, 8, 0 }, +@@ -128,7 +129,7 @@ static const struct + + { VLC_CODEC_ARGB, VPX_IMG_FMT_ARGB, 8, 0 }, + { VLC_CODEC_BGRA, VPX_IMG_FMT_ARGB_LE, 8, 0 }, +- ++#endif + { VLC_CODEC_GBR_PLANAR, VPX_IMG_FMT_I444, 8, 1 }, + { VLC_CODEC_GBR_PLANAR_10L, VPX_IMG_FMT_I44416, 10, 1 }, + +-- +2.11.0 + diff --git a/vlc.spec b/vlc.spec index bb7f4f6..665c238 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,11 +44,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: https://raw.githubusercontent.com/fedberry/vlc/master/mmal_1.patch +Patch0: https://raw.githubusercontent.com/fedberry/vlc/master/mmal_1.patch +# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=2688feb2742a6021ca211ae5c106b12c3d822946 +Patch1: libvpx-1.8-fix.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -285,6 +287,7 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } +%patch1 -p1 %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -542,6 +545,9 @@ fi || : %changelog +* Wed Feb 27 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.6-19 +- Patch for libvpx-1.8.0 + * Wed Feb 27 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-18 - Rebuilt From ab2dfc05f5a21c93f36955c3911b77831b6a381f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Thu, 28 Feb 2019 09:48:24 +0000 Subject: [PATCH 425/671] Rebuild for new x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 665c238..3794ae9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +545,9 @@ fi || : %changelog +* Thu Feb 28 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.6-20 +- Rebuild for new x265 + * Wed Feb 27 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.6-19 - Patch for libvpx-1.8.0 From e2ebd0b91a1788b31e19877f3e8f8884076c0da8 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Tue, 5 Mar 2019 00:23:13 +0000 Subject: [PATCH 426/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Leigh Scott <leigh123linux@googlemail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3794ae9..96701a1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +545,9 @@ fi || : %changelog +* Tue Mar 05 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.6-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Feb 28 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.6-20 - Rebuild for new x265 From 0fbdbfce7be138d082253057c4cbb706be884364 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 5 Mar 2019 17:05:59 +0100 Subject: [PATCH 427/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 96701a1..f5eaa4d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +545,9 @@ fi || : %changelog +* Tue Mar 05 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-22 +- Rebuilt for live555/dav1d + * Tue Mar 05 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.6-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From b2fa88c03a55443dcaa2925ddcc474758079a1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Tue, 12 Mar 2019 23:20:03 +0000 Subject: [PATCH 428/671] Mass rebuild for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f5eaa4d..73d30c2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +545,9 @@ fi || : %changelog +* Tue Mar 12 2019 Sérgio Basto <sergio@serjux.com> - 1:3.0.6-23 +- Mass rebuild for x264 + * Tue Mar 05 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-22 - Rebuilt for live555/dav1d From e59a2b2857e7271216fa3c58cd588da050b19f6e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 26 Mar 2019 18:30:41 +0100 Subject: [PATCH 429/671] Drop projectm support --- vlc.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 73d30c2..3bb1ac3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -31,7 +31,6 @@ %global _with_aom 1 %global _with_dav1d 1 %global _with_freerdp 1 -%global _with_projectm 1 %global _with_schroedinger 1 %global _with_wayland 1 %endif @@ -44,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -545,6 +544,9 @@ fi || : %changelog +* Tue Mar 26 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-24 +- Drop projectm until fixed + * Tue Mar 12 2019 Sérgio Basto <sergio@serjux.com> - 1:3.0.6-23 - Mass rebuild for x264 From efb3858b10ebd84c4cebbe0cd643b7a42fe95e64 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 29 Mar 2019 09:49:51 +0100 Subject: [PATCH 430/671] Update mmal patch --- mmal_1.patch => mmal_8.patch | 5536 ++++++++++++++++++++++++++++------ 1 file changed, 4581 insertions(+), 955 deletions(-) rename mmal_1.patch => mmal_8.patch (58%) diff --git a/mmal_1.patch b/mmal_8.patch similarity index 58% rename from mmal_1.patch rename to mmal_8.patch index 35bdeb2..8744fcb 100644 --- a/mmal_1.patch +++ b/mmal_8.patch @@ -1,6 +1,16 @@ --- a/configure.ac +++ b/configure.ac -@@ -3406,7 +3406,7 @@ +@@ -3419,6 +3419,9 @@ + AC_ARG_ENABLE(mmal, + AS_HELP_STRING([--enable-mmal], + [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)])) ++AC_ARG_ENABLE(mmal_avcodec, ++ AS_HELP_STRING([--enable-mmal-avcodec], ++ [Use MMAL enabled avcodec libs (default disable)])) + if test "${enable_mmal}" != "no"; then + VLC_SAVE_FLAGS + LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif" +@@ -3429,7 +3432,7 @@ VLC_ADD_PLUGIN([mmal]) VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) @@ -9,9 +19,29 @@ AS_IF([test "${enable_mmal}" = "yes"], [ AC_MSG_ERROR([Cannot find bcm library...]) ], [ AC_MSG_WARN([Cannot find bcm library...]) ]) +@@ -3441,6 +3444,7 @@ + VLC_RESTORE_FLAGS + fi + AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"]) ++AM_CONDITIONAL([HAVE_MMAL_AVCODEC], [test "${enable_mmal_avcodec}" = "yes"]) + + dnl + dnl evas plugin +--- a/include/vlc_fourcc.h ++++ b/include/vlc_fourcc.h +@@ -365,6 +365,9 @@ + + /* Broadcom MMAL opaque buffer type */ + #define VLC_CODEC_MMAL_OPAQUE VLC_FOURCC('M','M','A','L') ++#define VLC_CODEC_MMAL_ZC_SAND8 VLC_FOURCC('Z','S','D','8') ++#define VLC_CODEC_MMAL_ZC_SAND10 VLC_FOURCC('Z','S','D','0') ++#define VLC_CODEC_MMAL_ZC_I420 VLC_FOURCC('Z','4','2','0') + + /* DXVA2 opaque video surface for use with D3D9 */ + #define VLC_CODEC_D3D9_OPAQUE VLC_FOURCC('D','X','A','9') /* 4:2:0 8 bpc */ --- a/modules/hw/mmal/Makefile.am +++ b/modules/hw/mmal/Makefile.am -@@ -1,23 +1,30 @@ +@@ -1,23 +1,39 @@ include $(top_srcdir)/modules/common.am mmaldir = $(pluginsdir)/mmal @@ -47,197 +77,221 @@ +libmmal_xsplitter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_xsplitter_plugin.la + ++if HAVE_MMAL_AVCODEC ++libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_picture.c mmal_picture.h ++libmmal_avcodec_plugin_la_CFLAGS = $(AM_CFLAGS) ++libmmal_avcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) ++libmmal_avcodec_plugin_la_LIBADD = $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBS_mmal) ++mmal_LTLIBRARIES += libmmal_avcodec_plugin.la ++endif ++ ++ --- /dev/null +++ b/modules/hw/mmal/blend_rgba_neon.S -@@ -0,0 +1,185 @@ +@@ -0,0 +1,200 @@ + .syntax unified + .arm +// .thumb + .text + .align 16 ++ .arch armv7-a ++ .fpu neon-vfpv4 + -+@ Deal with tail -+@ As the calculation on each pel is independant it doesn't matter -+@ where the pels are in in the registers as long as we are consistant -+@ with what we use for load & store. (Unused register fields will just -+@ calculate garbage that we then ignore.) ++@ blend_rgbx_rgba_neon + -+tail_rgbx_rgba: -+ lsls r2, r3, #30 @ b2 -> C, b1 -> N -+ mov r12, r0 -+ vldmcs r1!, {d2,d3} -+ vldmcs r0!, {d30, d31} -+ vldmmi r1!, {d1} -+ vldmmi r0!, {d29} -+ tst r3, #1 -+ vldrne s1, [r1] -+ vldrne s9, [r0] -+ addne r1, #4 -+ addne r0, #4 -+ -+ @ Alpha in hi byte of each word -+ vshr.u32 q9, q1, #24 -+ vshr.u32 q8, q0, #24 -+ vmov d28, d4 @ Can't load "s57" so cheat -+ vmul.u32 q9, q9, d8[0] -+ vmul.u32 q8, q8, d8[0] -+ vrshr.u32 q9, q9, #16 -+ vrshr.u32 q8, q8, #16 @ 4 mix alpha values -+ vmul.u32 q9, q10 -+ vmul.u32 q8, q10 @ dup every alpha into all 4 bytes of its word -+ -+ vmull.u8 q3, d3, d19 -+ vmull.u8 q2, d2, d18 -+ vsub.u8 q9, q11, q9 @ gen the cplmnt -+ -+ vmull.u8 q1, d1, d17 -+ vmull.u8 q0, d0, d16 -+ vsub.u8 q8, q11, q8 -+ -+ vmlal.u8 q3, d31, d19 -+ vmlal.u8 q2, d30, d18 -+ vmlal.u8 q1, d29, d17 -+ vmlal.u8 q0, d28, d16 -+ -+ vsra.u16 q3, q3, #8 -+ vsra.u16 q2, q2, #8 -+ vsra.u16 q1, q1, #8 -+ vsra.u16 q0, q0, #8 -+ -+ vrshrn.u16 d7, q3, #8 -+ vrshrn.u16 d6, q2, #8 -+ vrshrn.u16 d5, q1, #8 -+ vrshrn.u16 d4, q0, #8 -+ -+ vbit q3, q12, q12 @ Set alpha to #255 -+ vbit q2, q12, q12 ++@ Implements /255 as ((x * 257) + 0x8000) >> 16 ++@ This generates something in the range [(x+126)/255, (x+127)/255] which is good enough + -+ lsls r2, r3, #30 @ b2 -> C, b1 -> N -+ vstmcs r12!, {d6,d7} -+ vstmmi r12!, {d5} -+ tst r3, #1 -+ vstrne s9, [r12] -+ bx lr ++@ There is advantage to aligning src and/or dest - dest gives a bit more due to being used twice + + -+@ blend_rgbx_rgba_neon + -+@ [r0] RGBx dest (Byte order: R, G, B, x) -+@ [r1] RGBA src merge (Byte order: R, G, B, A) ++@ [r0] RGBx dest loaded into d20-d23 ++@ [r1] RGBA src merge loaded into d16-d19 +@ r2 plane alpha +@ r3 count (pixels) + -+@ Whilst specified as RGBx+RGBA the only important part is the position of -+@ alpha, the other components are all treated the same -+@ Assumes little endian i.e. Alpha ends up in hi 8 bits of uint32_t -+ -+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ -+#error Only little endian written (should be easy fix) -+#endif -+ -+@ Implements /255 as ((x * 257) + 0x8000) >> 16 -+@ This generates something in the range [(x+126)/255, (x+127)/255] which is good enough -+ -+@ There is advantage to aligning src and/or dest - dest gives a bit more due to being used twice ++.macro blend_main sR, sG, sB, sA, dR, dG, dB, dA + -+ .align 16 -+ .global blend_rgbx_rgba_neon -+#ifdef __ELF__ -+ .type blend_rgbx_rgba_neon, %function -+#endif ++ push { r4, lr } + -+blend_rgbx_rgba_neon: ++ vdup.u8 d7, r2 + -+ push { r4, lr } -+ vpush { q4 } @ With reworked reg alloc this could be avoided -+ movw r12, #257 -+ vmov.i8 q11, #0xff -+ mul r2, r12 -+ vmov.u8 q10, #1 + subs r3, #8 -+ vmov s16, r2 -+ vmov.u32 q12, #0xff000000 ++ vmov.u8 d6, #0xff ++ + blt 2f + + @ If < 16 bytes to move then don't bother trying to align + @ (a) This means the the align doesn't need to worry about r3 underflow + @ (b) The overhead would be greater than any gain + cmp r3, #8 ++ mov r4, r3 + ble 1f + + @ Align r1 on a 32 byte boundary -+ mov r4, r3 + neg r3, r0 + ubfx r3, r3, #2, #3 + + cmp r3, #0 -+ blne tail_rgbx_rgba ++ blne 10f + + sub r3, r4, r3 + +1: -+ vld1.32 { q0,q1 }, [r1] ++ vld4.8 {d16, d17, d18, d19}, [r1] + +1: -+ @ Alpha in hi byte of each word -+ vshr.u32 q9, q1, #24 -+ vshr.u32 q8, q0, #24 -+ vmul.u32 q9, q9, d8[0] -+ vmul.u32 q8, q8, d8[0] -+ -+ vrshr.u32 q9, q9, #16 -+ vrshr.u32 q8, q8, #16 @ 4 mix alpha values -+ vmul.u32 q9, q10 -+ vmul.u32 q8, q10 @ dup every alpha into all 4 bytes of its word -+ -+ vld1.32 {q14,q15}, [r0] -+ subs r3, #8 -+ -+ vmull.u8 q3, d3, d19 -+ vmull.u8 q2, d2, d18 -+ vsub.u8 q9, q11, q9 @ gen the cplmnt ++ @ Alpha ends up in d19 ++ vmull.u8 q15, \sA, d7 + -+ vmull.u8 q1, d1, d17 -+ vmull.u8 q0, d0, d16 -+ vsub.u8 q8, q11, q8 -+ addge r1, #32 ++ vld4.8 {d20, d21, d22, d23}, [r0] + -+ vmlal.u8 q3, d31, d19 -+ vmlal.u8 q2, d30, d18 -+ vmlal.u8 q1, d29, d17 -+ vmlal.u8 q0, d28, d16 ++ vsra.u16 q15, q15, #8 ++ subs r3, #8 ++ vrshrn.u16 d31, q15, #8 ++ vsub.u8 d30, d6, d31 + -+ vsra.u16 q3, q3, #8 -+ vsra.u16 q2, q2, #8 -+ vsra.u16 q1, q1, #8 -+ vsra.u16 q0, q0, #8 ++ vmull.u8 q12, \sR, d31 ++ vmull.u8 q13, \sG, d31 ++ vmull.u8 q14, \sB, d31 ++ addge r1, #32 + -+ vrshrn.u16 d7, q3, #8 -+ vrshrn.u16 d6, q2, #8 -+ vrshrn.u16 d5, q1, #8 -+ vrshrn.u16 d4, q0, #8 ++ vmlal.u8 q12, \dR, d30 ++ vmlal.u8 q13, \dG, d30 ++ vmlal.u8 q14, \dB, d30 ++ vld4.8 {d16, d17, d18, d19}, [r1] + -+ vld1.32 { q0,q1 }, [r1] ++ vsra.u16 q12, q12, #8 @ * 257/256 ++ vsra.u16 q13, q13, #8 ++ vsra.u16 q14, q14, #8 + -+ vbit q3, q12, q12 @ Set alpha to #255 -+ vbit q2, q12, q12 ++ vrshrn.u16 \dR, q12, #8 ++ vrshrn.u16 \dG, q13, #8 ++ vrshrn.u16 \dB, q14, #8 ++ vmov.u8 \dA, #0xff + -+ vst1.32 { q2,q3 }, [r0]! ++ vst4.8 {d20, d21, d22, d23}, [r0]! + bge 1b + add r1, #32 + +2: -+ cmp r3, #-8 -+ blgt tail_rgbx_rgba ++ cmp r3, #-8 ++ blgt 10f + -+ vpop { q4 } + pop { r4, pc } + + ++// Partial version ++// Align @ start & deal with tail ++10: ++ lsls r2, r3, #30 @ b2 -> C, b1 -> N ++ mov r2, r0 ++ bcc 1f ++ vld4.8 {d16[0], d17[0], d18[0], d19[0]}, [r1]! ++ vld4.8 {d20[0], d21[0], d22[0], d23[0]}, [r0]! ++ vld4.8 {d16[1], d17[1], d18[1], d19[1]}, [r1]! ++ vld4.8 {d20[1], d21[1], d22[1], d23[1]}, [r0]! ++ vld4.8 {d16[2], d17[2], d18[2], d19[2]}, [r1]! ++ vld4.8 {d20[2], d21[2], d22[2], d23[2]}, [r0]! ++ vld4.8 {d16[3], d17[3], d18[3], d19[3]}, [r1]! ++ vld4.8 {d20[3], d21[3], d22[3], d23[3]}, [r0]! ++1: ++ bpl 1f ++ vld4.8 {d16[4], d17[4], d18[4], d19[4]}, [r1]! ++ vld4.8 {d20[4], d21[4], d22[4], d23[4]}, [r0]! ++ vld4.8 {d16[5], d17[5], d18[5], d19[5]}, [r1]! ++ vld4.8 {d20[5], d21[5], d22[5], d23[5]}, [r0]! ++1: ++ tst r3, #1 ++ beq 1f ++ vld4.8 {d16[6], d17[6], d18[6], d19[6]}, [r1]! ++ vld4.8 {d20[6], d21[6], d22[6], d23[6]}, [r0]! ++1: ++ @ Alpha ends up in d19 ++ ++ vmull.u8 q15, \sA, d7 ++ vsra.u16 q15, q15, #8 ++ vrshrn.u16 d31, q15, #8 ++ vsub.u8 d30, d6, d31 ++ ++ vmull.u8 q12, \sR, d31 ++ vmull.u8 q13, \sG, d31 ++ vmull.u8 q14, \sB, d31 ++ ++ vmlal.u8 q12, \dR, d30 ++ vmlal.u8 q13, \dG, d30 ++ vmlal.u8 q14, \dB, d30 ++ ++ vsra.u16 q12, q12, #8 ++ vsra.u16 q13, q13, #8 ++ vsra.u16 q14, q14, #8 ++ ++ vrshrn.u16 \dR, q12, #8 ++ vrshrn.u16 \dG, q13, #8 ++ vrshrn.u16 \dB, q14, #8 ++ vmov.u8 \dA, #0xff ++ ++ mov r0, r2 ++ lsls r2, r3, #30 @ b2 -> C, b1 -> N ++ mov r2, r0 ++ bcc 1f ++ vst4.8 {d20[0], d21[0], d22[0], d23[0]}, [r0]! ++ vst4.8 {d20[1], d21[1], d22[1], d23[1]}, [r0]! ++ vst4.8 {d20[2], d21[2], d22[2], d23[2]}, [r0]! ++ vst4.8 {d20[3], d21[3], d22[3], d23[3]}, [r0]! ++1: ++ bpl 1f ++ vst4.8 {d20[4], d21[4], d22[4], d23[4]}, [r0]! ++ vst4.8 {d20[5], d21[5], d22[5], d23[5]}, [r0]! ++1: ++ tst r3, #1 ++ beq 1f ++ vst4.8 {d20[6], d21[6], d22[6], d23[6]}, [r0]! ++1: ++ bx lr ++ ++.endm ++ ++ ++@ [r0] RGBx dest (Byte order: R, G, B, x) ++@ [r1] RGBA src merge (Byte order: R, G, B, A) ++@ r2 plane alpha ++@ r3 count (pixels) ++ ++@ Whilst specified as RGBx+RGBA the only important part is the position of ++@ alpha, the other components are all treated the same ++ ++@ [r0] RGBx dest (Byte order: R, G, B, x) ++@ [r1] RGBA src merge (Byte order: R, G, B, A) - same as above ++@ r2 plane alpha ++@ r3 count (pixels) ++ .align 16 ++ .global blend_rgbx_rgba_neon ++#ifdef __ELF__ ++ .type blend_rgbx_rgba_neon, %function ++#endif ++blend_rgbx_rgba_neon: ++ blend_main d16, d17, d18, d19, d20, d21, d22, d23 ++ ++ ++@ [r0] RGBx dest (Byte order: R, G, B, x) ++@ [r1] RGBA src merge (Byte order: B, G, R, A) - B / R swapped ++@ r2 plane alpha ++@ r3 count (pixels) ++ .align 16 ++ .global blend_bgrx_rgba_neon ++#ifdef __ELF__ ++ .type blend_bgrx_rgba_neon, %function ++#endif ++blend_bgrx_rgba_neon: ++ blend_main d18, d17, d16, d19, d20, d21, d22, d23 ++ ++ + --- /dev/null +++ b/modules/hw/mmal/blend_rgba_neon.h -@@ -0,0 +1,15 @@ +@@ -0,0 +1,17 @@ +#ifndef HW_MMAL_BLEND_RGBA_NEON_H +#define HW_MMAL_BLEND_RGBA_NEON_H + @@ -245,7 +299,9 @@ +extern "C" { +#endif + -+extern void blend_rgbx_rgba_neon(void * dest, const void * src, int alpha, unsigned int n); ++typedef void blend_neon_fn(void * dest, const void * src, int alpha, unsigned int n); ++extern blend_neon_fn blend_rgbx_rgba_neon; ++extern blend_neon_fn blend_bgrx_rgba_neon; + +#ifdef __cplusplus +} @@ -255,7 +311,7 @@ + --- /dev/null +++ b/modules/hw/mmal/blend_test.c -@@ -0,0 +1,116 @@ +@@ -0,0 +1,180 @@ +#include <stdio.h> +#include <stdint.h> +#include <memory.h> @@ -296,6 +352,25 @@ + } +} + ++ ++// Merge RGBA with BGRA ++static void merge_line2(void * dest, const void * src, int alpha, unsigned int n) ++{ ++ unsigned int i; ++ const uint8_t * s_data = src; ++ uint8_t * d_data = dest; ++ ++ for (i = 0; i != n; ++i) { ++ const uint32_t s_pel = ((const uint32_t *)s_data)[i]; ++ const uint32_t d_pel = ((const uint32_t *)d_data)[i]; ++ const unsigned int a = div255(alpha * (s_pel >> 24)); ++ ((uint32_t *)d_data)[i] = 0xff000000 | ++ (a_merge((d_pel >> 0) & 0xff, (s_pel >> 16) & 0xff, a) << 0 ) | ++ (a_merge((d_pel >> 8) & 0xff, (s_pel >> 8) & 0xff, a) << 8 ) | ++ (a_merge((d_pel >> 16) & 0xff, (s_pel >> 0) & 0xff, a) << 16); ++ } ++} ++ +#define BUF_SIZE 256 +#define BUF_SLACK 16 +#define BUF_ALIGN 64 @@ -329,6 +404,35 @@ + } +} + ++static void test_line2(const uint32_t * const dx, const unsigned int d_off, ++ const uint32_t * const sx, const unsigned int s_off, ++ const unsigned int alpha, const unsigned int len, const int prof_no) ++{ ++ uint32_t d0_buf[BUF_ALLOC]; ++ uint32_t d1_buf[BUF_ALLOC]; ++ const uint32_t * const s0 = sx + s_off; ++ ++ uint32_t * const d0 = (uint32_t *)(((uintptr_t)d0_buf + (BUF_ALIGN - 1)) & ~(BUF_ALIGN - 1)) + d_off; ++ uint32_t * const d1 = (uint32_t *)(((uintptr_t)d1_buf + (BUF_ALIGN - 1)) & ~(BUF_ALIGN - 1)) + d_off; ++ unsigned int i; ++ ++ memcpy(d0, dx, (BUF_SIZE + BUF_SLACK*2)*4); ++ memcpy(d1, dx, (BUF_SIZE + BUF_SLACK*2)*4); ++ ++ merge_line2(d0 + BUF_SLACK, s0 + BUF_SLACK, alpha, len); ++ ++ PROFILE_START(); ++ blend_bgrx_rgba_neon(d1 + BUF_SLACK, s0 + BUF_SLACK, alpha, len); ++ PROFILE_ACC_N(prof_no); ++ ++ for (i = 0; i != BUF_SIZE + BUF_SLACK*2; ++i) { ++ if (d0[i] != d1[i]) { ++ printf("%3d: %08x + %08x * %02x: %08x / %08x: len=%d\n", (int)(i - BUF_SLACK), dx[i], s0[i], alpha, d0[i], d1[i], len); ++ } ++ } ++} ++ ++ + +int main(int argc, char *argv[]) +{ @@ -351,8 +455,9 @@ + + for (i = 0; i != BUF_ALLOC; ++i) { + d0_buf[i] = 0xff00 | i; -+ s0_buf[i] = (i << 24) | 0xffffff; ++ s0_buf[i] = (i << 24) | 0x40ffc0; + } ++ + for (i = 0; i != 256; ++i) { + test_line(d0, 0, s0, 0, i, 256, -1); + } @@ -365,9 +470,24 @@ + test_line(d0, j & 3, s0, j >> 2, i, 256, j); + } + PROFILE_PRINTF_N(j); ++ PROFILE_CLEAR_N(j); + } ++ printf("Done 1\n"); + -+ printf("Done\n"); ++ for (i = 0; i != 256; ++i) { ++ test_line2(d0, 0, s0, 0, i, 256, -1); ++ } ++ for (i = 0; i != 256; ++i) { ++ test_line2(d0, 0, s0, 0, 128, i, -1); ++ } ++ ++ for (j = 0; j != 16; ++j) { ++ for (i = 0; i != 256; ++i) { ++ test_line2(d0, j & 3, s0, j >> 2, i, 256, j); ++ } ++ PROFILE_PRINTF_N(j); ++ } ++ printf("Done 2\n"); + + return 0; +} @@ -388,7 +508,7 @@ #include <vlc_threads.h> #include <bcm_host.h> -@@ -38,255 +40,380 @@ +@@ -38,255 +40,393 @@ #include <interface/mmal/util/mmal_default_components.h> #include "mmal_picture.h" @@ -408,10 +528,6 @@ #define MIN_NUM_BUFFERS_IN_TRANSIT 2 -+#define MMAL_COMPONENT_DEFAULT_RESIZER "vc.ril.resize" -+#define MMAL_COMPONENT_ISP_RESIZER "vc.ril.isp" -+#define MMAL_COMPONENT_HVS "vc.ril.hvs" -+ +#define MMAL_SLICE_HEIGHT 16 +#define MMAL_ALIGN_W 32 +#define MMAL_ALIGN_H 16 @@ -457,13 +573,32 @@ bool b_progressive; + bool b_flushed; ++ ++ // Lock to avoid pic update & allocate happenening simultainiously ++ // * We should be able to arrange life s.t. this isn't needed ++ // but while we are confused apply belt & braces ++ vlc_mutex_t pic_lock; + /* statistics */ - int output_in_transit; - int input_in_transit; atomic_bool started; --}; +} decoder_sys_t; ++ ++ ++typedef struct supported_mmal_enc_s { ++ struct { ++ MMAL_PARAMETER_HEADER_T header; ++ MMAL_FOURCC_T encodings[64]; ++ } supported; ++ int n; ++} supported_mmal_enc_t; ++ ++static supported_mmal_enc_t supported_mmal_enc = ++{ ++ {{MMAL_PARAMETER_SUPPORTED_ENCODINGS, sizeof(((supported_mmal_enc_t *)0)->supported)}, {0}}, ++ -1 + }; -/* Utilities */ -static int change_output_format(decoder_t *dec); @@ -478,51 +613,40 @@ -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); ++static inline char safe_char(const unsigned int c0) ++{ ++ const unsigned int c = c0 & 0xff; ++ return c > ' ' && c < 0x7f ? c : '.'; ++} -static int OpenDecoder(decoder_t *dec) -+typedef struct supported_mmal_enc_s { -+ struct { -+ MMAL_PARAMETER_HEADER_T header; -+ MMAL_FOURCC_T encodings[64]; -+ } supported; -+ int n; -+} supported_mmal_enc_t; -+ -+static supported_mmal_enc_t supported_mmal_enc = ++static const char * str_fourcc(char * buf, unsigned int fcc) { - int ret = VLC_SUCCESS; - decoder_sys_t *sys; - MMAL_PARAMETER_UINT32_T extra_buffers; - MMAL_STATUS_T status; -+ {{MMAL_PARAMETER_SUPPORTED_ENCODINGS, sizeof(((supported_mmal_enc_t *)0)->supported)}, {0}}, -+ -1 -+}; - -- if (dec->fmt_in.i_codec != VLC_CODEC_MPGV && -- dec->fmt_in.i_codec != VLC_CODEC_H264) -- return VLC_EGENERIC; -+#if TRACE_ALL || 1 -+static const char * str_fourcc(char * buf, unsigned int fcc) -+{ + if (fcc == 0) + return "----"; -+ buf[0] = (fcc >> 0) & 0xff; -+ buf[1] = (fcc >> 8) & 0xff; -+ buf[2] = (fcc >> 16) & 0xff; -+ buf[3] = (fcc >> 24) & 0xff; ++ buf[0] = safe_char(fcc >> 0); ++ buf[1] = safe_char(fcc >> 8); ++ buf[2] = safe_char(fcc >> 16); ++ buf[3] = safe_char(fcc >> 24); + buf[4] = 0; + return buf; +} -+#endif + +- if (dec->fmt_in.i_codec != VLC_CODEC_MPGV && +- dec->fmt_in.i_codec != VLC_CODEC_H264) +- return VLC_EGENERIC; ++static bool is_enc_supported(const MMAL_FOURCC_T fcc) ++{ ++ int i; - sys = calloc(1, sizeof(decoder_sys_t)); - if (!sys) { - ret = VLC_ENOMEM; - goto out; -+static bool is_enc_supported(const MMAL_FOURCC_T fcc) -+{ -+ int i; -+ + if (fcc == 0) + return false; + if (supported_mmal_enc.n == -1) @@ -606,42 +730,6 @@ - sys->input->format->encoding = MMAL_ENCODING_MP2V; - else - sys->input->format->encoding = MMAL_ENCODING_H264; -- -- if (dec->fmt_in.i_codec == VLC_CODEC_H264) { -- if (dec->fmt_in.i_extra > 0) { -- status = mmal_format_extradata_alloc(sys->input->format, -- dec->fmt_in.i_extra); -- if (status == MMAL_SUCCESS) { -- memcpy(sys->input->format->extradata, dec->fmt_in.p_extra, -- dec->fmt_in.i_extra); -- sys->input->format->extradata_size = dec->fmt_in.i_extra; -- } else { -- msg_Err(dec, "Failed to allocate extra format data on input port %s (status=%"PRIx32" %s)", -- sys->input->name, status, mmal_status_to_string(status)); -- } -- } -+static MMAL_FOURCC_T vlc_to_mmal_pic_fourcc(const unsigned int fcc) -+{ -+ switch (fcc){ -+ case VLC_CODEC_I420: -+ return MMAL_ENCODING_I420; -+ case VLC_CODEC_RGB32: // _RGB32 doesn't exist in mmal magic mapping table -+ case VLC_CODEC_RGBA: -+ return MMAL_ENCODING_BGRA; -+ case VLC_CODEC_MMAL_OPAQUE: -+ return MMAL_ENCODING_OPAQUE; -+ default: -+ break; - } -+ return 0; -+} - -- status = mmal_port_format_commit(sys->input); -- if (status != MMAL_SUCCESS) { -- msg_Err(dec, "Failed to commit format for input port %s (status=%"PRIx32" %s)", -- sys->input->name, status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; +static MMAL_FOURCC_T pic_to_slice_mmal_fourcc(const MMAL_FOURCC_T fcc) +{ + switch (fcc){ @@ -671,15 +759,41 @@ + return MMAL_ENCODING_BGR32_SLICE; + default: + break; - } -- sys->input->buffer_size = sys->input->buffer_size_recommended; -- sys->input->buffer_num = sys->input->buffer_num_recommended; ++ } + return 0; +} -- status = mmal_port_enable(sys->input, input_port_cb); +- if (dec->fmt_in.i_codec == VLC_CODEC_H264) { +- if (dec->fmt_in.i_extra > 0) { +- status = mmal_format_extradata_alloc(sys->input->format, +- dec->fmt_in.i_extra); +- if (status == MMAL_SUCCESS) { +- memcpy(sys->input->format->extradata, dec->fmt_in.p_extra, +- dec->fmt_in.i_extra); +- sys->input->format->extradata_size = dec->fmt_in.i_extra; +- } else { +- msg_Err(dec, "Failed to allocate extra format data on input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- } ++#define DEBUG_SQUARES 0 ++#if DEBUG_SQUARES ++static void draw_square(void * pic_buf, size_t pic_stride, unsigned int x, unsigned int y, unsigned int w, unsigned int h, uint32_t val) ++{ ++ uint32_t * p = (uint32_t *)pic_buf + y * pic_stride + x; ++ unsigned int i; ++ for (i = 0; i != h; ++i) { ++ unsigned int j; ++ for (j = 0; j != w; ++j) { ++ p[j] = val; + } ++ p += pic_stride; + } ++} ++#endif + +- status = mmal_port_format_commit(sys->input); - if (status != MMAL_SUCCESS) { -- msg_Err(dec, "Failed to enable input port %s (status=%"PRIx32" %s)", +- msg_Err(dec, "Failed to commit format for input port %s (status=%"PRIx32" %s)", - sys->input->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; @@ -691,22 +805,20 @@ + *p = ~0U; + p += inc; } +- sys->input->buffer_size = sys->input->buffer_size_recommended; +- sys->input->buffer_num = sys->input->buffer_num_recommended; +} +- status = mmal_port_enable(sys->input, input_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to enable input port %s (status=%"PRIx32" %s)", +- sys->input->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } + - sys->output = sys->component->output[0]; - sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)dec; - -- if (sys->opaque) { -- extra_buffers.hdr.id = MMAL_PARAMETER_EXTRA_BUFFERS; -- extra_buffers.hdr.size = sizeof(MMAL_PARAMETER_UINT32_T); -- extra_buffers.value = NUM_EXTRA_BUFFERS; -- status = mmal_port_parameter_set(sys->output, &extra_buffers.hdr); -- if (status != MMAL_SUCCESS) { -- msg_Err(dec, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", -- status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; -- } +static void draw_corners(void * pic_buf, size_t pic_stride, unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + const unsigned int len = 20; @@ -721,16 +833,30 @@ +} +#endif +- if (sys->opaque) { +- extra_buffers.hdr.id = MMAL_PARAMETER_EXTRA_BUFFERS; +- extra_buffers.hdr.size = sizeof(MMAL_PARAMETER_UINT32_T); +- extra_buffers.value = NUM_EXTRA_BUFFERS; +- status = mmal_port_parameter_set(sys->output, &extra_buffers.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(dec, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } ++// Buffer either attached to pic or released ++static picture_t * alloc_opaque_pic(decoder_t * const dec, MMAL_BUFFER_HEADER_T * const buf) ++{ ++ decoder_sys_t *const dec_sys = dec->p_sys; + - msg_Dbg(dec, "Activate zero-copy for output port"); - MMAL_PARAMETER_BOOLEAN_T zero_copy = { - { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, - 1 - }; -+// Buffer either attached to pic or released -+static picture_t * alloc_opaque_pic(decoder_t * const dec, MMAL_BUFFER_HEADER_T * const buf) -+{ -+ decoder_sys_t *const dec_sys = dec->p_sys; ++ vlc_mutex_lock(&dec_sys->pic_lock); + picture_t * const pic = decoder_NewPicture(dec); ++ vlc_mutex_unlock(&dec_sys->pic_lock); - status = mmal_port_parameter_set(sys->output, &zero_copy.hdr); - if (status != MMAL_SUCCESS) { @@ -760,7 +886,7 @@ - ret = VLC_EGENERIC; - goto out; - } -+ if ((pic->context = hw_mmal_gen_context(buf, dec_sys->ppr)) == NULL) ++ if ((pic->context = hw_mmal_gen_context(MMAL_ENCODING_OPAQUE, buf, dec_sys->ppr)) == NULL) + goto fail2; - sys->input_pool = mmal_pool_create(sys->input->buffer_num, 0); @@ -781,8 +907,8 @@ +fail2: + picture_Release(pic); +fail1: -+ // * maybe should recycle rather than release? -+ mmal_buffer_header_release(buf); ++ // Recycle rather than release to avoid buffer starvation if NewPic fails ++ hw_mmal_port_pool_ref_recycle(dec_sys->ppr, buf); + return NULL; +} + @@ -806,23 +932,23 @@ - dec->pf_flush = flush_decoder; + mmal_buffer_header_release(buffer); +} -+ + +- vlc_sem_init(&sys->sem, 0); +static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +{ + block_t * const block = (block_t *)buffer->user_data; -- vlc_sem_init(&sys->sem, 0); -+ (void)port; // Unused - -out: - if (ret != VLC_SUCCESS) - CloseDecoder(dec); ++ (void)port; // Unused + +- return ret; +#if TRACE_ALL + msg_Dbg((decoder_t *)port->userdata, "<<< %s: cmd=%d, data=%p, len=%d/%d, pts=%lld", __func__, + buffer->cmd, buffer->data, buffer->length, buffer->alloc_size, (long long)buffer->pts); +#endif - -- return ret; ++ + mmal_buffer_header_reset(buffer); + mmal_buffer_header_release(buffer); + @@ -831,19 +957,17 @@ } -static void CloseDecoder(decoder_t *dec) -+static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++static void decoder_output_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) { - decoder_sys_t *sys = dec->p_sys; - MMAL_BUFFER_HEADER_T *buffer; -+ // decoder structure only guaranteed valid if we have contents ++ decoder_t * const dec = (decoder_t *)port->userdata; - if (!sys) + if (buffer->cmd == 0 && buffer->length != 0) + { -+ decoder_t * const dec = (decoder_t *)port->userdata; -+ +#if TRACE_ALL -+ msg_Dbg((decoder_t *)port->userdata, "<<< %s: cmd=%d, data=%p, len=%d/%d, pts=%lld", __func__, ++ msg_Dbg(dec, "<<< %s: cmd=%d, data=%p, len=%d/%d, pts=%lld", __func__, + buffer->cmd, buffer->data, buffer->length, buffer->alloc_size, (long long)buffer->pts); +#endif + @@ -858,15 +982,17 @@ + // Buffer released or attached to pic - do not release again return; + } -+ else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) + +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); ++ if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) + { -+ decoder_t * const dec = (decoder_t *)port->userdata; + decoder_sys_t * const sys = dec->p_sys; + MMAL_EVENT_FORMAT_CHANGED_T * const fmt = mmal_event_format_changed_get(buffer); + MMAL_ES_FORMAT_T * const format = mmal_format_alloc(); -- if (sys->component && sys->component->control->is_enabled) -- mmal_port_disable(sys->component->control); +- if (sys->input && sys->input->is_enabled) +- mmal_port_disable(sys->input); + if (format == NULL) + msg_Err(dec, "Failed to allocate new format"); + else @@ -874,38 +1000,45 @@ + mmal_format_full_copy(format, fmt->format); + format->encoding = MMAL_ENCODING_OPAQUE; -- if (sys->input && sys->input->is_enabled) -- mmal_port_disable(sys->input); +- if (sys->output && sys->output->is_enabled) +- mmal_port_disable(sys->output); + if (sys->output_format != NULL) + mmal_format_free(sys->output_format); -- if (sys->output && sys->output->is_enabled) -- mmal_port_disable(sys->output); +- if (sys->component && sys->component->is_enabled) +- mmal_component_disable(sys->component); + sys->output_format = format; + } + } ++ else if (buffer->cmd != 0) { ++ char buf0[5]; ++ msg_Warn(dec, "Unexpected output cb event: %s", str_fourcc(buf0, buffer->cmd)); ++ } -- if (sys->component && sys->component->is_enabled) -- mmal_component_disable(sys->component); +- if (sys->input_pool) +- mmal_pool_destroy(sys->input_pool); ++ // If we get here then we were flushing (cmd == 0 && len == 0) or ++ // that was an EVENT - in either case we want to release the buffer ++ // back to its pool rather than recycle it. + mmal_buffer_header_reset(buffer); + buffer->user_data = NULL; + mmal_buffer_header_release(buffer); +} -- if (sys->input_pool) -- mmal_pool_destroy(sys->input_pool); - - if (sys->output_format) - mmal_format_free(sys->output_format); - if (sys->output_pool) - mmal_pool_destroy(sys->output_pool); + +- if (sys->component) +- mmal_component_release(sys->component); +static void fill_output_port(decoder_t *dec) +{ + decoder_sys_t *sys = dec->p_sys; -- if (sys->component) -- mmal_component_release(sys->component); +- vlc_sem_destroy(&sys->sem); +- free(sys); + if (decoder_UpdateVideoFormat(dec) != 0) + { + // If we have a new format don't bother stuffing the buffer @@ -914,12 +1047,10 @@ + msg_Dbg(dec, "%s: Updated", __func__); +#endif -- vlc_sem_destroy(&sys->sem); -- free(sys); +- bcm_host_deinit(); + return; + } - -- bcm_host_deinit(); ++ + hw_mmal_port_pool_ref_fill(sys->ppr); + return; } @@ -940,7 +1071,7 @@ if (atomic_load(&sys->started)) { mmal_format_full_copy(sys->output->format, sys->output_format); status = mmal_port_format_commit(sys->output); -@@ -300,7 +427,9 @@ +@@ -300,7 +440,9 @@ } port_reset: @@ -950,7 +1081,7 @@ status = mmal_port_disable(sys->output); if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to disable output port (status=%"PRIx32" %s)", -@@ -318,15 +447,7 @@ +@@ -318,18 +460,10 @@ goto out; } @@ -966,8 +1097,12 @@ + sys->output->buffer_num = NUM_DECODER_BUFFER_HEADERS; sys->output->buffer_size = sys->output->buffer_size_recommended; - status = mmal_port_enable(sys->output, output_port_cb); -@@ -338,25 +459,14 @@ +- status = mmal_port_enable(sys->output, output_port_cb); ++ status = mmal_port_enable(sys->output, decoder_output_cb); + if (status != MMAL_SUCCESS) { + msg_Err(dec, "Failed to enable output port (status=%"PRIx32" %s)", + status, mmal_status_to_string(status)); +@@ -338,25 +472,14 @@ } if (!atomic_load(&sys->started)) { @@ -996,7 +1131,7 @@ } apply_fmt: -@@ -382,12 +492,17 @@ +@@ -382,12 +505,19 @@ sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive); sys->b_top_field_first = sys->b_progressive ? true : (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst); @@ -1008,13 +1143,15 @@ +#endif } -+ // Tell the reset of the world we have changed format ++ // Tell the rest of the world we have changed format ++ vlc_mutex_lock(&sys->pic_lock); + ret = decoder_UpdateVideoFormat(dec); ++ vlc_mutex_unlock(&sys->pic_lock); + out: mmal_format_free(sys->output_format); sys->output_format = NULL; -@@ -395,144 +510,85 @@ +@@ -395,144 +525,85 @@ return ret; } @@ -1029,7 +1166,7 @@ MMAL_STATUS_T status; - unsigned buffer_size = 0; - int ret = 0; - +- - if (!sys->output->is_enabled) - return VLC_EGENERIC; - @@ -1078,7 +1215,7 @@ - } - buffer->user_data = picture; - buffer->cmd = 0; -- + - status = mmal_port_send_buffer(sys->output, buffer); + status = mmal_port_format_commit(sys->input); if (status != MMAL_SUCCESS) { @@ -1182,7 +1319,7 @@ + mmal_port_disable(sys->output); + // We can leave the input disabled, but we want the output enabled + // in order to sink any buffers returning from other modules -+ mmal_port_enable(sys->output, output_port_cb); ++ mmal_port_enable(sys->output, decoder_output_cb); + sys->b_flushed = true; + } +#if TRACE_ALL @@ -1212,7 +1349,7 @@ /* * Configure output port if necessary */ -@@ -541,18 +597,50 @@ +@@ -541,18 +612,50 @@ msg_Err(dec, "Failed to change output port format"); } @@ -1240,7 +1377,7 @@ + // Reenable stuff if the last thing we did was flush + if (!sys->output->is_enabled && -+ (status = mmal_port_enable(sys->output, output_port_cb)) != MMAL_SUCCESS) ++ (status = mmal_port_enable(sys->output, decoder_output_cb)) != MMAL_SUCCESS) + { + msg_Err(dec, "Output port enable failed"); + goto fail; @@ -1266,7 +1403,7 @@ if (atomic_load(&sys->started)) fill_output_port(dec); -@@ -563,18 +651,21 @@ +@@ -563,18 +666,21 @@ if (block->i_flags & BLOCK_FLAG_CORRUPTED) flags |= MMAL_BUFFER_HEADER_FLAG_CORRUPTED; @@ -1293,7 +1430,7 @@ len = block->i_buffer; if (len > buffer->alloc_size) -@@ -590,89 +681,1304 @@ +@@ -590,89 +696,1443 @@ } buffer->flags = flags; @@ -1362,6 +1499,7 @@ + + hw_mmal_port_pool_ref_release(sys->ppr, false); + ++ vlc_mutex_destroy(&sys->pic_lock); + free(sys); + + bcm_host_deinit(); @@ -1398,6 +1536,7 @@ + goto fail; + } + dec->p_sys = sys; ++ vlc_mutex_init(&sys->pic_lock); + + bcm_host_init(); + @@ -1445,45 +1584,9 @@ + goto fail; + } + -+ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)dec; -+ -+ status = port_parameter_set_uint32(sys->output, MMAL_PARAMETER_EXTRA_BUFFERS, NUM_EXTRA_BUFFERS); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(dec, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", -+ status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ -+ status = port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, 1); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(dec, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ -+ sys->output->format->encoding = MMAL_ENCODING_OPAQUE; -+ if ((status = mmal_port_format_commit(sys->output)) != MMAL_SUCCESS) -+ { -+ msg_Err(dec, "Failed to commit format on port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ -+ sys->output->buffer_num = NUM_DECODER_BUFFER_HEADERS; -+ sys->output->buffer_size = sys->output->buffer_size_recommended; -+ -+ sys->ppr = hw_mmal_port_pool_ref_create(sys->output, NUM_DECODER_BUFFER_HEADERS, sys->output->buffer_size); -+ if (sys->ppr == NULL) { -+ msg_Err(dec, "Failed to create output pool"); -+ goto fail; -+ } -+ -+ status = mmal_port_enable(sys->output, output_port_cb); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(dec, "Failed to enable output port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); ++ if ((status = hw_mmal_opaque_output(VLC_OBJECT(dec), &sys->ppr, ++ sys->output, NUM_EXTRA_BUFFERS, decoder_output_cb)) != MMAL_SUCCESS) + goto fail; -+ } + + status = mmal_component_enable(sys->component); + if (status != MMAL_SUCCESS) { @@ -1573,7 +1676,20 @@ + +#define SUBS_MAX 3 + ++typedef enum filter_resizer_e { ++ FILTER_RESIZER_RESIZER, ++ FILTER_RESIZER_ISP, ++ FILTER_RESIZER_HVS ++} filter_resizer_t; ++ ++typedef struct conv_frame_stash_s ++{ ++ mtime_t pts; ++ MMAL_BUFFER_HEADER_T * sub_bufs[SUBS_MAX]; ++} conv_frame_stash_t; ++ +typedef struct filter_sys_t { ++ filter_resizer_t resizer_type; + MMAL_COMPONENT_T *component; + MMAL_PORT_T *input; + MMAL_PORT_T *output; @@ -1593,13 +1709,15 @@ + MMAL_STATUS_T err_stream; + int in_count; + -+ bool zero_copy; ++ bool is_sliced; ++ bool out_fmt_set; ++ bool latency_set; + const char * component_name; + MMAL_PORT_BH_CB_T in_port_cb_fn; + MMAL_PORT_BH_CB_T out_port_cb_fn; + + uint64_t frame_seq; -+ mtime_t pts_stash[16]; ++ conv_frame_stash_t stash[16]; + + // Slice specific tracking stuff + struct { @@ -1610,20 +1728,24 @@ +} filter_sys_t; + + -+static void pic_to_format(MMAL_ES_FORMAT_T * const es_fmt, const picture_t * const pic) ++static MMAL_STATUS_T pic_to_format(MMAL_ES_FORMAT_T * const es_fmt, const picture_t * const pic) +{ + unsigned int bpp = (pic->format.i_bits_per_pixel + 7) >> 3; + MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; + ++ if (bpp < 1 || bpp > 4) ++ return MMAL_EINVAL; ++ + es_fmt->type = MMAL_ES_TYPE_VIDEO; -+ es_fmt->encoding_variant = es_fmt->encoding = -+ vlc_to_mmal_pic_fourcc(pic->format.i_chroma); ++ es_fmt->encoding = vlc_to_mmal_video_fourcc(&pic->format); ++ es_fmt->encoding_variant = 0; + + // Fill in crop etc. + vlc_to_mmal_video_fmt(es_fmt, &pic->format); + // Override width / height with strides + v_fmt->width = pic->p[0].i_pitch / bpp; + v_fmt->height = pic->p[0].i_lines; ++ return MMAL_SUCCESS; +} + + @@ -1743,7 +1865,7 @@ +#if TRACE_ALL + msg_Dbg(p_filter, "<<< %s: cmd=%d, flags=%#x, pic=%p, data=%p, len=%d/%d, pts=%lld/%lld", __func__, + buf->cmd, buf->flags, buf->user_data, buf->data, buf->length, buf->alloc_size, -+ (long long)buf->pts, (long long)sys->pts_stash[(unsigned int)(buf->pts & 0xf)]); ++ (long long)buf->pts, (long long)sys->stash[(unsigned int)(buf->pts & 0xf)].pts); +#endif + if (buf->cmd == 0) { + picture_t * const pic = (picture_t *)buf->user_data; @@ -1761,10 +1883,13 @@ + else + { + buf_to_pic_copy_props(pic, buf); -+ pic->date = sys->pts_stash[(unsigned int)(buf->pts & 0xf)]; + +// draw_corners(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 0, 0, pic->p[0].i_visible_pitch / 4, pic->p[0].i_visible_lines); -+ ++#if DEBUG_SQUARES ++ draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 0, 0, 32, 32, 0xffff0000); ++ draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 32, 0, 32, 32, 0xff00ff00); ++ draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 64, 0, 32, 32, 0xff0000ff); ++#endif + conv_out_q_pic(sys, pic); + } + } @@ -1824,7 +1949,7 @@ + if (src_stride == dst_stride) { + if (copy_n != 0) + memcpy(dst, src, src_stride * copy_n); -+ } + } + else { + unsigned int i; + for (i = 0; i != copy_n; ++i) { @@ -1832,7 +1957,7 @@ + dst += dst_stride; + src += src_stride; + } - } ++ } + sys->slice.line += scale_n; } - atomic_fetch_sub(&sys->output_in_transit, 1); @@ -1888,8 +2013,11 @@ + msg_Dbg(p_filter, "<<< %s", __func__); +#endif + -+ for (i = 0; i != SUBS_MAX; ++i) { -+ hw_mmal_subpic_flush(VLC_OBJECT(p_filter), sys->subs + i); ++ if (sys->resizer_type == FILTER_RESIZER_HVS) ++ { ++ for (i = 0; i != SUBS_MAX; ++i) { ++ hw_mmal_subpic_flush(VLC_OBJECT(p_filter), sys->subs + i); ++ } + } + + if (sys->input != NULL && sys->input->is_enabled) @@ -1902,6 +2030,19 @@ + // Don't need lock as the above disables should have prevented anything + // happening in the background + ++ for (i = 0; i != 16; ++i) { ++ conv_frame_stash_t *const stash = sys->stash + i; ++ unsigned int sub_no; ++ ++ stash->pts = MMAL_TIME_UNKNOWN; ++ for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { ++ if (stash->sub_bufs[sub_no] != NULL) { ++ mmal_buffer_header_release(stash->sub_bufs[sub_no]); ++ stash->sub_bufs[sub_no] = NULL; ++ } ++ } ++ } ++ + pic_fifo_release_all(&sys->slice.pics); + pic_fifo_release_all(&sys->ret_pics); + @@ -1921,12 +2062,79 @@ +#endif +} + ++static void conv_flush_passthrough(filter_t * p_filter) ++{ ++ VLC_UNUSED(p_filter); ++} ++ ++static void conv_stash_fixup(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const p_pic) ++{ ++ conv_frame_stash_t * const stash = sys->stash + (p_pic->date & 0xf); ++ unsigned int sub_no; ++ VLC_UNUSED(p_filter); ++ ++ p_pic->date = stash->pts; ++ for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { ++ if (stash->sub_bufs[sub_no] != NULL) { ++ // **** Do stashed blend ++ // **** Aaargh, bother... need to rescale subs too ++ ++ mmal_buffer_header_release(stash->sub_bufs[sub_no]); ++ stash->sub_bufs[sub_no] = NULL; ++ } ++ } ++} ++ ++static MMAL_STATUS_T conv_set_output(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const pic) ++{ ++ MMAL_STATUS_T status; ++ ++ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; ++ sys->output->format->type = MMAL_ES_TYPE_VIDEO; ++ sys->output->format->encoding = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video); ++ sys->output->format->encoding_variant = 0; ++ vlc_to_mmal_video_fmt(sys->output->format, &p_filter->fmt_out.video); ++ ++ // Override default format width/height if we have a pic we need to match ++ if (pic != NULL) ++ { ++ if ((status = pic_to_format(sys->output->format, pic)) != MMAL_SUCCESS) ++ { ++ char cbuf[5]; ++ msg_Err(p_filter, "Bad format desc: %s, bits=%d", str_fourcc(cbuf, pic->format.i_chroma), pic->format.i_bits_per_pixel); ++ return status; ++ } ++ ++ MMAL_VIDEO_FORMAT_T *fmt = &sys->output->format->es->video; ++ msg_Dbg(p_filter, "%s: %dx%d [(0,0) %dx%d]", __func__, fmt->width, fmt->height, fmt->crop.width, fmt->crop.height); ++ } ++ ++ mmal_log_dump_format(sys->output->format); ++ ++ status = mmal_port_format_commit(sys->output); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(p_filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ return status; ++ } ++ ++ sys->output->buffer_num = __MAX(sys->is_sliced ? 16 : 2, sys->output->buffer_num_recommended); ++ sys->output->buffer_size = sys->output->buffer_size_recommended; ++ ++ if ((status = conv_enable_out(p_filter, sys)) != MMAL_SUCCESS) ++ return status; + +- sys->output_format = format; ++ return MMAL_SUCCESS; ++} ++ +static picture_t *conv_filter(filter_t *p_filter, picture_t *p_pic) +{ + filter_sys_t * const sys = p_filter->p_sys; + picture_t * ret_pics; + MMAL_STATUS_T err; + const uint64_t frame_seq = ++sys->frame_seq; ++ conv_frame_stash_t * const stash = sys->stash + (frame_seq & 0xf); + +#if TRACE_ALL + msg_Dbg(p_filter, "<<< %s", __func__); @@ -1953,7 +2161,7 @@ + if (p_pic->context == NULL) { + msg_Dbg(p_filter, "%s: No context", __func__); + } -+ else ++ else if (sys->resizer_type == FILTER_RESIZER_HVS) + { + unsigned int sub_no = 0; + @@ -1966,6 +2174,43 @@ + goto fail; + } + } ++ else ++ { ++ unsigned int sub_no = 0; ++ for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { ++ if ((stash->sub_bufs[sub_no] = hw_mmal_pic_sub_buf_get(p_pic, sub_no)) != NULL) { ++ mmal_buffer_header_acquire(stash->sub_bufs[sub_no]); ++ } ++ } ++ } ++ ++ if (!sys->out_fmt_set) { ++ sys->out_fmt_set = true; ++ ++ if (sys->is_sliced) { ++ // If zc then we will do stride conversion when we copy to arm side ++ // so no need to worry about actual pic dimensions here ++ if ((err = conv_set_output(p_filter, sys, NULL)) != MMAL_SUCCESS) ++ goto fail; ++ } ++ else { ++ picture_t *pic = filter_NewPicture(p_filter); ++ err = conv_set_output(p_filter, sys, pic); ++ picture_Release(pic); ++ if (err != MMAL_SUCCESS) ++ goto fail; ++ } ++ ++ msg_Dbg(p_filter, "Outpool: zc=%d, num=%d, size=%d", sys->is_sliced, sys->output->buffer_num, sys->output->buffer_size); ++ sys->out_pool = sys->is_sliced ? ++ mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size) : ++ mmal_pool_create(sys->output->buffer_num, 0); ++ ++ if (sys->out_pool == NULL) { ++ msg_Err(p_filter, "Failed to create output pool"); ++ goto fail; ++ } ++ } + + // Reenable stuff if the last thing we did was flush + if ((err = conv_enable_out(p_filter, sys)) != MMAL_SUCCESS || @@ -1973,7 +2218,7 @@ + goto fail; + + // If ZC then we need to allocate the out pic before we stuff the input -+ if (sys->zero_copy) { ++ if (sys->is_sliced) { + MMAL_BUFFER_HEADER_T * out_buf; + picture_t * const out_pic = filter_NewPicture(p_filter); + @@ -2008,7 +2253,7 @@ + goto fail; + } + -+ sys->pts_stash[(frame_seq & 0xf)] = p_pic->date; ++ stash->pts = p_pic->date; + if ((err = port_send_replicated(sys->input, sys->in_pool, pic_buf, frame_seq)) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Send buffer to input failed"); @@ -2020,14 +2265,13 @@ + --sys->in_count; + } + -+ if (!sys->zero_copy) { ++ if (!sys->is_sliced) { + MMAL_BUFFER_HEADER_T * out_buf; + + while ((out_buf = sys->in_count < 0 ? + mmal_queue_wait(sys->out_pool->queue) : mmal_queue_get(sys->out_pool->queue)) != NULL) + { + picture_t * const out_pic = filter_NewPicture(p_filter); -+ char dbuf0[5]; + + if (out_pic == NULL) { + msg_Warn(p_filter, "Failed to alloc new filter output pic"); @@ -2036,6 +2280,7 @@ + } + +#if 0 ++ char dbuf0[5]; + msg_Dbg(p_filter, "out_pic %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", + str_fourcc(dbuf0, out_pic->format.i_chroma), + out_pic->format.i_width, out_pic->format.i_height, @@ -2076,6 +2321,15 @@ + // Avoid being more than 1 pic behind + vlc_sem_wait(&sys->sem); + ++ // Set sem for delayed scale if not already set ++ if (!sys->latency_set) { ++ unsigned int i; ++ sys->latency_set = true; ++ for (i = 0; i != CONV_MAX_LATENCY; ++i) { ++ vlc_sem_post(&sys->sem); ++ } ++ } ++ + // Return all pending buffers + vlc_mutex_lock(&sys->lock); + ret_pics = pic_fifo_get_all(&sys->ret_pics); @@ -2089,6 +2343,8 @@ + if (ret_pics != NULL) + { + picture_t *next_pic = ret_pics->p_next; ++ ++ conv_stash_fixup(p_filter, sys, ret_pics); +#if 0 + char dbuf0[5]; + @@ -2101,6 +2357,7 @@ +#endif + while (next_pic != NULL) { + vlc_sem_wait(&sys->sem); ++ conv_stash_fixup(p_filter, sys, next_pic); + next_pic = next_pic->p_next; + } + } @@ -2108,7 +2365,8 @@ +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); +#endif -+ + +- mmal_buffer_header_release(buffer); + return ret_pics; + +stream_fail: @@ -2120,14 +2378,21 @@ + return NULL; +} + ++static picture_t *conv_filter_passthrough(filter_t *p_filter, picture_t *p_pic) ++{ ++ VLC_UNUSED(p_filter); ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++ return p_pic; ++} + +static void CloseConverter(vlc_object_t * obj) +{ + filter_t * const p_filter = (filter_t *)obj; + filter_sys_t * const sys = p_filter->p_sys; + unsigned int i; - -- sys->output_format = format; ++ +#if TRACE_ALL + msg_Dbg(obj, "<<< %s", __func__); +#endif @@ -2144,13 +2409,16 @@ + if (sys->component && sys->component->is_enabled) + mmal_component_disable(sys->component); + -+ for (i = 0; i != SUBS_MAX; ++i) { -+ hw_mmal_subpic_close(VLC_OBJECT(p_filter), sys->subs + i); ++ if (sys->resizer_type == FILTER_RESIZER_HVS) ++ { ++ for (i = 0; i != SUBS_MAX; ++i) { ++ hw_mmal_subpic_close(VLC_OBJECT(p_filter), sys->subs + i); ++ } + } + + if (sys->out_pool) + { -+ if (sys->zero_copy) ++ if (sys->is_sliced) + mmal_port_pool_destroy(sys->output, sys->out_pool); + else + mmal_pool_destroy(sys->out_pool); @@ -2169,41 +2437,30 @@ +} + + -+static int conv_set_output(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const pic, const MMAL_FOURCC_T pic_enc) ++static int open_converter_passthrough(filter_t * const p_filter) +{ -+ MMAL_STATUS_T status; -+ -+ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; -+ sys->output->format->type = MMAL_ES_TYPE_VIDEO; -+ sys->output->format->encoding = pic_enc; -+ sys->output->format->encoding_variant = sys->output->format->encoding; -+ vlc_to_mmal_video_fmt(sys->output->format, &p_filter->fmt_out.video); -+ -+ // Override default format width/height if we have a pic we need to match -+ if (pic != NULL) + { -+ pic_to_format(sys->output->format, pic); -+ MMAL_VIDEO_FORMAT_T *fmt = &sys->output->format->es->video; -+ msg_Dbg(p_filter, "%s: %dx%d [(0,0) %dx%d]", __func__, fmt->width, fmt->height, fmt->crop.width, fmt->crop.height); ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] rgb:%#x:%#x:%#x sar:%d/%d", __func__, ++ "passthrough", ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), ++ p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), ++ p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, ++ p_filter->fmt_out.video.i_rmask, p_filter->fmt_out.video.i_gmask, p_filter->fmt_out.video.i_bmask, ++ p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den); + } + -+ mmal_log_dump_format(sys->output->format); -+ -+ status = mmal_port_format_commit(sys->output); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(p_filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); -+ return -1; -+ } + -+ sys->output->buffer_num = __MAX(sys->zero_copy ? 16 : 2, sys->output->buffer_num_recommended); -+ sys->output->buffer_size = sys->output->buffer_size_recommended; -+ -+ if (conv_enable_out(p_filter, sys) != MMAL_SUCCESS) -+ return -1; -+ -+ return 0; -+} ++ p_filter->pf_video_filter = conv_filter_passthrough; ++ p_filter->pf_flush = conv_flush_passthrough; ++ return VLC_SUCCESS; ++} + +static int OpenConverter(vlc_object_t * obj) +{ @@ -2212,19 +2469,34 @@ + filter_sys_t *sys; + MMAL_STATUS_T status; + MMAL_FOURCC_T enc_out; -+ const MMAL_FOURCC_T enc_in = MMAL_ENCODING_OPAQUE; ++ const MMAL_FOURCC_T enc_in = vlc_to_mmal_video_fourcc(&p_filter->fmt_in.video); + bool use_resizer; + bool use_isp; + int gpu_mem; + -+ if (enc_in != vlc_to_mmal_pic_fourcc(p_filter->fmt_in.i_codec) || -+ (enc_out = vlc_to_mmal_pic_fourcc(p_filter->fmt_out.i_codec)) == 0) ++ if ((enc_in != MMAL_ENCODING_OPAQUE && ++ enc_in != MMAL_ENCODING_YUVUV128 && ++ enc_in != MMAL_ENCODING_YUVUV64_10) || ++ (enc_out = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video)) == 0) + return VLC_EGENERIC; - -- mmal_buffer_header_release(buffer); ++ ++ if (enc_in == enc_out) { ++ return open_converter_passthrough(p_filter); ++ } ++ + use_resizer = var_InheritBool(p_filter, MMAL_RESIZE_NAME); + use_isp = var_InheritBool(p_filter, MMAL_ISP_NAME); + ++retry: ++ // Must use ISP - HVS can't do this, nor can resizer ++ if (enc_in == MMAL_ENCODING_YUVUV64_10) { ++ // If resizer selected then just give up ++ if (use_resizer) ++ return VLC_EGENERIC; ++ // otherwise downgrade HVS to ISP ++ use_isp = true; ++ } ++ + if (use_resizer) { + // use resizer overrides use_isp + use_isp = false; @@ -2232,22 +2504,26 @@ + + // Check we have a sliced version of the fourcc if we want the resizer + if (use_resizer && -+ (enc_out = pic_to_slice_mmal_fourcc(enc_out)) == 0) ++ (enc_out = pic_to_slice_mmal_fourcc(enc_out)) == 0) { + return VLC_EGENERIC; ++ } + + gpu_mem = hw_mmal_get_gpu_mem(); + + { -+ char dbuf0[5], dbuf1[5]; -+ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] sar:%d/%d (gpu=%d)", __func__, ++ char dbuf0[5], dbuf1[5], dbuf2[5], dbuf3[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s/%s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s/%s,%dx%d [(%d,%d) %dx%d] rgb:%#x:%#x:%#x sar:%d/%d (gpu=%d)", __func__, + use_resizer ? "resize" : use_isp ? "isp" : "hvs", -+ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), str_fourcc(dbuf2, enc_in), ++ p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, + p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, + p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, + p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, -+ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), str_fourcc(dbuf3, enc_out), ++ p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, + p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, + p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, ++ p_filter->fmt_out.video.i_rmask, p_filter->fmt_out.video.i_gmask, p_filter->fmt_out.video.i_bmask, + p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den, + gpu_mem); + } @@ -2261,34 +2537,43 @@ + + // Init stuff the we destroy unconditionaly in Close first + vlc_mutex_init(&sys->lock); -+ vlc_sem_init(&sys->sem, CONV_MAX_LATENCY); ++ vlc_sem_init(&sys->sem, 0); + sys->err_stream = MMAL_SUCCESS; + pic_fifo_init(&sys->ret_pics); + pic_fifo_init(&sys->slice.pics); + + sys->in_port_cb_fn = conv_input_port_cb; + if (use_resizer) { -+ sys->zero_copy = true; ++ sys->resizer_type = FILTER_RESIZER_RESIZER; ++ sys->is_sliced = true; + sys->component_name = MMAL_COMPONENT_DEFAULT_RESIZER; + sys->out_port_cb_fn = slice_output_port_cb; + } + else if (use_isp) { -+ sys->zero_copy = false; // Copy directly into filter picture ++ sys->resizer_type = FILTER_RESIZER_ISP; ++ sys->is_sliced = false; // Copy directly into filter picture + sys->component_name = MMAL_COMPONENT_ISP_RESIZER; + sys->out_port_cb_fn = conv_output_port_cb; } else { - mmal_buffer_header_release(buffer); -+ sys->zero_copy = false; // Copy directly into filter picture ++ sys->resizer_type = FILTER_RESIZER_HVS; ++ sys->is_sliced = false; // Copy directly into filter picture + sys->component_name = MMAL_COMPONENT_HVS; + sys->out_port_cb_fn = conv_output_port_cb; + } + + status = mmal_component_create(sys->component_name, &sys->component); + if (status != MMAL_SUCCESS) { ++ if (!use_isp && !use_resizer) { ++ msg_Warn(p_filter, "Failed to rcreate HVS resizer - retrying with ISP"); ++ CloseConverter(obj); ++ use_isp = true; ++ goto retry; ++ } + msg_Err(p_filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", + MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); + goto fail; -+ } + } + sys->output = sys->component->output[0]; + sys->input = sys->component->input[0]; + @@ -2318,25 +2603,10 @@ + sys->input->buffer_size = sys->input->buffer_size_recommended; + sys->input->buffer_num = NUM_DECODER_BUFFER_HEADERS; + -+ if (conv_enable_in(p_filter, sys) != MMAL_SUCCESS) ++ if ((status = conv_enable_in(p_filter, sys)) != MMAL_SUCCESS) + goto fail; + -+ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, sys->zero_copy); -+ -+ if (sys->zero_copy) { -+ // If zc then we will do stride conversion when we copy to arm side -+ // so no need to worry about actual pic dimensions here -+ if (conv_set_output(p_filter, sys, NULL, enc_out) != 0) -+ goto fail; -+ } -+ else { -+ picture_t *pic = filter_NewPicture(p_filter); -+ int err = conv_set_output(p_filter, sys, pic, enc_out); -+ picture_Release(pic); -+ if (err != 0) { -+ goto fail; -+ } -+ } ++ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, sys->is_sliced); + + status = mmal_component_enable(sys->component); + if (status != MMAL_SUCCESS) { @@ -2345,21 +2615,13 @@ + goto fail; + } + -+ msg_Dbg(p_filter, "Outpool: zc=%d, num=%d, size=%d", sys->zero_copy, sys->output->buffer_num, sys->output->buffer_size); -+ sys->out_pool = sys->zero_copy ? -+ mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size) : -+ mmal_pool_create(sys->output->buffer_num, 0); -+ -+ if (sys->out_pool == NULL) { -+ msg_Err(p_filter, "Failed to create output pool"); -+ goto fail; -+ } + if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) + { + msg_Err(p_filter, "Failed to create input pool"); + goto fail; + } + ++ if (sys->resizer_type == FILTER_RESIZER_HVS) + { + unsigned int i; + for (i = 0; i != SUBS_MAX; ++i) { @@ -2383,8 +2645,15 @@ + +fail: + CloseConverter(obj); ++ ++ if (!use_resizer && status == MMAL_ENOMEM) { ++ use_resizer = true; ++ msg_Warn(p_filter, "Lack of memory to use HVS/ISP: trying resizer"); ++ goto retry; ++ } ++ +#if TRACE_ALL -+msg_Dbg(p_filter, ">>> %s: FAIL: %d", __func__, ret); ++ msg_Dbg(p_filter, ">>> %s: FAIL: %d", __func__, ret); +#endif + return ret; +} @@ -2438,8 +2707,8 @@ + hw_mmal_pic_sub_buf_add(dst, buf); + + sys->last_dst = dst; - } - } ++ } ++} + +static void FlushBlendMmal(filter_t * p_filter) +{ @@ -2451,9 +2720,16 @@ +static int OpenBlendMmal(vlc_object_t *object) +{ + filter_t * const p_filter = (filter_t *)object; -+ const vlc_fourcc_t vfcc_src = p_filter->fmt_in.video.i_chroma; + const vlc_fourcc_t vfcc_dst = p_filter->fmt_out.video.i_chroma; + ++ if ((vfcc_dst != VLC_CODEC_MMAL_OPAQUE && ++ vfcc_dst != VLC_CODEC_MMAL_ZC_SAND8 && ++ vfcc_dst != VLC_CODEC_MMAL_ZC_SAND10) || ++ !hw_mmal_vzc_subpic_fmt_valid(&p_filter->fmt_in.video)) ++ { ++ return VLC_EGENERIC; ++ } ++ + { + char dbuf0[5], dbuf1[5]; + msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %dx%d]->%s,%dx%d [(%d,%d) %dx%d]", __func__, @@ -2466,10 +2742,6 @@ + p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height); + } + -+ if (vfcc_dst != VLC_CODEC_MMAL_OPAQUE || vfcc_src != VLC_CODEC_RGBA) { -+ return VLC_EGENERIC; -+ } -+ + { + blend_sys_t * const sys = calloc(1, sizeof (*sys)); + if (sys == NULL) @@ -2499,20 +2771,6 @@ + +// --------------------------------------------------------------------------- + -+static inline unsigned div255(unsigned v) -+{ -+ /* It is exact for 8 bits, and has a max error of 1 for 9 and 10 bits -+ * while respecting full opacity/transparency */ -+ return ((v >> 8) + v + 1) >> 8; -+ //return v / 255; -+} -+ -+static inline unsigned int a_merge(unsigned int dst, unsigned src, unsigned f) -+{ -+ return div255((255 - f) * (dst) + src * f); -+} -+ -+ +static void FilterBlendNeon(filter_t *p_filter, + picture_t *dst_pic, const picture_t * src_pic, + int x_offset, int y_offset, int alpha) @@ -2521,11 +2779,10 @@ + uint8_t * d_data; + int width = src_pic->format.i_visible_width; + int height = src_pic->format.i_visible_height; ++ blend_neon_fn *const blend_fn = (blend_neon_fn * )p_filter->p_sys; + +#if TRACE_ALL + msg_Dbg(p_filter, "%s (%d,%d:%d) pic=%p, pts=%lld, force=%d", __func__, x_offset, y_offset, alpha, src_pic, src_pic->date, src_pic->b_force); -+#else -+ VLC_UNUSED(p_filter); +#endif + + if (alpha == 0 || @@ -2559,20 +2816,7 @@ + + + do { -+#if 1 -+ blend_rgbx_rgba_neon(d_data, s_data, alpha, width); -+#else -+ int i; -+ for (i = 0; i != width; ++i) { -+ const uint32_t s_pel = ((const uint32_t *)s_data)[i]; -+ const uint32_t d_pel = ((const uint32_t *)d_data)[i]; -+ const unsigned int a = div255(alpha * (s_pel >> 24)); -+ ((uint32_t *)d_data)[i] = 0xff000000 | -+ (a_merge((d_pel >> 16) & 0xff, (s_pel >> 16) & 0xff, a) << 16) | -+ (a_merge((d_pel >> 8) & 0xff, (s_pel >> 8) & 0xff, a) << 8 ) | -+ (a_merge((d_pel >> 0) & 0xff, (s_pel >> 0) & 0xff, a) << 0 ); -+ } -+#endif ++ blend_fn(d_data, s_data, alpha, width); + s_data += src_pic->p[0].i_pitch; + d_data += dst_pic->p[0].i_pitch; + } while (--height > 0); @@ -2581,31 +2825,63 @@ +static void CloseBlendNeon(vlc_object_t *object) +{ + VLC_UNUSED(object); -+} + } + +static int OpenBlendNeon(vlc_object_t *object) +{ + filter_t * const p_filter = (filter_t *)object; -+ const vlc_fourcc_t vfcc_src = p_filter->fmt_in.video.i_chroma; + const vlc_fourcc_t vfcc_dst = p_filter->fmt_out.video.i_chroma; ++ MMAL_FOURCC_T mfcc_src = vlc_to_mmal_video_fourcc(&p_filter->fmt_in.video); ++ MMAL_FOURCC_T mfcc_dst = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video); ++ blend_neon_fn * blend_fn = (blend_neon_fn *)0; ++ ++ // Non-alpha RGB only for dest ++ if (vfcc_dst != VLC_CODEC_RGB32) ++ return VLC_EGENERIC; ++ ++ // Check we have appropriate blend fn (mmal doesn't have a non-alpha RGB32) ++ switch (mfcc_src) { ++ case MMAL_ENCODING_RGBA: ++ if (mfcc_dst == MMAL_ENCODING_RGBA) ++ blend_fn = blend_rgbx_rgba_neon; ++ else if (mfcc_dst == MMAL_ENCODING_BGRA) ++ blend_fn = blend_bgrx_rgba_neon; ++ break; ++ ++ case MMAL_ENCODING_BGRA: ++ if (mfcc_dst == MMAL_ENCODING_BGRA) ++ blend_fn = blend_rgbx_rgba_neon; ++ else if (mfcc_dst == MMAL_ENCODING_RGBA) ++ blend_fn = blend_bgrx_rgba_neon; ++ break; ++ ++ default: ++ break; ++ } ++ ++ if (blend_fn == (blend_neon_fn *)0) ++ return VLC_EGENERIC; ++ ++ p_filter->p_sys = (void *)blend_fn; ++ p_filter->pf_video_blend = FilterBlendNeon; + + { + char dbuf0[5], dbuf1[5]; -+ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %dx%d]->%s,%dx%d [(%d,%d) %dx%d]", __func__, ++ char dbuf0a[5], dbuf1a[5]; ++ msg_Dbg(p_filter, "%s: (%s) %s/%s,%dx%d [(%d,%d) %dx%d]->%s/%s,%dx%d [(%d,%d) %dx%d]", __func__, + "blend", -+ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), ++ str_fourcc(dbuf0a, mfcc_src), ++ p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, + p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, + p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, -+ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), ++ str_fourcc(dbuf1a, mfcc_dst), ++ p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, + p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, + p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height); + } + -+ if (vfcc_dst != VLC_CODEC_RGB32 || vfcc_src != VLC_CODEC_RGBA) { -+ return VLC_EGENERIC; -+ } -+ -+ p_filter->pf_video_blend = FilterBlendNeon; + return VLC_SUCCESS; +} + @@ -2666,7 +2942,7 @@ #include "mmal_picture.h" -@@ -41,466 +42,602 @@ +@@ -41,466 +42,569 @@ #define MIN_NUM_BUFFERS_IN_TRANSIT 2 @@ -2682,7 +2958,18 @@ +#define MMAL_DEINTERLACE_ADV "mmal-deinterlace-adv" +#define MMAL_DEINTERLACE_ADV_TEXT N_("Force advanced deinterlace") +#define MMAL_DEINTERLACE_ADV_LONGTEXT N_("Force advanced deinterlace") -+ + +-vlc_module_begin() +- set_shortname(N_("MMAL deinterlace")) +- set_description(N_("MMAL-based deinterlace filter plugin")) +- set_capability("video filter", 0) +- set_category(CAT_VIDEO) +- set_subcategory(SUBCAT_VIDEO_VFILTER) +- set_callbacks(Open, Close) +- add_shortcut("deinterlace") +- add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, +- MMAL_DEINTERLACE_QPU_LONGTEXT, true); +-vlc_module_end() +#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" +#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") +#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") @@ -2700,19 +2987,8 @@ +#define MMAL_DEINTERLACE_FULL_RATE_TEXT N_("Full output framerate") +#define MMAL_DEINTERLACE_FULL_RATE_LONGTEXT N_("Full output framerate. 1 output frame for each interlaced field input") --vlc_module_begin() -- set_shortname(N_("MMAL deinterlace")) -- set_description(N_("MMAL-based deinterlace filter plugin")) -- set_capability("video filter", 0) -- set_category(CAT_VIDEO) -- set_subcategory(SUBCAT_VIDEO_VFILTER) -- set_callbacks(Open, Close) -- add_shortcut("deinterlace") -- add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, -- MMAL_DEINTERLACE_QPU_LONGTEXT, true); --vlc_module_end() - -struct filter_sys_t { ++ +typedef struct filter_sys_t +{ MMAL_COMPONENT_T *component; @@ -2790,7 +3066,7 @@ - if (!sys) - return VLC_ENOMEM; - filter->p_sys = sys; -+ if ((pic->context = hw_mmal_gen_context(buf, filter_sys->out_ppr)) == NULL) ++ if ((pic->context = hw_mmal_gen_context(MMAL_ENCODING_OPAQUE, buf, filter_sys->out_ppr)) == NULL) + goto fail2; - bcm_host_init(); @@ -3033,6 +3309,7 @@ - sys->output->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; +- } + // Return anything that is in the out Q + { + MMAL_BUFFER_HEADER_T * out_buf; @@ -3051,56 +3328,77 @@ + mmal_queue_put_back(sys->out_q, out_buf); + break; + } -+ + +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +- } +#if TRACE_ALL + msg_Dbg(p_filter, "-- %s: Q pic=%p: seq_in=%d, seq_out=%d, delta=%d", __func__, out_pic, sys->seq_in, seq_out, seq_delta(sys->seq_in, seq_out)); +#endif -+ + +- sys->filtered_pictures = mmal_queue_create(); + *pp_pic = out_pic; + pp_pic = &out_pic->p_next; -+ + +- filter->pf_video_filter = deinterlace; +- filter->pf_flush = flush; + // Ignore 0 seqs + // Don't think these should actually happen + if (seq_out != 0) + sys->seq_out = seq_out; + } - } ++ } -- status = mmal_component_enable(sys->component); -- if (status != MMAL_SUCCESS) { -- msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", -- sys->component->name, status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; +- vlc_sem_init(&sys->sem, 0); +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); +#endif -+ + +-out: +- if (ret != VLC_SUCCESS) +- Close(filter); + return ret_pics; -+ + +- return ret; +fail: + picture_Release(p_pic); + return NULL; -+} -+ + } + +-static void Close(filter_t *filter) +static void di_flush(filter_t *p_filter) -+{ + { +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; + filter_sys_t * const sys = p_filter->p_sys; -+ + +- if (!sys) +- return; +- +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); +#if TRACE_ALL + msg_Dbg(p_filter, "<<< %s", __func__); +#endif -+ + +- if (sys->input && sys->input->is_enabled) + if (sys->input != NULL && sys->input->is_enabled) -+ mmal_port_disable(sys->input); -+ + mmal_port_disable(sys->input); + +- if (sys->output && sys->output->is_enabled) + if (sys->output != NULL && sys->output->is_enabled) + { + // Wedge anything we've got into the output port as that will free the underlying buffers + fill_output_from_q(p_filter, sys, sys->out_q); + -+ mmal_port_disable(sys->output); -+ + mmal_port_disable(sys->output); + +- if (sys->component && sys->component->is_enabled) +- mmal_component_disable(sys->component); + // If that dumped anything real into the out_q then have another go + if (mmal_queue_length(sys->out_q) != 0) + { @@ -3110,34 +3408,36 @@ + // Out q should now be empty & should remain so until the input is reenabled + } + mmal_port_enable(sys->output, di_output_port_cb); -+ + +- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { +- picture_t *pic = (picture_t *)buffer->user_data; +- picture_Release(pic); + // Leaving the input disabled is fine - but we want to leave the output enabled + // so we can retrieve buffers that are still bound to pictures } -- sys->filtered_pictures = mmal_queue_create(); +- if (sys->filtered_pictures) +- mmal_queue_destroy(sys->filtered_pictures); + sys->seq_in = 1; + sys->seq_out = 1; -- filter->pf_video_filter = deinterlace; -- filter->pf_flush = flush; +- if (sys->component) +- mmal_component_release(sys->component); +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s", __func__); +#endif +} -- vlc_sem_init(&sys->sem, 0); +- vlc_sem_destroy(&sys->sem); +- free(sys); --out: -- if (ret != VLC_SUCCESS) -- Close(filter); +- bcm_host_deinit(); +static void pass_flush(filter_t *p_filter) +{ + // Nothing to do + VLC_UNUSED(p_filter); +} - -- return ret; ++ +static picture_t * pass_deinterlace(filter_t * p_filter, picture_t * p_pic) +{ + VLC_UNUSED(p_filter); @@ -3146,22 +3446,34 @@ + return p_pic; } --static void Close(filter_t *filter) +-static int send_output_buffer(filter_t *filter) + +static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) { - filter_sys_t *sys = filter->p_sys; - MMAL_BUFFER_HEADER_T *buffer; + filter_t *filter = (filter_t *)port->userdata; -+ MMAL_STATUS_T status; + MMAL_STATUS_T status; +- picture_t *picture; +- int ret = 0; -- if (!sys) +- if (!sys->output->is_enabled) { +- ret = VLC_EGENERIC; +- goto out; + if (buffer->cmd == MMAL_EVENT_ERROR) { + status = *(uint32_t *)buffer->data; + msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, + mmal_status_to_string(status)); -+ } -+ + } + +- picture = filter_NewPicture(filter); +- if (!picture) { +- msg_Warn(filter, "Failed to get new picture"); +- ret = -1; +- goto out; +- } +- picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate; +- picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base; + mmal_buffer_header_reset(buffer); + mmal_buffer_header_release(buffer); +} @@ -3169,87 +3481,101 @@ +static void CloseMmalDeinterlace(filter_t *filter) +{ + filter_sys_t * const sys = filter->p_sys; -+ + +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->cmd = 0; +#if TRACE_ALL + msg_Dbg(filter, "<<< %s", __func__); +#endif -+ + +- mmal_picture_lock(picture); + if (sys == NULL) - return; ++ return; -- if (sys->component && sys->component->control->is_enabled) -- mmal_port_disable(sys->component->control); +- status = mmal_port_send_buffer(sys->output, buffer); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to send buffer to output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- mmal_buffer_header_release(buffer); +- picture_Release(picture); +- ret = -1; +- } else { +- atomic_fetch_add(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); + if (sys->use_passthrough) + { + free(sys); + return; -+ } + } -- if (sys->input && sys->input->is_enabled) -- mmal_port_disable(sys->input); +-out: +- return ret; + di_flush(filter); - -- if (sys->output && sys->output->is_enabled) -- mmal_port_disable(sys->output); ++ + if (sys->component && sys->component->control->is_enabled) + mmal_port_disable(sys->component->control); - - if (sys->component && sys->component->is_enabled) - mmal_component_disable(sys->component); - -- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { -- picture_t *pic = (picture_t *)buffer->user_data; -- picture_Release(pic); -- } ++ ++ if (sys->component && sys->component->is_enabled) ++ mmal_component_disable(sys->component); ++ + if (sys->in_pool != NULL) + mmal_pool_destroy(sys->in_pool); + + hw_mmal_port_pool_ref_release(sys->out_ppr, false); + // Once we exit filter & sys are invalid so mark as such + sys->output->userdata = NULL; - -- if (sys->filtered_pictures) -- mmal_queue_destroy(sys->filtered_pictures); ++ + if (sys->out_q != NULL) + mmal_queue_destroy(sys->out_q); - - if (sys->component) - mmal_component_release(sys->component); - -- vlc_sem_destroy(&sys->sem); - free(sys); - - bcm_host_deinit(); ++ ++ if (sys->component) ++ mmal_component_release(sys->component); ++ ++ free(sys); ++ ++ bcm_host_deinit(); } --static int send_output_buffer(filter_t *filter) +-static void fill_output_port(filter_t *filter) + +static int OpenMmalDeinterlace(filter_t *filter) { - filter_sys_t *sys = filter->p_sys; -- MMAL_BUFFER_HEADER_T *buffer; +- /* allow at least 2 buffers in transit */ +- unsigned max_buffers_in_transit = __MAX(2, MIN_NUM_BUFFERS_IN_TRANSIT); +- int buffers_available = sys->output->buffer_num - +- atomic_load(&sys->output_in_transit) - +- mmal_queue_length(sys->filtered_pictures); +- int buffers_to_send = max_buffers_in_transit - sys->output_in_transit; +- int i; + int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ? + CLOCK_FREQ * filter->fmt_in.video.i_frame_rate_base / + filter->fmt_in.video.i_frame_rate : 0; + + int ret = VLC_EGENERIC; - MMAL_STATUS_T status; -- picture_t *picture; -- int ret = 0; ++ MMAL_STATUS_T status; + filter_sys_t *sys; ++ ++ msg_Dbg(filter, "<<< %s", __func__); -- if (!sys->output->is_enabled) { -- ret = VLC_EGENERIC; -- goto out; -- } +- if (buffers_to_send > buffers_available) +- buffers_to_send = buffers_available; + if (filter->fmt_in.video.i_chroma != VLC_CODEC_MMAL_OPAQUE || + filter->fmt_out.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) + return VLC_EGENERIC; -+ + +-#ifndef NDEBUG +- msg_Dbg(filter, "Send %d buffers to output port (available: %d, in_transit: %d, buffer_num: %d)", +- buffers_to_send, buffers_available, sys->output_in_transit, +- sys->output->buffer_num); +#if TRACE_ALL + msg_Dbg(filter, "Try to open mmal_deinterlace filter. frame_duration: %d, QPU %s!", + frame_duration, use_qpu ? "used" : "unused"); -+#endif + #endif +- for (i = 0; i < buffers_to_send; ++i) { +- if (send_output_buffer(filter) < 0) +- break; + + sys = calloc(1, sizeof(filter_sys_t)); + if (!sys) @@ -3270,19 +3596,18 @@ + // Also check we actually have enough memory to do this + if (hw_mmal_get_gpu_mem() < (96 << 20)) + sys->use_passthrough = true; - -- picture = filter_NewPicture(filter); -- if (!picture) { -- msg_Warn(filter, "Failed to get new picture"); -- ret = -1; -- goto out; ++ } -- picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate; -- picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base; +-} -- buffer = picture->p_sys->buffer; -- buffer->user_data = picture; -- buffer->cmd = 0; +-static picture_t *deinterlace(filter_t *filter, picture_t *picture) +-{ +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; +- picture_t *out_picture = NULL; +- picture_t *ret = NULL; +- MMAL_STATUS_T status; +- unsigned i = 0; + if (var_InheritBool(filter, MMAL_DEINTERLACE_NO_QPU)) + sys->use_qpu = false; + if (var_InheritBool(filter, MMAL_DEINTERLACE_ADV)) @@ -3308,40 +3633,21 @@ + filter->pf_flush = pass_flush; + return 0; + } - -- mmal_picture_lock(picture); ++ + bcm_host_init(); -- status = mmal_port_send_buffer(sys->output, buffer); +- fill_output_port(filter); + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_DEINTERLACE, &sys->component); - if (status != MMAL_SUCCESS) { -- msg_Err(filter, "Failed to send buffer to output port (status=%"PRIx32" %s)", -- status, mmal_status_to_string(status)); -- mmal_buffer_header_release(buffer); -- picture_Release(picture); -- ret = -1; -- } else { -- atomic_fetch_add(&sys->output_in_transit, 1); -- vlc_sem_post(&sys->sem); ++ if (status != MMAL_SUCCESS) { + msg_Err(filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", + MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); + goto fail; - } ++ } --out: -- return ret; --} -- --static void fill_output_port(filter_t *filter) --{ -- filter_sys_t *sys = filter->p_sys; -- /* allow at least 2 buffers in transit */ -- unsigned max_buffers_in_transit = __MAX(2, MIN_NUM_BUFFERS_IN_TRANSIT); -- int buffers_available = sys->output->buffer_num - -- atomic_load(&sys->output_in_transit) - -- mmal_queue_length(sys->filtered_pictures); -- int buffers_to_send = max_buffers_in_transit - sys->output_in_transit; -- int i; +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->pts = picture->date; +- buffer->cmd = 0; + { + const MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = { + { MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param) }, @@ -3352,69 +3658,10 @@ + { 5 /* Frame type: mixed */, frame_duration, sys->half_rate, sys->use_qpu } + }; -- if (buffers_to_send > buffers_available) -- buffers_to_send = buffers_available; -+ status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", -+ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ } - --#ifndef NDEBUG -- msg_Dbg(filter, "Send %d buffers to output port (available: %d, in_transit: %d, buffer_num: %d)", -- buffers_to_send, buffers_available, sys->output_in_transit, -- sys->output->buffer_num); --#endif -- for (i = 0; i < buffers_to_send; ++i) { -- if (send_output_buffer(filter) < 0) -- break; -+ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; -+ status = mmal_port_enable(sys->component->control, control_port_cb); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", -+ sys->component->control->name, status, mmal_status_to_string(status)); -+ goto fail; - } --} - --static picture_t *deinterlace(filter_t *filter, picture_t *picture) --{ -- filter_sys_t *sys = filter->p_sys; -- MMAL_BUFFER_HEADER_T *buffer; -- picture_t *out_picture = NULL; -- picture_t *ret = NULL; -- MMAL_STATUS_T status; -- unsigned i = 0; -+ sys->input = sys->component->input[0]; -+ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; -+ if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) -+ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; -+ vlc_to_mmal_video_fmt(sys->input->format, &filter->fmt_in.video); - -- fill_output_port(filter); -+ es_format_Copy(&filter->fmt_out, &filter->fmt_in); -+ if (!sys->half_rate) -+ filter->fmt_out.video.i_frame_rate *= 2; - -- buffer = picture->p_sys->buffer; -- buffer->user_data = picture; -- buffer->pts = picture->date; -- buffer->cmd = 0; -+ status = mmal_port_format_commit(sys->input); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ sys->input->buffer_size = sys->input->buffer_size_recommended; -+ sys->input->buffer_num = 30; -+// sys->input->buffer_num = sys->input->buffer_num_recommended; - - if (!picture->p_sys->displayed) { - status = mmal_port_send_buffer(sys->input, buffer); -- if (status != MMAL_SUCCESS) { ++ status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); + if (status != MMAL_SUCCESS) { - msg_Err(filter, "Failed to send buffer to input port (status=%"PRIx32" %s)", - status, mmal_status_to_string(status)); - picture_Release(picture); @@ -3422,14 +3669,12 @@ - picture->p_sys->displayed = true; - atomic_fetch_add(&sys->input_in_transit, 1); - vlc_sem_post(&sys->sem); -- } ++ msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); ++ goto fail; + } - } else { - picture_Release(picture); -+ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); -+ goto fail; } - /* @@ -3450,10 +3695,11 @@ - msg_Dbg(filter, "Failed waiting for filtered picture"); - break; - } -+ status = mmal_port_enable(sys->input, di_input_port_cb); ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ status = mmal_port_enable(sys->component->control, control_port_cb); + if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); ++ msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); + goto fail; } - if (out_picture) @@ -3461,28 +3707,30 @@ - return ret; -} -+ sys->output = sys->component->output[0]; -+ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)filter; -+ mmal_format_full_copy(sys->output->format, sys->input->format); ++ sys->input = sys->component->input[0]; ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) ++ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; ++ vlc_to_mmal_video_fmt(sys->input->format, &filter->fmt_in.video); -static void flush(filter_t *filter) -{ - filter_sys_t *sys = filter->p_sys; - MMAL_BUFFER_HEADER_T *buffer; -+ status = port_parameter_set_uint32(sys->output, MMAL_PARAMETER_EXTRA_BUFFERS, 5); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", -+ status, mmal_status_to_string(status)); -+ goto fail; -+ } ++ es_format_Copy(&filter->fmt_out, &filter->fmt_in); ++ if (!sys->half_rate) ++ filter->fmt_out.video.i_frame_rate *= 2; - msg_Dbg(filter, "flush deinterlace filter"); -+ status = port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, true); ++ status = mmal_port_format_commit(sys->input); + if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); -+ goto fail; ++ msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; + } ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = 30; ++// sys->input->buffer_num = sys->input->buffer_num_recommended; - msg_Dbg(filter, "flush: flush ports (input: %d, output: %d in transit)", - sys->input_in_transit, sys->output_in_transit); @@ -3499,10 +3747,9 @@ - msg_Dbg(filter, "flush: release already filtered pic %p", - (void *)pic); - picture_Release(pic); -+ status = mmal_port_format_commit(sys->output); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to commit format for output port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); ++ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(filter, "Failed to create input pool"); + goto fail; } - atomic_store(&sys->started, false); @@ -3513,36 +3760,35 @@ -{ - filter_t *filter = (filter_t *)port->userdata; - MMAL_STATUS_T status; -+ sys->output->buffer_size = sys->output->buffer_size_recommended; -+ sys->output->buffer_num = 30; -+// sys->output->buffer_num = sys->output->buffer_num_recommended; ++ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } - if (buffer->cmd == MMAL_EVENT_ERROR) { - status = *(uint32_t *)buffer->data; - msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, - mmal_status_to_string(status)); -+ if ((sys->out_q = mmal_queue_create()) == NULL) -+ { -+ msg_Err(filter, "Failed to create out Q"); ++ status = mmal_port_enable(sys->input, di_input_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); + goto fail; } - mmal_buffer_header_release(buffer); -} -+ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) -+ { -+ msg_Err(filter, "Failed to create input pool"); -+ goto fail; -+ } -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -{ - picture_t *picture = (picture_t *)buffer->user_data; - filter_t *filter = (filter_t *)port->userdata; - filter_sys_t *sys = filter->p_sys; -+ sys->out_ppr = hw_mmal_port_pool_ref_create(sys->output, sys->output->buffer_num, sys->output->buffer_size); -+ if (sys->out_ppr == NULL) { -+ msg_Err(filter, "Failed to create output pool"); ++ if ((sys->out_q = mmal_queue_create()) == NULL) ++ { ++ msg_Err(filter, "Failed to create out Q"); + goto fail; + } @@ -3551,22 +3797,21 @@ - } else { - msg_Warn(filter, "Got buffer without picture on input port - OOOPS"); - mmal_buffer_header_release(buffer); -+ status = mmal_port_enable(sys->output, di_output_port_cb); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to enable output port %s (status=%"PRIx32" %s)", -+ sys->output->name, status, mmal_status_to_string(status)); ++ sys->output = sys->component->output[0]; ++ mmal_format_full_copy(sys->output->format, sys->input->format); ++ ++ if ((status = hw_mmal_opaque_output(VLC_OBJECT(filter), &sys->out_ppr, sys->output, 5, di_output_port_cb)) != MMAL_SUCCESS) + goto fail; - } - -- atomic_fetch_sub(&sys->input_in_transit, 1); -- vlc_sem_post(&sys->sem); ++ + status = mmal_component_enable(sys->component); + if (status != MMAL_SUCCESS) { + msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", + sys->component->name, status, mmal_status_to_string(status)); + goto fail; -+ } -+ + } + +- atomic_fetch_sub(&sys->input_in_transit, 1); +- vlc_sem_post(&sys->sem); + filter->pf_video_filter = deinterlace; + filter->pf_flush = di_flush; + return 0; @@ -3623,9 +3868,2287 @@ - mmal_buffer_header_release(buffer); - } -} +--- /dev/null ++++ b/modules/hw/mmal/mmal_avcodec.c +@@ -0,0 +1,2275 @@ ++/***************************************************************************** ++ * video.c: video decoder using the libavcodec library ++ ***************************************************************************** ++ * Copyright (C) 1999-2001 VLC authors and VideoLAN ++ * $Id$ ++ * ++ * Authors: Laurent Aimar <fenrir@via.ecp.fr> ++ * Gildas Bazin <gbazin@videolan.org> ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU Lesser General Public License as published by ++ * the Free Software Foundation; either version 2.1 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this program; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. ++ *****************************************************************************/ ++ ++/***************************************************************************** ++ * Preamble ++ *****************************************************************************/ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include <vlc_plugin.h> ++#include <vlc_common.h> ++#include <vlc_codec.h> ++#include <vlc_avcodec.h> ++#include <vlc_cpu.h> ++#include <vlc_atomic.h> ++#include <assert.h> ++ ++#include "../../codec/avcodec/avcommon.h" ++ ++#include <interface/mmal/mmal.h> ++ ++#include <libavcodec/avcodec.h> ++#include <libavutil/mem.h> ++#include <libavutil/pixdesc.h> ++#include <libavcodec/rpi_zc.h> ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) ++#include <libavutil/mastering_display_metadata.h> ++#endif ++ ++#include "mmal_picture.h" ++ ++#define TRACE_ALL 0 ++ ++#define AVPROVIDER(lib) ((lib##_VERSION_MICRO < 100) ? "libav" : "ffmpeg") ++ ++#ifdef HAVE_LIBAVCODEC_AVCODEC_H ++#include <libavcodec/avcodec.h> ++ ++/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg ++ * a is the major version ++ * b and c the minor and micro versions of libav ++ * d and e the minor and micro versions of FFmpeg */ ++#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ ++ ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ ++ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) ++ ++#ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT ++# define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT ++#endif ++#ifndef AV_CODEC_FLAG_GRAY ++# define AV_CODEC_FLAG_GRAY CODEC_FLAG_GRAY ++#endif ++#ifndef AV_CODEC_FLAG_DR1 ++# define AV_CODEC_FLAG_DR1 CODEC_FLAG_DR1 ++#endif ++#ifndef AV_CODEC_FLAG_DELAY ++# define AV_CODEC_FLAG_DELAY CODEC_FLAG_DELAY ++#endif ++#ifndef AV_CODEC_FLAG2_FAST ++# define AV_CODEC_FLAG2_FAST CODEC_FLAG2_FAST ++#endif ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_DCT ++# define AV_CODEC_FLAG_INTERLACED_DCT CODEC_FLAG_INTERLACED_DCT ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_ME ++# define AV_CODEC_FLAG_INTERLACED_ME CODEC_FLAG_INTERLACED_ME ++#endif ++#ifndef AV_CODEC_FLAG_GLOBAL_HEADER ++# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#endif ++#ifndef AV_CODEC_FLAG_LOW_DELAY ++# define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY ++#endif ++#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME ++# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME ++#endif ++#ifndef AV_INPUT_BUFFER_MIN_SIZE ++# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE ++#endif ++#ifndef FF_MAX_B_FRAMES ++# define FF_MAX_B_FRAMES 16 // FIXME: remove this ++#endif ++ ++#endif /* HAVE_LIBAVCODEC_AVCODEC_H */ ++ ++#ifdef HAVE_LIBAVUTIL_AVUTIL_H ++# include <libavutil/avutil.h> ++ ++/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg ++ * a is the major version ++ * b and c the minor and micro versions of libav ++ * d and e the minor and micro versions of FFmpeg */ ++#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \ ++ ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ ++ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) ++ ++#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) ++# define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL ++#endif ++ ++#endif /* HAVE_LIBAVUTIL_AVUTIL_H */ ++ ++#if LIBAVUTIL_VERSION_MAJOR >= 55 ++# define FF_API_AUDIOCONVERT 1 ++#endif ++ ++/* libavutil/pixfmt.h */ ++#ifndef PixelFormat ++# define PixelFormat AVPixelFormat ++#endif ++ ++#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H ++# include <libavformat/avformat.h> ++ ++#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \ ++ ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ ++ (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) ++ ++#endif ++ ++/***************************************************************************** ++ * Codec fourcc -> libavcodec Codec_id mapping ++ * Sorted by AVCodecID enumeration order ++ *****************************************************************************/ ++struct vlc_avcodec_fourcc ++{ ++ vlc_fourcc_t i_fourcc; ++ unsigned i_codec; ++}; ++ ++/* ++ * Video Codecs ++ */ ++static const struct vlc_avcodec_fourcc video_codecs[] = ++{ ++ { VLC_CODEC_MP1V, AV_CODEC_ID_MPEG1VIDEO }, ++ { VLC_CODEC_MP2V, AV_CODEC_ID_MPEG2VIDEO }, /* prefer MPEG2 over MPEG1 */ ++ { VLC_CODEC_MPGV, AV_CODEC_ID_MPEG2VIDEO }, /* prefer MPEG2 over MPEG1 */ ++ /* AV_CODEC_ID_MPEG2VIDEO_XVMC */ ++ { VLC_CODEC_H261, AV_CODEC_ID_H261 }, ++ { VLC_CODEC_H263, AV_CODEC_ID_H263 }, ++ { VLC_CODEC_RV10, AV_CODEC_ID_RV10 }, ++ { VLC_CODEC_RV13, AV_CODEC_ID_RV10 }, ++ { VLC_CODEC_RV20, AV_CODEC_ID_RV20 }, ++ { VLC_CODEC_MJPG, AV_CODEC_ID_MJPEG }, ++ { VLC_CODEC_MJPGB, AV_CODEC_ID_MJPEGB }, ++ { VLC_CODEC_LJPG, AV_CODEC_ID_LJPEG }, ++ { VLC_CODEC_SP5X, AV_CODEC_ID_SP5X }, ++ { VLC_CODEC_JPEGLS, AV_CODEC_ID_JPEGLS }, ++ { VLC_CODEC_MP4V, AV_CODEC_ID_MPEG4 }, ++ /* AV_CODEC_ID_RAWVIDEO */ ++ { VLC_CODEC_DIV1, AV_CODEC_ID_MSMPEG4V1 }, ++ { VLC_CODEC_DIV2, AV_CODEC_ID_MSMPEG4V2 }, ++ { VLC_CODEC_DIV3, AV_CODEC_ID_MSMPEG4V3 }, ++ { VLC_CODEC_WMV1, AV_CODEC_ID_WMV1 }, ++ { VLC_CODEC_WMV2, AV_CODEC_ID_WMV2 }, ++ { VLC_CODEC_H263P, AV_CODEC_ID_H263P }, ++ { VLC_CODEC_H263I, AV_CODEC_ID_H263I }, ++ { VLC_CODEC_FLV1, AV_CODEC_ID_FLV1 }, ++ { VLC_CODEC_SVQ1, AV_CODEC_ID_SVQ1 }, ++ { VLC_CODEC_SVQ3, AV_CODEC_ID_SVQ3 }, ++ { VLC_CODEC_DV, AV_CODEC_ID_DVVIDEO }, ++ { VLC_CODEC_HUFFYUV, AV_CODEC_ID_HUFFYUV }, ++ { VLC_CODEC_CYUV, AV_CODEC_ID_CYUV }, ++ { VLC_CODEC_H264, AV_CODEC_ID_H264 }, ++ { VLC_CODEC_INDEO3, AV_CODEC_ID_INDEO3 }, ++ { VLC_CODEC_VP3, AV_CODEC_ID_VP3 }, ++ { VLC_CODEC_THEORA, AV_CODEC_ID_THEORA }, ++#if ( !defined( WORDS_BIGENDIAN ) ) ++ /* Asus Video (Another thing that doesn't work on PPC) */ ++ { VLC_CODEC_ASV1, AV_CODEC_ID_ASV1 }, ++ { VLC_CODEC_ASV2, AV_CODEC_ID_ASV2 }, ++#endif ++ { VLC_CODEC_FFV1, AV_CODEC_ID_FFV1 }, ++ { VLC_CODEC_4XM, AV_CODEC_ID_4XM }, ++ { VLC_CODEC_VCR1, AV_CODEC_ID_VCR1 }, ++ { VLC_CODEC_CLJR, AV_CODEC_ID_CLJR }, ++ { VLC_CODEC_MDEC, AV_CODEC_ID_MDEC }, ++ { VLC_CODEC_ROQ, AV_CODEC_ID_ROQ }, ++ { VLC_CODEC_INTERPLAY, AV_CODEC_ID_INTERPLAY_VIDEO }, ++ { VLC_CODEC_XAN_WC3, AV_CODEC_ID_XAN_WC3 }, ++ { VLC_CODEC_XAN_WC4, AV_CODEC_ID_XAN_WC4 }, ++ { VLC_CODEC_RPZA, AV_CODEC_ID_RPZA }, ++ { VLC_CODEC_CINEPAK, AV_CODEC_ID_CINEPAK }, ++ { VLC_CODEC_WS_VQA, AV_CODEC_ID_WS_VQA }, ++ { VLC_CODEC_MSRLE, AV_CODEC_ID_MSRLE }, ++ { VLC_CODEC_MSVIDEO1, AV_CODEC_ID_MSVIDEO1 }, ++ { VLC_CODEC_IDCIN, AV_CODEC_ID_IDCIN }, ++ { VLC_CODEC_8BPS, AV_CODEC_ID_8BPS }, ++ { VLC_CODEC_SMC, AV_CODEC_ID_SMC }, ++ { VLC_CODEC_FLIC, AV_CODEC_ID_FLIC }, ++ { VLC_CODEC_TRUEMOTION1, AV_CODEC_ID_TRUEMOTION1 }, ++ { VLC_CODEC_VMDVIDEO, AV_CODEC_ID_VMDVIDEO }, ++ { VLC_CODEC_LCL_MSZH, AV_CODEC_ID_MSZH }, ++ { VLC_CODEC_LCL_ZLIB, AV_CODEC_ID_ZLIB }, ++ { VLC_CODEC_QTRLE, AV_CODEC_ID_QTRLE }, ++ { VLC_CODEC_TSCC, AV_CODEC_ID_TSCC }, ++ { VLC_CODEC_ULTI, AV_CODEC_ID_ULTI }, ++ { VLC_CODEC_QDRAW, AV_CODEC_ID_QDRAW }, ++ { VLC_CODEC_VIXL, AV_CODEC_ID_VIXL }, ++ { VLC_CODEC_QPEG, AV_CODEC_ID_QPEG }, ++ { VLC_CODEC_PNG, AV_CODEC_ID_PNG }, ++ { VLC_CODEC_PPM, AV_CODEC_ID_PPM }, ++ /* AV_CODEC_ID_PBM */ ++ { VLC_CODEC_PGM, AV_CODEC_ID_PGM }, ++ { VLC_CODEC_PGMYUV, AV_CODEC_ID_PGMYUV }, ++ { VLC_CODEC_PAM, AV_CODEC_ID_PAM }, ++ { VLC_CODEC_FFVHUFF, AV_CODEC_ID_FFVHUFF }, ++ { VLC_CODEC_RV30, AV_CODEC_ID_RV30 }, ++ { VLC_CODEC_RV40, AV_CODEC_ID_RV40 }, ++ { VLC_CODEC_VC1, AV_CODEC_ID_VC1 }, ++ { VLC_CODEC_WMVA, AV_CODEC_ID_VC1 }, ++ { VLC_CODEC_WMV3, AV_CODEC_ID_WMV3 }, ++ { VLC_CODEC_WMVP, AV_CODEC_ID_WMV3 }, ++ { VLC_CODEC_LOCO, AV_CODEC_ID_LOCO }, ++ { VLC_CODEC_WNV1, AV_CODEC_ID_WNV1 }, ++ { VLC_CODEC_AASC, AV_CODEC_ID_AASC }, ++ { VLC_CODEC_INDEO2, AV_CODEC_ID_INDEO2 }, ++ { VLC_CODEC_FRAPS, AV_CODEC_ID_FRAPS }, ++ { VLC_CODEC_TRUEMOTION2, AV_CODEC_ID_TRUEMOTION2 }, ++ { VLC_CODEC_BMP, AV_CODEC_ID_BMP }, ++ { VLC_CODEC_CSCD, AV_CODEC_ID_CSCD }, ++ { VLC_CODEC_MMVIDEO, AV_CODEC_ID_MMVIDEO }, ++ { VLC_CODEC_ZMBV, AV_CODEC_ID_ZMBV }, ++ { VLC_CODEC_AVS, AV_CODEC_ID_AVS }, ++ { VLC_CODEC_SMACKVIDEO, AV_CODEC_ID_SMACKVIDEO }, ++ { VLC_CODEC_NUV, AV_CODEC_ID_NUV }, ++ { VLC_CODEC_KMVC, AV_CODEC_ID_KMVC }, ++ { VLC_CODEC_FLASHSV, AV_CODEC_ID_FLASHSV }, ++ { VLC_CODEC_CAVS, AV_CODEC_ID_CAVS }, ++ { VLC_CODEC_JPEG2000, AV_CODEC_ID_JPEG2000 }, ++ { VLC_CODEC_VMNC, AV_CODEC_ID_VMNC }, ++ { VLC_CODEC_VP5, AV_CODEC_ID_VP5 }, ++ { VLC_CODEC_VP6, AV_CODEC_ID_VP6 }, ++ { VLC_CODEC_VP6F, AV_CODEC_ID_VP6F }, ++ { VLC_CODEC_TARGA, AV_CODEC_ID_TARGA }, ++ { VLC_CODEC_DSICINVIDEO, AV_CODEC_ID_DSICINVIDEO }, ++ { VLC_CODEC_TIERTEXSEQVIDEO, AV_CODEC_ID_TIERTEXSEQVIDEO }, ++ { VLC_CODEC_TIFF, AV_CODEC_ID_TIFF }, ++ { VLC_CODEC_GIF, AV_CODEC_ID_GIF }, ++ { VLC_CODEC_DXA, AV_CODEC_ID_DXA }, ++ { VLC_CODEC_DNXHD, AV_CODEC_ID_DNXHD }, ++ { VLC_CODEC_THP, AV_CODEC_ID_THP }, ++ { VLC_CODEC_SGI, AV_CODEC_ID_SGI }, ++ { VLC_CODEC_C93, AV_CODEC_ID_C93 }, ++ { VLC_CODEC_BETHSOFTVID, AV_CODEC_ID_BETHSOFTVID }, ++ /* AV_CODEC_ID_PTX */ ++ { VLC_CODEC_TXD, AV_CODEC_ID_TXD }, ++ { VLC_CODEC_VP6A, AV_CODEC_ID_VP6A }, ++ { VLC_CODEC_AMV, AV_CODEC_ID_AMV }, ++ { VLC_CODEC_VB, AV_CODEC_ID_VB }, ++ { VLC_CODEC_PCX, AV_CODEC_ID_PCX }, ++ /* AV_CODEC_ID_SUNRAST */ ++ { VLC_CODEC_INDEO4, AV_CODEC_ID_INDEO4 }, ++ { VLC_CODEC_INDEO5, AV_CODEC_ID_INDEO5 }, ++ { VLC_CODEC_MIMIC, AV_CODEC_ID_MIMIC }, ++ { VLC_CODEC_RL2, AV_CODEC_ID_RL2 }, ++ { VLC_CODEC_ESCAPE124, AV_CODEC_ID_ESCAPE124 }, ++ { VLC_CODEC_DIRAC, AV_CODEC_ID_DIRAC }, ++ { VLC_CODEC_BFI, AV_CODEC_ID_BFI }, ++ { VLC_CODEC_CMV, AV_CODEC_ID_CMV }, ++ { VLC_CODEC_MOTIONPIXELS, AV_CODEC_ID_MOTIONPIXELS }, ++ { VLC_CODEC_TGV, AV_CODEC_ID_TGV }, ++ { VLC_CODEC_TGQ, AV_CODEC_ID_TGQ }, ++ { VLC_CODEC_TQI, AV_CODEC_ID_TQI }, ++ { VLC_CODEC_AURA, AV_CODEC_ID_AURA }, ++ /* AV_CODEC_ID_AURA2 */ ++ /* AV_CODEC_ID_V210X */ ++ { VLC_CODEC_TMV, AV_CODEC_ID_TMV }, ++ { VLC_CODEC_V210, AV_CODEC_ID_V210 }, ++ /* AV_CODEC_ID_DPX */ ++ { VLC_CODEC_MAD, AV_CODEC_ID_MAD }, ++ { VLC_CODEC_FRWU, AV_CODEC_ID_FRWU }, ++ { VLC_CODEC_FLASHSV2, AV_CODEC_ID_FLASHSV2 }, ++ /* AV_CODEC_ID_CDGRAPHICS */ ++ /* AV_CODEC_ID_R210 */ ++ { VLC_CODEC_ANM, AV_CODEC_ID_ANM }, ++ { VLC_CODEC_BINKVIDEO, AV_CODEC_ID_BINKVIDEO }, ++ /* AV_CODEC_ID_IFF_ILBM */ ++ /* AV_CODEC_ID_IFF_BYTERUN1 */ ++ { VLC_CODEC_KGV1, AV_CODEC_ID_KGV1 }, ++ { VLC_CODEC_YOP, AV_CODEC_ID_YOP }, ++ { VLC_CODEC_VP8, AV_CODEC_ID_VP8 }, ++ /* AV_CODEC_ID_PICTOR */ ++ /* AV_CODEC_ID_ANSI */ ++ /* AV_CODEC_ID_A64_MULTI */ ++ /* AV_CODEC_ID_A64_MULTI5 */ ++ /* AV_CODEC_ID_R10K */ ++ { VLC_CODEC_MXPEG, AV_CODEC_ID_MXPEG }, ++ { VLC_CODEC_LAGARITH, AV_CODEC_ID_LAGARITH }, ++ { VLC_CODEC_PRORES, AV_CODEC_ID_PRORES }, ++ { VLC_CODEC_JV, AV_CODEC_ID_JV }, ++ { VLC_CODEC_DFA, AV_CODEC_ID_DFA }, ++ { VLC_CODEC_WMVP, AV_CODEC_ID_WMV3IMAGE }, ++ { VLC_CODEC_WMVP2, AV_CODEC_ID_VC1IMAGE }, ++ { VLC_CODEC_UTVIDEO, AV_CODEC_ID_UTVIDEO }, ++ { VLC_CODEC_BMVVIDEO, AV_CODEC_ID_BMV_VIDEO }, ++ { VLC_CODEC_VBLE, AV_CODEC_ID_VBLE }, ++ { VLC_CODEC_DXTORY, AV_CODEC_ID_DXTORY }, ++ /* AV_CODEC_ID_V410 */ ++ /* AV_CODEC_ID_XWD */ ++ { VLC_CODEC_CDXL, AV_CODEC_ID_CDXL }, ++ /* AV_CODEC_ID_XBM */ ++ /* AV_CODEC_ID_ZEROCODEC */ ++ { VLC_CODEC_MSS1, AV_CODEC_ID_MSS1 }, ++ { VLC_CODEC_MSA1, AV_CODEC_ID_MSA1 }, ++ { VLC_CODEC_TSC2, AV_CODEC_ID_TSCC2 }, ++ { VLC_CODEC_MTS2, AV_CODEC_ID_MTS2 }, ++ { VLC_CODEC_CLLC, AV_CODEC_ID_CLLC }, ++ { VLC_CODEC_MSS2, AV_CODEC_ID_MSS2 }, ++ { VLC_CODEC_VP9, AV_CODEC_ID_VP9 }, ++#if LIBAVCODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) ++ { VLC_CODEC_AV1, AV_CODEC_ID_AV1 }, ++#endif ++ { VLC_CODEC_ICOD, AV_CODEC_ID_AIC }, ++ /* AV_CODEC_ID_ESCAPE130 */ ++ { VLC_CODEC_G2M4, AV_CODEC_ID_G2M }, ++ { VLC_CODEC_G2M2, AV_CODEC_ID_G2M }, ++ { VLC_CODEC_G2M3, AV_CODEC_ID_G2M }, ++ /* AV_CODEC_ID_WEBP */ ++ { VLC_CODEC_HNM4_VIDEO, AV_CODEC_ID_HNM4_VIDEO }, ++ { VLC_CODEC_HEVC, AV_CODEC_ID_HEVC }, ++ ++ { VLC_CODEC_FIC , AV_CODEC_ID_FIC }, ++ /* AV_CODEC_ID_ALIAS_PIX */ ++ /* AV_CODEC_ID_BRENDER_PIX */ ++ /* AV_CODEC_ID_PAF_VIDEO */ ++ /* AV_CODEC_ID_EXR */ ++ ++ { VLC_CODEC_VP7 , AV_CODEC_ID_VP7 }, ++ /* AV_CODEC_ID_SANM */ ++ /* AV_CODEC_ID_SGIRLE */ ++ /* AV_CODEC_ID_MVC1 */ ++ /* AV_CODEC_ID_MVC2 */ ++ { VLC_CODEC_HQX, AV_CODEC_ID_HQX }, ++ ++ { VLC_CODEC_TDSC, AV_CODEC_ID_TDSC }, ++ ++ { VLC_CODEC_HQ_HQA, AV_CODEC_ID_HQ_HQA }, ++ ++ { VLC_CODEC_HAP, AV_CODEC_ID_HAP }, ++ /* AV_CODEC_ID_DDS */ ++ ++ { VLC_CODEC_DXV, AV_CODEC_ID_DXV }, ++ ++ /* ffmpeg only: AV_CODEC_ID_BRENDER_PIX */ ++ /* ffmpeg only: AV_CODEC_ID_Y41P */ ++ /* ffmpeg only: AV_CODEC_ID_EXR */ ++ /* ffmpeg only: AV_CODEC_ID_AVRP */ ++ /* ffmpeg only: AV_CODEC_ID_012V */ ++ /* ffmpeg only: AV_CODEC_ID_AVUI */ ++ /* ffmpeg only: AV_CODEC_ID_AYUV */ ++ /* ffmpeg only: AV_CODEC_ID_TARGA_Y216 */ ++ /* ffmpeg only: AV_CODEC_ID_V308 */ ++ /* ffmpeg only: AV_CODEC_ID_V408 */ ++ /* ffmpeg only: AV_CODEC_ID_YUV4 */ ++ /* ffmpeg only: AV_CODEC_ID_SANM */ ++ /* ffmpeg only: AV_CODEC_ID_PAF_VIDEO */ ++ /* ffmpeg only: AV_CODEC_ID_AVRN */ ++ /* ffmpeg only: AV_CODEC_ID_CPIA */ ++ /* ffmpeg only: AV_CODEC_ID_XFACE */ ++ /* ffmpeg only: AV_CODEC_ID_SGIRLE */ ++ /* ffmpeg only: AV_CODEC_ID_MVC1 */ ++ /* ffmpeg only: AV_CODEC_ID_MVC2 */ ++ /* ffmpeg only: AV_CODEC_ID_SNOW */ ++ /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ ++ ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) ++ { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, ++#endif ++ ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) ++ { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, ++#endif ++ ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) ++ { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, ++#endif ++ ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) ++ { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, ++#endif ++}; ++ ++/* ++ * Audio Codecs ++ */ ++static const struct vlc_avcodec_fourcc audio_codecs[] = ++{ ++ /* PCM */ ++ { VLC_CODEC_S16L, AV_CODEC_ID_PCM_S16LE }, ++ { VLC_CODEC_S16B, AV_CODEC_ID_PCM_S16BE }, ++ { VLC_CODEC_U16L, AV_CODEC_ID_PCM_U16LE }, ++ { VLC_CODEC_U16B, AV_CODEC_ID_PCM_U16BE }, ++ { VLC_CODEC_S8, AV_CODEC_ID_PCM_S8 }, ++ { VLC_CODEC_U8, AV_CODEC_ID_PCM_U8 }, ++ { VLC_CODEC_MULAW, AV_CODEC_ID_PCM_MULAW }, ++ { VLC_CODEC_ALAW, AV_CODEC_ID_PCM_ALAW }, ++ { VLC_CODEC_S32L, AV_CODEC_ID_PCM_S32LE }, ++ { VLC_CODEC_S32B, AV_CODEC_ID_PCM_S32BE }, ++ { VLC_CODEC_U32L, AV_CODEC_ID_PCM_U32LE }, ++ { VLC_CODEC_U32B, AV_CODEC_ID_PCM_U32BE }, ++ { VLC_CODEC_S24L, AV_CODEC_ID_PCM_S24LE }, ++ { VLC_CODEC_S24B, AV_CODEC_ID_PCM_S24BE }, ++ { VLC_CODEC_U24L, AV_CODEC_ID_PCM_U24LE }, ++ { VLC_CODEC_U24B, AV_CODEC_ID_PCM_U24BE }, ++ { VLC_CODEC_S24DAUD, AV_CODEC_ID_PCM_S24DAUD }, ++ /* AV_CODEC_ID_PCM_ZORK */ ++ { VLC_CODEC_S16L_PLANAR, AV_CODEC_ID_PCM_S16LE_PLANAR }, ++ /* AV_CODEC_ID_PCM_DVD */ ++ { VLC_CODEC_F32B, AV_CODEC_ID_PCM_F32BE }, ++ { VLC_CODEC_F32L, AV_CODEC_ID_PCM_F32LE }, ++ { VLC_CODEC_F64B, AV_CODEC_ID_PCM_F64BE }, ++ { VLC_CODEC_F64L, AV_CODEC_ID_PCM_F64LE }, ++ { VLC_CODEC_BD_LPCM, AV_CODEC_ID_PCM_BLURAY }, ++ /* AV_CODEC_ID_PCM_LXF */ ++ /* AV_CODEC_ID_S302M */ ++ /* AV_CODEC_ID_PCM_S8_PLANAR */ ++ /* AV_CODEC_ID_PCM_S24LE_PLANAR */ ++ /* AV_CODEC_ID_PCM_S32LE_PLANAR */ ++ /* ffmpeg only: AV_CODEC_ID_PCM_S16BE_PLANAR */ ++ ++ /* ADPCM */ ++ { VLC_CODEC_ADPCM_IMA_QT, AV_CODEC_ID_ADPCM_IMA_QT }, ++ { VLC_CODEC_ADPCM_IMA_WAV, AV_CODEC_ID_ADPCM_IMA_WAV }, ++ /* AV_CODEC_ID_ADPCM_IMA_DK3 */ ++ /* AV_CODEC_ID_ADPCM_IMA_DK4 */ ++ { VLC_CODEC_ADPCM_IMA_WS, AV_CODEC_ID_ADPCM_IMA_WS }, ++ /* AV_CODEC_ID_ADPCM_IMA_SMJPEG */ ++ { VLC_CODEC_ADPCM_MS, AV_CODEC_ID_ADPCM_MS }, ++ { VLC_CODEC_ADPCM_4XM, AV_CODEC_ID_ADPCM_4XM }, ++ { VLC_CODEC_ADPCM_XA, AV_CODEC_ID_ADPCM_XA }, ++ { VLC_CODEC_ADPCM_ADX, AV_CODEC_ID_ADPCM_ADX }, ++ { VLC_CODEC_ADPCM_EA, AV_CODEC_ID_ADPCM_EA }, ++ { VLC_CODEC_ADPCM_G726, AV_CODEC_ID_ADPCM_G726 }, ++ { VLC_CODEC_ADPCM_CREATIVE, AV_CODEC_ID_ADPCM_CT }, ++ { VLC_CODEC_ADPCM_SWF, AV_CODEC_ID_ADPCM_SWF }, ++ { VLC_CODEC_ADPCM_YAMAHA, AV_CODEC_ID_ADPCM_YAMAHA }, ++ { VLC_CODEC_ADPCM_SBPRO_4, AV_CODEC_ID_ADPCM_SBPRO_4 }, ++ { VLC_CODEC_ADPCM_SBPRO_3, AV_CODEC_ID_ADPCM_SBPRO_3 }, ++ { VLC_CODEC_ADPCM_SBPRO_2, AV_CODEC_ID_ADPCM_SBPRO_2 }, ++ { VLC_CODEC_ADPCM_THP, AV_CODEC_ID_ADPCM_THP }, ++ { VLC_CODEC_ADPCM_IMA_AMV, AV_CODEC_ID_ADPCM_IMA_AMV }, ++ { VLC_CODEC_ADPCM_EA_R1, AV_CODEC_ID_ADPCM_EA_R1 }, ++ /* AV_CODEC_ID_ADPCM_EA_R3 */ ++ /* AV_CODEC_ID_ADPCM_EA_R2 */ ++ { VLC_CODEC_ADPCM_IMA_EA_SEAD, AV_CODEC_ID_ADPCM_IMA_EA_SEAD }, ++ /* AV_CODEC_ID_ADPCM_IMA_EA_EACS */ ++ /* AV_CODEC_ID_ADPCM_EA_XAS */ ++ /* AV_CODEC_ID_ADPCM_EA_MAXIS_XA */ ++ /* AV_CODEC_ID_ADPCM_IMA_ISS */ ++ { VLC_CODEC_ADPCM_G722, AV_CODEC_ID_ADPCM_G722 }, ++ { VLC_CODEC_ADPCM_IMA_APC, AV_CODEC_ID_ADPCM_IMA_APC }, ++ /* ffmpeg only: AV_CODEC_ID_VIMA */ ++ /* ffmpeg only: AV_CODEC_ID_ADPCM_AFC */ ++ /* ffmpeg only: AV_CODEC_ID_ADPCM_IMA_OKI */ ++ /* ffmpeg only: AV_CODEC_ID_ADPCM_DTK */ ++ /* ffmpeg only: AV_CODEC_ID_ADPCM_IMA_RAD */ ++ /* ffmpeg only: AV_CODEC_ID_ADPCM_G726LE */ ++ ++ /* AMR */ ++ { VLC_CODEC_AMR_NB, AV_CODEC_ID_AMR_NB }, ++ { VLC_CODEC_AMR_WB, AV_CODEC_ID_AMR_WB }, ++ ++ /* RealAudio */ ++ { VLC_CODEC_RA_144, AV_CODEC_ID_RA_144 }, ++ { VLC_CODEC_RA_288, AV_CODEC_ID_RA_288 }, ++ ++ /* DPCM */ ++ { VLC_CODEC_ROQ_DPCM, AV_CODEC_ID_ROQ_DPCM }, ++ { VLC_CODEC_INTERPLAY_DPCM, AV_CODEC_ID_INTERPLAY_DPCM }, ++ /* AV_CODEC_ID_XAN_DPCM */ ++ /* AV_CODEC_ID_SOL_DPCM */ ++ ++ /* audio codecs */ ++ { VLC_CODEC_MPGA, AV_CODEC_ID_MP2 }, ++ { VLC_CODEC_MP2, AV_CODEC_ID_MP2 }, ++ { VLC_CODEC_MP3, AV_CODEC_ID_MP3 }, ++ { VLC_CODEC_MP4A, AV_CODEC_ID_AAC }, ++ { VLC_CODEC_A52, AV_CODEC_ID_AC3 }, ++ { VLC_CODEC_DTS, AV_CODEC_ID_DTS }, ++ { VLC_CODEC_VORBIS, AV_CODEC_ID_VORBIS }, ++ { VLC_CODEC_DVAUDIO, AV_CODEC_ID_DVAUDIO }, ++ { VLC_CODEC_WMA1, AV_CODEC_ID_WMAV1 }, ++ { VLC_CODEC_WMA2, AV_CODEC_ID_WMAV2 }, ++ { VLC_CODEC_MACE3, AV_CODEC_ID_MACE3 }, ++ { VLC_CODEC_MACE6, AV_CODEC_ID_MACE6 }, ++ { VLC_CODEC_VMDAUDIO, AV_CODEC_ID_VMDAUDIO }, ++ { VLC_CODEC_FLAC, AV_CODEC_ID_FLAC }, ++ /* AV_CODEC_ID_MP3ADU */ ++ /* AV_CODEC_ID_MP3ON4 */ ++ { VLC_CODEC_SHORTEN, AV_CODEC_ID_SHORTEN }, ++ { VLC_CODEC_ALAC, AV_CODEC_ID_ALAC }, ++ /* AV_CODEC_ID_WESTWOOD_SND1 */ ++ { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, ++ { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++ { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, ++#endif ++ { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, ++ { VLC_CODEC_TRUESPEECH, AV_CODEC_ID_TRUESPEECH }, ++ { VLC_CODEC_TTA, AV_CODEC_ID_TTA }, ++ { VLC_CODEC_SMACKAUDIO, AV_CODEC_ID_SMACKAUDIO }, ++ { VLC_CODEC_QCELP, AV_CODEC_ID_QCELP }, ++ { VLC_CODEC_WAVPACK, AV_CODEC_ID_WAVPACK }, ++ { VLC_CODEC_DSICINAUDIO, AV_CODEC_ID_DSICINAUDIO }, ++ { VLC_CODEC_IMC, AV_CODEC_ID_IMC }, ++ { VLC_CODEC_MUSEPACK7, AV_CODEC_ID_MUSEPACK7 }, ++ { VLC_CODEC_MLP, AV_CODEC_ID_MLP }, ++ { VLC_CODEC_GSM_MS, AV_CODEC_ID_GSM_MS }, ++ { VLC_CODEC_ATRAC3, AV_CODEC_ID_ATRAC3 }, ++ { VLC_CODEC_APE, AV_CODEC_ID_APE }, ++ { VLC_CODEC_NELLYMOSER, AV_CODEC_ID_NELLYMOSER }, ++ { VLC_CODEC_MUSEPACK8, AV_CODEC_ID_MUSEPACK8 }, ++ { VLC_CODEC_SPEEX, AV_CODEC_ID_SPEEX }, ++ { VLC_CODEC_WMAS, AV_CODEC_ID_WMAVOICE }, ++ { VLC_CODEC_WMAP, AV_CODEC_ID_WMAPRO }, ++ { VLC_CODEC_WMAL, AV_CODEC_ID_WMALOSSLESS }, ++ { VLC_CODEC_ATRAC3P, AV_CODEC_ID_ATRAC3P }, ++ { VLC_CODEC_EAC3, AV_CODEC_ID_EAC3 }, ++ { VLC_CODEC_SIPR, AV_CODEC_ID_SIPR }, ++ /* AV_CODEC_ID_MP1 */ ++ { VLC_CODEC_TWINVQ, AV_CODEC_ID_TWINVQ }, ++ { VLC_CODEC_TRUEHD, AV_CODEC_ID_TRUEHD }, ++ { VLC_CODEC_ALS, AV_CODEC_ID_MP4ALS }, ++ { VLC_CODEC_ATRAC1, AV_CODEC_ID_ATRAC1 }, ++ { VLC_CODEC_BINKAUDIO_RDFT, AV_CODEC_ID_BINKAUDIO_RDFT }, ++ { VLC_CODEC_BINKAUDIO_DCT, AV_CODEC_ID_BINKAUDIO_DCT }, ++ { VLC_CODEC_MP4A, AV_CODEC_ID_AAC_LATM }, ++ /* AV_CODEC_ID_QDMC */ ++ /* AV_CODEC_ID_CELT */ ++ { VLC_CODEC_G723_1, AV_CODEC_ID_G723_1 }, ++ /* AV_CODEC_ID_G729 */ ++ /* AV_CODEC_ID_8SVX_EXP */ ++ /* AV_CODEC_ID_8SVX_FIB */ ++ { VLC_CODEC_BMVAUDIO, AV_CODEC_ID_BMV_AUDIO }, ++ { VLC_CODEC_RALF, AV_CODEC_ID_RALF }, ++ { VLC_CODEC_INDEO_AUDIO, AV_CODEC_ID_IAC }, ++ /* AV_CODEC_ID_ILBC */ ++ { VLC_CODEC_OPUS, AV_CODEC_ID_OPUS }, ++ /* AV_CODEC_ID_COMFORT_NOISE */ ++ { VLC_CODEC_TAK, AV_CODEC_ID_TAK }, ++ { VLC_CODEC_METASOUND, AV_CODEC_ID_METASOUND }, ++ /* AV_CODEC_ID_PAF_AUDIO */ ++ { VLC_CODEC_ON2AVC, AV_CODEC_ID_ON2AVC }, ++ ++ /* ffmpeg only: AV_CODEC_ID_FFWAVESYNTH */ ++ /* ffmpeg only: AV_CODEC_ID_SONIC */ ++ /* ffmpeg only: AV_CODEC_ID_SONIC_LS */ ++ /* ffmpeg only: AV_CODEC_ID_PAF_AUDIO */ ++ /* ffmpeg only: AV_CODEC_ID_EVRC */ ++ /* ffmpeg only: AV_CODEC_ID_SMV */ ++}; ++ ++/* Subtitle streams */ ++static const struct vlc_avcodec_fourcc spu_codecs[] = ++{ ++ { VLC_CODEC_SPU, AV_CODEC_ID_DVD_SUBTITLE }, ++ { VLC_CODEC_DVBS, AV_CODEC_ID_DVB_SUBTITLE }, ++ { VLC_CODEC_SUBT, AV_CODEC_ID_TEXT }, ++ { VLC_CODEC_XSUB, AV_CODEC_ID_XSUB }, ++ { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, ++ /* AV_CODEC_ID_MOV_TEXT */ ++ { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, ++#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) ++ { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, ++#endif ++ { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, ++ /* AV_CODEC_ID_SRT */ ++ /* ffmpeg only: AV_CODEC_ID_MICRODVD */ ++ /* ffmpeg only: AV_CODEC_ID_EIA_608 */ ++ /* ffmpeg only: AV_CODEC_ID_JACOSUB */ ++ /* ffmpeg only: AV_CODEC_ID_SAMI */ ++ /* ffmpeg only: AV_CODEC_ID_REALTEXT */ ++ /* ffmpeg only: AV_CODEC_ID_SUBVIEWER1 */ ++ /* ffmpeg only: AV_CODEC_ID_SUBVIEWER */ ++ /* ffmpeg only: AV_CODEC_ID_SUBRIP */ ++ /* ffmpeg only: AV_CODEC_ID_WEBVTT */ ++ /* ffmpeg only: AV_CODEC_ID_MPL2 */ ++ /* ffmpeg only: AV_CODEC_ID_VPLAYER */ ++ /* ffmpeg only: AV_CODEC_ID_PJS */ ++ /* ffmpeg only: AV_CODEC_ID_ASS */ ++}; ++ ++static bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc, ++ unsigned *pi_ffmpeg_codec, const char **ppsz_name ) ++{ ++ const struct vlc_avcodec_fourcc *base; ++ size_t count; ++ ++ switch( cat ) ++ { ++ case VIDEO_ES: ++ base = video_codecs; ++ count = ARRAY_SIZE(video_codecs); ++ break; ++ case AUDIO_ES: ++ base = audio_codecs; ++ count = ARRAY_SIZE(audio_codecs); ++ break; ++ case SPU_ES: ++ base = spu_codecs; ++ count = ARRAY_SIZE(spu_codecs); ++ break; ++ default: ++ base = NULL; ++ count = 0; ++ } ++ ++ i_fourcc = vlc_fourcc_GetCodec( cat, i_fourcc ); ++ ++ for( size_t i = 0; i < count; i++ ) ++ { ++ if( base[i].i_fourcc == i_fourcc ) ++ { ++ if( pi_ffmpeg_codec != NULL ) ++ *pi_ffmpeg_codec = base[i].i_codec; ++ if( ppsz_name ) ++ *ppsz_name = vlc_fourcc_GetDescription( cat, i_fourcc ); ++ return true; ++ } ++ } ++ return false; ++} ++ ++/***************************************************************************** ++ * Chroma fourcc -> libavutil pixfmt mapping ++ *****************************************************************************/ ++#if defined(WORDS_BIGENDIAN) ++# define VLC_RGB_ES( fcc, leid, beid ) \ ++ { fcc, beid, 0, 0, 0 }, ++#else ++# define VLC_RGB_ES( fcc, leid, beid ) \ ++ { fcc, leid, 0, 0, 0 }, ++#endif ++ ++#define VLC_RGB( fcc, leid, beid, rmask, gmask, bmask ) \ ++ { fcc, leid, rmask, gmask, bmask }, \ ++ { fcc, beid, bmask, gmask, rmask }, \ ++ VLC_RGB_ES( fcc, leid, beid ) ++ ++ ++static const struct ++{ ++ vlc_fourcc_t i_chroma; ++ int i_chroma_id; ++ uint32_t i_rmask; ++ uint32_t i_gmask; ++ uint32_t i_bmask; ++ ++} chroma_table[] = ++{ ++ // Sand ++// {VLC_CODEC_MMAL_OPAQUE, AV_PIX_FMT_SAND128, 0, 0, 0 }, ++ {VLC_CODEC_MMAL_ZC_SAND8, AV_PIX_FMT_SAND128, 0, 0, 0 }, ++ {VLC_CODEC_MMAL_ZC_SAND10, AV_PIX_FMT_SAND64_10, 0, 0, 0 }, ++ ++ /* Planar YUV formats */ ++ {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 }, ++ {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 }, ++ {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 }, ++ {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 }, ++ {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 }, ++ {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 }, ++ {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 }, ++ ++ {VLC_CODEC_NV12, AV_PIX_FMT_NV12, 0, 0, 0 }, ++ {VLC_CODEC_NV21, AV_PIX_FMT_NV21, 0, 0, 0 }, ++ ++ {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++ {VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 }, ++#endif ++ {VLC_CODEC_I420_16L, AV_PIX_FMT_YUV420P16LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_16B, AV_PIX_FMT_YUV420P16BE, 0, 0, 0 }, ++#ifdef AV_PIX_FMT_P010 ++ {VLC_CODEC_P010, AV_PIX_FMT_P010, 0, 0, 0 }, ++#endif ++ ++ {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++ {VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 }, ++ {VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 }, ++#endif ++ ++ {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 }, ++ {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 }, ++ {VLC_CODEC_YUVA, AV_PIX_FMT_YUVA444P, 0, 0, 0 }, ++ ++ {VLC_CODEC_YUVA_444_10L, AV_PIX_FMT_YUVA444P10LE, 0, 0, 0 }, ++ {VLC_CODEC_YUVA_444_10B, AV_PIX_FMT_YUVA444P10BE, 0, 0, 0 }, ++ ++ {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) ++ {VLC_CODEC_I444_12L, AV_PIX_FMT_YUV444P12LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_12B, AV_PIX_FMT_YUV444P12BE, 0, 0, 0 }, ++#endif ++ {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 }, ++ ++ /* Packed YUV formats */ ++ {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 }, ++ {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 }, ++ {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 }, ++ {VLC_CODEC_YVYU, AV_PIX_FMT_YVYU422, 0, 0, 0 }, ++ {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 }, ++ ++ /* Packed RGB formats */ ++ VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) ++ VLC_RGB( VLC_CODEC_RGB8, AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) ++ ++ VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) ++ VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) ++ VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, 0xff0000, 0x00ff00, 0x0000ff ) ++ ++ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) ++ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) ++ ++#ifdef AV_PIX_FMT_0BGR32 ++ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) ++#endif ++ ++ {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, ++ {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, ++ {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 }, ++ {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0}, ++ ++ /* Paletized RGB */ ++ {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0}, ++ ++ {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 }, ++ {VLC_CODEC_GBR_PLANAR_9L, AV_PIX_FMT_GBRP9LE, 0, 0, 0 }, ++ {VLC_CODEC_GBR_PLANAR_9B, AV_PIX_FMT_GBRP9BE, 0, 0, 0 }, ++ {VLC_CODEC_GBR_PLANAR_10L, AV_PIX_FMT_GBRP10LE, 0, 0, 0 }, ++ {VLC_CODEC_GBR_PLANAR_10B, AV_PIX_FMT_GBRP10BE, 0, 0, 0 }, ++ ++ /* XYZ */ ++#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100) ++ {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0}, ++#endif ++ { 0, 0, 0, 0, 0 } ++}; ++ ++static int GetVlcChroma( video_format_t *fmt, int i_ffmpeg_chroma ) ++{ ++ /* TODO FIXME for rgb format we HAVE to set rgb mask/shift */ ++ for( int i = 0; chroma_table[i].i_chroma != 0; i++ ) ++ { ++ if( chroma_table[i].i_chroma_id == i_ffmpeg_chroma ) ++ { ++ fmt->i_rmask = chroma_table[i].i_rmask; ++ fmt->i_gmask = chroma_table[i].i_gmask; ++ fmt->i_bmask = chroma_table[i].i_bmask; ++ fmt->i_chroma = chroma_table[i].i_chroma; ++ return VLC_SUCCESS; ++ } ++ } ++ return VLC_EGENERIC; ++} ++ ++//#include "../codec/cc.h" ++ ++static AVCodecContext *ffmpeg_AllocContext( decoder_t *p_dec, ++ const AVCodec **restrict codecp ) ++{ ++ unsigned i_codec_id; ++ const char *psz_namecodec; ++ const AVCodec *p_codec = NULL; ++ ++ /* *** determine codec type *** */ ++ if( !GetFfmpegCodec( p_dec->fmt_in.i_cat, p_dec->fmt_in.i_codec, ++ &i_codec_id, &psz_namecodec ) ) ++ return NULL; ++ ++ msg_Dbg( p_dec, "using %s %s", AVPROVIDER(LIBAVCODEC), LIBAVCODEC_IDENT ); ++ ++ /* Initialization must be done before avcodec_find_decoder() */ ++ vlc_init_avcodec(VLC_OBJECT(p_dec)); ++ ++ /* *** ask ffmpeg for a decoder *** */ ++ char *psz_decoder = var_InheritString( p_dec, "avcodec-codec" ); ++ if( psz_decoder != NULL ) ++ { ++ p_codec = avcodec_find_decoder_by_name( psz_decoder ); ++ if( !p_codec ) ++ msg_Err( p_dec, "Decoder `%s' not found", psz_decoder ); ++ else if( p_codec->id != i_codec_id ) ++ { ++ msg_Err( p_dec, "Decoder `%s' can't handle %4.4s", ++ psz_decoder, (char*)&p_dec->fmt_in.i_codec ); ++ p_codec = NULL; ++ } ++ free( psz_decoder ); ++ } ++ if( !p_codec ) ++ p_codec = avcodec_find_decoder( i_codec_id ); ++ if( !p_codec ) ++ { ++ msg_Dbg( p_dec, "codec not found (%s)", psz_namecodec ); ++ return NULL; ++ } ++ ++ *codecp = p_codec; ++ ++ /* *** get a p_context *** */ ++ AVCodecContext *avctx = avcodec_alloc_context3(p_codec); ++ if( unlikely(avctx == NULL) ) ++ return NULL; ++ ++ avctx->debug = var_InheritInteger( p_dec, "avcodec-debug" ); ++ avctx->opaque = p_dec; ++ return avctx; ++} ++ ++static int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *ctx, ++ const AVCodec *codec ) ++{ ++ char *psz_opts = var_InheritString( p_dec, "avcodec-options" ); ++ AVDictionary *options = NULL; ++ int ret; ++ ++ if (psz_opts) { ++ vlc_av_get_options(psz_opts, &options); ++ free(psz_opts); ++ } ++ ++ if (av_rpi_zc_init(ctx) != 0) ++ { ++ msg_Err(p_dec, "Failed to init AV ZC"); ++ return VLC_EGENERIC; ++ } ++ ++ vlc_avcodec_lock(); ++ ret = avcodec_open2( ctx, codec, options ? &options : NULL ); ++ vlc_avcodec_unlock(); ++ ++ AVDictionaryEntry *t = NULL; ++ while ((t = av_dict_get(options, "", t, AV_DICT_IGNORE_SUFFIX))) { ++ msg_Err( p_dec, "Unknown option \"%s\"", t->key ); ++ } ++ av_dict_free(&options); ++ ++ if( ret < 0 ) ++ { ++ msg_Err( p_dec, "cannot start codec (%s)", codec->name ); ++ return VLC_EGENERIC; ++ } ++ ++ msg_Dbg( p_dec, "codec (%s) started", codec->name ); ++ return VLC_SUCCESS; ++} ++ ++ ++/***************************************************************************** ++ * decoder_sys_t : decoder descriptor ++ *****************************************************************************/ ++struct decoder_sys_t ++{ ++ AVCodecContext *p_context; ++ const AVCodec *p_codec; ++ ++ /* Video decoder specific part */ ++ date_t pts; ++ ++ /* Closed captions for decoders */ ++// cc_data_t cc; ++ ++ /* for frame skipping algo */ ++ bool b_hurry_up; ++ bool b_show_corrupted; ++ bool b_from_preroll; ++ enum AVDiscard i_skip_frame; ++ ++ /* how many decoded frames are late */ ++ int i_late_frames; ++ mtime_t i_late_frames_start; ++ mtime_t i_last_late_delay; ++ ++ /* for direct rendering */ ++ bool b_direct_rendering; ++ atomic_bool b_dr_failure; ++ ++ /* Hack to force display of still pictures */ ++ bool b_first_frame; ++ ++ ++ /* */ ++ bool palette_sent; ++ ++ /* VA API */ ++// vlc_va_t *p_va; ++ enum AVPixelFormat pix_fmt; ++ int profile; ++ int level; ++ ++ MMAL_POOL_T * out_pool; ++}; ++ ++/***************************************************************************** ++ * Local prototypes ++ *****************************************************************************/ ++static void ffmpeg_InitCodec ( decoder_t * ); ++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *, ++ const enum PixelFormat * ); ++static int DecodeVideo( decoder_t *, block_t * ); ++static void Flush( decoder_t * ); ++ ++static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc ) ++{ ++ uint8_t *p = (uint8_t*)&fcc; ++ return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); ++} ++ ++/***************************************************************************** ++ * Local Functions ++ *****************************************************************************/ ++ ++/** ++ * Sets the decoder output format. ++ */ ++static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt, ++ AVCodecContext *ctx, enum AVPixelFormat pix_fmt, ++ enum AVPixelFormat sw_pix_fmt) ++{ ++ int width = ctx->coded_width; ++ int height = ctx->coded_height; ++ ++ video_format_Init(fmt, 0); ++ ++ if (pix_fmt == sw_pix_fmt) ++ { /* software decoding */ ++ int aligns[AV_NUM_DATA_POINTERS]; ++ ++ if (GetVlcChroma(fmt, pix_fmt)) ++ return -1; ++ ++ /* The libavcodec palette can only be fetched when the first output ++ * frame is decoded. Assume that the current chroma is RGB32 while we ++ * are waiting for a valid palette. Indeed, fmt_out.video.p_palette ++ * doesn't trigger a new vout request, but a new chroma yes. */ ++ if (pix_fmt == AV_PIX_FMT_PAL8 && !dec->fmt_out.video.p_palette) ++ fmt->i_chroma = VLC_CODEC_RGB32; ++ ++ avcodec_align_dimensions2(ctx, &width, &height, aligns); ++ } ++// else /* hardware decoding */ ++// fmt->i_chroma = vlc_va_GetChroma(pix_fmt, sw_pix_fmt); ++ ++ if( width == 0 || height == 0 || width > 8192 || height > 8192 || ++ width < ctx->width || height < ctx->height ) ++ { ++ msg_Err(dec, "Invalid frame size %dx%d vsz %dx%d", ++ width, height, ctx->width, ctx->height ); ++ return -1; /* invalid display size */ ++ } ++ ++ fmt->i_width = width; ++ fmt->i_height = height; ++ fmt->i_visible_width = ctx->width; ++ fmt->i_visible_height = ctx->height; ++ ++ /* If an aspect-ratio was specified in the input format then force it */ ++ if (dec->fmt_in.video.i_sar_num > 0 && dec->fmt_in.video.i_sar_den > 0) ++ { ++ fmt->i_sar_num = dec->fmt_in.video.i_sar_num; ++ fmt->i_sar_den = dec->fmt_in.video.i_sar_den; ++ } ++ else ++ { ++ fmt->i_sar_num = ctx->sample_aspect_ratio.num; ++ fmt->i_sar_den = ctx->sample_aspect_ratio.den; ++ ++ if (fmt->i_sar_num == 0 || fmt->i_sar_den == 0) ++ fmt->i_sar_num = fmt->i_sar_den = 1; ++ } ++ ++ if (dec->fmt_in.video.i_frame_rate > 0 ++ && dec->fmt_in.video.i_frame_rate_base > 0) ++ { ++ fmt->i_frame_rate = dec->fmt_in.video.i_frame_rate; ++ fmt->i_frame_rate_base = dec->fmt_in.video.i_frame_rate_base; ++ } ++ else if (ctx->framerate.num > 0 && ctx->framerate.den > 0) ++ { ++ fmt->i_frame_rate = ctx->framerate.num; ++ fmt->i_frame_rate_base = ctx->framerate.den; ++# if LIBAVCODEC_VERSION_MICRO < 100 ++ // for some reason libav don't thinkg framerate presents actually same thing as in ffmpeg ++ fmt->i_frame_rate_base *= __MAX(ctx->ticks_per_frame, 1); ++# endif ++ } ++ else if (ctx->time_base.num > 0 && ctx->time_base.den > 0) ++ { ++ fmt->i_frame_rate = ctx->time_base.den; ++ fmt->i_frame_rate_base = ctx->time_base.num ++ * __MAX(ctx->ticks_per_frame, 1); ++ } ++ ++ if( ctx->color_range == AVCOL_RANGE_JPEG ) ++ fmt->b_color_range_full = true; ++ ++ switch( ctx->colorspace ) ++ { ++ case AVCOL_SPC_BT709: ++ fmt->space = COLOR_SPACE_BT709; ++ break; ++ case AVCOL_SPC_SMPTE170M: ++ case AVCOL_SPC_BT470BG: ++ fmt->space = COLOR_SPACE_BT601; ++ break; ++ case AVCOL_SPC_BT2020_NCL: ++ case AVCOL_SPC_BT2020_CL: ++ fmt->space = COLOR_SPACE_BT2020; ++ break; ++ default: ++ break; ++ } ++ ++ switch( ctx->color_trc ) ++ { ++ case AVCOL_TRC_LINEAR: ++ fmt->transfer = TRANSFER_FUNC_LINEAR; ++ break; ++ case AVCOL_TRC_GAMMA22: ++ fmt->transfer = TRANSFER_FUNC_SRGB; ++ break; ++ case AVCOL_TRC_BT709: ++ fmt->transfer = TRANSFER_FUNC_BT709; ++ break; ++ case AVCOL_TRC_SMPTE170M: ++ case AVCOL_TRC_BT2020_10: ++ case AVCOL_TRC_BT2020_12: ++ fmt->transfer = TRANSFER_FUNC_BT2020; ++ break; ++#if LIBAVUTIL_VERSION_CHECK( 55, 14, 0, 31, 100) ++ case AVCOL_TRC_ARIB_STD_B67: ++ fmt->transfer = TRANSFER_FUNC_ARIB_B67; ++ break; ++#endif ++#if LIBAVUTIL_VERSION_CHECK( 55, 17, 0, 37, 100) ++ case AVCOL_TRC_SMPTE2084: ++ fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084; ++ break; ++ case AVCOL_TRC_SMPTE240M: ++ fmt->transfer = TRANSFER_FUNC_SMPTE_240; ++ break; ++ case AVCOL_TRC_GAMMA28: ++ fmt->transfer = TRANSFER_FUNC_BT470_BG; ++ break; ++#endif ++ default: ++ break; ++ } ++ ++ switch( ctx->color_primaries ) ++ { ++ case AVCOL_PRI_BT709: ++ fmt->primaries = COLOR_PRIMARIES_BT709; ++ break; ++ case AVCOL_PRI_BT470BG: ++ fmt->primaries = COLOR_PRIMARIES_BT601_625; ++ break; ++ case AVCOL_PRI_SMPTE170M: ++ case AVCOL_PRI_SMPTE240M: ++ fmt->primaries = COLOR_PRIMARIES_BT601_525; ++ break; ++ case AVCOL_PRI_BT2020: ++ fmt->primaries = COLOR_PRIMARIES_BT2020; ++ break; ++ default: ++ break; ++ } ++ ++ switch( ctx->chroma_sample_location ) ++ { ++ case AVCHROMA_LOC_LEFT: ++ fmt->chroma_location = CHROMA_LOCATION_LEFT; ++ break; ++ case AVCHROMA_LOC_CENTER: ++ fmt->chroma_location = CHROMA_LOCATION_CENTER; ++ break; ++ case AVCHROMA_LOC_TOPLEFT: ++ fmt->chroma_location = CHROMA_LOCATION_TOP_LEFT; ++ break; ++ default: ++ break; ++ } ++ ++ return 0; ++} ++ ++static int lavc_UpdateVideoFormat(decoder_t *dec, AVCodecContext *ctx, ++ enum AVPixelFormat fmt, ++ enum AVPixelFormat swfmt) ++{ ++ video_format_t fmt_out; ++ int val; ++ ++ val = lavc_GetVideoFormat(dec, &fmt_out, ctx, fmt, swfmt); ++ if (val) ++ return val; ++ ++ /* always have date in fields/ticks units */ ++ if(dec->p_sys->pts.i_divider_num) ++ date_Change(&dec->p_sys->pts, fmt_out.i_frame_rate * ++ __MAX(ctx->ticks_per_frame, 1), ++ fmt_out.i_frame_rate_base); ++ else ++ date_Init(&dec->p_sys->pts, fmt_out.i_frame_rate * ++ __MAX(ctx->ticks_per_frame, 1), ++ fmt_out.i_frame_rate_base); ++ ++ fmt_out.p_palette = dec->fmt_out.video.p_palette; ++ dec->fmt_out.video.p_palette = NULL; ++ ++ es_format_Change(&dec->fmt_out, VIDEO_ES, fmt_out.i_chroma); ++ dec->fmt_out.video = fmt_out; ++ dec->fmt_out.video.orientation = dec->fmt_in.video.orientation; ++ dec->fmt_out.video.projection_mode = dec->fmt_in.video.projection_mode; ++ dec->fmt_out.video.multiview_mode = dec->fmt_in.video.multiview_mode; ++ dec->fmt_out.video.pose = dec->fmt_in.video.pose; ++ if ( dec->fmt_in.video.mastering.max_luminance ) ++ dec->fmt_out.video.mastering = dec->fmt_in.video.mastering; ++ dec->fmt_out.video.lighting = dec->fmt_in.video.lighting; ++ ++ return decoder_UpdateVideoFormat(dec); ++} ++ ++/***************************************************************************** ++ * Flush: ++ *****************************************************************************/ ++static void Flush( decoder_t *p_dec ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *p_context = p_sys->p_context; ++ ++ date_Set(&p_sys->pts, VLC_TS_INVALID); /* To make sure we recover properly */ ++ p_sys->i_late_frames = 0; ++// cc_Flush( &p_sys->cc ); ++ ++ /* Abort pictures in order to unblock all avcodec workers threads waiting ++ * for a picture. This will avoid a deadlock between avcodec_flush_buffers ++ * and workers threads */ ++ decoder_AbortPictures( p_dec, true ); ++ ++ /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */ ++ if( avcodec_is_open( p_context ) ) ++ avcodec_flush_buffers( p_context ); ++ ++ /* Reset cancel state to false */ ++ decoder_AbortPictures( p_dec, false ); ++} ++ ++static bool check_block_validity( decoder_sys_t *p_sys, block_t *block ) ++{ ++ if( !block) ++ return true; ++ ++ if( block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) ++ { ++ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ ++// cc_Flush( &p_sys->cc ); ++ ++ p_sys->i_late_frames = 0; ++ if( block->i_flags & BLOCK_FLAG_CORRUPTED ) ++ { ++ block_Release( block ); ++ return false; ++ } ++ } ++ return true; ++} ++ ++static bool check_block_being_late( decoder_sys_t *p_sys, block_t *block, mtime_t current_time) ++{ ++ if( !block ) ++ return false; ++ if( block->i_flags & BLOCK_FLAG_PREROLL ) ++ { ++ /* Do not care about late frames when prerolling ++ * TODO avoid decoding of non reference frame ++ * (ie all B except for H264 where it depends only on nal_ref_idc) */ ++ p_sys->i_late_frames = 0; ++ p_sys->b_from_preroll = true; ++ p_sys->i_last_late_delay = INT64_MAX; ++ } ++ ++ if( p_sys->i_late_frames <= 0 ) ++ return false; ++ ++ if( current_time - p_sys->i_late_frames_start > (5*CLOCK_FREQ)) ++ { ++ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ ++ block_Release( block ); ++ p_sys->i_late_frames--; ++ return true; ++ } ++ return false; ++} ++ ++static bool check_frame_should_be_dropped( decoder_sys_t *p_sys, AVCodecContext *p_context, bool *b_need_output_picture ) ++{ ++ if( p_sys->i_late_frames <= 4) ++ return false; ++ ++ *b_need_output_picture = false; ++ if( p_sys->i_late_frames < 12 ) ++ { ++ p_context->skip_frame = ++ (p_sys->i_skip_frame <= AVDISCARD_NONREF) ? ++ AVDISCARD_NONREF : p_sys->i_skip_frame; ++ } ++ else ++ { ++ /* picture too late, won't decode ++ * but break picture until a new I, and for mpeg4 ...*/ ++ p_sys->i_late_frames--; /* needed else it will never be decrease */ ++ return true; ++ } ++ return false; ++} ++ ++static void interpolate_next_pts( decoder_t *p_dec, AVFrame *frame ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *p_context = p_sys->p_context; ++ ++ if( date_Get( &p_sys->pts ) == VLC_TS_INVALID || ++ p_sys->pts.i_divider_num == 0 ) ++ return; ++ ++ int i_tick = p_context->ticks_per_frame; ++ if( i_tick <= 0 ) ++ i_tick = 1; ++ ++ /* interpolate the next PTS */ ++ date_Increment( &p_sys->pts, i_tick + frame->repeat_pict ); ++} ++ ++static void update_late_frame_count( decoder_t *p_dec, block_t *p_block, mtime_t current_time, mtime_t i_pts ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ /* Update frame late count (except when doing preroll) */ ++ mtime_t i_display_date = VLC_TS_INVALID; ++ if( !p_block || !(p_block->i_flags & BLOCK_FLAG_PREROLL) ) ++ i_display_date = decoder_GetDisplayDate( p_dec, i_pts ); ++ ++ if( i_display_date > VLC_TS_INVALID && i_display_date <= current_time ) ++ { ++ /* Out of preroll, consider only late frames on rising delay */ ++ if( p_sys->b_from_preroll ) ++ { ++ if( p_sys->i_last_late_delay > current_time - i_display_date ) ++ { ++ p_sys->i_last_late_delay = current_time - i_display_date; ++ return; ++ } ++ p_sys->b_from_preroll = false; ++ } ++ ++ p_sys->i_late_frames++; ++ if( p_sys->i_late_frames == 1 ) ++ p_sys->i_late_frames_start = current_time; ++ ++ } ++ else ++ { ++ p_sys->i_late_frames = 0; ++ } ++} ++ ++ ++static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_pic ) ++{ ++// decoder_sys_t *p_sys = p_dec->p_sys; ++ bool format_changed = false; ++ ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) ++#define FROM_AVRAT(default_factor, avrat) \ ++(uint64_t)(default_factor) * (avrat).num / (avrat).den ++ const AVFrameSideData *metadata = ++ av_frame_get_side_data( frame, ++ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA ); ++ if ( metadata ) ++ { ++ const AVMasteringDisplayMetadata *hdr_meta = ++ (const AVMasteringDisplayMetadata *) metadata->data; ++ if ( hdr_meta->has_luminance ) ++ { ++#define ST2086_LUMA_FACTOR 10000 ++ p_pic->format.mastering.max_luminance = ++ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->max_luminance); ++ p_pic->format.mastering.min_luminance = ++ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->min_luminance); ++ } ++ if ( hdr_meta->has_primaries ) ++ { ++#define ST2086_RED 2 ++#define ST2086_GREEN 0 ++#define ST2086_BLUE 1 ++#define LAV_RED 0 ++#define LAV_GREEN 1 ++#define LAV_BLUE 2 ++#define ST2086_PRIM_FACTOR 50000 ++ p_pic->format.mastering.primaries[ST2086_RED*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][0]); ++ p_pic->format.mastering.primaries[ST2086_RED*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][1]); ++ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][0]); ++ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][1]); ++ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][0]); ++ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][1]); ++ p_pic->format.mastering.white_point[0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[0]); ++ p_pic->format.mastering.white_point[1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[1]); ++ } ++ ++ if ( memcmp( &p_dec->fmt_out.video.mastering, ++ &p_pic->format.mastering, ++ sizeof(p_pic->format.mastering) ) ) ++ { ++ p_dec->fmt_out.video.mastering = p_pic->format.mastering; ++ format_changed = true; ++ } ++#undef FROM_AVRAT ++ } ++#endif ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 60, 100 ) ) ++ const AVFrameSideData *metadata_lt = ++ av_frame_get_side_data( frame, ++ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ); ++ if ( metadata_lt ) ++ { ++ const AVContentLightMetadata *light_meta = ++ (const AVContentLightMetadata *) metadata_lt->data; ++ p_pic->format.lighting.MaxCLL = light_meta->MaxCLL; ++ p_pic->format.lighting.MaxFALL = light_meta->MaxFALL; ++ if ( memcmp( &p_dec->fmt_out.video.lighting, ++ &p_pic->format.lighting, ++ sizeof(p_pic->format.lighting) ) ) ++ { ++ p_dec->fmt_out.video.lighting = p_pic->format.lighting; ++ format_changed = true; ++ } ++ } ++#endif ++ ++ if (format_changed && decoder_UpdateVideoFormat( p_dec )) ++ return -1; ++#if 0 ++ const AVFrameSideData *p_avcc = av_frame_get_side_data( frame, AV_FRAME_DATA_A53_CC ); ++ if( p_avcc ) ++ { ++ cc_Extract( &p_sys->cc, CC_PAYLOAD_RAW, true, p_avcc->data, p_avcc->size ); ++ if( p_sys->cc.b_reorder || p_sys->cc.i_data ) ++ { ++ block_t *p_cc = block_Alloc( p_sys->cc.i_data ); ++ if( p_cc ) ++ { ++ memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data ); ++ if( p_sys->cc.b_reorder ) ++ p_cc->i_dts = p_cc->i_pts = p_pic->date; ++ else ++ p_cc->i_pts = p_cc->i_dts; ++ decoder_cc_desc_t desc; ++ desc.i_608_channels = p_sys->cc.i_608channels; ++ desc.i_708_channels = p_sys->cc.i_708channels; ++ desc.i_reorder_depth = 4; ++ decoder_QueueCc( p_dec, p_cc, &desc ); ++ } ++ cc_Flush( &p_sys->cc ); ++ } ++ } ++#endif ++ return 0; ++} ++ ++ ++ ++static int OpenVideoCodec( decoder_t *p_dec ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *ctx = p_sys->p_context; ++ const AVCodec *codec = p_sys->p_codec; ++ int ret; ++ ++#if TRACE_ALL ++ msg_Dbg(p_dec, "<<< %s", __func__); ++#endif ++ ++ if( ctx->extradata_size <= 0 ) ++ { ++ if( codec->id == AV_CODEC_ID_VC1 || ++ codec->id == AV_CODEC_ID_THEORA ) ++ { ++ msg_Warn( p_dec, "waiting for extra data for codec %s", ++ codec->name ); ++ return 1; ++ } ++ } ++ ++ ctx->width = p_dec->fmt_in.video.i_visible_width; ++ ctx->height = p_dec->fmt_in.video.i_visible_height; ++ ++ ctx->coded_width = p_dec->fmt_in.video.i_width; ++ ctx->coded_height = p_dec->fmt_in.video.i_height; ++ ++ ctx->bits_per_coded_sample = p_dec->fmt_in.video.i_bits_per_pixel; ++ p_sys->pix_fmt = AV_PIX_FMT_NONE; ++ p_sys->profile = -1; ++ p_sys->level = -1; ++// cc_Init( &p_sys->cc ); ++ ++ set_video_color_settings( &p_dec->fmt_in.video, ctx ); ++ ++ ret = ffmpeg_OpenCodec( p_dec, ctx, codec ); ++ if( ret < 0 ) ++ return ret; ++ ++ switch( ctx->active_thread_type ) ++ { ++ case FF_THREAD_FRAME: ++ msg_Dbg( p_dec, "using frame thread mode with %d threads", ++ ctx->thread_count ); ++ break; ++ case FF_THREAD_SLICE: ++ msg_Dbg( p_dec, "using slice thread mode with %d threads", ++ ctx->thread_count ); ++ break; ++ case 0: ++ if( ctx->thread_count > 1 ) ++ msg_Warn( p_dec, "failed to enable threaded decoding" ); ++ break; ++ default: ++ msg_Warn( p_dec, "using unknown thread mode with %d threads", ++ ctx->thread_count ); ++ break; ++ } ++ return 0; ++} ++ ++static MMAL_BOOL_T ++zc_buf_pre_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) ++{ ++ const AVRpiZcRefPtr fr_ref = userdata; ++ VLC_UNUSED(buf); ++ ++ av_rpi_zc_unref(fr_ref); ++ ++ return MMAL_FALSE; ++} ++ ++static MMAL_FOURCC_T ++avfmt_to_mmal(const int avfmt) ++{ ++ switch( avfmt ) ++ { ++ case AV_PIX_FMT_SAND128: ++ return MMAL_ENCODING_YUVUV128; ++ case AV_PIX_FMT_SAND64_10: ++ return MMAL_ENCODING_YUVUV64_10; ++ default: ++ break; ++ } ++ return MMAL_ENCODING_UNKNOWN; ++} ++ ++/***************************************************************************** ++ * DecodeBlock: Called to decode one or more frames ++ *****************************************************************************/ ++ ++ ++// Returns ++// -ve error ++// 0 Need more input (EAGAIN) ++// 1 Frame decoded (dropped or Qed) ++// 2 Decode err ++// 3 EOF ++ ++static int rx_frame(decoder_t * const p_dec, decoder_sys_t * const p_sys, AVCodecContext * const p_context) ++{ ++ AVFrame * frame = av_frame_alloc(); ++ picture_t * p_pic = NULL; ++ int ret; ++ ++ if (frame == NULL) ++ return VLC_ENOMEM; ++ ++ ret = avcodec_receive_frame(p_context, frame); ++ ++ if (ret != 0) ++ { ++ av_frame_free(&frame); ++ switch (ret) ++ { ++ case AVERROR(EAGAIN): ++ return 0; ++ ++ case AVERROR(ENOMEM): ++ case AVERROR(EINVAL): ++ msg_Err(p_dec, "avcodec_receive_frame critical error"); ++ return VLC_EGENERIC; ++ ++ case AVERROR_EOF: ++ msg_Dbg(p_dec, "Rx EOF"); ++ avcodec_flush_buffers(p_context); ++ return 2; ++ ++ default: ++ msg_Warn(p_dec, "Decode error: %d", ret); ++ return 1; ++ } ++ } ++ ++ /* Compute the PTS */ ++#ifdef FF_API_PKT_PTS ++ mtime_t i_pts = frame->pts; ++#else ++ mtime_t i_pts = frame->pkt_pts; ++#endif ++ if (i_pts == AV_NOPTS_VALUE ) ++ i_pts = frame->pkt_dts; ++ ++ if( i_pts == AV_NOPTS_VALUE ) ++ i_pts = date_Get( &p_sys->pts ); ++ ++ /* Interpolate the next PTS */ ++ if( i_pts > VLC_TS_INVALID ) ++ date_Set( &p_sys->pts, i_pts ); ++ ++ interpolate_next_pts( p_dec, frame ); ++ ++// update_late_frame_count( p_dec, p_block, current_time, i_pts); //********************* ++ ++ if( ( /* !p_sys->p_va && */ !frame->linesize[0] ) || ++ ( p_dec->b_frame_drop_allowed && (frame->flags & AV_FRAME_FLAG_CORRUPT) && ++ !p_sys->b_show_corrupted ) ) ++ { ++ msg_Dbg(p_dec, "Frame drop"); ++ av_frame_free(&frame); ++ return 1; ++ } ++ ++ lavc_UpdateVideoFormat(p_dec, p_context, p_context->pix_fmt, ++ p_context->pix_fmt); ++ ++ { ++ MMAL_BUFFER_HEADER_T * const buf = mmal_queue_wait(p_sys->out_pool->queue); ++// MMAL_BUFFER_HEADER_T * const buf = mmal_queue_get(p_sys->out_pool->queue); ++ if (buf == NULL) { ++ msg_Err(p_dec, "MMAL buffer alloc failure"); ++ av_frame_free(&frame); ++ return 1; ++ } ++ ++ mmal_buffer_header_reset(buf); // length, offset, flags, pts, dts ++ buf->cmd = 0; ++ buf->user_data = NULL; ++ ++ { ++ const AVRpiZcRefPtr fr_buf = av_rpi_zc_ref(p_context, frame, frame->format, 0); ++ ++ if (fr_buf == NULL) { ++ mmal_buffer_header_release(buf); ++ av_frame_free(&frame); ++ return VLC_ENOMEM; ++ } ++ ++ const intptr_t vc_handle = (intptr_t)av_rpi_zc_vc_handle(fr_buf); ++ ++ buf->data = (uint8_t *)vc_handle; // Cast our handle to a pointer for mmal - 2 steps to avoid gcc warnings ++ buf->offset = av_rpi_zc_offset(fr_buf); ++ buf->length = av_rpi_zc_length(fr_buf); ++ buf->alloc_size = av_rpi_zc_numbytes(fr_buf); ++ buf->flags |= MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ ++ mmal_buffer_header_pre_release_cb_set(buf, zc_buf_pre_release_cb, fr_buf); ++ } ++ ++ p_pic = decoder_NewPicture(p_dec); // *** Really want an empy pic ++ if (p_pic == NULL) ++ { ++ msg_Err(p_dec, "Picture alloc failure"); ++ mmal_buffer_header_release(buf); ++ av_frame_free(&frame); ++ return VLC_ENOMEM; ++ } ++ ++ p_pic->context = hw_mmal_gen_context(avfmt_to_mmal(frame->format), buf, NULL); ++ } ++ ++ ++ if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den ) ++ { ++ /* Fetch again the aspect ratio in case it changed */ ++ p_dec->fmt_out.video.i_sar_num ++ = p_context->sample_aspect_ratio.num; ++ p_dec->fmt_out.video.i_sar_den ++ = p_context->sample_aspect_ratio.den; ++ ++ if( !p_dec->fmt_out.video.i_sar_num || !p_dec->fmt_out.video.i_sar_den ) ++ { ++ p_dec->fmt_out.video.i_sar_num = 1; ++ p_dec->fmt_out.video.i_sar_den = 1; ++ } ++ } ++ ++ p_pic->date = i_pts; ++ /* Hack to force display of still pictures */ ++ p_pic->b_force = p_sys->b_first_frame; ++ p_pic->i_nb_fields = 2 + frame->repeat_pict; ++ p_pic->b_progressive = !frame->interlaced_frame; ++ p_pic->b_top_field_first = frame->top_field_first; ++ ++ if (DecodeSidedata(p_dec, frame, p_pic)) ++ i_pts = VLC_TS_INVALID; ++ ++ av_frame_free(&frame); ++ ++ p_sys->b_first_frame = false; ++ decoder_QueueVideo(p_dec, p_pic); ++ ++ return 1; ++} ++ ++ ++ ++ ++ ++static int DecodeVideo( decoder_t *p_dec, block_t * p_block) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *p_context = p_sys->p_context; ++ /* Boolean if we assume that we should get valid pic as result */ ++ bool b_need_output_picture = true; ++ ++ /* Boolean for END_OF_SEQUENCE */ ++ bool eos_spotted = false; ++ mtime_t current_time; ++ int rv = VLCDEC_SUCCESS; ++ ++ if( !p_context->extradata_size && p_dec->fmt_in.i_extra ) ++ { ++ ffmpeg_InitCodec( p_dec ); ++ if( !avcodec_is_open( p_context ) ) ++ OpenVideoCodec( p_dec ); ++ } ++ ++ if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) ) ++ return VLCDEC_SUCCESS; ++ ++ if( !avcodec_is_open( p_context ) ) ++ { ++ if( p_block ) ++ block_Release( p_block ); ++ return VLCDEC_ECRITICAL; ++ } ++ ++ if( !check_block_validity( p_sys, p_block ) ) ++ return VLCDEC_SUCCESS; ++ ++ current_time = mdate(); ++ if( p_dec->b_frame_drop_allowed && check_block_being_late( p_sys, p_block, current_time) ) ++ { ++ msg_Err( p_dec, "more than 5 seconds of late video -> " ++ "dropping frame (computer too slow ?)" ); ++ return VLCDEC_SUCCESS; ++ } ++ ++ ++ /* A good idea could be to decode all I pictures and see for the other */ ++ b_need_output_picture = true; ++ ++ /* Defaults that if we aren't in prerolling, we want output picture ++ same for if we are flushing (p_block==NULL) */ ++ if( !p_block || !(p_block->i_flags & BLOCK_FLAG_PREROLL) ) ++ b_need_output_picture = true; ++ else ++ b_need_output_picture = false; ++ ++ /* Change skip_frame config only if hurry_up is enabled */ ++ if( p_sys->b_hurry_up ) ++ { ++ p_context->skip_frame = p_sys->i_skip_frame; ++ ++ /* Check also if we should/can drop the block and move to next block ++ as trying to catchup the speed*/ ++ if( p_dec->b_frame_drop_allowed && ++ check_frame_should_be_dropped( p_sys, p_context, &b_need_output_picture ) ) ++ { ++ if( p_block ) ++ block_Release( p_block ); ++ msg_Warn( p_dec, "More than 11 late frames, dropping frame" ); ++ return VLCDEC_SUCCESS; ++ } ++ } ++ if( !b_need_output_picture ) ++ { ++ p_context->skip_frame = __MAX( p_context->skip_frame, ++ AVDISCARD_NONREF ); ++ } ++ ++ /* ++ * Do the actual decoding now */ ++ ++ /* Don't forget that libavcodec requires a little more bytes ++ * that the real frame size */ ++ if( p_block && p_block->i_buffer > 0 ) ++ { ++ eos_spotted = ( p_block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE ) != 0; ++ ++ p_block = block_Realloc( p_block, 0, ++ p_block->i_buffer + FF_INPUT_BUFFER_PADDING_SIZE ); ++ if( !p_block ) ++ return VLCDEC_ECRITICAL; ++ ++ p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE; ++ memset( p_block->p_buffer + p_block->i_buffer, 0, ++ FF_INPUT_BUFFER_PADDING_SIZE ); ++ } ++ ++ AVPacket pkt = {.data = NULL, .size = 0}; ++ ++ av_init_packet( &pkt ); ++ if( p_block && p_block->i_buffer > 0 ) ++ { ++ pkt.data = p_block->p_buffer; ++ pkt.size = p_block->i_buffer; ++ pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; ++ pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; ++ } ++ ++ if( !p_sys->palette_sent ) ++ { ++ uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); ++ if (pal) { ++ memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE); ++ p_sys->palette_sent = true; ++ } ++ } ++ ++#if LIBAVCODEC_VERSION_CHECK( 57, 0, 0xFFFFFFFFU, 64, 101 ) ++ if( !b_need_output_picture ) ++ pkt.flags |= AV_PKT_FLAG_DISCARD; ++#endif ++ ++ int ret = avcodec_send_packet(p_context, &pkt); ++ ++ if (ret == AVERROR(EAGAIN)) ++ { ++ // Cannot send more data until output drained - so do drain ++ while (rx_frame(p_dec, p_sys, p_context) == 1) ++ /* Loop */; ++ ++ // And try again - should not fail the same way ++ ret = avcodec_send_packet(p_context, &pkt); ++ } ++ ++ // Now done with pkt & block ++ av_packet_unref(&pkt); ++ if (p_block != NULL) ++ { ++ block_Release( p_block ); ++ p_block = NULL; ++ } ++ ++ if (ret != 0) ++ { ++ if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) ++ { ++ msg_Err(p_dec, "avcodec_send_packet critical error"); ++ rv = VLCDEC_ECRITICAL; ++ } ++ } ++ ++ while (rx_frame(p_dec, p_sys, p_context) == 1) ++ /* Loop */; ++ ++ if (eos_spotted) ++ p_sys->b_first_frame = true; ++ ++ return rv; ++} ++ ++/***************************************************************************** ++ * EndVideo: decoder destruction ++ ***************************************************************************** ++ * This function is called when the thread ends after a successful ++ * initialization. ++ *****************************************************************************/ ++static void MmalAvcodecCloseDecoder(vlc_object_t *obj) ++{ ++ decoder_t *p_dec = (decoder_t *)obj; ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *ctx = p_sys->p_context; ++// void *hwaccel_context; ++ ++ /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */ ++ if( avcodec_is_open( ctx ) ) ++ avcodec_flush_buffers( ctx ); ++ ++// cc_Flush( &p_sys->cc ); ++ ++ avcodec_close(ctx); ++ av_rpi_zc_uninit(ctx); ++ ++// hwaccel_context = ctx->hwaccel_context; ++ avcodec_free_context( &ctx ); ++ ++ if( p_sys->out_pool != NULL ) ++ mmal_pool_destroy(p_sys->out_pool); ++ ++// if( p_sys->p_va ) ++// vlc_va_Delete( p_sys->p_va, &hwaccel_context ); ++ ++ free( p_sys ); ++} ++ ++/***************************************************************************** ++ * ffmpeg_InitCodec: setup codec extra initialization data for ffmpeg ++ *****************************************************************************/ ++static void ffmpeg_InitCodec( decoder_t *p_dec ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ size_t i_size = p_dec->fmt_in.i_extra; ++ ++ if( !i_size ) return; ++ ++ if( p_sys->p_codec->id == AV_CODEC_ID_SVQ3 ) ++ { ++ uint8_t *p; ++ ++ p_sys->p_context->extradata_size = i_size + 12; ++ p = p_sys->p_context->extradata = ++ av_malloc( p_sys->p_context->extradata_size + ++ FF_INPUT_BUFFER_PADDING_SIZE ); ++ if( !p ) ++ return; ++ ++ memcpy( &p[0], "SVQ3", 4 ); ++ memset( &p[4], 0, 8 ); ++ memcpy( &p[12], p_dec->fmt_in.p_extra, i_size ); ++ ++ /* Now remove all atoms before the SMI one */ ++ if( p_sys->p_context->extradata_size > 0x5a && ++ strncmp( (char*)&p[0x56], "SMI ", 4 ) ) ++ { ++ uint8_t *psz = &p[0x52]; ++ ++ while( psz < &p[p_sys->p_context->extradata_size - 8] ) ++ { ++ uint_fast32_t atom_size = GetDWBE( psz ); ++ if( atom_size <= 1 ) ++ { ++ /* FIXME handle 1 as long size */ ++ break; ++ } ++ if( !strncmp( (char*)&psz[4], "SMI ", 4 ) ) ++ { ++ memmove( &p[0x52], psz, ++ &p[p_sys->p_context->extradata_size] - psz ); ++ break; ++ } ++ ++ psz += atom_size; ++ } ++ } ++ } ++ else ++ { ++ p_sys->p_context->extradata_size = i_size; ++ p_sys->p_context->extradata = ++ av_malloc( i_size + FF_INPUT_BUFFER_PADDING_SIZE ); ++ if( p_sys->p_context->extradata ) ++ { ++ memcpy( p_sys->p_context->extradata, ++ p_dec->fmt_in.p_extra, i_size ); ++ memset( p_sys->p_context->extradata + i_size, ++ 0, FF_INPUT_BUFFER_PADDING_SIZE ); ++ } ++ } ++} ++ ++ ++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, ++ const enum PixelFormat *pi_fmt ) ++{ ++ decoder_t *p_dec = p_context->opaque; ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ video_format_t fmt; ++ ++ /* Enumerate available formats */ ++ enum PixelFormat swfmt = avcodec_default_get_format(p_context, pi_fmt); ++// bool can_hwaccel = false; ++ ++ for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++) ++ { ++ const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]); ++ if (dsc == NULL) ++ continue; ++ bool hwaccel = (dsc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0; ++ ++ msg_Dbg( p_dec, "available %sware decoder output format %d (%s)", ++ hwaccel ? "hard" : "soft", pi_fmt[i], dsc->name ); ++// if (hwaccel) ++// can_hwaccel = true; ++ } ++ ++ /* If the format did not actually change (e.g. seeking), try to reuse the ++ * existing output format, and if present, hardware acceleration back-end. ++ * This avoids resetting the pipeline downstream. This also avoids ++ * needlessly probing for hardware acceleration support. */ ++ if (p_sys->pix_fmt != AV_PIX_FMT_NONE ++ && lavc_GetVideoFormat(p_dec, &fmt, p_context, p_sys->pix_fmt, swfmt) == 0 ++ && fmt.i_width == p_dec->fmt_out.video.i_width ++ && fmt.i_height == p_dec->fmt_out.video.i_height ++ && p_context->profile == p_sys->profile ++ && p_context->level <= p_sys->level) ++ { ++ for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++) ++ if (pi_fmt[i] == p_sys->pix_fmt) ++ { ++ msg_Dbg(p_dec, "reusing decoder output format %d", pi_fmt[i]); ++ return p_sys->pix_fmt; ++ } ++ } ++ ++// if (p_sys->p_va != NULL) ++// { ++// msg_Err(p_dec, "existing hardware acceleration cannot be reused"); ++// vlc_va_Delete(p_sys->p_va, &p_context->hwaccel_context); ++// p_sys->p_va = NULL; ++// } ++ ++ p_sys->profile = p_context->profile; ++ p_sys->level = p_context->level; ++ ++#if 1 ++ return swfmt; ++#else ++ if (!can_hwaccel) ++ return swfmt; ++ ++#if (LIBAVCODEC_VERSION_MICRO >= 100) \ ++ && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101)) ++ if (p_context->active_thread_type) ++ { ++ msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", ++ p_context->active_thread_type); ++ return swfmt; ++ } ++#endif ++ ++ wait_mt(p_sys); ++ ++ static const enum PixelFormat hwfmts[] = ++ { ++#ifdef _WIN32 ++#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) ++ AV_PIX_FMT_D3D11VA_VLD, ++#endif ++ AV_PIX_FMT_DXVA2_VLD, ++#endif ++ AV_PIX_FMT_VAAPI_VLD, ++#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) ++ AV_PIX_FMT_VDPAU, ++#endif ++ AV_PIX_FMT_NONE, ++ }; ++ ++ for( size_t i = 0; hwfmts[i] != AV_PIX_FMT_NONE; i++ ) ++ { ++ enum PixelFormat hwfmt = AV_PIX_FMT_NONE; ++ for( size_t j = 0; hwfmt == AV_PIX_FMT_NONE && pi_fmt[j] != AV_PIX_FMT_NONE; j++ ) ++ if( hwfmts[i] == pi_fmt[j] ) ++ hwfmt = hwfmts[i]; ++ ++ if( hwfmt == AV_PIX_FMT_NONE ) ++ continue; ++ ++ p_dec->fmt_out.video.i_chroma = vlc_va_GetChroma(hwfmt, swfmt); ++ if (p_dec->fmt_out.video.i_chroma == 0) ++ continue; /* Unknown brand of hardware acceleration */ ++ if (p_context->width == 0 || p_context->height == 0) ++ { /* should never happen */ ++ msg_Err(p_dec, "unspecified video dimensions"); ++ continue; ++ } ++ const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(hwfmt); ++ msg_Dbg(p_dec, "trying format %s", dsc ? dsc->name : "unknown"); ++ if (lavc_UpdateVideoFormat(p_dec, p_context, hwfmt, swfmt)) ++ continue; /* Unsupported brand of hardware acceleration */ ++ post_mt(p_sys); ++ ++ picture_t *test_pic = decoder_NewPicture(p_dec); ++ assert(!test_pic || test_pic->format.i_chroma == p_dec->fmt_out.video.i_chroma); ++ vlc_va_t *va = vlc_va_New(VLC_OBJECT(p_dec), p_context, hwfmt, ++ &p_dec->fmt_in, ++ test_pic ? test_pic->p_sys : NULL); ++ if (test_pic) ++ picture_Release(test_pic); ++ if (va == NULL) ++ { ++ wait_mt(p_sys); ++ continue; /* Unsupported codec profile or such */ ++ } ++ ++ if (va->description != NULL) ++ msg_Info(p_dec, "Using %s for hardware decoding", va->description); ++ ++ p_sys->p_va = va; ++ p_sys->pix_fmt = hwfmt; ++ p_context->draw_horiz_band = NULL; ++ return hwfmt; ++ } ++ ++ post_mt(p_sys); ++ /* Fallback to default behaviour */ ++ p_sys->pix_fmt = swfmt; ++ return swfmt; ++#endif ++} ++ ++/***************************************************************************** ++ * InitVideo: initialize the video decoder ++ ***************************************************************************** ++ * the ffmpeg codec will be opened, some memory allocated. The vout is not yet ++ * opened (done after the first decoded frame). ++ *****************************************************************************/ ++ ++/***************************************************************************** ++ * ffmpeg_OpenCodec: ++ *****************************************************************************/ ++ ++static int MmalAvcodecOpenDecoder( vlc_object_t *obj ) ++{ ++ decoder_t *p_dec = (decoder_t *)obj; ++ const AVCodec *p_codec; ++ ++ if (p_dec->fmt_in.i_codec != VLC_CODEC_HEVC) ++ return VLC_EGENERIC; ++ ++ AVCodecContext *p_context = ffmpeg_AllocContext( p_dec, &p_codec ); ++ if( p_context == NULL ) ++ return VLC_EGENERIC; ++ ++ int i_val; ++ ++ /* Allocate the memory needed to store the decoder's structure */ ++ decoder_sys_t *p_sys = calloc( 1, sizeof(*p_sys) ); ++ if( unlikely(p_sys == NULL) ) ++ { ++ avcodec_free_context( &p_context ); ++ return VLC_ENOMEM; ++ } ++ ++ p_dec->p_sys = p_sys; ++ p_sys->p_context = p_context; ++ p_sys->p_codec = p_codec; ++// p_sys->p_va = NULL; ++ ++ /* ***** Fill p_context with init values ***** */ ++ p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_original_fourcc ? ++ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec ); ++ ++ /* ***** Get configuration of ffmpeg plugin ***** */ ++ p_context->workaround_bugs = ++ var_InheritInteger( p_dec, "avcodec-workaround-bugs" ); ++ p_context->err_recognition = ++ var_InheritInteger( p_dec, "avcodec-error-resilience" ); ++ ++ if( var_CreateGetBool( p_dec, "grayscale" ) ) ++ p_context->flags |= AV_CODEC_FLAG_GRAY; ++ ++ /* ***** Output always the frames ***** */ ++ p_context->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT; ++ ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skiploopfilter" ); ++ if( i_val >= 4 ) p_context->skip_loop_filter = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_context->skip_loop_filter = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_context->skip_loop_filter = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_context->skip_loop_filter = AVDISCARD_NONREF; ++ else p_context->skip_loop_filter = AVDISCARD_DEFAULT; ++ ++ if( var_CreateGetBool( p_dec, "avcodec-fast" ) ) ++ p_context->flags2 |= AV_CODEC_FLAG2_FAST; ++ ++ /* ***** libavcodec frame skipping ***** */ ++ p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" ); ++ p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" ); ++ ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-frame" ); ++ if( i_val >= 4 ) p_sys->i_skip_frame = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_sys->i_skip_frame = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_sys->i_skip_frame = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_sys->i_skip_frame = AVDISCARD_NONREF; ++ else if( i_val == -1 ) p_sys->i_skip_frame = AVDISCARD_NONE; ++ else p_sys->i_skip_frame = AVDISCARD_DEFAULT; ++ p_context->skip_frame = p_sys->i_skip_frame; ++ ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-idct" ); ++ if( i_val >= 4 ) p_context->skip_idct = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_context->skip_idct = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_context->skip_idct = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_context->skip_idct = AVDISCARD_NONREF; ++ else if( i_val == -1 ) p_context->skip_idct = AVDISCARD_NONE; ++ else p_context->skip_idct = AVDISCARD_DEFAULT; ++ ++ /* ***** libavcodec direct rendering ***** */ ++ p_sys->b_direct_rendering = false; ++ atomic_init(&p_sys->b_dr_failure, false); ++ if( var_CreateGetBool( p_dec, "avcodec-dr" ) && ++ (p_codec->capabilities & AV_CODEC_CAP_DR1) && ++ /* No idea why ... but this fixes flickering on some TSCC streams */ ++ p_sys->p_codec->id != AV_CODEC_ID_TSCC && ++ p_sys->p_codec->id != AV_CODEC_ID_CSCD && ++ p_sys->p_codec->id != AV_CODEC_ID_CINEPAK ) ++ { ++ /* Some codecs set pix_fmt only after the 1st frame has been decoded, ++ * so we need to do another check in ffmpeg_GetFrameBuf() */ ++ p_sys->b_direct_rendering = true; ++ } ++ ++ p_context->get_format = ffmpeg_GetFormat; ++ /* Always use our get_buffer wrapper so we can calculate the ++ * PTS correctly */ ++// p_context->get_buffer2 = lavc_GetFrame; ++// p_context->opaque = p_dec; ++ ++ int i_thread_count = var_InheritInteger( p_dec, "avcodec-threads" ); ++ if( i_thread_count <= 0 ) ++ i_thread_count = 6; ++#if 0 ++ if( i_thread_count <= 0 ) ++ { ++ i_thread_count = vlc_GetCPUCount(); ++ if( i_thread_count > 1 ) ++ i_thread_count++; ++ ++ //FIXME: take in count the decoding time ++#if VLC_WINSTORE_APP ++ i_thread_count = __MIN( i_thread_count, 6 ); ++#else ++ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6 ); ++#endif ++ } ++ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); ++#endif ++ msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); ++ p_context->thread_count = i_thread_count; ++ p_context->thread_safe_callbacks = true; ++ ++ p_context->thread_type = FF_THREAD_SLICE | FF_THREAD_FRAME; ++ ++ if( p_context->thread_type & FF_THREAD_FRAME ) ++ p_dec->i_extra_picture_buffers = 2 * p_context->thread_count; ++ ++ /* ***** misc init ***** */ ++ date_Init(&p_sys->pts, 1, 30001); ++ date_Set(&p_sys->pts, VLC_TS_INVALID); ++ p_sys->b_first_frame = true; ++ p_sys->i_late_frames = 0; ++ p_sys->b_from_preroll = false; ++ ++ /* Set output properties */ ++ if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS ) ++ { ++ /* we are doomed. but not really, because most codecs set their pix_fmt later on */ ++ p_dec->fmt_out.i_codec = VLC_CODEC_I420; ++ } ++ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; ++ ++ p_dec->fmt_out.video.orientation = p_dec->fmt_in.video.orientation; ++ ++ if( p_dec->fmt_in.video.p_palette ) { ++ p_sys->palette_sent = false; ++ p_dec->fmt_out.video.p_palette = malloc( sizeof(video_palette_t) ); ++ if( p_dec->fmt_out.video.p_palette ) ++ *p_dec->fmt_out.video.p_palette = *p_dec->fmt_in.video.p_palette; ++ } else ++ p_sys->palette_sent = true; ++ ++ /* ***** init this codec with special data ***** */ ++ ffmpeg_InitCodec( p_dec ); ++ ++ /* ***** Open the codec ***** */ ++ if( OpenVideoCodec( p_dec ) < 0 ) ++ { ++ free( p_sys ); ++ avcodec_free_context( &p_context ); ++ return VLC_EGENERIC; ++ } ++ ++ if ((p_sys->out_pool = mmal_pool_create(5, 0)) == NULL) ++ { ++ msg_Err(p_dec, "Failed to create mmal buffer pool"); ++ goto fail; ++ } ++ ++ p_dec->pf_decode = DecodeVideo; ++ p_dec->pf_flush = Flush; ++ ++ /* XXX: Writing input format makes little sense. */ ++ if( p_context->profile != FF_PROFILE_UNKNOWN ) ++ p_dec->fmt_in.i_profile = p_context->profile; ++ if( p_context->level != FF_LEVEL_UNKNOWN ) ++ p_dec->fmt_in.i_level = p_context->level; ++ return VLC_SUCCESS; ++ ++fail: ++ MmalAvcodecCloseDecoder(VLC_OBJECT(p_dec)); ++ return VLC_EGENERIC; ++} ++ ++ ++ ++vlc_module_begin() ++ set_category( CAT_INPUT ) ++ set_subcategory( SUBCAT_INPUT_VCODEC ) ++ set_shortname(N_("MMAL avcodec")) ++ set_description(N_("MMAL buffered avcodec ")) ++ set_capability("video decoder", 800) ++ add_shortcut("mmal_avcodec") ++ set_callbacks(MmalAvcodecOpenDecoder, MmalAvcodecCloseDecoder) ++vlc_module_end() ++ --- a/modules/hw/mmal/mmal_picture.c +++ b/modules/hw/mmal/mmal_picture.c -@@ -21,25 +21,847 @@ +@@ -21,25 +21,961 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ @@ -3681,12 +6204,51 @@ + return MMAL_COLOR_SPACE_UNKNOWN; +} + ++MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc) ++{ ++ switch (vf_vlc->i_chroma) { ++ case VLC_CODEC_RGB32: ++ { ++ // VLC RGB32 aka RV32 means we have to look at the mask values ++ const uint32_t r = vf_vlc->i_rmask; ++ const uint32_t g = vf_vlc->i_gmask; ++ const uint32_t b = vf_vlc->i_bmask; ++ if (r == 0xff0000 && g == 0xff00 && b == 0xff) ++ return MMAL_ENCODING_BGRA; ++ if (r == 0xff && g == 0xff00 && b == 0xff0000) ++ return MMAL_ENCODING_RGBA; ++ if (r == 0xff000000 && g == 0xff0000 && b == 0xff00) ++ return MMAL_ENCODING_ABGR; ++ if (r == 0xff00 && g == 0xff0000 && b == 0xff000000) ++ return MMAL_ENCODING_ARGB; ++ break; ++ } ++ case VLC_CODEC_RGBA: ++ return MMAL_ENCODING_RGBA; ++ case VLC_CODEC_BGRA: ++ return MMAL_ENCODING_BGRA; ++ case VLC_CODEC_ARGB: ++ return MMAL_ENCODING_ARGB; ++ // VLC_CODEC_ABGR does not exist in VLC ++ case VLC_CODEC_MMAL_OPAQUE: ++ return MMAL_ENCODING_OPAQUE; ++ case VLC_CODEC_MMAL_ZC_SAND8: ++ return MMAL_ENCODING_YUVUV128; ++ case VLC_CODEC_MMAL_ZC_SAND10: ++ return MMAL_ENCODING_YUVUV64_10; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++ +void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc) +{ + MMAL_VIDEO_FORMAT_T * const vf_mmal = &es_fmt->es->video; + + vf_mmal->width = (vf_vlc->i_width + 31) & ~31; -+ vf_mmal->height = (vf_vlc->i_height + 15) & ~15;; ++ vf_mmal->height = (vf_vlc->i_height + 15) & ~15; + vf_mmal->crop.x = vf_vlc->i_x_offset; + vf_mmal->crop.y = vf_vlc->i_y_offset; + vf_mmal->crop.width = vf_vlc->i_visible_width; @@ -3754,7 +6316,7 @@ + +// Put buffer in port if possible - if not then release to pool +// Returns true if sent, false if recycled -+static bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf) ++bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf) +{ + mmal_buffer_header_reset(buf); + buf->user_data = NULL; @@ -3780,6 +6342,58 @@ + return err; +} + ++ ++MMAL_STATUS_T hw_mmal_opaque_output(vlc_object_t * const obj, ++ hw_mmal_port_pool_ref_t ** pppr, ++ MMAL_PORT_T * const port, ++ const unsigned int extra_buffers, MMAL_PORT_BH_CB_T callback) ++{ ++ MMAL_STATUS_T status; ++ ++ port->userdata = (struct MMAL_PORT_USERDATA_T *)obj; ++ ++ status = port_parameter_set_uint32(port, MMAL_PARAMETER_EXTRA_BUFFERS, extra_buffers); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(obj, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ return status; ++ } ++ ++ status = port_parameter_set_bool(port, MMAL_PARAMETER_ZERO_COPY, 1); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(obj, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ port->name, status, mmal_status_to_string(status)); ++ return status; ++ } ++ ++ port->format->encoding = MMAL_ENCODING_OPAQUE; ++ port->format->encoding_variant = 0; ++ if ((status = mmal_port_format_commit(port)) != MMAL_SUCCESS) ++ { ++ msg_Err(obj, "Failed to commit format on port %s (status=%"PRIx32" %s)", ++ port->name, status, mmal_status_to_string(status)); ++ return status; ++ } ++ ++ port->buffer_num = 30; ++ port->buffer_size = port->buffer_size_recommended; ++ ++ if ((*pppr = hw_mmal_port_pool_ref_create(port, port->buffer_num, port->buffer_size)) == NULL) { ++ msg_Err(obj, "Failed to create output pool"); ++ return status; ++ } ++ ++ status = mmal_port_enable(port, callback); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(obj, "Failed to enable output port %s (status=%"PRIx32" %s)", ++ port->name, status, mmal_status_to_string(status)); ++ return status; ++ } ++ ++ return MMAL_SUCCESS; ++} ++ ++ +void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn) +{ + pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic_ctx_cmn; @@ -3833,23 +6447,27 @@ +// Buffer belongs to context on successful return from this fn +// is still valid on failure +picture_context_t * -+hw_mmal_gen_context(MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr) ++hw_mmal_gen_context(const MMAL_FOURCC_T fmt, MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr) +{ + pic_ctx_mmal_t * const ctx = calloc(1, sizeof(pic_ctx_mmal_t)); + + if (ctx == NULL) + return NULL; + -+ hw_mmal_port_pool_ref_acquire(ppr); -+ mmal_buffer_header_pre_release_cb_set(buf, buf_pre_release_cb, ppr); ++ // If we have an associated ppr then ref & set appropriate callbacks ++ if (ppr != NULL) { ++ hw_mmal_port_pool_ref_acquire(ppr); ++ mmal_buffer_header_pre_release_cb_set(buf, buf_pre_release_cb, ppr); ++ buf->user_data = NULL; ++ } + + ctx->cmn.copy = hw_mmal_pic_ctx_copy; + ctx->cmn.destroy = hw_mmal_pic_ctx_destroy; + -+ ctx->bufs[0] = buf; ++ ctx->fmt = fmt; + ctx->buf_count = 1; ++ ctx->bufs[0] = buf; + -+ buf->user_data = NULL; + return &ctx->cmn; +} + @@ -3922,6 +6540,7 @@ + + unsigned int width; + unsigned int height; ++ MMAL_FOURCC_T enc_type; + + picture_t * pic; +} pool_ent_t; @@ -4069,9 +6688,7 @@ +#define POOL_ENT_ALLOC_BLOCK 0x10000 + +static pool_ent_t * pool_ent_alloc_new(size_t req_size) - { -- picture_sys_t *pic_sys = picture->p_sys; -- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++{ + pool_ent_t * ent = calloc(1, sizeof(*ent)); + const size_t alloc_size = (req_size + POOL_ENT_ALLOC_BLOCK - 1) & ~(POOL_ENT_ALLOC_BLOCK - 1); + @@ -4120,21 +6737,14 @@ + + if (n != 0) + return; - -- int offset = 0; -- picture->p[0].p_pixels = buffer->data; -- for (int i = 1; i < picture->i_planes; i++) { -- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; -- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ + if (ent->pic != NULL) { + picture_Release(ent->pic); + ent->pic = NULL; - } - -- pic_sys->displayed = false; ++ } ++ + vlc_mutex_lock(&pc->lock); - -- return VLC_SUCCESS; ++ + // If we have a full pool then extract the LRU and free it + // Free done outside mutex + if (pc->ent_pool.n >= pc->max_n) @@ -4145,7 +6755,7 @@ + vlc_mutex_unlock(&pc->lock); + + ent_free(xs); - } ++} + +// * This could be made more efficient, but this is easy +static void pool_recycle_list(vzc_pool_ctl_t * const pc, ent_list_hdr_t * const elh) @@ -4189,14 +6799,22 @@ + return best; +} + ++ ++void hw_mmal_vzc_buf_get_wh(MMAL_BUFFER_HEADER_T * const buf, int * const pW, int * const pH) ++{ ++ const pool_ent_t *const ent = ((vzc_subbuf_ent_t *)buf->user_data)->ent; ++ *pW = ent->width; ++ *pH = ent->height; ++} ++ +bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt) +{ + const pool_ent_t *const ent = ((vzc_subbuf_ent_t *)buf->user_data)->ent; + MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; + + es_fmt->type = MMAL_ES_TYPE_VIDEO; -+ es_fmt->encoding = MMAL_ENCODING_BGRA; -+ es_fmt->encoding_variant = MMAL_ENCODING_BGRA; ++ es_fmt->encoding = ent->enc_type; ++ es_fmt->encoding_variant = 0; + + v_fmt->width = ent->width; + v_fmt->height = ent->height; @@ -4246,7 +6864,9 @@ +} + +void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect) -+{ + { +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; + vzc_subbuf_ent_t * sb = buf->user_data; + if (scale_rect == NULL) { + sb->dreg.dest_rect = sb->orig_dest_rect; @@ -4306,6 +6926,7 @@ + const size_t dst_size = dst_stride * dst_lines; + + pool_ent_t * ent = ent_list_extract_pic_ent(&pc->ents_prev, pic); ++ bool needs_copy = false; + + // If we didn't find ent in last then look in cur in case is_first + // isn't working @@ -4316,8 +6937,14 @@ + + if (ent == NULL) + { ++ // Need a new ent ++ needs_copy = true; ++ + if ((ent = pool_best_fit(pc, dst_size)) == NULL) + goto fail2; ++ if ((ent->enc_type = vlc_to_mmal_video_fourcc(&pic->format)) == 0) ++ goto fail2; ++ + ent->pic = picture_Hold(pic); + } + @@ -4358,22 +6985,25 @@ + .height = dst_pic->format.i_visible_height + }; + -+ ent->width = dst_stride / bpp; -+ ent->height = dst_lines; -+ -+ // 2D copy ++ if (needs_copy) + { -+ unsigned int i; -+ uint8_t *d = ent->buf; -+ const uint8_t *s = pic->p[0].p_pixels + xl * bpp + fmt->i_y_offset * pic->p[0].i_pitch; -+ for (i = 0; i != fmt->i_visible_height; ++i) { -+ memcpy(d, s, dst_stride); -+ d += dst_stride; -+ s += pic->p[0].i_pitch; -+ } ++ ent->width = dst_stride / bpp; ++ ent->height = dst_lines; + -+ // And make sure it is actually in memory -+ flush_range(ent->buf, d - (uint8_t *)ent->buf); ++ // 2D copy ++ { ++ unsigned int i; ++ uint8_t *d = ent->buf; ++ const uint8_t *s = pic->p[0].p_pixels + xl * bpp + fmt->i_y_offset * pic->p[0].i_pitch; ++ for (i = 0; i != fmt->i_visible_height; ++i) { ++ memcpy(d, s, dst_stride); ++ d += dst_stride; ++ s += pic->p[0].i_pitch; ++ } ++ ++ // And make sure it is actually in memory ++ flush_range(ent->buf, d - (uint8_t *)ent->buf); ++ } + } + } + @@ -4391,7 +7021,12 @@ + pool_recycle_list(pc, &pc->ents_prev); + pool_recycle_list(pc, &pc->ents_cur); +} -+ + +- int offset = 0; +- picture->p[0].p_pixels = buffer->data; +- for (int i = 1; i < picture->i_planes; i++) { +- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; +- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; +static void hw_mmal_vzc_pool_delete(vzc_pool_ctl_t * const pc) +{ + @@ -4472,20 +7107,22 @@ + { + hw_mmal_vzc_pool_delete(pc); + return NULL; -+ } -+ + } + +- pic_sys->displayed = false; + atomic_store(&pc->ref_count, 1); + + mmal_pool_callback_set(pc->buf_pool, vcz_pool_release_cb, pc); -+ + +- return VLC_SUCCESS; + return pc; -+} + } + + + --- a/modules/hw/mmal/mmal_picture.h +++ b/modules/hw/mmal/mmal_picture.h -@@ -24,19 +24,209 @@ +@@ -24,19 +24,243 @@ #ifndef VLC_MMAL_MMAL_PICTURE_H_ #define VLC_MMAL_MMAL_PICTURE_H_ @@ -4521,10 +7158,15 @@ + + +#define CTX_BUFS_MAX 4 -+ + +- MMAL_BUFFER_HEADER_T *buffer; +- bool displayed; +-}; +typedef struct pic_ctx_mmal_s { + picture_context_t cmn; // PARENT: Common els at start + ++ MMAL_FOURCC_T fmt; ++ + unsigned int buf_count; + MMAL_BUFFER_HEADER_T * bufs[CTX_BUFS_MAX]; + @@ -4538,23 +7180,25 @@ + vlc_object_t * obj; +#endif +} pic_ctx_mmal_t; -+ -+ + +-int mmal_picture_lock(picture_t *picture); ++MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc); +MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs); +void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc); - -- MMAL_BUFFER_HEADER_T *buffer; -- bool displayed; --}; ++ +hw_mmal_port_pool_ref_t * hw_mmal_port_pool_ref_create(MMAL_PORT_T * const port, + const unsigned int headers, const uint32_t payload_size); +void hw_mmal_port_pool_ref_release(hw_mmal_port_pool_ref_t * const ppr, const bool in_cb); -+//bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf); ++bool hw_mmal_port_pool_ref_recycle(hw_mmal_port_pool_ref_t * const ppr, MMAL_BUFFER_HEADER_T * const buf); +MMAL_STATUS_T hw_mmal_port_pool_ref_fill(hw_mmal_port_pool_ref_t * const ppr); +static inline void hw_mmal_port_pool_ref_acquire(hw_mmal_port_pool_ref_t * const ppr) +{ + atomic_fetch_add(&ppr->refs, 1); +} ++MMAL_STATUS_T hw_mmal_opaque_output(vlc_object_t * const obj, ++ hw_mmal_port_pool_ref_t ** pppr, ++ MMAL_PORT_T * const port, ++ const unsigned int extra_buffers, MMAL_PORT_BH_CB_T callback); + +static inline int hw_mmal_pic_has_sub_bufs(picture_t * const pic) +{ @@ -4581,10 +7225,24 @@ + return n + 1 > ctx->buf_count ? NULL : ctx->bufs[n + 1]; +} + ++static inline bool hw_mmal_pic_is_mmal(const picture_t * const pic) ++{ ++ return pic->format.i_chroma == VLC_CODEC_MMAL_OPAQUE || ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND8 || ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND10 || ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_I420; ++} ++ ++static inline MMAL_FOURCC_T hw_mmal_pic_format(const picture_t *const pic) ++{ ++ const pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; ++ return ctx->fmt; ++} ++ +picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn); +void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn); -+picture_context_t * hw_mmal_gen_context(MMAL_BUFFER_HEADER_T * buf, -+ hw_mmal_port_pool_ref_t * const ppr); ++picture_context_t * hw_mmal_gen_context(const MMAL_FOURCC_T fmt, ++ MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr); + +int hw_mmal_get_gpu_mem(void); + @@ -4598,7 +7256,7 @@ + return mmal_port_parameter_set(port, ¶m.hdr); +} + -+static inline MMAL_STATUS_T port_parameter_set_bool(MMAL_PORT_T * port, uint32_t id, int val) ++static inline MMAL_STATUS_T port_parameter_set_bool(MMAL_PORT_T * const port, const uint32_t id, const bool val) +{ + const MMAL_PARAMETER_BOOLEAN_T param = { + .hdr = {.id = id, .size = sizeof(MMAL_PARAMETER_BOOLEAN_T)}, @@ -4670,6 +7328,7 @@ +} + +// Retrieve buf from pic & update with pic props ++// Note that this is a weak pointer - replicate before putting in a Q +static inline MMAL_BUFFER_HEADER_T * pic_mmal_buffer(const picture_t *const pic) +{ + MMAL_BUFFER_HEADER_T * const buf = ((pic_ctx_mmal_t *)pic->context)->bufs[0]; @@ -4682,10 +7341,19 @@ +struct vzc_pool_ctl_s; +typedef struct vzc_pool_ctl_s vzc_pool_ctl_t; + ++static inline bool hw_mmal_vzc_subpic_fmt_valid(const video_frame_format_t * const vf_vlc) ++{ ++ const vlc_fourcc_t vfcc_src = vf_vlc->i_chroma; ++ // At the moment we cope with any mono-planar RGBA thing ++ // We could cope with many other things but they currently don't occur ++ return vfcc_src == VLC_CODEC_RGBA || vfcc_src == VLC_CODEC_BGRA || vfcc_src == VLC_CODEC_ARGB; ++} ++ +bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt); +MMAL_DISPLAYREGION_T * hw_mmal_vzc_buf_region(MMAL_BUFFER_HEADER_T * const buf); +void hw_mmal_vzc_buf_set_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const int x, const int y, const int w, const int h); +void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect); ++void hw_mmal_vzc_buf_get_wh(MMAL_BUFFER_HEADER_T * const buf, int * const pW, int * const pH); +unsigned int hw_mmal_vzc_buf_seq(MMAL_BUFFER_HEADER_T * const buf); +MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, const picture_t * const dst_pic, const bool is_first); +void hw_mmal_vzc_buf_frame_size(MMAL_BUFFER_HEADER_T * const buf, @@ -4695,13 +7363,129 @@ +void hw_mmal_vzc_pool_release(vzc_pool_ctl_t * const pc); +void hw_mmal_vzc_pool_ref(vzc_pool_ctl_t * const pc); +vzc_pool_ctl_t * hw_mmal_vzc_pool_new(void); - --int mmal_picture_lock(picture_t *picture); ++ +#define VOUT_DISPLAY_CHANGE_MMAL_BASE 1024 +#define VOUT_DISPLAY_CHANGE_MMAL_HIDE (VOUT_DISPLAY_CHANGE_MMAL_BASE + 0) ++ ++#define MMAL_COMPONENT_DEFAULT_RESIZER "vc.ril.resize" ++#define MMAL_COMPONENT_ISP_RESIZER "vc.ril.isp" ++#define MMAL_COMPONENT_HVS "vc.ril.hvs" #endif --- /dev/null ++++ b/modules/hw/mmal/rpi_prof.h +@@ -0,0 +1,110 @@ ++#ifndef RPI_PROFILE_H ++#define RPI_PROFILE_H ++ ++#include <stdint.h> ++#include <inttypes.h> ++ ++#ifndef RPI_PROFILE ++#define RPI_PROFILE 0 ++#endif ++ ++#if RPI_PROFILE ++ ++#include "v7_pmu.h" ++ ++#ifdef RPI_PROC_ALLOC ++#define X volatile ++#define Z =0 ++#else ++#define X extern volatile ++#define Z ++#endif ++ ++X uint64_t av_rpi_prof0_cycles Z; ++X unsigned int av_rpi_prof0_cnt Z; ++#define RPI_prof0_MAX_DURATION 100000 ++ ++X uint64_t av_rpi_prof1_cycles Z; ++X unsigned int av_rpi_prof1_cnt Z; ++#define RPI_prof1_MAX_DURATION 100000 ++ ++X uint64_t av_rpi_prof2_cycles Z; ++X unsigned int av_rpi_prof2_cnt Z; ++#define RPI_prof2_MAX_DURATION 10000 ++ ++X uint64_t av_rpi_prof_n_cycles[128]; ++X unsigned int av_rpi_prof_n_cnt[128]; ++#define RPI_prof_n_MAX_DURATION 10000 ++ ++ ++#undef X ++#undef Z ++ ++#define PROFILE_INIT()\ ++do {\ ++ enable_pmu();\ ++ enable_ccnt();\ ++} while (0) ++ ++#define PROFILE_START()\ ++do {\ ++ volatile uint32_t perf_1 = read_ccnt();\ ++ volatile uint32_t perf_2 ++ ++ ++#define PROFILE_ACC(x)\ ++ perf_2 = read_ccnt();\ ++ {\ ++ const uint32_t duration = perf_2 - perf_1;\ ++ if (duration < RPI_##x##_MAX_DURATION)\ ++ {\ ++ av_rpi_##x##_cycles += duration;\ ++ av_rpi_##x##_cnt += 1;\ ++ }\ ++ }\ ++} while(0) ++ ++ ++#define PROFILE_ACC_N(n)\ ++ if ((n) >= 0) {\ ++ perf_2 = read_ccnt();\ ++ {\ ++ const uint32_t duration = perf_2 - perf_1;\ ++ if (duration < RPI_prof_n_MAX_DURATION)\ ++ {\ ++ av_rpi_prof_n_cycles[n] += duration;\ ++ av_rpi_prof_n_cnt[n] += 1;\ ++ }\ ++ }\ ++ }\ ++} while(0) ++ ++#define PROFILE_PRINTF(x)\ ++ printf("%-20s cycles=%14" PRIu64 "; cnt=%8u; avg=%5" PRIu64 "\n", #x, av_rpi_##x##_cycles, av_rpi_##x##_cnt,\ ++ av_rpi_##x##_cnt == 0 ? (uint64_t)0 : av_rpi_##x##_cycles / (uint64_t)av_rpi_##x##_cnt) ++ ++#define PROFILE_PRINTF_N(n)\ ++ printf("prof[%d] cycles=%14" PRIu64 "; cnt=%8u; avg=%5" PRIu64 "\n", (n), av_rpi_prof_n_cycles[n], av_rpi_prof_n_cnt[n],\ ++ av_rpi_prof_n_cnt[n] == 0 ? (uint64_t)0 : av_rpi_prof_n_cycles[n] / (uint64_t)av_rpi_prof_n_cnt[n]) ++ ++#define PROFILE_CLEAR_N(n) \ ++do {\ ++ av_rpi_prof_n_cycles[n] = 0;\ ++ av_rpi_prof_n_cnt[n] = 0;\ ++} while(0) ++ ++#else ++ ++// No profile ++#define PROFILE_INIT() ++#define PROFILE_START() ++#define PROFILE_ACC(x) ++#define PROFILE_ACC_N(x) ++#define PROFILE_PRINTF(x) ++#define PROFILE_PRINTF_N(x) ++#define PROFILE_CLEAR_N(n) ++ ++#endif ++ ++#endif ++ +--- /dev/null +++ b/modules/hw/mmal/subpic.c @@ -0,0 +1,222 @@ +/***************************************************************************** @@ -4927,35 +7711,417 @@ + + --- /dev/null -+++ b/modules/hw/mmal/subpic.h -@@ -0,0 +1,28 @@ -+#ifndef VLC_HW_MMAL_SUBPIC_H_ -+#define VLC_HW_MMAL_SUBPIC_H_ -+ -+typedef struct subpic_reg_stash_s -+{ -+ MMAL_PORT_T * port; -+ MMAL_POOL_T * pool; -+ unsigned int layer; -+ // Shadow vars so we can tell if stuff has changed -+ MMAL_RECT_T dest_rect; -+ unsigned int alpha; -+ unsigned int seq; -+} subpic_reg_stash_t; -+ -+int hw_mmal_subpic_update(vlc_object_t * const p_filter, -+ picture_t * const p_pic, const unsigned int sub_no, -+ subpic_reg_stash_t * const stash, -+ const MMAL_RECT_T * const scale_out, -+ const uint64_t pts); -+ -+void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); -+ -+void hw_mmal_subpic_close(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); -+ -+MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer); -+ -+#endif ++++ b/modules/hw/mmal/subpic.h +@@ -0,0 +1,28 @@ ++#ifndef VLC_HW_MMAL_SUBPIC_H_ ++#define VLC_HW_MMAL_SUBPIC_H_ ++ ++typedef struct subpic_reg_stash_s ++{ ++ MMAL_PORT_T * port; ++ MMAL_POOL_T * pool; ++ unsigned int layer; ++ // Shadow vars so we can tell if stuff has changed ++ MMAL_RECT_T dest_rect; ++ unsigned int alpha; ++ unsigned int seq; ++} subpic_reg_stash_t; ++ ++int hw_mmal_subpic_update(vlc_object_t * const p_filter, ++ picture_t * const p_pic, const unsigned int sub_no, ++ subpic_reg_stash_t * const stash, ++ const MMAL_RECT_T * const scale_out, ++ const uint64_t pts); ++ ++void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); ++ ++void hw_mmal_subpic_close(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); ++ ++MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer); ++ ++#endif ++ +--- /dev/null ++++ b/modules/hw/mmal/v7_pmu.S +@@ -0,0 +1,263 @@ ++/*------------------------------------------------------------ ++Performance Monitor Block ++------------------------------------------------------------*/ ++ .arm @ Make sure we are in ARM mode. ++ .text ++ .align 2 ++ .global getPMN @ export this function for the linker ++ ++/* Returns the number of progammable counters uint32_t getPMN(void) */ ++ ++getPMN: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC Register */ ++ MOV r0, r0, LSR #11 /* Shift N field down to bit 0 */ ++ AND r0, r0, #0x1F /* Mask to leave just the 5 N bits */ ++ BX lr ++ ++ ++ ++ .global pmn_config @ export this function for the linker ++ /* Sets the event for a programmable counter to record */ ++ /* void pmn_config(unsigned counter, uint32_t event) */ ++ /* counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1 */ ++ /* event = r1 = The event code */ ++pmn_config: ++ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ ++ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ ++ MCR p15, 0, r1, c9, c13, 1 /* Write EVTSELx Register */ ++ BX lr ++ ++ ++ ++ .global ccnt_divider @ export this function for the linker ++ /* Enables/disables the divider (1/64) on CCNT */ ++ /* void ccnt_divider(int divider) */ ++ /* divider = r0 = If 0 disable divider, else enable dvider */ ++ccnt_divider: ++ MRC p15, 0, r1, c9, c12, 0 /* Read PMNC */ ++ ++ CMP r0, #0x0 /* IF (r0 == 0) */ ++ BICEQ r1, r1, #0x08 /* THEN: Clear the D bit (disables the */ ++ ORRNE r1, r1, #0x08 /* ELSE: Set the D bit (enables the di */ ++ ++ MCR p15, 0, r1, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Enable/Disable */ ++ /* --------------------------------------------------------------- */ ++ ++ .global enable_pmu @ export this function for the linker ++ /* Global PMU enable */ ++ /* void enable_pmu(void) */ ++enable_pmu: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x01 /* Set E bit */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ ++ .global disable_pmu @ export this function for the linker ++ /* Global PMU disable */ ++ /* void disable_pmu(void) */ ++disable_pmu: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ BIC r0, r0, #0x01 /* Clear E bit */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ ++ .global enable_ccnt @ export this function for the linker ++ /* Enable the CCNT */ ++ /* void enable_ccnt(void) */ ++enable_ccnt: ++ MOV r0, #0x80000000 /* Set C bit */ ++ MCR p15, 0, r0, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global disable_ccnt @ export this function for the linker ++ /* Disable the CCNT */ ++ /* void disable_ccnt(void) */ ++disable_ccnt: ++ MOV r0, #0x80000000 /* Clear C bit */ ++ MCR p15, 0, r0, c9, c12, 2 /* Write CNTENC Register */ ++ BX lr ++ ++ ++ ++ .global enable_pmn @ export this function for the linker ++ /* Enable PMN{n} */ ++ /* void enable_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++enable_pmn: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r1, r1, LSL r0 ++ ++ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global disable_pmn @ export this function for the linker ++ /* Enable PMN{n} */ ++ /* void disable_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++disable_pmn: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r1, r1, LSL r0 ++ ++ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global enable_pmu_user_access @ export this function for the linker ++ /* Enables User mode access to the PMU (must be called in a priviledge */ ++ /* void enable_pmu_user_access(void) */ ++enable_pmu_user_access: ++ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ ++ ORR r0, r0, #0x01 /* Set EN bit (bit 0) */ ++ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ ++ BX lr ++ ++ ++ ++ .global disable_pmu_user_access @ export this function for the linke ++ /* Disables User mode access to the PMU (must be called in a priviledg */ ++ /* void disable_pmu_user_access(void) */ ++disable_pmu_user_access: ++ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ ++ BIC r0, r0, #0x01 /* Clear EN bit (bit 0) */ ++ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Counter read registers */ ++ /* --------------------------------------------------------------- */ ++ ++ .global read_ccnt @ export this function for the linker ++ /* Returns the value of CCNT */ ++ /* uint32_t read_ccnt(void) */ ++read_ccnt: ++ MRC p15, 0, r0, c9, c13, 0 /* Read CCNT Register */ ++ BX lr ++ ++ ++ .global read_pmn @ export this function for the linker ++ /* Returns the value of PMN{n} */ ++ /* uint32_t read_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to read (e.g. 0 for PMN0, 1 for PMN1) * ++read_pmn: */ ++ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ ++ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ ++ MRC p15, 0, r0, c9, c13, 2 /* Read current PMNx Register */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Software Increment */ ++ /* --------------------------------------------------------------- */ ++ ++ .global pmu_software_increment @ export this function for the linker ++ /* Writes to software increment register */ ++ /* void pmu_software_increment(uint32_t counter) */ ++ /* counter = r0 = The counter to increment (e.g. 0 for PMN0, 1 for PMN ++pmu_software_increment: */ ++ MOV r1, #0x01 ++ MOV r1, r1, LSL r0 ++ MCR p15, 0, r1, c9, c12, 4 /* Write SWINCR Register */ ++ BX lr ++ ++ /* --------------------------------------------------------------- */ ++ /* Overflow & Interrupt Generation */ ++ /* --------------------------------------------------------------- */ ++ ++ .global read_flags @ export this function for the linker ++ /* Returns the value of the overflow flags */ ++ /* uint32_t read_flags(void) */ ++read_flags: ++ MRC p15, 0, r0, c9, c12, 3 /* Read FLAG Register */ ++ BX lr ++ ++ ++ .global write_flags @ export this function for the linker ++ /* Writes the overflow flags */ ++ /* void write_flags(uint32_t flags) */ ++write_flags: ++ MCR p15, 0, r0, c9, c12, 3 /* Write FLAG Register */ ++ BX lr ++ ++ ++ .global enable_ccnt_irq @ export this function for the linker ++ /* Enables interrupt generation on overflow of the CCNT */ ++ /* void enable_ccnt_irq(void) */ ++enable_ccnt_irq: ++ MOV r0, #0x80000000 ++ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ ++ BX lr ++ ++ .global disable_ccnt_irq @ export this function for the linker ++ /* Disables interrupt generation on overflow of the CCNT */ ++ /* void disable_ccnt_irq(void) */ ++disable_ccnt_irq: ++ MOV r0, #0x80000000 ++ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ ++ BX lr ++ ++ ++ .global enable_pmn_irq @ export this function for the linker ++ /* Enables interrupt generation on overflow of PMN{x} */ ++ /* void enable_pmn_irq(uint32_t counter) */ ++ /* counter = r0 = The counter to enable the interrupt for (e.g. 0 for ++enable_pmn_irq: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter */ ++ MOV r0, r1, LSL r0 ++ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ ++ BX lr ++ ++ .global disable_pmn_irq @ export this function for the linker ++ /* Disables interrupt generation on overflow of PMN{x} */ ++ /* void disable_pmn_irq(uint32_t counter) */ ++ /* counter = r0 = The counter to disable the interrupt for (e.g. 0 fo ++disable_pmn_irq: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r0, r1, LSL r0 ++ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ ++ BX lr ++ ++ /* --------------------------------------------------------------- */ ++ /* Reset Functions */ ++ /* --------------------------------------------------------------- */ ++ ++ .global reset_pmn @ export this function for the linker ++ /* Resets the programmable counters */ ++ /* void reset_pmn(void) */ ++reset_pmn: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x02 /* Set P bit (Event Counter Reset) */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ .global reset_ccnt @ export this function for the linker ++ /* Resets the CCNT */ ++ /* void reset_ccnt(void) */ ++reset_ccnt: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x04 /* Set C bit (Event Counter Reset) */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ .end @end of code, this line is optional. ++/* ------------------------------------------------------------ */ ++/* End of v7_pmu.s */ ++/* ------------------------------------------------------------ */ ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/v7_pmu.h +@@ -0,0 +1,113 @@ ++// ------------------------------------------------------------ ++// PMU for Cortex-A/R (v7-A/R) ++// ------------------------------------------------------------ ++ ++#ifndef _V7_PMU_H ++#define _V7_PMU_H ++ ++// Returns the number of progammable counters ++unsigned int getPMN(void); ++ ++// Sets the event for a programmable counter to record ++// counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1) ++// event = r1 = The event code (from appropiate TRM or ARM Architecture Reference Manual) ++void pmn_config(unsigned int counter, unsigned int event); ++ ++// Enables/disables the divider (1/64) on CCNT ++// divider = r0 = If 0 disable divider, else enable dvider ++void ccnt_divider(int divider); ++ ++// ++// Enables and disables ++// ++ ++// Global PMU enable ++// On ARM11 this enables the PMU, and the counters start immediately ++// On Cortex this enables the PMU, there are individual enables for the counters ++void enable_pmu(void); ++ ++// Global PMU disable ++// On Cortex, this overrides the enable state of the individual counters ++void disable_pmu(void); ++ ++// Enable the CCNT ++void enable_ccnt(void); ++ ++// Disable the CCNT ++void disable_ccnt(void); ++ ++// Enable PMN{n} ++// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++void enable_pmn(unsigned int counter); ++ ++// Enable PMN{n} ++// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++void disable_pmn(unsigned int counter); ++ ++// ++// Read counter values ++// ++ ++// Returns the value of CCNT ++unsigned int read_ccnt(void); ++ ++// Returns the value of PMN{n} ++// counter = The counter to read (e.g. 0 for PMN0, 1 for PMN1) ++unsigned int read_pmn(unsigned int counter); ++ ++// ++// Overflow and interrupts ++// ++ ++// Returns the value of the overflow flags ++unsigned int read_flags(void); ++ ++// Writes the overflow flags ++void write_flags(unsigned int flags); ++ ++// Enables interrupt generation on overflow of the CCNT ++void enable_ccnt_irq(void); ++ ++// Disables interrupt generation on overflow of the CCNT ++void disable_ccnt_irq(void); ++ ++// Enables interrupt generation on overflow of PMN{x} ++// counter = The counter to enable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) ++void enable_pmn_irq(unsigned int counter); ++ ++// Disables interrupt generation on overflow of PMN{x} ++// counter = r0 = The counter to disable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) ++void disable_pmn_irq(unsigned int counter); ++ ++// ++// Counter reset functions ++// ++ ++// Resets the programmable counters ++void reset_pmn(void); ++ ++// Resets the CCNT ++void reset_ccnt(void); ++ ++// ++// Software Increment ++ ++// Writes to software increment register ++// counter = The counter to increment (e.g. 0 for PMN0, 1 for PMN1) ++void pmu_software_increment(unsigned int counter); ++ ++// ++// User mode access ++// ++ ++// Enables User mode access to the PMU (must be called in a priviledged mode) ++void enable_pmu_user_access(void); ++ ++// Disables User mode access to the PMU (must be called in a priviledged mode) ++void disable_pmu_user_access(void); ++ ++#endif ++// ------------------------------------------------------------ ++// End of v7_pmu.h ++// ------------------------------------------------------------ + --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c @@ -5070,7 +8236,7 @@ int next_phase_check; /* lowpass for phase check frequency */ int phase_offset; /* currently applied offset to presentation time in ns */ -@@ -136,32 +100,18 @@ +@@ -136,264 +100,415 @@ bool native_interlaced; bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ bool b_progressive; @@ -5084,13 +8250,22 @@ + vout_subpic_t subs[SUBS_MAX]; + + picture_pool_t * pic_pool; ++ ++ struct vout_isp_conf_s { ++ MMAL_COMPONENT_T *component; ++ MMAL_PORT_T * input; ++ MMAL_PORT_T * output; ++ MMAL_QUEUE_T * out_q; ++ MMAL_POOL_T * in_pool; ++ MMAL_POOL_T * out_pool; ++ bool pending; ++ } isp; }; -+ - /* Utility functions */ +-/* Utility functions */ -static inline uint32_t align(uint32_t x, uint32_t y); - static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, - const video_format_t *fmt); +-static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, +- const video_format_t *fmt); -/* VLC vout display callbacks */ -static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count); @@ -5104,13 +8279,18 @@ -/* MMAL callbacks */ -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -- - /* TV service */ - static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height); - static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, -@@ -169,221 +119,52 @@ - static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); - static int set_latency_target(vout_display_t *vd, bool enable); ++// ISP setup + +-/* TV service */ +-static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height); +-static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, +- uint32_t param2); +-static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); +-static int set_latency_target(vout_display_t *vd, bool enable); ++static inline bool want_isp(const vout_display_t * const vd) ++{ ++ return (vd->fmt.i_chroma == VLC_CODEC_MMAL_ZC_SAND10); ++} -/* DispManX */ -static void display_subpicture(vout_display_t *vd, subpicture_t *subpicture); @@ -5122,11 +8302,25 @@ -static void dmx_region_delete(struct dmx_region_t *dmx_region, - DISPMANX_UPDATE_HANDLE_T update); -static void show_background(vout_display_t *vd, bool enable); -+// Mmal - static void maintain_phase_sync(vout_display_t *vd); +-static void maintain_phase_sync(vout_display_t *vd); ++static MMAL_FOURCC_T vout_vlc_to_mmal_pic_fourcc(const unsigned int fcc) ++{ ++ switch (fcc){ ++ case VLC_CODEC_MMAL_OPAQUE: ++ return MMAL_ENCODING_OPAQUE; ++ case VLC_CODEC_MMAL_ZC_SAND8: ++ return MMAL_ENCODING_YUVUV128; ++ case VLC_CODEC_MMAL_ZC_SAND10: ++ return MMAL_ENCODING_YUVUV64_10; // It will be after we've converted it... ++ default: ++ break; ++ } ++ return 0; ++} -static int Open(vlc_object_t *object) --{ ++static void display_set_format(const vout_display_t * const vd, MMAL_ES_FORMAT_T *const es_fmt, const bool is_intermediate) + { - vout_display_t *vd = (vout_display_t *)object; - vout_display_sys_t *sys; - uint32_t buffer_pitch, buffer_height; @@ -5135,20 +8329,68 @@ - MMAL_STATUS_T status; - int ret = VLC_SUCCESS; - unsigned i; ++ const unsigned int w = is_intermediate ? vd->fmt.i_visible_width : vd->fmt.i_width ; ++ const unsigned int h = is_intermediate ? vd->fmt.i_visible_height : vd->fmt.i_height; ++ MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; ++ ++ es_fmt->type = MMAL_ES_TYPE_VIDEO; ++ es_fmt->encoding = is_intermediate ? MMAL_ENCODING_I420 : vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma);; ++ es_fmt->encoding_variant = 0; ++ ++ v_fmt->width = (w + 31) & ~31; ++ v_fmt->height = (h + 15) & ~15; ++ v_fmt->crop.x = 0; ++ v_fmt->crop.y = 0; ++ v_fmt->crop.width = w; ++ v_fmt->crop.height = h; ++ if (vd->fmt.i_sar_num == 0 || vd->fmt.i_sar_den == 0) { ++ v_fmt->par.num = 1; ++ v_fmt->par.den = 1; ++ } else { ++ v_fmt->par.num = vd->fmt.i_sar_num; ++ v_fmt->par.den = vd->fmt.i_sar_den; ++ } ++ v_fmt->frame_rate.num = vd->fmt.i_frame_rate; ++ v_fmt->frame_rate.den = vd->fmt.i_frame_rate_base; ++ v_fmt->color_space = vlc_to_mmal_color_space(vd->fmt.space); ++} - if (vout_display_IsWindowed(vd)) - return VLC_EGENERIC; -- ++static void display_src_rect(const vout_display_t * const vd, MMAL_RECT_T *const rect) ++{ ++ const bool wants_isp = want_isp(vd); ++ rect->x = wants_isp ? 0 : vd->fmt.i_x_offset; ++ rect->y = wants_isp ? 0 : vd->fmt.i_y_offset; ++ rect->width = vd->fmt.i_visible_width; ++ rect->height = vd->fmt.i_visible_height; ++} + - sys = calloc(1, sizeof(struct vout_display_sys_t)); - if (!sys) - return VLC_ENOMEM; - vd->sys = sys; -- ++static void isp_input_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++#if TRACE_ALL ++ vout_display_t * const vd = (vout_display_t *)port->userdata; ++ pic_ctx_mmal_t * ctx = buf->user_data; ++ msg_Dbg(vd, "<<< %s: cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buf->cmd, ctx, buf, ++ buf->flags, (long long)buf->pts); ++#else ++ VLC_UNUSED(port); ++#endif + - sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); - bcm_host_init(); -- ++ mmal_buffer_header_release(buf); + - sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; -- ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s", __func__); ++#endif ++} + - status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); - if (status != MMAL_SUCCESS) { - msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", @@ -5156,7 +8398,11 @@ - ret = VLC_EGENERIC; - goto out; - } -- ++static void isp_control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ ++ vout_display_t *vd = (vout_display_t *)port->userdata; ++ MMAL_STATUS_T status; + - sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; - status = mmal_port_enable(sys->component->control, control_port_cb); - if (status != MMAL_SUCCESS) { @@ -5164,11 +8410,16 @@ - sys->component->control->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } -- ++ if (buffer->cmd == MMAL_EVENT_ERROR) { ++ status = *(uint32_t *)buffer->data; ++ msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); + } + - sys->input = sys->component->input[0]; - sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)vd; -- ++ mmal_buffer_header_release(buffer); ++} + - if (sys->opaque) { - sys->input->format->encoding = MMAL_ENCODING_OPAQUE; - sys->i_planes = 1; @@ -5190,16 +8441,14 @@ - sys->input->format->es->video.crop.height = vd->fmt.i_height; - sys->input->format->es->video.par.num = vd->source.i_sar_num; - sys->input->format->es->video.par.den = vd->source.i_sar_den; -+static void vd_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++static void isp_output_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) +{ -+#if TRACE_ALL -+ vout_display_t * const vd = (vout_display_t *)port->userdata; -+ pic_ctx_mmal_t * ctx = buf->user_data; -+ msg_Dbg(vd, "<<< %s[%d] cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buf->cmd, ctx, buf, -+ buf->flags, (long long)buf->pts); -+#else -+ VLC_UNUSED(port); -+#endif ++ if (buf->cmd == 0 && buf->length != 0) ++ { ++ // The filter structure etc. should always exist if we have contents ++ // but might not on later flushes as we shut down ++ vout_display_t * const vd = (vout_display_t *)port->userdata; ++ struct vout_isp_conf_s *const isp = &vd->sys->isp; - status = mmal_port_format_commit(sys->input); - if (status != MMAL_SUCCESS) { @@ -5207,9 +8456,21 @@ - sys->input->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } ++#if TRACE_ALL ++ msg_Dbg(vd, "<<< %s: cmd=%d; flags=%#x, pts=%lld", __func__, buf->cmd, buf->flags, (long long) buf->pts); ++#endif ++ mmal_queue_put(isp->out_q, buf); ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s: out Q len=%d", __func__, mmal_queue_length(isp->out_q)); ++#endif + } - sys->input->buffer_size = sys->input->buffer_size_recommended; -+ mmal_buffer_header_release(buf); ++ else ++ { ++ mmal_buffer_header_reset(buf); ++ mmal_buffer_header_release(buf); ++ } ++} - vout_display_PlacePicture(&place, &vd->source, vd->cfg, false); - display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; @@ -5232,100 +8493,189 @@ - status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } -+#if TRACE_ALL -+ msg_Dbg(vd, ">>> %s", __func__); -+#endif ++static void isp_empty_out_q(struct vout_isp_conf_s * const isp) ++{ ++ MMAL_BUFFER_HEADER_T * buf; ++ // We can be called as part of error recovery so allow for missing Q ++ if (isp->out_q == NULL) ++ return; ++ ++ while ((buf = mmal_queue_get(isp->out_q)) != NULL) ++ mmal_buffer_header_release(buf); ++} ++ ++static void isp_flush(struct vout_isp_conf_s * const isp) ++{ ++ if (!isp->input->is_enabled) ++ mmal_port_disable(isp->input); ++ ++ if (isp->output->is_enabled) ++ mmal_port_disable(isp->output); ++ ++ isp_empty_out_q(isp); ++ isp->pending = false; +} ++ ++static MMAL_STATUS_T isp_prepare(vout_display_t * const vd, struct vout_isp_conf_s * const isp) ++{ ++ MMAL_STATUS_T err; ++ MMAL_BUFFER_HEADER_T * buf; ++ ++ if (!isp->output->is_enabled) { ++ if ((err = mmal_port_enable(isp->output, isp_output_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "ISP output port enable failed"); ++ return err; ++ } + } - for (i = 0; i < sys->i_planes; ++i) { - sys->planes[i].i_lines = buffer_height; - sys->planes[i].i_pitch = buffer_pitch; - sys->planes[i].i_visible_lines = vd->fmt.i_visible_height; - sys->planes[i].i_visible_pitch = vd->fmt.i_visible_width; -+static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height) -+{ -+ TV_DISPLAY_STATE_T display_state; -+ int ret = 0; ++ while ((buf = mmal_queue_get(isp->out_pool->queue)) != NULL) { ++ if ((err = mmal_port_send_buffer(isp->output, buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "ISP output port stuff failed"); ++ return err; ++ } ++ } - if (i > 0) { - sys->planes[i].i_lines /= 2; - sys->planes[i].i_pitch /= 2; - sys->planes[i].i_visible_lines /= 2; - sys->planes[i].i_visible_pitch /= 2; -+ if (vc_tv_get_display_state(&display_state) == 0) { -+ if (display_state.state & 0xFF) { -+ *width = display_state.display.hdmi.width; -+ *height = display_state.display.hdmi.height; -+ } else if (display_state.state & 0xFF00) { -+ *width = display_state.display.sdtv.width; -+ *height = display_state.display.sdtv.height; -+ } else { -+ msg_Warn(vd, "Invalid display state %"PRIx32, display_state.state); -+ ret = -1; ++ if (!isp->input->is_enabled) { ++ if ((err = mmal_port_enable(isp->input, isp_input_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "ISP input port enable failed"); ++ return err; } -- } -- + } ++ return MMAL_SUCCESS; ++} + - vlc_mutex_init(&sys->buffer_mutex); - vlc_cond_init(&sys->buffer_cond); - vlc_mutex_init(&sys->manage_mutex); -- ++static void isp_close(vout_display_t * const vd, vout_display_sys_t * const vd_sys) ++{ ++ struct vout_isp_conf_s * const isp = &vd_sys->isp; ++ VLC_UNUSED(vd); + - vd->pool = vd_pool; - vd->prepare = vd_prepare; - vd->display = vd_display; - vd->control = vd_control; - vd->manage = vd_manage; -- ++ if (isp->component == NULL) ++ return; + - vc_tv_register_callback(tvservice_cb, vd); -- ++ isp_flush(isp); + - if (query_resolution(vd, &sys->display_width, &sys->display_height) >= 0) { - vout_display_SendEventDisplaySize(vd, sys->display_width, sys->display_height); - } else { +- } else { - sys->display_width = vd->cfg->display.width; - sys->display_height = vd->cfg->display.height; -+ msg_Warn(vd, "Failed to query display resolution"); -+ ret = -1; ++ if (isp->component->control->is_enabled) ++ mmal_port_disable(isp->component->control); ++ ++ if (isp->out_q != NULL) { ++ // 1st junk anything lying around ++ isp_empty_out_q(isp); ++ ++ mmal_queue_destroy(isp->out_q); ++ isp->out_q = NULL; } - sys->dmx_handle = vc_dispmanx_display_open(0); - vd->info.subpicture_chromas = subpicture_chromas; -- ++ if (isp->out_pool != NULL) { ++ mmal_port_pool_destroy(isp->output, isp->out_pool); ++ isp->out_pool = NULL; ++ } + - vout_display_DeleteWindow(vd, NULL); -- ++ isp->input = NULL; ++ isp->output = NULL; + -out: - if (ret != VLC_SUCCESS) - Close(object); -- - return ret; ++ mmal_component_release(isp->component); ++ isp->component = NULL; + +- return ret; ++ return; } -static void Close(vlc_object_t *object) --{ ++// Restuff into output rather than return to pool is we can ++static MMAL_BOOL_T isp_out_pool_cb(MMAL_POOL_T *pool, MMAL_BUFFER_HEADER_T *buffer, void *userdata) + { - vout_display_t *vd = (vout_display_t *)object; - vout_display_sys_t *sys = vd->sys; - char response[20]; /* answer is hvs_update_fields=%1d */ - unsigned i; -- ++ struct vout_isp_conf_s * const isp = userdata; ++ VLC_UNUSED(pool); ++ if (isp->output->is_enabled) { ++ mmal_buffer_header_reset(buffer); ++ if (mmal_port_send_buffer(isp->output, buffer) == MMAL_SUCCESS) ++ return MMAL_FALSE; ++ } ++ return MMAL_TRUE; ++} + - vc_tv_unregister_callback_full(tvservice_cb, vd); -- ++static MMAL_STATUS_T isp_setup(vout_display_t * const vd, vout_display_sys_t * const vd_sys) ++{ ++ struct vout_isp_conf_s * const isp = &vd_sys->isp; ++ MMAL_STATUS_T err; + - if (sys->dmx_handle) - close_dmx(vd); -- ++ if ((err = mmal_component_create(MMAL_COMPONENT_ISP_RESIZER, &isp->component)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Cannot create ISP component"); ++ return err; ++ } ++ isp->input = isp->component->input[0]; ++ isp->output = isp->component->output[0]; + - if (sys->component && sys->component->control->is_enabled) - mmal_port_disable(sys->component->control); -- ++ isp->component->control->userdata = (void *)vd; ++ if ((err = mmal_port_enable(isp->component->control, isp_control_port_cb)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable ISP control port"); ++ goto fail; ++ } + - if (sys->input && sys->input->is_enabled) - mmal_port_disable(sys->input); -- ++ isp->input->userdata = (void *)vd; ++ display_set_format(vd, isp->input->format, false); + - if (sys->component && sys->component->is_enabled) - mmal_component_disable(sys->component); -- ++ if ((err = port_parameter_set_bool(isp->input, MMAL_PARAMETER_ZERO_COPY, true)) != MMAL_SUCCESS) ++ goto fail; + - if (sys->pool) - mmal_port_pool_destroy(sys->input, sys->pool); -- ++ if ((err = mmal_port_format_commit(isp->input)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to set ISP input format"); ++ goto fail; ++ } + - if (sys->component) - mmal_component_release(sys->component); -- ++ isp->input->buffer_size = isp->input->buffer_size_recommended; ++ isp->input->buffer_num = 30; + - if (sys->picture_pool) - picture_pool_Release(sys->picture_pool); - else @@ -5334,35 +8684,194 @@ - mmal_buffer_header_release(sys->pictures[i]->p_sys->buffer); - picture_Release(sys->pictures[i]); - } -- ++ if ((isp->in_pool = mmal_pool_create(isp->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(vd, "Failed to create input pool"); ++ goto fail; ++ } + - vlc_mutex_destroy(&sys->buffer_mutex); - vlc_cond_destroy(&sys->buffer_cond); - vlc_mutex_destroy(&sys->manage_mutex); -- ++ if ((isp->out_q = mmal_queue_create()) == NULL) ++ { ++ err = MMAL_ENOMEM; ++ goto fail; ++ } + - if (sys->native_interlaced) { - if (vc_gencmd(response, sizeof(response), "hvs_update_fields 0") < 0 || - response[18] != '0') - msg_Warn(vd, "Could not reset hvs field mode"); -- } -- ++ display_set_format(vd, isp->output->format, true); ++ ++ if ((err = port_parameter_set_bool(isp->output, MMAL_PARAMETER_ZERO_COPY, true)) != MMAL_SUCCESS) ++ goto fail; ++ ++ if ((err = mmal_port_format_commit(isp->output)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to set ISP input format"); ++ goto fail; + } + - free(sys->pictures); - free(sys); -- ++ isp->output->buffer_size = isp->output->buffer_size_recommended; ++ isp->output->buffer_num = 2; ++ isp->output->userdata = (void *)vd; + - bcm_host_deinit(); --} -- ++ if ((isp->out_pool = mmal_port_pool_create(isp->output, isp->output->buffer_num, isp->output->buffer_size)) == NULL) ++ { ++ msg_Err(vd, "Failed to make ISP port pool"); ++ goto fail; ++ } ++ ++ mmal_pool_callback_set(isp->out_pool, isp_out_pool_cb, isp); ++ ++ if ((err = isp_prepare(vd, isp)) != MMAL_SUCCESS) ++ goto fail; ++ ++ return MMAL_SUCCESS; ++ ++fail: ++ isp_close(vd, vd_sys); ++ return err; + } + -static inline uint32_t align(uint32_t x, uint32_t y) { - uint32_t mod = x % y; - if (mod == 0) - return x; -- else ++static MMAL_STATUS_T isp_check(vout_display_t * const vd, vout_display_sys_t * const vd_sys) ++{ ++ struct vout_isp_conf_s *const isp = &vd_sys->isp; ++ const bool has_isp = (isp->component != NULL); ++ const bool wants_isp = want_isp(vd); ++ ++ if (has_isp == wants_isp) ++ { ++ // All OK - do nothing ++ } ++ else if (has_isp) ++ { ++ // ISP active but we don't want it ++ isp_flush(isp); ++ ++ // Check we have everything back and then kill it ++ if (mmal_queue_length(isp->out_pool->queue) == isp->output->buffer_num) ++ isp_close(vd, vd_sys); ++ } + else - return x + y - mod; --} -- ++ { ++ // ISP closed but we want it ++ return isp_setup(vd, vd_sys); ++ } ++ ++ return MMAL_SUCCESS; ++} ++ ++/* TV service */ ++static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, ++ uint32_t param2); ++static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); ++static int set_latency_target(vout_display_t *vd, bool enable); ++ ++// Mmal ++static void maintain_phase_sync(vout_display_t *vd); ++ ++ ++ ++static void vd_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++#if TRACE_ALL ++ vout_display_t * const vd = (vout_display_t *)port->userdata; ++ pic_ctx_mmal_t * ctx = buf->user_data; ++ msg_Dbg(vd, "<<< %s: cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buf->cmd, ctx, buf, ++ buf->flags, (long long)buf->pts); ++#else ++ VLC_UNUSED(port); ++#endif ++ ++ mmal_buffer_header_release(buf); ++ ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s", __func__); ++#endif ++} ++ ++static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height) ++{ ++ TV_DISPLAY_STATE_T display_state; ++ int ret = 0; ++ ++ if (vc_tv_get_display_state(&display_state) == 0) { ++ msg_Dbg(vd, "State=%#x", display_state.state); ++ if (display_state.state & 0xFF) { ++ msg_Dbg(vd, "HDMI: %dx%d", display_state.display.hdmi.width, display_state.display.hdmi.height); ++ *width = display_state.display.hdmi.width; ++ *height = display_state.display.hdmi.height; ++ } else if (display_state.state & 0xFF00) { ++ msg_Dbg(vd, "SDTV: %dx%d", display_state.display.sdtv.width, display_state.display.sdtv.height); ++ *width = display_state.display.sdtv.width; ++ *height = display_state.display.sdtv.height; ++ } else { ++ msg_Warn(vd, "Invalid display state %"PRIx32, display_state.state); ++ ret = -1; ++ } ++ } else { ++ msg_Warn(vd, "Failed to query display resolution"); ++ ret = -1; ++ } ++ ++ return ret; + } + static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, const video_format_t *fmt) { -@@ -426,8 +207,9 @@ +- vout_display_sys_t *sys = vd->sys; ++ vout_display_sys_t * const sys = vd->sys; + vout_display_place_t place; + MMAL_DISPLAYREGION_T display_region; + MMAL_STATUS_T status; + + if (!cfg && !fmt) ++ { ++ msg_Err(vd, "%s: Missing cfg & fmt", __func__); + return -EINVAL; ++ } ++ ++ isp_check(vd, sys); + + if (fmt) { + sys->input->format->es->video.par.num = fmt->i_sar_num; +@@ -412,22 +527,29 @@ + if (!cfg) + cfg = vd->cfg; + +- vout_display_PlacePicture(&place, fmt, cfg, false); ++ { ++ // Ignore what VLC thinks might be going on with display size ++ vout_display_cfg_t tcfg = *cfg; ++ tcfg.display.width = sys->display_width; ++ tcfg.display.height = sys->display_height; ++ tcfg.is_display_filled = true; ++ vout_display_PlacePicture(&place, fmt, &tcfg, false); ++ ++ msg_Dbg(vd, "%dx%d -> %dx%d @ %d,%d", tcfg.display.width, tcfg.display.height, place.width, place.height, place.x, place.y); ++ } + + display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; + display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); + display_region.fullscreen = MMAL_FALSE; +- display_region.src_rect.x = fmt->i_x_offset; +- display_region.src_rect.y = fmt->i_y_offset; +- display_region.src_rect.width = fmt->i_visible_width; +- display_region.src_rect.height = fmt->i_visible_height; ++ display_src_rect(vd, &display_region.src_rect); + display_region.dest_rect.x = place.x; + display_region.dest_rect.y = place.y; display_region.dest_rect.width = place.width; display_region.dest_rect.height = place.height; display_region.layer = sys->layer; @@ -5373,7 +8882,7 @@ status = mmal_port_parameter_set(sys->input, &display_region.hdr); if (status != MMAL_SUCCESS) { msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", -@@ -435,7 +217,6 @@ +@@ -435,7 +557,6 @@ return -EINVAL; } @@ -5381,7 +8890,7 @@ sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -@@ -446,171 +227,103 @@ +@@ -446,191 +567,130 @@ return 0; } @@ -5486,31 +8995,48 @@ + sys->i_frame_rate = p_pic->format.i_frame_rate; + sys->i_frame_rate_base = p_pic->format.i_frame_rate_base; + configure_display(vd, NULL, &p_pic->format); ++ } ++ ++ if (!sys->input->is_enabled && ++ (err = mmal_port_enable(sys->input, vd_input_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Input port enable failed"); ++ goto fail; ++ } ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ if (sys->isp.pending) { ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->isp.out_q); ++ sys->isp.pending = false; ++#if TRACE_ALL ++ msg_Dbg(vd, "--- %s: ISP stuff", __func__); ++#endif ++ if (mmal_port_send_buffer(sys->input, buf) != MMAL_SUCCESS) ++ { ++ mmal_buffer_header_release(buf); ++ msg_Err(vd, "Send ISP buffer to render input failed"); ++ goto fail; ++ } } - +- - memset(&picture_res, 0, sizeof(picture_resource_t)); - sys->pictures = calloc(sys->num_buffers, sizeof(picture_t *)); - for (i = 0; i < sys->num_buffers; ++i) { - picture_res.p_sys = calloc(1, sizeof(picture_sys_t)); - picture_res.p_sys->owner = (vlc_object_t *)vd; - picture_res.p_sys->buffer = mmal_queue_get(sys->pool->queue); - +- - sys->pictures[i] = picture_NewFromResource(&fmt, &picture_res); - if (!sys->pictures[i]) { - msg_Err(vd, "Failed to create picture"); - free(picture_res.p_sys); - goto out; -+ if (!sys->input->is_enabled && -+ (err = mmal_port_enable(sys->input, vd_input_port_cb)) != MMAL_SUCCESS) -+ { -+ msg_Err(vd, "Input port enable failed"); -+ goto fail; -+ } -+ -+ // Stuff into input -+ // We assume the BH is already set up with values reflecting pic date etc. ++ else + { + MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++#if TRACE_ALL ++ msg_Dbg(vd, "--- %s: Buf stuff", __func__); ++#endif + if ((err = port_send_replicated(sys->input, sys->pool, pic_buf, pic_buf->pts)) != MMAL_SUCCESS) + { + msg_Err(vd, "Send buffer to input failed"); @@ -5622,7 +9148,31 @@ } static int vd_control(vout_display_t *vd, int query, va_list args) -@@ -640,11 +353,39 @@ + { +- vout_display_sys_t *sys = vd->sys; +- vout_display_cfg_t cfg; +- const vout_display_cfg_t *tmp_cfg; ++ vout_display_sys_t * const sys = vd->sys; + int ret = VLC_EGENERIC; ++ VLC_UNUSED(args); + + switch (query) { + case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: +- tmp_cfg = va_arg(args, const vout_display_cfg_t *); +- if (tmp_cfg->display.width == sys->display_width && +- tmp_cfg->display.height == sys->display_height) { +- cfg = *vd->cfg; +- cfg.display.width = sys->display_width; +- cfg.display.height = sys->display_height; +- if (configure_display(vd, &cfg, NULL) >= 0) +- ret = VLC_SUCCESS; +- } ++ // Ignore this - we just use full screen anyway ++ ret = VLC_SUCCESS; + break; + + case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: +@@ -640,10 +700,37 @@ break; case VOUT_DISPLAY_RESET_PICTURES: @@ -5635,8 +9185,9 @@ + case VOUT_DISPLAY_CHANGE_ZOOM: msg_Warn(vd, "Unsupported control query %d", query); - break; - ++ ret = VLC_SUCCESS; ++ break; ++ + case VOUT_DISPLAY_CHANGE_MMAL_HIDE: + { + MMAL_STATUS_T err; @@ -5651,19 +9202,16 @@ + (err = mmal_port_disable(sys->input)) != MMAL_SUCCESS) + { + msg_Err(vd, "Unable to disable port: err=%d", err); -+ ret = VLC_EGENERIC; + break; + } + sys->force_config = true; -+ + ret = VLC_SUCCESS; -+ break; + break; + } -+ + default: msg_Warn(vd, "Unknown control query %d", query); - break; -@@ -661,13 +402,11 @@ +@@ -661,13 +748,11 @@ vlc_mutex_lock(&sys->manage_mutex); if (sys->need_configure_display) { @@ -5679,25 +9227,12 @@ } sys->need_configure_display = false; -@@ -676,56 +415,45 @@ +@@ -676,56 +761,76 @@ vlc_mutex_unlock(&sys->manage_mutex); } -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) --{ -- vout_display_t *vd = (vout_display_t *)port->userdata; -- MMAL_STATUS_T status; -- -- if (buffer->cmd == MMAL_EVENT_ERROR) { -- status = *(uint32_t *)buffer->data; -- msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); -- } -- -- mmal_buffer_header_release(buffer); --} -- --static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -+static void vd_prepare(vout_display_t *vd, picture_t *picture, ++static void vd_prepare(vout_display_t *vd, picture_t *p_pic, +#if VLC_VER_3 + subpicture_t *subpicture +#else @@ -5706,11 +9241,51 @@ + ) { - vout_display_t *vd = (vout_display_t *)port->userdata; -+ VLC_UNUSED(picture); +- MMAL_STATUS_T status; ++ MMAL_STATUS_T err; ++ vout_display_sys_t * const sys = vd->sys; + +- if (buffer->cmd == MMAL_EVENT_ERROR) { +- status = *(uint32_t *)buffer->data; +- msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); + VLC_UNUSED(subpicture); +// VLC_UNUSED(date); + + vd_manage(vd); ++ ++ if (isp_check(vd, sys) != MMAL_SUCCESS) { ++ return; + } + +- mmal_buffer_header_release(buffer); +-} ++ if (want_isp(vd)) ++ { ++ struct vout_isp_conf_s * const isp = &sys->isp; ++ MMAL_BUFFER_HEADER_T * buf; ++ ++ // This should be empty - make it so if it isn't ++ isp_empty_out_q(isp); ++ isp->pending = false; + +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +-{ +- vout_display_t *vd = (vout_display_t *)port->userdata; ++ // Stuff output ++ if (isp_prepare(vd, isp) != MMAL_SUCCESS) ++ return; ++ ++ buf = pic_mmal_buffer(p_pic); ++ if ((err = port_send_replicated(isp->input, isp->in_pool, ++ buf, buf->pts)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Send buffer to input failed"); ++ return; ++ } ++ ++ isp->pending = true; ++ } ++ +#if 0 + VLC_UNUSED(date); vout_display_sys_t *sys = vd->sys; @@ -5765,7 +9340,7 @@ } static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) -@@ -828,148 +556,12 @@ +@@ -828,148 +933,12 @@ } } @@ -5915,7 +9490,7 @@ ((double)vd->sys->i_frame_rate / vd->sys->i_frame_rate_base); vout_display_sys_t *sys = vd->sys; -@@ -1012,32 +604,258 @@ +@@ -1012,32 +981,260 @@ } } @@ -5990,6 +9565,8 @@ + if (sys->component) + mmal_component_release(sys->component); + ++ isp_close(vd, sys); ++ + vlc_mutex_destroy(&sys->manage_mutex); + + if (sys->native_interlaced) { @@ -6015,11 +9592,12 @@ + MMAL_DISPLAYREGION_T display_region; + MMAL_STATUS_T status; + int ret = VLC_EGENERIC; ++ const MMAL_FOURCC_T enc_in = vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma); + +#if TRACE_ALL + msg_Dbg(vd, "<<< %s", __func__); +#endif -+ if (vd->fmt.i_chroma != VLC_CODEC_MMAL_OPAQUE) ++ if (enc_in == 0) + { +#if TRACE_ALL + msg_Dbg(vd, ">>> %s: Format not MMAL", __func__); @@ -6032,6 +9610,8 @@ + return VLC_ENOMEM; + vd->sys = sys; + ++ bcm_host_init(); ++ + sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); + + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); @@ -6052,18 +9632,12 @@ + sys->input = sys->component->input[0]; + sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)vd; + -+ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; ++ sys->input->format->encoding = enc_in; ++ sys->input->format->encoding_variant = 0; + sys->i_planes = 1; + sys->buffer_size = sys->input->buffer_size_recommended; + -+ sys->input->format->es->video.width = vd->fmt.i_width; -+ sys->input->format->es->video.height = vd->fmt.i_height; -+ sys->input->format->es->video.crop.x = 0; -+ sys->input->format->es->video.crop.y = 0; -+ sys->input->format->es->video.crop.width = vd->fmt.i_width; -+ sys->input->format->es->video.crop.height = vd->fmt.i_height; -+ sys->input->format->es->video.par.num = vd->source.i_sar_num; -+ sys->input->format->es->video.par.den = vd->source.i_sar_den; ++ display_set_format(vd, sys->input->format, want_isp(vd)); + + status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); + if (status != MMAL_SUCCESS) { @@ -6085,10 +9659,7 @@ + display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; + display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); + display_region.fullscreen = MMAL_FALSE; -+ display_region.src_rect.x = vd->fmt.i_x_offset; -+ display_region.src_rect.y = vd->fmt.i_y_offset; -+ display_region.src_rect.width = vd->fmt.i_visible_width; -+ display_region.src_rect.height = vd->fmt.i_visible_height; ++ display_src_rect(vd, &display_region.src_rect); + display_region.dest_rect.x = place.x; + display_region.dest_rect.y = place.y; + display_region.dest_rect.width = place.width; @@ -6153,6 +9724,14 @@ + + vlc_mutex_init(&sys->manage_mutex); + ++ vd->info = (vout_display_info_t){ ++ .is_slow = false, ++ .has_double_click = false, ++ .needs_hide_mouse = false, ++ .has_pictures_invalid = true, ++ .subpicture_chromas = NULL ++ }; ++ + vd->pool = vd_pool; + vd->prepare = vd_prepare; + vd->display = vd_display; @@ -6160,10 +9739,8 @@ + + vc_tv_register_callback(tvservice_cb, vd); + -+ if (query_resolution(vd, &sys->display_width, &sys->display_height) >= 0) { -+// vout_window_ReportSize(vd->cfg->window, -+// sys->display_width, sys->display_height); -+ } else { ++ if (query_resolution(vd, &sys->display_width, &sys->display_height) < 0) ++ { + sys->display_width = vd->cfg->display.width; + sys->display_height = vd->cfg->display.height; + } @@ -6202,7 +9779,7 @@ + --- /dev/null +++ b/modules/hw/mmal/xsplitter.c -@@ -0,0 +1,365 @@ +@@ -0,0 +1,403 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif @@ -6233,6 +9810,19 @@ + uint32_t changed; +} mmal_x11_sys_t; + ++static const char * str_fourcc(char * buf, unsigned int fcc) ++{ ++ if (fcc == 0) ++ return "----"; ++ buf[0] = (fcc >> 0) & 0xff; ++ buf[1] = (fcc >> 8) & 0xff; ++ buf[2] = (fcc >> 16) & 0xff; ++ buf[3] = (fcc >> 24) & 0xff; ++ buf[4] = 0; ++ return buf; ++} ++ ++ +static void unload_display_module(vout_display_t * const x_vout) +{ + if (x_vout != NULL) { @@ -6311,10 +9901,12 @@ + + if ((x_vout->module = module_need(x_vout, cap, module_name, true)) == NULL) + { -+ msg_Err(vd, "Failed to find X11 module"); ++ msg_Err(vd, "Failed to open Xsplitter:%s module", module_name); + goto fail; + } + ++ msg_Dbg(vd, "R/G/B: %08x/%08x/%08x", x_vout->fmt.i_rmask, x_vout->fmt.i_gmask, x_vout->fmt.i_bmask); ++ + return x_vout; + +fail: @@ -6337,9 +9929,18 @@ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; + vout_display_t * const x_vd = sys->cur_vout; +#if TRACE_ALL -+ msg_Dbg(vd, "<<< %s (count=%d) %dx%d", __func__, count, x_vd->fmt.i_width, x_vd->fmt.i_height); ++ char buf0[5]; ++ msg_Dbg(vd, "<<< %s (count=%d) %s:%dx%d->%s:%dx%d", __func__, count, ++ str_fourcc(buf0, vd->fmt.i_chroma), ++ vd->fmt.i_width, vd->fmt.i_height, ++ str_fourcc(buf0, x_vd->fmt.i_chroma), ++ x_vd->fmt.i_width, x_vd->fmt.i_height); ++#endif ++ picture_pool_t * pool = x_vd->pool(x_vd, count); ++#if TRACE_ALL ++ msg_Dbg(vd, ">>> %s: %p", __func__, pool); +#endif -+ return x_vd->pool(x_vd, count); ++ return pool; +} + +/* Prepare a picture and an optional subpicture for display (optional). @@ -6377,10 +9978,11 @@ +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; + vout_display_t * const x_vd = sys->cur_vout; -+ const bool is_mmal_pic = (pic->format.i_chroma == VLC_CODEC_MMAL_OPAQUE); ++ const bool is_mmal_pic = hw_mmal_pic_is_mmal(pic); + +#if TRACE_ALL -+ msg_Dbg(vd, "<<< %s: fmt: %dx%d/%dx%d, pic:%dx%d", __func__, vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, pic->format.i_width, pic->format.i_height); ++ msg_Dbg(vd, "<<< %s: fmt: %dx%d/%dx%d, pic:%dx%d, pts=%lld, mmal=%d/%d", __func__, vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, pic->format.i_width, pic->format.i_height, (long long)pic->date, ++ is_mmal_pic, sys->use_mmal); +#endif + + if (sys->use_mmal != is_mmal_pic) { @@ -6407,6 +10009,11 @@ + return result; +} + ++static bool want_mmal_vout(vout_display_t * vd, const mmal_x11_sys_t * const sys) ++{ ++ return sys->mmal_vout != NULL && var_InheritBool(vd, "fullscreen"); ++} ++ +/* Control on the module (mandatory) */ +static int mmal_x11_control(vout_display_t * vd, int ctl, va_list va) +{ @@ -6424,10 +10031,12 @@ + case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: + { + const vout_display_cfg_t * cfg = va_arg(va, const vout_display_cfg_t *); -+ const bool want_mmal = sys->mmal_vout != NULL && var_InheritBool(vd, "fullscreen"); ++ const bool want_mmal = want_mmal_vout(vd, sys); + vout_display_t *new_vd = want_mmal ? sys->mmal_vout : sys->x_vout; + -+ msg_Dbg(vd, "Change size: %d, %d", cfg->display.width, cfg->display.height); ++ msg_Dbg(vd, "Change size: %d, %d: mmal_vout=%p, want_mmal=%d, fs=%d", ++ cfg->display.width, cfg->display.height, sys->mmal_vout, want_mmal, ++ var_InheritBool(vd, "fullscreen")); + + if (sys->use_mmal != want_mmal) { + if (sys->use_mmal) { @@ -6466,7 +10075,10 @@ + + case VOUT_DISPLAY_RESET_PICTURES: + msg_Dbg(vd, "Reset pictures"); -+ rv = x_vd->control(x_vd, ctl, va); ++// rv = x_vd->control(x_vd, ctl, va); ++ rv = sys->x_vout->control(sys->x_vout, ctl, va); ++ if (sys->mmal_vout) ++ rv = sys->mmal_vout->control(sys->mmal_vout, ctl, va); + msg_Dbg(vd, "<<< %s: Pic reset: fmt: %dx%d<-%dx%d, source: %dx%d/%dx%d", __func__, + vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, + vd->source.i_width, vd->source.i_height, x_vd->source.i_width, x_vd->source.i_height); @@ -6502,19 +10114,6 @@ +} +#endif + -+static const char * str_fourcc(char * buf, unsigned int fcc) -+{ -+ if (fcc == 0) -+ return "----"; -+ buf[0] = (fcc >> 0) & 0xff; -+ buf[1] = (fcc >> 8) & 0xff; -+ buf[2] = (fcc >> 16) & 0xff; -+ buf[3] = (fcc >> 24) & 0xff; -+ buf[4] = 0; -+ return buf; -+} -+ -+ +static int OpenMmalX11(vlc_object_t *object) +{ + vout_display_t * const vd = (vout_display_t *)object; @@ -6526,6 +10125,14 @@ + } + vd->sys = (vout_display_sys_t *)sys; + ++ vd->info = (vout_display_info_t){ ++ .is_slow = false, ++ .has_double_click = false, ++ .needs_hide_mouse = false, ++ .has_pictures_invalid = true, ++ .subpicture_chromas = NULL ++ }; ++ + if ((sys->x_vout = load_display_module(vd, "vout display", "xcb_x11")) == NULL) + goto fail; + @@ -6536,10 +10143,6 @@ + msg_Info(vd, "Not a valid format for mmal vout (%s/%s)", str_fourcc(dbuf0, vd->fmt.i_chroma), str_fourcc(dbuf1, vd->source.i_chroma)); + } + -+ sys->cur_vout = sys->x_vout; -+ vd->info = sys->cur_vout->info; -+ vd->fmt = sys->cur_vout->fmt; -+ + vd->pool = mmal_x11_pool; + vd->prepare = mmal_x11_prepare; + vd->display = mmal_x11_display; @@ -6548,6 +10151,18 @@ + vd->manage = mmal_x11_manage; +#endif + ++ if (want_mmal_vout(vd, sys)) { ++ sys->cur_vout = sys->mmal_vout; ++ sys->use_mmal = true; ++ } ++ else { ++ sys->cur_vout = sys->x_vout; ++ sys->use_mmal = false; ++ } ++ ++ vd->info = sys->cur_vout->info; ++ vd->fmt = sys->cur_vout->fmt; ++ + return VLC_SUCCESS; + +fail: @@ -6568,3 +10183,14 @@ + set_callbacks(OpenMmalX11, CloseMmalX11) +vlc_module_end() + +--- a/src/misc/fourcc.c ++++ b/src/misc/fourcc.c +@@ -756,6 +756,8 @@ + VLC_CODEC_VDPAU_VIDEO_444, VLC_CODEC_VDPAU_OUTPUT }, + FAKE_FMT() }, + { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE, ++ VLC_CODEC_MMAL_ZC_SAND8, VLC_CODEC_MMAL_ZC_SAND10, ++ VLC_CODEC_MMAL_ZC_I420, + VLC_CODEC_D3D9_OPAQUE, VLC_CODEC_D3D11_OPAQUE }, + FAKE_FMT() }, + { { VLC_CODEC_D3D11_OPAQUE_10B, VLC_CODEC_D3D9_OPAQUE_10B }, From f5535870b0675eca639bfa39b2770ef3825c2605 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 6 Apr 2019 20:28:12 +0200 Subject: [PATCH 431/671] Rebuilt --- vlc.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 3bb1ac3..faf5c46 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,11 +43,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.6 -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: https://raw.githubusercontent.com/fedberry/vlc/master/mmal_1.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch # https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=2688feb2742a6021ca211ae5c106b12c3d822946 Patch1: libvpx-1.8-fix.patch @@ -544,6 +544,10 @@ fi || : %changelog +* Sat Apr 06 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-25 +- Rebuilt for libplacebo +- Update mmal patch + * Tue Mar 26 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-24 - Drop projectm until fixed From 3b95040b4d15af2d48467263ef0d6195b0008af6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 6 Apr 2019 21:23:43 +0200 Subject: [PATCH 432/671] Update snapshot --- libvpx-1.8-fix.patch | 36 ------------------------------------ sources | 2 +- vlc.spec | 15 +++++++-------- 3 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 libvpx-1.8-fix.patch diff --git a/libvpx-1.8-fix.patch b/libvpx-1.8-fix.patch deleted file mode 100644 index 7d08b42..0000000 --- a/libvpx-1.8-fix.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 2688feb2742a6021ca211ae5c106b12c3d822946 Mon Sep 17 00:00:00 2001 -From: Danny Milosavljevic <dannym@scratchpost.org> -Date: Mon, 11 Feb 2019 16:07:12 +0100 -Subject: [PATCH] codec: vpx: Detect libvpx 1.8.0 and, if detected, use fewer - frame formats in the chroma_table - -Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> -(cherry picked from commit 5575fe3eb3fd46bada8662268b74d03493476a84) ---- - modules/codec/vpx.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c -index 2b1e37818d..aba180361f 100644 ---- a/modules/codec/vpx.c -+++ b/modules/codec/vpx.c -@@ -116,6 +116,7 @@ static const struct - { VLC_CODEC_I440, VPX_IMG_FMT_I440, 8, 0 }, - - { VLC_CODEC_YV12, VPX_IMG_FMT_YV12, 8, 0 }, -+#if VPX_IMAGE_ABI_VERSION < 5 - { VLC_CODEC_YUVA, VPX_IMG_FMT_444A, 8, 0 }, - { VLC_CODEC_YUYV, VPX_IMG_FMT_YUY2, 8, 0 }, - { VLC_CODEC_UYVY, VPX_IMG_FMT_UYVY, 8, 0 }, -@@ -128,7 +129,7 @@ static const struct - - { VLC_CODEC_ARGB, VPX_IMG_FMT_ARGB, 8, 0 }, - { VLC_CODEC_BGRA, VPX_IMG_FMT_ARGB_LE, 8, 0 }, -- -+#endif - { VLC_CODEC_GBR_PLANAR, VPX_IMG_FMT_I444, 8, 1 }, - { VLC_CODEC_GBR_PLANAR_10L, VPX_IMG_FMT_I44416, 10, 1 }, - --- -2.11.0 - diff --git a/sources b/sources index d784f58..22911d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4ff71d262e070fd19f86a1c3542c7b4e vlc-3.0.6.tar.xz +02fe01ec602445745b46b0612456e023 vlc-3.0.7-20190406-0223.tar.xz diff --git a/vlc.spec b/vlc.spec index faf5c46..b09e919 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -#global vlc_date 20181213 +%global vlc_date 20190406 #global vlc_rc -rc9 -#global vlc_tag -#{?vlc_date}-0221 +%global vlc_tag -%{?vlc_date}-0223 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -42,14 +42,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.6 -Release: 25%{?dist} +Version: 3.0.7 +Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch -# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=2688feb2742a6021ca211ae5c106b12c3d822946 -Patch1: libvpx-1.8-fix.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -286,7 +284,6 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } -%patch1 -p1 %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -544,7 +541,9 @@ fi || : %changelog -* Sat Apr 06 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.6-25 +* Sat Apr 06 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7-0.1 +- Update to 20190406 +- Rebuilt for live555 - Rebuilt for libplacebo - Update mmal patch From 458b3f0c3ca452f390031bf2e92e9c591aa3c92c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 6 Apr 2019 22:29:55 +0200 Subject: [PATCH 433/671] Disable libplacebo for now --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index b09e919..8c3866e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -126,7 +126,7 @@ BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) -BuildRequires: pkgconfig(libplacebo) +#BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel From a19807521dcaddbedb66ccfb27324e584becd096 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Fri, 7 Jun 2019 09:20:21 +0100 Subject: [PATCH 434/671] Update to 3.0.7 --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 22911d7..478c323 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -02fe01ec602445745b46b0612456e023 vlc-3.0.7-20190406-0223.tar.xz +230932ec40185856af28f82ec2e38b8a vlc-3.0.7.tar.xz diff --git a/vlc.spec b/vlc.spec index 8c3866e..d5d552d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20190406 +#global vlc_date 20190406 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0223 +#global vlc_tag -#{?vlc_date}-0223 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.7 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -541,6 +541,9 @@ fi || : %changelog +* Fri Jun 07 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7-1 +- Update to 3.0.7 + * Sat Apr 06 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7-0.1 - Update to 20190406 - Rebuilt for live555 From 4eba8ade0d69cfea0fd0bf9d6762c32326c0c3f0 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Fri, 7 Jun 2019 23:01:25 +0100 Subject: [PATCH 435/671] Enable libplacebo --- libplacebo_patch_1.patch | 89 ++++++++++++++++++++++++++++++++++++++++ vlc.spec | 10 +++-- 2 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 libplacebo_patch_1.patch diff --git a/libplacebo_patch_1.patch b/libplacebo_patch_1.patch new file mode 100644 index 0000000..9052c63 --- /dev/null +++ b/libplacebo_patch_1.patch @@ -0,0 +1,89 @@ +From 943b3096d213731a92f3932cfba1c593fe48d7d0 Mon Sep 17 00:00:00 2001 +From: Leigh Scott <leigh123linux@gmail.com> +Date: Fri, 7 Jun 2019 22:24:42 +0100 +Subject: Adapt patch from videolan mailing list + https://mailman.videolan.org/pipermail/vlc-devel/2019-May/124293.html + +--- + .../video_output/opengl/fragment_shaders.c | 6 ++++ + modules/video_output/opengl/vout_helper.h | 30 +++++++++++++++++-- + 2 files changed, 34 insertions(+), 2 deletions(-) + +diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c +index 8c1f67ee7a..f6fb2be6c5 100644 +--- a/modules/video_output/opengl/fragment_shaders.c ++++ b/modules/video_output/opengl/fragment_shaders.c +@@ -616,7 +616,13 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, + color_params.intent = var_InheritInteger(tc->gl, "rendering-intent"); + color_params.tone_mapping_algo = var_InheritInteger(tc->gl, "tone-mapping"); + color_params.tone_mapping_param = var_InheritFloat(tc->gl, "tone-mapping-param"); ++# if PL_API_VER >= 10 ++ color_params.desaturation_strength = var_InheritFloat(tc->gl, "desat-strength"); ++ color_params.desaturation_exponent = var_InheritFloat(tc->gl, "desat-exponent"); ++ color_params.desaturation_base = var_InheritFloat(tc->gl, "desat-base"); ++# else + color_params.tone_mapping_desaturate = var_InheritFloat(tc->gl, "tone-mapping-desat"); ++# endif + color_params.gamut_warning = var_InheritBool(tc->gl, "tone-mapping-warn"); + + struct pl_color_space dst_space = pl_color_space_unknown; +diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h +index 978669f89c..49a823abb7 100644 +--- a/modules/video_output/opengl/vout_helper.h ++++ b/modules/video_output/opengl/vout_helper.h +@@ -148,6 +148,18 @@ static const char * const tone_text[] = { + #define TONEMAP_DESAT_TEXT "Tone-mapping desaturation coefficient" + #define TONEMAP_DESAT_LONGTEXT "How strongly to desaturate overbright colors towards white. 0.0 disables this behavior." + ++#define DESAT_STRENGTH_TEXT "Desaturation strength" ++#define DESAT_STRENGTH_LONGTEXT "How strongly to desaturate bright spectral colors towards white. 0.0 disables this behavior, 1.0 enables full desaturation (hollywood-style)" ++ ++#define DESAT_EXPONENT_TEXT "Desaturation exponent" ++#define DESAT_EXPONENT_LONGTEXT "Controls the steepness of the desaturation curve. If you set this to 0.0, the curve will be flat, i.e. desaturation always enabled (hollywood-style)." ++ ++#define DESAT_BASE_TEXT "Desaturation base" ++#define DESAT_BASE_LONGTEXT "Controls the starting offset of the desaturation curve. Brightness values below this base will always be colorimetrically tone mapped (never desaturated)." ++ ++#define MAX_BOOST_TEXT "Maximum brightness boost" ++#define MAX_BOOST_LONGTEXT "Maximum allowed brightness boost to compensate for dark scenes. A value of 1.0 means no brightness boost is allowed." ++ + #define TONEMAP_WARN_TEXT "Highlight clipped pixels" + #define TONEMAP_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process." + +@@ -171,6 +183,21 @@ static const char * const dither_text[] = { + #define DEPTH_TEXT "Dither depth override (0 = framebuffer depth)" + #define DEPTH_LONGTEXT "Overrides the detected framebuffer depth. Useful to dither to lower bit depths than otherwise required." + ++ ++#if PL_API_VER >= 10 ++#define add_desat_params() \ ++ add_float("desat-strength", pl_color_map_default_params.desaturation_strength, \ ++ DESAT_STRENGTH_TEXT, DESAT_STRENGTH_LONGTEXT, false) \ ++ add_float("desat-exponent", pl_color_map_default_params.desaturation_exponent, \ ++ DESAT_EXPONENT_TEXT, DESAT_EXPONENT_LONGTEXT, false) \ ++ add_float("desat-base", pl_color_map_default_params.desaturation_base, \ ++ DESAT_BASE_TEXT, DESAT_BASE_LONGTEXT, false) ++#else ++#define add_desat_params() \ ++ add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \ ++ TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false) ++#endif ++ + #define add_glopts_placebo() \ + set_section("Colorspace conversion", NULL) \ + add_integer("rendering-intent", pl_color_map_default_params.intent, \ +@@ -184,10 +211,9 @@ static const char * const dither_text[] = { + add_integer("tone-mapping", PL_TONE_MAPPING_HABLE, \ + TONEMAPPING_TEXT, TONEMAPPING_LONGTEXT, false) \ + change_integer_list(tone_values, tone_text) \ ++ add_desat_params() \ + add_float("tone-mapping-param", pl_color_map_default_params.tone_mapping_param, \ + TONEMAP_PARAM_TEXT, TONEMAP_PARAM_LONGTEXT, true) \ +- add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \ +- TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false) \ + add_bool("tone-mapping-warn", false, TONEMAP_WARN_TEXT, TONEMAP_WARN_LONGTEXT, false) \ + set_section("Dithering", NULL) \ + add_integer("dither-algo", -1, DITHER_TEXT, DITHER_LONGTEXT, false) \ +-- +2.21.0 + diff --git a/vlc.spec b/vlc.spec index d5d552d..c09065c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,12 +43,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.7 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch - +Patch1: libplacebo_patch_1.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -126,7 +126,7 @@ BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) -#BuildRequires: pkgconfig(libplacebo) +BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel @@ -284,6 +284,7 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } +%patch1 -p1 %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -541,6 +542,9 @@ fi || : %changelog +* Fri Jun 07 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7-2 +- Enable libplacebo + * Fri Jun 07 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7-1 - Update to 3.0.7 From a64717f628333bf0ed2826568f480efa3423bb59 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Fri, 7 Jun 2019 23:12:14 +0100 Subject: [PATCH 436/671] Clean patch --- libplacebo_patch_1.patch | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libplacebo_patch_1.patch b/libplacebo_patch_1.patch index 9052c63..c8a73a0 100644 --- a/libplacebo_patch_1.patch +++ b/libplacebo_patch_1.patch @@ -1,13 +1,13 @@ -From 943b3096d213731a92f3932cfba1c593fe48d7d0 Mon Sep 17 00:00:00 2001 +From 78dff2f7ec405d423da4431fc873cd5182e594c8 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Fri, 7 Jun 2019 22:24:42 +0100 Subject: Adapt patch from videolan mailing list https://mailman.videolan.org/pipermail/vlc-devel/2019-May/124293.html --- - .../video_output/opengl/fragment_shaders.c | 6 ++++ - modules/video_output/opengl/vout_helper.h | 30 +++++++++++++++++-- - 2 files changed, 34 insertions(+), 2 deletions(-) + .../video_output/opengl/fragment_shaders.c | 6 +++++ + modules/video_output/opengl/vout_helper.h | 27 +++++++++++++++++-- + 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c index 8c1f67ee7a..f6fb2be6c5 100644 @@ -28,10 +28,10 @@ index 8c1f67ee7a..f6fb2be6c5 100644 struct pl_color_space dst_space = pl_color_space_unknown; diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h -index 978669f89c..49a823abb7 100644 +index 978669f89c..cfc256530e 100644 --- a/modules/video_output/opengl/vout_helper.h +++ b/modules/video_output/opengl/vout_helper.h -@@ -148,6 +148,18 @@ static const char * const tone_text[] = { +@@ -148,6 +148,15 @@ static const char * const tone_text[] = { #define TONEMAP_DESAT_TEXT "Tone-mapping desaturation coefficient" #define TONEMAP_DESAT_LONGTEXT "How strongly to desaturate overbright colors towards white. 0.0 disables this behavior." @@ -43,14 +43,11 @@ index 978669f89c..49a823abb7 100644 + +#define DESAT_BASE_TEXT "Desaturation base" +#define DESAT_BASE_LONGTEXT "Controls the starting offset of the desaturation curve. Brightness values below this base will always be colorimetrically tone mapped (never desaturated)." -+ -+#define MAX_BOOST_TEXT "Maximum brightness boost" -+#define MAX_BOOST_LONGTEXT "Maximum allowed brightness boost to compensate for dark scenes. A value of 1.0 means no brightness boost is allowed." + #define TONEMAP_WARN_TEXT "Highlight clipped pixels" #define TONEMAP_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process." -@@ -171,6 +183,21 @@ static const char * const dither_text[] = { +@@ -171,6 +180,21 @@ static const char * const dither_text[] = { #define DEPTH_TEXT "Dither depth override (0 = framebuffer depth)" #define DEPTH_LONGTEXT "Overrides the detected framebuffer depth. Useful to dither to lower bit depths than otherwise required." @@ -72,7 +69,7 @@ index 978669f89c..49a823abb7 100644 #define add_glopts_placebo() \ set_section("Colorspace conversion", NULL) \ add_integer("rendering-intent", pl_color_map_default_params.intent, \ -@@ -184,10 +211,9 @@ static const char * const dither_text[] = { +@@ -184,10 +208,9 @@ static const char * const dither_text[] = { add_integer("tone-mapping", PL_TONE_MAPPING_HABLE, \ TONEMAPPING_TEXT, TONEMAPPING_LONGTEXT, false) \ change_integer_list(tone_values, tone_text) \ From 944f8768fe52f0cdb0a08ecf325a55a7dfb3b64b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Wed, 12 Jun 2019 09:54:12 +0100 Subject: [PATCH 437/671] Update to 3.0.7.1 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 478c323..81cb17f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -230932ec40185856af28f82ec2e38b8a vlc-3.0.7.tar.xz +1adf2fe21070378b0e45ad163d3b232d vlc-3.0.7.1.tar.xz diff --git a/vlc.spec b/vlc.spec index c09065c..83cebdf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,8 +42,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.7 -Release: 2%{?dist} +Version: 3.0.7.1 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -542,6 +542,9 @@ fi || : %changelog +* Wed Jun 12 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7.1-1 +- Update to 3.0.7.1 + * Fri Jun 07 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7-2 - Enable libplacebo From 44f448220fcc29398b5e2ca7ae0f3560e009c0d9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Wed, 12 Jun 2019 12:14:09 +0100 Subject: [PATCH 438/671] Enable asdcplib --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 83cebdf..603a7d9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.7.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -65,6 +65,7 @@ BuildRequires: gcc-c++ %{?_with_aom:BuildRequires: libaom-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel +BuildRequires: asdcplib-devel BuildRequires: avahi-devel BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} @@ -542,6 +543,9 @@ fi || : %changelog +* Wed Jun 12 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7.1-2 +- Enable asdcplib + * Wed Jun 12 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7.1-1 - Update to 3.0.7.1 From b59d0e8926deacf31d92a5722322b20e8bd038bd Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@googlemail.com> Date: Wed, 12 Jun 2019 12:28:39 +0100 Subject: [PATCH 439/671] Add conditional --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 603a7d9..592ace0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -65,7 +65,9 @@ BuildRequires: gcc-c++ %{?_with_aom:BuildRequires: libaom-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel +%ifnarch i686 armv7hl BuildRequires: asdcplib-devel +%endif BuildRequires: avahi-devel BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} From 756a26bade1d694e64e1d89038e3086cbed5b60b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 12 Jun 2019 19:14:37 +0200 Subject: [PATCH 440/671] Fixup for arm asdcplib --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 592ace0..0b22623 100644 --- a/vlc.spec +++ b/vlc.spec @@ -65,7 +65,7 @@ BuildRequires: gcc-c++ %{?_with_aom:BuildRequires: libaom-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel -%ifnarch i686 armv7hl +%ifnarch i686 %{arm} BuildRequires: asdcplib-devel %endif BuildRequires: avahi-devel From fb5405fd92c299c36efa988ddbf0f68eef3dae24 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Jun 2019 10:28:46 +0200 Subject: [PATCH 441/671] Move asdcp plugin to extras --- vlc.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 0b22623..c3aca1e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -36,6 +36,7 @@ %endif %ifarch x86_64 i686 %global _with_crystalhd 1 +%global _with_asdcp 1 %endif @@ -65,9 +66,7 @@ BuildRequires: gcc-c++ %{?_with_aom:BuildRequires: libaom-devel} BuildRequires: aalib-devel BuildRequires: alsa-lib-devel -%ifnarch i686 %{arm} -BuildRequires: asdcplib-devel -%endif +%{?_with_asdcp:BuildRequires: asdcplib-devel} BuildRequires: avahi-devel BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} @@ -485,6 +484,9 @@ fi || : %{_libdir}/vlc/libvlc_vdpau.so* %{_libdir}/vlc/libvlc_xcb_events.so* %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so +%{?_with_ascdp: +%exclude %{_libdir}/vlc/plugins/access/libdcp_plugin.so +} %{?_with_vcdimager: %exclude %{_libdir}/vlc/plugins/access/libvcd_plugin.so %exclude %{_libdir}/vlc/plugins/access/libvcdx_plugin.so @@ -534,6 +536,9 @@ fi || : %{?_with_crystalhd: %{_libdir}/vlc/plugins/codec/libcrystalhd_plugin.so } +%{?_with_ascdp: +%{_libdir}/vlc/plugins/access/libdcp_plugin.so +} %files devel %dir %{_includedir}/vlc From ace487188471eeb6dc88a73a13cf569d673673e5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Jun 2019 10:29:07 +0200 Subject: [PATCH 442/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c3aca1e..8c9ea40 100644 --- a/vlc.spec +++ b/vlc.spec @@ -44,7 +44,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.7.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -550,6 +550,9 @@ fi || : %changelog +* Mon Jun 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7.1-3 +- Move asdcp plugin to extras + * Wed Jun 12 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.7.1-2 - Enable asdcplib From 4463e72aacf671ccfa8a6cdb6e6d875c0330dab4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Jun 2019 11:00:20 +0200 Subject: [PATCH 443/671] fixup ascdbuild not fixed on i686 --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 8c9ea40..04ff22c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -36,6 +36,8 @@ %endif %ifarch x86_64 i686 %global _with_crystalhd 1 +%endif +%ifarch x86_64 %global _with_asdcp 1 %endif From f4c50d33a93ae5e26d57009e40bbf8a32ff5d92a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Jun 2019 14:58:21 +0200 Subject: [PATCH 444/671] Fix typo --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 04ff22c..931b679 100644 --- a/vlc.spec +++ b/vlc.spec @@ -486,7 +486,7 @@ fi || : %{_libdir}/vlc/libvlc_vdpau.so* %{_libdir}/vlc/libvlc_xcb_events.so* %exclude %{_libdir}/vlc/plugins/access/libaccess_jack_plugin.so -%{?_with_ascdp: +%{?_with_asdcp: %exclude %{_libdir}/vlc/plugins/access/libdcp_plugin.so } %{?_with_vcdimager: @@ -538,7 +538,7 @@ fi || : %{?_with_crystalhd: %{_libdir}/vlc/plugins/codec/libcrystalhd_plugin.so } -%{?_with_ascdp: +%{?_with_asdcp: %{_libdir}/vlc/plugins/access/libdcp_plugin.so } From 55920a2a4c0650a4e4c98e537e6495ac20ffb29e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jun 2019 08:31:40 +0200 Subject: [PATCH 445/671] Avoid files listed twice --- vlc.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vlc.spec b/vlc.spec index 931b679..82c12a9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -500,8 +500,6 @@ fi || : %{?_with_fluidsynth: %exclude %{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so } -%dir %{_libdir}/vlc/plugins/gui -%{_libdir}/vlc/plugins/gui/libncurses_plugin.so %exclude %{_libdir}/vlc/plugins/gui/libqt_plugin.so %exclude %{_libdir}/vlc/plugins/gui/libskins2_plugin.so %{?_with_opencv: @@ -516,10 +514,6 @@ fi || : %exclude %{_libdir}/vlc/plugins/access/libpulsesrc_plugin.so %exclude %{_libdir}/vlc/plugins/services_discovery/libpulselist_plugin.so %ghost %{_libdir}/vlc/plugins/plugins.dat -%dir %{_libdir}/vlc/ -%dir %{_libdir}/vlc/plugins -%dir %{_libdir}/vlc/plugins/vdpau -%{_libdir}/vlc/plugins/vdpau/libvdpau_*_plugin.so %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins %{_mandir}/man1/vlc*.1* From 0b439d6a0e16cc5b8e86954b2f71723bea5016cc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jun 2019 10:13:07 +0200 Subject: [PATCH 446/671] Rework with/without options --- vlc.spec | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/vlc.spec b/vlc.spec index 82c12a9..2165a87 100644 --- a/vlc.spec +++ b/vlc.spec @@ -6,39 +6,44 @@ %else %global vlc_url https://download.videolan.org/pub/videolan/vlc/ %endif -%global _with_bootstrap 1 + +%global _with_bootstrap 1 + %if 0%{?!_without_freeworld:1} -%global _with_a52dec 1 %global _with_faad2 1 %global _with_ffmpeg 1 %global _with_libdca 1 -%global _with_libdvbpsi 1 -%global _with_libmad 1 -%global _with_libmpeg2 1 -%global _with_twolame 1 %global _with_x264 1 %global _with_x265 1 %global _with_xvidcore 1 %global _with_live555 1 %global _with_vaapi 1 %endif -%global _with_bluray 1 -%if 0%{?fedora} && 0%{?fedora} < 28 -%global _with_opencv 1 -%endif + +%global _with_a52dec 1 +%global _with_libdvbpsi 1 +%global _with_libmad 1 +%global _with_libmpeg2 1 +%global _with_twolame 1 %global _with_fluidsynth 1 +%global _with_schroedinger 1 +%global _with_freerdp 1 + %if 0%{?fedora} %global _with_aom 1 +%global _with_bluray 1 %global _with_dav1d 1 -%global _with_freerdp 1 -%global _with_schroedinger 1 %global _with_wayland 1 +%ifarch x86_64 +%global _with_asdcp 1 %endif %ifarch x86_64 i686 %global _with_crystalhd 1 %endif -%ifarch x86_64 -%global _with_asdcp 1 +%endif + +%if 0%{?el7} +%global _with_opencv 1 %endif From 0909abc5a7b3d3234b07e487ffa38448fa1c24d0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jun 2019 10:14:00 +0200 Subject: [PATCH 447/671] Update changelog --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2165a87..189f2ac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.7.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -551,6 +551,10 @@ fi || : %changelog +* Tue Jun 18 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7.1-4 +- Avoid files listed twice +- Rework with/without options + * Mon Jun 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7.1-3 - Move asdcp plugin to extras From 0221cb2d1577ccdc7841fb5d0f4a6315e8e5b9d1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 2 Jul 2019 08:22:26 +0200 Subject: [PATCH 448/671] Update to 20190702 --- sources | 2 +- vlc.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 81cb17f..0e167b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1adf2fe21070378b0e45ad163d3b232d vlc-3.0.7.1.tar.xz +3f66239c70e9cdaabec359adcdbae89c vlc-3.0.8-20190702-0221.tar.xz diff --git a/vlc.spec b/vlc.spec index 189f2ac..34f8d88 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -#global vlc_date 20190406 +%global vlc_date 20190702 #global vlc_rc -rc9 -#global vlc_tag -#{?vlc_date}-0223 +%global vlc_tag -%{?vlc_date}-0221 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.7.1 -Release: 4%{?dist} +Version: 3.0.8 +Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -551,6 +551,9 @@ fi || : %changelog +* Tue Jul 02 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.1 +- Update to 20190702 + * Tue Jun 18 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.7.1-4 - Avoid files listed twice - Rework with/without options From a74a9467947affb3e7110a7a31f9c8da0a17e0a6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 18 Jul 2019 12:45:51 +0200 Subject: [PATCH 449/671] Update snapshoot --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 0e167b7..dd61a9d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3f66239c70e9cdaabec359adcdbae89c vlc-3.0.8-20190702-0221.tar.xz +1cea914b24d64763dd5c1b8b4fc2c5f3 vlc-3.0.8-20190718-0222.tar.xz diff --git a/vlc.spec b/vlc.spec index 34f8d88..60fba2b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20190702 +%global vlc_date 20190718 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0221 +%global vlc_tag -%{?vlc_date}-0222 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -551,6 +551,9 @@ fi || : %changelog +* Thu Jul 18 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.2 +- Update snapshot + * Tue Jul 02 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.1 - Update to 20190702 From 79527441d70d491b34748369cbbbad38fb98da82 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 18 Jul 2019 12:46:53 +0200 Subject: [PATCH 450/671] system-wide cipthers --- 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch | 39 +++++++++++++++++++ vlc.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch diff --git a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch new file mode 100644 index 0000000..81983be --- /dev/null +++ b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch @@ -0,0 +1,39 @@ +From 680849e6b9ced55fe8ac61771fd57e694c9ff79c Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 24 Sep 2018 18:28:26 +0200 +Subject: [PATCH] Use @SYSTEM wide ciphers for gnutls + +Gnutls upstream has support for system +This is decribed at +https://fedoraproject.org/wiki/Packaging:CryptoPolicies +Also found on the debian wiki +https://wiki.debian.org/CryptoPolicy + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + modules/misc/gnutls.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c +index 1b214358d4..05b4209692 100644 +--- a/modules/misc/gnutls.c ++++ b/modules/misc/gnutls.c +@@ -768,6 +768,7 @@ static void CloseServer (vlc_tls_creds_t *crd) + "hash functions and compression methods can be selected. " \ + "Refer to GNU TLS documentation for detailed syntax.") + static const char *const priorities_values[] = { ++ "@SYSTEM", + "PERFORMANCE", + "NORMAL", + "SECURE128", +@@ -775,6 +776,7 @@ static const char *const priorities_values[] = { + "EXPORT", + }; + static const char *const priorities_text[] = { ++ N_("System (default to system crypto ciphers policy)"), + N_("Performance (prioritize faster ciphers)"), + N_("Normal"), + N_("Secure 128-bits (exclude 256-bits ciphers)"), +-- +2.17.2 + diff --git a/vlc.spec b/vlc.spec index 60fba2b..2121d45 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,6 +57,7 @@ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch Patch1: libplacebo_patch_1.patch +Patch2: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel From 317cb34d66eca9d87277d34c29367f8869ba0d7e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 18 Jul 2019 12:47:25 +0200 Subject: [PATCH 451/671] Update changelog --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 2121d45..d761736 100644 --- a/vlc.spec +++ b/vlc.spec @@ -554,6 +554,7 @@ fi || : %changelog * Thu Jul 18 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.2 - Update snapshot +- Add system-wide ciphers * Tue Jul 02 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.1 - Update to 20190702 From ed3fa994010a5b18126bb3d05f2f52b3e334d7f3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Jul 2019 12:11:32 +0200 Subject: [PATCH 452/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d761736..9b3e630 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -552,6 +552,9 @@ fi || : %changelog +* Fri Jul 19 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.3 +- Rebuilt for live555 + * Thu Jul 18 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.2 - Update snapshot - Add system-wide ciphers From 21f94f13cd0133915ba98b88aec0e675d256dc65 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 31 Jul 2019 17:32:07 +0200 Subject: [PATCH 453/671] Update snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index dd61a9d..6c84a01 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1cea914b24d64763dd5c1b8b4fc2c5f3 vlc-3.0.8-20190718-0222.tar.xz +0f8d27baf579f10fad608deb81aef6a5 vlc-3.0.8-20190731-0222.tar.xz diff --git a/vlc.spec b/vlc.spec index 9b3e630..3f262d5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_date 20190718 +%global vlc_date 20190731 #global vlc_rc -rc9 %global vlc_tag -%{?vlc_date}-0222 %if 0%{?vlc_tag:1} @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -552,6 +552,9 @@ fi || : %changelog +* Wed Jul 31 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.4 +- Update snapshot + * Fri Jul 19 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.3 - Rebuilt for live555 From c6bb2834913b465dd69c30044dfc4f4f53d02c47 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 6 Aug 2019 21:47:56 +0100 Subject: [PATCH 454/671] Rebuild for new ffmpeg version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3f262d5..b0e0fb0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -552,6 +552,9 @@ fi || : %changelog +* Tue Aug 06 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-0.5 +- Rebuild for new ffmpeg version + * Wed Jul 31 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-0.4 - Update snapshot From 066f97bf247240b318a62ee3a3c5eac60f33366d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 20 Aug 2019 09:17:11 +0200 Subject: [PATCH 455/671] Update to post 3.0.8 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 6c84a01..024f02b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0f8d27baf579f10fad608deb81aef6a5 vlc-3.0.8-20190731-0222.tar.xz +640636353eef9826e33c46e791017efc vlc-3.0.8-20190820-0222.tar.xz diff --git a/vlc.spec b/vlc.spec index b0e0fb0..8abe4f3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_date 20190731 +%global vlc_date 20190820 #global vlc_rc -rc9 %global vlc_tag -%{?vlc_date}-0222 %if 0%{?vlc_tag:1} @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 0.5%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -552,6 +552,9 @@ fi || : %changelog +* Tue Aug 20 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-1 +- Update to 3.0.8 - 20190820 snapshot + * Tue Aug 06 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-0.5 - Rebuild for new ffmpeg version From c6d1b17dfbc55656beda7f814161a600e7f6d1fb Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 21 Aug 2019 01:13:14 +0100 Subject: [PATCH 456/671] Rebuild for dav1d and aom SONAME bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8abe4f3..e990d6a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -552,6 +552,9 @@ fi || : %changelog +* Wed Aug 21 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-2 +- Rebuild for dav1d and aom SONAME bump + * Tue Aug 20 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-1 - Update to 3.0.8 - 20190820 snapshot From f4574e585d87477ba0cb3c64844e7a7fd713933b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 21 Aug 2019 15:51:45 +0100 Subject: [PATCH 457/671] KMA --- 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch | 39 ------------------- Fix_aom_abi_break.patch | 11 ++++++ vlc.spec | 3 +- 3 files changed, 13 insertions(+), 40 deletions(-) delete mode 100644 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch create mode 100644 Fix_aom_abi_break.patch diff --git a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch deleted file mode 100644 index 81983be..0000000 --- a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 680849e6b9ced55fe8ac61771fd57e694c9ff79c Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Mon, 24 Sep 2018 18:28:26 +0200 -Subject: [PATCH] Use @SYSTEM wide ciphers for gnutls - -Gnutls upstream has support for system -This is decribed at -https://fedoraproject.org/wiki/Packaging:CryptoPolicies -Also found on the debian wiki -https://wiki.debian.org/CryptoPolicy - -Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> ---- - modules/misc/gnutls.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c -index 1b214358d4..05b4209692 100644 ---- a/modules/misc/gnutls.c -+++ b/modules/misc/gnutls.c -@@ -768,6 +768,7 @@ static void CloseServer (vlc_tls_creds_t *crd) - "hash functions and compression methods can be selected. " \ - "Refer to GNU TLS documentation for detailed syntax.") - static const char *const priorities_values[] = { -+ "@SYSTEM", - "PERFORMANCE", - "NORMAL", - "SECURE128", -@@ -775,6 +776,7 @@ static const char *const priorities_values[] = { - "EXPORT", - }; - static const char *const priorities_text[] = { -+ N_("System (default to system crypto ciphers policy)"), - N_("Performance (prioritize faster ciphers)"), - N_("Normal"), - N_("Secure 128-bits (exclude 256-bits ciphers)"), --- -2.17.2 - diff --git a/Fix_aom_abi_break.patch b/Fix_aom_abi_break.patch new file mode 100644 index 0000000..16b15a1 --- /dev/null +++ b/Fix_aom_abi_break.patch @@ -0,0 +1,11 @@ +--- a/modules/codec/aom.c ++++ b/modules/codec/aom.c +@@ -98,7 +98,6 @@ + { VLC_CODEC_I444, AOM_IMG_FMT_I444, 8, 0 }, + + { VLC_CODEC_YV12, AOM_IMG_FMT_YV12, 8, 0 }, +-{ VLC_CODEC_YUVA, AOM_IMG_FMT_444A, 8, 0 }, + + { VLC_CODEC_GBR_PLANAR, AOM_IMG_FMT_I444, 8, 1 }, + { VLC_CODEC_GBR_PLANAR_10L, AOM_IMG_FMT_I44416, 10, 1 }, + diff --git a/vlc.spec b/vlc.spec index e990d6a..121c7e7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,7 +57,7 @@ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch Patch1: libplacebo_patch_1.patch -Patch2: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +Patch2: Fix_aom_abi_break.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -295,6 +295,7 @@ VLC media player extras modules. %patch0 -p1 } %patch1 -p1 +%patch2 -p1 %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable From cd672b595cc9132fbef6073105236b599afcb824 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 21 Aug 2019 18:28:40 +0200 Subject: [PATCH 458/671] Restore ciphers policy for gnutls --- 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch | 39 +++++++++++++++++++ vlc.spec | 2 + 2 files changed, 41 insertions(+) create mode 100644 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch diff --git a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch new file mode 100644 index 0000000..81983be --- /dev/null +++ b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch @@ -0,0 +1,39 @@ +From 680849e6b9ced55fe8ac61771fd57e694c9ff79c Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 24 Sep 2018 18:28:26 +0200 +Subject: [PATCH] Use @SYSTEM wide ciphers for gnutls + +Gnutls upstream has support for system +This is decribed at +https://fedoraproject.org/wiki/Packaging:CryptoPolicies +Also found on the debian wiki +https://wiki.debian.org/CryptoPolicy + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + modules/misc/gnutls.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c +index 1b214358d4..05b4209692 100644 +--- a/modules/misc/gnutls.c ++++ b/modules/misc/gnutls.c +@@ -768,6 +768,7 @@ static void CloseServer (vlc_tls_creds_t *crd) + "hash functions and compression methods can be selected. " \ + "Refer to GNU TLS documentation for detailed syntax.") + static const char *const priorities_values[] = { ++ "@SYSTEM", + "PERFORMANCE", + "NORMAL", + "SECURE128", +@@ -775,6 +776,7 @@ static const char *const priorities_values[] = { + "EXPORT", + }; + static const char *const priorities_text[] = { ++ N_("System (default to system crypto ciphers policy)"), + N_("Performance (prioritize faster ciphers)"), + N_("Normal"), + N_("Secure 128-bits (exclude 256-bits ciphers)"), +-- +2.17.2 + diff --git a/vlc.spec b/vlc.spec index 121c7e7..e0924df 100644 --- a/vlc.spec +++ b/vlc.spec @@ -58,6 +58,7 @@ Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch Patch1: libplacebo_patch_1.patch Patch2: Fix_aom_abi_break.patch +Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -296,6 +297,7 @@ VLC media player extras modules. } %patch1 -p1 %patch2 -p1 +%patch3 -p1 %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable From b5ab699ffdcf1bb52b05cf49658c982a4b3d4061 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Sep 2019 13:28:50 +0200 Subject: [PATCH 459/671] Add el8 support --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e0924df..0a0bbdf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,11 +29,14 @@ %global _with_schroedinger 1 %global _with_freerdp 1 -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?el8} %global _with_aom 1 %global _with_bluray 1 %global _with_dav1d 1 %global _with_wayland 1 +%endif + +%if 0%{?fedora} %ifarch x86_64 %global _with_asdcp 1 %endif From 95341b06831e81332e432c2d685774dbf2816ccf Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Sep 2019 13:29:20 +0200 Subject: [PATCH 460/671] Bump release --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0a0bbdf..380f68b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.8 -Release: 2%{?dist} +Release: 20%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz From 55623b63c35c3d9475bedf0a0d9f5736271bc08d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Sep 2019 13:29:32 +0200 Subject: [PATCH 461/671] Drop kde-filesystem support --- vlc.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 380f68b..353eecb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -92,7 +92,6 @@ BuildRequires: gnutls-devel >= 1.0.17 BuildRequires: gsm-devel BuildRequires: hostname BuildRequires: jack-audio-connection-kit-devel -BuildRequires: kde-filesystem BuildRequires: game-music-emu-devel %ifarch %{arm} aarch64 BuildRequires: pkgconfig(gstreamer-app-1.0) @@ -242,7 +241,6 @@ Provides: vlc-plugin-jack = %{version}-%{release} Provides: %{name}-xorg%{_isa} = %{epoch}:%{version}-%{release} Requires: vlc-core%{_isa} = %{epoch}:%{version}-%{release} -Requires: kde-filesystem Requires: dejavu-sans-fonts Requires: dejavu-sans-mono-fonts @@ -328,7 +326,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --with-pic \ --disable-rpath \ --with-binary-version=%{version} \ - --with-kde-solid=%{_kde4_appsdir}/solid/actions \ --enable-lua \ %{?_with_live555:--enable-live555} \ %{?_with_opencv:--enable-opencv} \ @@ -406,6 +403,9 @@ appstream-util validate-relax --nonet \ #Fixup rm -rf %{buildroot}/%{_datadir}/macosx +#Disable KDE4 desktop files +rm -rf %{buildroot}%{_datadir}/kde4 + %find_lang %{name} @@ -459,7 +459,6 @@ fi || : %license COPYING %{_datadir}/metainfo/vlc.appdata.xml %{_datadir}/applications/*%{name}.desktop -%{_datadir}/kde4/apps/solid/actions/vlc-*.desktop %{_datadir}/icons/hicolor/*/apps/vlc*.png %{_datadir}/icons/hicolor/*/apps/vlc*.xpm %{_datadir}/vlc/skins2/ From 01e01098ce4cffc8a3b2ccaea6fa41348f47a0df Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Sep 2019 13:33:27 +0200 Subject: [PATCH 462/671] Update changelog --- vlc.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlc.spec b/vlc.spec index 353eecb..4f2d773 100644 --- a/vlc.spec +++ b/vlc.spec @@ -139,7 +139,10 @@ BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) +# Not Yet in EL8 +%if 0%{?fedora} || 0%{?el7} BuildRequires: pkgconfig(libplacebo) +%endif BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) BuildRequires: libupnp-devel @@ -557,6 +560,10 @@ fi || : %changelog +* Tue Sep 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-20 +- Add EL8 support +- Drop kde-filesystem + * Wed Aug 21 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.8-2 - Rebuild for dav1d and aom SONAME bump From 78849c8c58cdafe3eb6a4750880ad920ec941520 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 17 Sep 2019 13:46:04 +0200 Subject: [PATCH 463/671] Drop any phonon support for RHEL Won't be enabled until RHEL 8.1 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 4f2d773..7ddc9e9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -221,7 +221,7 @@ BuildRequires: raspberrypi-vc-static BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} BuildRequires: phonon-qt5-devel BuildRequires: phonon-qt5-backend-gstreamer %else From 48d97b53560454443fde5d3ff3fc685e3e3935c7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 14 Oct 2019 16:58:39 +0200 Subject: [PATCH 464/671] Update to 20191014 --- sources | 2 +- vlc.spec | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 024f02b..cc99bb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -640636353eef9826e33c46e791017efc vlc-3.0.8-20190820-0222.tar.xz +SHA512 (vlc-3.0.9-20191014-0223.tar.xz) = c4585121d67d426d4cc1441f3b7f11be864b2a9e4da100e5b5f3a7116a4bce8e96c809ee9048b9566cf8c1893d2326ca9afad5913696ecfd8b502f80cdfd1a78 diff --git a/vlc.spec b/vlc.spec index 7ddc9e9..e3ba001 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20190820 +%global vlc_date 20191014 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0222 +%global vlc_tag -%{?vlc_date}-0223 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -53,12 +53,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.8 -Release: 20%{?dist} +Version: 3.0.9 +Release: 21%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: https://github.com/RPi-Distro/vlc/raw/stretch-rpt/debian/patches/mmal_8.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_10.patch Patch1: libplacebo_patch_1.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch @@ -560,6 +560,10 @@ fi || : %changelog +* Mon Oct 14 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-21 +- Update to 20191014 +- Update mmal patch to 10 + * Tue Sep 17 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.8-20 - Add EL8 support - Drop kde-filesystem From bc72c5e844ee2b7982fd071206fc82e1db850281 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 14 Oct 2019 17:00:47 +0200 Subject: [PATCH 465/671] Update mmal patch --- mmal_8.patch => mmal_10.patch | 3084 ++++++++++++++++++++++++--------- 1 file changed, 2234 insertions(+), 850 deletions(-) rename mmal_8.patch => mmal_10.patch (86%) diff --git a/mmal_8.patch b/mmal_10.patch similarity index 86% rename from mmal_8.patch rename to mmal_10.patch index 8744fcb..6ed981e 100644 --- a/mmal_8.patch +++ b/mmal_10.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -3419,6 +3419,9 @@ +@@ -3420,6 +3420,9 @@ AC_ARG_ENABLE(mmal, AS_HELP_STRING([--enable-mmal], [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)])) @@ -10,7 +10,7 @@ if test "${enable_mmal}" != "no"; then VLC_SAVE_FLAGS LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif" -@@ -3429,7 +3432,7 @@ +@@ -3430,7 +3433,7 @@ VLC_ADD_PLUGIN([mmal]) VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) @@ -19,7 +19,7 @@ AS_IF([test "${enable_mmal}" = "yes"], [ AC_MSG_ERROR([Cannot find bcm library...]) ], [ AC_MSG_WARN([Cannot find bcm library...]) ]) -@@ -3441,6 +3444,7 @@ +@@ -3442,6 +3445,7 @@ VLC_RESTORE_FLAGS fi AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"]) @@ -29,19 +29,20 @@ dnl evas plugin --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h -@@ -365,6 +365,9 @@ +@@ -365,6 +365,10 @@ /* Broadcom MMAL opaque buffer type */ #define VLC_CODEC_MMAL_OPAQUE VLC_FOURCC('M','M','A','L') +#define VLC_CODEC_MMAL_ZC_SAND8 VLC_FOURCC('Z','S','D','8') +#define VLC_CODEC_MMAL_ZC_SAND10 VLC_FOURCC('Z','S','D','0') +#define VLC_CODEC_MMAL_ZC_I420 VLC_FOURCC('Z','4','2','0') ++#define VLC_CODEC_MMAL_ZC_RGB32 VLC_FOURCC('Z','R','G','B') /* DXVA2 opaque video surface for use with D3D9 */ #define VLC_CODEC_D3D9_OPAQUE VLC_FOURCC('D','X','A','9') /* 4:2:0 8 bpc */ --- a/modules/hw/mmal/Makefile.am +++ b/modules/hw/mmal/Makefile.am -@@ -1,23 +1,39 @@ +@@ -1,23 +1,46 @@ include $(top_srcdir)/modules/common.am mmaldir = $(pluginsdir)/mmal @@ -58,7 +59,8 @@ mmal_LTLIBRARIES = libmmal_vout_plugin.la -libmmal_codec_plugin_la_SOURCES = codec.c -+libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h ++libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h\ ++ mmal_cma.c mmal_cma.h libmmal_codec_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_codec_plugin_la_LDFLAGS = $(AM_LDFLAGS) libmmal_codec_plugin_la_LIBADD = $(LIBS_mmal) @@ -77,6 +79,12 @@ +libmmal_xsplitter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_xsplitter_plugin.la + ++libmmal_converter_plugin_la_SOURCES = converter_mmal.c mmal_cma.c mmal_picture.c mmal_cma.h mmal_picture.h ++libmmal_converter_plugin_la_CFLAGS = $(AM_CFLAGS) ++libmmal_converter_plugin_la_LDFLAGS = $(AM_LDFLAGS) ++libmmal_converter_plugin_la_LIBADD = $(LIBS_mmal) ++mmal_LTLIBRARIES += libmmal_converter_plugin.la ++ +if HAVE_MMAL_AVCODEC +libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_picture.c mmal_picture.h +libmmal_avcodec_plugin_la_CFLAGS = $(AM_CFLAGS) @@ -88,7 +96,7 @@ + --- /dev/null +++ b/modules/hw/mmal/blend_rgba_neon.S -@@ -0,0 +1,200 @@ +@@ -0,0 +1,197 @@ + .syntax unified + .arm +// .thumb @@ -142,7 +150,6 @@ + vld4.8 {d16, d17, d18, d19}, [r1] + +1: -+ @ Alpha ends up in d19 + vmull.u8 q15, \sA, d7 + + vld4.8 {d20, d21, d22, d23}, [r0] @@ -189,26 +196,27 @@ + mov r2, r0 + bcc 1f + vld4.8 {d16[0], d17[0], d18[0], d19[0]}, [r1]! -+ vld4.8 {d20[0], d21[0], d22[0], d23[0]}, [r0]! ++ vld4.8 {d20[0], d21[0], d22[0], d23[0]}, [r2]! + vld4.8 {d16[1], d17[1], d18[1], d19[1]}, [r1]! -+ vld4.8 {d20[1], d21[1], d22[1], d23[1]}, [r0]! ++ vld4.8 {d20[1], d21[1], d22[1], d23[1]}, [r2]! + vld4.8 {d16[2], d17[2], d18[2], d19[2]}, [r1]! -+ vld4.8 {d20[2], d21[2], d22[2], d23[2]}, [r0]! ++ vld4.8 {d20[2], d21[2], d22[2], d23[2]}, [r2]! + vld4.8 {d16[3], d17[3], d18[3], d19[3]}, [r1]! -+ vld4.8 {d20[3], d21[3], d22[3], d23[3]}, [r0]! ++ vld4.8 {d20[3], d21[3], d22[3], d23[3]}, [r2]! +1: + bpl 1f + vld4.8 {d16[4], d17[4], d18[4], d19[4]}, [r1]! -+ vld4.8 {d20[4], d21[4], d22[4], d23[4]}, [r0]! ++ vld4.8 {d20[4], d21[4], d22[4], d23[4]}, [r2]! + vld4.8 {d16[5], d17[5], d18[5], d19[5]}, [r1]! -+ vld4.8 {d20[5], d21[5], d22[5], d23[5]}, [r0]! ++ vld4.8 {d20[5], d21[5], d22[5], d23[5]}, [r2]! +1: + tst r3, #1 + beq 1f + vld4.8 {d16[6], d17[6], d18[6], d19[6]}, [r1]! -+ vld4.8 {d20[6], d21[6], d22[6], d23[6]}, [r0]! ++ vld4.8 {d20[6], d21[6], d22[6], d23[6]}, [r2]! +1: -+ @ Alpha ends up in d19 ++ @ Set conditions for later ++ lsls r2, r3, #30 @ b2 -> C, b1 -> N + + vmull.u8 q15, \sA, d7 + vsra.u16 q15, q15, #8 @@ -232,9 +240,6 @@ + vrshrn.u16 \dB, q14, #8 + vmov.u8 \dA, #0xff + -+ mov r0, r2 -+ lsls r2, r3, #30 @ b2 -> C, b1 -> N -+ mov r2, r0 + bcc 1f + vst4.8 {d20[0], d21[0], d22[0], d23[0]}, [r0]! + vst4.8 {d20[1], d21[1], d22[1], d23[1]}, [r0]! @@ -246,9 +251,9 @@ + vst4.8 {d20[5], d21[5], d22[5], d23[5]}, [r0]! +1: + tst r3, #1 -+ beq 1f ++ bxeq lr + vst4.8 {d20[6], d21[6], d22[6], d23[6]}, [r0]! -+1: ++ + bx lr + +.endm @@ -508,15 +513,20 @@ #include <vlc_threads.h> #include <bcm_host.h> -@@ -38,255 +40,393 @@ +@@ -37,256 +39,383 @@ + #include <interface/mmal/util/mmal_util.h> #include <interface/mmal/util/mmal_default_components.h> ++#include <interface/vcsm/user-vcsm.h> ++ ++#include "mmal_cma.h" #include "mmal_picture.h" + +#include "subpic.h" +#include "blend_rgba_neon.h" + +#define TRACE_ALL 0 - ++ /* * This seems to be a bit high, but reducing it causes instabilities */ @@ -554,7 +564,7 @@ - add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false) - set_callbacks(OpenDecoder, CloseDecoder) -vlc_module_end() - +- -struct decoder_sys_t { - bool opaque; +typedef struct decoder_sys_t @@ -574,6 +584,8 @@ + bool b_flushed; + ++ vcsm_init_type_t vcsm_init_type; ++ + // Lock to avoid pic update & allocate happenening simultainiously + // * We should be able to arrange life s.t. this isn't needed + // but while we are confused apply belt & braces @@ -583,22 +595,8 @@ - int output_in_transit; - int input_in_transit; atomic_bool started; +-}; +} decoder_sys_t; -+ -+ -+typedef struct supported_mmal_enc_s { -+ struct { -+ MMAL_PARAMETER_HEADER_T header; -+ MMAL_FOURCC_T encodings[64]; -+ } supported; -+ int n; -+} supported_mmal_enc_t; -+ -+static supported_mmal_enc_t supported_mmal_enc = -+{ -+ {{MMAL_PARAMETER_SUPPORTED_ENCODINGS, sizeof(((supported_mmal_enc_t *)0)->supported)}, {0}}, -+ -1 - }; -/* Utilities */ -static int change_output_format(decoder_t *dec); @@ -613,46 +611,46 @@ -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -+static inline char safe_char(const unsigned int c0) -+{ -+ const unsigned int c = c0 & 0xff; -+ return c > ' ' && c < 0x7f ? c : '.'; -+} -static int OpenDecoder(decoder_t *dec) -+static const char * str_fourcc(char * buf, unsigned int fcc) - { +-{ - int ret = VLC_SUCCESS; - decoder_sys_t *sys; - MMAL_PARAMETER_UINT32_T extra_buffers; - MMAL_STATUS_T status; -+ if (fcc == 0) -+ return "----"; -+ buf[0] = safe_char(fcc >> 0); -+ buf[1] = safe_char(fcc >> 8); -+ buf[2] = safe_char(fcc >> 16); -+ buf[3] = safe_char(fcc >> 24); -+ buf[4] = 0; -+ return buf; ++typedef struct supported_mmal_enc_s { ++ struct { ++ MMAL_PARAMETER_HEADER_T header; ++ MMAL_FOURCC_T encodings[64]; ++ } supported; ++ int n; ++} supported_mmal_enc_t; ++ ++#define SUPPORTED_MMAL_ENC_INIT \ ++{ \ ++ {{MMAL_PARAMETER_SUPPORTED_ENCODINGS, sizeof(((supported_mmal_enc_t *)0)->supported)}, {0}}, \ ++ -1 \ +} - if (dec->fmt_in.i_codec != VLC_CODEC_MPGV && - dec->fmt_in.i_codec != VLC_CODEC_H264) - return VLC_EGENERIC; -+static bool is_enc_supported(const MMAL_FOURCC_T fcc) -+{ -+ int i; ++static supported_mmal_enc_t supported_decode_in_enc = SUPPORTED_MMAL_ENC_INIT; - sys = calloc(1, sizeof(decoder_sys_t)); - if (!sys) { - ret = VLC_ENOMEM; - goto out; ++static bool is_enc_supported(supported_mmal_enc_t * const support, const MMAL_FOURCC_T fcc) ++{ ++ int i; ++ + if (fcc == 0) + return false; -+ if (supported_mmal_enc.n == -1) ++ if (support->n == -1) + return true; // Unknown - say OK -+ for (i = 0; i < supported_mmal_enc.n; ++i) { -+ if (supported_mmal_enc.supported.encodings[i] == fcc) ++ for (i = 0; i < support->n; ++i) { ++ if (support->supported.encodings[i] == fcc) + return true; } - dec->p_sys = sys; @@ -661,15 +659,15 @@ - sys->opaque = var_InheritBool(dec, MMAL_OPAQUE_NAME); - bcm_host_init(); -+static bool set_and_test_enc_supported(MMAL_PORT_T * port, const MMAL_FOURCC_T fcc) ++static bool set_and_test_enc_supported(supported_mmal_enc_t * const support, MMAL_PORT_T * port, const MMAL_FOURCC_T fcc) +{ -+ if (supported_mmal_enc.n >= 0) ++ if (support->n >= 0) + /* already done */; -+ else if (mmal_port_parameter_get(port, (MMAL_PARAMETER_HEADER_T *)&supported_mmal_enc.supported) != MMAL_SUCCESS) -+ supported_mmal_enc.n = 0; ++ else if (mmal_port_parameter_get(port, (MMAL_PARAMETER_HEADER_T *)&support->supported) != MMAL_SUCCESS) ++ support->n = 0; + else -+ supported_mmal_enc.n = (supported_mmal_enc.supported.header.size - sizeof(supported_mmal_enc.supported.header)) / -+ sizeof(supported_mmal_enc.supported.encodings[0]); ++ support->n = (support->supported.header.size - sizeof(support->supported.header)) / ++ sizeof(support->supported.encodings[0]); - status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, &sys->component); - if (status != MMAL_SUCCESS) { @@ -678,7 +676,7 @@ - ret = VLC_EGENERIC; - goto out; - } -+ return is_enc_supported(fcc); ++ return is_enc_supported(support, fcc); +} - sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)dec; @@ -1071,7 +1069,7 @@ if (atomic_load(&sys->started)) { mmal_format_full_copy(sys->output->format, sys->output_format); status = mmal_port_format_commit(sys->output); -@@ -300,7 +440,9 @@ +@@ -300,7 +429,9 @@ } port_reset: @@ -1081,7 +1079,7 @@ status = mmal_port_disable(sys->output); if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to disable output port (status=%"PRIx32" %s)", -@@ -318,18 +460,10 @@ +@@ -318,18 +449,10 @@ goto out; } @@ -1102,7 +1100,7 @@ if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to enable output port (status=%"PRIx32" %s)", status, mmal_status_to_string(status)); -@@ -338,25 +472,14 @@ +@@ -338,25 +461,14 @@ } if (!atomic_load(&sys->started)) { @@ -1131,7 +1129,7 @@ } apply_fmt: -@@ -382,12 +505,19 @@ +@@ -382,12 +494,19 @@ sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive); sys->b_top_field_first = sys->b_progressive ? true : (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst); @@ -1151,7 +1149,7 @@ out: mmal_format_free(sys->output_format); sys->output_format = NULL; -@@ -395,144 +525,85 @@ +@@ -395,144 +514,85 @@ return ret; } @@ -1201,7 +1199,7 @@ - ret = VLC_EGENERIC; - goto err; - } -- + - if (!sys->opaque) - buffer->data = picture->p[0].p_pixels; - } else { @@ -1215,7 +1213,7 @@ - } - buffer->user_data = picture; - buffer->cmd = 0; - +- - status = mmal_port_send_buffer(sys->output, buffer); + status = mmal_port_format_commit(sys->input); if (status != MMAL_SUCCESS) { @@ -1302,6 +1300,10 @@ - MMAL_BUFFER_HEADER_T *buffer; - MMAL_STATUS_T status; + decoder_sys_t *const sys = dec->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: <<<", __func__); ++#endif - msg_Dbg(dec, "Flushing decoder ports..."); - mmal_port_flush(sys->output); @@ -1310,10 +1312,6 @@ - while (atomic_load(&sys->output_in_transit) || - atomic_load(&sys->input_in_transit)) - vlc_sem_wait(&sys->sem); -+#if TRACE_ALL -+ msg_Dbg(dec, "%s: <<<", __func__); -+#endif -+ + if (!sys->b_flushed) { + mmal_port_disable(sys->input); + mmal_port_disable(sys->output); @@ -1349,7 +1347,7 @@ /* * Configure output port if necessary */ -@@ -541,18 +612,50 @@ +@@ -541,18 +601,50 @@ msg_Err(dec, "Failed to change output port format"); } @@ -1403,7 +1401,7 @@ if (atomic_load(&sys->started)) fill_output_port(dec); -@@ -563,18 +666,21 @@ +@@ -563,18 +655,21 @@ if (block->i_flags & BLOCK_FLAG_CORRUPTED) flags |= MMAL_BUFFER_HEADER_FLAG_CORRUPTED; @@ -1430,7 +1428,7 @@ len = block->i_buffer; if (len > buffer->alloc_size) -@@ -590,89 +696,1443 @@ +@@ -590,89 +685,1549 @@ } buffer->flags = flags; @@ -1499,6 +1497,8 @@ + + hw_mmal_port_pool_ref_release(sys->ppr, false); + ++ cma_vcsm_exit(sys->vcsm_init_type); ++ + vlc_mutex_destroy(&sys->pic_lock); + free(sys); + @@ -1527,7 +1527,7 @@ + } +#endif + -+ if (!is_enc_supported(in_fcc)) ++ if (!is_enc_supported(&supported_decode_in_enc, in_fcc)) + return VLC_EGENERIC; + + sys = calloc(1, sizeof(decoder_sys_t)); @@ -1540,6 +1540,12 @@ + + bcm_host_init(); + ++ if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { ++ msg_Err(dec, "VCSM init failed"); ++ goto fail; ++ } ++ msg_Info(dec, "VCSM init succeeded: %s", cma_vcsm_init_str(sys->vcsm_init_type)); ++ + sys->err_stream = MMAL_SUCCESS; + + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, &sys->component); @@ -1555,7 +1561,7 @@ + sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)dec; + sys->input->format->encoding = in_fcc; + -+ if (!set_and_test_enc_supported(sys->input, in_fcc)) { ++ if (!set_and_test_enc_supported(&supported_decode_in_enc, sys->input, in_fcc)) { +#if TRACE_ALL + char cbuf[5]; + msg_Dbg(dec, "Format not supported: %s", str_fourcc(cbuf, in_fcc)); @@ -1696,6 +1702,8 @@ + MMAL_POOL_T *out_pool; // Free output buffers + MMAL_POOL_T *in_pool; // Input pool to get BH for replication + ++ cma_pool_fixed_t * cma_out_pool; ++ + subpic_reg_stash_t subs[SUBS_MAX]; + + pic_fifo_t ret_pics; @@ -1709,6 +1717,7 @@ + MMAL_STATUS_T err_stream; + int in_count; + ++ bool is_cma; + bool is_sliced; + bool out_fmt_set; + bool latency_set; @@ -1733,18 +1742,17 @@ + unsigned int bpp = (pic->format.i_bits_per_pixel + 7) >> 3; + MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; + -+ if (bpp < 1 || bpp > 4) -+ return MMAL_EINVAL; -+ + es_fmt->type = MMAL_ES_TYPE_VIDEO; + es_fmt->encoding = vlc_to_mmal_video_fourcc(&pic->format); + es_fmt->encoding_variant = 0; + + // Fill in crop etc. + vlc_to_mmal_video_fmt(es_fmt, &pic->format); -+ // Override width / height with strides -+ v_fmt->width = pic->p[0].i_pitch / bpp; -+ v_fmt->height = pic->p[0].i_lines; ++ // Override width / height with strides if appropriate ++ if (bpp != 0) { ++ v_fmt->width = pic->p[0].i_pitch / bpp; ++ v_fmt->height = pic->p[0].i_lines; ++ } + return MMAL_SUCCESS; +} + @@ -1766,6 +1774,20 @@ +{ + MMAL_STATUS_T err = MMAL_SUCCESS; + ++ if (sys->is_cma) ++ { ++ if (sys->cma_out_pool == NULL && ++ (sys->cma_out_pool = cma_buf_pool_new()) == NULL) ++ { ++ msg_Err(p_filter, "Failed to alloc cma buf pool"); ++ return MMAL_ENOMEM; ++ } ++ } ++ else ++ { ++ cma_buf_pool_deletez(&sys->cma_out_pool); ++ } ++ + if (!sys->output->is_enabled && + (err = mmal_port_enable(sys->output, sys->out_port_cb_fn)) != MMAL_SUCCESS) + { @@ -1837,7 +1859,10 @@ } -static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -+static void conv_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++static const uint8_t shift_00[] = {0,0,0,0}; ++static const uint8_t shift_01[] = {0,1,1,1}; ++ ++static int cma_pic_set_data(filter_t * const p_filter, picture_t * const pic, const MMAL_BUFFER_HEADER_T * const buf) { - decoder_t *dec = (decoder_t *)port->userdata; - decoder_sys_t *sys = dec->p_sys; @@ -1859,6 +1884,61 @@ - buffer->alloc_size = 0; - buffer->data = NULL; - mmal_buffer_header_release(buffer); +- } +- } +- atomic_fetch_sub(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); +- } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { +- fmt = mmal_event_format_changed_get(buffer); ++ filter_sys_t *const sys = p_filter->p_sys; ++ const MMAL_VIDEO_FORMAT_T * const mm_fmt = &sys->output->format->es->video; ++ const MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T *const buf_vid = &buf->type->video; ++ ++ uint8_t * const data = cma_buf_pic_addr(pic); ++ if (data == NULL) { ++ return VLC_ENOMEM; ++ } ++ ++ const uint8_t * ws = shift_00; ++ const uint8_t * hs = shift_00; ++ int pb = 1; ++ ++ switch (p_filter->fmt_out.video.i_chroma) ++ { ++ case VLC_CODEC_MMAL_ZC_RGB32: ++ pb = 4; ++ break; + +- format = mmal_format_alloc(); +- mmal_format_full_copy(format, fmt->format); ++ case VLC_CODEC_MMAL_ZC_I420: ++ case VLC_CODEC_MMAL_ZC_SAND8: ++ hs = shift_01; ++ break; + +- if (sys->opaque) +- format->encoding = MMAL_ENCODING_OPAQUE; ++ default: ++ msg_Err(p_filter, "%s: Unexpected format", __func__); ++ return VLC_EGENERIC; ++ } ++ ++ pic->i_planes = buf_vid->planes; ++ for (unsigned int i = 0; i != buf_vid->planes; ++i) { ++ pic->p[i] = (plane_t){ ++ .p_pixels = data + buf_vid->offset[i], ++ .i_lines = mm_fmt->height >> hs[i], ++ .i_pitch = buf_vid->pitch[i], ++ .i_pixel_pitch = pb, ++ .i_visible_lines = mm_fmt->crop.height >> hs[i], ++ .i_visible_pitch = mm_fmt->crop.width >> ws[i] ++ }; ++ } ++ return VLC_SUCCESS; ++} ++ ++static void conv_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ + filter_t * const p_filter = (filter_t *)port->userdata; + filter_sys_t * const sys = p_filter->p_sys; + @@ -1884,6 +1964,11 @@ + { + buf_to_pic_copy_props(pic, buf); + ++ if (sys->is_cma) { ++ if (cma_pic_set_data(p_filter, pic, buf) != VLC_SUCCESS) ++ msg_Err(p_filter, "Failed to set data"); ++ } ++ +// draw_corners(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 0, 0, pic->p[0].i_visible_pitch / 4, pic->p[0].i_visible_lines); +#if DEBUG_SQUARES + draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 0, 0, 32, 32, 0xffff0000); @@ -1949,7 +2034,7 @@ + if (src_stride == dst_stride) { + if (copy_n != 0) + memcpy(dst, src, src_stride * copy_n); - } ++ } + else { + unsigned int i; + for (i = 0; i != copy_n; ++i) { @@ -1959,18 +2044,10 @@ + } + } + sys->slice.line += scale_n; - } -- atomic_fetch_sub(&sys->output_in_transit, 1); -- vlc_sem_post(&sys->sem); -- } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { -- fmt = mmal_event_format_changed_get(buffer); - -- format = mmal_format_alloc(); -- mmal_format_full_copy(format, fmt->format); ++ } ++ + if ((buf->flags & MMAL_BUFFER_HEADER_FLAG_FRAME_END) != 0 || sys->slice.line >= scale_lines) { - -- if (sys->opaque) -- format->encoding = MMAL_ENCODING_OPAQUE; ++ + if ((buf->flags & MMAL_BUFFER_HEADER_FLAG_FRAME_END) == 0 || sys->slice.line != scale_lines) { + // Stuff doesn't add up... + msg_Err(p_filter, "Line count (%d/%d) & EOF disagree (flags=%#x)", sys->slice.line, scale_lines, buf->flags); @@ -1988,7 +2065,8 @@ + } + } + } -+ + +- sys->output_format = format; + // Put back + buf->user_data = NULL; // Zap here to make sure we can't reuse later + mmal_buffer_header_reset(buf); @@ -2026,6 +2104,8 @@ + if (sys->output != NULL && sys->output->is_enabled) + mmal_port_disable(sys->output); + ++ cma_buf_pool_deletez(&sys->cma_out_pool); ++ + // Free up anything we may have already lying around + // Don't need lock as the above disables should have prevented anything + // happening in the background @@ -2101,7 +2181,7 @@ + if ((status = pic_to_format(sys->output->format, pic)) != MMAL_SUCCESS) + { + char cbuf[5]; -+ msg_Err(p_filter, "Bad format desc: %s, bits=%d", str_fourcc(cbuf, pic->format.i_chroma), pic->format.i_bits_per_pixel); ++ msg_Err(p_filter, "Bad format desc: %s, pic=%p, bits=%d", str_fourcc(cbuf, pic->format.i_chroma), pic, pic->format.i_bits_per_pixel); + return status; + } + @@ -2120,11 +2200,11 @@ + + sys->output->buffer_num = __MAX(sys->is_sliced ? 16 : 2, sys->output->buffer_num_recommended); + sys->output->buffer_size = sys->output->buffer_size_recommended; -+ + +- mmal_buffer_header_release(buffer); + if ((status = conv_enable_out(p_filter, sys)) != MMAL_SUCCESS) + return status; - -- sys->output_format = format; ++ + return MMAL_SUCCESS; +} + @@ -2167,8 +2247,12 @@ + + for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { + int rv; -+ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(p_filter), p_pic, sub_no, sys->subs + sub_no, -+ &sys->output->format->es->video.crop, frame_seq)) == 0) ++ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(p_filter), ++ hw_mmal_pic_sub_buf_get(p_pic, sub_no), ++ sys->subs + sub_no, ++ &p_pic->format, ++ &sys->output->format->es->video.crop, ++ frame_seq)) == 0) + break; + else if (rv < 0) + goto fail; @@ -2201,7 +2285,6 @@ + goto fail; + } + -+ msg_Dbg(p_filter, "Outpool: zc=%d, num=%d, size=%d", sys->is_sliced, sys->output->buffer_num, sys->output->buffer_size); + sys->out_pool = sys->is_sliced ? + mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size) : + mmal_pool_create(sys->output->buffer_num, 0); @@ -2291,13 +2374,35 @@ + + mmal_buffer_header_reset(out_buf); + out_buf->user_data = out_pic; -+ out_buf->data = out_pic->p[0].p_pixels; -+ out_buf->alloc_size = out_pic->p[0].i_pitch * out_pic->p[0].i_lines; -+ //**** stride ???? ++ ++ if (sys->is_cma) { ++ int rv; ++ if ((rv = cma_buf_pic_attach(sys->cma_out_pool, out_pic, sys->output->buffer_size)) != VLC_SUCCESS) ++ { ++ char dbuf0[5]; ++ msg_Err(p_filter, "Failed to attach CMA to pic: fmt=%s err=%d", ++ str_fourcc(dbuf0, out_pic->format.i_chroma), ++ rv); ++ goto fail; ++ } ++ const unsigned int vc_h = cma_buf_pic_vc_handle(out_pic); ++ if (vc_h == 0) ++ { ++ msg_Err(p_filter, "Pic has no vc handle"); ++ goto fail; ++ } ++ out_buf->data = (uint8_t *)vc_h; ++ out_buf->alloc_size = sys->output->buffer_size; ++ } ++ else { ++ out_buf->data = out_pic->p[0].p_pixels; ++ out_buf->alloc_size = out_pic->p[0].i_pitch * out_pic->p[0].i_lines; ++ //**** stride ???? ++ } + +#if TRACE_ALL -+ msg_Dbg(p_filter, "Out buf send: pic=%p, buf=%p, flags=%#x, len=%d/%d, pts=%lld", -+ p_pic, out_buf->user_data, out_buf->flags, ++ msg_Dbg(p_filter, "Out buf send: pic=%p, data=%p, user=%p, flags=%#x, len=%d/%d, pts=%lld", ++ p_pic, out_buf->data, out_buf->user_data, out_buf->flags, + out_buf->length, out_buf->alloc_size, (long long)out_buf->pts); +#endif + @@ -2365,8 +2470,7 @@ +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); +#endif - -- mmal_buffer_header_release(buffer); ++ + return ret_pics; + +stream_fail: @@ -2488,6 +2592,8 @@ + use_isp = var_InheritBool(p_filter, MMAL_ISP_NAME); + +retry: ++ // ** Make more generic by checking supported encs ++ // + // Must use ISP - HVS can't do this, nor can resizer + if (enc_in == MMAL_ENCODING_YUVUV64_10) { + // If resizer selected then just give up @@ -2496,6 +2602,11 @@ + // otherwise downgrade HVS to ISP + use_isp = true; + } ++ // HVS can't do I420 ++ if (enc_out == MMAL_ENCODING_I420) { ++ use_isp = true; ++ } ++ + + if (use_resizer) { + // use resizer overrides use_isp @@ -2543,6 +2654,7 @@ + pic_fifo_init(&sys->slice.pics); + + sys->in_port_cb_fn = conv_input_port_cb; ++ + if (use_resizer) { + sys->resizer_type = FILTER_RESIZER_RESIZER; + sys->is_sliced = true; @@ -2561,6 +2673,7 @@ + sys->component_name = MMAL_COMPONENT_HVS; + sys->out_port_cb_fn = conv_output_port_cb; + } ++ sys->is_cma = is_cma_buf_pic_chroma(p_filter->fmt_out.video.i_chroma); + + status = mmal_component_create(sys->component_name, &sys->component); + if (status != MMAL_SUCCESS) { @@ -2573,7 +2686,7 @@ + msg_Err(p_filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", + MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); + goto fail; - } ++ } + sys->output = sys->component->output[0]; + sys->input = sys->component->input[0]; + @@ -2583,7 +2696,7 @@ + msg_Err(p_filter, "Failed to enable control port %s (status=%"PRIx32" %s)", + sys->component->control->name, status, mmal_status_to_string(status)); + goto fail; -+ } + } + + sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; + sys->input->format->type = MMAL_ES_TYPE_VIDEO; @@ -2606,7 +2719,7 @@ + if ((status = conv_enable_in(p_filter, sys)) != MMAL_SUCCESS) + goto fail; + -+ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, sys->is_sliced); ++ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, sys->is_sliced || sys->is_cma); + + status = mmal_component_enable(sys->component); + if (status != MMAL_SUCCESS) { @@ -2685,24 +2798,15 @@ + else + { + // cast away src const so we can ref it -+ MMAL_BUFFER_HEADER_T *buf = hw_mmal_vzc_buf_from_pic(sys->vzc, (picture_t *)src, dst, ++ MMAL_BUFFER_HEADER_T *buf = hw_mmal_vzc_buf_from_pic(sys->vzc, (picture_t *)src, ++ vis_mmal_rect(&dst->format), ++ x_offset, y_offset, ++ alpha, + dst != sys->last_dst || !hw_mmal_pic_has_sub_bufs(dst)); + if (buf == NULL) { + msg_Err(p_filter, "Failed to allocate vzc buffer for subpic"); + return; + } -+ MMAL_DISPLAYREGION_T * const reg = hw_mmal_vzc_buf_region(buf); -+ -+ reg->set |= -+ MMAL_DISPLAY_SET_ALPHA | MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_DEST_RECT; -+ -+ reg->fullscreen = 0; -+ -+ reg->alpha = (uint32_t)(alpha & 0xff) | (1U << 31); -+ -+ hw_mmal_vzc_buf_set_dest_rect(buf, x_offset, y_offset, src->format.i_visible_width, src->format.i_visible_height); -+ -+ reg->dest_rect = (MMAL_RECT_T){0, 0, 0, 0}; + + hw_mmal_pic_sub_buf_add(dst, buf); + @@ -2767,7 +2871,7 @@ + + hw_mmal_vzc_pool_release(sys->vzc); + free(sys); -+} + } + +// --------------------------------------------------------------------------- + @@ -2825,7 +2929,7 @@ +static void CloseBlendNeon(vlc_object_t *object) +{ + VLC_UNUSED(object); - } ++} + +static int OpenBlendNeon(vlc_object_t *object) +{ @@ -2860,7 +2964,9 @@ + } + + if (blend_fn == (blend_neon_fn *)0) ++ { + return VLC_EGENERIC; ++ } + + p_filter->p_sys = (void *)blend_fn; + p_filter->pf_video_blend = FilterBlendNeon; @@ -2925,87 +3031,538 @@ +vlc_module_end() + + ---- a/modules/hw/mmal/deinterlace.c -+++ b/modules/hw/mmal/deinterlace.c -@@ -26,11 +26,12 @@ - #include "config.h" - #endif - --#include <vlc_picture_pool.h> -+#include <stdatomic.h> +--- /dev/null ++++ b/modules/hw/mmal/converter_mmal.c +@@ -0,0 +1,448 @@ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif + - #include <vlc_common.h> -+#include <vlc_picture_pool.h> - #include <vlc_plugin.h> - #include <vlc_filter.h> --#include <vlc_atomic.h> - - #include "mmal_picture.h" - -@@ -41,466 +42,569 @@ - - #define MIN_NUM_BUFFERS_IN_TRANSIT 2 - --#define MMAL_DEINTERLACE_QPU "mmal-deinterlace-adv-qpu" --#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.") --#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.") -+#define MMAL_DEINTERLACE_NO_QPU "mmal-deinterlace-no-qpu" -+#define MMAL_DEINTERLACE_NO_QPU_TEXT N_("Do not use QPUs for advanced HD deinterlacing.") -+#define MMAL_DEINTERLACE_NO_QPU_LONGTEXT N_("Do not make use of the QPUs to allow higher quality deinterlacing of HD content.") - --static int Open(filter_t *filter); --static void Close(filter_t *filter); -+#define MMAL_DEINTERLACE_ADV "mmal-deinterlace-adv" -+#define MMAL_DEINTERLACE_ADV_TEXT N_("Force advanced deinterlace") -+#define MMAL_DEINTERLACE_ADV_LONGTEXT N_("Force advanced deinterlace") - --vlc_module_begin() -- set_shortname(N_("MMAL deinterlace")) -- set_description(N_("MMAL-based deinterlace filter plugin")) -- set_capability("video filter", 0) -- set_category(CAT_VIDEO) -- set_subcategory(SUBCAT_VIDEO_VFILTER) -- set_callbacks(Open, Close) -- add_shortcut("deinterlace") -- add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, -- MMAL_DEINTERLACE_QPU_LONGTEXT, true); --vlc_module_end() -+#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" -+#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") -+#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") ++#include <unistd.h> ++#include <fcntl.h> ++#include <sys/ioctl.h> ++#include <sys/mman.h> + -+#define MMAL_DEINTERLACE_NONE "mmal-deinterlace-none" -+#define MMAL_DEINTERLACE_NONE_TEXT N_("Force no deinterlace") -+#define MMAL_DEINTERLACE_NONE_LONGTEXT N_("Force no interlace. Simply strips off the interlace markers and passes the frame straight through. "\ -+ "This is the default for > SD if < 96M gpu-mem") ++#include <interface/vcsm/user-vcsm.h> + -+#define MMAL_DEINTERLACE_HALF_RATE "mmal-deinterlace-half-rate" -+#define MMAL_DEINTERLACE_HALF_RATE_TEXT N_("Halve output framerate") -+#define MMAL_DEINTERLACE_HALF_RATE_LONGTEXT N_("Halve output framerate. 1 output frame for each pair of interlaced fields input") ++#include <vlc_common.h> ++#include <vlc_picture.h> + -+#define MMAL_DEINTERLACE_FULL_RATE "mmal-deinterlace-full-rate" -+#define MMAL_DEINTERLACE_FULL_RATE_TEXT N_("Full output framerate") -+#define MMAL_DEINTERLACE_FULL_RATE_LONGTEXT N_("Full output framerate. 1 output frame for each interlaced field input") - --struct filter_sys_t { ++#include <libdrm/drm_fourcc.h> ++#include <EGL/egl.h> ++#include <EGL/eglext.h> ++#include <GLES2/gl2.h> ++#include <GLES2/gl2ext.h> + -+typedef struct filter_sys_t -+{ - MMAL_COMPONENT_T *component; - MMAL_PORT_T *input; - MMAL_PORT_T *output; -+ MMAL_POOL_T *in_pool; -+ hw_mmal_port_pool_ref_t *out_ppr; - -- MMAL_QUEUE_T *filtered_pictures; -- vlc_sem_t sem; -+ MMAL_QUEUE_T * out_q; - -- atomic_bool started; -+ bool half_rate; -+ bool use_qpu; -+ bool use_fast; -+ bool use_passthrough; ++#include "mmal_cma.h" ++ ++#include "../../video_output/opengl/converter.h" ++ ++#include "mmal_picture.h" ++ ++#include <assert.h> ++ ++#define OPT_SAND 0 ++#define OPT_I420 1 ++#define OPT_RGB32 0 ++ ++ ++#if OPT_SAND ++#define FMT_IN VLC_CODEC_MMAL_ZC_SAND8 ++#elif OPT_I420 ++#define FMT_IN VLC_CODEC_MMAL_ZC_I420 ++#elif OPT_RGB32 ++#define FMT_IN VLC_CODEC_MMAL_ZC_RGB32 ++#elif ++#error Missing input format ++#endif ++ ++#define TRACE_ALL 0 ++ ++typedef struct mmal_gl_converter_s ++{ ++ EGLint drm_fourcc; ++ vcsm_init_type_t vcsm_init_type; ++ struct cma_pic_context_s * last_ctx_ref; ++ ++ PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; ++} mmal_gl_converter_t; ++ ++ ++static EGLint vlc_to_gl_fourcc(const video_format_t * const fmt) ++{ ++ // Converting to mmal selects the right RGB32 varient ++ switch(vlc_to_mmal_video_fourcc(fmt)) ++ { ++ case MMAL_ENCODING_I420: ++ return MMAL_FOURCC('Y','U','1','2'); ++ case MMAL_ENCODING_YV12: ++ return MMAL_FOURCC('Y','V','1','2'); ++ case MMAL_ENCODING_I422: ++ return MMAL_FOURCC('Y','U','1','6'); ++ case MMAL_ENCODING_YUVUV128: ++ case MMAL_ENCODING_NV12: ++ return MMAL_FOURCC('N','V','1','2'); ++ case MMAL_ENCODING_NV21: ++ return MMAL_FOURCC('N','V','2','1'); ++ case MMAL_ENCODING_RGB16: ++ return MMAL_FOURCC('R','G','1','6'); ++ case MMAL_ENCODING_RGB24: ++ return MMAL_FOURCC('B','G','2','4'); ++ case MMAL_ENCODING_BGR24: ++ return MMAL_FOURCC('R','G','2','4'); ++ case MMAL_ENCODING_BGR32: ++ case MMAL_ENCODING_BGRA: ++ return MMAL_FOURCC('X','R','2','4'); ++ case MMAL_ENCODING_RGB32: ++ case MMAL_ENCODING_RGBA: ++ return MMAL_FOURCC('X','B','2','4'); ++ default: ++ break; ++ } ++ return 0; ++} ++ ++typedef struct tex_context_s { ++ picture_context_t cmn; ++ GLuint texture; ++ ++ PFNGLDELETETEXTURESPROC DeleteTextures; // Copy fn pointer so we don't need tc on delete ++} tex_context_t; ++ ++static void tex_context_delete(tex_context_t * const tex) ++{ ++ tex->DeleteTextures(1, &tex->texture); ++ ++ free(tex); ++} ++ ++static void tex_context_destroy(picture_context_t * pic_ctx) ++{ ++ tex_context_delete((tex_context_t *)pic_ctx); ++} ++ ++static picture_context_t * tex_context_copy(picture_context_t * pic_ctx) ++{ ++ return pic_ctx; ++} ++ ++static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc, picture_t * const pic) ++{ ++ mmal_gl_converter_t * const sys = tc->priv; ++ ++ tex_context_t * tex = (tex_context_t *)cma_buf_pic_context2(pic); ++ if (tex != NULL) ++ return tex; ++ ++ if ((tex = malloc(sizeof(*tex))) == NULL) ++ return NULL; ++ ++ *tex = (tex_context_t){ ++ .cmn = { ++ .destroy = tex_context_destroy, ++ .copy = tex_context_copy ++ }, ++ .texture = 0, ++ .DeleteTextures = tc->vt->DeleteTextures ++ }; ++ ++ { ++ EGLint attribs[30]; ++ EGLint * a = attribs; ++ const int fd = cma_buf_pic_fd(pic); ++ uint8_t * base_addr = cma_buf_pic_addr(pic); ++ ++ if (pic->i_planes >= 4 || pic->i_planes <= 0) ++ { ++ msg_Err(tc, "%s: Bad planes", __func__); ++ goto fail; ++ } ++ ++ *a++ = EGL_WIDTH; ++ *a++ = pic->format.i_visible_width; ++ *a++ = EGL_HEIGHT; ++ *a++ = pic->format.i_visible_height; ++ *a++ = EGL_LINUX_DRM_FOURCC_EXT; ++ *a++ = sys->drm_fourcc; ++ ++ if (pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND8) ++ { ++ // Sand is its own very special bunny :-( ++ static const EGLint attnames[] = { ++ EGL_DMA_BUF_PLANE0_FD_EXT, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, ++ EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, ++ EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, ++ EGL_DMA_BUF_PLANE1_FD_EXT, ++ EGL_DMA_BUF_PLANE1_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE1_PITCH_EXT, ++ EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT, ++ EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT ++ }; ++ ++ const EGLint * n = attnames; ++ ++ for (int i = 0; i < pic->i_planes; ++i) ++ { ++ const uint64_t mod = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(pic->p[i].i_pitch >> 7); ++ ++ *a++ = *n++; ++ *a++ = fd; ++ *a++ = *n++; ++ *a++ = pic->p[i].p_pixels - base_addr; ++ *a++ = *n++; ++ *a++ = pic->format.i_width; ++ *a++ = *n++; ++ *a++ = (EGLint)(mod >> 32); ++ *a++ = *n++; ++ *a++ = (EGLint)(mod & 0xffffffff); ++ } ++ } ++ else ++ { ++ static const EGLint attnames[] = { ++ EGL_DMA_BUF_PLANE0_FD_EXT, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, ++ EGL_DMA_BUF_PLANE1_FD_EXT, ++ EGL_DMA_BUF_PLANE1_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE1_PITCH_EXT, ++ EGL_DMA_BUF_PLANE2_FD_EXT, ++ EGL_DMA_BUF_PLANE2_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE2_PITCH_EXT, ++ EGL_DMA_BUF_PLANE3_FD_EXT, ++ EGL_DMA_BUF_PLANE3_OFFSET_EXT, ++ EGL_DMA_BUF_PLANE3_PITCH_EXT ++ }; ++ ++ const EGLint * n = attnames; ++ ++ for (int i = 0; i < pic->i_planes; ++i) ++ { ++ *a++ = *n++; ++ *a++ = fd; ++ *a++ = *n++; ++ *a++ = pic->p[i].p_pixels - base_addr; ++ *a++ = *n++; ++ *a++ = pic->p[i].i_pitch; ++ } ++ } ++ ++ *a = EGL_NONE; ++ ++ const EGLImage image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs); ++ if (!image) { ++ msg_Err(tc, "Failed to import fd %d: Err=%#x", fd, tc->vt->GetError()); ++ goto fail; ++ } ++ ++ // ** ?? tc->tex_target ++ tc->vt->GenTextures(1, &tex->texture); ++ tc->vt->BindTexture(GL_TEXTURE_EXTERNAL_OES, tex->texture); ++ tc->vt->TexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ tc->vt->TexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ sys->glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, image); ++ ++ tc->gl->egl.destroyImageKHR(tc->gl, image); ++ } ++ ++ if (cma_buf_pic_add_context2(pic, &tex->cmn) != VLC_SUCCESS) ++ { ++ msg_Err(tc, "%s: add_context2 failed", __func__); ++ goto fail; ++ } ++ return tex; ++ ++fail: ++ tex_context_delete(tex); ++ return NULL; ++} ++ ++ ++static int ++tc_mmal_update(const opengl_tex_converter_t *tc, GLuint *textures, ++ const GLsizei *tex_width, const GLsizei *tex_height, ++ picture_t *pic, const size_t *plane_offset) ++{ ++ mmal_gl_converter_t * const sys = tc->priv; ++#if TRACE_ALL ++ msg_Err(tc, "%s: %d*%dx%d : %d*%dx%d", __func__, tc->tex_count, tex_width[0], tex_height[0], pic->i_planes, pic->p[0].i_pitch, pic->p[0].i_lines); ++#endif ++ VLC_UNUSED(tex_width); ++ VLC_UNUSED(tex_height); ++ VLC_UNUSED(plane_offset); ++ ++ if (!is_cma_buf_pic_chroma(pic->format.i_chroma)) ++ { ++ char cbuf[5]; ++ msg_Err(tc, "Pic with unexpected chroma: %s", str_fourcc(cbuf, pic->format.i_chroma)); ++ return VLC_EGENERIC; ++ } ++ ++ tex_context_t * const tex = get_tex_context(tc, pic); ++ if (tex == NULL) ++ return VLC_EGENERIC; ++ ++// tc->vt->BindTexture(GL_TEXTURE_EXTERNAL_OES, tex->texture); ++ ++ cma_buf_pic_context_unref(sys->last_ctx_ref); // ?? Needed ?? ++ sys->last_ctx_ref = cma_buf_pic_context_ref(pic); ++ ++ textures[0] = tex->texture; ++ return VLC_SUCCESS; ++} ++ ++static int ++tc_mmal_fetch_locations(opengl_tex_converter_t *tc, GLuint program) ++{ ++ tc->uloc.Texture[0] = tc->vt->GetUniformLocation(program, "Texture0"); ++ return tc->uloc.Texture[0] != -1 ? VLC_SUCCESS : VLC_EGENERIC; ++} ++ ++static void ++tc_mmal_prepare_shader(const opengl_tex_converter_t *tc, ++ const GLsizei *tex_width, const GLsizei *tex_height, ++ float alpha) ++{ ++ (void) tex_width; (void) tex_height; (void) alpha; ++ VLC_UNUSED(tc); ++// tc->vt->Uniform1i(tc->uloc.Texture[0], 0); ++} ++ ++static GLuint ++tc_fragment_shader_init(opengl_tex_converter_t * const tc, const GLenum tex_target, ++ const vlc_fourcc_t chroma, const video_color_space_t yuv_space) ++{ ++ VLC_UNUSED(yuv_space); ++ ++ tc->tex_count = 1; ++ tc->tex_target = tex_target; ++ tc->texs[0] = (struct opengl_tex_cfg) { ++ { 1, 1 }, { 1, 1 }, GL_RGB, chroma, GL_UNSIGNED_SHORT //** ?? ++ }; ++ ++ tc->pf_fetch_locations = tc_mmal_fetch_locations; ++ tc->pf_prepare_shader = tc_mmal_prepare_shader; ++ ++ ++ const char fs[] = ++ "#extension GL_OES_EGL_image_external : enable\n" ++ "precision mediump float;\n" ++ "uniform samplerExternalOES Texture0;\n" ++ "varying vec2 TexCoord0;\n" ++ "void main() {\n" ++ " gl_FragColor = texture2D(Texture0, TexCoord0);\n" ++ "}\n"; ++ ++ ++ const char *code = fs; ++ ++ GLuint fragment_shader = tc->vt->CreateShader(GL_FRAGMENT_SHADER); ++ tc->vt->ShaderSource(fragment_shader, 1, &code, NULL); ++ tc->vt->CompileShader(fragment_shader); ++ return fragment_shader; ++} ++ ++ ++static void ++CloseGLConverter(vlc_object_t *obj) ++{ ++ opengl_tex_converter_t * const tc = (opengl_tex_converter_t *)obj; ++ mmal_gl_converter_t * const sys = tc->priv; ++ ++ if (sys == NULL) ++ return; ++ ++ cma_buf_pic_context_unref(sys->last_ctx_ref); ++ cma_vcsm_exit(sys->vcsm_init_type); ++ free(sys); ++} ++ ++static int ++OpenGLConverter(vlc_object_t *obj) ++{ ++ opengl_tex_converter_t * const tc = (opengl_tex_converter_t *)obj; ++ int rv = VLC_EGENERIC; ++ const EGLint eglfmt = vlc_to_gl_fourcc(&tc->fmt); ++ ++ // Accept Opaque (as it can definitely be converted) or what we actually want ++ if (!(tc->fmt.i_chroma == FMT_IN || ++ tc->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE)) ++ { ++ return rv; ++ } ++ ++ if (tc->gl->ext != VLC_GL_EXT_EGL || ++ !tc->gl->egl.createImageKHR || !tc->gl->egl.destroyImageKHR) ++ { ++ // Missing an important callback ++ msg_Dbg(tc, "Missing EGL xxxImageKHR calls"); ++ return rv; ++ } ++ ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(tc, ">>> %s: V:%s/E:%s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, ++ str_fourcc(dbuf0, tc->fmt.i_chroma), ++ str_fourcc(dbuf1, eglfmt), ++ tc->fmt.i_width, tc->fmt.i_height, ++ tc->fmt.i_x_offset, tc->fmt.i_y_offset, ++ tc->fmt.i_visible_width, tc->fmt.i_visible_height, ++ tc->fmt.i_sar_num, tc->fmt.i_sar_den); ++ } ++ ++ if ((tc->priv = calloc(1, sizeof(mmal_gl_converter_t))) == NULL) ++ { ++ msg_Err(tc, "priv alloc failure"); ++ rv = VLC_ENOMEM; ++ goto fail; ++ } ++ mmal_gl_converter_t * const sys = tc->priv; ++ ++ sys->drm_fourcc = eglfmt; ++ ++ if ((sys->vcsm_init_type = cma_vcsm_init()) != VCSM_INIT_CMA) { ++ msg_Dbg(tc, "VCSM init failed"); ++ goto fail; ++ } ++ ++ if ((sys->glEGLImageTargetTexture2DOES = vlc_gl_GetProcAddress(tc->gl, "glEGLImageTargetTexture2DOES")) == NULL) ++ { ++ msg_Err(tc, "Failed to bind GL fns"); ++ goto fail; ++ } ++ ++ if ((tc->fshader = tc_fragment_shader_init(tc, GL_TEXTURE_EXTERNAL_OES, ++ eglfmt == 0 ? VLC_CODEC_RGB32 : tc->fmt.i_chroma, ++ eglfmt == 0 ? COLOR_SPACE_SRGB : tc->fmt.space)) == 0) ++ { ++ msg_Err(tc, "Failed to make shader"); ++ goto fail; ++ } ++ ++ if (eglfmt == 0) ++ { ++ tc->fmt.i_chroma = FMT_IN; ++ tc->fmt.i_bits_per_pixel = 8; ++ if (tc->fmt.i_chroma == VLC_CODEC_MMAL_ZC_RGB32) ++ { ++ tc->fmt.i_rmask = 0xff0000; ++ tc->fmt.i_gmask = 0xff00; ++ tc->fmt.i_bmask = 0xff; ++ tc->fmt.space = COLOR_SPACE_SRGB; ++ } ++ else ++ { ++ tc->fmt.i_rmask = 0; ++ tc->fmt.i_gmask = 0; ++ tc->fmt.i_bmask = 0; ++ tc->fmt.space = COLOR_SPACE_UNDEF; ++ } ++ sys->drm_fourcc = vlc_to_gl_fourcc(&tc->fmt); ++ } ++ ++ tc->handle_texs_gen = true; // We manage the texs ++ tc->pf_update = tc_mmal_update; ++ return VLC_SUCCESS; ++ ++fail: ++ CloseGLConverter(obj); ++ return rv; ++} ++ ++vlc_module_begin () ++ set_description("MMAL OpenGL surface converter") ++ set_shortname (N_("MMALGLConverter")) ++ set_capability("glconv", 900) ++ set_callbacks(OpenGLConverter, CloseGLConverter) ++ set_category(CAT_VIDEO) ++ set_subcategory(SUBCAT_VIDEO_VOUT) ++ add_shortcut("mmal_gl_converter") ++vlc_module_end () ++ +--- a/modules/hw/mmal/deinterlace.c ++++ b/modules/hw/mmal/deinterlace.c +@@ -26,11 +26,12 @@ + #include "config.h" + #endif + +-#include <vlc_picture_pool.h> ++#include <stdatomic.h> ++ + #include <vlc_common.h> ++#include <vlc_picture_pool.h> + #include <vlc_plugin.h> + #include <vlc_filter.h> +-#include <vlc_atomic.h> + + #include "mmal_picture.h" + +@@ -41,466 +42,569 @@ + + #define MIN_NUM_BUFFERS_IN_TRANSIT 2 + +-#define MMAL_DEINTERLACE_QPU "mmal-deinterlace-adv-qpu" +-#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.") +-#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.") ++#define MMAL_DEINTERLACE_NO_QPU "mmal-deinterlace-no-qpu" ++#define MMAL_DEINTERLACE_NO_QPU_TEXT N_("Do not use QPUs for advanced HD deinterlacing.") ++#define MMAL_DEINTERLACE_NO_QPU_LONGTEXT N_("Do not make use of the QPUs to allow higher quality deinterlacing of HD content.") + +-static int Open(filter_t *filter); +-static void Close(filter_t *filter); ++#define MMAL_DEINTERLACE_ADV "mmal-deinterlace-adv" ++#define MMAL_DEINTERLACE_ADV_TEXT N_("Force advanced deinterlace") ++#define MMAL_DEINTERLACE_ADV_LONGTEXT N_("Force advanced deinterlace") + +-vlc_module_begin() +- set_shortname(N_("MMAL deinterlace")) +- set_description(N_("MMAL-based deinterlace filter plugin")) +- set_capability("video filter", 0) +- set_category(CAT_VIDEO) +- set_subcategory(SUBCAT_VIDEO_VFILTER) +- set_callbacks(Open, Close) +- add_shortcut("deinterlace") +- add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, +- MMAL_DEINTERLACE_QPU_LONGTEXT, true); +-vlc_module_end() ++#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" ++#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") ++#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") ++ ++#define MMAL_DEINTERLACE_NONE "mmal-deinterlace-none" ++#define MMAL_DEINTERLACE_NONE_TEXT N_("Force no deinterlace") ++#define MMAL_DEINTERLACE_NONE_LONGTEXT N_("Force no interlace. Simply strips off the interlace markers and passes the frame straight through. "\ ++ "This is the default for > SD if < 96M gpu-mem") ++ ++#define MMAL_DEINTERLACE_HALF_RATE "mmal-deinterlace-half-rate" ++#define MMAL_DEINTERLACE_HALF_RATE_TEXT N_("Halve output framerate") ++#define MMAL_DEINTERLACE_HALF_RATE_LONGTEXT N_("Halve output framerate. 1 output frame for each pair of interlaced fields input") ++ ++#define MMAL_DEINTERLACE_FULL_RATE "mmal-deinterlace-full-rate" ++#define MMAL_DEINTERLACE_FULL_RATE_TEXT N_("Full output framerate") ++#define MMAL_DEINTERLACE_FULL_RATE_LONGTEXT N_("Full output framerate. 1 output frame for each interlaced field input") + +-struct filter_sys_t { ++ ++typedef struct filter_sys_t ++{ + MMAL_COMPONENT_T *component; + MMAL_PORT_T *input; + MMAL_PORT_T *output; ++ MMAL_POOL_T *in_pool; ++ hw_mmal_port_pool_ref_t *out_ppr; + +- MMAL_QUEUE_T *filtered_pictures; +- vlc_sem_t sem; ++ MMAL_QUEUE_T * out_q; + +- atomic_bool started; ++ bool half_rate; ++ bool use_qpu; ++ bool use_fast; ++ bool use_passthrough; + unsigned int seq_in; + unsigned int seq_out; +} filter_sys_t; @@ -6146,48 +6703,548 @@ + set_callbacks(MmalAvcodecOpenDecoder, MmalAvcodecCloseDecoder) +vlc_module_end() + ---- a/modules/hw/mmal/mmal_picture.c -+++ b/modules/hw/mmal/mmal_picture.c -@@ -21,25 +21,961 @@ - * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -+// We would really like to use vlc_thread.h but the detach thread stuff can't be -+// used here :-( -+#include <pthread.h> +--- /dev/null ++++ b/modules/hw/mmal/mmal_cma.c +@@ -0,0 +1,377 @@ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif + +#include <stdatomic.h> ++#include <unistd.h> ++#include <fcntl.h> ++#include <sys/ioctl.h> ++#include <sys/mman.h> + - #include <vlc_common.h> - #include <vlc_picture.h> - #include <interface/mmal/mmal.h> -+#include <interface/mmal/util/mmal_util.h> -+#include <interface/mmal/util/mmal_default_components.h> -+#include <interface/vmcs_host/vcgencmd.h> +#include <interface/vcsm/user-vcsm.h> - - #include "mmal_picture.h" - --int mmal_picture_lock(picture_t *picture) + -+static void flush_range(void * start, size_t len) ++#include <vlc_common.h> ++#include <vlc_picture.h> ++ ++#include "mmal_cma.h" ++ ++#include <assert.h> ++ ++ ++typedef void * cma_pool_alloc_fn(void * v, size_t size); ++typedef void cma_pool_free_fn(void * v, void * el, size_t size); ++ ++// Pool structure ++// Ref count is held by pool owner and pool els that have been got ++// Els in the pool do not count towards its ref count ++struct cma_pool_fixed_s ++{ ++ atomic_int ref_count; ++ ++ vlc_mutex_t lock; ++ unsigned int n_in; ++ unsigned int n_out; ++ unsigned int pool_size; ++ size_t el_size; ++ void ** pool; ++ ++ void * alloc_v; ++ cma_pool_alloc_fn * el_alloc_fn; ++ cma_pool_free_fn * el_free_fn; ++}; ++ ++typedef struct cma_buf_s { ++ size_t size; ++ unsigned int vcsm_h; // VCSM handle from initial alloc ++ unsigned int vc_h; // VC handle for ZC mmal buffers ++ int fd; // dmabuf handle for GL ++ void * mmap; // ARM mapped address ++ picture_context_t *ctx2; ++} cma_buf_t; ++ ++static int free_pool(const cma_pool_fixed_t * const p, void ** pool, unsigned int n, size_t el_size) ++{ ++ int i = 0; ++ assert(pool != NULL); ++ ++ while (pool[n] != NULL) ++ { ++ p->el_free_fn(p->alloc_v, pool[n], el_size); ++ pool[n] = NULL; ++ n = n + 1 < p->pool_size ? n + 1 : 0; ++ ++i; ++ } ++ free(pool); ++ return i; ++} ++ ++// Just kill this - no checks ++static void cma_pool_fixed_delete(cma_pool_fixed_t * const p) ++{ ++ if (p->pool != NULL) ++ free_pool(p, p->pool, p->n_in, p->el_size); ++ ++ vlc_mutex_destroy(&p->lock); ++ free(p); ++} ++ ++void cma_pool_fixed_unref(cma_pool_fixed_t * const p) ++{ ++ if (atomic_fetch_sub(&p->ref_count, 1) <= 1) ++ cma_pool_fixed_delete(p); ++} ++ ++void cma_pool_fixed_ref(cma_pool_fixed_t * const p) ++{ ++ atomic_fetch_add(&p->ref_count, 1); ++} ++ ++void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size) ++{ ++ void * v = NULL; ++ void ** deadpool = NULL; ++ size_t dead_size = 0; ++ unsigned int dead_n = 0; ++ ++ vlc_mutex_lock(&p->lock); ++ ++ if (req_el_size != p->el_size) ++ { ++ deadpool = p->pool; ++ dead_n = p->n_in; ++ dead_size = p->el_size; ++ ++ p->pool = NULL; ++ p->n_in = 0; ++ p->n_out = 0; ++ p->el_size = req_el_size; ++ } ++ else if (p->pool != NULL) ++ { ++ v = p->pool[p->n_in]; ++ if (v != NULL) ++ { ++ p->pool[p->n_in] = NULL; ++ p->n_in = p->n_in + 1 < p->pool_size ? p->n_in + 1 : 0; ++ } ++ } ++ ++ vlc_mutex_unlock(&p->lock); ++ ++ // Do the free old op outside the mutex in case the free is slow ++ if (deadpool != NULL) ++ free_pool(p, deadpool, dead_n, dead_size); ++ ++ if (v == NULL && req_el_size != 0) ++ v = p->el_alloc_fn(p->alloc_v, req_el_size); ++ ++ // Tag ref ++ if (v != NULL) ++ cma_pool_fixed_ref(p); ++ ++ return v; ++} ++ ++void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size) ++{ ++ vlc_mutex_lock(&p->lock); ++ ++ if (el_size == p->el_size && (p->pool == NULL || p->pool[p->n_out] == NULL)) ++ { ++ if (p->pool == NULL) ++ p->pool = calloc(p->pool_size, sizeof(void*)); ++ ++ p->pool[p->n_out] = v; ++ p->n_out = p->n_out + 1 < p->pool_size ? p->n_out + 1 : 0; ++ v = NULL; ++ } ++ ++ vlc_mutex_unlock(&p->lock); ++ ++ if (v != NULL) ++ p->el_free_fn(p->alloc_v, v, el_size); ++ ++ cma_pool_fixed_unref(p); ++} ++ ++// Purge pool & unref ++void cma_pool_fixed_kill(cma_pool_fixed_t * const p) ++{ ++ // This flush is not strictly needed but it reclaims what memory we can reclaim asap ++ cma_pool_fixed_get(p, 0); ++ cma_pool_fixed_unref(p); ++} ++ ++cma_pool_fixed_t* ++cma_pool_fixed_new(const unsigned int pool_size, void * const alloc_v, ++ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn) ++{ ++ cma_pool_fixed_t* const p = calloc(1, sizeof(cma_pool_fixed_t)); ++ if (p == NULL) ++ return NULL; ++ ++ atomic_store(&p->ref_count, 1); ++ vlc_mutex_init(&p->lock); ++ ++ p->pool_size = pool_size; ++ ++ p->alloc_v = alloc_v; ++ p->el_alloc_fn = alloc_fn; ++ p->el_free_fn = free_fn; ++ ++ return p; ++} ++ ++ ++static void cma_pool_delete(cma_buf_t * const cb) ++{ ++ if (cb->ctx2 != NULL) ++ cb->ctx2->destroy(cb->ctx2); ++ ++ if (cb->mmap != MAP_FAILED) ++ munmap(cb->mmap, cb->size); ++ if (cb->fd != -1) ++ close(cb->fd); ++ if (cb->vcsm_h != 0) ++ vcsm_free(cb->vcsm_h); ++ free(cb); ++} ++ ++static void cma_pool_free_cb(void * v, void * el, size_t size) ++{ ++ VLC_UNUSED(v); ++ VLC_UNUSED(size); ++ ++ cma_pool_delete(el); ++} ++ ++static void * cma_pool_alloc_cb(void * v, size_t size) ++{ ++ VLC_UNUSED(v); ++ ++ cma_buf_t * const cb = malloc(sizeof(cma_buf_t)); ++ if (cb == NULL) ++ return NULL; ++ ++ *cb = (cma_buf_t){ ++ .size = size, ++ .vcsm_h = 0, ++ .vc_h = 0, ++ .fd = -1, ++ .mmap = MAP_FAILED, ++ .ctx2 = NULL ++ }; ++ ++ if ((cb->vcsm_h = vcsm_malloc_cache(size, VCSM_CACHE_TYPE_HOST, (char*)"VLC frame")) == 0) ++ goto fail; ++ ++ if ((cb->vc_h = vcsm_vc_hdl_from_hdl(cb->vcsm_h)) == 0) ++ goto fail; ++ ++ if ((cb->fd = vcsm_export_dmabuf(cb->vcsm_h)) == -1) ++ goto fail; ++ ++ if ((cb->mmap = mmap(NULL, cb->size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, cb->fd, 0)) == MAP_FAILED) ++ goto fail; ++ ++ return cb; ++ ++fail: ++ cma_pool_delete(cb); ++ return NULL; ++} ++ ++void cma_buf_pool_delete(cma_pool_fixed_t * const p) ++{ ++ assert(p != NULL); ++ ++ cma_pool_fixed_kill(p); ++} ++ ++cma_pool_fixed_t * cma_buf_pool_new(void) ++{ ++ return cma_pool_fixed_new(5, NULL, cma_pool_alloc_cb, cma_pool_free_cb); ++} ++ ++ ++typedef struct cma_pic_context_s { ++ picture_context_t cmn; ++ ++ atomic_int ref_count; ++ cma_pool_fixed_t * p; ++ cma_buf_t * cb; ++} cma_pic_context_t; ++ ++ ++static void cma_buf_pic_ctx_ref(cma_pic_context_t * const ctx) +{ -+ struct vcsm_user_clean_invalid2_s * b = calloc(1, -+ sizeof(struct vcsm_user_clean_invalid2_s) + sizeof(struct vcsm_user_clean_invalid2_block_s)); ++ atomic_fetch_add(&ctx->ref_count, 1); ++} + -+ b->op_count = 1, ++static void cma_buf_pic_ctx_unref(cma_pic_context_t * const ctx) ++{ ++ if (atomic_fetch_sub(&ctx->ref_count, 1) > 0) ++ return; ++ ++ if (ctx->cb != NULL) ++ cma_pool_fixed_put(ctx->p, ctx->cb, ctx->cb->size); ++ ++ free(ctx); ++} ++ ++static picture_context_t * cma_buf_pic_ctx_copy(picture_context_t * pic_ctx) ++{ ++ cma_buf_pic_ctx_ref((cma_pic_context_t *)pic_ctx); ++ return pic_ctx; ++} ++ ++static void cma_buf_pic_ctx_destroy(picture_context_t * pic_ctx) ++{ ++ cma_buf_pic_ctx_unref((cma_pic_context_t *)pic_ctx); ++} ++ ++int cma_buf_pic_attach(cma_pool_fixed_t * const p, picture_t * const pic, const size_t size) ++{ ++ if (!is_cma_buf_pic_chroma(pic->format.i_chroma)) ++ return VLC_EGENERIC; ++ if (pic->context != NULL) ++ return VLC_EBADVAR; ++ ++ cma_buf_t * const cb = cma_pool_fixed_get(p, size); ++ if (cb == NULL) ++ return VLC_ENOMEM; ++ ++ cma_pic_context_t * const ctx = malloc(sizeof(cma_pic_context_t)); ++ if (ctx == NULL) ++ goto fail; ++ ++ *ctx = (cma_pic_context_t){ ++ .cmn = { ++ .destroy = cma_buf_pic_ctx_destroy, ++ .copy = cma_buf_pic_ctx_copy ++ }, ++ .ref_count = 0, ++ .p = p, ++ .cb = cb ++ }; ++ ++ pic->context = &ctx->cmn; ++ return VLC_SUCCESS; ++ ++fail: ++ cma_pool_fixed_put(p, cb, size); ++ return VLC_EGENERIC; ++} ++ ++int cma_buf_pic_add_context2(picture_t *const pic, picture_context_t * const ctx2) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ if (!is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL || ctx->cb == NULL || ctx->cb->ctx2 != NULL) ++ return VLC_EGENERIC; ++ ++ ctx->cb->ctx2 = ctx2; ++ return VLC_SUCCESS; ++} ++ ++unsigned int cma_buf_pic_vc_handle(const picture_t * const pic) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? 0 : ctx->cb == NULL ? 0 : ctx->cb->vc_h; ++} ++ ++int cma_buf_pic_fd(const picture_t * const pic) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? -1 : ctx->cb == NULL ? -1 : ctx->cb->fd; ++} ++ ++void * cma_buf_pic_addr(const picture_t * const pic) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? NULL : ctx->cb == NULL ? NULL : ctx->cb->mmap; ++} ++ ++picture_context_t * cma_buf_pic_context2(const picture_t * const pic) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? NULL : ctx->cb == NULL ? NULL : ctx->cb->ctx2; ++} ++ ++cma_pic_context_t * cma_buf_pic_context_ref(const picture_t * const pic) ++{ ++ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ ++ if (!is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL || ctx->cb == NULL) ++ return NULL; ++ ++ cma_buf_pic_ctx_ref(ctx); ++ return ctx; ++} ++ ++void cma_buf_pic_context_unref(cma_pic_context_t * const ctx) ++{ ++ if (ctx != NULL) ++ cma_buf_pic_ctx_unref(ctx); ++} ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/mmal_cma.h +@@ -0,0 +1,45 @@ ++ ++struct cma_pool_fixed_s; ++typedef struct cma_pool_fixed_s cma_pool_fixed_t; ++ ++typedef void * cma_pool_alloc_fn(void * v, size_t size); ++typedef void cma_pool_free_fn(void * v, void * el, size_t size); ++ ++void cma_pool_fixed_unref(cma_pool_fixed_t * const p); ++void cma_pool_fixed_ref(cma_pool_fixed_t * const p); ++void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size); ++void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size); ++void cma_pool_fixed_kill(cma_pool_fixed_t * const p); ++cma_pool_fixed_t* cma_pool_fixed_new(const unsigned int pool_size, void * const alloc_v, ++ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn); ++ ++void cma_buf_pool_delete(cma_pool_fixed_t * const p); ++cma_pool_fixed_t * cma_buf_pool_new(void); ++ ++int cma_buf_pic_attach(cma_pool_fixed_t * const p, picture_t * const pic, const size_t size); ++int cma_buf_pic_add_context2(picture_t *const pic, picture_context_t * const ctx2); ++unsigned int cma_buf_pic_vc_handle(const picture_t * const pic); ++int cma_buf_pic_fd(const picture_t * const pic); ++void * cma_buf_pic_addr(const picture_t * const pic); ++picture_context_t * cma_buf_pic_context2(const picture_t * const pic); ++struct cma_pic_context_s; ++struct cma_pic_context_s * cma_buf_pic_context_ref(const picture_t * const pic); ++void cma_buf_pic_context_unref(struct cma_pic_context_s * const ctx); ++ ++#include <vlc_fourcc.h> ++ ++static inline bool is_cma_buf_pic_chroma(const uint32_t chroma) ++{ ++ return chroma == VLC_CODEC_MMAL_ZC_RGB32 || chroma == VLC_CODEC_MMAL_ZC_SAND8 || chroma == VLC_CODEC_MMAL_ZC_I420; ++} ++ ++static inline void cma_buf_pool_deletez(cma_pool_fixed_t ** const pp) ++{ ++ cma_pool_fixed_t * const p = *pp; ++ if (p != NULL) { ++ *pp = NULL; ++ cma_buf_pool_delete(p); ++ } ++} ++ ++ +--- /dev/null ++++ b/modules/hw/mmal/mmal_gl.h +@@ -0,0 +1,45 @@ ++// Trim this include list! ++ ++#include <libdrm/drm.h> ++#include <libdrm/drm_mode.h> ++#include <libdrm/drm_fourcc.h> ++//#include <xf86drm.h> ++//#include <xf86drmMode.h> ++#include <X11/Xlib.h> ++#include <X11/Xutil.h> ++#include <X11/Xlib-xcb.h> ++#include <epoxy/gl.h> ++#include <epoxy/egl.h> ++#include <xcb/xcb.h> ++#include <xcb/dri3.h> ++ ++struct mmal_gl_converter_s; ++ ++typedef struct cma_buf_s { ++ struct mmal_gl_converter_s * sys; ++ ++ size_t size; ++ __u32 h_dumb; ++ int fd; ++ unsigned int h_vcsm; ++ void * mapped_addr; ++ GLuint texture; ++} cma_buf_t; ++ ++typedef struct cma_pic_sys_s { ++ cma_buf_t * cmabuf; ++} cma_pic_sys_t; ++ ++static inline unsigned int ++hw_mmal_h_vcsm(const picture_t * const pic) ++{ ++ const cma_pic_sys_t *const pic_sys = (cma_pic_sys_t *)pic->p_sys; ++ ++ if (pic->format.i_chroma != VLC_CODEC_MMAL_GL_RGB32 || ++ pic_sys == NULL || pic_sys->cmabuf == NULL) { ++ return 0; ++ } ++ ++ return pic_sys->cmabuf->h_vcsm; ++} ++ +--- a/modules/hw/mmal/mmal_picture.c ++++ b/modules/hw/mmal/mmal_picture.c +@@ -21,25 +21,1034 @@ + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + ++// We would really like to use vlc_thread.h but the detach thread stuff can't be ++// used here :-( ++#include <pthread.h> ++ ++#include <stdatomic.h> ++#include <unistd.h> ++#include <fcntl.h> ++ + #include <vlc_common.h> + #include <vlc_picture.h> + #include <interface/mmal/mmal.h> ++#include <interface/mmal/util/mmal_util.h> ++#include <interface/mmal/util/mmal_default_components.h> ++#include <interface/vmcs_host/vcgencmd.h> ++#include <interface/vcsm/user-vcsm.h> ++ ++#include "mmal_cma.h" // ************** + + #include "mmal_picture.h" + +-int mmal_picture_lock(picture_t *picture) ++#define UINT64_SIZE(s) (((s) + sizeof(uint64_t) - 1)/sizeof(uint64_t)) ++ ++static inline char safe_char(const unsigned int c0) ++{ ++ const unsigned int c = c0 & 0xff; ++ return c > ' ' && c < 0x7f ? c : '.'; ++} ++ ++const char * str_fourcc(char * const buf, const unsigned int fcc) ++{ ++ if (fcc == 0) ++ return "----"; ++ buf[0] = safe_char(fcc >> 0); ++ buf[1] = safe_char(fcc >> 8); ++ buf[2] = safe_char(fcc >> 16); ++ buf[3] = safe_char(fcc >> 24); ++ buf[4] = 0; ++ return buf; ++} ++ ++// WB + Inv ++static inline void flush_range(void * const start, const size_t len) ++{ ++ uint64_t buf[UINT64_SIZE(sizeof(struct vcsm_user_clean_invalid2_s) + sizeof(struct vcsm_user_clean_invalid2_block_s))]; ++ struct vcsm_user_clean_invalid2_s * const b = (struct vcsm_user_clean_invalid2_s *)buf; ++ ++ *b = (struct vcsm_user_clean_invalid2_s){ ++ .op_count = 1 ++ }; + + b->s[0] = (struct vcsm_user_clean_invalid2_block_s){ -+ .invalidate_mode = 3, ++ .invalidate_mode = 3, // wb + invalidate + .block_count = 1, -+ .start_address = start, ++ .start_address = start, // Rely on clean inv to fix up align & size boundries + .block_size = len, + .inter_block_stride = 0 + }; + + vcsm_clean_invalid2(b); -+ -+ free(b); +} + +MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs) @@ -6207,6 +7264,7 @@ +MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc) +{ + switch (vf_vlc->i_chroma) { ++ case VLC_CODEC_MMAL_ZC_RGB32: + case VLC_CODEC_RGB32: + { + // VLC RGB32 aka RV32 means we have to look at the mask values @@ -6223,6 +7281,8 @@ + return MMAL_ENCODING_ARGB; + break; + } ++ case VLC_CODEC_MMAL_ZC_I420: ++ return MMAL_ENCODING_I420; + case VLC_CODEC_RGBA: + return MMAL_ENCODING_RGBA; + case VLC_CODEC_BGRA: @@ -6347,7 +7407,9 @@ + hw_mmal_port_pool_ref_t ** pppr, + MMAL_PORT_T * const port, + const unsigned int extra_buffers, MMAL_PORT_BH_CB_T callback) -+{ + { +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; + MMAL_STATUS_T status; + + port->userdata = (struct MMAL_PORT_USERDATA_T *)obj; @@ -6382,14 +7444,20 @@ + msg_Err(obj, "Failed to create output pool"); + return status; + } -+ + +- int offset = 0; +- picture->p[0].p_pixels = buffer->data; +- for (int i = 1; i < picture->i_planes; i++) { +- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; +- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; + status = mmal_port_enable(port, callback); + if (status != MMAL_SUCCESS) { + msg_Err(obj, "Failed to enable output port %s (status=%"PRIx32" %s)", + port->name, status, mmal_status_to_string(status)); + return status; -+ } -+ + } + +- pic_sys->displayed = false; + return MMAL_SUCCESS; +} + @@ -6443,7 +7511,8 @@ + + return MMAL_TRUE; +} -+ + +- return VLC_SUCCESS; +// Buffer belongs to context on successful return from this fn +// is still valid on failure +picture_context_t * @@ -6683,7 +7752,7 @@ + ent = ent->prev; + } + return NULL; -+} + } + +#define POOL_ENT_ALLOC_BLOCK 0x10000 + @@ -6800,6 +7869,8 @@ +} + + ++const vlc_fourcc_t hw_mmal_vzc_subpicture_chromas[] = { VLC_CODEC_RGBA, VLC_CODEC_BGRA, VLC_CODEC_ARGB, 0 }; ++ +void hw_mmal_vzc_buf_get_wh(MMAL_BUFFER_HEADER_T * const buf, int * const pW, int * const pH) +{ + const pool_ent_t *const ent = ((vzc_subbuf_ent_t *)buf->user_data)->ent; @@ -6841,15 +7912,6 @@ + return &sb->dreg; +} + -+void hw_mmal_vzc_buf_set_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const int x, const int y, const int w, const int h) -+{ -+ vzc_subbuf_ent_t * sb = buf->user_data; -+ sb->orig_dest_rect.x = x; -+ sb->orig_dest_rect.y = y; -+ sb->orig_dest_rect.width = w; -+ sb->orig_dest_rect.height = h; -+} -+ +static inline int rescale_x(int x, int mul, int div) +{ + return div == 0 ? x * mul : (x * mul + div/2) / div; @@ -6864,9 +7926,7 @@ +} + +void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect) - { -- picture_sys_t *pic_sys = picture->p_sys; -- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++{ + vzc_subbuf_ent_t * sb = buf->user_data; + if (scale_rect == NULL) { + sb->dreg.dest_rect = sb->orig_dest_rect; @@ -6891,7 +7951,14 @@ +// no rules governing the order in which things are blended) so we must deal +// (fairly) gracefully with it never (or always) being set. + -+MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, const picture_t * const dst_pic, const bool is_first) ++// dst_fmt gives the number space in which the destination pixels are specified ++ ++MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, ++ picture_t * const pic, ++ const MMAL_RECT_T dst_pic_rect, ++ const int x_offset, const int y_offset, ++ const unsigned int alpha, ++ const bool is_first) +{ + MMAL_BUFFER_HEADER_T * const buf = mmal_queue_get(pc->buf_pool->queue); + vzc_subbuf_ent_t * sb; @@ -6967,22 +8034,33 @@ + }; + + // Remember offsets -+ sb->dreg.set = MMAL_DISPLAY_SET_SRC_RECT; ++ sb->dreg.set = MMAL_DISPLAY_SET_SRC_RECT | ++ MMAL_DISPLAY_SET_DEST_RECT | ++ MMAL_DISPLAY_SET_FULLSCREEN | ++ MMAL_DISPLAY_SET_ALPHA; ++ ++ sb->dreg.fullscreen = 0; ++ // Will be set later - zero now to avoid any confusion ++ sb->dreg.dest_rect = (MMAL_RECT_T){0, 0, 0, 0}; ++ ++ sb->dreg.alpha = (uint32_t)(alpha & 0xff) | MMAL_DISPLAY_ALPHA_FLAGS_MIX; + +// printf("+++ bpp:%d, vis:%dx%d wxh:%dx%d, d:%dx%d\n", bpp, fmt->i_visible_width, fmt->i_visible_height, fmt->i_width, fmt->i_height, dst_stride, dst_lines); + + sb->dreg.src_rect = (MMAL_RECT_T){ -+ .x = (fmt->i_x_offset - xl), -+ .y = 0, -+ .width = fmt->i_visible_width, ++ .x = (fmt->i_x_offset - xl), ++ .y = 0, ++ .width = fmt->i_visible_width, + .height = fmt->i_visible_height + }; + -+ sb->pic_rect = (MMAL_RECT_T){ -+ .x = dst_pic->format.i_x_offset, -+ .y = dst_pic->format.i_y_offset, -+ .width = dst_pic->format.i_visible_width, -+ .height = dst_pic->format.i_visible_height ++ sb->pic_rect = dst_pic_rect; ++ ++ sb->orig_dest_rect = (MMAL_RECT_T){ ++ .x = x_offset, ++ .y = y_offset, ++ .width = fmt->i_visible_width, ++ .height = fmt->i_visible_height + }; + + if (needs_copy) @@ -7021,12 +8099,7 @@ + pool_recycle_list(pc, &pc->ents_prev); + pool_recycle_list(pc, &pc->ents_cur); +} - -- int offset = 0; -- picture->p[0].p_pixels = buffer->data; -- for (int i = 1; i < picture->i_planes; i++) { -- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; -- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ +static void hw_mmal_vzc_pool_delete(vzc_pool_ctl_t * const pc) +{ + @@ -7107,22 +8180,55 @@ + { + hw_mmal_vzc_pool_delete(pc); + return NULL; - } - -- pic_sys->displayed = false; ++ } ++ + atomic_store(&pc->ref_count, 1); + + mmal_pool_callback_set(pc->buf_pool, vcz_pool_release_cb, pc); - -- return VLC_SUCCESS; ++ + return pc; - } ++} ++ + ++//---------------------------------------------------------------------------- ++ ++vcsm_init_type_t cma_vcsm_init(void) ++{ ++ if (vcsm_init_ex(1, -1) == 0) { ++ return VCSM_INIT_CMA; ++ } ++ else if (vcsm_init_ex(0, -1) == 0) { ++ return VCSM_INIT_LEGACY; ++ } ++ return VCSM_INIT_NONE; ++} ++ ++void cma_vcsm_exit(const vcsm_init_type_t init_mode) ++{ ++ if (init_mode != VCSM_INIT_NONE) ++ vcsm_exit(); ++} ++ ++const char * cma_vcsm_init_str(const vcsm_init_type_t init_mode) ++{ ++ switch (init_mode) ++ { ++ case VCSM_INIT_CMA: ++ return "CMA"; ++ case VCSM_INIT_LEGACY: ++ return "Legacy"; ++ case VCSM_INIT_NONE: ++ return "none"; ++ default: ++ break; ++ } ++ return "???"; ++} + + --- a/modules/hw/mmal/mmal_picture.h +++ b/modules/hw/mmal/mmal_picture.h -@@ -24,19 +24,243 @@ +@@ -24,19 +24,275 @@ #ifndef VLC_MMAL_MMAL_PICTURE_H_ #define VLC_MMAL_MMAL_PICTURE_H_ @@ -7158,10 +8264,7 @@ + + +#define CTX_BUFS_MAX 4 - -- MMAL_BUFFER_HEADER_T *buffer; -- bool displayed; --}; ++ +typedef struct pic_ctx_mmal_s { + picture_context_t cmn; // PARENT: Common els at start + @@ -7180,8 +8283,9 @@ + vlc_object_t * obj; +#endif +} pic_ctx_mmal_t; - --int mmal_picture_lock(picture_t *picture); ++ ++const char * str_fourcc(char * const buf, const unsigned int fcc); ++ +MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc); +MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs); +void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc); @@ -7230,7 +8334,8 @@ + return pic->format.i_chroma == VLC_CODEC_MMAL_OPAQUE || + pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND8 || + pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND10 || -+ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_I420; ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_I420 || ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_RGB32; +} + +static inline MMAL_FOURCC_T hw_mmal_pic_format(const picture_t *const pic) @@ -7341,21 +8446,28 @@ +struct vzc_pool_ctl_s; +typedef struct vzc_pool_ctl_s vzc_pool_ctl_t; + ++// At the moment we cope with any mono-planar RGBA thing ++// We could cope with many other things but they currently don't occur ++extern const vlc_fourcc_t hw_mmal_vzc_subpicture_chromas[]; +static inline bool hw_mmal_vzc_subpic_fmt_valid(const video_frame_format_t * const vf_vlc) +{ + const vlc_fourcc_t vfcc_src = vf_vlc->i_chroma; -+ // At the moment we cope with any mono-planar RGBA thing -+ // We could cope with many other things but they currently don't occur -+ return vfcc_src == VLC_CODEC_RGBA || vfcc_src == VLC_CODEC_BGRA || vfcc_src == VLC_CODEC_ARGB; ++ for (const vlc_fourcc_t * p = hw_mmal_vzc_subpicture_chromas; *p != 0; ++p) ++ if (*p == vfcc_src) ++ return true; ++ ++ return false; +} + +bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt); +MMAL_DISPLAYREGION_T * hw_mmal_vzc_buf_region(MMAL_BUFFER_HEADER_T * const buf); -+void hw_mmal_vzc_buf_set_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const int x, const int y, const int w, const int h); +void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect); +void hw_mmal_vzc_buf_get_wh(MMAL_BUFFER_HEADER_T * const buf, int * const pW, int * const pH); +unsigned int hw_mmal_vzc_buf_seq(MMAL_BUFFER_HEADER_T * const buf); -+MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, const picture_t * const dst_pic, const bool is_first); ++MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, ++ const MMAL_RECT_T dst_pic_rect, ++ const int x_offset, const int y_offset, ++ const unsigned int alpha, const bool is_first); +void hw_mmal_vzc_buf_frame_size(MMAL_BUFFER_HEADER_T * const buf, + uint32_t * const pWidth, uint32_t * const pHeight); + @@ -7364,9 +8476,35 @@ +void hw_mmal_vzc_pool_ref(vzc_pool_ctl_t * const pc); +vzc_pool_ctl_t * hw_mmal_vzc_pool_new(void); + ++ ++static inline MMAL_RECT_T vis_mmal_rect(const video_format_t * const fmt) ++{ ++ return (MMAL_RECT_T){ ++ .x = fmt->i_x_offset, ++ .y = fmt->i_y_offset, ++ .width = fmt->i_visible_width, ++ .height = fmt->i_visible_height ++ }; ++} ++ ++typedef enum vcsm_init_type_e { ++ VCSM_INIT_NONE = 0, ++ VCSM_INIT_LEGACY, ++ VCSM_INIT_CMA ++} vcsm_init_type_t; ++ ++vcsm_init_type_t cma_vcsm_init(void); ++void cma_vcsm_exit(const vcsm_init_type_t init_mode); ++const char * cma_vcsm_init_str(const vcsm_init_type_t init_mode); ++ + +- MMAL_BUFFER_HEADER_T *buffer; +- bool displayed; +-}; +#define VOUT_DISPLAY_CHANGE_MMAL_BASE 1024 +#define VOUT_DISPLAY_CHANGE_MMAL_HIDE (VOUT_DISPLAY_CHANGE_MMAL_BASE + 0) -+ + +-int mmal_picture_lock(picture_t *picture); +#define MMAL_COMPONENT_DEFAULT_RESIZER "vc.ril.resize" +#define MMAL_COMPONENT_ISP_RESIZER "vc.ril.isp" +#define MMAL_COMPONENT_HVS "vc.ril.hvs" @@ -7487,7 +8625,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.c -@@ -0,0 +1,222 @@ +@@ -0,0 +1,227 @@ +/***************************************************************************** + * mmal.c: MMAL-based decoder plugin for Raspberry Pi + ***************************************************************************** @@ -7595,13 +8733,13 @@ + + +int hw_mmal_subpic_update(vlc_object_t * const p_filter, -+ picture_t * const p_pic, const unsigned int sub_no, ++ MMAL_BUFFER_HEADER_T * const sub_buf, + subpic_reg_stash_t * const spe, ++ const video_format_t * const fmt, + const MMAL_RECT_T * const scale_out, + const uint64_t pts) +{ + MMAL_STATUS_T err; -+ MMAL_BUFFER_HEADER_T * const sub_buf = hw_mmal_pic_sub_buf_get(p_pic, sub_no); + + if (sub_buf == NULL) + { @@ -7647,24 +8785,29 @@ + MMAL_DISPLAYREGION_T * const dreg = hw_mmal_vzc_buf_region(sub_buf); + MMAL_VIDEO_FORMAT_T *const v_fmt = &spe->port->format->es->video; + -+ v_fmt->frame_rate.den = p_pic->format.i_frame_rate_base; -+ v_fmt->frame_rate.num = p_pic->format.i_frame_rate; -+ v_fmt->par.den = p_pic->format.i_sar_den; -+ v_fmt->par.num = p_pic->format.i_sar_num; ++ v_fmt->frame_rate.den = fmt->i_frame_rate_base; ++ v_fmt->frame_rate.num = fmt->i_frame_rate; ++ v_fmt->par.den = fmt->i_sar_den; ++ v_fmt->par.num = fmt->i_sar_num; + v_fmt->color_space = MMAL_COLOR_SPACE_UNKNOWN; + -+ + if (needs_update || dreg->alpha != spe->alpha || !cmp_rect(&dreg->dest_rect, &spe->dest_rect)) { + + spe->alpha = dreg->alpha; + spe->dest_rect = dreg->dest_rect; + needs_update = true; -+#if TRACE_ALL -+ msg_Dbg(p_filter, "Update region for sub %d", sub_no); -+#endif ++ + dreg->layer = spe->layer; + dreg->set |= MMAL_DISPLAY_SET_LAYER; + ++#if TRACE_ALL ++ msg_Dbg(p_filter, "%s: Update region: Set=%x, dest=%dx%d @ (%d,%d), src=%dx%d @ (%d,%d), layer=%d, alpha=%#x", ++ __func__, dreg->set, ++ dreg->dest_rect.width, dreg->dest_rect.height, dreg->dest_rect.x, dreg->dest_rect.y, ++ dreg->src_rect.width, dreg->src_rect.height, dreg->src_rect.x, dreg->src_rect.y, ++ dreg->layer, dreg->alpha); ++#endif ++ + if ((err = mmal_port_parameter_set(spe->port, &dreg->hdr)) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Set display region on subput failed"); @@ -7712,7 +8855,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.h -@@ -0,0 +1,28 @@ +@@ -0,0 +1,29 @@ +#ifndef VLC_HW_MMAL_SUBPIC_H_ +#define VLC_HW_MMAL_SUBPIC_H_ + @@ -7728,10 +8871,11 @@ +} subpic_reg_stash_t; + +int hw_mmal_subpic_update(vlc_object_t * const p_filter, -+ picture_t * const p_pic, const unsigned int sub_no, -+ subpic_reg_stash_t * const stash, -+ const MMAL_RECT_T * const scale_out, -+ const uint64_t pts); ++ MMAL_BUFFER_HEADER_T * const sub_buf, ++ subpic_reg_stash_t * const spe, ++ const video_format_t * const fmt, ++ const MMAL_RECT_T * const scale_out, ++ const uint64_t pts); + +void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); + @@ -7744,385 +8888,385 @@ --- /dev/null +++ b/modules/hw/mmal/v7_pmu.S @@ -0,0 +1,263 @@ -+/*------------------------------------------------------------ -+Performance Monitor Block -+------------------------------------------------------------*/ -+ .arm @ Make sure we are in ARM mode. -+ .text -+ .align 2 -+ .global getPMN @ export this function for the linker -+ -+/* Returns the number of progammable counters uint32_t getPMN(void) */ -+ -+getPMN: -+ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC Register */ -+ MOV r0, r0, LSR #11 /* Shift N field down to bit 0 */ -+ AND r0, r0, #0x1F /* Mask to leave just the 5 N bits */ -+ BX lr -+ -+ -+ -+ .global pmn_config @ export this function for the linker -+ /* Sets the event for a programmable counter to record */ -+ /* void pmn_config(unsigned counter, uint32_t event) */ -+ /* counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1 */ -+ /* event = r1 = The event code */ -+pmn_config: -+ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ -+ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ -+ MCR p15, 0, r1, c9, c13, 1 /* Write EVTSELx Register */ -+ BX lr -+ -+ -+ -+ .global ccnt_divider @ export this function for the linker -+ /* Enables/disables the divider (1/64) on CCNT */ -+ /* void ccnt_divider(int divider) */ -+ /* divider = r0 = If 0 disable divider, else enable dvider */ -+ccnt_divider: -+ MRC p15, 0, r1, c9, c12, 0 /* Read PMNC */ -+ -+ CMP r0, #0x0 /* IF (r0 == 0) */ -+ BICEQ r1, r1, #0x08 /* THEN: Clear the D bit (disables the */ -+ ORRNE r1, r1, #0x08 /* ELSE: Set the D bit (enables the di */ -+ -+ MCR p15, 0, r1, c9, c12, 0 /* Write PMNC */ -+ BX lr -+ -+ -+ /* --------------------------------------------------------------- */ -+ /* Enable/Disable */ -+ /* --------------------------------------------------------------- */ -+ -+ .global enable_pmu @ export this function for the linker -+ /* Global PMU enable */ -+ /* void enable_pmu(void) */ -+enable_pmu: -+ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ -+ ORR r0, r0, #0x01 /* Set E bit */ -+ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ -+ BX lr -+ -+ -+ -+ .global disable_pmu @ export this function for the linker -+ /* Global PMU disable */ -+ /* void disable_pmu(void) */ -+disable_pmu: -+ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ -+ BIC r0, r0, #0x01 /* Clear E bit */ -+ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ -+ BX lr -+ -+ -+ -+ .global enable_ccnt @ export this function for the linker -+ /* Enable the CCNT */ -+ /* void enable_ccnt(void) */ -+enable_ccnt: -+ MOV r0, #0x80000000 /* Set C bit */ -+ MCR p15, 0, r0, c9, c12, 1 /* Write CNTENS Register */ -+ BX lr -+ -+ -+ -+ .global disable_ccnt @ export this function for the linker -+ /* Disable the CCNT */ -+ /* void disable_ccnt(void) */ -+disable_ccnt: -+ MOV r0, #0x80000000 /* Clear C bit */ -+ MCR p15, 0, r0, c9, c12, 2 /* Write CNTENC Register */ -+ BX lr -+ -+ -+ -+ .global enable_pmn @ export this function for the linker -+ /* Enable PMN{n} */ -+ /* void enable_pmn(uint32_t counter) */ -+ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) -+enable_pmn: */ -+ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ -+ MOV r1, r1, LSL r0 -+ -+ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ -+ BX lr -+ -+ -+ -+ .global disable_pmn @ export this function for the linker -+ /* Enable PMN{n} */ -+ /* void disable_pmn(uint32_t counter) */ -+ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) -+disable_pmn: */ -+ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ -+ MOV r1, r1, LSL r0 -+ -+ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ -+ BX lr -+ -+ -+ -+ .global enable_pmu_user_access @ export this function for the linker -+ /* Enables User mode access to the PMU (must be called in a priviledge */ -+ /* void enable_pmu_user_access(void) */ -+enable_pmu_user_access: -+ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ -+ ORR r0, r0, #0x01 /* Set EN bit (bit 0) */ -+ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ -+ BX lr -+ -+ -+ -+ .global disable_pmu_user_access @ export this function for the linke -+ /* Disables User mode access to the PMU (must be called in a priviledg */ -+ /* void disable_pmu_user_access(void) */ -+disable_pmu_user_access: -+ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ -+ BIC r0, r0, #0x01 /* Clear EN bit (bit 0) */ -+ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ -+ BX lr -+ -+ -+ /* --------------------------------------------------------------- */ -+ /* Counter read registers */ -+ /* --------------------------------------------------------------- */ -+ -+ .global read_ccnt @ export this function for the linker -+ /* Returns the value of CCNT */ -+ /* uint32_t read_ccnt(void) */ -+read_ccnt: -+ MRC p15, 0, r0, c9, c13, 0 /* Read CCNT Register */ -+ BX lr -+ -+ -+ .global read_pmn @ export this function for the linker -+ /* Returns the value of PMN{n} */ -+ /* uint32_t read_pmn(uint32_t counter) */ -+ /* counter = r0 = The counter to read (e.g. 0 for PMN0, 1 for PMN1) * -+read_pmn: */ -+ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ -+ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ -+ MRC p15, 0, r0, c9, c13, 2 /* Read current PMNx Register */ -+ BX lr -+ -+ -+ /* --------------------------------------------------------------- */ -+ /* Software Increment */ -+ /* --------------------------------------------------------------- */ -+ -+ .global pmu_software_increment @ export this function for the linker -+ /* Writes to software increment register */ -+ /* void pmu_software_increment(uint32_t counter) */ -+ /* counter = r0 = The counter to increment (e.g. 0 for PMN0, 1 for PMN -+pmu_software_increment: */ -+ MOV r1, #0x01 -+ MOV r1, r1, LSL r0 -+ MCR p15, 0, r1, c9, c12, 4 /* Write SWINCR Register */ -+ BX lr -+ -+ /* --------------------------------------------------------------- */ -+ /* Overflow & Interrupt Generation */ -+ /* --------------------------------------------------------------- */ -+ -+ .global read_flags @ export this function for the linker -+ /* Returns the value of the overflow flags */ -+ /* uint32_t read_flags(void) */ -+read_flags: -+ MRC p15, 0, r0, c9, c12, 3 /* Read FLAG Register */ -+ BX lr -+ -+ -+ .global write_flags @ export this function for the linker -+ /* Writes the overflow flags */ -+ /* void write_flags(uint32_t flags) */ -+write_flags: -+ MCR p15, 0, r0, c9, c12, 3 /* Write FLAG Register */ -+ BX lr -+ -+ -+ .global enable_ccnt_irq @ export this function for the linker -+ /* Enables interrupt generation on overflow of the CCNT */ -+ /* void enable_ccnt_irq(void) */ -+enable_ccnt_irq: -+ MOV r0, #0x80000000 -+ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ -+ BX lr -+ -+ .global disable_ccnt_irq @ export this function for the linker -+ /* Disables interrupt generation on overflow of the CCNT */ -+ /* void disable_ccnt_irq(void) */ -+disable_ccnt_irq: -+ MOV r0, #0x80000000 -+ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ -+ BX lr -+ -+ -+ .global enable_pmn_irq @ export this function for the linker -+ /* Enables interrupt generation on overflow of PMN{x} */ -+ /* void enable_pmn_irq(uint32_t counter) */ -+ /* counter = r0 = The counter to enable the interrupt for (e.g. 0 for -+enable_pmn_irq: */ -+ MOV r1, #0x1 /* Use arg (r0) to set which counter */ -+ MOV r0, r1, LSL r0 -+ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ -+ BX lr -+ -+ .global disable_pmn_irq @ export this function for the linker -+ /* Disables interrupt generation on overflow of PMN{x} */ -+ /* void disable_pmn_irq(uint32_t counter) */ -+ /* counter = r0 = The counter to disable the interrupt for (e.g. 0 fo -+disable_pmn_irq: */ -+ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ -+ MOV r0, r1, LSL r0 -+ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ -+ BX lr -+ -+ /* --------------------------------------------------------------- */ -+ /* Reset Functions */ -+ /* --------------------------------------------------------------- */ -+ -+ .global reset_pmn @ export this function for the linker -+ /* Resets the programmable counters */ -+ /* void reset_pmn(void) */ -+reset_pmn: -+ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ -+ ORR r0, r0, #0x02 /* Set P bit (Event Counter Reset) */ -+ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ -+ BX lr -+ -+ -+ .global reset_ccnt @ export this function for the linker -+ /* Resets the CCNT */ -+ /* void reset_ccnt(void) */ -+reset_ccnt: -+ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ -+ ORR r0, r0, #0x04 /* Set C bit (Event Counter Reset) */ -+ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ -+ BX lr -+ -+ -+ .end @end of code, this line is optional. -+/* ------------------------------------------------------------ */ -+/* End of v7_pmu.s */ -+/* ------------------------------------------------------------ */ -+ -+ ++/*------------------------------------------------------------ ++Performance Monitor Block ++------------------------------------------------------------*/ ++ .arm @ Make sure we are in ARM mode. ++ .text ++ .align 2 ++ .global getPMN @ export this function for the linker ++ ++/* Returns the number of progammable counters uint32_t getPMN(void) */ ++ ++getPMN: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC Register */ ++ MOV r0, r0, LSR #11 /* Shift N field down to bit 0 */ ++ AND r0, r0, #0x1F /* Mask to leave just the 5 N bits */ ++ BX lr ++ ++ ++ ++ .global pmn_config @ export this function for the linker ++ /* Sets the event for a programmable counter to record */ ++ /* void pmn_config(unsigned counter, uint32_t event) */ ++ /* counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1 */ ++ /* event = r1 = The event code */ ++pmn_config: ++ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ ++ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ ++ MCR p15, 0, r1, c9, c13, 1 /* Write EVTSELx Register */ ++ BX lr ++ ++ ++ ++ .global ccnt_divider @ export this function for the linker ++ /* Enables/disables the divider (1/64) on CCNT */ ++ /* void ccnt_divider(int divider) */ ++ /* divider = r0 = If 0 disable divider, else enable dvider */ ++ccnt_divider: ++ MRC p15, 0, r1, c9, c12, 0 /* Read PMNC */ ++ ++ CMP r0, #0x0 /* IF (r0 == 0) */ ++ BICEQ r1, r1, #0x08 /* THEN: Clear the D bit (disables the */ ++ ORRNE r1, r1, #0x08 /* ELSE: Set the D bit (enables the di */ ++ ++ MCR p15, 0, r1, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Enable/Disable */ ++ /* --------------------------------------------------------------- */ ++ ++ .global enable_pmu @ export this function for the linker ++ /* Global PMU enable */ ++ /* void enable_pmu(void) */ ++enable_pmu: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x01 /* Set E bit */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ ++ .global disable_pmu @ export this function for the linker ++ /* Global PMU disable */ ++ /* void disable_pmu(void) */ ++disable_pmu: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ BIC r0, r0, #0x01 /* Clear E bit */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ ++ .global enable_ccnt @ export this function for the linker ++ /* Enable the CCNT */ ++ /* void enable_ccnt(void) */ ++enable_ccnt: ++ MOV r0, #0x80000000 /* Set C bit */ ++ MCR p15, 0, r0, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global disable_ccnt @ export this function for the linker ++ /* Disable the CCNT */ ++ /* void disable_ccnt(void) */ ++disable_ccnt: ++ MOV r0, #0x80000000 /* Clear C bit */ ++ MCR p15, 0, r0, c9, c12, 2 /* Write CNTENC Register */ ++ BX lr ++ ++ ++ ++ .global enable_pmn @ export this function for the linker ++ /* Enable PMN{n} */ ++ /* void enable_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++enable_pmn: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r1, r1, LSL r0 ++ ++ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global disable_pmn @ export this function for the linker ++ /* Enable PMN{n} */ ++ /* void disable_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++disable_pmn: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r1, r1, LSL r0 ++ ++ MCR p15, 0, r1, c9, c12, 1 /* Write CNTENS Register */ ++ BX lr ++ ++ ++ ++ .global enable_pmu_user_access @ export this function for the linker ++ /* Enables User mode access to the PMU (must be called in a priviledge */ ++ /* void enable_pmu_user_access(void) */ ++enable_pmu_user_access: ++ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ ++ ORR r0, r0, #0x01 /* Set EN bit (bit 0) */ ++ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ ++ BX lr ++ ++ ++ ++ .global disable_pmu_user_access @ export this function for the linke ++ /* Disables User mode access to the PMU (must be called in a priviledg */ ++ /* void disable_pmu_user_access(void) */ ++disable_pmu_user_access: ++ MRC p15, 0, r0, c9, c14, 0 /* Read PMUSERENR Register */ ++ BIC r0, r0, #0x01 /* Clear EN bit (bit 0) */ ++ MCR p15, 0, r0, c9, c14, 0 /* Write PMUSERENR Register */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Counter read registers */ ++ /* --------------------------------------------------------------- */ ++ ++ .global read_ccnt @ export this function for the linker ++ /* Returns the value of CCNT */ ++ /* uint32_t read_ccnt(void) */ ++read_ccnt: ++ MRC p15, 0, r0, c9, c13, 0 /* Read CCNT Register */ ++ BX lr ++ ++ ++ .global read_pmn @ export this function for the linker ++ /* Returns the value of PMN{n} */ ++ /* uint32_t read_pmn(uint32_t counter) */ ++ /* counter = r0 = The counter to read (e.g. 0 for PMN0, 1 for PMN1) * ++read_pmn: */ ++ AND r0, r0, #0x1F /* Mask to leave only bits 4:0 */ ++ MCR p15, 0, r0, c9, c12, 5 /* Write PMNXSEL Register */ ++ MRC p15, 0, r0, c9, c13, 2 /* Read current PMNx Register */ ++ BX lr ++ ++ ++ /* --------------------------------------------------------------- */ ++ /* Software Increment */ ++ /* --------------------------------------------------------------- */ ++ ++ .global pmu_software_increment @ export this function for the linker ++ /* Writes to software increment register */ ++ /* void pmu_software_increment(uint32_t counter) */ ++ /* counter = r0 = The counter to increment (e.g. 0 for PMN0, 1 for PMN ++pmu_software_increment: */ ++ MOV r1, #0x01 ++ MOV r1, r1, LSL r0 ++ MCR p15, 0, r1, c9, c12, 4 /* Write SWINCR Register */ ++ BX lr ++ ++ /* --------------------------------------------------------------- */ ++ /* Overflow & Interrupt Generation */ ++ /* --------------------------------------------------------------- */ ++ ++ .global read_flags @ export this function for the linker ++ /* Returns the value of the overflow flags */ ++ /* uint32_t read_flags(void) */ ++read_flags: ++ MRC p15, 0, r0, c9, c12, 3 /* Read FLAG Register */ ++ BX lr ++ ++ ++ .global write_flags @ export this function for the linker ++ /* Writes the overflow flags */ ++ /* void write_flags(uint32_t flags) */ ++write_flags: ++ MCR p15, 0, r0, c9, c12, 3 /* Write FLAG Register */ ++ BX lr ++ ++ ++ .global enable_ccnt_irq @ export this function for the linker ++ /* Enables interrupt generation on overflow of the CCNT */ ++ /* void enable_ccnt_irq(void) */ ++enable_ccnt_irq: ++ MOV r0, #0x80000000 ++ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ ++ BX lr ++ ++ .global disable_ccnt_irq @ export this function for the linker ++ /* Disables interrupt generation on overflow of the CCNT */ ++ /* void disable_ccnt_irq(void) */ ++disable_ccnt_irq: ++ MOV r0, #0x80000000 ++ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ ++ BX lr ++ ++ ++ .global enable_pmn_irq @ export this function for the linker ++ /* Enables interrupt generation on overflow of PMN{x} */ ++ /* void enable_pmn_irq(uint32_t counter) */ ++ /* counter = r0 = The counter to enable the interrupt for (e.g. 0 for ++enable_pmn_irq: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter */ ++ MOV r0, r1, LSL r0 ++ MCR p15, 0, r0, c9, c14, 1 /* Write INTENS Register */ ++ BX lr ++ ++ .global disable_pmn_irq @ export this function for the linker ++ /* Disables interrupt generation on overflow of PMN{x} */ ++ /* void disable_pmn_irq(uint32_t counter) */ ++ /* counter = r0 = The counter to disable the interrupt for (e.g. 0 fo ++disable_pmn_irq: */ ++ MOV r1, #0x1 /* Use arg (r0) to set which counter t */ ++ MOV r0, r1, LSL r0 ++ MCR p15, 0, r0, c9, c14, 2 /* Write INTENC Register */ ++ BX lr ++ ++ /* --------------------------------------------------------------- */ ++ /* Reset Functions */ ++ /* --------------------------------------------------------------- */ ++ ++ .global reset_pmn @ export this function for the linker ++ /* Resets the programmable counters */ ++ /* void reset_pmn(void) */ ++reset_pmn: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x02 /* Set P bit (Event Counter Reset) */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ .global reset_ccnt @ export this function for the linker ++ /* Resets the CCNT */ ++ /* void reset_ccnt(void) */ ++reset_ccnt: ++ MRC p15, 0, r0, c9, c12, 0 /* Read PMNC */ ++ ORR r0, r0, #0x04 /* Set C bit (Event Counter Reset) */ ++ MCR p15, 0, r0, c9, c12, 0 /* Write PMNC */ ++ BX lr ++ ++ ++ .end @end of code, this line is optional. ++/* ------------------------------------------------------------ */ ++/* End of v7_pmu.s */ ++/* ------------------------------------------------------------ */ ++ ++ --- /dev/null +++ b/modules/hw/mmal/v7_pmu.h @@ -0,0 +1,113 @@ -+// ------------------------------------------------------------ -+// PMU for Cortex-A/R (v7-A/R) -+// ------------------------------------------------------------ -+ -+#ifndef _V7_PMU_H -+#define _V7_PMU_H -+ -+// Returns the number of progammable counters -+unsigned int getPMN(void); -+ -+// Sets the event for a programmable counter to record -+// counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1) -+// event = r1 = The event code (from appropiate TRM or ARM Architecture Reference Manual) -+void pmn_config(unsigned int counter, unsigned int event); -+ -+// Enables/disables the divider (1/64) on CCNT -+// divider = r0 = If 0 disable divider, else enable dvider -+void ccnt_divider(int divider); -+ -+// -+// Enables and disables -+// -+ -+// Global PMU enable -+// On ARM11 this enables the PMU, and the counters start immediately -+// On Cortex this enables the PMU, there are individual enables for the counters -+void enable_pmu(void); -+ -+// Global PMU disable -+// On Cortex, this overrides the enable state of the individual counters -+void disable_pmu(void); -+ -+// Enable the CCNT -+void enable_ccnt(void); -+ -+// Disable the CCNT -+void disable_ccnt(void); -+ -+// Enable PMN{n} -+// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) -+void enable_pmn(unsigned int counter); -+ -+// Enable PMN{n} -+// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) -+void disable_pmn(unsigned int counter); -+ -+// -+// Read counter values -+// -+ -+// Returns the value of CCNT -+unsigned int read_ccnt(void); -+ -+// Returns the value of PMN{n} -+// counter = The counter to read (e.g. 0 for PMN0, 1 for PMN1) -+unsigned int read_pmn(unsigned int counter); -+ -+// -+// Overflow and interrupts -+// -+ -+// Returns the value of the overflow flags -+unsigned int read_flags(void); -+ -+// Writes the overflow flags -+void write_flags(unsigned int flags); -+ -+// Enables interrupt generation on overflow of the CCNT -+void enable_ccnt_irq(void); -+ -+// Disables interrupt generation on overflow of the CCNT -+void disable_ccnt_irq(void); -+ -+// Enables interrupt generation on overflow of PMN{x} -+// counter = The counter to enable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) -+void enable_pmn_irq(unsigned int counter); -+ -+// Disables interrupt generation on overflow of PMN{x} -+// counter = r0 = The counter to disable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) -+void disable_pmn_irq(unsigned int counter); -+ -+// -+// Counter reset functions -+// -+ -+// Resets the programmable counters -+void reset_pmn(void); -+ -+// Resets the CCNT -+void reset_ccnt(void); -+ -+// -+// Software Increment -+ -+// Writes to software increment register -+// counter = The counter to increment (e.g. 0 for PMN0, 1 for PMN1) -+void pmu_software_increment(unsigned int counter); -+ -+// -+// User mode access -+// -+ -+// Enables User mode access to the PMU (must be called in a priviledged mode) -+void enable_pmu_user_access(void); -+ -+// Disables User mode access to the PMU (must be called in a priviledged mode) -+void disable_pmu_user_access(void); -+ -+#endif -+// ------------------------------------------------------------ -+// End of v7_pmu.h -+// ------------------------------------------------------------ -+ ++// ------------------------------------------------------------ ++// PMU for Cortex-A/R (v7-A/R) ++// ------------------------------------------------------------ ++ ++#ifndef _V7_PMU_H ++#define _V7_PMU_H ++ ++// Returns the number of progammable counters ++unsigned int getPMN(void); ++ ++// Sets the event for a programmable counter to record ++// counter = r0 = Which counter to program (e.g. 0 for PMN0, 1 for PMN1) ++// event = r1 = The event code (from appropiate TRM or ARM Architecture Reference Manual) ++void pmn_config(unsigned int counter, unsigned int event); ++ ++// Enables/disables the divider (1/64) on CCNT ++// divider = r0 = If 0 disable divider, else enable dvider ++void ccnt_divider(int divider); ++ ++// ++// Enables and disables ++// ++ ++// Global PMU enable ++// On ARM11 this enables the PMU, and the counters start immediately ++// On Cortex this enables the PMU, there are individual enables for the counters ++void enable_pmu(void); ++ ++// Global PMU disable ++// On Cortex, this overrides the enable state of the individual counters ++void disable_pmu(void); ++ ++// Enable the CCNT ++void enable_ccnt(void); ++ ++// Disable the CCNT ++void disable_ccnt(void); ++ ++// Enable PMN{n} ++// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++void enable_pmn(unsigned int counter); ++ ++// Enable PMN{n} ++// counter = The counter to enable (e.g. 0 for PMN0, 1 for PMN1) ++void disable_pmn(unsigned int counter); ++ ++// ++// Read counter values ++// ++ ++// Returns the value of CCNT ++unsigned int read_ccnt(void); ++ ++// Returns the value of PMN{n} ++// counter = The counter to read (e.g. 0 for PMN0, 1 for PMN1) ++unsigned int read_pmn(unsigned int counter); ++ ++// ++// Overflow and interrupts ++// ++ ++// Returns the value of the overflow flags ++unsigned int read_flags(void); ++ ++// Writes the overflow flags ++void write_flags(unsigned int flags); ++ ++// Enables interrupt generation on overflow of the CCNT ++void enable_ccnt_irq(void); ++ ++// Disables interrupt generation on overflow of the CCNT ++void disable_ccnt_irq(void); ++ ++// Enables interrupt generation on overflow of PMN{x} ++// counter = The counter to enable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) ++void enable_pmn_irq(unsigned int counter); ++ ++// Disables interrupt generation on overflow of PMN{x} ++// counter = r0 = The counter to disable the interrupt for (e.g. 0 for PMN0, 1 for PMN1) ++void disable_pmn_irq(unsigned int counter); ++ ++// ++// Counter reset functions ++// ++ ++// Resets the programmable counters ++void reset_pmn(void); ++ ++// Resets the CCNT ++void reset_ccnt(void); ++ ++// ++// Software Increment ++ ++// Writes to software increment register ++// counter = The counter to increment (e.g. 0 for PMN0, 1 for PMN1) ++void pmu_software_increment(unsigned int counter); ++ ++// ++// User mode access ++// ++ ++// Enables User mode access to the PMU (must be called in a priviledged mode) ++void enable_pmu_user_access(void); ++ ++// Disables User mode access to the PMU (must be called in a priviledged mode) ++void disable_pmu_user_access(void); ++ ++#endif ++// ------------------------------------------------------------ ++// End of v7_pmu.h ++// ------------------------------------------------------------ ++ --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c @@ -27,21 +27,24 @@ @@ -8170,8 +9314,7 @@ -static int Open(vlc_object_t *); -static void Close(vlc_object_t *); -+#define SUBS_MAX 4 - +- -vlc_module_begin() - set_shortname(N_("MMAL vout")) - set_description(N_("MMAL-based vout plugin for Raspberry Pi")) @@ -8186,7 +9329,8 @@ - MMAL_NATIVE_INTERLACE_LONGTEXT, false) - set_callbacks(Open, Close) -vlc_module_end() -- ++#define SUBS_MAX 4 + -struct dmx_region_t { - struct dmx_region_t *next; - picture_t *picture; @@ -8213,13 +9357,14 @@ - picture_t **pictures; /* Actual list of alloced pictures passed into picture_pool */ - picture_pool_t *picture_pool; - ++ vcsm_init_type_t init_type; MMAL_COMPONENT_T *component; MMAL_PORT_T *input; MMAL_POOL_T *pool; /* mmal buffer headers, used for pushing pictures to component*/ - struct dmx_region_t *dmx_region; int i_planes; /* Number of actually used planes, 1 for opaque, 3 for i420 */ - uint32_t buffer_size; /* size of actual mmal buffers */ +- uint32_t buffer_size; /* size of actual mmal buffers */ int buffers_in_transit; /* number of buffers currently pushed to mmal component */ unsigned num_buffers; /* number of buffers allocated at mmal port */ @@ -8236,7 +9381,7 @@ int next_phase_check; /* lowpass for phase check frequency */ int phase_offset; /* currently applied offset to presentation time in ns */ -@@ -136,264 +100,415 @@ +@@ -136,264 +100,451 @@ bool native_interlaced; bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ bool b_progressive; @@ -8247,7 +9392,11 @@ -static const vlc_fourcc_t subpicture_chromas[] = { - VLC_CODEC_RGBA, - 0 +-}; + vout_subpic_t subs[SUBS_MAX]; ++ // Stash for subpics derived from the passed subpicture rather than ++ // included with the main pic ++ MMAL_BUFFER_HEADER_T * subpic_bufs[SUBS_MAX]; + + picture_pool_t * pic_pool; + @@ -8260,12 +9409,13 @@ + MMAL_POOL_T * out_pool; + bool pending; + } isp; - }; -/* Utility functions */ -static inline uint32_t align(uint32_t x, uint32_t y); -static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, - const video_format_t *fmt); ++ MMAL_POOL_T * copy_pool; ++ MMAL_BUFFER_HEADER_T * copy_buf; -/* VLC vout display callbacks */ -static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count); @@ -8279,7 +9429,9 @@ -/* MMAL callbacks */ -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); -+// ISP setup ++ // Subpic blend if we have to do it here ++ vzc_pool_ctl_t * vzc; ++}; -/* TV service */ -static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height); @@ -8287,10 +9439,6 @@ - uint32_t param2); -static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); -static int set_latency_target(vout_display_t *vd, bool enable); -+static inline bool want_isp(const vout_display_t * const vd) -+{ -+ return (vd->fmt.i_chroma == VLC_CODEC_MMAL_ZC_SAND10); -+} -/* DispManX */ -static void display_subpicture(vout_display_t *vd, subpicture_t *subpicture); @@ -8303,6 +9451,56 @@ - DISPMANX_UPDATE_HANDLE_T update); -static void show_background(vout_display_t *vd, bool enable); -static void maintain_phase_sync(vout_display_t *vd); ++// ISP setup + +-static int Open(vlc_object_t *object) ++static inline bool want_isp(const vout_display_t * const vd) + { +- vout_display_t *vd = (vout_display_t *)object; +- vout_display_sys_t *sys; +- uint32_t buffer_pitch, buffer_height; +- vout_display_place_t place; +- MMAL_DISPLAYREGION_T display_region; +- MMAL_STATUS_T status; +- int ret = VLC_SUCCESS; +- unsigned i; ++ return (vd->fmt.i_chroma == VLC_CODEC_MMAL_ZC_SAND10); ++} + +- if (vout_display_IsWindowed(vd)) +- return VLC_EGENERIC; ++static inline bool want_copy(const vout_display_t * const vd) ++{ ++ return (vd->fmt.i_chroma == VLC_CODEC_I420); ++} + +- sys = calloc(1, sizeof(struct vout_display_sys_t)); +- if (!sys) +- return VLC_ENOMEM; +- vd->sys = sys; ++// Do a stride converting copy - if the strides are the same and line_len is ++// close then do a single block copy - we don't expect to have to preserve ++// pixels in the output frame ++static inline void mem_copy_2d(uint8_t * d_ptr, const size_t d_stride, const uint8_t * s_ptr, const size_t s_stride, size_t lines, const size_t line_len) ++{ ++ if (s_stride == d_stride && s_stride < line_len + 32) ++ { ++ memcpy(d_ptr, s_ptr, s_stride * lines); ++ } ++ else ++ { ++ while (lines-- != 0) { ++ memcpy(d_ptr, s_ptr, line_len); ++ d_ptr += d_stride; ++ s_ptr += s_stride; ++ } ++ } ++} + +- sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); +- bcm_host_init(); + +- sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; +static MMAL_FOURCC_T vout_vlc_to_mmal_pic_fourcc(const unsigned int fcc) +{ + switch (fcc){ @@ -8312,23 +9510,22 @@ + return MMAL_ENCODING_YUVUV128; + case VLC_CODEC_MMAL_ZC_SAND10: + return MMAL_ENCODING_YUVUV64_10; // It will be after we've converted it... ++ case VLC_CODEC_I420: ++ return MMAL_ENCODING_I420; + default: + break; + } + return 0; +} --static int Open(vlc_object_t *object) +- status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", +- MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +static void display_set_format(const vout_display_t * const vd, MMAL_ES_FORMAT_T *const es_fmt, const bool is_intermediate) - { -- vout_display_t *vd = (vout_display_t *)object; -- vout_display_sys_t *sys; -- uint32_t buffer_pitch, buffer_height; -- vout_display_place_t place; -- MMAL_DISPLAYREGION_T display_region; -- MMAL_STATUS_T status; -- int ret = VLC_SUCCESS; -- unsigned i; ++{ + const unsigned int w = is_intermediate ? vd->fmt.i_visible_width : vd->fmt.i_width ; + const unsigned int h = is_intermediate ? vd->fmt.i_visible_height : vd->fmt.i_height; + MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; @@ -8349,14 +9546,19 @@ + } else { + v_fmt->par.num = vd->fmt.i_sar_num; + v_fmt->par.den = vd->fmt.i_sar_den; -+ } + } + v_fmt->frame_rate.num = vd->fmt.i_frame_rate; + v_fmt->frame_rate.den = vd->fmt.i_frame_rate_base; + v_fmt->color_space = vlc_to_mmal_color_space(vd->fmt.space); +} -- if (vout_display_IsWindowed(vd)) -- return VLC_EGENERIC; +- sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; +- status = mmal_port_enable(sys->component->control, control_port_cb); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to enable control port %s (status=%"PRIx32" %s)", +- sys->component->control->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +static void display_src_rect(const vout_display_t * const vd, MMAL_RECT_T *const rect) +{ + const bool wants_isp = want_isp(vd); @@ -8365,11 +9567,7 @@ + rect->width = vd->fmt.i_visible_width; + rect->height = vd->fmt.i_visible_height; +} - -- sys = calloc(1, sizeof(struct vout_display_sys_t)); -- if (!sys) -- return VLC_ENOMEM; -- vd->sys = sys; ++ +static void isp_input_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) +{ +#if TRACE_ALL @@ -8380,36 +9578,19 @@ +#else + VLC_UNUSED(port); +#endif - -- sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); -- bcm_host_init(); ++ + mmal_buffer_header_release(buf); - -- sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; ++ +#if TRACE_ALL + msg_Dbg(vd, ">>> %s", __func__); +#endif +} - -- status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); -- if (status != MMAL_SUCCESS) { -- msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", -- MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; -- } ++ +static void isp_control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) +{ + vout_display_t *vd = (vout_display_t *)port->userdata; + MMAL_STATUS_T status; - -- sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; -- status = mmal_port_enable(sys->component->control, control_port_cb); -- if (status != MMAL_SUCCESS) { -- msg_Err(vd, "Failed to enable control port %s (status=%"PRIx32" %s)", -- sys->component->control->name, status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; ++ + if (buffer->cmd == MMAL_EVENT_ERROR) { + status = *(uint32_t *)buffer->data; + msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); @@ -8846,7 +10027,7 @@ if (fmt) { sys->input->format->es->video.par.num = fmt->i_sar_num; -@@ -412,22 +527,29 @@ +@@ -412,22 +563,29 @@ if (!cfg) cfg = vd->cfg; @@ -8882,7 +10063,7 @@ status = mmal_port_parameter_set(sys->input, &display_region.hdr); if (status != MMAL_SUCCESS) { msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", -@@ -435,7 +557,6 @@ +@@ -435,7 +593,6 @@ return -EINVAL; } @@ -8890,7 +10071,7 @@ sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -@@ -446,191 +567,130 @@ +@@ -446,192 +603,153 @@ return 0; } @@ -8970,8 +10151,8 @@ - msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", - sys->component->name, status, mmal_status_to_string(status)); - goto out; -+ // Not expecting subpictures in the current setup -+ // Subpics should be attached to the main pic ++ // If we had subpics then we have attached them to the main pic in prepare ++ // so all we have to do here is delete the refs + if (subpicture != NULL) { + subpicture_Delete(subpicture); } @@ -9005,16 +10186,16 @@ + } + // Stuff into input + // We assume the BH is already set up with values reflecting pic date etc. -+ if (sys->isp.pending) { -+ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->isp.out_q); -+ sys->isp.pending = false; ++ if (sys->copy_buf != NULL) { ++ MMAL_BUFFER_HEADER_T *const buf = sys->copy_buf; ++ sys->copy_buf = NULL; +#if TRACE_ALL -+ msg_Dbg(vd, "--- %s: ISP stuff", __func__); ++ msg_Dbg(vd, "--- %s: Copy stuff", __func__); +#endif + if (mmal_port_send_buffer(sys->input, buf) != MMAL_SUCCESS) + { + mmal_buffer_header_release(buf); -+ msg_Err(vd, "Send ISP buffer to render input failed"); ++ msg_Err(vd, "Send copy buffer to render input failed"); + goto fail; + } } @@ -9031,22 +10212,23 @@ - msg_Err(vd, "Failed to create picture"); - free(picture_res.p_sys); - goto out; -+ else -+ { -+ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++ else if (sys->isp.pending) { ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->isp.out_q); ++ sys->isp.pending = false; +#if TRACE_ALL -+ msg_Dbg(vd, "--- %s: Buf stuff", __func__); ++ msg_Dbg(vd, "--- %s: ISP stuff", __func__); +#endif -+ if ((err = port_send_replicated(sys->input, sys->pool, pic_buf, pic_buf->pts)) != MMAL_SUCCESS) ++ if (mmal_port_send_buffer(sys->input, buf) != MMAL_SUCCESS) + { -+ msg_Err(vd, "Send buffer to input failed"); ++ mmal_buffer_header_release(buf); ++ msg_Err(vd, "Send ISP buffer to render input failed"); + goto fail; } - - sys->pictures[i]->i_planes = sys->i_planes; - memcpy(sys->pictures[i]->p, sys->planes, sys->i_planes * sizeof(plane_t)); } - +- - memset(&picture_pool_cfg, 0, sizeof(picture_pool_configuration_t)); - picture_pool_cfg.picture_count = sys->num_buffers; - picture_pool_cfg.picture = sys->pictures; @@ -9056,12 +10238,18 @@ - if (!sys->picture_pool) { - msg_Err(vd, "Failed to create picture pool"); - goto out; -+ if (p_pic->context == NULL) { -+ msg_Dbg(vd, "%s: No context", __func__); - } + else + { -+ unsigned int sub_no = 0; ++ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); ++#if TRACE_ALL ++ msg_Dbg(vd, "--- %s: Buf stuff", __func__); ++#endif ++ if ((err = port_send_replicated(sys->input, sys->pool, pic_buf, pic_buf->pts)) != MMAL_SUCCESS) ++ { ++ msg_Err(vd, "Send buffer to input failed"); ++ goto fail; ++ } + } -out: - return sys->picture_pool; @@ -9112,9 +10300,20 @@ - if (status != MMAL_SUCCESS) { - msg_Err(vd, "Failed to send buffer to input port. Frame dropped"); - picture_Release(picture); ++ { ++ unsigned int sub_no = 0; ++ MMAL_BUFFER_HEADER_T **psub_bufs2 = sys->subpic_bufs; ++ const bool is_mmal_pic = hw_mmal_pic_is_mmal(p_pic); ++ + for (sub_no = 0; sub_no != SUBS_MAX; ++sub_no) { + int rv; -+ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(vd), p_pic, sub_no, &sys->subs[sub_no].sub, ++ MMAL_BUFFER_HEADER_T * const sub_buf = !is_mmal_pic ? NULL : ++ hw_mmal_pic_sub_buf_get(p_pic, sub_no); ++ ++ if ((rv = hw_mmal_subpic_update(VLC_OBJECT(vd), ++ sub_buf != NULL ? sub_buf : *psub_bufs2++, ++ &sys->subs[sub_no].sub, ++ &p_pic->format, + &(MMAL_RECT_T){.width = sys->display_width, .height = sys->display_height}, + p_pic->date)) == 0) + break; @@ -9128,7 +10327,12 @@ } - display_subpicture(vd, subpicture); -- ++fail: ++ for (unsigned int i = 0; i != SUBS_MAX && sys->subpic_bufs[i] != NULL; ++i) { ++ mmal_buffer_header_release(sys->subpic_bufs[i]); ++ sys->subpic_bufs[i] = NULL; ++ } + - if (subpicture) - subpicture_Delete(subpicture); + picture_Release(p_pic); @@ -9136,15 +10340,13 @@ if (sys->next_phase_check == 0 && sys->adjust_refresh_rate) maintain_phase_sync(vd); sys->next_phase_check = (sys->next_phase_check + 1) % PHASE_CHECK_INTERVAL; - +- - if (sys->opaque) { - vlc_mutex_lock(&sys->buffer_mutex); - while (atomic_load(&sys->buffers_in_transit) >= MAX_BUFFERS_IN_TRANSIT) - vlc_cond_wait(&sys->buffer_cond, &sys->buffer_mutex); - vlc_mutex_unlock(&sys->buffer_mutex); - } -+fail: -+ /* NOP */; } static int vd_control(vout_display_t *vd, int query, va_list args) @@ -9167,12 +10369,15 @@ - if (configure_display(vd, &cfg, NULL) >= 0) - ret = VLC_SUCCESS; - } ++ { + // Ignore this - we just use full screen anyway + ret = VLC_SUCCESS; break; ++ } case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: -@@ -640,10 +700,37 @@ + case VOUT_DISPLAY_CHANGE_SOURCE_CROP: +@@ -640,11 +758,38 @@ break; case VOUT_DISPLAY_RESET_PICTURES: @@ -9186,8 +10391,8 @@ case VOUT_DISPLAY_CHANGE_ZOOM: msg_Warn(vd, "Unsupported control query %d", query); + ret = VLC_SUCCESS; -+ break; -+ + break; + + case VOUT_DISPLAY_CHANGE_MMAL_HIDE: + { + MMAL_STATUS_T err; @@ -9206,12 +10411,13 @@ + } + sys->force_config = true; + ret = VLC_SUCCESS; - break; ++ break; + } - ++ default: msg_Warn(vd, "Unknown control query %d", query); -@@ -661,13 +748,11 @@ + break; +@@ -661,13 +806,11 @@ vlc_mutex_lock(&sys->manage_mutex); if (sys->need_configure_display) { @@ -9227,11 +10433,69 @@ } sys->need_configure_display = false; -@@ -676,56 +761,76 @@ +@@ -676,56 +819,164 @@ vlc_mutex_unlock(&sys->manage_mutex); } -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++ ++static int attach_subpics(vout_display_t * const vd, vout_display_sys_t * const sys, ++ subpicture_t * const subpicture) + { +- vout_display_t *vd = (vout_display_t *)port->userdata; +- MMAL_STATUS_T status; ++ unsigned int n = 0; + +- if (buffer->cmd == MMAL_EVENT_ERROR) { +- status = *(uint32_t *)buffer->data; +- msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); ++ if (sys->vzc == NULL) { ++ if ((sys->vzc = hw_mmal_vzc_pool_new()) == NULL) ++ { ++ msg_Err(vd, "Failed to allocate VZC"); ++ return VLC_ENOMEM; ++ } + } + +- mmal_buffer_header_release(buffer); ++ // Attempt to import the subpics ++ for (subpicture_t * spic = subpicture; spic != NULL; spic = spic->p_next) ++ { ++ for (subpicture_region_t *sreg = spic->p_region; sreg != NULL; sreg = sreg->p_next) { ++ picture_t *const src = sreg->p_picture; ++ ++#if 0 ++ char dbuf0[5]; ++ msg_Dbg(vd, " [%p:%p] Pos=%d,%d src=%dx%d/%dx%d, vd=%dx%d/%dx%d, Alpha=%d, Fmt=%s", src, src->p[0].p_pixels, ++ sreg->i_x, sreg->i_y, ++ src->format.i_visible_width, src->format.i_visible_height, ++ src->format.i_width, src->format.i_height, ++ vd->fmt.i_visible_width, vd->fmt.i_visible_height, ++ vd->fmt.i_width, vd->fmt.i_height, ++ sreg->i_alpha, ++ str_fourcc(dbuf0, src->format.i_chroma)); ++#endif ++ ++ if ((sys->subpic_bufs[n] = hw_mmal_vzc_buf_from_pic(sys->vzc, ++ src, ++ (MMAL_RECT_T){.width = vd->cfg->display.width, .height=vd->cfg->display.height}, ++ sreg->i_x, sreg->i_y, ++ sreg->i_alpha, ++ n == 0)) == NULL) ++ { ++ msg_Err(vd, "Failed to allocate vzc buffer for subpic"); ++ return VLC_ENOMEM; ++ } ++ ++ if (++n == SUBS_MAX) ++ return VLC_SUCCESS; ++ } ++ } ++ return VLC_SUCCESS; + } + +-static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++ +static void vd_prepare(vout_display_t *vd, picture_t *p_pic, +#if VLC_VER_3 + subpicture_t *subpicture @@ -9241,24 +10505,55 @@ + ) { - vout_display_t *vd = (vout_display_t *)port->userdata; -- MMAL_STATUS_T status; + MMAL_STATUS_T err; + vout_display_sys_t * const sys = vd->sys; - -- if (buffer->cmd == MMAL_EVENT_ERROR) { -- status = *(uint32_t *)buffer->data; -- msg_Err(vd, "MMAL error %"PRIx32" \"%s\"", status, mmal_status_to_string(status)); -+ VLC_UNUSED(subpicture); -+// VLC_UNUSED(date); + + vd_manage(vd); + ++ // Subpics can either turn up attached to the main pic or in the ++ // subpic list here - if they turn up here then process inrto temp ++ // buffers ++ if (subpicture != NULL) { ++ attach_subpics(vd, sys, subpicture); ++ } ++ ++ // ***** ++ if (want_copy(vd)) { ++ if (sys->copy_buf != NULL) { ++ msg_Err(vd, "Copy buf not NULL"); ++ mmal_buffer_header_release(sys->copy_buf); ++ sys->copy_buf = NULL; ++ } ++ ++ MMAL_BUFFER_HEADER_T * const buf = mmal_queue_wait(sys->copy_pool->queue); ++ // Copy 2d ++ unsigned int y_size = sys->input->format->es->video.width * sys->input->format->es->video.height; ++ ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ buf->length = sys->input->buffer_size; ++ ++ mem_copy_2d(buf->data, sys->input->format->es->video.width, ++ p_pic->p[0].p_pixels, p_pic->p[0].i_pitch, ++ sys->input->format->es->video.crop.height, ++ sys->input->format->es->video.crop.width); ++ ++ mem_copy_2d(buf->data + y_size, sys->input->format->es->video.width / 2, ++ p_pic->p[1].p_pixels, p_pic->p[1].i_pitch, ++ sys->input->format->es->video.crop.height / 2, ++ sys->input->format->es->video.crop.width / 2); ++ ++ mem_copy_2d(buf->data + y_size + y_size / 4, sys->input->format->es->video.width / 2, ++ p_pic->p[2].p_pixels, p_pic->p[2].i_pitch, ++ sys->input->format->es->video.crop.height / 2, ++ sys->input->format->es->video.crop.width / 2); ++ ++ sys->copy_buf = buf; ++ } ++ + if (isp_check(vd, sys) != MMAL_SUCCESS) { + return; - } - -- mmal_buffer_header_release(buffer); --} ++ } ++ + if (want_isp(vd)) + { + struct vout_isp_conf_s * const isp = &sys->isp; @@ -9267,10 +10562,7 @@ + // This should be empty - make it so if it isn't + isp_empty_out_q(isp); + isp->pending = false; - --static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) --{ -- vout_display_t *vd = (vout_display_t *)port->userdata; ++ + // Stuff output + if (isp_prepare(vd, isp) != MMAL_SUCCESS) + return; @@ -9340,7 +10632,7 @@ } static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) -@@ -828,148 +933,12 @@ +@@ -828,148 +1079,12 @@ } } @@ -9490,7 +10782,7 @@ ((double)vd->sys->i_frame_rate / vd->sys->i_frame_rate_base); vout_display_sys_t *sys = vd->sys; -@@ -1012,32 +981,260 @@ +@@ -1012,32 +1127,286 @@ } } @@ -9534,28 +10826,36 @@ + + vc_tv_unregister_callback_full(tvservice_cb, vd); + -+ if (sys->component && sys->component->control->is_enabled) -+ mmal_port_disable(sys->component->control); -+ -+ { -+ unsigned int i; -+ for (i = 0; i != SUBS_MAX; ++i) { -+ vout_subpic_t * const sub = sys->subs + i; -+ if (sub->component != NULL) { -+ hw_mmal_subpic_close(VLC_OBJECT(vd), &sub->sub); -+ if (sub->component->control->is_enabled) -+ mmal_port_disable(sub->component->control); -+ if (sub->component->is_enabled) -+ mmal_component_disable(sub->component); -+ mmal_component_release(sub->component); -+ sub->component = NULL; -+ } ++ // Shouldn't be anything here - but just in case ++ for (unsigned int i = 0; i != SUBS_MAX; ++i) ++ if (sys->subpic_bufs[i] != NULL) ++ mmal_buffer_header_release(sys->subpic_bufs[i]); ++ ++ for (unsigned int i = 0; i != SUBS_MAX; ++i) { ++ vout_subpic_t * const sub = sys->subs + i; ++ if (sub->component != NULL) { ++ hw_mmal_subpic_close(VLC_OBJECT(vd), &sub->sub); ++ if (sub->component->control->is_enabled) ++ mmal_port_disable(sub->component->control); ++ if (sub->component->is_enabled) ++ mmal_component_disable(sub->component); ++ mmal_component_release(sub->component); ++ sub->component = NULL; + } } + + if (sys->input && sys->input->is_enabled) + mmal_port_disable(sys->input); + ++ if (sys->component && sys->component->control->is_enabled) ++ mmal_port_disable(sys->component->control); ++ ++ if (sys->copy_buf != NULL) ++ mmal_buffer_header_release(sys->copy_buf); ++ ++ if (sys->input != NULL && sys->copy_pool != NULL) ++ mmal_port_pool_destroy(sys->input, sys->copy_pool); ++ + if (sys->component && sys->component->is_enabled) + mmal_component_disable(sys->component); + @@ -9567,6 +10867,8 @@ + + isp_close(vd, sys); + ++ hw_mmal_vzc_pool_release(sys->vzc); ++ + vlc_mutex_destroy(&sys->manage_mutex); + + if (sys->native_interlaced) { @@ -9575,14 +10877,14 @@ + msg_Warn(vd, "Could not reset hvs field mode"); + } + -+ free(sys); ++ cma_vcsm_exit(sys->init_type);; + -+ bcm_host_deinit(); ++ free(sys); + +#if TRACE_ALL + msg_Dbg(vd, ">>> %s", __func__); +#endif - } ++} + +static int OpenMmalVout(vlc_object_t *object) +{ @@ -9600,7 +10902,8 @@ + if (enc_in == 0) + { +#if TRACE_ALL -+ msg_Dbg(vd, ">>> %s: Format not MMAL", __func__); ++ char dbuf0[5]; ++ msg_Dbg(vd, ">>> %s: Format %s not MMAL", __func__, str_fourcc(dbuf0, vd->fmt.i_chroma)); +#endif + return VLC_EGENERIC; + } @@ -9610,7 +10913,11 @@ + return VLC_ENOMEM; + vd->sys = sys; + -+ bcm_host_init(); ++ if ((sys->init_type = cma_vcsm_init()) == VCSM_INIT_NONE) ++ { ++ msg_Err(vd, "VCSM init fail"); ++ goto fail; ++ } + + sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); + @@ -9635,7 +10942,6 @@ + sys->input->format->encoding = enc_in; + sys->input->format->encoding_variant = 0; + sys->i_planes = 1; -+ sys->buffer_size = sys->input->buffer_size_recommended; + + display_set_format(vd, sys->input->format, want_isp(vd)); + @@ -9652,8 +10958,20 @@ + sys->input->name, status, mmal_status_to_string(status)); + goto fail; + } ++ + sys->input->buffer_size = sys->input->buffer_size_recommended; -+ sys->input->buffer_num = 30; ++ ++ if (!want_copy(vd)) { ++ sys->input->buffer_num = 30; ++ } ++ else { ++ sys->input->buffer_num = 2; ++ if ((sys->copy_pool = mmal_port_pool_create(sys->input, 2, sys->input->buffer_size)) == NULL) ++ { ++ msg_Err(vd, "Cannot create copy pool"); ++ goto fail; ++ } ++ } + + vout_display_PlacePicture(&place, &vd->source, vd->cfg, false); + display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; @@ -9729,7 +11047,7 @@ + .has_double_click = false, + .needs_hide_mouse = false, + .has_pictures_invalid = true, -+ .subpicture_chromas = NULL ++ .subpicture_chromas = hw_mmal_vzc_subpicture_chromas + }; + + vd->pool = vd_pool; @@ -9754,7 +11072,7 @@ + msg_Dbg(vd, ">>> %s: rv=%d", __func__, ret); + + return ret == VLC_SUCCESS ? VLC_EGENERIC : ret; -+} + } + +vlc_module_begin() + @@ -9762,7 +11080,7 @@ + + set_shortname(N_("MMAL vout")) + set_description(N_("MMAL-based vout plugin for Raspberry Pi")) -+ set_capability("vout display", 0) ++ set_capability("vout display", 16) // 1 point better than ASCII art + add_shortcut("mmal_vout") + set_category( CAT_VIDEO ) + set_subcategory( SUBCAT_VIDEO_VOUT ) @@ -9779,7 +11097,7 @@ + --- /dev/null +++ b/modules/hw/mmal/xsplitter.c -@@ -0,0 +1,403 @@ +@@ -0,0 +1,437 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif @@ -9808,21 +11126,9 @@ + vout_display_t * mmal_vout; + vout_display_t * x_vout; + uint32_t changed; ++ vlc_fourcc_t subpicture_chromas[16]; +} mmal_x11_sys_t; + -+static const char * str_fourcc(char * buf, unsigned int fcc) -+{ -+ if (fcc == 0) -+ return "----"; -+ buf[0] = (fcc >> 0) & 0xff; -+ buf[1] = (fcc >> 8) & 0xff; -+ buf[2] = (fcc >> 16) & 0xff; -+ buf[3] = (fcc >> 24) & 0xff; -+ buf[4] = 0; -+ return buf; -+} -+ -+ +static void unload_display_module(vout_display_t * const x_vout) +{ + if (x_vout != NULL) { @@ -9858,6 +11164,12 @@ +#if TRACE_ALL + msg_Dbg(vd, "<<< %s (cmd=%d)", __func__, cmd); +#endif ++ ++ // Do not fall into the display assert if Invalid not supported ++ if (cmd == VOUT_DISPLAY_EVENT_PICTURES_INVALID && ++ !vd->info.has_pictures_invalid) ++ return; ++ + vd->owner.event(vd, cmd, args); +} + @@ -9985,7 +11297,10 @@ + is_mmal_pic, sys->use_mmal); +#endif + -+ if (sys->use_mmal != is_mmal_pic) { ++ if (x_vd->fmt.i_chroma != pic->format.i_chroma || ++ x_vd->fmt.i_width != pic->format.i_width || ++ x_vd->fmt.i_height != pic->format.i_height) ++ { + msg_Dbg(vd, "%s: Picture dropped", __func__); + picture_Release(pic); + if (sub != NULL) @@ -10011,7 +11326,7 @@ + +static bool want_mmal_vout(vout_display_t * vd, const mmal_x11_sys_t * const sys) +{ -+ return sys->mmal_vout != NULL && var_InheritBool(vd, "fullscreen"); ++ return sys->mmal_vout != NULL && (sys->x_vout == NULL || var_InheritBool(vd, "fullscreen")); +} + +/* Control on the module (mandatory) */ @@ -10030,19 +11345,20 @@ + switch (ctl) { + case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: + { -+ const vout_display_cfg_t * cfg = va_arg(va, const vout_display_cfg_t *); ++ const vout_display_cfg_t * const cfg = va_arg(va, const vout_display_cfg_t *); + const bool want_mmal = want_mmal_vout(vd, sys); -+ vout_display_t *new_vd = want_mmal ? sys->mmal_vout : sys->x_vout; ++ const bool swap_vout = (sys->use_mmal != want_mmal); ++ vout_display_t * const new_vd = want_mmal ? sys->mmal_vout : sys->x_vout; + + msg_Dbg(vd, "Change size: %d, %d: mmal_vout=%p, want_mmal=%d, fs=%d", + cfg->display.width, cfg->display.height, sys->mmal_vout, want_mmal, + var_InheritBool(vd, "fullscreen")); + -+ if (sys->use_mmal != want_mmal) { ++ if (swap_vout) { + if (sys->use_mmal) { + vout_display_Control(x_vd, VOUT_DISPLAY_CHANGE_MMAL_HIDE); + } -+ vout_display_SendEventPicturesInvalid(x_vd); ++ vout_display_SendEventPicturesInvalid(vd); + } + + rv = vout_display_Control(new_vd, ctl, cfg); @@ -10053,7 +11369,7 @@ + } + + // Repeat any control calls that we sent to the previous vd -+ if (sys->changed != 0) { ++ if (swap_vout && sys->changed != 0) { + const uint32_t changed = sys->changed; + sys->changed = 0; + if ((changed & (1 << VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)) != 0) @@ -10074,20 +11390,24 @@ + } + + case VOUT_DISPLAY_RESET_PICTURES: -+ msg_Dbg(vd, "Reset pictures"); -+// rv = x_vd->control(x_vd, ctl, va); -+ rv = sys->x_vout->control(sys->x_vout, ctl, va); -+ if (sys->mmal_vout) -+ rv = sys->mmal_vout->control(sys->mmal_vout, ctl, va); + msg_Dbg(vd, "<<< %s: Pic reset: fmt: %dx%d<-%dx%d, source: %dx%d/%dx%d", __func__, + vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, + vd->source.i_width, vd->source.i_height, x_vd->source.i_width, x_vd->source.i_height); -+ vd->fmt = x_vd->fmt; ++ // If the display doesn't have has_pictures_invalid then it doesn't ++ // expect RESET_PICTURES ++ if (sys->x_vout->info.has_pictures_invalid) { ++ rv = sys->x_vout->control(sys->x_vout, ctl, va); ++ } ++ if (sys->mmal_vout && sys->mmal_vout->info.has_pictures_invalid) { ++ rv = sys->mmal_vout->control(sys->mmal_vout, ctl, va); ++ } ++ vd->fmt = x_vd->fmt; + break; + + case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: + case VOUT_DISPLAY_CHANGE_SOURCE_CROP: + x_vd->source = vd->source; ++ /* FALLTHRU */ + default: + rv = x_vd->control(x_vd, ctl, va); +// vd->fmt = x_vd->fmt; @@ -10133,14 +11453,18 @@ + .subpicture_chromas = NULL + }; + -+ if ((sys->x_vout = load_display_module(vd, "vout display", "xcb_x11")) == NULL) -+ goto fail; ++ if ((sys->x_vout = load_display_module(vd, "vout display", "opengles2")) != NULL) ++ msg_Dbg(vd, "Opengles2 output found"); ++ else if ((sys->x_vout = load_display_module(vd, "vout display", "xcb_x11")) != NULL) ++ msg_Dbg(vd, "X11 XCB output found"); + -+ if ((sys->mmal_vout = load_display_module(vd, "vout display", "mmal_vout")) == NULL) -+ { -+ // Winge but do no more than that - route everything to X ++ if ((sys->mmal_vout = load_display_module(vd, "vout display", "mmal_vout")) != NULL) ++ msg_Dbg(vd, "MMAL output found"); ++ ++ if (sys->mmal_vout == NULL && sys->x_vout == NULL) { + char dbuf0[5], dbuf1[5]; -+ msg_Info(vd, "Not a valid format for mmal vout (%s/%s)", str_fourcc(dbuf0, vd->fmt.i_chroma), str_fourcc(dbuf1, vd->source.i_chroma)); ++ msg_Info(vd, "No valid output found for vout (%s/%s)", str_fourcc(dbuf0, vd->fmt.i_chroma), str_fourcc(dbuf1, vd->source.i_chroma)); ++ goto fail; + } + + vd->pool = mmal_x11_pool; @@ -10160,7 +11484,35 @@ + sys->use_mmal = false; + } + -+ vd->info = sys->cur_vout->info; ++ if (sys->mmal_vout == NULL || sys->x_vout == NULL) { ++ vd->info = sys->cur_vout->info; ++ vd->info.has_pictures_invalid = true; // Should make this unwanted ++ } ++ else { ++ // We have both - construct a combination ++ vd->info = (vout_display_info_t){ ++ .is_slow = false, ++ .has_double_click = sys->mmal_vout->info.has_double_click || sys->x_vout->info.has_double_click, ++ .needs_hide_mouse = sys->mmal_vout->info.needs_hide_mouse || sys->x_vout->info.needs_hide_mouse, ++ .has_pictures_invalid = true, ++ }; ++ // Construct intersection of subpicture chromas ++ // sys calloced so no need to add the terminating zero ++ if (sys->mmal_vout->info.subpicture_chromas != NULL && sys->x_vout->info.subpicture_chromas != NULL) { ++ unsigned int n = 0; ++ // N^2 - fix if we ever care ++ for (const vlc_fourcc_t * p1 = sys->mmal_vout->info.subpicture_chromas; *p1 != 0 && n != 15; ++p1) { ++ for (const vlc_fourcc_t * p2 = sys->x_vout->info.subpicture_chromas; *p2 != 0; ++p2) { ++ if (*p1 == *p2) { ++ sys->subpicture_chromas[n++] = *p1; ++ break; ++ } ++ } ++ } ++ if (n != 0) ++ vd->info.subpicture_chromas = sys->subpicture_chromas; ++ } ++ } + vd->fmt = sys->cur_vout->fmt; + + return VLC_SUCCESS; @@ -10176,21 +11528,53 @@ +vlc_module_begin() + set_shortname(N_("MMAL x11 splitter")) + set_description(N_("MMAL x11 splitter for Raspberry Pi")) -+ set_capability("vout display", 900) ++ set_capability("vout display", 300) // Between GLES & GL + add_shortcut("mmal_x11") + set_category( CAT_VIDEO ) + set_subcategory( SUBCAT_VIDEO_VOUT ) + set_callbacks(OpenMmalX11, CloseMmalX11) +vlc_module_end() + +--- a/modules/video_output/opengl/egl.c ++++ b/modules/video_output/opengl/egl.c +@@ -43,6 +43,8 @@ + # include "../android/utils.h" + #endif + ++#define REQUIRE_DMA_BUF_IMPORT 1 ++ + typedef struct vlc_gl_sys_t + { + EGLDisplay display; +@@ -354,6 +356,14 @@ + goto error; + } + ++#if REQUIRE_DMA_BUF_IMPORT ++ if (!CheckToken(ext, "EGL_EXT_image_dma_buf_import")) ++ { ++ msg_Dbg(obj, "No dma_buf_import - fall back to X"); ++ goto error; ++ } ++#endif ++ + const EGLint conf_attr[] = { + EGL_RED_SIZE, 5, + EGL_GREEN_SIZE, 5, --- a/src/misc/fourcc.c +++ b/src/misc/fourcc.c -@@ -756,6 +756,8 @@ +@@ -755,8 +755,12 @@ + { { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422, VLC_CODEC_VDPAU_VIDEO_444, VLC_CODEC_VDPAU_OUTPUT }, FAKE_FMT() }, - { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE, -+ VLC_CODEC_MMAL_ZC_SAND8, VLC_CODEC_MMAL_ZC_SAND10, -+ VLC_CODEC_MMAL_ZC_I420, - VLC_CODEC_D3D9_OPAQUE, VLC_CODEC_D3D11_OPAQUE }, +- { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE, +- VLC_CODEC_D3D9_OPAQUE, VLC_CODEC_D3D11_OPAQUE }, ++ { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE }, ++ FAKE_FMT() }, ++ { { VLC_CODEC_MMAL_ZC_I420, VLC_CODEC_MMAL_ZC_SAND8, ++ VLC_CODEC_MMAL_ZC_SAND10, VLC_CODEC_MMAL_ZC_RGB32 }, ++ FAKE_FMT() }, ++ { { VLC_CODEC_D3D9_OPAQUE, VLC_CODEC_D3D11_OPAQUE }, FAKE_FMT() }, { { VLC_CODEC_D3D11_OPAQUE_10B, VLC_CODEC_D3D9_OPAQUE_10B }, + FAKE_FMT() }, From e7263e504a8c8ae0be904d817d9f8a275d9d01ba Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 24 Oct 2019 15:18:06 +0100 Subject: [PATCH 466/671] Rebuild for dav1d SONAME bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e3ba001..818b40c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Thu Oct 24 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-22 +- Rebuild for dav1d SONAME bump + * Mon Oct 14 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-21 - Update to 20191014 - Update mmal patch to 10 From 4f47bb545157394d9516b70e0366981b2011f5e3 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> Date: Fri, 15 Nov 2019 15:02:46 +0100 Subject: [PATCH 467/671] rebuild for libdvdread ABI bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 818b40c..ccc308d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Fri Nov 15 2019 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> - 1:3.0.9-23 +- rebuild for libdvdread ABI bump + * Thu Oct 24 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-22 - Rebuild for dav1d SONAME bump From aba68d5a7eabe288fe7362515fa0df1950db738b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Tue, 19 Nov 2019 23:18:48 +0100 Subject: [PATCH 468/671] Rebuild for dav1d 0.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ccc308d..2a7beaf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Tue Nov 19 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.9-24 +- Rebuild for dav1d 0.5.1 + * Fri Nov 15 2019 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> - 1:3.0.9-23 - rebuild for libdvdread ABI bump From 23d716dbe1ddc399bb29a1e8efc069c873c0f165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Tue, 19 Nov 2019 23:25:03 +0100 Subject: [PATCH 469/671] Revert "Rebuild for dav1d 0.5.1" This reverts commit aba68d5a7eabe288fe7362515fa0df1950db738b. --- vlc.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 2a7beaf..ccc308d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 24%{?dist} +Release: 23%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,9 +560,6 @@ fi || : %changelog -* Tue Nov 19 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.9-24 -- Rebuild for dav1d 0.5.1 - * Fri Nov 15 2019 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> - 1:3.0.9-23 - rebuild for libdvdread ABI bump From afb754f2ca106b04ff2b762db0f0cfda83af4552 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Thu, 28 Nov 2019 11:40:19 +0000 Subject: [PATCH 470/671] Rebuild for new x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ccc308d..d7b2d41 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Thu Nov 28 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-24 +- Rebuild for new x265 + * Fri Nov 15 2019 Dominik 'Rathann' Mierzejewski <rpm@greysector.net> - 1:3.0.9-23 - rebuild for libdvdread ABI bump From 3c95485be61f57d140716d42783f2b854d05dec4 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 17 Dec 2019 12:04:18 +0000 Subject: [PATCH 471/671] Mass rebuild for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d7b2d41..a8c95c1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Tue Dec 17 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-25 +- Mass rebuild for x264 + * Thu Nov 28 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-24 - Rebuild for new x265 From 23b19ea22d9d9574ed4270d44655618c0ca01a6f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 19 Dec 2019 14:22:37 +0000 Subject: [PATCH 472/671] Rebuild for new libplacebo version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a8c95c1..4e06baf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 25%{?dist} +Release: 26%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Thu Dec 19 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-26 +- Rebuild for new libplacebo version + * Tue Dec 17 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-25 - Mass rebuild for x264 From 2c95fdb03d0b6d9597c011e0ada3b956bd796edd Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 19 Dec 2019 15:18:25 +0000 Subject: [PATCH 473/671] Update libplacebo patch --- libplacebo_patch_1.patch | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/libplacebo_patch_1.patch b/libplacebo_patch_1.patch index c8a73a0..f47fce3 100644 --- a/libplacebo_patch_1.patch +++ b/libplacebo_patch_1.patch @@ -1,13 +1,13 @@ -From 78dff2f7ec405d423da4431fc873cd5182e594c8 Mon Sep 17 00:00:00 2001 +From 2215a98fbb1f11e5df8e58eba2ea15733cff7905 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> -Date: Fri, 7 Jun 2019 22:24:42 +0100 -Subject: Adapt patch from videolan mailing list - https://mailman.videolan.org/pipermail/vlc-devel/2019-May/124293.html +Date: Thu, 19 Dec 2019 15:03:32 +0000 +Subject: [PATCH] Adapt patch from videolan mailing list --- .../video_output/opengl/fragment_shaders.c | 6 +++++ + modules/video_output/opengl/vout_helper.c | 4 ++- modules/video_output/opengl/vout_helper.h | 27 +++++++++++++++++-- - 2 files changed, 31 insertions(+), 2 deletions(-) + 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c index 8c1f67ee7a..f6fb2be6c5 100644 @@ -27,6 +27,21 @@ index 8c1f67ee7a..f6fb2be6c5 100644 color_params.gamut_warning = var_InheritBool(tc->gl, "tone-mapping-warn"); struct pl_color_space dst_space = pl_color_space_unknown; +diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c +index 919560e603..12308e2060 100644 +--- a/modules/video_output/opengl/vout_helper.c ++++ b/modules/video_output/opengl/vout_helper.c +@@ -628,7 +628,9 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, + .log_level = PL_LOG_INFO, + }); + if (tc->pl_ctx) { +-# if PL_API_VER >= 6 ++# if PL_API_VER >= 20 ++ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); ++# elif PL_API_VER >= 6 + tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); + # else + tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0); diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h index 978669f89c..cfc256530e 100644 --- a/modules/video_output/opengl/vout_helper.h @@ -82,5 +97,5 @@ index 978669f89c..cfc256530e 100644 set_section("Dithering", NULL) \ add_integer("dither-algo", -1, DITHER_TEXT, DITHER_LONGTEXT, false) \ -- -2.21.0 +2.24.1 From 8a908240867cf69c1efbd8970108fa4ae6eaab8c Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sun, 22 Dec 2019 10:04:05 +0000 Subject: [PATCH 474/671] Rebuild for new protobuf version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 4e06baf..2b1ccf9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 26%{?dist} +Release: 27%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -560,6 +560,9 @@ fi || : %changelog +* Sun Dec 22 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-27 +- Rebuild for new protobuf version + * Thu Dec 19 2019 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-26 - Rebuild for new libplacebo version From 2b644dfe100aeb795b90bf45eef02d7e552afa29 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jan 2020 09:29:07 +0100 Subject: [PATCH 475/671] Update snapshot --- mmal_10.patch => mmal_16.patch | 6834 ++++++++++++++++++++------------ sources | 2 +- vlc.spec | 13 +- 3 files changed, 4230 insertions(+), 2619 deletions(-) rename mmal_10.patch => mmal_16.patch (75%) diff --git a/mmal_10.patch b/mmal_16.patch similarity index 75% rename from mmal_10.patch rename to mmal_16.patch index 6ed981e..b56b533 100644 --- a/mmal_10.patch +++ b/mmal_16.patch @@ -29,12 +29,13 @@ dnl evas plugin --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h -@@ -365,6 +365,10 @@ +@@ -365,6 +365,11 @@ /* Broadcom MMAL opaque buffer type */ #define VLC_CODEC_MMAL_OPAQUE VLC_FOURCC('M','M','A','L') +#define VLC_CODEC_MMAL_ZC_SAND8 VLC_FOURCC('Z','S','D','8') +#define VLC_CODEC_MMAL_ZC_SAND10 VLC_FOURCC('Z','S','D','0') ++#define VLC_CODEC_MMAL_ZC_SAND30 VLC_FOURCC('Z','S','D','3') +#define VLC_CODEC_MMAL_ZC_I420 VLC_FOURCC('Z','4','2','0') +#define VLC_CODEC_MMAL_ZC_RGB32 VLC_FOURCC('Z','R','G','B') @@ -52,14 +53,14 @@ +AM_LDFLAGS += -pthread -rpath '$(mmaldir)' $(LDFLAGS_mmal) -libmmal_vout_plugin_la_SOURCES = vout.c mmal_picture.c mmal_picture.h -+libmmal_vout_plugin_la_SOURCES = vout.c subpic.c mmal_picture.c subpic.h mmal_picture.h ++libmmal_vout_plugin_la_SOURCES = vout.c subpic.c mmal_picture.c subpic.h mmal_cma.c mmal_picture.h mmal_piccpy_neon.S libmmal_vout_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_vout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -lm libmmal_vout_plugin_la_LIBADD = $(LIBS_mmal) mmal_LTLIBRARIES = libmmal_vout_plugin.la -libmmal_codec_plugin_la_SOURCES = codec.c -+libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h\ ++libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h mmal_piccpy_neon.S\ + mmal_cma.c mmal_cma.h libmmal_codec_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_codec_plugin_la_LDFLAGS = $(AM_LDFLAGS) @@ -67,26 +68,26 @@ mmal_LTLIBRARIES += libmmal_codec_plugin.la -libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c -+libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c mmal_picture.h ++libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c mmal_cma.c mmal_picture.h mmal_piccpy_neon.S libmmal_deinterlace_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_deinterlace_plugin_la_LDFLAGS = $(AM_LDFLAGS) libmmal_deinterlace_plugin_la_LIBADD = $(LIBS_mmal) mmal_LTLIBRARIES += libmmal_deinterlace_plugin.la + -+libmmal_xsplitter_plugin_la_SOURCES = xsplitter.c mmal_picture.c mmal_picture.h ++libmmal_xsplitter_plugin_la_SOURCES = xsplitter.c mmal_picture.c mmal_cma.c mmal_picture.h mmal_piccpy_neon.S +libmmal_xsplitter_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_xsplitter_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_xsplitter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_xsplitter_plugin.la + -+libmmal_converter_plugin_la_SOURCES = converter_mmal.c mmal_cma.c mmal_picture.c mmal_cma.h mmal_picture.h ++libmmal_converter_plugin_la_SOURCES = converter_mmal.c mmal_cma.c mmal_picture.c mmal_cma.h mmal_picture.h mmal_piccpy_neon.S +libmmal_converter_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_converter_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_converter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_converter_plugin.la + +if HAVE_MMAL_AVCODEC -+libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_picture.c mmal_picture.h ++libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_cma.c mmal_picture.c mmal_picture.h mmal_cma.h mmal_piccpy_neon.S +libmmal_avcodec_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_avcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_avcodec_plugin_la_LIBADD = $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBS_mmal) @@ -499,7 +500,7 @@ + --- a/modules/hw/mmal/codec.c +++ b/modules/hw/mmal/codec.c -@@ -26,10 +26,12 @@ +@@ -26,267 +26,396 @@ #include "config.h" #endif @@ -512,8 +513,8 @@ +#include <vlc_filter.h> #include <vlc_threads.h> - #include <bcm_host.h> -@@ -37,256 +39,383 @@ +-#include <bcm_host.h> + #include <interface/mmal/mmal.h> #include <interface/mmal/util/mmal_util.h> #include <interface/mmal/util/mmal_default_components.h> @@ -526,22 +527,23 @@ +#include "blend_rgba_neon.h" + +#define TRACE_ALL 0 ++ ++#define OPT_TO_FROM_ZC 0 + /* * This seems to be a bit high, but reducing it causes instabilities */ --#define NUM_EXTRA_BUFFERS 5 -+#define NUM_EXTRA_BUFFERS 3 -+//#define NUM_EXTRA_BUFFERS 6 + #define NUM_EXTRA_BUFFERS 5 +//#define NUM_EXTRA_BUFFERS 10 #define NUM_DECODER_BUFFER_HEADERS 30 - #define MIN_NUM_BUFFERS_IN_TRANSIT 2 - +-#define MIN_NUM_BUFFERS_IN_TRANSIT 2 ++#define CONVERTER_BUFFERS 4 // Buffers on the output of the converter ++ +#define MMAL_SLICE_HEIGHT 16 +#define MMAL_ALIGN_W 32 +#define MMAL_ALIGN_H 16 -+ + #define MMAL_OPAQUE_NAME "mmal-opaque" #define MMAL_OPAQUE_TEXT N_("Decode frames directly into RPI VideoCore instead of host memory.") #define MMAL_OPAQUE_LONGTEXT N_("Decode frames directly into RPI VideoCore instead of host memory. This option must only be used with the MMAL video output plugin.") @@ -884,7 +886,7 @@ - ret = VLC_EGENERIC; - goto out; - } -+ if ((pic->context = hw_mmal_gen_context(MMAL_ENCODING_OPAQUE, buf, dec_sys->ppr)) == NULL) ++ if ((pic->context = hw_mmal_gen_context(buf, dec_sys->ppr)) == NULL) + goto fail2; - sys->input_pool = mmal_pool_create(sys->input->buffer_num, 0); @@ -1199,7 +1201,7 @@ - ret = VLC_EGENERIC; - goto err; - } - +- - if (!sys->opaque) - buffer->data = picture->p[0].p_pixels; - } else { @@ -1213,7 +1215,7 @@ - } - buffer->user_data = picture; - buffer->cmd = 0; -- + - status = mmal_port_send_buffer(sys->output, buffer); + status = mmal_port_format_commit(sys->input); if (status != MMAL_SUCCESS) { @@ -1243,11 +1245,6 @@ +static MMAL_STATUS_T decoder_send_extradata(decoder_t * const dec, decoder_sys_t *const sys) { - decoder_sys_t *sys = dec->p_sys; -- -- unsigned max_buffers_in_transit = 0; -- int buffers_available = 0; -- int buffers_to_send = 0; -- int i; + if (dec->fmt_in.i_codec == VLC_CODEC_H264 && + dec->fmt_in.i_extra > 0) + { @@ -1262,6 +1259,11 @@ + buf->data = dec->fmt_in.p_extra; + buf->flags = MMAL_BUFFER_HEADER_FLAG_CONFIG; +- unsigned max_buffers_in_transit = 0; +- int buffers_available = 0; +- int buffers_to_send = 0; +- int i; +- - if (sys->output_pool) { - max_buffers_in_transit = __MAX(sys->output_pool->headers_num, - MIN_NUM_BUFFERS_IN_TRANSIT); @@ -1277,10 +1279,10 @@ + } } - buffers_to_send = max_buffers_in_transit - atomic_load(&sys->output_in_transit); -- + - if (buffers_to_send > buffers_available) - buffers_to_send = buffers_available; - +- -#ifndef NDEBUG - msg_Dbg(dec, "Send %d buffers to output port (available: %d, " - "in_transit: %d, buffer_num: %d)", @@ -1428,7 +1430,7 @@ len = block->i_buffer; if (len > buffer->alloc_size) -@@ -590,89 +685,1549 @@ +@@ -590,89 +685,1733 @@ } buffer->flags = flags; @@ -1501,8 +1503,6 @@ + + vlc_mutex_destroy(&sys->pic_lock); + free(sys); -+ -+ bcm_host_deinit(); +} + +static int OpenDecoder(decoder_t *dec) @@ -1512,7 +1512,7 @@ MMAL_STATUS_T status; + const MMAL_FOURCC_T in_fcc = vlc_to_mmal_es_fourcc(dec->fmt_in.i_codec); + -+#if TRACE_ALL ++#if TRACE_ALL || 1 + { + char buf1[5], buf2[5], buf2a[5]; + char buf3[5], buf4[5]; @@ -1538,8 +1538,6 @@ + dec->p_sys = sys; + vlc_mutex_init(&sys->pic_lock); + -+ bcm_host_init(); -+ + if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { + msg_Err(dec, "VCSM init failed"); + goto fail; @@ -1702,25 +1700,23 @@ + MMAL_POOL_T *out_pool; // Free output buffers + MMAL_POOL_T *in_pool; // Input pool to get BH for replication + -+ cma_pool_fixed_t * cma_out_pool; ++ cma_buf_pool_t * cma_in_pool; ++ cma_buf_pool_t * cma_out_pool; + + subpic_reg_stash_t subs[SUBS_MAX]; + + pic_fifo_t ret_pics; + ++ unsigned int pic_n; + vlc_sem_t sem; + vlc_mutex_t lock; + -+ bool b_top_field_first; -+ bool b_progressive; -+ + MMAL_STATUS_T err_stream; -+ int in_count; + ++ bool needs_copy_in; + bool is_cma; + bool is_sliced; + bool out_fmt_set; -+ bool latency_set; + const char * component_name; + MMAL_PORT_BH_CB_T in_port_cb_fn; + MMAL_PORT_BH_CB_T out_port_cb_fn; @@ -1734,6 +1730,7 @@ + unsigned int line; // Lines filled + } slice; + ++ vcsm_init_type_t vcsm_init_type; +} filter_sys_t; + + @@ -1747,7 +1744,7 @@ + es_fmt->encoding_variant = 0; + + // Fill in crop etc. -+ vlc_to_mmal_video_fmt(es_fmt, &pic->format); ++ hw_mmal_vlc_fmt_to_mmal_fmt(es_fmt, &pic->format); + // Override width / height with strides if appropriate + if (bpp != 0) { + v_fmt->width = pic->p[0].i_pitch / bpp; @@ -1777,7 +1774,7 @@ + if (sys->is_cma) + { + if (sys->cma_out_pool == NULL && -+ (sys->cma_out_pool = cma_buf_pool_new()) == NULL) ++ (sys->cma_out_pool = cma_buf_pool_new(CONVERTER_BUFFERS, CONVERTER_BUFFERS, true, "mmal_resizer")) == NULL) + { + msg_Err(p_filter, "Failed to alloc cma buf pool"); + return MMAL_ENOMEM; @@ -1859,10 +1856,7 @@ } -static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -+static const uint8_t shift_00[] = {0,0,0,0}; -+static const uint8_t shift_01[] = {0,1,1,1}; -+ -+static int cma_pic_set_data(filter_t * const p_filter, picture_t * const pic, const MMAL_BUFFER_HEADER_T * const buf) ++static void conv_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) { - decoder_t *dec = (decoder_t *)port->userdata; - decoder_sys_t *sys = dec->p_sys; @@ -1890,58 +1884,11 @@ - vlc_sem_post(&sys->sem); - } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { - fmt = mmal_event_format_changed_get(buffer); -+ filter_sys_t *const sys = p_filter->p_sys; -+ const MMAL_VIDEO_FORMAT_T * const mm_fmt = &sys->output->format->es->video; -+ const MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T *const buf_vid = &buf->type->video; -+ -+ uint8_t * const data = cma_buf_pic_addr(pic); -+ if (data == NULL) { -+ return VLC_ENOMEM; -+ } -+ -+ const uint8_t * ws = shift_00; -+ const uint8_t * hs = shift_00; -+ int pb = 1; -+ -+ switch (p_filter->fmt_out.video.i_chroma) -+ { -+ case VLC_CODEC_MMAL_ZC_RGB32: -+ pb = 4; -+ break; ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ filter_sys_t * const sys = p_filter->p_sys; - format = mmal_format_alloc(); - mmal_format_full_copy(format, fmt->format); -+ case VLC_CODEC_MMAL_ZC_I420: -+ case VLC_CODEC_MMAL_ZC_SAND8: -+ hs = shift_01; -+ break; - -- if (sys->opaque) -- format->encoding = MMAL_ENCODING_OPAQUE; -+ default: -+ msg_Err(p_filter, "%s: Unexpected format", __func__); -+ return VLC_EGENERIC; -+ } -+ -+ pic->i_planes = buf_vid->planes; -+ for (unsigned int i = 0; i != buf_vid->planes; ++i) { -+ pic->p[i] = (plane_t){ -+ .p_pixels = data + buf_vid->offset[i], -+ .i_lines = mm_fmt->height >> hs[i], -+ .i_pitch = buf_vid->pitch[i], -+ .i_pixel_pitch = pb, -+ .i_visible_lines = mm_fmt->crop.height >> hs[i], -+ .i_visible_pitch = mm_fmt->crop.width >> ws[i] -+ }; -+ } -+ return VLC_SUCCESS; -+} -+ -+static void conv_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) -+{ -+ filter_t * const p_filter = (filter_t *)port->userdata; -+ filter_sys_t * const sys = p_filter->p_sys; -+ +#if TRACE_ALL + msg_Dbg(p_filter, "<<< %s: cmd=%d, flags=%#x, pic=%p, data=%p, len=%d/%d, pts=%lld/%lld", __func__, + buf->cmd, buf->flags, buf->user_data, buf->data, buf->length, buf->alloc_size, @@ -1949,7 +1896,9 @@ +#endif + if (buf->cmd == 0) { + picture_t * const pic = (picture_t *)buf->user_data; -+ + +- if (sys->opaque) +- format->encoding = MMAL_ENCODING_OPAQUE; + if (pic == NULL) { + msg_Err(p_filter, "%s: Buffer has no attached picture", __func__); + } @@ -1958,14 +1907,14 @@ +#if TRACE_ALL + msg_Dbg(p_filter, "%s: Buffer has no data", __func__); +#endif -+ picture_Release(pic); + } + else + { + buf_to_pic_copy_props(pic, buf); + ++ // Set pic data pointers from buf aux info now it has it + if (sys->is_cma) { -+ if (cma_pic_set_data(p_filter, pic, buf) != VLC_SUCCESS) ++ if (cma_pic_set_data(pic, sys->output->format, buf) != VLC_SUCCESS) + msg_Err(p_filter, "Failed to set data"); + } + @@ -1975,11 +1924,12 @@ + draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 32, 0, 32, 32, 0xff00ff00); + draw_square(pic->p[0].p_pixels, pic->p[0].i_pitch / 4, 64, 0, 32, 32, 0xff0000ff); +#endif ++ ++ buf->user_data = NULL; // Responsability for this pic no longer with buffer + conv_out_q_pic(sys, pic); + } + } + -+ buf->user_data = NULL; // Zap here to make sure we can't reuse later + mmal_buffer_header_release(buf); +} + @@ -2065,8 +2015,7 @@ + } + } + } - -- sys->output_format = format; ++ + // Put back + buf->user_data = NULL; // Zap here to make sure we can't reuse later + mmal_buffer_header_reset(buf); @@ -2104,7 +2053,7 @@ + if (sys->output != NULL && sys->output->is_enabled) + mmal_port_disable(sys->output); + -+ cma_buf_pool_deletez(&sys->cma_out_pool); ++// cma_buf_pool_deletez(&sys->cma_out_pool); + + // Free up anything we may have already lying around + // Don't need lock as the above disables should have prevented anything @@ -2127,12 +2076,9 @@ + pic_fifo_release_all(&sys->ret_pics); + + // Reset sem values - easiest & most reliable way is to just kill & re-init -+ // This will also dig us out of situations where we have got out of sync somehow + vlc_sem_destroy(&sys->sem); -+ vlc_sem_init(&sys->sem, CONV_MAX_LATENCY); -+ -+ // No buffers in either port now -+ sys->in_count = 0; ++ vlc_sem_init(&sys->sem, 0); ++ sys->pic_n = 0; + + // Reset error status + sys->err_stream = MMAL_SUCCESS; @@ -2142,11 +2088,6 @@ +#endif +} + -+static void conv_flush_passthrough(filter_t * p_filter) -+{ -+ VLC_UNUSED(p_filter); -+} -+ +static void conv_stash_fixup(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const p_pic) +{ + conv_frame_stash_t * const stash = sys->stash + (p_pic->date & 0xf); @@ -2165,6 +2106,21 @@ + } +} + ++// Output buffers may contain a pic ref on error or flush ++// Free it ++static MMAL_BOOL_T out_buffer_pre_release_cb(MMAL_BUFFER_HEADER_T *header, void *userdata) ++{ ++ VLC_UNUSED(userdata); ++ ++ picture_t * const pic = header->user_data; ++ header->user_data = NULL; ++ ++ if (pic != NULL) ++ picture_Release(pic); ++ ++ return MMAL_FALSE; ++} ++ +static MMAL_STATUS_T conv_set_output(filter_t * const p_filter, filter_sys_t * const sys, picture_t * const pic) +{ + MMAL_STATUS_T status; @@ -2173,11 +2129,11 @@ + sys->output->format->type = MMAL_ES_TYPE_VIDEO; + sys->output->format->encoding = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video); + sys->output->format->encoding_variant = 0; -+ vlc_to_mmal_video_fmt(sys->output->format, &p_filter->fmt_out.video); ++ hw_mmal_vlc_fmt_to_mmal_fmt(sys->output->format, &p_filter->fmt_out.video); + -+ // Override default format width/height if we have a pic we need to match + if (pic != NULL) + { ++ // Override default format width/height if we have a pic we need to match + if ((status = pic_to_format(sys->output->format, pic)) != MMAL_SUCCESS) + { + char cbuf[5]; @@ -2189,6 +2145,11 @@ + msg_Dbg(p_filter, "%s: %dx%d [(0,0) %dx%d]", __func__, fmt->width, fmt->height, fmt->crop.width, fmt->crop.height); + } + ++ if (sys->is_sliced) { ++ // Override height for slice ++ sys->output->format->es->video.height = MMAL_SLICE_HEIGHT; ++ } ++ + mmal_log_dump_format(sys->output->format); + + status = mmal_port_format_commit(sys->output); @@ -2200,8 +2161,7 @@ + + sys->output->buffer_num = __MAX(sys->is_sliced ? 16 : 2, sys->output->buffer_num_recommended); + sys->output->buffer_size = sys->output->buffer_size_recommended; - -- mmal_buffer_header_release(buffer); ++ + if ((status = conv_enable_out(p_filter, sys)) != MMAL_SUCCESS) + return status; + @@ -2215,14 +2175,12 @@ + MMAL_STATUS_T err; + const uint64_t frame_seq = ++sys->frame_seq; + conv_frame_stash_t * const stash = sys->stash + (frame_seq & 0xf); ++ MMAL_BUFFER_HEADER_T * out_buf = NULL; + +#if TRACE_ALL -+ msg_Dbg(p_filter, "<<< %s", __func__); -+#endif -+#if 0 + { + char dbuf0[5], dbuf1[5]; -+ msg_Dbg(p_filter, "%s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] sar:%d/%d", __func__, ++ msg_Dbg(p_filter, "<<< %s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] sar:%d/%d", __func__, + str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, + p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, + p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, @@ -2238,8 +2196,19 @@ + goto stream_fail; + } + ++ // Check pic fmt corresponds to what we have set up ++ // ??? ISP may require flush (disable) but actually seems quite happy ++ // without ++ if (hw_mmal_vlc_pic_to_mmal_fmt_update(sys->input->format, p_pic)) ++ { ++ msg_Dbg(p_filter, "Reset input port format"); ++ mmal_port_format_commit(sys->input); ++ } ++ + if (p_pic->context == NULL) { -+ msg_Dbg(p_filter, "%s: No context", __func__); ++ // Can't have stashed subpics if not one of our pics ++ if (!sys->needs_copy_in) ++ msg_Dbg(p_filter, "%s: No context", __func__); + } + else if (sys->resizer_type == FILTER_RESIZER_HVS) + { @@ -2276,6 +2245,8 @@ + // so no need to worry about actual pic dimensions here + if ((err = conv_set_output(p_filter, sys, NULL)) != MMAL_SUCCESS) + goto fail; ++ ++ sys->out_pool = mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size); + } + else { + picture_t *pic = filter_NewPicture(p_filter); @@ -2283,11 +2254,9 @@ + picture_Release(pic); + if (err != MMAL_SUCCESS) + goto fail; -+ } + -+ sys->out_pool = sys->is_sliced ? -+ mmal_port_pool_create(sys->output, sys->output->buffer_num, sys->output->buffer_size) : -+ mmal_pool_create(sys->output->buffer_num, 0); ++ sys->out_pool = mmal_pool_create(sys->output->buffer_num, 0); ++ } + + if (sys->out_pool == NULL) { + msg_Err(p_filter, "Failed to create output pool"); @@ -2300,9 +2269,10 @@ + (err = conv_enable_in(p_filter, sys)) != MMAL_SUCCESS) + goto fail; + -+ // If ZC then we need to allocate the out pic before we stuff the input -+ if (sys->is_sliced) { -+ MMAL_BUFFER_HEADER_T * out_buf; ++ // We attach pic to buf before stuffing the output port ++ // We could attach the pic on output for cma, but it is a lot easier to keep ++ // the code common. ++ { + picture_t * const out_pic = filter_NewPicture(p_filter); + + if (out_pic == NULL) @@ -2311,88 +2281,71 @@ + goto fail; + } + -+ vlc_mutex_lock(&sys->lock); -+ pic_fifo_put(&sys->slice.pics, out_pic); -+ vlc_mutex_unlock(&sys->lock); -+ -+ // Poke any returned pic buffers into output -+ // In general this should only happen immediately after enable -+ while ((out_buf = mmal_queue_get(sys->out_pool->queue)) != NULL) -+ mmal_port_send_buffer(sys->output, out_buf); -+ -+ ++sys->in_count; -+ } -+ -+ // Stuff into input -+ // We assume the BH is already set up with values reflecting pic date etc. -+ { -+ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); -+#if TRACE_ALL -+ msg_Dbg(p_filter, "In buf send: pic=%p, buf=%p, user=%p, pts=%lld/%lld", -+ p_pic, pic_buf, pic_buf->user_data, (long long)frame_seq, (long long)p_pic->date); -+#endif -+ if (pic_buf == NULL) { -+ msg_Err(p_filter, "Pic has no attached buffer"); -+ goto fail; -+ } ++ out_pic->format.i_sar_den = p_filter->fmt_out.video.i_sar_den; ++ out_pic->format.i_sar_num = p_filter->fmt_out.video.i_sar_num; + -+ stash->pts = p_pic->date; -+ if ((err = port_send_replicated(sys->input, sys->in_pool, pic_buf, frame_seq)) != MMAL_SUCCESS) -+ { -+ msg_Err(p_filter, "Send buffer to input failed"); -+ goto fail; ++ if (sys->is_sliced) { ++ vlc_mutex_lock(&sys->lock); ++ pic_fifo_put(&sys->slice.pics, out_pic); ++ vlc_mutex_unlock(&sys->lock); ++ ++ // Poke any returned pic buffers into output ++ // In general this should only happen immediately after enable ++ while ((out_buf = mmal_queue_get(sys->out_pool->queue)) != NULL) ++ mmal_port_send_buffer(sys->output, out_buf); + } -+ -+ picture_Release(p_pic); -+ p_pic = NULL; -+ --sys->in_count; -+ } -+ -+ if (!sys->is_sliced) { -+ MMAL_BUFFER_HEADER_T * out_buf; -+ -+ while ((out_buf = sys->in_count < 0 ? -+ mmal_queue_wait(sys->out_pool->queue) : mmal_queue_get(sys->out_pool->queue)) != NULL) ++ else + { -+ picture_t * const out_pic = filter_NewPicture(p_filter); -+ -+ if (out_pic == NULL) { -+ msg_Warn(p_filter, "Failed to alloc new filter output pic"); -+ mmal_buffer_header_release(out_buf); -+ break; ++ // 1 in - 1 out ++ if ((out_buf = mmal_queue_wait(sys->out_pool->queue)) == NULL) ++ { ++ msg_Err(p_filter, "Failed to get output buffer"); ++ picture_Release(out_pic); ++ goto fail; + } ++ mmal_buffer_header_reset(out_buf); ++ ++ // Attach out_pic to the buffer & ensure it is freed when the buffer is released ++ // On a good send callback the pic will be extracted to avoid this ++ out_buf->user_data = out_pic; ++ mmal_buffer_header_pre_release_cb_set(out_buf, out_buffer_pre_release_cb, NULL); + +#if 0 -+ char dbuf0[5]; -+ msg_Dbg(p_filter, "out_pic %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", -+ str_fourcc(dbuf0, out_pic->format.i_chroma), -+ out_pic->format.i_width, out_pic->format.i_height, -+ out_pic->format.i_x_offset, out_pic->format.i_y_offset, -+ out_pic->format.i_visible_width, out_pic->format.i_visible_height, -+ out_pic->format.i_sar_num, out_pic->format.i_sar_den); ++ { ++ char dbuf0[5]; ++ msg_Dbg(p_filter, "out_pic %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", ++ str_fourcc(dbuf0, out_pic->format.i_chroma), ++ out_pic->format.i_width, out_pic->format.i_height, ++ out_pic->format.i_x_offset, out_pic->format.i_y_offset, ++ out_pic->format.i_visible_width, out_pic->format.i_visible_height, ++ out_pic->format.i_sar_num, out_pic->format.i_sar_den); ++ } +#endif + -+ mmal_buffer_header_reset(out_buf); -+ out_buf->user_data = out_pic; -+ + if (sys->is_cma) { + int rv; -+ if ((rv = cma_buf_pic_attach(sys->cma_out_pool, out_pic, sys->output->buffer_size)) != VLC_SUCCESS) -+ { ++ ++ cma_buf_t * const cb = cma_buf_pool_alloc_buf(sys->cma_out_pool, sys->output->buffer_size); ++ if (cb == NULL) { + char dbuf0[5]; -+ msg_Err(p_filter, "Failed to attach CMA to pic: fmt=%s err=%d", ++ msg_Err(p_filter, "Failed to alloc CMA buf: fmt=%s, size=%d", + str_fourcc(dbuf0, out_pic->format.i_chroma), -+ rv); ++ sys->output->buffer_size); + goto fail; + } -+ const unsigned int vc_h = cma_buf_pic_vc_handle(out_pic); -+ if (vc_h == 0) ++ const unsigned int vc_h = cma_buf_vc_handle(cb); // Cannot coerce without going via variable ++ out_buf->data = (uint8_t *)vc_h; ++ out_buf->alloc_size = sys->output->buffer_size; ++ ++ if ((rv = cma_buf_pic_attach(cb, out_pic)) != VLC_SUCCESS) + { -+ msg_Err(p_filter, "Pic has no vc handle"); ++ char dbuf0[5]; ++ msg_Err(p_filter, "Failed to attach CMA to pic: fmt=%s err=%d", ++ str_fourcc(dbuf0, out_pic->format.i_chroma), ++ rv); ++ cma_buf_unref(cb); + goto fail; + } -+ out_buf->data = (uint8_t *)vc_h; -+ out_buf->alloc_size = sys->output->buffer_size; + } + else { + out_buf->data = out_pic->p[0].p_pixels; @@ -2409,63 +2362,66 @@ + if ((err = mmal_port_send_buffer(sys->output, out_buf)) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Send buffer to output failed"); -+ mmal_buffer_header_release(out_buf); -+ break; ++ goto fail; + } -+ -+ ++sys->in_count; ++ out_buf = NULL; + } + } + -+ if (sys->in_count < 0) ++ ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ stash->pts = p_pic->date; + { -+ msg_Err(p_filter, "Buffer count somehow negative"); -+ goto fail; -+ } ++ MMAL_BUFFER_HEADER_T *const pic_buf = sys->needs_copy_in ? ++ hw_mmal_pic_buf_copied(p_pic, sys->in_pool, sys->input, sys->cma_in_pool) : ++ hw_mmal_pic_buf_replicated(p_pic, sys->in_pool); + -+ // Avoid being more than 1 pic behind -+ vlc_sem_wait(&sys->sem); ++ // Whether or not we extracted the pic_buf we are done with the picture ++ picture_Release(p_pic); ++ p_pic = NULL; + -+ // Set sem for delayed scale if not already set -+ if (!sys->latency_set) { -+ unsigned int i; -+ sys->latency_set = true; -+ for (i = 0; i != CONV_MAX_LATENCY; ++i) { -+ vlc_sem_post(&sys->sem); ++ if (pic_buf == NULL) { ++ msg_Err(p_filter, "Pic has no attached buffer"); ++ goto fail; ++ } ++ ++ pic_buf->pts = frame_seq; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "In buf send: pic=%p, data=%p, user=%p, flags=%#x, len=%d/%d/%d, pts=%lld", ++ p_pic, pic_buf->data, pic_buf->user_data, pic_buf->flags, ++ pic_buf->length, pic_buf->alloc_size, sys->input->buffer_size, (long long)pic_buf->pts); ++#endif ++ ++ if ((err = mmal_port_send_buffer(sys->input, pic_buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to input failed"); ++ mmal_buffer_header_release(pic_buf); ++ goto fail; + } + } + -+ // Return all pending buffers ++ // We have a 1 pic latency for everything except the 1st pic which we ++ // wait for. ++ // This means we get a single static pic out ++ if (sys->pic_n++ == 1) { ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: Pic1=NULL", __func__); ++#endif ++ return NULL; ++ } ++ vlc_sem_wait(&sys->sem); ++ ++ // Return a single pending buffer + vlc_mutex_lock(&sys->lock); -+ ret_pics = pic_fifo_get_all(&sys->ret_pics); ++ ret_pics = pic_fifo_get(&sys->ret_pics); + vlc_mutex_unlock(&sys->lock); + + if (sys->err_stream != MMAL_SUCCESS) + goto stream_fail; + -+ // Sink as many sem posts as we have pics -+ // (shouldn't normally wait, but there is a small race) -+ if (ret_pics != NULL) -+ { -+ picture_t *next_pic = ret_pics->p_next; -+ -+ conv_stash_fixup(p_filter, sys, ret_pics); -+#if 0 -+ char dbuf0[5]; -+ -+ msg_Dbg(p_filter, "pic_out %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", -+ str_fourcc(dbuf0, ret_pics->format.i_chroma), -+ ret_pics->format.i_width, ret_pics->format.i_height, -+ ret_pics->format.i_x_offset, ret_pics->format.i_y_offset, -+ ret_pics->format.i_visible_width, ret_pics->format.i_visible_height, -+ ret_pics->format.i_sar_num, ret_pics->format.i_sar_den); -+#endif -+ while (next_pic != NULL) { -+ vlc_sem_wait(&sys->sem); -+ conv_stash_fixup(p_filter, sys, next_pic); -+ next_pic = next_pic->p_next; -+ } -+ } ++ conv_stash_fixup(p_filter, sys, ret_pics); + +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); @@ -2476,21 +2432,18 @@ +stream_fail: + msg_Err(p_filter, "MMAL error reported by callback"); +fail: ++#if TRACE_ALL ++ msg_Err(p_filter, ">>> %s: FAIL", __func__); ++ picture_Release(ret_pics); ++#endif ++ if (out_buf != NULL) ++ mmal_buffer_header_release(out_buf); + if (p_pic != NULL) + picture_Release(p_pic); + conv_flush(p_filter); + return NULL; +} + -+static picture_t *conv_filter_passthrough(filter_t *p_filter, picture_t *p_pic) -+{ -+ VLC_UNUSED(p_filter); -+#if TRACE_ALL -+ msg_Dbg(p_filter, "<<< %s", __func__); -+#endif -+ return p_pic; -+} -+ +static void CloseConverter(vlc_object_t * obj) +{ + filter_t * const p_filter = (filter_t *)obj; @@ -2507,6 +2460,9 @@ + // Disables input & output ports + conv_flush(p_filter); + ++ cma_buf_pool_deletez(&sys->cma_in_pool); ++ cma_buf_pool_deletez(&sys->cma_out_pool); ++ + if (sys->component && sys->component->control->is_enabled) + mmal_port_disable(sys->component->control); + @@ -2534,60 +2490,53 @@ + if (sys->component) + mmal_component_release(sys->component); + ++ cma_vcsm_exit(sys->vcsm_init_type); ++ + vlc_sem_destroy(&sys->sem); + vlc_mutex_destroy(&sys->lock); + ++ p_filter->p_sys = NULL; + free(sys); +} + + -+static int open_converter_passthrough(filter_t * const p_filter) ++static inline MMAL_FOURCC_T filter_enc_in(const video_format_t * const fmt) +{ -+ { -+ char dbuf0[5], dbuf1[5]; -+ msg_Dbg(p_filter, "%s: (%s) %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] rgb:%#x:%#x:%#x sar:%d/%d", __func__, -+ "passthrough", -+ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), -+ p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, -+ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, -+ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, -+ p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, -+ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), -+ p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, -+ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, -+ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, -+ p_filter->fmt_out.video.i_rmask, p_filter->fmt_out.video.i_gmask, p_filter->fmt_out.video.i_bmask, -+ p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den); -+ } ++ if (hw_mmal_chroma_is_mmal(fmt->i_chroma)) ++ return vlc_to_mmal_video_fourcc(fmt); + ++ if (fmt->i_chroma == VLC_CODEC_I420 || ++ fmt->i_chroma == VLC_CODEC_I420_10L) ++ return MMAL_ENCODING_I420; + -+ p_filter->pf_video_filter = conv_filter_passthrough; -+ p_filter->pf_flush = conv_flush_passthrough; -+ return VLC_SUCCESS; ++ return 0; ++} + +- sys->output_format = format; ++static inline MMAL_FOURCC_T filter_enc_out(const video_format_t * const fmt) ++{ ++ const MMAL_FOURCC_T mmes = vlc_to_mmal_video_fourcc(fmt); ++ // Can only copy out single plane stuff currently - this could be fixed! ++ return hw_mmal_chroma_is_mmal(fmt->i_chroma) || mmes != MMAL_ENCODING_I420 ? mmes : 0; +} + ++ +static int OpenConverter(vlc_object_t * obj) +{ + filter_t * const p_filter = (filter_t *)obj; + int ret = VLC_EGENERIC; + filter_sys_t *sys; + MMAL_STATUS_T status; -+ MMAL_FOURCC_T enc_out; -+ const MMAL_FOURCC_T enc_in = vlc_to_mmal_video_fourcc(&p_filter->fmt_in.video); ++ MMAL_FOURCC_T enc_out = filter_enc_out(&p_filter->fmt_out.video); ++ const MMAL_FOURCC_T enc_in = filter_enc_in(&p_filter->fmt_in.video); + bool use_resizer; + bool use_isp; + int gpu_mem; + -+ if ((enc_in != MMAL_ENCODING_OPAQUE && -+ enc_in != MMAL_ENCODING_YUVUV128 && -+ enc_in != MMAL_ENCODING_YUVUV64_10) || -+ (enc_out = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video)) == 0) ++ // At least in principle we should deal with any mmal format as input ++ if (enc_in == 0 || enc_out == 0) + return VLC_EGENERIC; + -+ if (enc_in == enc_out) { -+ return open_converter_passthrough(p_filter); -+ } -+ + use_resizer = var_InheritBool(p_filter, MMAL_RESIZE_NAME); + use_isp = var_InheritBool(p_filter, MMAL_ISP_NAME); + @@ -2606,6 +2555,11 @@ + if (enc_out == MMAL_ENCODING_I420) { + use_isp = true; + } ++ // Only HVS can deal with SAND30 ++ if (enc_in == MMAL_ENCODING_YUV10_COL) { ++ if (use_isp || use_resizer) ++ return VLC_EGENERIC; ++ } + + + if (use_resizer) { @@ -2645,7 +2599,8 @@ + goto fail; + } + p_filter->p_sys = sys; -+ + +- mmal_buffer_header_release(buffer); + // Init stuff the we destroy unconditionaly in Close first + vlc_mutex_init(&sys->lock); + vlc_sem_init(&sys->sem, 0); @@ -2653,8 +2608,14 @@ + pic_fifo_init(&sys->ret_pics); + pic_fifo_init(&sys->slice.pics); + ++ sys->needs_copy_in = !hw_mmal_chroma_is_mmal(p_filter->fmt_in.video.i_chroma); + sys->in_port_cb_fn = conv_input_port_cb; + ++ if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { ++ msg_Err(p_filter, "VCSM init failed"); ++ goto fail; ++ } ++ + if (use_resizer) { + sys->resizer_type = FILTER_RESIZER_RESIZER; + sys->is_sliced = true; @@ -2696,13 +2657,20 @@ + msg_Err(p_filter, "Failed to enable control port %s (status=%"PRIx32" %s)", + sys->component->control->name, status, mmal_status_to_string(status)); + goto fail; - } ++ } ++ ++ if (sys->needs_copy_in && ++ (sys->cma_in_pool = cma_buf_pool_new(2, 2, true, "conv-copy-in")) == NULL) ++ { ++ msg_Err(p_filter, "Failed to allocate input CMA pool"); ++ goto fail; ++ } + + sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)p_filter; + sys->input->format->type = MMAL_ES_TYPE_VIDEO; + sys->input->format->encoding = enc_in; + sys->input->format->encoding_variant = MMAL_ENCODING_I420; -+ vlc_to_mmal_video_fmt(sys->input->format, &p_filter->fmt_in.video); ++ hw_mmal_vlc_fmt_to_mmal_fmt(sys->input->format, &p_filter->fmt_in.video); + port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, 1); + + mmal_log_dump_format(sys->input->format); @@ -2738,7 +2706,7 @@ + { + unsigned int i; + for (i = 0; i != SUBS_MAX; ++i) { -+ if (hw_mmal_subpic_open(VLC_OBJECT(p_filter), sys->subs + i, sys->component->input[i + 1], i + 1) != MMAL_SUCCESS) ++ if (hw_mmal_subpic_open(VLC_OBJECT(p_filter), sys->subs + i, sys->component->input[i + 1], -1, i + 1) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Failed to open subpic %d", i); + goto fail; @@ -2763,18 +2731,205 @@ + use_resizer = true; + msg_Warn(p_filter, "Lack of memory to use HVS/ISP: trying resizer"); + goto retry; -+ } + } + +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: FAIL: %d", __func__, ret); +#endif + return ret; + } ++ ++#if OPT_TO_FROM_ZC ++//---------------------------------------------------------------------------- ++// ++// Simple copy in to ZC ++ ++typedef struct to_zc_sys_s { ++ vcsm_init_type_t vcsm_init_type; ++ cma_buf_pool_t * cma_out_pool; ++} to_zc_sys_t; ++ ++ ++static size_t buf_alloc_size(const vlc_fourcc_t i_chroma, const unsigned int width, const unsigned int height) ++{ ++ const unsigned int pels = width * height; ++ ++ switch (i_chroma) ++ { ++ case VLC_CODEC_MMAL_ZC_RGB32: ++ return pels * 4; ++ case VLC_CODEC_MMAL_ZC_I420: ++ return pels * 3 / 2; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++ ++static picture_t * ++to_zc_filter(filter_t *p_filter, picture_t *in_pic) ++{ ++ to_zc_sys_t * const sys = (to_zc_sys_t *)p_filter->p_sys; ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++ ++ assert(p_filter->fmt_out.video.i_chroma == VLC_CODEC_MMAL_ZC_I420); ++ ++ picture_t * const out_pic = filter_NewPicture(p_filter); ++ if (out_pic == NULL) ++ goto fail0; ++ ++ MMAL_ES_SPECIFIC_FORMAT_T mm_vfmt = {.video={0}}; ++ MMAL_ES_FORMAT_T mm_esfmt = { ++ .encoding = vlc_to_mmal_video_fourcc(&p_filter->fmt_out.video), ++ .es = &mm_vfmt}; ++ ++ hw_mmal_vlc_fmt_to_mmal_fmt(&mm_esfmt, &p_filter->fmt_out.video); ++ ++ const size_t buf_alloc = buf_alloc_size(p_filter->fmt_out.video.i_chroma, ++ mm_vfmt.video.width, mm_vfmt.video.height); ++ if (buf_alloc == 0) ++ goto fail1; ++ cma_buf_t *const cb = cma_buf_pool_alloc_buf(sys->cma_out_pool, buf_alloc); ++ if (cb == NULL) ++ goto fail1; ++ ++ if (cma_buf_pic_attach(cb, out_pic) != VLC_SUCCESS) ++ goto fail2; ++ cma_pic_set_data(out_pic, &mm_esfmt, NULL); ++ ++ hw_mmal_copy_pic_to_buf(cma_buf_addr(cb), NULL, &mm_esfmt, in_pic); ++ ++ // Copy pic properties ++ out_pic->date = in_pic->date; ++ out_pic->b_force = in_pic->b_force; ++ out_pic->b_progressive = in_pic->b_progressive; ++ out_pic->b_top_field_first = in_pic->b_top_field_first; ++ out_pic->i_nb_fields = in_pic->i_nb_fields; ++ ++ picture_Release(in_pic); ++ ++ return out_pic; ++ ++fail2: ++ cma_buf_unref(cb); ++fail1: ++ picture_Release(out_pic); ++fail0: ++ picture_Release(in_pic); ++ return NULL; ++} ++ ++static void to_zc_flush(filter_t * p_filter) ++{ ++ VLC_UNUSED(p_filter); ++} ++ ++static void CloseConverterToZc(vlc_object_t * obj) ++{ ++ filter_t * const p_filter = (filter_t *)obj; ++ to_zc_sys_t * const sys = (to_zc_sys_t *)p_filter->p_sys; ++ ++ if (sys == NULL) ++ return; ++ ++ p_filter->p_sys = NULL; ++ ++ cma_buf_pool_deletez(&sys->cma_out_pool); ++ cma_vcsm_exit(sys->vcsm_init_type); ++ ++ free(sys); ++} ++ ++static bool to_zc_validate_fmt(const video_format_t * const f_in, const video_format_t * const f_out) ++{ ++ if (!((f_in->i_chroma == VLC_CODEC_I420 || f_in->i_chroma == VLC_CODEC_I420_10L) && ++ f_out->i_chroma == VLC_CODEC_MMAL_ZC_I420)) ++ { ++ return false; ++ } ++ if (f_in->i_height != f_out->i_height || ++ f_in->i_width != f_out->i_width) ++ { ++ return false; ++ } ++ ++ return true; ++} ++ ++static int OpenConverterToZc(vlc_object_t * obj) ++{ ++ int ret = VLC_EGENERIC; ++ filter_t * const p_filter = (filter_t *)obj; ++ ++ if (!to_zc_validate_fmt(&p_filter->fmt_in.video, &p_filter->fmt_out.video)) ++ goto fail; ++ ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(p_filter, "%s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d->%s,%dx%d [(%d,%d) %dx%d] rgb:%#x:%#x:%#x sar:%d/%d", __func__, ++ str_fourcc(dbuf0, p_filter->fmt_in.video.i_chroma), ++ p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, ++ p_filter->fmt_in.video.i_x_offset, p_filter->fmt_in.video.i_y_offset, ++ p_filter->fmt_in.video.i_visible_width, p_filter->fmt_in.video.i_visible_height, ++ p_filter->fmt_in.video.i_sar_num, p_filter->fmt_in.video.i_sar_den, ++ str_fourcc(dbuf1, p_filter->fmt_out.video.i_chroma), ++ p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height, ++ p_filter->fmt_out.video.i_x_offset, p_filter->fmt_out.video.i_y_offset, ++ p_filter->fmt_out.video.i_visible_width, p_filter->fmt_out.video.i_visible_height, ++ p_filter->fmt_out.video.i_rmask, p_filter->fmt_out.video.i_gmask, p_filter->fmt_out.video.i_bmask, ++ p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den); ++ } ++ ++ to_zc_sys_t * const sys = calloc(1, sizeof(*sys)); ++ if (!sys) { ++ ret = VLC_ENOMEM; ++ goto fail; ++ } ++ p_filter->p_sys = (filter_sys_t *)sys; ++ ++ if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { ++ msg_Err(p_filter, "VCSM init failed"); ++ goto fail; ++ } ++ ++ if ((sys->cma_out_pool = cma_buf_pool_new(5, 5, true, "conv-to-zc")) == NULL) ++ { ++ msg_Err(p_filter, "Failed to allocate input CMA pool"); ++ goto fail; ++ } ++ ++ p_filter->pf_video_filter = to_zc_filter; ++ p_filter->pf_flush = to_zc_flush; ++ return VLC_SUCCESS; ++ ++fail: ++ CloseConverterToZc(obj); ++ return ret; ++} ++ ++//---------------------------------------------------------------------------- ++// ++// Simple "copy" from ZC ++ ++static void CloseConverterFromZc(vlc_object_t * obj) ++{ ++ VLC_UNUSED(obj); +} + ++static int OpenConverterFromZc(vlc_object_t * obj) ++{ ++ return VLC_EGENERIC; ++} ++#endif ++//---------------------------------------------------------------------------- + +typedef struct blend_sys_s { + vzc_pool_ctl_t * vzc; + const picture_t * last_dst; // Not a ref, just a hint that we have a new pic ++ vcsm_init_type_t vcsm_init_type; +} blend_sys_t; + +static void FilterBlendMmal(filter_t *p_filter, @@ -2821,14 +2976,26 @@ + hw_mmal_vzc_pool_flush(sys->vzc); +} + ++static void CloseBlendMmal(vlc_object_t *object) ++{ ++ filter_t * const p_filter = (filter_t *)object; ++ blend_sys_t * const sys = (blend_sys_t *)p_filter->p_sys; ++ ++ if (sys != NULL) { ++ p_filter->p_sys = NULL; ++ ++ hw_mmal_vzc_pool_release(sys->vzc); ++ cma_vcsm_exit(sys->vcsm_init_type); ++ free(sys); ++ } ++} ++ +static int OpenBlendMmal(vlc_object_t *object) +{ + filter_t * const p_filter = (filter_t *)object; + const vlc_fourcc_t vfcc_dst = p_filter->fmt_out.video.i_chroma; + -+ if ((vfcc_dst != VLC_CODEC_MMAL_OPAQUE && -+ vfcc_dst != VLC_CODEC_MMAL_ZC_SAND8 && -+ vfcc_dst != VLC_CODEC_MMAL_ZC_SAND10) || ++ if (!hw_mmal_chroma_is_mmal(vfcc_dst) || + !hw_mmal_vzc_subpic_fmt_valid(&p_filter->fmt_in.video)) + { + return VLC_EGENERIC; @@ -2850,28 +3017,27 @@ + blend_sys_t * const sys = calloc(1, sizeof (*sys)); + if (sys == NULL) + return VLC_ENOMEM; -+ if ((sys->vzc = hw_mmal_vzc_pool_new()) == NULL) -+ { -+ free(sys); -+ return VLC_ENOMEM; -+ } ++ + p_filter->p_sys = (filter_sys_t *)sys; ++ ++ if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { ++ msg_Err(p_filter, "VCSM init failed"); ++ goto fail; ++ } ++ ++ if ((sys->vzc = hw_mmal_vzc_pool_new()) == NULL) ++ goto fail; + } + + p_filter->pf_video_blend = FilterBlendMmal; + p_filter->pf_flush = FlushBlendMmal; + + return VLC_SUCCESS; -+} + -+static void CloseBlendMmal(vlc_object_t *object) -+{ -+ filter_t * const p_filter = (filter_t *)object; -+ blend_sys_t * const sys = (blend_sys_t *)p_filter->p_sys; -+ -+ hw_mmal_vzc_pool_release(sys->vzc); -+ free(sys); - } ++fail: ++ CloseBlendMmal(VLC_OBJECT(p_filter)); ++ return VLC_ENOMEM; ++} + +// --------------------------------------------------------------------------- + @@ -3004,14 +3170,34 @@ + add_submodule() + set_category( CAT_VIDEO ) + set_subcategory( SUBCAT_VIDEO_VFILTER ) -+ set_shortname(N_("MMAL converterer")) -+ set_description(N_("MMAL conversion filter")) ++ set_shortname(N_("MMAL resizer")) ++ set_description(N_("MMAL resizing conversion filter")) + add_shortcut("mmal_converter") + set_capability( "video converter", 900 ) + add_bool(MMAL_RESIZE_NAME, /* default */ false, MMAL_RESIZE_TEXT, MMAL_RESIZE_LONGTEXT, /* advanced option */ false) + add_bool(MMAL_ISP_NAME, /* default */ false, MMAL_ISP_TEXT, MMAL_ISP_LONGTEXT, /* advanced option */ false) + set_callbacks(OpenConverter, CloseConverter) + ++#if OPT_TO_FROM_ZC ++ add_submodule() ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VFILTER ) ++ set_shortname(N_("MMAL to ZC")) ++ set_description(N_("MMAL conversion to ZC filter")) ++ add_shortcut("mmal_to_zc") ++ set_capability( "video converter", 901 ) ++ set_callbacks(OpenConverterToZc, CloseConverterToZc) ++ ++ add_submodule() ++ set_category( CAT_VIDEO ) ++ set_subcategory( SUBCAT_VIDEO_VFILTER ) ++ set_shortname(N_("MMAL from ZC")) ++ set_description(N_("MMAL conversion from ZC filter")) ++ add_shortcut("mmal_from_zc") ++ set_capability( "video converter", 902 ) ++ set_callbacks(OpenConverterFromZc, CloseConverterFromZc) ++#endif ++ + add_submodule() + set_category( CAT_VIDEO ) + set_subcategory( SUBCAT_VIDEO_VFILTER ) @@ -3033,7 +3219,7 @@ + --- /dev/null +++ b/modules/hw/mmal/converter_mmal.c -@@ -0,0 +1,448 @@ +@@ -0,0 +1,479 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif @@ -3062,28 +3248,13 @@ + +#include <assert.h> + -+#define OPT_SAND 0 -+#define OPT_I420 1 -+#define OPT_RGB32 0 -+ -+ -+#if OPT_SAND -+#define FMT_IN VLC_CODEC_MMAL_ZC_SAND8 -+#elif OPT_I420 -+#define FMT_IN VLC_CODEC_MMAL_ZC_I420 -+#elif OPT_RGB32 -+#define FMT_IN VLC_CODEC_MMAL_ZC_RGB32 -+#elif -+#error Missing input format -+#endif -+ +#define TRACE_ALL 0 + +typedef struct mmal_gl_converter_s +{ + EGLint drm_fourcc; + vcsm_init_type_t vcsm_init_type; -+ struct cma_pic_context_s * last_ctx_ref; ++ cma_buf_t * last_cb; + + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; +} mmal_gl_converter_t; @@ -3100,7 +3271,7 @@ + return MMAL_FOURCC('Y','V','1','2'); + case MMAL_ENCODING_I422: + return MMAL_FOURCC('Y','U','1','6'); -+ case MMAL_ENCODING_YUVUV128: ++// case MMAL_ENCODING_YUVUV128: // Doesn't actually work yet + case MMAL_ENCODING_NV12: + return MMAL_FOURCC('N','V','1','2'); + case MMAL_ENCODING_NV21: @@ -3133,7 +3304,6 @@ +static void tex_context_delete(tex_context_t * const tex) +{ + tex->DeleteTextures(1, &tex->texture); -+ + free(tex); +} + @@ -3147,11 +3317,10 @@ + return pic_ctx; +} + -+static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc, picture_t * const pic) ++static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc, picture_t * const pic, cma_buf_t * const cb) +{ + mmal_gl_converter_t * const sys = tc->priv; -+ -+ tex_context_t * tex = (tex_context_t *)cma_buf_pic_context2(pic); ++ tex_context_t * tex = (tex_context_t *)cma_buf_context2(cb); + if (tex != NULL) + return tex; + @@ -3170,12 +3339,12 @@ + { + EGLint attribs[30]; + EGLint * a = attribs; -+ const int fd = cma_buf_pic_fd(pic); -+ uint8_t * base_addr = cma_buf_pic_addr(pic); ++ const int fd = cma_buf_fd(cb); ++ uint8_t * base_addr = cma_buf_addr(cb); + + if (pic->i_planes >= 4 || pic->i_planes <= 0) + { -+ msg_Err(tc, "%s: Bad planes", __func__); ++ msg_Err(tc, "%s: Bad planes: %d", __func__, pic->i_planes); + goto fail; + } + @@ -3268,7 +3437,7 @@ + tc->gl->egl.destroyImageKHR(tc->gl, image); + } + -+ if (cma_buf_pic_add_context2(pic, &tex->cmn) != VLC_SUCCESS) ++ if (cma_buf_add_context2(cb, &tex->cmn) != VLC_SUCCESS) + { + msg_Err(tc, "%s: add_context2 failed", __func__); + goto fail; @@ -3288,7 +3457,12 @@ +{ + mmal_gl_converter_t * const sys = tc->priv; +#if TRACE_ALL -+ msg_Err(tc, "%s: %d*%dx%d : %d*%dx%d", __func__, tc->tex_count, tex_width[0], tex_height[0], pic->i_planes, pic->p[0].i_pitch, pic->p[0].i_lines); ++ { ++ char cbuf[5]; ++ msg_Dbg(tc, "%s: %s %d*%dx%d : %d*%dx%d", __func__, ++ str_fourcc(cbuf, pic->format.i_chroma), ++ tc->tex_count, tex_width[0], tex_height[0], pic->i_planes, pic->p[0].i_pitch, pic->p[0].i_lines); ++ } +#endif + VLC_UNUSED(tex_width); + VLC_UNUSED(tex_height); @@ -3301,14 +3475,21 @@ + return VLC_EGENERIC; + } + -+ tex_context_t * const tex = get_tex_context(tc, pic); ++ cma_buf_t * const cb = cma_buf_pic_get(pic); ++ if (cb == NULL) ++ { ++ msg_Err(tc, "Pic missing cma buf"); ++ return VLC_EGENERIC; ++ } ++ ++ tex_context_t * const tex = get_tex_context(tc, pic, cb); + if (tex == NULL) + return VLC_EGENERIC; + +// tc->vt->BindTexture(GL_TEXTURE_EXTERNAL_OES, tex->texture); + -+ cma_buf_pic_context_unref(sys->last_ctx_ref); // ?? Needed ?? -+ sys->last_ctx_ref = cma_buf_pic_context_ref(pic); ++ cma_buf_unref(sys->last_cb); ++ sys->last_cb = cma_buf_ref(cb); + + textures[0] = tex->texture; + return VLC_SUCCESS; @@ -3375,23 +3556,55 @@ + if (sys == NULL) + return; + -+ cma_buf_pic_context_unref(sys->last_ctx_ref); ++ cma_buf_unref(sys->last_cb); + cma_vcsm_exit(sys->vcsm_init_type); + free(sys); +} + ++ ++// Pick a chroma that we can convert to ++// Prefer I420 as smallest ++static vlc_fourcc_t chroma_in_out(const vlc_fourcc_t chroma_in) ++{ ++ switch (chroma_in) ++ { ++ case VLC_CODEC_MMAL_OPAQUE: ++ case VLC_CODEC_MMAL_ZC_I420: ++ case VLC_CODEC_MMAL_ZC_SAND8: ++ case VLC_CODEC_MMAL_ZC_SAND10: // ISP only ++ return VLC_CODEC_MMAL_ZC_I420; ++ case VLC_CODEC_MMAL_ZC_SAND30: // HVS only ++ case VLC_CODEC_MMAL_ZC_RGB32: ++ return VLC_CODEC_MMAL_ZC_RGB32; // HVS can't generate YUV of any sort ++ default: ++ break; ++ } ++ return 0; ++} ++ ++ +static int +OpenGLConverter(vlc_object_t *obj) +{ + opengl_tex_converter_t * const tc = (opengl_tex_converter_t *)obj; + int rv = VLC_EGENERIC; + const EGLint eglfmt = vlc_to_gl_fourcc(&tc->fmt); ++ const vlc_fourcc_t chroma_out = chroma_in_out(tc->fmt.i_chroma); + -+ // Accept Opaque (as it can definitely be converted) or what we actually want -+ if (!(tc->fmt.i_chroma == FMT_IN || -+ tc->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE)) -+ { ++ // Do we know what to do with this? ++ if (chroma_out == 0) + return rv; ++ ++ { ++ char dbuf0[5], dbuf1[5], dbuf2[5]; ++ msg_Dbg(tc, "<<< %s: V:%s/E:%s,%dx%d [(%d,%d) %d/%d] sar:%d/%d -> %s", __func__, ++ str_fourcc(dbuf0, tc->fmt.i_chroma), ++ str_fourcc(dbuf1, eglfmt), ++ tc->fmt.i_width, tc->fmt.i_height, ++ tc->fmt.i_x_offset, tc->fmt.i_y_offset, ++ tc->fmt.i_visible_width, tc->fmt.i_visible_height, ++ tc->fmt.i_sar_num, tc->fmt.i_sar_den, ++ str_fourcc(dbuf2, chroma_out)); + } + + if (tc->gl->ext != VLC_GL_EXT_EGL || @@ -3402,17 +3615,6 @@ + return rv; + } + -+ { -+ char dbuf0[5], dbuf1[5]; -+ msg_Dbg(tc, ">>> %s: V:%s/E:%s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, -+ str_fourcc(dbuf0, tc->fmt.i_chroma), -+ str_fourcc(dbuf1, eglfmt), -+ tc->fmt.i_width, tc->fmt.i_height, -+ tc->fmt.i_x_offset, tc->fmt.i_y_offset, -+ tc->fmt.i_visible_width, tc->fmt.i_visible_height, -+ tc->fmt.i_sar_num, tc->fmt.i_sar_den); -+ } -+ + if ((tc->priv = calloc(1, sizeof(mmal_gl_converter_t))) == NULL) + { + msg_Err(tc, "priv alloc failure"); @@ -3444,7 +3646,7 @@ + + if (eglfmt == 0) + { -+ tc->fmt.i_chroma = FMT_IN; ++ tc->fmt.i_chroma = chroma_out; + tc->fmt.i_bits_per_pixel = 8; + if (tc->fmt.i_chroma == VLC_CODEC_MMAL_ZC_RGB32) + { @@ -3465,6 +3667,21 @@ + + tc->handle_texs_gen = true; // We manage the texs + tc->pf_update = tc_mmal_update; ++ ++#if TRACE_ALL ++ { ++ char dbuf0[5], dbuf1[5], dbuf2[5]; ++ msg_Dbg(tc, ">>> %s: V:%s/E:%s,%dx%d [(%d,%d) %d/%d] sar:%d/%d -> %s", __func__, ++ str_fourcc(dbuf0, tc->fmt.i_chroma), ++ str_fourcc(dbuf1, sys->drm_fourcc), ++ tc->fmt.i_width, tc->fmt.i_height, ++ tc->fmt.i_x_offset, tc->fmt.i_y_offset, ++ tc->fmt.i_visible_width, tc->fmt.i_visible_height, ++ tc->fmt.i_sar_num, tc->fmt.i_sar_den, ++ str_fourcc(dbuf2, chroma_out)); ++ } ++#endif ++ + return VLC_SUCCESS; + +fail: @@ -3499,23 +3716,28 @@ #include "mmal_picture.h" -@@ -41,466 +42,569 @@ - - #define MIN_NUM_BUFFERS_IN_TRANSIT 2 +@@ -39,468 +40,814 @@ + #include <interface/mmal/util/mmal_util.h> + #include <interface/mmal/util/mmal_default_components.h> --#define MMAL_DEINTERLACE_QPU "mmal-deinterlace-adv-qpu" --#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.") --#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.") +-#define MIN_NUM_BUFFERS_IN_TRANSIT 2 +#define MMAL_DEINTERLACE_NO_QPU "mmal-deinterlace-no-qpu" +#define MMAL_DEINTERLACE_NO_QPU_TEXT N_("Do not use QPUs for advanced HD deinterlacing.") +#define MMAL_DEINTERLACE_NO_QPU_LONGTEXT N_("Do not make use of the QPUs to allow higher quality deinterlacing of HD content.") --static int Open(filter_t *filter); --static void Close(filter_t *filter); +-#define MMAL_DEINTERLACE_QPU "mmal-deinterlace-adv-qpu" +-#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.") +-#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.") +#define MMAL_DEINTERLACE_ADV "mmal-deinterlace-adv" +#define MMAL_DEINTERLACE_ADV_TEXT N_("Force advanced deinterlace") +#define MMAL_DEINTERLACE_ADV_LONGTEXT N_("Force advanced deinterlace") +-static int Open(filter_t *filter); +-static void Close(filter_t *filter); ++#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" ++#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") ++#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") + -vlc_module_begin() - set_shortname(N_("MMAL deinterlace")) - set_description(N_("MMAL-based deinterlace filter plugin")) @@ -3527,10 +3749,6 @@ - add_bool(MMAL_DEINTERLACE_QPU, false, MMAL_DEINTERLACE_QPU_TEXT, - MMAL_DEINTERLACE_QPU_LONGTEXT, true); -vlc_module_end() -+#define MMAL_DEINTERLACE_FAST "mmal-deinterlace-fast" -+#define MMAL_DEINTERLACE_FAST_TEXT N_("Force fast deinterlace") -+#define MMAL_DEINTERLACE_FAST_LONGTEXT N_("Force fast deinterlace") -+ +#define MMAL_DEINTERLACE_NONE "mmal-deinterlace-none" +#define MMAL_DEINTERLACE_NONE_TEXT N_("Force no deinterlace") +#define MMAL_DEINTERLACE_NONE_LONGTEXT N_("Force no interlace. Simply strips off the interlace markers and passes the frame straight through. "\ @@ -3552,19 +3770,28 @@ MMAL_PORT_T *input; MMAL_PORT_T *output; + MMAL_POOL_T *in_pool; -+ hw_mmal_port_pool_ref_t *out_ppr; - -- MMAL_QUEUE_T *filtered_pictures; -- vlc_sem_t sem; ++ + MMAL_QUEUE_T * out_q; - -- atomic_bool started; -+ bool half_rate; -+ bool use_qpu; ++ ++ // Bind this lot somehow into ppr???? ++ bool is_cma; ++ cma_buf_pool_t * cma_out_pool; ++ MMAL_POOL_T * out_pool; ++ ++ hw_mmal_port_pool_ref_t *out_ppr; ++ ++ bool half_rate; ++ bool use_qpu; + bool use_fast; + bool use_passthrough; -+ unsigned int seq_in; -+ unsigned int seq_out; ++ unsigned int seq_in; // Seq of next frame to submit (1-15) [Init=1] ++ unsigned int seq_out; // Seq of last frame received (1-15) [Init=15] + +- MMAL_QUEUE_T *filtered_pictures; +- vlc_sem_t sem; ++ vcsm_init_type_t vcsm_init_type; + +- atomic_bool started; +} filter_sys_t; - /* statistics */ @@ -3581,12 +3808,19 @@ #define MMAL_COMPONENT_DEFAULT_DEINTERLACE "vc.ril.image_fx" -static int Open(filter_t *filter) --{ ++#define TRACE_ALL 0 ++ ++ ++ ++// Buffer attached to pic on success, is still valid on failure ++static picture_t * di_alloc_opaque(filter_t * const p_filter, MMAL_BUFFER_HEADER_T * const buf) + { - int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ? - (int64_t)1000000 * filter->fmt_in.video.i_frame_rate_base / - filter->fmt_in.video.i_frame_rate : 0; - bool use_qpu = var_InheritBool(filter, MMAL_DEINTERLACE_QPU); -+#define TRACE_ALL 0 ++ filter_sys_t *const filter_sys = p_filter->p_sys; ++ picture_t * const pic = filter_NewPicture(p_filter); - MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = { - { MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param) }, @@ -3594,40 +3828,45 @@ - 4, - { 3, frame_duration, 0, use_qpu } - }; ++ if (pic == NULL) ++ goto fail1; - int ret = VLC_SUCCESS; - MMAL_STATUS_T status; - filter_sys_t *sys; ++ if (buf->length == 0) { ++ msg_Err(p_filter, "%s: Empty buffer", __func__); ++ goto fail2; ++ } - msg_Dbg(filter, "Try to open mmal_deinterlace filter. frame_duration: %d, QPU %s!", - frame_duration, use_qpu ? "used" : "unused"); -+// Buffer attached to pic on success, is still valid on failure -+static picture_t * di_alloc_opaque(filter_t * const p_filter, MMAL_BUFFER_HEADER_T * const buf) -+{ -+ filter_sys_t *const filter_sys = p_filter->p_sys; -+ picture_t * const pic = filter_NewPicture(p_filter); ++ if ((pic->context = hw_mmal_gen_context(buf, filter_sys->out_ppr)) == NULL) ++ goto fail2; - if (filter->fmt_in.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) - return VLC_EGENERIC; -+ if (pic == NULL) -+ goto fail1; ++ buf_to_pic_copy_props(pic, buf); - if (filter->fmt_out.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) - return VLC_EGENERIC; -+ if (buf->length == 0) { -+ msg_Err(p_filter, "%s: Empty buffer", __func__); -+ goto fail2; -+ } ++#if TRACE_ALL ++ msg_Dbg(p_filter, "pic: prog=%d, tff=%d, date=%lld", pic->b_progressive, pic->b_top_field_first, (long long)pic->date); ++#endif - sys = calloc(1, sizeof(filter_sys_t)); - if (!sys) - return VLC_ENOMEM; - filter->p_sys = sys; -+ if ((pic->context = hw_mmal_gen_context(MMAL_ENCODING_OPAQUE, buf, filter_sys->out_ppr)) == NULL) -+ goto fail2; ++ return pic; - bcm_host_init(); -+ buf_to_pic_copy_props(pic, buf); ++fail2: ++ picture_Release(pic); ++fail1: ++// mmal_buffer_header_release(buf); ++ return NULL; ++} - status = mmal_component_create(MMAL_COMPONENT_DEFAULT_DEINTERLACE, &sys->component); - if (status != MMAL_SUCCESS) { @@ -3636,8 +3875,16 @@ - ret = VLC_EGENERIC; - goto out; - } ++static void di_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) ++{ +#if TRACE_ALL -+ msg_Dbg(p_filter, "pic: prog=%d, tff=%d, date=%lld", pic->b_progressive, pic->b_top_field_first, (long long)pic->date); ++ pic_ctx_mmal_t * ctx = buffer->user_data; ++// filter_sys_t *const sys = ((filter_t *)port->userdata)->p_sys; ++ ++ msg_Dbg((filter_t *)port->userdata, "<<< %s: cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buffer->cmd, ctx, buffer, ++ buffer->flags, (long long)buffer->pts); ++#else ++ VLC_UNUSED(port); +#endif - status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); @@ -3647,7 +3894,7 @@ - ret = VLC_EGENERIC; - goto out; - } -+ return pic; ++ mmal_buffer_header_release(buffer); - sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; - status = mmal_port_enable(sys->component->control, control_port_cb); @@ -3656,13 +3903,29 @@ - sys->component->control->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } -+fail2: -+ picture_Release(pic); -+fail1: -+// mmal_buffer_header_release(buf); -+ return NULL; ++#if TRACE_ALL ++ msg_Dbg((filter_t *)port->userdata, ">>> %s", __func__); ++#endif +} ++ ++static void di_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) ++{ ++ if (buf->cmd == 0 && buf->length != 0) ++ { ++ // The filter structure etc. should always exist if we have contents ++ // but might not on later flushes as we shut down ++ filter_t * const p_filter = (filter_t *)port->userdata; ++ filter_sys_t * const sys = p_filter->p_sys; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s: cmd=%d; flags=%#x, pts=%lld", __func__, buf->cmd, buf->flags, (long long) buf->pts); ++#endif ++ mmal_queue_put(sys->out_q, buf); ++#if TRACE_ALL ++ msg_Dbg(p_filter, ">>> %s: out Q len=%d", __func__, mmal_queue_length(sys->out_q)); ++#endif ++ return; + } - sys->input = sys->component->input[0]; - sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; @@ -3676,21 +3939,12 @@ - sys->input->format->es->video.crop.height = filter->fmt_in.video.i_height; - sys->input->format->es->video.par.num = filter->fmt_in.video.i_sar_num; - sys->input->format->es->video.par.den = filter->fmt_in.video.i_sar_den; -+static void di_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -+{ -+#if TRACE_ALL -+ pic_ctx_mmal_t * ctx = buffer->user_data; -+// filter_sys_t *const sys = ((filter_t *)port->userdata)->p_sys; -+ -+ msg_Dbg((filter_t *)port->userdata, "<<< %s: cmd=%d, ctx=%p, buf=%p, flags=%#x, pts=%lld", __func__, buffer->cmd, ctx, buffer, -+ buffer->flags, (long long)buffer->pts); -+#else -+ VLC_UNUSED(port); -+#endif ++ mmal_buffer_header_reset(buf); // User data stays intact so release will kill pic ++ mmal_buffer_header_release(buf); ++} - es_format_Copy(&filter->fmt_out, &filter->fmt_in); - filter->fmt_out.video.i_frame_rate *= 2; -+ mmal_buffer_header_release(buffer); - status = mmal_port_format_commit(sys->input); - if (status != MMAL_SUCCESS) { @@ -3698,36 +3952,9 @@ - sys->input->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -+#if TRACE_ALL -+ msg_Dbg((filter_t *)port->userdata, ">>> %s", __func__); -+#endif -+} -+ -+static void di_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) -+{ -+ if (buf->cmd == 0 && buf->length != 0) -+ { -+ // The filter structure etc. should always exist if we have contents -+ // but might not on later flushes as we shut down -+ filter_t * const p_filter = (filter_t *)port->userdata; -+ filter_sys_t * const sys = p_filter->p_sys; -+ -+#if TRACE_ALL -+ msg_Dbg(p_filter, "<<< %s: cmd=%d; flags=%#x, pts=%lld", __func__, buf->cmd, buf->flags, (long long) buf->pts); -+#endif -+ mmal_queue_put(sys->out_q, buf); -+#if TRACE_ALL -+ msg_Dbg(p_filter, ">>> %s: out Q len=%d", __func__, mmal_queue_length(sys->out_q)); -+#endif - } +- } - sys->input->buffer_size = sys->input->buffer_size_recommended; - sys->input->buffer_num = sys->input->buffer_num_recommended; -+ else -+ { -+ mmal_buffer_header_reset(buf); -+ mmal_buffer_header_release(buf); -+ } -+} - if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) { - MMAL_PARAMETER_BOOLEAN_T zero_copy = { @@ -3763,18 +3990,18 @@ - ret = VLC_EGENERIC; - goto out; - } -+static inline unsigned int seq_inc(unsigned int x) ++// Output buffers may contain a pic ref on error or flush ++// Free it ++static MMAL_BOOL_T out_buffer_pre_release_cb(MMAL_BUFFER_HEADER_T *header, void *userdata) +{ -+ return x + 1 >= 16 ? 1 : x + 1; -+} ++ VLC_UNUSED(userdata); - sys->output = sys->component->output[0]; - sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)filter; - mmal_format_full_copy(sys->output->format, sys->input->format); -+static inline unsigned int seq_delta(unsigned int sseq, unsigned int fseq) -+{ -+ return fseq == 0 ? 0 : fseq <= sseq ? sseq - fseq : 15 - (fseq - sseq); -+} ++ cma_buf_t * const cb = header->user_data; ++ header->user_data = NULL; ++ cma_buf_unref(cb); // Copes fine with NULL - status = mmal_port_format_commit(sys->output); - if (status != MMAL_SUCCESS) { @@ -3782,16 +4009,106 @@ - sys->input->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } ++ return MMAL_FALSE; ++} ++ ++static inline unsigned int seq_inc(unsigned int x) ++{ ++ return x + 1 >= 16 ? 1 : x + 1; ++} ++ ++static inline unsigned int seq_delta(unsigned int sseq, unsigned int fseq) ++{ ++ return fseq == 0 ? 0 : fseq <= sseq ? sseq - fseq : 15 - (fseq - sseq); ++} ++ +static picture_t *deinterlace(filter_t * p_filter, picture_t * p_pic) +{ + filter_sys_t * const sys = p_filter->p_sys; + picture_t *ret_pics = NULL; + MMAL_STATUS_T err; ++ MMAL_BUFFER_HEADER_T * out_buf = NULL; ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "<<< %s", __func__); ++#endif ++ ++ if (hw_mmal_vlc_pic_to_mmal_fmt_update(sys->input->format, p_pic)) ++ { ++ // ****** Breaks on opaque (at least) ++ ++ if (sys->input->is_enabled) ++ mmal_port_disable(sys->input); ++#if 0 ++ if (sys->output->is_enabled) ++ mmal_port_disable(sys->output); ++ ++ mmal_format_full_copy(sys->output->format, sys->input->format); ++ mmal_port_format_commit(sys->output); ++ sys->output->buffer_num = 30; ++ sys->output->buffer_size = sys->input->buffer_size_recommended; ++ mmal_port_enable(sys->output, di_output_port_cb); ++#endif ++ if (mmal_port_format_commit(sys->input) != MMAL_SUCCESS) ++ msg_Err(p_filter, "Failed to update pic format"); ++ sys->input->buffer_num = 30; ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ mmal_log_dump_format(sys->input->format); ++ } ++ ++ // Reenable stuff if the last thing we did was flush ++ // Output should always be enabled ++ if (!sys->input->is_enabled && ++ (err = mmal_port_enable(sys->input, di_input_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Input port reenable failed"); ++ goto fail; ++ } ++ ++ if (!sys->is_cma) ++ { ++ // Fill output from anything that has turned up in pool Q ++ if (hw_mmal_port_pool_ref_fill(sys->out_ppr) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Out port fill fail"); ++ goto fail; ++ } + } ++ else ++ { ++ // We are expecting one in - one out so simply wedge a new bufer ++ // into the output port. Flow control will happen on cma alloc. ++ ++ if ((out_buf = mmal_queue_get(sys->out_pool->queue)) == NULL) ++ { ++ // Should never happen ++ msg_Err(p_filter, "Failed to get output buffer"); ++ goto fail; ++ } ++ mmal_buffer_header_reset(out_buf); - sys->output->buffer_num = 3; ++ // Attach cma_buf to the buffer & ensure it is freed when the buffer is released ++ // On a good send callback the pic will be extracted to avoid this ++ mmal_buffer_header_pre_release_cb_set(out_buf, out_buffer_pre_release_cb, p_filter); ++ ++ cma_buf_t * const cb = cma_buf_pool_alloc_buf(sys->cma_out_pool, sys->output->buffer_size); ++ if ((out_buf->user_data = cb) == NULL) // Check & attach cb to buf ++ { ++ char dbuf0[5]; ++ msg_Err(p_filter, "Failed to alloc CMA buf: fmt=%s, size=%d", ++ str_fourcc(dbuf0, p_pic->format.i_chroma), ++ sys->output->buffer_size); ++ goto fail; ++ } ++ const unsigned int vc_h = cma_buf_vc_handle(cb); // Cannot coerce without going via variable ++ out_buf->data = (uint8_t *)vc_h; ++ out_buf->alloc_size = sys->output->buffer_size; ++ +#if TRACE_ALL -+ msg_Dbg(p_filter, "<<< %s", __func__); ++ msg_Dbg(p_filter, "Out buf send: pic=%p, data=%p, user=%p, flags=%#x, len=%d/%d, pts=%lld", ++ p_pic, out_buf->data, out_buf->user_data, out_buf->flags, ++ out_buf->length, out_buf->alloc_size, (long long)out_buf->pts); +#endif - if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) { @@ -3804,42 +4121,28 @@ - msg_Err(filter, "Failed to set MMAL_PARAMETER_EXTRA_BUFFERS on output port (status=%"PRIx32" %s)", - status, mmal_status_to_string(status)); - goto out; -+ // Reenable stuff if the last thing we did was flush -+ // Output should always be enabled -+ if (!sys->input->is_enabled && -+ (err = mmal_port_enable(sys->input, di_input_port_cb)) != MMAL_SUCCESS) -+ { -+ msg_Err(p_filter, "Input port enable failed"); -+ goto fail; -+ } -+ -+ // Fill output from anything that has turned up in pool Q -+ if (hw_mmal_port_pool_ref_fill(sys->out_ppr) != MMAL_SUCCESS) -+ { -+ msg_Err(p_filter, "Out port fill fail"); -+ goto fail; -+ } -+ -+ // Stuff into input -+ // We assume the BH is already set up with values reflecting pic date etc. -+ { -+ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); -+ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->in_pool->queue); -+ -+ if ((err = mmal_buffer_header_replicate(buf, pic_buf)) != MMAL_SUCCESS) ++ if ((err = mmal_port_send_buffer(sys->output, out_buf)) != MMAL_SUCCESS) + { -+ msg_Err(p_filter, "Failed to replicate input buffer: %d", err); ++ msg_Err(p_filter, "Send buffer to output failed"); + goto fail; } ++ out_buf = NULL; ++ } - MMAL_PARAMETER_BOOLEAN_T zero_copy = { - { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, - 1 - }; -+#if TRACE_ALL -+ msg_Dbg(p_filter, "In buf send: pic=%p, buf=%p/%p, ctx=%p, flags=%#x, len=%d/%d, pts=%lld", -+ p_pic, pic_buf, buf, pic_buf->user_data, buf->flags, buf->length, buf->alloc_size, (long long)buf->pts); -+#endif ++ // Stuff into input ++ // We assume the BH is already set up with values reflecting pic date etc. ++ { ++ MMAL_BUFFER_HEADER_T * const pic_buf = hw_mmal_pic_buf_replicated(p_pic, sys->in_pool); ++ ++ if (pic_buf == NULL) ++ { ++ msg_Err(p_filter, "Pic has not attached buffer"); ++ goto fail; ++ } - status = mmal_port_parameter_set(sys->output, &zero_copy.hdr); - if (status != MMAL_SUCCESS) { @@ -3850,12 +4153,13 @@ + + // Add a sequence to the flags so we can track what we have actually + // deinterlaced -+ buf->flags = (buf->flags & ~(0xfU * MMAL_BUFFER_HEADER_FLAG_USER0)) | (sys->seq_in * (MMAL_BUFFER_HEADER_FLAG_USER0)); ++ pic_buf->flags = (pic_buf->flags & ~(0xfU * MMAL_BUFFER_HEADER_FLAG_USER0)) | (sys->seq_in * (MMAL_BUFFER_HEADER_FLAG_USER0)); + sys->seq_in = seq_inc(sys->seq_in); + -+ if ((err = mmal_port_send_buffer(sys->input, buf)) != MMAL_SUCCESS) ++ if ((err = mmal_port_send_buffer(sys->input, pic_buf)) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Send buffer to input failed"); ++ mmal_buffer_header_release(pic_buf); + goto fail; } } @@ -3866,135 +4170,177 @@ - sys->output->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } + // Return anything that is in the out Q + { -+ MMAL_BUFFER_HEADER_T * out_buf; + picture_t ** pp_pic = &ret_pics; + + // Advanced di has a 3 frame latency, so if the seq delta is greater + // than that then we are expecting at least two frames of output. Wait + // for one of those. -+ while ((out_buf = (seq_delta(sys->seq_in, sys->seq_out) > 3 ? mmal_queue_wait(sys->out_q) : mmal_queue_get(sys->out_q))) != NULL) ++ // seq_in is seq of the next frame we are going to submit (1-15, no 0) ++ // seq_out is last frame we removed from Q ++ // So after 4 frames sent (1st time we want to wait), 0 rx seq_in=5, seq_out=15, delta=5 ++ ++ while ((out_buf = (seq_delta(sys->seq_in, sys->seq_out) >= 5 ? mmal_queue_timedwait(sys->out_q, 1000) : mmal_queue_get(sys->out_q))) != NULL) + { -+ picture_t * const out_pic = di_alloc_opaque(p_filter, out_buf); + const unsigned int seq_out = (out_buf->flags / MMAL_BUFFER_HEADER_FLAG_USER0) & 0xf; ++ int rv; + -+ if (out_pic == NULL) { -+ msg_Warn(p_filter, "Failed to alloc new filter output pic"); -+ mmal_queue_put_back(sys->out_q, out_buf); -+ break; -+ } - -- status = mmal_component_enable(sys->component); -- if (status != MMAL_SUCCESS) { -- msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", -- sys->component->name, status, mmal_status_to_string(status)); -- ret = VLC_EGENERIC; -- goto out; -- } -+#if TRACE_ALL -+ msg_Dbg(p_filter, "-- %s: Q pic=%p: seq_in=%d, seq_out=%d, delta=%d", __func__, out_pic, sys->seq_in, seq_out, seq_delta(sys->seq_in, seq_out)); -+#endif - -- sys->filtered_pictures = mmal_queue_create(); -+ *pp_pic = out_pic; -+ pp_pic = &out_pic->p_next; - -- filter->pf_video_filter = deinterlace; -- filter->pf_flush = flush; -+ // Ignore 0 seqs ++ picture_t * out_pic; ++ ++ if (sys->is_cma) ++ { ++ // Alloc pic ++ if ((out_pic = filter_NewPicture(p_filter)) == NULL) ++ { ++ // Can't alloc pic - just stop extraction ++ mmal_queue_put_back(sys->out_q, out_buf); ++ out_buf = NULL; ++ msg_Warn(p_filter, "Failed to alloc new filter output pic"); ++ break; ++ } ++ ++ // Extract cma_buf from buf & attach to pic ++ cma_buf_t * const cb = (cma_buf_t *)out_buf->user_data; ++ if ((rv = cma_buf_pic_attach(cb, out_pic)) != VLC_SUCCESS) ++ { ++ char dbuf0[5]; ++ msg_Err(p_filter, "Failed to attach CMA to pic: fmt=%s err=%d", ++ str_fourcc(dbuf0, out_pic->format.i_chroma), ++ rv); ++ // cb still attached to buffer and will be freed with it ++ goto fail; ++ } ++ out_buf->user_data = NULL; ++ ++ buf_to_pic_copy_props(out_pic, out_buf); ++ ++ // Set pic data pointers from buf aux info now it has it ++ if ((rv = cma_pic_set_data(out_pic, sys->output->format, out_buf)) != VLC_SUCCESS) ++ { ++ char dbuf0[5]; ++ msg_Err(p_filter, "Failed to set data: fmt=%s, rv=%d", ++ str_fourcc(dbuf0, sys->output->format->encoding), ++ rv); ++ } ++ ++ out_buf->user_data = NULL; // Responsability for this pic no longer with buffer ++ mmal_buffer_header_release(out_buf); ++ } ++ else ++ { ++ out_pic = di_alloc_opaque(p_filter, out_buf); ++ ++ if (out_pic == NULL) { ++ msg_Warn(p_filter, "Failed to alloc new filter output pic"); ++ mmal_queue_put_back(sys->out_q, out_buf); // Wedge buf back into Q in the hope we can alloc a pic later ++ out_buf = NULL; ++ break; ++ } ++ } ++ out_buf = NULL; // Now attached to pic or recycled ++ ++#if TRACE_ALL ++ msg_Dbg(p_filter, "-- %s: Q pic=%p: seq_in=%d, seq_out=%d, delta=%d", __func__, out_pic, sys->seq_in, seq_out, seq_delta(sys->seq_in, seq_out)); ++#endif ++ ++ *pp_pic = out_pic; ++ pp_pic = &out_pic->p_next; ++ ++ // Ignore 0 seqs + // Don't think these should actually happen + if (seq_out != 0) + sys->seq_out = seq_out; + } -+ } ++ ++ // Crash on lockup ++ assert(ret_pics != NULL || seq_delta(sys->seq_in, sys->seq_out) < 5); + } -- vlc_sem_init(&sys->sem, 0); +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); +- ret = VLC_EGENERIC; +- goto out; +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: pic=%p", __func__, ret_pics); +#endif - --out: -- if (ret != VLC_SUCCESS) -- Close(filter); ++ + return ret_pics; - -- return ret; ++ +fail: ++ if (out_buf != NULL) ++ mmal_buffer_header_release(out_buf); + picture_Release(p_pic); + return NULL; - } - --static void Close(filter_t *filter) ++} ++ +static void di_flush(filter_t *p_filter) - { -- filter_sys_t *sys = filter->p_sys; -- MMAL_BUFFER_HEADER_T *buffer; ++{ + filter_sys_t * const sys = p_filter->p_sys; - -- if (!sys) -- return; -- -- if (sys->component && sys->component->control->is_enabled) -- mmal_port_disable(sys->component->control); ++ +#if TRACE_ALL + msg_Dbg(p_filter, "<<< %s", __func__); +#endif - -- if (sys->input && sys->input->is_enabled) ++ + if (sys->input != NULL && sys->input->is_enabled) - mmal_port_disable(sys->input); - -- if (sys->output && sys->output->is_enabled) ++ mmal_port_disable(sys->input); ++ + if (sys->output != NULL && sys->output->is_enabled) + { -+ // Wedge anything we've got into the output port as that will free the underlying buffers -+ fill_output_from_q(p_filter, sys, sys->out_q); -+ - mmal_port_disable(sys->output); - -- if (sys->component && sys->component->is_enabled) -- mmal_component_disable(sys->component); -+ // If that dumped anything real into the out_q then have another go -+ if (mmal_queue_length(sys->out_q) != 0) ++ if (sys->is_cma) ++ { ++ MMAL_BUFFER_HEADER_T * buf; ++ mmal_port_disable(sys->output); ++ while ((buf = mmal_queue_get(sys->out_q)) != NULL) ++ mmal_buffer_header_release(buf); ++ } ++ else + { -+ mmal_port_enable(sys->output, di_output_port_cb); ++ // Wedge anything we've got into the output port as that will free the underlying buffers + fill_output_from_q(p_filter, sys, sys->out_q); ++ + mmal_port_disable(sys->output); -+ // Out q should now be empty & should remain so until the input is reenabled ++ ++ // If that dumped anything real into the out_q then have another go ++ if (mmal_queue_length(sys->out_q) != 0) ++ { ++ mmal_port_enable(sys->output, di_output_port_cb); ++ fill_output_from_q(p_filter, sys, sys->out_q); ++ mmal_port_disable(sys->output); ++ // Out q should now be empty & should remain so until the input is reenabled ++ } + } + mmal_port_enable(sys->output, di_output_port_cb); - -- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { -- picture_t *pic = (picture_t *)buffer->user_data; -- picture_Release(pic); ++ + // Leaving the input disabled is fine - but we want to leave the output enabled + // so we can retrieve buffers that are still bound to pictures } -- if (sys->filtered_pictures) -- mmal_queue_destroy(sys->filtered_pictures); +- sys->filtered_pictures = mmal_queue_create(); + sys->seq_in = 1; -+ sys->seq_out = 1; ++ sys->seq_out = 15; -- if (sys->component) -- mmal_component_release(sys->component); +- filter->pf_video_filter = deinterlace; +- filter->pf_flush = flush; +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s", __func__); +#endif +} -- vlc_sem_destroy(&sys->sem); -- free(sys); +- vlc_sem_init(&sys->sem, 0); -- bcm_host_deinit(); +-out: +- if (ret != VLC_SUCCESS) +- Close(filter); +static void pass_flush(filter_t *p_filter) +{ + // Nothing to do + VLC_UNUSED(p_filter); +} -+ + +- return ret; +static picture_t * pass_deinterlace(filter_t * p_filter, picture_t * p_pic) +{ + VLC_UNUSED(p_filter); @@ -4003,34 +4349,22 @@ + return p_pic; } --static int send_output_buffer(filter_t *filter) +-static void Close(filter_t *filter) + +static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) { - filter_sys_t *sys = filter->p_sys; - MMAL_BUFFER_HEADER_T *buffer; + filter_t *filter = (filter_t *)port->userdata; - MMAL_STATUS_T status; -- picture_t *picture; -- int ret = 0; ++ MMAL_STATUS_T status; -- if (!sys->output->is_enabled) { -- ret = VLC_EGENERIC; -- goto out; +- if (!sys) + if (buffer->cmd == MMAL_EVENT_ERROR) { + status = *(uint32_t *)buffer->data; + msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, + mmal_status_to_string(status)); - } - -- picture = filter_NewPicture(filter); -- if (!picture) { -- msg_Warn(filter, "Failed to get new picture"); -- ret = -1; -- goto out; -- } -- picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate; -- picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base; ++ } ++ + mmal_buffer_header_reset(buffer); + mmal_buffer_header_release(buffer); +} @@ -4038,112 +4372,129 @@ +static void CloseMmalDeinterlace(filter_t *filter) +{ + filter_sys_t * const sys = filter->p_sys; - -- buffer = picture->p_sys->buffer; -- buffer->user_data = picture; -- buffer->cmd = 0; ++ +#if TRACE_ALL + msg_Dbg(filter, "<<< %s", __func__); +#endif - -- mmal_picture_lock(picture); ++ + if (sys == NULL) -+ return; + return; -- status = mmal_port_send_buffer(sys->output, buffer); -- if (status != MMAL_SUCCESS) { -- msg_Err(filter, "Failed to send buffer to output port (status=%"PRIx32" %s)", -- status, mmal_status_to_string(status)); -- mmal_buffer_header_release(buffer); -- picture_Release(picture); -- ret = -1; -- } else { -- atomic_fetch_add(&sys->output_in_transit, 1); -- vlc_sem_post(&sys->sem); +- if (sys->component && sys->component->control->is_enabled) +- mmal_port_disable(sys->component->control); + if (sys->use_passthrough) + { + free(sys); + return; - } ++ } --out: -- return ret; +- if (sys->input && sys->input->is_enabled) +- mmal_port_disable(sys->input); + di_flush(filter); -+ + +- if (sys->output && sys->output->is_enabled) +- mmal_port_disable(sys->output); + if (sys->component && sys->component->control->is_enabled) + mmal_port_disable(sys->component->control); -+ -+ if (sys->component && sys->component->is_enabled) -+ mmal_component_disable(sys->component); -+ + + if (sys->component && sys->component->is_enabled) + mmal_component_disable(sys->component); + +- while ((buffer = mmal_queue_get(sys->filtered_pictures))) { +- picture_t *pic = (picture_t *)buffer->user_data; +- picture_Release(pic); + if (sys->in_pool != NULL) + mmal_pool_destroy(sys->in_pool); + + hw_mmal_port_pool_ref_release(sys->out_ppr, false); + // Once we exit filter & sys are invalid so mark as such -+ sys->output->userdata = NULL; ++ if (sys->output != NULL) ++ sys->output->userdata = NULL; ++ ++ if (sys->is_cma) ++ { ++ if (sys->output && sys->output->is_enabled) ++ mmal_port_disable(sys->output); ++ ++ cma_buf_pool_deletez(&sys->cma_out_pool); + ++ if (sys->out_pool != NULL) ++ mmal_pool_destroy(sys->out_pool); + } + +- if (sys->filtered_pictures) +- mmal_queue_destroy(sys->filtered_pictures); + if (sys->out_q != NULL) + mmal_queue_destroy(sys->out_q); + + if (sys->component) + mmal_component_release(sys->component); + +- vlc_sem_destroy(&sys->sem); ++ cma_vcsm_exit(sys->vcsm_init_type); + -+ if (sys->component) -+ mmal_component_release(sys->component); -+ -+ free(sys); + free(sys); ++} + -+ bcm_host_deinit(); + +- bcm_host_deinit(); ++static bool is_fmt_valid_in(const vlc_fourcc_t fmt) ++{ ++ return fmt == VLC_CODEC_MMAL_OPAQUE || ++ fmt == VLC_CODEC_MMAL_ZC_I420 || ++ fmt == VLC_CODEC_MMAL_ZC_SAND8; } --static void fill_output_port(filter_t *filter) -+ +-static int send_output_buffer(filter_t *filter) +static int OpenMmalDeinterlace(filter_t *filter) { - filter_sys_t *sys = filter->p_sys; -- /* allow at least 2 buffers in transit */ -- unsigned max_buffers_in_transit = __MAX(2, MIN_NUM_BUFFERS_IN_TRANSIT); -- int buffers_available = sys->output->buffer_num - -- atomic_load(&sys->output_in_transit) - -- mmal_queue_length(sys->filtered_pictures); -- int buffers_to_send = max_buffers_in_transit - sys->output_in_transit; -- int i; +- MMAL_BUFFER_HEADER_T *buffer; + int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ? + CLOCK_FREQ * filter->fmt_in.video.i_frame_rate_base / + filter->fmt_in.video.i_frame_rate : 0; + + int ret = VLC_EGENERIC; -+ MMAL_STATUS_T status; + MMAL_STATUS_T status; +- picture_t *picture; +- int ret = 0; + filter_sys_t *sys; + + msg_Dbg(filter, "<<< %s", __func__); - -- if (buffers_to_send > buffers_available) -- buffers_to_send = buffers_available; -+ if (filter->fmt_in.video.i_chroma != VLC_CODEC_MMAL_OPAQUE || -+ filter->fmt_out.video.i_chroma != VLC_CODEC_MMAL_OPAQUE) ++ ++ if (!is_fmt_valid_in(filter->fmt_in.video.i_chroma) || ++ filter->fmt_out.video.i_chroma != filter->fmt_in.video.i_chroma) + return VLC_EGENERIC; --#ifndef NDEBUG -- msg_Dbg(filter, "Send %d buffers to output port (available: %d, in_transit: %d, buffer_num: %d)", -- buffers_to_send, buffers_available, sys->output_in_transit, -- sys->output->buffer_num); -+#if TRACE_ALL -+ msg_Dbg(filter, "Try to open mmal_deinterlace filter. frame_duration: %d, QPU %s!", -+ frame_duration, use_qpu ? "used" : "unused"); - #endif -- for (i = 0; i < buffers_to_send; ++i) { -- if (send_output_buffer(filter) < 0) -- break; -+ +- if (!sys->output->is_enabled) { +- ret = VLC_EGENERIC; +- goto out; + sys = calloc(1, sizeof(filter_sys_t)); + if (!sys) + return VLC_ENOMEM; + filter->p_sys = sys; + + sys->seq_in = 1; -+ sys->seq_out = 1; -+ sys->half_rate = false; -+ sys->use_qpu = true; -+ sys->use_fast = false; ++ sys->seq_out = 15; ++ sys->is_cma = is_cma_buf_pic_chroma(filter->fmt_out.video.i_chroma); ++ ++ if ((sys->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) { ++ msg_Err(filter, "VCSM init failed"); ++ goto fail; ++ } ++ ++ if (rpi_is_model_pi4()) ++ { ++ sys->half_rate = true; ++ sys->use_qpu = false; ++ sys->use_fast = true; ++ } ++ else ++ { ++ sys->half_rate = false; ++ sys->use_qpu = true; ++ sys->use_fast = false; ++ } + sys->use_passthrough = false; + + if (filter->fmt_in.video.i_width * filter->fmt_in.video.i_height > 768 * 576) @@ -4151,20 +4502,21 @@ + // We get stressed if we have to try too hard - so make life easier + sys->half_rate = true; + // Also check we actually have enough memory to do this -+ if (hw_mmal_get_gpu_mem() < (96 << 20)) ++ // Memory always comes from GPU if Opaque ++ // Assume we have plenty of memory if it comes from CMA ++ if ((!sys->is_cma || sys->vcsm_init_type == VCSM_INIT_LEGACY) && ++ hw_mmal_get_gpu_mem() < (96 << 20)) ++ { + sys->use_passthrough = true; -+ ++ msg_Warn(filter, "Deinterlace bypassed due to lack of GPU memory"); ++ } } --} --static picture_t *deinterlace(filter_t *filter, picture_t *picture) --{ -- filter_sys_t *sys = filter->p_sys; -- MMAL_BUFFER_HEADER_T *buffer; -- picture_t *out_picture = NULL; -- picture_t *ret = NULL; -- MMAL_STATUS_T status; -- unsigned i = 0; +- picture = filter_NewPicture(filter); +- if (!picture) { +- msg_Warn(filter, "Failed to get new picture"); +- ret = -1; +- goto out; + if (var_InheritBool(filter, MMAL_DEINTERLACE_NO_QPU)) + sys->use_qpu = false; + if (var_InheritBool(filter, MMAL_DEINTERLACE_ADV)) @@ -4188,12 +4540,33 @@ + { + filter->pf_video_filter = pass_deinterlace; + filter->pf_flush = pass_flush; ++ // Don't need VCSM - get rid of it now ++ cma_vcsm_exit(sys->vcsm_init_type); ++ sys->vcsm_init_type = VCSM_INIT_NONE; + return 0; + } + -+ bcm_host_init(); ++ { ++ char dbuf0[5], dbuf1[5]; ++ msg_Dbg(filter, "%s: %s,%dx%d [(%d,%d) %d/%d] -> %s,%dx%d [(%d,%d) %dx%d]: %s %s %s", __func__, ++ str_fourcc(dbuf0, filter->fmt_in.video.i_chroma), ++ filter->fmt_in.video.i_width, filter->fmt_in.video.i_height, ++ filter->fmt_in.video.i_x_offset, filter->fmt_in.video.i_y_offset, ++ filter->fmt_in.video.i_visible_width, filter->fmt_in.video.i_visible_height, ++ str_fourcc(dbuf1, filter->fmt_out.video.i_chroma), ++ filter->fmt_out.video.i_width, filter->fmt_out.video.i_height, ++ filter->fmt_out.video.i_x_offset, filter->fmt_out.video.i_y_offset, ++ filter->fmt_out.video.i_visible_width, filter->fmt_out.video.i_visible_height, ++ sys->use_qpu ? "QPU" : "VPU", ++ sys->use_fast ? "FAST" : "ADV", ++ sys->use_passthrough ? "PASS" : sys->half_rate ? "HALF" : "FULL"); + } +- picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate; +- picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base; -- fill_output_port(filter); +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->cmd = 0; + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_DEINTERLACE, &sys->component); + if (status != MMAL_SUCCESS) { + msg_Err(filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", @@ -4201,10 +4574,7 @@ + goto fail; + } -- buffer = picture->p_sys->buffer; -- buffer->user_data = picture; -- buffer->pts = picture->date; -- buffer->cmd = 0; +- mmal_picture_lock(picture); + { + const MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = { + { MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param) }, @@ -4215,10 +4585,111 @@ + { 5 /* Frame type: mixed */, frame_duration, sys->half_rate, sys->use_qpu } + }; +- status = mmal_port_send_buffer(sys->output, buffer); ++ status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", ++ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ } ++ ++ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ status = mmal_port_enable(sys->component->control, control_port_cb); + if (status != MMAL_SUCCESS) { +- msg_Err(filter, "Failed to send buffer to output port (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); +- mmal_buffer_header_release(buffer); +- picture_Release(picture); +- ret = -1; +- } else { +- atomic_fetch_add(&sys->output_in_transit, 1); +- vlc_sem_post(&sys->sem); ++ msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", ++ sys->component->control->name, status, mmal_status_to_string(status)); ++ goto fail; + } + +-out: +- return ret; +-} ++ sys->input = sys->component->input[0]; ++ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ sys->input->format->encoding = vlc_to_mmal_video_fourcc(&filter->fmt_in.video); ++ hw_mmal_vlc_fmt_to_mmal_fmt(sys->input->format, &filter->fmt_in.video); + +-static void fill_output_port(filter_t *filter) +-{ +- filter_sys_t *sys = filter->p_sys; +- /* allow at least 2 buffers in transit */ +- unsigned max_buffers_in_transit = __MAX(2, MIN_NUM_BUFFERS_IN_TRANSIT); +- int buffers_available = sys->output->buffer_num - +- atomic_load(&sys->output_in_transit) - +- mmal_queue_length(sys->filtered_pictures); +- int buffers_to_send = max_buffers_in_transit - sys->output_in_transit; +- int i; ++ es_format_Copy(&filter->fmt_out, &filter->fmt_in); ++ if (!sys->half_rate) ++ filter->fmt_out.video.i_frame_rate *= 2; + +- if (buffers_to_send > buffers_available) +- buffers_to_send = buffers_available; ++ status = mmal_port_format_commit(sys->input); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ sys->input->buffer_size = sys->input->buffer_size_recommended; ++ sys->input->buffer_num = 30; ++// sys->input->buffer_num = sys->input->buffer_num_recommended; + +-#ifndef NDEBUG +- msg_Dbg(filter, "Send %d buffers to output port (available: %d, in_transit: %d, buffer_num: %d)", +- buffers_to_send, buffers_available, sys->output_in_transit, +- sys->output->buffer_num); +-#endif +- for (i = 0; i < buffers_to_send; ++i) { +- if (send_output_buffer(filter) < 0) +- break; ++ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) ++ { ++ msg_Err(filter, "Failed to create input pool"); ++ goto fail; + } +-} + +-static picture_t *deinterlace(filter_t *filter, picture_t *picture) +-{ +- filter_sys_t *sys = filter->p_sys; +- MMAL_BUFFER_HEADER_T *buffer; +- picture_t *out_picture = NULL; +- picture_t *ret = NULL; +- MMAL_STATUS_T status; +- unsigned i = 0; ++ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } + +- fill_output_port(filter); ++ status = mmal_port_enable(sys->input, di_input_port_cb); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", ++ sys->input->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } + +- buffer = picture->p_sys->buffer; +- buffer->user_data = picture; +- buffer->pts = picture->date; +- buffer->cmd = 0; + - if (!picture->p_sys->displayed) { - status = mmal_port_send_buffer(sys->input, buffer); -+ status = mmal_port_parameter_set(sys->component->output[0], &imfx_param.hdr); - if (status != MMAL_SUCCESS) { +- if (status != MMAL_SUCCESS) { - msg_Err(filter, "Failed to send buffer to input port (status=%"PRIx32" %s)", - status, mmal_status_to_string(status)); - picture_Release(picture); @@ -4226,14 +4697,11 @@ - picture->p_sys->displayed = true; - atomic_fetch_add(&sys->input_in_transit, 1); - vlc_sem_post(&sys->sem); -+ msg_Err(filter, "Failed to configure MMAL component %s (status=%"PRIx32" %s)", -+ MMAL_COMPONENT_DEFAULT_DEINTERLACE, status, mmal_status_to_string(status)); -+ goto fail; - } +- } - } else { - picture_Release(picture); - } - +- } +- - /* - * Send output buffers - */ @@ -4252,11 +4720,9 @@ - msg_Dbg(filter, "Failed waiting for filtered picture"); - break; - } -+ sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)filter; -+ status = mmal_port_enable(sys->component->control, control_port_cb); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to enable control port %s (status=%"PRIx32" %s)", -+ sys->component->control->name, status, mmal_status_to_string(status)); ++ if ((sys->out_q = mmal_queue_create()) == NULL) ++ { ++ msg_Err(filter, "Failed to create out Q"); + goto fail; } - if (out_picture) @@ -4264,30 +4730,30 @@ - return ret; -} -+ sys->input = sys->component->input[0]; -+ sys->input->userdata = (struct MMAL_PORT_USERDATA_T *)filter; -+ if (filter->fmt_in.i_codec == VLC_CODEC_MMAL_OPAQUE) -+ sys->input->format->encoding = MMAL_ENCODING_OPAQUE; -+ vlc_to_mmal_video_fmt(sys->input->format, &filter->fmt_in.video); - +- -static void flush(filter_t *filter) -{ - filter_sys_t *sys = filter->p_sys; - MMAL_BUFFER_HEADER_T *buffer; -+ es_format_Copy(&filter->fmt_out, &filter->fmt_in); -+ if (!sys->half_rate) -+ filter->fmt_out.video.i_frame_rate *= 2; ++ sys->output = sys->component->output[0]; ++ mmal_format_full_copy(sys->output->format, sys->input->format); - msg_Dbg(filter, "flush deinterlace filter"); -+ status = mmal_port_format_commit(sys->input); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to commit format for input port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); -+ goto fail; ++ if (!sys->is_cma) ++ { ++ if ((status = hw_mmal_opaque_output(VLC_OBJECT(filter), &sys->out_ppr, sys->output, 5, di_output_port_cb)) != MMAL_SUCCESS) ++ goto fail; + } -+ sys->input->buffer_size = sys->input->buffer_size_recommended; -+ sys->input->buffer_num = 30; -+// sys->input->buffer_num = sys->input->buffer_num_recommended; ++ else ++ { ++ // CMA stuff ++ sys->output->userdata = (struct MMAL_PORT_USERDATA_T *)filter; ++ ++ if ((sys->cma_out_pool = cma_buf_pool_new(8, 8, true, "deinterlace")) == NULL) ++ { ++ msg_Err(filter, "Failed to alloc cma buf pool"); ++ goto fail; ++ } - msg_Dbg(filter, "flush: flush ports (input: %d, output: %d in transit)", - sys->input_in_transit, sys->output_in_transit); @@ -4304,49 +4770,51 @@ - msg_Dbg(filter, "flush: release already filtered pic %p", - (void *)pic); - picture_Release(pic); -+ if ((sys->in_pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) -+ { -+ msg_Err(filter, "Failed to create input pool"); -+ goto fail; - } +- } - atomic_store(&sys->started, false); - msg_Dbg(filter, "flush: done"); -} ++ // Rate control done by CMA in flight logic, so have "inexhaustable" pool here ++ if ((sys->out_pool = mmal_pool_create(30, 0)) == NULL) ++ { ++ msg_Err(filter, "Failed to alloc out pool"); ++ goto fail; ++ } -static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -{ - filter_t *filter = (filter_t *)port->userdata; - MMAL_STATUS_T status; -+ status = port_parameter_set_bool(sys->input, MMAL_PARAMETER_ZERO_COPY, true); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); -+ goto fail; -+ } ++ port_parameter_set_bool(sys->output, MMAL_PARAMETER_ZERO_COPY, true); - if (buffer->cmd == MMAL_EVENT_ERROR) { - status = *(uint32_t *)buffer->data; - msg_Err(filter, "MMAL error %"PRIx32" \"%s\"", status, - mmal_status_to_string(status)); -+ status = mmal_port_enable(sys->input, di_input_port_cb); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(filter, "Failed to enable input port %s (status=%"PRIx32" %s)", -+ sys->input->name, status, mmal_status_to_string(status)); -+ goto fail; - } +- } ++ if ((status = mmal_port_format_commit(sys->output)) != MMAL_SUCCESS) ++ { ++ msg_Err(filter, "Output port format commit failed"); ++ goto fail; ++ } - mmal_buffer_header_release(buffer); -} ++ sys->output->buffer_num = 30; ++ sys->output->buffer_size = sys->output->buffer_size_recommended; -static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) -{ - picture_t *picture = (picture_t *)buffer->user_data; - filter_t *filter = (filter_t *)port->userdata; - filter_sys_t *sys = filter->p_sys; -+ if ((sys->out_q = mmal_queue_create()) == NULL) -+ { -+ msg_Err(filter, "Failed to create out Q"); -+ goto fail; ++ // CB just drops all bufs into out_q ++ if ((status = mmal_port_enable(sys->output, di_output_port_cb)) != MMAL_SUCCESS) ++ { ++ msg_Err(filter, "Failed to enable output port %s (status=%"PRIx32" %s)", ++ sys->output->name, status, mmal_status_to_string(status)); ++ goto fail; ++ } + } - if (picture) { @@ -4354,12 +4822,6 @@ - } else { - msg_Warn(filter, "Got buffer without picture on input port - OOOPS"); - mmal_buffer_header_release(buffer); -+ sys->output = sys->component->output[0]; -+ mmal_format_full_copy(sys->output->format, sys->input->format); -+ -+ if ((status = hw_mmal_opaque_output(VLC_OBJECT(filter), &sys->out_ppr, sys->output, 5, di_output_port_cb)) != MMAL_SUCCESS) -+ goto fail; -+ + status = mmal_component_enable(sys->component); + if (status != MMAL_SUCCESS) { + msg_Err(filter, "Failed to enable component %s (status=%"PRIx32" %s)", @@ -4405,6 +4867,7 @@ + MMAL_DEINTERLACE_FULL_RATE_LONGTEXT, true); + +vlc_module_end() ++ - if (buffer->cmd == 0) { - if (buffer->length > 0) { @@ -4415,7 +4878,7 @@ - picture = (picture_t *)buffer->user_data; - picture_Release(picture); - } - +- - atomic_fetch_sub(&sys->output_in_transit, 1); - vlc_sem_post(&sys->sem); - } else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { @@ -4427,7 +4890,7 @@ -} --- /dev/null +++ b/modules/hw/mmal/mmal_avcodec.c -@@ -0,0 +1,2275 @@ +@@ -0,0 +1,2172 @@ +/***************************************************************************** + * video.c: video decoder using the libavcodec library + ***************************************************************************** @@ -4455,11 +4918,8 @@ +/***************************************************************************** + * Preamble + *****************************************************************************/ -+#ifdef HAVE_CONFIG_H -+# include "config.h" -+#endif ++#include "config.h" + -+#include <vlc_plugin.h> +#include <vlc_common.h> +#include <vlc_codec.h> +#include <vlc_avcodec.h> @@ -4467,125 +4927,310 @@ +#include <vlc_atomic.h> +#include <assert.h> + -+#include "../../codec/avcodec/avcommon.h" -+ -+#include <interface/mmal/mmal.h> -+ +#include <libavcodec/avcodec.h> +#include <libavutil/mem.h> +#include <libavutil/pixdesc.h> -+#include <libavcodec/rpi_zc.h> +#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) +#include <libavutil/mastering_display_metadata.h> +#endif + ++//#include "avcodec.h" ++//#include "va.h" ++ ++#include <vlc_plugin.h> ++#include <libavutil/rpi_sand_fns.h> ++#include <libavcodec/rpi_zc.h> ++#include "../../codec/cc.h" ++#include "../../codec/avcodec/avcommon.h" // ??? Beware over inclusion ++#include "mmal_cma.h" +#include "mmal_picture.h" + +#define TRACE_ALL 0 + -+#define AVPROVIDER(lib) ((lib##_VERSION_MICRO < 100) ? "libav" : "ffmpeg") -+ -+#ifdef HAVE_LIBAVCODEC_AVCODEC_H -+#include <libavcodec/avcodec.h> -+ -+/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg -+ * a is the major version -+ * b and c the minor and micro versions of libav -+ * d and e the minor and micro versions of FFmpeg */ -+#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ -+ ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -+ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) ++#define BUFFERS_IN_FLIGHT 5 // Default max value for in flight buffers ++#define BUFFERS_IN_FLIGHT_UHD 3 // Fewer if very big + -+#ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT -+# define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT -+#endif -+#ifndef AV_CODEC_FLAG_GRAY -+# define AV_CODEC_FLAG_GRAY CODEC_FLAG_GRAY -+#endif -+#ifndef AV_CODEC_FLAG_DR1 -+# define AV_CODEC_FLAG_DR1 CODEC_FLAG_DR1 -+#endif -+#ifndef AV_CODEC_FLAG_DELAY -+# define AV_CODEC_FLAG_DELAY CODEC_FLAG_DELAY -+#endif -+#ifndef AV_CODEC_FLAG2_FAST -+# define AV_CODEC_FLAG2_FAST CODEC_FLAG2_FAST -+#endif -+#ifndef FF_INPUT_BUFFER_PADDING_SIZE -+# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE -+#endif -+#ifndef AV_CODEC_FLAG_INTERLACED_DCT -+# define AV_CODEC_FLAG_INTERLACED_DCT CODEC_FLAG_INTERLACED_DCT -+#endif -+#ifndef AV_CODEC_FLAG_INTERLACED_ME -+# define AV_CODEC_FLAG_INTERLACED_ME CODEC_FLAG_INTERLACED_ME -+#endif -+#ifndef AV_CODEC_FLAG_GLOBAL_HEADER -+# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER -+#endif -+#ifndef AV_CODEC_FLAG_LOW_DELAY -+# define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY -+#endif -+#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME -+# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME -+#endif -+#ifndef AV_INPUT_BUFFER_MIN_SIZE -+# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE -+#endif -+#ifndef FF_MAX_B_FRAMES -+# define FF_MAX_B_FRAMES 16 // FIXME: remove this -+#endif ++#define MMAL_AVCODEC_BUFFERS "mmal-avcodec-buffers" ++#define MMAL_AVCODEC_BUFFERS_TEXT N_("In flight buffer count before blocking.") ++#define MMAL_AVCODEC_BUFFERS_LONGTEXT N_("In flight buffer count before blocking. " \ ++"Beware that incautious changing of this can lead to lockup. " \ ++"Zero will disable the module.") + -+#endif /* HAVE_LIBAVCODEC_AVCODEC_H */ + -+#ifdef HAVE_LIBAVUTIL_AVUTIL_H -+# include <libavutil/avutil.h> ++// Fwd declarations required due to wanting to avoid reworking the original ++// code too much ++static void MmalAvcodecCloseDecoder( vlc_object_t *obj ); + -+/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg -+ * a is the major version -+ * b and c the minor and micro versions of libav -+ * d and e the minor and micro versions of FFmpeg */ -+#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \ -+ ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -+ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) + -+#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) -+# define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL -+#endif ++/***************************************************************************** ++ * decoder_sys_t : decoder descriptor ++ *****************************************************************************/ ++struct decoder_sys_t ++{ ++ AVCodecContext *p_context; ++ const AVCodec *p_codec; + -+#endif /* HAVE_LIBAVUTIL_AVUTIL_H */ ++ /* Video decoder specific part */ ++ date_t pts; + -+#if LIBAVUTIL_VERSION_MAJOR >= 55 -+# define FF_API_AUDIOCONVERT 1 -+#endif ++ /* Closed captions for decoders */ ++ cc_data_t cc; + -+/* libavutil/pixfmt.h */ -+#ifndef PixelFormat -+# define PixelFormat AVPixelFormat -+#endif ++ /* for frame skipping algo */ ++ bool b_hurry_up; ++ bool b_show_corrupted; ++ bool b_from_preroll; ++ enum AVDiscard i_skip_frame; + -+#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H -+# include <libavformat/avformat.h> ++ /* how many decoded frames are late */ ++ int i_late_frames; ++ mtime_t i_late_frames_start; ++ mtime_t i_last_late_delay; + -+#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \ -+ ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -+ (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) ++ /* for direct rendering */ ++ bool b_direct_rendering; ++ atomic_bool b_dr_failure; + -+#endif ++ /* Hack to force display of still pictures */ ++ bool b_first_frame; + -+/***************************************************************************** -+ * Codec fourcc -> libavcodec Codec_id mapping -+ * Sorted by AVCodecID enumeration order -+ *****************************************************************************/ -+struct vlc_avcodec_fourcc ++ ++ /* */ ++ bool palette_sent; ++ ++ /* VA API */ ++// vlc_va_t *p_va; ++ enum PixelFormat pix_fmt; ++ int profile; ++ int level; ++ ++ vlc_sem_t sem_mt; ++ ++ // Rpi vars ++ cma_buf_pool_t * cma_pool; ++ bool pool_alloc_1; ++ vcsm_init_type_t vcsm_init_type; ++ int cma_in_flight_max; ++ // Debug ++ decoder_t * p_dec; ++}; ++ ++ ++static vlc_fourcc_t ++ZcFindVlcChroma(const int i_ffmpeg_chroma) +{ -+ vlc_fourcc_t i_fourcc; -+ unsigned i_codec; ++ switch (i_ffmpeg_chroma) ++ { ++ // This is all we claim to deal with ++ // In theory RGB should be doable within our current framework ++ case AV_PIX_FMT_YUV420P: ++ return VLC_CODEC_MMAL_ZC_I420; ++ case AV_PIX_FMT_SAND128: ++ case AV_PIX_FMT_RPI4_8: ++ return VLC_CODEC_MMAL_ZC_SAND8; ++ case AV_PIX_FMT_SAND64_10: ++ return VLC_CODEC_MMAL_ZC_SAND10; ++ case AV_PIX_FMT_RPI4_10: ++ return VLC_CODEC_MMAL_ZC_SAND30; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++// Pix Fmt conv for MMal ++// video_fromat from ffmpeg pic_fmt ++static int ++ZcGetVlcChroma( video_format_t *fmt, int i_ffmpeg_chroma ) ++{ ++ fmt->i_rmask = 0; ++ fmt->i_gmask = 0; ++ fmt->i_bmask = 0; ++ fmt->i_chroma = ZcFindVlcChroma(i_ffmpeg_chroma); ++ ++ return fmt->i_chroma == 0 ? -1 : 0; ++} ++ ++ ++// Format chooser is way simpler than vlc ++static enum PixelFormat ++ZcGetFormat(AVCodecContext *p_context, const enum PixelFormat *pi_fmt) ++{ ++ enum PixelFormat swfmt = avcodec_default_get_format(p_context, pi_fmt); ++ for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++) ++ { ++ if (ZcFindVlcChroma(pi_fmt[i]) != 0) ++ return pi_fmt[i]; ++ } ++ return swfmt; ++} ++ ++ ++static void cma_avbuf_pool_free(void * v) ++{ ++ cma_buf_unref(v); ++} ++ ++static unsigned int zc_buf_vcsm_handle(void * v) ++{ ++ return cma_buf_vcsm_handle(v); ++} ++ ++static unsigned int zc_buf_vc_handle(void * v) ++{ ++ return cma_buf_vc_handle(v); ++} ++ ++static void * zc_buf_map_arm(void * v) ++{ ++ return cma_buf_addr(v); ++} ++ ++static unsigned int zc_buf_map_vc(void * v) ++{ ++ return cma_buf_vc_addr(v); ++} ++ ++ ++ ++static const av_rpi_zc_buf_fn_tab_t zc_buf_fn_tab = { ++ .free = cma_avbuf_pool_free, ++ ++ .vcsm_handle = zc_buf_vcsm_handle, ++ .vc_handle = zc_buf_vc_handle, ++ .map_arm = zc_buf_map_arm, ++ .map_vc = zc_buf_map_vc +}; + ++ ++static AVBufferRef * ++zc_alloc_buf(void * v, size_t size, const AVRpiZcFrameGeometry * geo) ++{ ++ decoder_t * const dec = v; ++ decoder_sys_t * const sys = dec->p_sys; ++ ++ VLC_UNUSED(geo); ++ ++ assert(sys != NULL); ++ ++ const unsigned int dec_pool_req = av_rpi_zc_get_decoder_pool_size(sys->p_context->opaque); ++ if (dec_pool_req != 0) ++ { ++ cma_buf_pool_resize(sys->cma_pool, dec_pool_req + sys->cma_in_flight_max, sys->cma_in_flight_max); ++ ++ if (!sys->pool_alloc_1) ++ { ++ sys->pool_alloc_1 = true; ++ msg_Dbg(dec, "Pool size: (%d+%d) * %zd", dec_pool_req, sys->cma_in_flight_max, size); ++ if (cma_buf_pool_fill(sys->cma_pool, size) != 0) ++ msg_Warn(dec, "Failed to preallocate decoder pool (%d+%d) * %zd", dec_pool_req, sys->cma_in_flight_max, size); ++ } ++ } ++ ++ void * const cmabuf = cma_buf_pool_alloc_buf(sys->cma_pool, size); ++ ++ if (cmabuf == NULL) ++ { ++ msg_Err(dec, "CMA buf pool alloc buf failed"); ++ return NULL; ++ } ++ ++ AVBufferRef *const avbuf = av_rpi_zc_buf(cma_buf_size(cmabuf), 0, cmabuf, &zc_buf_fn_tab); ++ ++ if (avbuf == NULL) ++ { ++ msg_Err(dec, "av_rpi_zc_buf failed"); ++ cma_buf_unref(cmabuf); ++ return NULL; ++ } ++ ++ return avbuf; ++} ++ ++static void ++zc_free_pool(void * v) ++{ ++ decoder_t * const dec = v; ++ cma_buf_pool_delete(dec->p_sys->cma_pool); ++} ++ ++ ++static const uint8_t shift_01[] = {0,1,1,1}; ++static const uint8_t pb_1[] = {1,1,1,1}; ++static const uint8_t pb_12[] = {1,2,2,2}; ++static const uint8_t pb_24[] = {2,4,4,4}; ++static const uint8_t pb_4[] = {4,4,4,4}; ++ ++static int set_pic_from_frame(picture_t * const pic, const AVFrame * const frame) ++{ ++ const uint8_t * hs = shift_01; ++ const uint8_t * ws = shift_01; ++ const uint8_t * pb = pb_1; ++ ++ switch (pic->format.i_chroma) ++ { ++ case VLC_CODEC_MMAL_ZC_RGB32: ++ pic->i_planes = 1; ++ pb = pb_4; ++ break; ++ case VLC_CODEC_MMAL_ZC_I420: ++ pic->i_planes = 3; ++ break; ++ case VLC_CODEC_MMAL_ZC_SAND8: ++ pic->i_planes = 2; ++ pb = pb_12; ++ break; ++ case VLC_CODEC_MMAL_ZC_SAND10: ++ case VLC_CODEC_MMAL_ZC_SAND30: // Lies: SAND30 is "special" ++ pic->i_planes = 2; ++ pb = pb_24; ++ break; ++ default: ++ return VLC_EGENERIC; ++ } ++ ++ const cma_buf_t * const cb = cma_buf_pic_get(pic); ++ uint8_t * const data = cma_buf_addr(cb); ++ if (data == NULL) { ++ return VLC_ENOMEM; ++ } ++ ++ uint8_t * frame_end = frame->data[0] + cma_buf_size(cb); ++ for (int i = 0; i != pic->i_planes; ++i) { ++ // Calculate lines from gap between planes ++ // This will give us an accurate "height" for later use by MMAL ++ const int lines = ((i + 1 == pic->i_planes ? frame_end : frame->data[i + 1]) - ++ frame->data[i]) / frame->linesize[i]; ++ pic->p[i] = (plane_t){ ++ .p_pixels = data + (frame->data[i] - frame->data[0]), ++ .i_lines = lines, ++ .i_pitch = frame->linesize[i], ++ .i_pixel_pitch = pb[i], ++ .i_visible_lines = av_frame_cropped_height(frame) >> hs[i], ++ .i_visible_pitch = av_frame_cropped_width(frame) >> ws[i] ++ }; ++ } ++ return 0; ++} ++ ++ ++//============================================================================ ++// ++// Nicked from avcodec/fourcc.c ++// ++// * Really we should probably use that directly ++ +/* + * Video Codecs + */ ++ ++struct vlc_avcodec_fourcc ++{ ++ vlc_fourcc_t i_fourcc; ++ unsigned i_codec; ++}; ++ ++ +static const struct vlc_avcodec_fourcc video_codecs[] = +{ + { VLC_CODEC_MP1V, AV_CODEC_ID_MPEG1VIDEO }, @@ -4723,6 +5368,9 @@ + /* AV_CODEC_ID_V210X */ + { VLC_CODEC_TMV, AV_CODEC_ID_TMV }, + { VLC_CODEC_V210, AV_CODEC_ID_V210 }, ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100 ++ { VLC_CODEC_VUYA, AV_CODEC_ID_AYUV }, ++#endif + /* AV_CODEC_ID_DPX */ + { VLC_CODEC_MAD, AV_CODEC_ID_MAD }, + { VLC_CODEC_FRWU, AV_CODEC_ID_FRWU }, @@ -4804,7 +5452,6 @@ + /* ffmpeg only: AV_CODEC_ID_AVRP */ + /* ffmpeg only: AV_CODEC_ID_012V */ + /* ffmpeg only: AV_CODEC_ID_AVUI */ -+ /* ffmpeg only: AV_CODEC_ID_AYUV */ + /* ffmpeg only: AV_CODEC_ID_TARGA_Y216 */ + /* ffmpeg only: AV_CODEC_ID_V308 */ + /* ffmpeg only: AV_CODEC_ID_V408 */ @@ -4837,231 +5484,16 @@ +#endif +}; + -+/* -+ * Audio Codecs -+ */ -+static const struct vlc_avcodec_fourcc audio_codecs[] = -+{ -+ /* PCM */ -+ { VLC_CODEC_S16L, AV_CODEC_ID_PCM_S16LE }, -+ { VLC_CODEC_S16B, AV_CODEC_ID_PCM_S16BE }, -+ { VLC_CODEC_U16L, AV_CODEC_ID_PCM_U16LE }, -+ { VLC_CODEC_U16B, AV_CODEC_ID_PCM_U16BE }, -+ { VLC_CODEC_S8, AV_CODEC_ID_PCM_S8 }, -+ { VLC_CODEC_U8, AV_CODEC_ID_PCM_U8 }, -+ { VLC_CODEC_MULAW, AV_CODEC_ID_PCM_MULAW }, -+ { VLC_CODEC_ALAW, AV_CODEC_ID_PCM_ALAW }, -+ { VLC_CODEC_S32L, AV_CODEC_ID_PCM_S32LE }, -+ { VLC_CODEC_S32B, AV_CODEC_ID_PCM_S32BE }, -+ { VLC_CODEC_U32L, AV_CODEC_ID_PCM_U32LE }, -+ { VLC_CODEC_U32B, AV_CODEC_ID_PCM_U32BE }, -+ { VLC_CODEC_S24L, AV_CODEC_ID_PCM_S24LE }, -+ { VLC_CODEC_S24B, AV_CODEC_ID_PCM_S24BE }, -+ { VLC_CODEC_U24L, AV_CODEC_ID_PCM_U24LE }, -+ { VLC_CODEC_U24B, AV_CODEC_ID_PCM_U24BE }, -+ { VLC_CODEC_S24DAUD, AV_CODEC_ID_PCM_S24DAUD }, -+ /* AV_CODEC_ID_PCM_ZORK */ -+ { VLC_CODEC_S16L_PLANAR, AV_CODEC_ID_PCM_S16LE_PLANAR }, -+ /* AV_CODEC_ID_PCM_DVD */ -+ { VLC_CODEC_F32B, AV_CODEC_ID_PCM_F32BE }, -+ { VLC_CODEC_F32L, AV_CODEC_ID_PCM_F32LE }, -+ { VLC_CODEC_F64B, AV_CODEC_ID_PCM_F64BE }, -+ { VLC_CODEC_F64L, AV_CODEC_ID_PCM_F64LE }, -+ { VLC_CODEC_BD_LPCM, AV_CODEC_ID_PCM_BLURAY }, -+ /* AV_CODEC_ID_PCM_LXF */ -+ /* AV_CODEC_ID_S302M */ -+ /* AV_CODEC_ID_PCM_S8_PLANAR */ -+ /* AV_CODEC_ID_PCM_S24LE_PLANAR */ -+ /* AV_CODEC_ID_PCM_S32LE_PLANAR */ -+ /* ffmpeg only: AV_CODEC_ID_PCM_S16BE_PLANAR */ -+ -+ /* ADPCM */ -+ { VLC_CODEC_ADPCM_IMA_QT, AV_CODEC_ID_ADPCM_IMA_QT }, -+ { VLC_CODEC_ADPCM_IMA_WAV, AV_CODEC_ID_ADPCM_IMA_WAV }, -+ /* AV_CODEC_ID_ADPCM_IMA_DK3 */ -+ /* AV_CODEC_ID_ADPCM_IMA_DK4 */ -+ { VLC_CODEC_ADPCM_IMA_WS, AV_CODEC_ID_ADPCM_IMA_WS }, -+ /* AV_CODEC_ID_ADPCM_IMA_SMJPEG */ -+ { VLC_CODEC_ADPCM_MS, AV_CODEC_ID_ADPCM_MS }, -+ { VLC_CODEC_ADPCM_4XM, AV_CODEC_ID_ADPCM_4XM }, -+ { VLC_CODEC_ADPCM_XA, AV_CODEC_ID_ADPCM_XA }, -+ { VLC_CODEC_ADPCM_ADX, AV_CODEC_ID_ADPCM_ADX }, -+ { VLC_CODEC_ADPCM_EA, AV_CODEC_ID_ADPCM_EA }, -+ { VLC_CODEC_ADPCM_G726, AV_CODEC_ID_ADPCM_G726 }, -+ { VLC_CODEC_ADPCM_CREATIVE, AV_CODEC_ID_ADPCM_CT }, -+ { VLC_CODEC_ADPCM_SWF, AV_CODEC_ID_ADPCM_SWF }, -+ { VLC_CODEC_ADPCM_YAMAHA, AV_CODEC_ID_ADPCM_YAMAHA }, -+ { VLC_CODEC_ADPCM_SBPRO_4, AV_CODEC_ID_ADPCM_SBPRO_4 }, -+ { VLC_CODEC_ADPCM_SBPRO_3, AV_CODEC_ID_ADPCM_SBPRO_3 }, -+ { VLC_CODEC_ADPCM_SBPRO_2, AV_CODEC_ID_ADPCM_SBPRO_2 }, -+ { VLC_CODEC_ADPCM_THP, AV_CODEC_ID_ADPCM_THP }, -+ { VLC_CODEC_ADPCM_IMA_AMV, AV_CODEC_ID_ADPCM_IMA_AMV }, -+ { VLC_CODEC_ADPCM_EA_R1, AV_CODEC_ID_ADPCM_EA_R1 }, -+ /* AV_CODEC_ID_ADPCM_EA_R3 */ -+ /* AV_CODEC_ID_ADPCM_EA_R2 */ -+ { VLC_CODEC_ADPCM_IMA_EA_SEAD, AV_CODEC_ID_ADPCM_IMA_EA_SEAD }, -+ /* AV_CODEC_ID_ADPCM_IMA_EA_EACS */ -+ /* AV_CODEC_ID_ADPCM_EA_XAS */ -+ /* AV_CODEC_ID_ADPCM_EA_MAXIS_XA */ -+ /* AV_CODEC_ID_ADPCM_IMA_ISS */ -+ { VLC_CODEC_ADPCM_G722, AV_CODEC_ID_ADPCM_G722 }, -+ { VLC_CODEC_ADPCM_IMA_APC, AV_CODEC_ID_ADPCM_IMA_APC }, -+ /* ffmpeg only: AV_CODEC_ID_VIMA */ -+ /* ffmpeg only: AV_CODEC_ID_ADPCM_AFC */ -+ /* ffmpeg only: AV_CODEC_ID_ADPCM_IMA_OKI */ -+ /* ffmpeg only: AV_CODEC_ID_ADPCM_DTK */ -+ /* ffmpeg only: AV_CODEC_ID_ADPCM_IMA_RAD */ -+ /* ffmpeg only: AV_CODEC_ID_ADPCM_G726LE */ -+ -+ /* AMR */ -+ { VLC_CODEC_AMR_NB, AV_CODEC_ID_AMR_NB }, -+ { VLC_CODEC_AMR_WB, AV_CODEC_ID_AMR_WB }, -+ -+ /* RealAudio */ -+ { VLC_CODEC_RA_144, AV_CODEC_ID_RA_144 }, -+ { VLC_CODEC_RA_288, AV_CODEC_ID_RA_288 }, -+ -+ /* DPCM */ -+ { VLC_CODEC_ROQ_DPCM, AV_CODEC_ID_ROQ_DPCM }, -+ { VLC_CODEC_INTERPLAY_DPCM, AV_CODEC_ID_INTERPLAY_DPCM }, -+ /* AV_CODEC_ID_XAN_DPCM */ -+ /* AV_CODEC_ID_SOL_DPCM */ -+ -+ /* audio codecs */ -+ { VLC_CODEC_MPGA, AV_CODEC_ID_MP2 }, -+ { VLC_CODEC_MP2, AV_CODEC_ID_MP2 }, -+ { VLC_CODEC_MP3, AV_CODEC_ID_MP3 }, -+ { VLC_CODEC_MP4A, AV_CODEC_ID_AAC }, -+ { VLC_CODEC_A52, AV_CODEC_ID_AC3 }, -+ { VLC_CODEC_DTS, AV_CODEC_ID_DTS }, -+ { VLC_CODEC_VORBIS, AV_CODEC_ID_VORBIS }, -+ { VLC_CODEC_DVAUDIO, AV_CODEC_ID_DVAUDIO }, -+ { VLC_CODEC_WMA1, AV_CODEC_ID_WMAV1 }, -+ { VLC_CODEC_WMA2, AV_CODEC_ID_WMAV2 }, -+ { VLC_CODEC_MACE3, AV_CODEC_ID_MACE3 }, -+ { VLC_CODEC_MACE6, AV_CODEC_ID_MACE6 }, -+ { VLC_CODEC_VMDAUDIO, AV_CODEC_ID_VMDAUDIO }, -+ { VLC_CODEC_FLAC, AV_CODEC_ID_FLAC }, -+ /* AV_CODEC_ID_MP3ADU */ -+ /* AV_CODEC_ID_MP3ON4 */ -+ { VLC_CODEC_SHORTEN, AV_CODEC_ID_SHORTEN }, -+ { VLC_CODEC_ALAC, AV_CODEC_ID_ALAC }, -+ /* AV_CODEC_ID_WESTWOOD_SND1 */ -+ { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, -+ { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, -+#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+ { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, -+#endif -+ { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, -+ { VLC_CODEC_TRUESPEECH, AV_CODEC_ID_TRUESPEECH }, -+ { VLC_CODEC_TTA, AV_CODEC_ID_TTA }, -+ { VLC_CODEC_SMACKAUDIO, AV_CODEC_ID_SMACKAUDIO }, -+ { VLC_CODEC_QCELP, AV_CODEC_ID_QCELP }, -+ { VLC_CODEC_WAVPACK, AV_CODEC_ID_WAVPACK }, -+ { VLC_CODEC_DSICINAUDIO, AV_CODEC_ID_DSICINAUDIO }, -+ { VLC_CODEC_IMC, AV_CODEC_ID_IMC }, -+ { VLC_CODEC_MUSEPACK7, AV_CODEC_ID_MUSEPACK7 }, -+ { VLC_CODEC_MLP, AV_CODEC_ID_MLP }, -+ { VLC_CODEC_GSM_MS, AV_CODEC_ID_GSM_MS }, -+ { VLC_CODEC_ATRAC3, AV_CODEC_ID_ATRAC3 }, -+ { VLC_CODEC_APE, AV_CODEC_ID_APE }, -+ { VLC_CODEC_NELLYMOSER, AV_CODEC_ID_NELLYMOSER }, -+ { VLC_CODEC_MUSEPACK8, AV_CODEC_ID_MUSEPACK8 }, -+ { VLC_CODEC_SPEEX, AV_CODEC_ID_SPEEX }, -+ { VLC_CODEC_WMAS, AV_CODEC_ID_WMAVOICE }, -+ { VLC_CODEC_WMAP, AV_CODEC_ID_WMAPRO }, -+ { VLC_CODEC_WMAL, AV_CODEC_ID_WMALOSSLESS }, -+ { VLC_CODEC_ATRAC3P, AV_CODEC_ID_ATRAC3P }, -+ { VLC_CODEC_EAC3, AV_CODEC_ID_EAC3 }, -+ { VLC_CODEC_SIPR, AV_CODEC_ID_SIPR }, -+ /* AV_CODEC_ID_MP1 */ -+ { VLC_CODEC_TWINVQ, AV_CODEC_ID_TWINVQ }, -+ { VLC_CODEC_TRUEHD, AV_CODEC_ID_TRUEHD }, -+ { VLC_CODEC_ALS, AV_CODEC_ID_MP4ALS }, -+ { VLC_CODEC_ATRAC1, AV_CODEC_ID_ATRAC1 }, -+ { VLC_CODEC_BINKAUDIO_RDFT, AV_CODEC_ID_BINKAUDIO_RDFT }, -+ { VLC_CODEC_BINKAUDIO_DCT, AV_CODEC_ID_BINKAUDIO_DCT }, -+ { VLC_CODEC_MP4A, AV_CODEC_ID_AAC_LATM }, -+ /* AV_CODEC_ID_QDMC */ -+ /* AV_CODEC_ID_CELT */ -+ { VLC_CODEC_G723_1, AV_CODEC_ID_G723_1 }, -+ /* AV_CODEC_ID_G729 */ -+ /* AV_CODEC_ID_8SVX_EXP */ -+ /* AV_CODEC_ID_8SVX_FIB */ -+ { VLC_CODEC_BMVAUDIO, AV_CODEC_ID_BMV_AUDIO }, -+ { VLC_CODEC_RALF, AV_CODEC_ID_RALF }, -+ { VLC_CODEC_INDEO_AUDIO, AV_CODEC_ID_IAC }, -+ /* AV_CODEC_ID_ILBC */ -+ { VLC_CODEC_OPUS, AV_CODEC_ID_OPUS }, -+ /* AV_CODEC_ID_COMFORT_NOISE */ -+ { VLC_CODEC_TAK, AV_CODEC_ID_TAK }, -+ { VLC_CODEC_METASOUND, AV_CODEC_ID_METASOUND }, -+ /* AV_CODEC_ID_PAF_AUDIO */ -+ { VLC_CODEC_ON2AVC, AV_CODEC_ID_ON2AVC }, -+ -+ /* ffmpeg only: AV_CODEC_ID_FFWAVESYNTH */ -+ /* ffmpeg only: AV_CODEC_ID_SONIC */ -+ /* ffmpeg only: AV_CODEC_ID_SONIC_LS */ -+ /* ffmpeg only: AV_CODEC_ID_PAF_AUDIO */ -+ /* ffmpeg only: AV_CODEC_ID_EVRC */ -+ /* ffmpeg only: AV_CODEC_ID_SMV */ -+}; -+ -+/* Subtitle streams */ -+static const struct vlc_avcodec_fourcc spu_codecs[] = -+{ -+ { VLC_CODEC_SPU, AV_CODEC_ID_DVD_SUBTITLE }, -+ { VLC_CODEC_DVBS, AV_CODEC_ID_DVB_SUBTITLE }, -+ { VLC_CODEC_SUBT, AV_CODEC_ID_TEXT }, -+ { VLC_CODEC_XSUB, AV_CODEC_ID_XSUB }, -+ { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, -+ /* AV_CODEC_ID_MOV_TEXT */ -+ { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, -+#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+ { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, -+#endif -+ { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, -+ /* AV_CODEC_ID_SRT */ -+ /* ffmpeg only: AV_CODEC_ID_MICRODVD */ -+ /* ffmpeg only: AV_CODEC_ID_EIA_608 */ -+ /* ffmpeg only: AV_CODEC_ID_JACOSUB */ -+ /* ffmpeg only: AV_CODEC_ID_SAMI */ -+ /* ffmpeg only: AV_CODEC_ID_REALTEXT */ -+ /* ffmpeg only: AV_CODEC_ID_SUBVIEWER1 */ -+ /* ffmpeg only: AV_CODEC_ID_SUBVIEWER */ -+ /* ffmpeg only: AV_CODEC_ID_SUBRIP */ -+ /* ffmpeg only: AV_CODEC_ID_WEBVTT */ -+ /* ffmpeg only: AV_CODEC_ID_MPL2 */ -+ /* ffmpeg only: AV_CODEC_ID_VPLAYER */ -+ /* ffmpeg only: AV_CODEC_ID_PJS */ -+ /* ffmpeg only: AV_CODEC_ID_ASS */ -+}; -+ -+static bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc, ++// *** Really we should probably use GetFfmpegCodec with a pre-kludge for the bits we care about ++static bool ++ZcGetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc, + unsigned *pi_ffmpeg_codec, const char **ppsz_name ) +{ + const struct vlc_avcodec_fourcc *base; + size_t count; + -+ switch( cat ) -+ { -+ case VIDEO_ES: -+ base = video_codecs; -+ count = ARRAY_SIZE(video_codecs); -+ break; -+ case AUDIO_ES: -+ base = audio_codecs; -+ count = ARRAY_SIZE(audio_codecs); -+ break; -+ case SPU_ES: -+ base = spu_codecs; -+ count = ARRAY_SIZE(spu_codecs); -+ break; -+ default: -+ base = NULL; -+ count = 0; -+ } -+ ++ base = video_codecs; ++ count = ARRAY_SIZE(video_codecs); + i_fourcc = vlc_fourcc_GetCodec( cat, i_fourcc ); + + for( size_t i = 0; i < count; i++ ) @@ -5078,163 +5510,13 @@ + return false; +} + -+/***************************************************************************** -+ * Chroma fourcc -> libavutil pixfmt mapping -+ *****************************************************************************/ -+#if defined(WORDS_BIGENDIAN) -+# define VLC_RGB_ES( fcc, leid, beid ) \ -+ { fcc, beid, 0, 0, 0 }, -+#else -+# define VLC_RGB_ES( fcc, leid, beid ) \ -+ { fcc, leid, 0, 0, 0 }, -+#endif -+ -+#define VLC_RGB( fcc, leid, beid, rmask, gmask, bmask ) \ -+ { fcc, leid, rmask, gmask, bmask }, \ -+ { fcc, beid, bmask, gmask, rmask }, \ -+ VLC_RGB_ES( fcc, leid, beid ) -+ -+ -+static const struct -+{ -+ vlc_fourcc_t i_chroma; -+ int i_chroma_id; -+ uint32_t i_rmask; -+ uint32_t i_gmask; -+ uint32_t i_bmask; -+ -+} chroma_table[] = -+{ -+ // Sand -+// {VLC_CODEC_MMAL_OPAQUE, AV_PIX_FMT_SAND128, 0, 0, 0 }, -+ {VLC_CODEC_MMAL_ZC_SAND8, AV_PIX_FMT_SAND128, 0, 0, 0 }, -+ {VLC_CODEC_MMAL_ZC_SAND10, AV_PIX_FMT_SAND64_10, 0, 0, 0 }, -+ -+ /* Planar YUV formats */ -+ {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 }, -+ {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 }, -+ -+ {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 }, -+ {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 }, + -+ {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 }, -+ {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 }, + -+ {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 }, -+ {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 }, -+ {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 }, -+ {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 }, -+ {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 }, -+ {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 }, -+ {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 }, ++//============================================================================ ++// Derived from codec/avcodec/avcodec.c + -+ {VLC_CODEC_NV12, AV_PIX_FMT_NV12, 0, 0, 0 }, -+ {VLC_CODEC_NV21, AV_PIX_FMT_NV21, 0, 0, 0 }, -+ -+ {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 }, -+ {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, -+ {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, -+ {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, -+#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+ {VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 }, -+ {VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 }, -+#endif -+ {VLC_CODEC_I420_16L, AV_PIX_FMT_YUV420P16LE, 0, 0, 0 }, -+ {VLC_CODEC_I420_16B, AV_PIX_FMT_YUV420P16BE, 0, 0, 0 }, -+#ifdef AV_PIX_FMT_P010 -+ {VLC_CODEC_P010, AV_PIX_FMT_P010, 0, 0, 0 }, -+#endif -+ -+ {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 }, -+ {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, -+ {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, -+ {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, -+#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+ {VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 }, -+ {VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 }, -+#endif -+ -+ {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 }, -+ {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 }, -+ {VLC_CODEC_YUVA, AV_PIX_FMT_YUVA444P, 0, 0, 0 }, -+ -+ {VLC_CODEC_YUVA_444_10L, AV_PIX_FMT_YUVA444P10LE, 0, 0, 0 }, -+ {VLC_CODEC_YUVA_444_10B, AV_PIX_FMT_YUVA444P10BE, 0, 0, 0 }, -+ -+ {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 }, -+ {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, -+ {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, -+ {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, -+#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) ) -+ {VLC_CODEC_I444_12L, AV_PIX_FMT_YUV444P12LE, 0, 0, 0 }, -+ {VLC_CODEC_I444_12B, AV_PIX_FMT_YUV444P12BE, 0, 0, 0 }, -+#endif -+ {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 }, -+ {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 }, -+ -+ /* Packed YUV formats */ -+ {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 }, -+ {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 }, -+ {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 }, -+ {VLC_CODEC_YVYU, AV_PIX_FMT_YVYU422, 0, 0, 0 }, -+ {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 }, -+ -+ /* Packed RGB formats */ -+ VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) -+ VLC_RGB( VLC_CODEC_RGB8, AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) -+ -+ VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) -+ VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) -+ VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, 0xff0000, 0x00ff00, 0x0000ff ) -+ -+ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) -+ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) -+ -+#ifdef AV_PIX_FMT_0BGR32 -+ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) -+#endif -+ -+ {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, -+ {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, -+ {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 }, -+ {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0}, -+ -+ /* Paletized RGB */ -+ {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0}, -+ -+ {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 }, -+ {VLC_CODEC_GBR_PLANAR_9L, AV_PIX_FMT_GBRP9LE, 0, 0, 0 }, -+ {VLC_CODEC_GBR_PLANAR_9B, AV_PIX_FMT_GBRP9BE, 0, 0, 0 }, -+ {VLC_CODEC_GBR_PLANAR_10L, AV_PIX_FMT_GBRP10LE, 0, 0, 0 }, -+ {VLC_CODEC_GBR_PLANAR_10B, AV_PIX_FMT_GBRP10BE, 0, 0, 0 }, -+ -+ /* XYZ */ -+#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100) -+ {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0}, -+#endif -+ { 0, 0, 0, 0, 0 } -+}; -+ -+static int GetVlcChroma( video_format_t *fmt, int i_ffmpeg_chroma ) -+{ -+ /* TODO FIXME for rgb format we HAVE to set rgb mask/shift */ -+ for( int i = 0; chroma_table[i].i_chroma != 0; i++ ) -+ { -+ if( chroma_table[i].i_chroma_id == i_ffmpeg_chroma ) -+ { -+ fmt->i_rmask = chroma_table[i].i_rmask; -+ fmt->i_gmask = chroma_table[i].i_gmask; -+ fmt->i_bmask = chroma_table[i].i_bmask; -+ fmt->i_chroma = chroma_table[i].i_chroma; -+ return VLC_SUCCESS; -+ } -+ } -+ return VLC_EGENERIC; -+} -+ -+//#include "../codec/cc.h" -+ -+static AVCodecContext *ffmpeg_AllocContext( decoder_t *p_dec, ++static AVCodecContext * ++ZcFfmpeg_AllocContext( decoder_t *p_dec, + const AVCodec **restrict codecp ) +{ + unsigned i_codec_id; @@ -5242,7 +5524,7 @@ + const AVCodec *p_codec = NULL; + + /* *** determine codec type *** */ -+ if( !GetFfmpegCodec( p_dec->fmt_in.i_cat, p_dec->fmt_in.i_codec, ++ if( !ZcGetFfmpegCodec( p_dec->fmt_in.i_cat, p_dec->fmt_in.i_codec, + &i_codec_id, &psz_namecodec ) ) + return NULL; + @@ -5267,7 +5549,18 @@ + free( psz_decoder ); + } + if( !p_codec ) -+ p_codec = avcodec_find_decoder( i_codec_id ); ++// p_codec = avcodec_find_decoder( i_codec_id ); ++ { ++ if( p_dec->fmt_in.i_codec != VLC_CODEC_HEVC ) ++ p_codec = avcodec_find_decoder(i_codec_id); ++ else ++ { ++ psz_namecodec = rpi_is_model_pi4() ? "hevc" : "hevc_rpi"; ++ msg_Info(p_dec, "Looking for HEVC decoder '%s'", psz_namecodec); ++ p_codec = avcodec_find_decoder_by_name(psz_namecodec); ++ } ++ } ++ + if( !p_codec ) + { + msg_Dbg( p_dec, "codec not found (%s)", psz_namecodec ); @@ -5286,7 +5579,12 @@ + return avctx; +} + -+static int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *ctx, ++/***************************************************************************** ++ * ffmpeg_OpenCodec: ++ *****************************************************************************/ ++ ++static int ++ZcFfmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *ctx, + const AVCodec *codec ) +{ + char *psz_opts = var_InheritString( p_dec, "avcodec-options" ); @@ -5298,7 +5596,7 @@ + free(psz_opts); + } + -+ if (av_rpi_zc_init(ctx) != 0) ++ if (av_rpi_zc_init2(ctx, p_dec, zc_alloc_buf, zc_free_pool) != 0) + { + msg_Err(p_dec, "Failed to init AV ZC"); + return VLC_EGENERIC; @@ -5324,58 +5622,35 @@ + return VLC_SUCCESS; +} + ++//============================================================================ ++// Derived from 3.0.7.1 codec/avcodec/video.c + -+/***************************************************************************** -+ * decoder_sys_t : decoder descriptor -+ *****************************************************************************/ -+struct decoder_sys_t ++static inline void wait_mt(decoder_sys_t *sys) +{ -+ AVCodecContext *p_context; -+ const AVCodec *p_codec; -+ -+ /* Video decoder specific part */ -+ date_t pts; -+ -+ /* Closed captions for decoders */ -+// cc_data_t cc; -+ -+ /* for frame skipping algo */ -+ bool b_hurry_up; -+ bool b_show_corrupted; -+ bool b_from_preroll; -+ enum AVDiscard i_skip_frame; -+ -+ /* how many decoded frames are late */ -+ int i_late_frames; -+ mtime_t i_late_frames_start; -+ mtime_t i_last_late_delay; -+ -+ /* for direct rendering */ -+ bool b_direct_rendering; -+ atomic_bool b_dr_failure; -+ -+ /* Hack to force display of still pictures */ -+ bool b_first_frame; -+ -+ -+ /* */ -+ bool palette_sent; -+ -+ /* VA API */ -+// vlc_va_t *p_va; -+ enum AVPixelFormat pix_fmt; -+ int profile; -+ int level; ++#if 1 ++ // As we only ever update the output in our main thread this lock is ++ // redundant ++ VLC_UNUSED(sys); ++#else ++ vlc_sem_wait(&sys->sem_mt); ++#endif ++} + -+ MMAL_POOL_T * out_pool; -+}; ++static inline void post_mt(decoder_sys_t *sys) ++{ ++#if 1 ++ // As we only ever update the output in our main thread this lock is ++ // redundant ++ VLC_UNUSED(sys); ++#else ++ vlc_sem_post(&sys->sem_mt); ++#endif ++} + +/***************************************************************************** + * Local prototypes + *****************************************************************************/ +static void ffmpeg_InitCodec ( decoder_t * ); -+static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *, -+ const enum PixelFormat * ); +static int DecodeVideo( decoder_t *, block_t * ); +static void Flush( decoder_t * ); + @@ -5401,6 +5676,11 @@ + + video_format_Init(fmt, 0); + ++#if 1 ++ VLC_UNUSED(sw_pix_fmt); ++ if ((fmt->i_chroma = ZcFindVlcChroma(pix_fmt)) == 0) ++ return -1; ++#else + if (pix_fmt == sw_pix_fmt) + { /* software decoding */ + int aligns[AV_NUM_DATA_POINTERS]; @@ -5417,8 +5697,9 @@ + + avcodec_align_dimensions2(ctx, &width, &height, aligns); + } -+// else /* hardware decoding */ -+// fmt->i_chroma = vlc_va_GetChroma(pix_fmt, sw_pix_fmt); ++ else /* hardware decoding */ ++ fmt->i_chroma = vlc_va_GetChroma(pix_fmt, sw_pix_fmt); ++#endif + + if( width == 0 || height == 0 || width > 8192 || height > 8192 || + width < ctx->width || height < ctx->height ) @@ -5470,8 +5751,21 @@ + * __MAX(ctx->ticks_per_frame, 1); + } + -+ if( ctx->color_range == AVCOL_RANGE_JPEG ) ++ /* FIXME we should only set the known values and let the core decide ++ * later of fallbacks, but we can't do that with a boolean */ ++ switch ( ctx->color_range ) ++ { ++ case AVCOL_RANGE_JPEG: + fmt->b_color_range_full = true; ++ break; ++ case AVCOL_RANGE_UNSPECIFIED: ++ fmt->b_color_range_full = !vlc_fourcc_IsYUV( fmt->i_chroma ); ++ break; ++ case AVCOL_RANGE_MPEG: ++ default: ++ fmt->b_color_range_full = false; ++ break; ++ } + + switch( ctx->colorspace ) + { @@ -5569,10 +5863,15 @@ +{ + video_format_t fmt_out; + int val; -+ ++#if TRACE_ALL ++ msg_Dbg(dec, "<<< %s", __func__); ++#endif + val = lavc_GetVideoFormat(dec, &fmt_out, ctx, fmt, swfmt); + if (val) ++ { ++ msg_Dbg(dec, "Failed to get format"); + return val; ++ } + + /* always have date in fields/ticks units */ + if(dec->p_sys->pts.i_divider_num) @@ -5584,7 +5883,7 @@ + __MAX(ctx->ticks_per_frame, 1), + fmt_out.i_frame_rate_base); + -+ fmt_out.p_palette = dec->fmt_out.video.p_palette; ++ fmt_out.p_palette = dec-> fmt_out.video.p_palette; + dec->fmt_out.video.p_palette = NULL; + + es_format_Change(&dec->fmt_out, VIDEO_ES, fmt_out.i_chroma); @@ -5597,516 +5896,646 @@ + dec->fmt_out.video.mastering = dec->fmt_in.video.mastering; + dec->fmt_out.video.lighting = dec->fmt_in.video.lighting; + -+ return decoder_UpdateVideoFormat(dec); ++ val = decoder_UpdateVideoFormat(dec); ++#if TRACE_ALL ++ msg_Dbg(dec, ">>> %s: rv=%d", __func__, val); ++#endif ++ return val; +} + -+/***************************************************************************** -+ * Flush: -+ *****************************************************************************/ -+static void Flush( decoder_t *p_dec ) ++static int OpenVideoCodec( decoder_t *p_dec ) +{ + decoder_sys_t *p_sys = p_dec->p_sys; -+ AVCodecContext *p_context = p_sys->p_context; -+ -+ date_Set(&p_sys->pts, VLC_TS_INVALID); /* To make sure we recover properly */ -+ p_sys->i_late_frames = 0; -+// cc_Flush( &p_sys->cc ); ++ AVCodecContext *ctx = p_sys->p_context; ++ const AVCodec *codec = p_sys->p_codec; ++ int ret; + -+ /* Abort pictures in order to unblock all avcodec workers threads waiting -+ * for a picture. This will avoid a deadlock between avcodec_flush_buffers -+ * and workers threads */ -+ decoder_AbortPictures( p_dec, true ); ++ if( ctx->extradata_size <= 0 ) ++ { ++ if( codec->id == AV_CODEC_ID_VC1 || ++ codec->id == AV_CODEC_ID_THEORA ) ++ { ++ msg_Warn( p_dec, "waiting for extra data for codec %s", ++ codec->name ); ++ return 1; ++ } ++ } + -+ /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */ -+ if( avcodec_is_open( p_context ) ) -+ avcodec_flush_buffers( p_context ); ++ ctx->width = p_dec->fmt_in.video.i_visible_width; ++ ctx->height = p_dec->fmt_in.video.i_visible_height; + -+ /* Reset cancel state to false */ -+ decoder_AbortPictures( p_dec, false ); -+} ++ ctx->coded_width = p_dec->fmt_in.video.i_width; ++ ctx->coded_height = p_dec->fmt_in.video.i_height; + -+static bool check_block_validity( decoder_sys_t *p_sys, block_t *block ) -+{ -+ if( !block) -+ return true; ++ ctx->bits_per_coded_sample = p_dec->fmt_in.video.i_bits_per_pixel; ++ p_sys->pix_fmt = AV_PIX_FMT_NONE; ++ p_sys->profile = -1; ++ p_sys->level = -1; ++ cc_Init( &p_sys->cc ); + -+ if( block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) ++ set_video_color_settings( &p_dec->fmt_in.video, ctx ); ++ if( p_dec->fmt_in.video.i_frame_rate_base && ++ p_dec->fmt_in.video.i_frame_rate && ++ (double) p_dec->fmt_in.video.i_frame_rate / ++ p_dec->fmt_in.video.i_frame_rate_base < 6 ) + { -+ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ -+// cc_Flush( &p_sys->cc ); ++ ctx->flags |= AV_CODEC_FLAG_LOW_DELAY; ++ } + -+ p_sys->i_late_frames = 0; -+ if( block->i_flags & BLOCK_FLAG_CORRUPTED ) -+ { -+ block_Release( block ); -+ return false; -+ } ++ post_mt( p_sys ); ++ ret = ZcFfmpeg_OpenCodec( p_dec, ctx, codec ); ++ wait_mt( p_sys ); ++ if( ret < 0 ) ++ return ret; ++ ++ switch( ctx->active_thread_type ) ++ { ++ case FF_THREAD_FRAME: ++ msg_Dbg( p_dec, "using frame thread mode with %d threads", ++ ctx->thread_count ); ++ break; ++ case FF_THREAD_SLICE: ++ msg_Dbg( p_dec, "using slice thread mode with %d threads", ++ ctx->thread_count ); ++ break; ++ case 0: ++ if( ctx->thread_count > 1 ) ++ msg_Warn( p_dec, "failed to enable threaded decoding" ); ++ break; ++ default: ++ msg_Warn( p_dec, "using unknown thread mode with %d threads", ++ ctx->thread_count ); ++ break; + } -+ return true; ++ return 0; +} + -+static bool check_block_being_late( decoder_sys_t *p_sys, block_t *block, mtime_t current_time) ++/***************************************************************************** ++ * InitVideo: initialize the video decoder ++ ***************************************************************************** ++ * the ffmpeg codec will be opened, some memory allocated. The vout is not yet ++ * opened (done after the first decoded frame). ++ *****************************************************************************/ ++static int MmalAvcodecOpenDecoder( vlc_object_t *obj ) +{ -+ if( !block ) -+ return false; -+ if( block->i_flags & BLOCK_FLAG_PREROLL ) ++ decoder_t *p_dec = (decoder_t *)obj; ++ const AVCodec *p_codec; ++ ++ int extra_buffers = var_InheritInteger(p_dec, MMAL_AVCODEC_BUFFERS); ++ ++ if (extra_buffers < 0) + { -+ /* Do not care about late frames when prerolling -+ * TODO avoid decoding of non reference frame -+ * (ie all B except for H264 where it depends only on nal_ref_idc) */ -+ p_sys->i_late_frames = 0; -+ p_sys->b_from_preroll = true; -+ p_sys->i_last_late_delay = INT64_MAX; ++ extra_buffers = p_dec->fmt_in.video.i_height * p_dec->fmt_in.video.i_width >= 1920 * 1088 ? ++ BUFFERS_IN_FLIGHT_UHD : BUFFERS_IN_FLIGHT; + } + -+ if( p_sys->i_late_frames <= 0 ) -+ return false; ++ if (extra_buffers <= 0) ++ { ++ msg_Dbg(p_dec, "%s: extra_buffers=%d - cannot use module", __func__, extra_buffers); ++ return VLC_EGENERIC; ++ } + -+ if( current_time - p_sys->i_late_frames_start > (5*CLOCK_FREQ)) ++ const vcsm_init_type_t vcsm_type = cma_vcsm_init(); ++ const int vcsm_size = ++ vcsm_type == VCSM_INIT_LEGACY ? hw_mmal_get_gpu_mem() : 512 << 20; ++ ++#if 1 + { -+ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ -+ block_Release( block ); -+ p_sys->i_late_frames--; -+ return true; ++ char buf1[5], buf2[5], buf2a[5]; ++ char buf3[5], buf4[5]; ++ uint32_t in_fcc = 0; ++ msg_Dbg(p_dec, "%s: <<< (%s/%s)[%s] %dx%d -> (%s/%s) %dx%d [%s/%d] xb:%d", __func__, ++ str_fourcc(buf1, p_dec->fmt_in.i_codec), ++ str_fourcc(buf2, p_dec->fmt_in.video.i_chroma), ++ str_fourcc(buf2a, in_fcc), ++ p_dec->fmt_in.video.i_width, p_dec->fmt_in.video.i_height, ++ str_fourcc(buf3, p_dec->fmt_out.i_codec), ++ str_fourcc(buf4, p_dec->fmt_out.video.i_chroma), ++ p_dec->fmt_out.video.i_width, p_dec->fmt_out.video.i_height, ++ cma_vcsm_init_str(vcsm_type), vcsm_size, extra_buffers); + } -+ return false; -+} ++#endif + -+static bool check_frame_should_be_dropped( decoder_sys_t *p_sys, AVCodecContext *p_context, bool *b_need_output_picture ) -+{ -+ if( p_sys->i_late_frames <= 4) -+ return false; ++ if( vcsm_type == VCSM_INIT_NONE ) ++ return VLC_EGENERIC; ++#if 1 ++ if( (p_dec->fmt_in.i_codec != VLC_CODEC_HEVC && ++ (vcsm_type == VCSM_INIT_CMA || vcsm_size < (96 << 20))) || ++ (p_dec->fmt_in.i_codec == VLC_CODEC_HEVC && ++ vcsm_size < (128 << 20))) ++ { ++ cma_vcsm_exit(vcsm_type); ++ return VLC_EGENERIC; ++ } ++#endif + -+ *b_need_output_picture = false; -+ if( p_sys->i_late_frames < 12 ) ++ AVCodecContext *p_context = ZcFfmpeg_AllocContext( p_dec, &p_codec ); ++ if( p_context == NULL ) + { -+ p_context->skip_frame = -+ (p_sys->i_skip_frame <= AVDISCARD_NONREF) ? -+ AVDISCARD_NONREF : p_sys->i_skip_frame; ++ cma_vcsm_exit(vcsm_type); ++ return VLC_EGENERIC; + } -+ else ++ ++ int i_val; ++ ++ /* Allocate the memory needed to store the decoder's structure */ ++ decoder_sys_t *p_sys = calloc( 1, sizeof(*p_sys) ); ++ if( unlikely(p_sys == NULL) ) + { -+ /* picture too late, won't decode -+ * but break picture until a new I, and for mpeg4 ...*/ -+ p_sys->i_late_frames--; /* needed else it will never be decrease */ -+ return true; ++ avcodec_free_context( &p_context ); ++ cma_vcsm_exit(vcsm_type); ++ return VLC_ENOMEM; + } -+ return false; -+} + -+static void interpolate_next_pts( decoder_t *p_dec, AVFrame *frame ) -+{ -+ decoder_sys_t *p_sys = p_dec->p_sys; -+ AVCodecContext *p_context = p_sys->p_context; ++ p_dec->p_sys = p_sys; ++ p_sys->p_context = p_context; ++ p_sys->p_codec = p_codec; ++ p_sys->p_dec = p_dec; ++// p_sys->p_va = NULL; ++ p_sys->cma_in_flight_max = extra_buffers; ++ p_sys->vcsm_init_type = vcsm_type; ++ vlc_sem_init( &p_sys->sem_mt, 0 ); + -+ if( date_Get( &p_sys->pts ) == VLC_TS_INVALID || -+ p_sys->pts.i_divider_num == 0 ) -+ return; ++ /* ***** Fill p_context with init values ***** */ ++ p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_original_fourcc ? ++ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec ); + -+ int i_tick = p_context->ticks_per_frame; -+ if( i_tick <= 0 ) -+ i_tick = 1; ++ /* ***** Get configuration of ffmpeg plugin ***** */ ++ p_context->workaround_bugs = ++ var_InheritInteger( p_dec, "avcodec-workaround-bugs" ); ++ p_context->err_recognition = ++ var_InheritInteger( p_dec, "avcodec-error-resilience" ); + -+ /* interpolate the next PTS */ -+ date_Increment( &p_sys->pts, i_tick + frame->repeat_pict ); -+} ++ if( var_CreateGetBool( p_dec, "grayscale" ) ) ++ p_context->flags |= AV_CODEC_FLAG_GRAY; + -+static void update_late_frame_count( decoder_t *p_dec, block_t *p_block, mtime_t current_time, mtime_t i_pts ) -+{ -+ decoder_sys_t *p_sys = p_dec->p_sys; -+ /* Update frame late count (except when doing preroll) */ -+ mtime_t i_display_date = VLC_TS_INVALID; -+ if( !p_block || !(p_block->i_flags & BLOCK_FLAG_PREROLL) ) -+ i_display_date = decoder_GetDisplayDate( p_dec, i_pts ); ++ /* ***** Output always the frames ***** */ ++ p_context->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT; + -+ if( i_display_date > VLC_TS_INVALID && i_display_date <= current_time ) -+ { -+ /* Out of preroll, consider only late frames on rising delay */ -+ if( p_sys->b_from_preroll ) -+ { -+ if( p_sys->i_last_late_delay > current_time - i_display_date ) -+ { -+ p_sys->i_last_late_delay = current_time - i_display_date; -+ return; -+ } -+ p_sys->b_from_preroll = false; -+ } ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skiploopfilter" ); ++ if( i_val >= 4 ) p_context->skip_loop_filter = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_context->skip_loop_filter = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_context->skip_loop_filter = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_context->skip_loop_filter = AVDISCARD_NONREF; ++ else p_context->skip_loop_filter = AVDISCARD_DEFAULT; + -+ p_sys->i_late_frames++; -+ if( p_sys->i_late_frames == 1 ) -+ p_sys->i_late_frames_start = current_time; ++ if( var_CreateGetBool( p_dec, "avcodec-fast" ) ) ++ p_context->flags2 |= AV_CODEC_FLAG2_FAST; + -+ } -+ else -+ { -+ p_sys->i_late_frames = 0; -+ } -+} ++ /* ***** libavcodec frame skipping ***** */ ++ p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" ); ++ p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" ); + ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-frame" ); ++ if( i_val >= 4 ) p_sys->i_skip_frame = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_sys->i_skip_frame = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_sys->i_skip_frame = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_sys->i_skip_frame = AVDISCARD_NONREF; ++ else if( i_val == -1 ) p_sys->i_skip_frame = AVDISCARD_NONE; ++ else p_sys->i_skip_frame = AVDISCARD_DEFAULT; ++ p_context->skip_frame = p_sys->i_skip_frame; + -+static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_pic ) -+{ -+// decoder_sys_t *p_sys = p_dec->p_sys; -+ bool format_changed = false; ++ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-idct" ); ++ if( i_val >= 4 ) p_context->skip_idct = AVDISCARD_ALL; ++ else if( i_val == 3 ) p_context->skip_idct = AVDISCARD_NONKEY; ++ else if( i_val == 2 ) p_context->skip_idct = AVDISCARD_BIDIR; ++ else if( i_val == 1 ) p_context->skip_idct = AVDISCARD_NONREF; ++ else if( i_val == -1 ) p_context->skip_idct = AVDISCARD_NONE; ++ else p_context->skip_idct = AVDISCARD_DEFAULT; + -+#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) -+#define FROM_AVRAT(default_factor, avrat) \ -+(uint64_t)(default_factor) * (avrat).num / (avrat).den -+ const AVFrameSideData *metadata = -+ av_frame_get_side_data( frame, -+ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA ); -+ if ( metadata ) ++ /* ***** libavcodec direct rendering ***** */ ++ p_sys->b_direct_rendering = false; ++ atomic_init(&p_sys->b_dr_failure, false); ++ if( var_CreateGetBool( p_dec, "avcodec-dr" ) && ++ (p_codec->capabilities & AV_CODEC_CAP_DR1) && ++ /* No idea why ... but this fixes flickering on some TSCC streams */ ++ p_sys->p_codec->id != AV_CODEC_ID_TSCC && ++ p_sys->p_codec->id != AV_CODEC_ID_CSCD && ++ p_sys->p_codec->id != AV_CODEC_ID_CINEPAK ) + { -+ const AVMasteringDisplayMetadata *hdr_meta = -+ (const AVMasteringDisplayMetadata *) metadata->data; -+ if ( hdr_meta->has_luminance ) -+ { -+#define ST2086_LUMA_FACTOR 10000 -+ p_pic->format.mastering.max_luminance = -+ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->max_luminance); -+ p_pic->format.mastering.min_luminance = -+ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->min_luminance); -+ } -+ if ( hdr_meta->has_primaries ) -+ { -+#define ST2086_RED 2 -+#define ST2086_GREEN 0 -+#define ST2086_BLUE 1 -+#define LAV_RED 0 -+#define LAV_GREEN 1 -+#define LAV_BLUE 2 -+#define ST2086_PRIM_FACTOR 50000 -+ p_pic->format.mastering.primaries[ST2086_RED*2 + 0] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][0]); -+ p_pic->format.mastering.primaries[ST2086_RED*2 + 1] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][1]); -+ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 0] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][0]); -+ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 1] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][1]); -+ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 0] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][0]); -+ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 1] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][1]); -+ p_pic->format.mastering.white_point[0] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[0]); -+ p_pic->format.mastering.white_point[1] = -+ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[1]); -+ } -+ -+ if ( memcmp( &p_dec->fmt_out.video.mastering, -+ &p_pic->format.mastering, -+ sizeof(p_pic->format.mastering) ) ) -+ { -+ p_dec->fmt_out.video.mastering = p_pic->format.mastering; -+ format_changed = true; -+ } -+#undef FROM_AVRAT ++ /* Some codecs set pix_fmt only after the 1st frame has been decoded, ++ * so we need to do another check in ffmpeg_GetFrameBuf() */ ++ p_sys->b_direct_rendering = true; + } ++ ++ p_context->get_format = ZcGetFormat; ++#if 0 ++ p_context->get_format = ffmpeg_GetFormat; ++ /* Always use our get_buffer wrapper so we can calculate the ++ * PTS correctly */ ++ p_context->get_buffer2 = lavc_GetFrame; ++ p_context->opaque = p_dec; +#endif -+#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 60, 100 ) ) -+ const AVFrameSideData *metadata_lt = -+ av_frame_get_side_data( frame, -+ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ); -+ if ( metadata_lt ) ++ ++ int i_thread_count = var_InheritInteger( p_dec, "avcodec-threads" ); ++ if( i_thread_count <= 0 ) ++#if 1 + { -+ const AVContentLightMetadata *light_meta = -+ (const AVContentLightMetadata *) metadata_lt->data; -+ p_pic->format.lighting.MaxCLL = light_meta->MaxCLL; -+ p_pic->format.lighting.MaxFALL = light_meta->MaxFALL; -+ if ( memcmp( &p_dec->fmt_out.video.lighting, -+ &p_pic->format.lighting, -+ sizeof(p_pic->format.lighting) ) ) -+ { -+ p_dec->fmt_out.video.lighting = p_pic->format.lighting; -+ format_changed = true; -+ } ++ // Pick 5 threads for everything on Pi except for HEVC where the h/w ++ // really limits the useful size to 3 ++ i_thread_count = p_codec->id == AV_CODEC_ID_HEVC ? 3 : 5; ++ } ++#else ++ { ++ i_thread_count = vlc_GetCPUCount(); ++ if( i_thread_count > 1 ) ++ i_thread_count++; ++ ++ //FIXME: take in count the decoding time ++#if VLC_WINSTORE_APP ++ i_thread_count = __MIN( i_thread_count, 6 ); ++#else ++ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6 ); ++#endif + } ++ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); +#endif ++ msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); ++ p_context->thread_count = i_thread_count; ++ p_context->thread_safe_callbacks = true; + -+ if (format_changed && decoder_UpdateVideoFormat( p_dec )) -+ return -1; -+#if 0 -+ const AVFrameSideData *p_avcc = av_frame_get_side_data( frame, AV_FRAME_DATA_A53_CC ); -+ if( p_avcc ) ++ switch( p_codec->id ) + { -+ cc_Extract( &p_sys->cc, CC_PAYLOAD_RAW, true, p_avcc->data, p_avcc->size ); -+ if( p_sys->cc.b_reorder || p_sys->cc.i_data ) -+ { -+ block_t *p_cc = block_Alloc( p_sys->cc.i_data ); -+ if( p_cc ) -+ { -+ memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data ); -+ if( p_sys->cc.b_reorder ) -+ p_cc->i_dts = p_cc->i_pts = p_pic->date; -+ else -+ p_cc->i_pts = p_cc->i_dts; -+ decoder_cc_desc_t desc; -+ desc.i_608_channels = p_sys->cc.i_608channels; -+ desc.i_708_channels = p_sys->cc.i_708channels; -+ desc.i_reorder_depth = 4; -+ decoder_QueueCc( p_dec, p_cc, &desc ); -+ } -+ cc_Flush( &p_sys->cc ); -+ } ++ case AV_CODEC_ID_MPEG4: ++ case AV_CODEC_ID_H263: ++ p_context->thread_type = 0; ++ break; ++ case AV_CODEC_ID_MPEG1VIDEO: ++ case AV_CODEC_ID_MPEG2VIDEO: ++ p_context->thread_type &= ~FF_THREAD_SLICE; ++ /* fall through */ ++# if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 1, 0)) ++ case AV_CODEC_ID_H264: ++ case AV_CODEC_ID_VC1: ++ case AV_CODEC_ID_WMV3: ++ p_context->thread_type &= ~FF_THREAD_FRAME; ++# endif ++ default: ++ break; ++ } ++ ++ if( p_context->thread_type & FF_THREAD_FRAME ) ++ p_dec->i_extra_picture_buffers = 2 * p_context->thread_count; ++ ++ /* ***** misc init ***** */ ++ date_Init(&p_sys->pts, 1, 30001); ++ date_Set(&p_sys->pts, VLC_TS_INVALID); ++ p_sys->b_first_frame = true; ++ p_sys->i_late_frames = 0; ++ p_sys->b_from_preroll = false; ++ ++ /* Set output properties */ ++ if( ZcGetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS ) ++ { ++ /* we are doomed. but not really, because most codecs set their pix_fmt later on */ ++// p_dec->fmt_out.i_codec = VLC_CODEC_I420; ++ p_dec->fmt_out.i_codec = VLC_CODEC_MMAL_ZC_I420; ++ } ++ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; ++ ++ p_dec->fmt_out.video.orientation = p_dec->fmt_in.video.orientation; ++ ++ if( p_dec->fmt_in.video.p_palette ) { ++ p_sys->palette_sent = false; ++ p_dec->fmt_out.video.p_palette = malloc( sizeof(video_palette_t) ); ++ if( p_dec->fmt_out.video.p_palette ) ++ *p_dec->fmt_out.video.p_palette = *p_dec->fmt_in.video.p_palette; ++ } else ++ p_sys->palette_sent = true; ++ ++ if ((p_sys->cma_pool = cma_buf_pool_new(p_sys->cma_in_flight_max, p_sys->cma_in_flight_max, false, "mmal_avcodec")) == NULL) ++ { ++ msg_Err(p_dec, "CMA pool alloc failure"); ++ goto fail; ++ } ++ ++ /* ***** init this codec with special data ***** */ ++ ffmpeg_InitCodec( p_dec ); ++ ++ /* ***** Open the codec ***** */ ++ if( OpenVideoCodec( p_dec ) < 0 ) ++ { ++ vlc_sem_destroy( &p_sys->sem_mt ); ++ free( p_sys ); ++ avcodec_free_context( &p_context ); ++ return VLC_EGENERIC; ++ } ++ ++ p_dec->pf_decode = DecodeVideo; ++ p_dec->pf_flush = Flush; ++ ++ /* XXX: Writing input format makes little sense. */ ++ if( p_context->profile != FF_PROFILE_UNKNOWN ) ++ p_dec->fmt_in.i_profile = p_context->profile; ++ if( p_context->level != FF_LEVEL_UNKNOWN ) ++ p_dec->fmt_in.i_level = p_context->level; ++ ++#if 1 ++ // Most of the time we have nothing useful by way of a format here ++ // wait till we've decoded something ++#else ++ // Update output format ++ if (lavc_UpdateVideoFormat(p_dec, p_context, p_context->pix_fmt, ++ p_context->pix_fmt) != 0) ++ { ++ msg_Err(p_dec, "Unable to update format: pix_fmt=%d", p_context->pix_fmt); ++// goto fail; + } +#endif -+ return 0; -+} + ++#if TRACE_ALL ++ msg_Dbg(p_dec, "<<< %s: OK", __func__); ++#endif ++ return VLC_SUCCESS; + ++fail: ++ MmalAvcodecCloseDecoder(VLC_OBJECT(p_dec)); + -+static int OpenVideoCodec( decoder_t *p_dec ) ++#if TRACE_ALL ++ msg_Dbg(p_dec, "<<< %s: FAIL", __func__); ++#endif ++ ++ return VLC_EGENERIC; ++} ++ ++/***************************************************************************** ++ * Flush: ++ *****************************************************************************/ ++static void Flush( decoder_t *p_dec ) +{ + decoder_sys_t *p_sys = p_dec->p_sys; -+ AVCodecContext *ctx = p_sys->p_context; -+ const AVCodec *codec = p_sys->p_codec; -+ int ret; ++ AVCodecContext *p_context = p_sys->p_context; + +#if TRACE_ALL + msg_Dbg(p_dec, "<<< %s", __func__); +#endif + -+ if( ctx->extradata_size <= 0 ) -+ { -+ if( codec->id == AV_CODEC_ID_VC1 || -+ codec->id == AV_CODEC_ID_THEORA ) -+ { -+ msg_Warn( p_dec, "waiting for extra data for codec %s", -+ codec->name ); -+ return 1; -+ } -+ } ++ date_Set(&p_sys->pts, VLC_TS_INVALID); /* To make sure we recover properly */ ++ p_sys->i_late_frames = 0; ++ cc_Flush( &p_sys->cc ); + -+ ctx->width = p_dec->fmt_in.video.i_visible_width; -+ ctx->height = p_dec->fmt_in.video.i_visible_height; ++ /* Abort pictures in order to unblock all avcodec workers threads waiting ++ * for a picture. This will avoid a deadlock between avcodec_flush_buffers ++ * and workers threads */ ++// It would probably be good to use AbortPicture but that often deadlocks on close ++// and given that we wait for pics in the main thread it should be unneeded (whereas ++// cma is alloced in the depths of ffmpeg on its own threads) ++// decoder_AbortPictures( p_dec, true ); ++ cma_buf_pool_cancel(p_sys->cma_pool); + -+ ctx->coded_width = p_dec->fmt_in.video.i_width; -+ ctx->coded_height = p_dec->fmt_in.video.i_height; ++ post_mt( p_sys ); ++ /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */ ++ if( avcodec_is_open( p_context ) ) ++ avcodec_flush_buffers( p_context ); ++ wait_mt( p_sys ); + -+ ctx->bits_per_coded_sample = p_dec->fmt_in.video.i_bits_per_pixel; -+ p_sys->pix_fmt = AV_PIX_FMT_NONE; -+ p_sys->profile = -1; -+ p_sys->level = -1; -+// cc_Init( &p_sys->cc ); ++ /* Reset cancel state to false */ ++ cma_buf_pool_uncancel(p_sys->cma_pool); ++// decoder_AbortPictures( p_dec, false ); + -+ set_video_color_settings( &p_dec->fmt_in.video, ctx ); ++#if TRACE_ALL ++ msg_Dbg(p_dec, ">>> %s", __func__); ++#endif + -+ ret = ffmpeg_OpenCodec( p_dec, ctx, codec ); -+ if( ret < 0 ) -+ return ret; ++} + -+ switch( ctx->active_thread_type ) ++static bool check_block_validity( decoder_sys_t *p_sys, block_t *block ) ++{ ++ if( !block) ++ return true; ++ ++ if( block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + { -+ case FF_THREAD_FRAME: -+ msg_Dbg( p_dec, "using frame thread mode with %d threads", -+ ctx->thread_count ); -+ break; -+ case FF_THREAD_SLICE: -+ msg_Dbg( p_dec, "using slice thread mode with %d threads", -+ ctx->thread_count ); -+ break; -+ case 0: -+ if( ctx->thread_count > 1 ) -+ msg_Warn( p_dec, "failed to enable threaded decoding" ); -+ break; -+ default: -+ msg_Warn( p_dec, "using unknown thread mode with %d threads", -+ ctx->thread_count ); -+ break; ++ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ ++ cc_Flush( &p_sys->cc ); ++ ++ p_sys->i_late_frames = 0; ++ if( block->i_flags & BLOCK_FLAG_CORRUPTED ) ++ { ++ block_Release( block ); ++ return false; ++ } + } -+ return 0; ++ return true; +} + -+static MMAL_BOOL_T -+zc_buf_pre_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) ++static bool check_block_being_late( decoder_sys_t *p_sys, block_t *block, mtime_t current_time) +{ -+ const AVRpiZcRefPtr fr_ref = userdata; -+ VLC_UNUSED(buf); ++ if( !block ) ++ return false; ++ if( block->i_flags & BLOCK_FLAG_PREROLL ) ++ { ++ /* Do not care about late frames when prerolling ++ * TODO avoid decoding of non reference frame ++ * (ie all B except for H264 where it depends only on nal_ref_idc) */ ++ p_sys->i_late_frames = 0; ++ p_sys->b_from_preroll = true; ++ p_sys->i_last_late_delay = INT64_MAX; ++ } + -+ av_rpi_zc_unref(fr_ref); ++ if( p_sys->i_late_frames <= 0 ) ++ return false; + -+ return MMAL_FALSE; ++ if( current_time - p_sys->i_late_frames_start > (5*CLOCK_FREQ)) ++ { ++ date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */ ++ block_Release( block ); ++ p_sys->i_late_frames--; ++ return true; ++ } ++ return false; +} + -+static MMAL_FOURCC_T -+avfmt_to_mmal(const int avfmt) ++static bool check_frame_should_be_dropped( decoder_sys_t *p_sys, AVCodecContext *p_context, bool *b_need_output_picture ) +{ -+ switch( avfmt ) ++ if( p_sys->i_late_frames <= 4) ++ return false; ++ ++ *b_need_output_picture = false; ++ if( p_sys->i_late_frames < 12 ) + { -+ case AV_PIX_FMT_SAND128: -+ return MMAL_ENCODING_YUVUV128; -+ case AV_PIX_FMT_SAND64_10: -+ return MMAL_ENCODING_YUVUV64_10; -+ default: -+ break; ++ p_context->skip_frame = ++ (p_sys->i_skip_frame <= AVDISCARD_NONREF) ? ++ AVDISCARD_NONREF : p_sys->i_skip_frame; + } -+ return MMAL_ENCODING_UNKNOWN; ++ else ++ { ++ /* picture too late, won't decode ++ * but break picture until a new I, and for mpeg4 ...*/ ++ p_sys->i_late_frames--; /* needed else it will never be decrease */ ++ return true; ++ } ++ return false; +} + -+/***************************************************************************** -+ * DecodeBlock: Called to decode one or more frames -+ *****************************************************************************/ ++static mtime_t interpolate_next_pts( decoder_t *p_dec, AVFrame *frame ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ AVCodecContext *p_context = p_sys->p_context; + ++ if( date_Get( &p_sys->pts ) == VLC_TS_INVALID || ++ p_sys->pts.i_divider_num == 0 ) ++ return VLC_TS_INVALID; + -+// Returns -+// -ve error -+// 0 Need more input (EAGAIN) -+// 1 Frame decoded (dropped or Qed) -+// 2 Decode err -+// 3 EOF ++ int i_tick = p_context->ticks_per_frame; ++ if( i_tick <= 0 ) ++ i_tick = 1; + -+static int rx_frame(decoder_t * const p_dec, decoder_sys_t * const p_sys, AVCodecContext * const p_context) ++ /* interpolate the next PTS */ ++ return date_Increment( &p_sys->pts, i_tick + frame->repeat_pict ); ++} ++ ++static void update_late_frame_count( decoder_t *p_dec, block_t *p_block, ++ mtime_t current_time, mtime_t i_pts, ++ mtime_t i_next_pts ) +{ -+ AVFrame * frame = av_frame_alloc(); -+ picture_t * p_pic = NULL; -+ int ret; ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ /* Update frame late count (except when doing preroll) */ ++ mtime_t i_display_date = VLC_TS_INVALID; ++ if( !p_block || !(p_block->i_flags & BLOCK_FLAG_PREROLL) ) ++ i_display_date = decoder_GetDisplayDate( p_dec, i_pts ); + -+ if (frame == NULL) -+ return VLC_ENOMEM; ++ mtime_t i_threshold = i_next_pts != VLC_TS_INVALID ? (i_next_pts - i_pts) / 2 : 20000; ++ ++ if( i_display_date > VLC_TS_INVALID && i_display_date + i_threshold <= current_time ) ++ { ++ /* Out of preroll, consider only late frames on rising delay */ ++ if( p_sys->b_from_preroll ) ++ { ++ if( p_sys->i_last_late_delay > current_time - i_display_date ) ++ { ++ p_sys->i_last_late_delay = current_time - i_display_date; ++ return; ++ } ++ p_sys->b_from_preroll = false; ++ } ++ ++ p_sys->i_late_frames++; ++ if( p_sys->i_late_frames == 1 ) ++ p_sys->i_late_frames_start = current_time; + -+ ret = avcodec_receive_frame(p_context, frame); ++ } ++ else ++ { ++ p_sys->i_late_frames = 0; ++ } ++} ++ ++ ++static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_pic ) ++{ ++ decoder_sys_t *p_sys = p_dec->p_sys; ++ bool format_changed = false; ++ ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) ++#define FROM_AVRAT(default_factor, avrat) \ ++(uint64_t)(default_factor) * (avrat).num / (avrat).den ++ const AVFrameSideData *metadata = ++ av_frame_get_side_data( frame, ++ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA ); ++ if ( metadata ) ++ { ++ const AVMasteringDisplayMetadata *hdr_meta = ++ (const AVMasteringDisplayMetadata *) metadata->data; ++ if ( hdr_meta->has_luminance ) ++ { ++#define ST2086_LUMA_FACTOR 10000 ++ p_pic->format.mastering.max_luminance = ++ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->max_luminance); ++ p_pic->format.mastering.min_luminance = ++ FROM_AVRAT(ST2086_LUMA_FACTOR, hdr_meta->min_luminance); ++ } ++ if ( hdr_meta->has_primaries ) ++ { ++#define ST2086_RED 2 ++#define ST2086_GREEN 0 ++#define ST2086_BLUE 1 ++#define LAV_RED 0 ++#define LAV_GREEN 1 ++#define LAV_BLUE 2 ++#define ST2086_PRIM_FACTOR 50000 ++ p_pic->format.mastering.primaries[ST2086_RED*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][0]); ++ p_pic->format.mastering.primaries[ST2086_RED*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_RED][1]); ++ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][0]); ++ p_pic->format.mastering.primaries[ST2086_GREEN*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_GREEN][1]); ++ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][0]); ++ p_pic->format.mastering.primaries[ST2086_BLUE*2 + 1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->display_primaries[LAV_BLUE][1]); ++ p_pic->format.mastering.white_point[0] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[0]); ++ p_pic->format.mastering.white_point[1] = ++ FROM_AVRAT(ST2086_PRIM_FACTOR, hdr_meta->white_point[1]); ++ } + -+ if (ret != 0) -+ { -+ av_frame_free(&frame); -+ switch (ret) ++ if ( memcmp( &p_dec->fmt_out.video.mastering, ++ &p_pic->format.mastering, ++ sizeof(p_pic->format.mastering) ) ) + { -+ case AVERROR(EAGAIN): -+ return 0; -+ -+ case AVERROR(ENOMEM): -+ case AVERROR(EINVAL): -+ msg_Err(p_dec, "avcodec_receive_frame critical error"); -+ return VLC_EGENERIC; -+ -+ case AVERROR_EOF: -+ msg_Dbg(p_dec, "Rx EOF"); -+ avcodec_flush_buffers(p_context); -+ return 2; -+ -+ default: -+ msg_Warn(p_dec, "Decode error: %d", ret); -+ return 1; ++ p_dec->fmt_out.video.mastering = p_pic->format.mastering; ++ format_changed = true; + } ++#undef FROM_AVRAT + } -+ -+ /* Compute the PTS */ -+#ifdef FF_API_PKT_PTS -+ mtime_t i_pts = frame->pts; -+#else -+ mtime_t i_pts = frame->pkt_pts; +#endif -+ if (i_pts == AV_NOPTS_VALUE ) -+ i_pts = frame->pkt_dts; -+ -+ if( i_pts == AV_NOPTS_VALUE ) -+ i_pts = date_Get( &p_sys->pts ); -+ -+ /* Interpolate the next PTS */ -+ if( i_pts > VLC_TS_INVALID ) -+ date_Set( &p_sys->pts, i_pts ); -+ -+ interpolate_next_pts( p_dec, frame ); -+ -+// update_late_frame_count( p_dec, p_block, current_time, i_pts); //********************* -+ -+ if( ( /* !p_sys->p_va && */ !frame->linesize[0] ) || -+ ( p_dec->b_frame_drop_allowed && (frame->flags & AV_FRAME_FLAG_CORRUPT) && -+ !p_sys->b_show_corrupted ) ) -+ { -+ msg_Dbg(p_dec, "Frame drop"); -+ av_frame_free(&frame); -+ return 1; -+ } -+ -+ lavc_UpdateVideoFormat(p_dec, p_context, p_context->pix_fmt, -+ p_context->pix_fmt); -+ ++#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 60, 100 ) ) ++ const AVFrameSideData *metadata_lt = ++ av_frame_get_side_data( frame, ++ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ); ++ if ( metadata_lt ) + { -+ MMAL_BUFFER_HEADER_T * const buf = mmal_queue_wait(p_sys->out_pool->queue); -+// MMAL_BUFFER_HEADER_T * const buf = mmal_queue_get(p_sys->out_pool->queue); -+ if (buf == NULL) { -+ msg_Err(p_dec, "MMAL buffer alloc failure"); -+ av_frame_free(&frame); -+ return 1; -+ } -+ -+ mmal_buffer_header_reset(buf); // length, offset, flags, pts, dts -+ buf->cmd = 0; -+ buf->user_data = NULL; -+ -+ { -+ const AVRpiZcRefPtr fr_buf = av_rpi_zc_ref(p_context, frame, frame->format, 0); -+ -+ if (fr_buf == NULL) { -+ mmal_buffer_header_release(buf); -+ av_frame_free(&frame); -+ return VLC_ENOMEM; -+ } -+ -+ const intptr_t vc_handle = (intptr_t)av_rpi_zc_vc_handle(fr_buf); -+ -+ buf->data = (uint8_t *)vc_handle; // Cast our handle to a pointer for mmal - 2 steps to avoid gcc warnings -+ buf->offset = av_rpi_zc_offset(fr_buf); -+ buf->length = av_rpi_zc_length(fr_buf); -+ buf->alloc_size = av_rpi_zc_numbytes(fr_buf); -+ buf->flags |= MMAL_BUFFER_HEADER_FLAG_FRAME_END; -+ -+ mmal_buffer_header_pre_release_cb_set(buf, zc_buf_pre_release_cb, fr_buf); -+ } -+ -+ p_pic = decoder_NewPicture(p_dec); // *** Really want an empy pic -+ if (p_pic == NULL) ++ const AVContentLightMetadata *light_meta = ++ (const AVContentLightMetadata *) metadata_lt->data; ++ p_pic->format.lighting.MaxCLL = light_meta->MaxCLL; ++ p_pic->format.lighting.MaxFALL = light_meta->MaxFALL; ++ if ( memcmp( &p_dec->fmt_out.video.lighting, ++ &p_pic->format.lighting, ++ sizeof(p_pic->format.lighting) ) ) + { -+ msg_Err(p_dec, "Picture alloc failure"); -+ mmal_buffer_header_release(buf); -+ av_frame_free(&frame); -+ return VLC_ENOMEM; ++ p_dec->fmt_out.video.lighting = p_pic->format.lighting; ++ format_changed = true; + } -+ -+ p_pic->context = hw_mmal_gen_context(avfmt_to_mmal(frame->format), buf, NULL); + } ++#endif + ++ if (format_changed && decoder_UpdateVideoFormat( p_dec )) ++ return -1; + -+ if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den ) ++ const AVFrameSideData *p_avcc = av_frame_get_side_data( frame, AV_FRAME_DATA_A53_CC ); ++ if( p_avcc ) + { -+ /* Fetch again the aspect ratio in case it changed */ -+ p_dec->fmt_out.video.i_sar_num -+ = p_context->sample_aspect_ratio.num; -+ p_dec->fmt_out.video.i_sar_den -+ = p_context->sample_aspect_ratio.den; -+ -+ if( !p_dec->fmt_out.video.i_sar_num || !p_dec->fmt_out.video.i_sar_den ) ++ cc_Extract( &p_sys->cc, CC_PAYLOAD_RAW, true, p_avcc->data, p_avcc->size ); ++ if( p_sys->cc.b_reorder || p_sys->cc.i_data ) + { -+ p_dec->fmt_out.video.i_sar_num = 1; -+ p_dec->fmt_out.video.i_sar_den = 1; ++ block_t *p_cc = block_Alloc( p_sys->cc.i_data ); ++ if( p_cc ) ++ { ++ memcpy( p_cc->p_buffer, p_sys->cc.p_data, p_sys->cc.i_data ); ++ if( p_sys->cc.b_reorder ) ++ p_cc->i_dts = p_cc->i_pts = p_pic->date; ++ else ++ p_cc->i_pts = p_cc->i_dts; ++ decoder_cc_desc_t desc; ++ desc.i_608_channels = p_sys->cc.i_608channels; ++ desc.i_708_channels = p_sys->cc.i_708channels; ++ desc.i_reorder_depth = 4; ++ decoder_QueueCc( p_dec, p_cc, &desc ); ++ } ++ cc_Flush( &p_sys->cc ); + } + } -+ -+ p_pic->date = i_pts; -+ /* Hack to force display of still pictures */ -+ p_pic->b_force = p_sys->b_first_frame; -+ p_pic->i_nb_fields = 2 + frame->repeat_pict; -+ p_pic->b_progressive = !frame->interlaced_frame; -+ p_pic->b_top_field_first = frame->top_field_first; -+ -+ if (DecodeSidedata(p_dec, frame, p_pic)) -+ i_pts = VLC_TS_INVALID; -+ -+ av_frame_free(&frame); -+ -+ p_sys->b_first_frame = false; -+ decoder_QueueVideo(p_dec, p_pic); -+ -+ return 1; ++ return 0; +} + ++/***************************************************************************** ++ * DecodeBlock: Called to decode one or more frames ++ *****************************************************************************/ + -+ -+ -+ -+static int DecodeVideo( decoder_t *p_dec, block_t * p_block) ++static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error ) +{ + decoder_sys_t *p_sys = p_dec->p_sys; + AVCodecContext *p_context = p_sys->p_context; @@ -6115,8 +6544,18 @@ + + /* Boolean for END_OF_SEQUENCE */ + bool eos_spotted = false; ++ ++#if TRACE_ALL ++ msg_Dbg(p_dec, "<<< %s: (buf_size=%d)", __func__, pp_block == NULL || *pp_block == NULL ? 0 : (*pp_block)->i_buffer); ++#endif ++ ++ block_t *p_block; + mtime_t current_time; -+ int rv = VLCDEC_SUCCESS; ++ picture_t *p_pic = NULL; ++ AVFrame *frame = NULL; ++ ++ // By default we are OK ++ *error = false; + + if( !p_context->extradata_size && p_dec->fmt_in.i_extra ) + { @@ -6125,30 +6564,30 @@ + OpenVideoCodec( p_dec ); + } + ++ p_block = pp_block ? *pp_block : NULL; + if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) ) -+ return VLCDEC_SUCCESS; ++ return NULL; + + if( !avcodec_is_open( p_context ) ) + { + if( p_block ) + block_Release( p_block ); -+ return VLCDEC_ECRITICAL; ++ return NULL; + } + + if( !check_block_validity( p_sys, p_block ) ) -+ return VLCDEC_SUCCESS; ++ return NULL; + + current_time = mdate(); + if( p_dec->b_frame_drop_allowed && check_block_being_late( p_sys, p_block, current_time) ) + { + msg_Err( p_dec, "more than 5 seconds of late video -> " + "dropping frame (computer too slow ?)" ); -+ return VLCDEC_SUCCESS; ++ return NULL; + } + + + /* A good idea could be to decode all I pictures and see for the other */ -+ b_need_output_picture = true; + + /* Defaults that if we aren't in prerolling, we want output picture + same for if we are flushing (p_block==NULL) */ @@ -6170,7 +6609,7 @@ + if( p_block ) + block_Release( p_block ); + msg_Warn( p_dec, "More than 11 late frames, dropping frame" ); -+ return VLCDEC_SUCCESS; ++ return NULL; + } + } + if( !b_need_output_picture ) @@ -6191,74 +6630,318 @@ + p_block = block_Realloc( p_block, 0, + p_block->i_buffer + FF_INPUT_BUFFER_PADDING_SIZE ); + if( !p_block ) -+ return VLCDEC_ECRITICAL; -+ ++ return NULL; + p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE; ++ *pp_block = p_block; + memset( p_block->p_buffer + p_block->i_buffer, 0, + FF_INPUT_BUFFER_PADDING_SIZE ); + } + -+ AVPacket pkt = {.data = NULL, .size = 0}; -+ -+ av_init_packet( &pkt ); -+ if( p_block && p_block->i_buffer > 0 ) ++ while( !p_block || p_block->i_buffer > 0 || eos_spotted ) + { -+ pkt.data = p_block->p_buffer; -+ pkt.size = p_block->i_buffer; -+ pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; -+ pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; -+ } ++ int i_used; ++ AVPacket pkt; + -+ if( !p_sys->palette_sent ) -+ { -+ uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); -+ if (pal) { -+ memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE); -+ p_sys->palette_sent = true; ++ post_mt( p_sys ); ++ ++ av_init_packet( &pkt ); ++ if( p_block && p_block->i_buffer > 0 ) ++ { ++ pkt.data = p_block->p_buffer; ++ pkt.size = p_block->i_buffer; ++ pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; ++ pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; ++ } ++ else ++ { ++ /* Return delayed frames if codec has CODEC_CAP_DELAY */ ++ pkt.data = NULL; ++ pkt.size = 0; + } -+ } + -+#if LIBAVCODEC_VERSION_CHECK( 57, 0, 0xFFFFFFFFU, 64, 101 ) -+ if( !b_need_output_picture ) -+ pkt.flags |= AV_PKT_FLAG_DISCARD; ++ if( !p_sys->palette_sent ) ++ { ++ uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); ++ if (pal) { ++ memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE); ++ p_sys->palette_sent = true; ++ } ++ } ++ ++ /* Make sure we don't reuse the same timestamps twice */ ++ if( p_block ) ++ { ++ p_block->i_pts = ++ p_block->i_dts = VLC_TS_INVALID; ++ } ++ ++ int ret = avcodec_send_packet(p_context, &pkt); ++ if( ret != 0 && ret != AVERROR(EAGAIN) ) ++ { ++ if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) ++ { ++ msg_Err(p_dec, "avcodec_send_packet critical error"); ++ *error = true; ++ } ++ av_packet_unref( &pkt ); ++ break; ++ } ++ i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0; ++ av_packet_unref( &pkt ); ++ ++ frame = av_frame_alloc(); ++ if (unlikely(frame == NULL)) ++ { ++ *error = true; ++ break; ++ } ++ ++ ret = avcodec_receive_frame(p_context, frame); ++ if( ret != 0 && ret != AVERROR(EAGAIN) ) ++ { ++ msg_Dbg(p_dec, "No receive"); ++ if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) ++ { ++ msg_Err(p_dec, "avcodec_receive_frame critical error"); ++ *error = true; ++ } ++ av_frame_free(&frame); ++ /* After draining, we need to reset decoder with a flush */ ++ if( ret == AVERROR_EOF ) ++ avcodec_flush_buffers( p_sys->p_context ); ++ break; ++ } ++ bool not_received_frame = ret; ++ ++ wait_mt( p_sys ); ++ ++ if( eos_spotted ) ++ p_sys->b_first_frame = true; ++ ++ if( p_block ) ++ { ++ if( p_block->i_buffer <= 0 ) ++ eos_spotted = false; ++ ++ /* Consumed bytes */ ++ p_block->p_buffer += i_used; ++ p_block->i_buffer -= i_used; ++ } ++ ++ /* Nothing to display */ ++ if( not_received_frame ) ++ { ++// msg_Dbg(p_dec, "No rx: used=%d", i_used); ++ av_frame_free(&frame); ++ if( i_used == 0 ) break; ++ continue; ++ } ++ ++ /* Compute the PTS */ ++#ifdef FF_API_PKT_PTS ++ mtime_t i_pts = frame->pts; ++#else ++ mtime_t i_pts = frame->pkt_pts; +#endif ++ if (i_pts == AV_NOPTS_VALUE ) ++ i_pts = frame->pkt_dts; + -+ int ret = avcodec_send_packet(p_context, &pkt); ++ if( i_pts == AV_NOPTS_VALUE ) ++ i_pts = date_Get( &p_sys->pts ); + -+ if (ret == AVERROR(EAGAIN)) -+ { -+ // Cannot send more data until output drained - so do drain -+ while (rx_frame(p_dec, p_sys, p_context) == 1) -+ /* Loop */; ++ /* Interpolate the next PTS */ ++ if( i_pts > VLC_TS_INVALID ) ++ date_Set( &p_sys->pts, i_pts ); + -+ // And try again - should not fail the same way -+ ret = avcodec_send_packet(p_context, &pkt); -+ } ++ const mtime_t i_next_pts = interpolate_next_pts(p_dec, frame); + -+ // Now done with pkt & block -+ av_packet_unref(&pkt); -+ if (p_block != NULL) -+ { -+ block_Release( p_block ); -+ p_block = NULL; -+ } ++ update_late_frame_count( p_dec, p_block, current_time, i_pts, i_next_pts); + -+ if (ret != 0) -+ { -+ if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) ++ if( !b_need_output_picture || ++// ( !p_sys->p_va && !frame->linesize[0] ) || ++ ( !frame->linesize[0] ) || ++ ( p_dec->b_frame_drop_allowed && (frame->flags & AV_FRAME_FLAG_CORRUPT) && ++ !p_sys->b_show_corrupted ) ) ++ { ++ av_frame_free(&frame); ++// msg_Dbg(p_dec, "Bad frame"); ++ continue; ++ } ++ ++ if( p_context->pix_fmt == AV_PIX_FMT_PAL8 ++ && !p_dec->fmt_out.video.p_palette ) ++ { ++ /* See AV_PIX_FMT_PAL8 comment in avc_GetVideoFormat(): update the ++ * fmt_out palette and change the fmt_out chroma to request a new ++ * vout */ ++ assert( p_dec->fmt_out.video.i_chroma != VLC_CODEC_RGBP ); ++ ++ video_palette_t *p_palette; ++ p_palette = p_dec->fmt_out.video.p_palette ++ = malloc( sizeof(video_palette_t) ); ++ if( !p_palette ) ++ { ++ *error = true; ++ av_frame_free(&frame); ++ break; ++ } ++ static_assert( sizeof(p_palette->palette) == AVPALETTE_SIZE, ++ "Palette size mismatch between vlc and libavutil" ); ++ assert( frame->data[1] != NULL ); ++ memcpy( p_palette->palette, frame->data[1], AVPALETTE_SIZE ); ++ p_palette->i_entries = AVPALETTE_COUNT; ++ p_dec->fmt_out.video.i_chroma = VLC_CODEC_RGBP; ++ if( decoder_UpdateVideoFormat( p_dec ) ) ++ { ++ av_frame_free(&frame); ++ continue; ++ } ++ } ++ ++#if 1 ++ { ++ cma_buf_t * const cb = av_rpi_zc_buf_v(frame->buf[0]); ++ ++ if (cb == NULL) ++ { ++ msg_Err(p_dec, "Frame has no attached CMA buffer"); ++ goto fail; ++ } ++ ++ if (lavc_UpdateVideoFormat(p_dec, p_context, p_context->pix_fmt, ++ p_context->pix_fmt) != 0) ++ { ++ msg_Err(p_dec, "Failed to update format"); ++ goto fail; ++ } ++ ++ if ((p_pic = decoder_NewPicture(p_dec)) == NULL) ++ { ++ msg_Err(p_dec, "Failed to allocate pic"); ++ goto fail; ++ } ++ ++ if (cma_buf_pic_attach(cma_buf_ref(cb), p_pic) != 0) ++ { ++ cma_buf_unref(cb); // Undo the in_flight ++ char dbuf0[5]; ++ msg_Err(p_dec, "Failed to attach bufs to pic: fmt=%s", str_fourcc(dbuf0, p_pic->format.i_chroma)); ++ goto fail; ++ } ++ ++ // ****** Set planes etc. ++ set_pic_from_frame(p_pic, frame); ++ } ++#else ++ picture_t *p_pic = frame->opaque; ++ if( p_pic == NULL ) ++ { /* When direct rendering is not used, get_format() and get_buffer() ++ * might not be called. The output video format must be set here ++ * then picture buffer can be allocated. */ ++ if (p_sys->p_va == NULL ++ && lavc_UpdateVideoFormat(p_dec, p_context, p_context->pix_fmt, ++ p_context->pix_fmt) == 0) ++ p_pic = decoder_NewPicture(p_dec); ++ ++ if( !p_pic ) ++ { ++ av_frame_free(&frame); ++ break; ++ } ++ ++ /* Fill picture_t from AVFrame */ ++ if( lavc_CopyPicture( p_dec, p_pic, frame ) != VLC_SUCCESS ) ++ { ++ av_frame_free(&frame); ++ picture_Release( p_pic ); ++ break; ++ } ++ } ++ else ++ { ++ /* Some codecs can return the same frame multiple times. By the ++ * time that the same frame is returned a second time, it will be ++ * too late to clone the underlying picture. So clone proactively. ++ * A single picture CANNOT be queued multiple times. ++ */ ++ p_pic = picture_Clone( p_pic ); ++ if( unlikely(p_pic == NULL) ) ++ { ++ av_frame_free(&frame); ++ break; ++ } ++ } ++#endif ++ ++ if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den ) ++ { ++ /* Fetch again the aspect ratio in case it changed */ ++ p_dec->fmt_out.video.i_sar_num ++ = p_context->sample_aspect_ratio.num; ++ p_dec->fmt_out.video.i_sar_den ++ = p_context->sample_aspect_ratio.den; ++ ++ if( !p_dec->fmt_out.video.i_sar_num || !p_dec->fmt_out.video.i_sar_den ) ++ { ++ p_dec->fmt_out.video.i_sar_num = 1; ++ p_dec->fmt_out.video.i_sar_den = 1; ++ } ++ } ++ ++ p_pic->date = i_pts; ++ /* Hack to force display of still pictures */ ++ p_pic->b_force = p_sys->b_first_frame; ++ p_pic->i_nb_fields = 2 + frame->repeat_pict; ++ p_pic->b_progressive = !frame->interlaced_frame; ++ p_pic->b_top_field_first = frame->top_field_first; ++ ++ if (DecodeSidedata(p_dec, frame, p_pic)) ++ i_pts = VLC_TS_INVALID; ++ ++ av_frame_free(&frame); ++ ++ /* Send decoded frame to vout */ ++ if (i_pts > VLC_TS_INVALID) + { -+ msg_Err(p_dec, "avcodec_send_packet critical error"); -+ rv = VLCDEC_ECRITICAL; ++ p_sys->b_first_frame = false; ++#if TRACE_ALL ++ msg_Dbg(p_dec, ">>> %s: Got pic", __func__); ++#endif ++ return p_pic; + } ++ else ++ picture_Release( p_pic ); + } + -+ while (rx_frame(p_dec, p_sys, p_context) == 1) -+ /* Loop */; ++ if( p_block ) ++ block_Release( p_block ); ++ ++#if TRACE_ALL ++ msg_Dbg(p_dec, ">>> %s: NULL", __func__); ++#endif ++ return NULL; + -+ if (eos_spotted) -+ p_sys->b_first_frame = true; ++fail: ++#if TRACE_ALL ++ msg_Dbg(p_dec, ">>> %s: FAIL", __func__); ++#endif ++ av_frame_free(&frame); ++ if (p_pic != NULL) ++ picture_Release(p_pic); ++ if (p_block != NULL) ++ block_Release(p_block); ++ *error = true; ++ return NULL; ++} + -+ return rv; ++static int DecodeVideo( decoder_t *p_dec, block_t *p_block ) ++{ ++ block_t **pp_block = p_block ? &p_block : NULL; ++ picture_t *p_pic; ++ bool error = false; ++ while( ( p_pic = DecodeBlock( p_dec, pp_block, &error ) ) != NULL ) ++ decoder_QueueVideo( p_dec, p_pic ); ++ return error ? VLCDEC_ECRITICAL : VLCDEC_SUCCESS; +} + +/***************************************************************************** @@ -6267,31 +6950,38 @@ + * This function is called when the thread ends after a successful + * initialization. + *****************************************************************************/ -+static void MmalAvcodecCloseDecoder(vlc_object_t *obj) ++static void MmalAvcodecCloseDecoder( vlc_object_t *obj ) +{ + decoder_t *p_dec = (decoder_t *)obj; + decoder_sys_t *p_sys = p_dec->p_sys; + AVCodecContext *ctx = p_sys->p_context; +// void *hwaccel_context; + ++ msg_Dbg(obj, "<<< %s", __func__); ++ ++ post_mt( p_sys ); ++ ++ cma_buf_pool_cancel(p_sys->cma_pool); // Abort any pending frame allocs ++ + /* do not flush buffers if codec hasn't been opened (theora/vorbis/VC1) */ + if( avcodec_is_open( ctx ) ) + avcodec_flush_buffers( ctx ); + -+// cc_Flush( &p_sys->cc ); ++ av_rpi_zc_uninit2(ctx); ++ ++ wait_mt( p_sys ); + -+ avcodec_close(ctx); -+ av_rpi_zc_uninit(ctx); ++ cc_Flush( &p_sys->cc ); + +// hwaccel_context = ctx->hwaccel_context; + avcodec_free_context( &ctx ); + -+ if( p_sys->out_pool != NULL ) -+ mmal_pool_destroy(p_sys->out_pool); -+ +// if( p_sys->p_va ) +// vlc_va_Delete( p_sys->p_va, &hwaccel_context ); + ++ cma_vcsm_exit(p_sys->vcsm_init_type); ++ ++ vlc_sem_destroy( &p_sys->sem_mt ); + free( p_sys ); +} + @@ -6316,396 +7006,66 @@ + if( !p ) + return; + -+ memcpy( &p[0], "SVQ3", 4 ); -+ memset( &p[4], 0, 8 ); -+ memcpy( &p[12], p_dec->fmt_in.p_extra, i_size ); -+ -+ /* Now remove all atoms before the SMI one */ -+ if( p_sys->p_context->extradata_size > 0x5a && -+ strncmp( (char*)&p[0x56], "SMI ", 4 ) ) -+ { -+ uint8_t *psz = &p[0x52]; -+ -+ while( psz < &p[p_sys->p_context->extradata_size - 8] ) -+ { -+ uint_fast32_t atom_size = GetDWBE( psz ); -+ if( atom_size <= 1 ) -+ { -+ /* FIXME handle 1 as long size */ -+ break; -+ } -+ if( !strncmp( (char*)&psz[4], "SMI ", 4 ) ) -+ { -+ memmove( &p[0x52], psz, -+ &p[p_sys->p_context->extradata_size] - psz ); -+ break; -+ } -+ -+ psz += atom_size; -+ } -+ } -+ } -+ else -+ { -+ p_sys->p_context->extradata_size = i_size; -+ p_sys->p_context->extradata = -+ av_malloc( i_size + FF_INPUT_BUFFER_PADDING_SIZE ); -+ if( p_sys->p_context->extradata ) -+ { -+ memcpy( p_sys->p_context->extradata, -+ p_dec->fmt_in.p_extra, i_size ); -+ memset( p_sys->p_context->extradata + i_size, -+ 0, FF_INPUT_BUFFER_PADDING_SIZE ); -+ } -+ } -+} -+ -+ -+static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, -+ const enum PixelFormat *pi_fmt ) -+{ -+ decoder_t *p_dec = p_context->opaque; -+ decoder_sys_t *p_sys = p_dec->p_sys; -+ video_format_t fmt; -+ -+ /* Enumerate available formats */ -+ enum PixelFormat swfmt = avcodec_default_get_format(p_context, pi_fmt); -+// bool can_hwaccel = false; -+ -+ for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++) -+ { -+ const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]); -+ if (dsc == NULL) -+ continue; -+ bool hwaccel = (dsc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0; -+ -+ msg_Dbg( p_dec, "available %sware decoder output format %d (%s)", -+ hwaccel ? "hard" : "soft", pi_fmt[i], dsc->name ); -+// if (hwaccel) -+// can_hwaccel = true; -+ } -+ -+ /* If the format did not actually change (e.g. seeking), try to reuse the -+ * existing output format, and if present, hardware acceleration back-end. -+ * This avoids resetting the pipeline downstream. This also avoids -+ * needlessly probing for hardware acceleration support. */ -+ if (p_sys->pix_fmt != AV_PIX_FMT_NONE -+ && lavc_GetVideoFormat(p_dec, &fmt, p_context, p_sys->pix_fmt, swfmt) == 0 -+ && fmt.i_width == p_dec->fmt_out.video.i_width -+ && fmt.i_height == p_dec->fmt_out.video.i_height -+ && p_context->profile == p_sys->profile -+ && p_context->level <= p_sys->level) -+ { -+ for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++) -+ if (pi_fmt[i] == p_sys->pix_fmt) -+ { -+ msg_Dbg(p_dec, "reusing decoder output format %d", pi_fmt[i]); -+ return p_sys->pix_fmt; -+ } -+ } -+ -+// if (p_sys->p_va != NULL) -+// { -+// msg_Err(p_dec, "existing hardware acceleration cannot be reused"); -+// vlc_va_Delete(p_sys->p_va, &p_context->hwaccel_context); -+// p_sys->p_va = NULL; -+// } -+ -+ p_sys->profile = p_context->profile; -+ p_sys->level = p_context->level; -+ -+#if 1 -+ return swfmt; -+#else -+ if (!can_hwaccel) -+ return swfmt; -+ -+#if (LIBAVCODEC_VERSION_MICRO >= 100) \ -+ && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101)) -+ if (p_context->active_thread_type) -+ { -+ msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", -+ p_context->active_thread_type); -+ return swfmt; -+ } -+#endif -+ -+ wait_mt(p_sys); -+ -+ static const enum PixelFormat hwfmts[] = -+ { -+#ifdef _WIN32 -+#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) -+ AV_PIX_FMT_D3D11VA_VLD, -+#endif -+ AV_PIX_FMT_DXVA2_VLD, -+#endif -+ AV_PIX_FMT_VAAPI_VLD, -+#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) -+ AV_PIX_FMT_VDPAU, -+#endif -+ AV_PIX_FMT_NONE, -+ }; -+ -+ for( size_t i = 0; hwfmts[i] != AV_PIX_FMT_NONE; i++ ) -+ { -+ enum PixelFormat hwfmt = AV_PIX_FMT_NONE; -+ for( size_t j = 0; hwfmt == AV_PIX_FMT_NONE && pi_fmt[j] != AV_PIX_FMT_NONE; j++ ) -+ if( hwfmts[i] == pi_fmt[j] ) -+ hwfmt = hwfmts[i]; -+ -+ if( hwfmt == AV_PIX_FMT_NONE ) -+ continue; -+ -+ p_dec->fmt_out.video.i_chroma = vlc_va_GetChroma(hwfmt, swfmt); -+ if (p_dec->fmt_out.video.i_chroma == 0) -+ continue; /* Unknown brand of hardware acceleration */ -+ if (p_context->width == 0 || p_context->height == 0) -+ { /* should never happen */ -+ msg_Err(p_dec, "unspecified video dimensions"); -+ continue; -+ } -+ const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(hwfmt); -+ msg_Dbg(p_dec, "trying format %s", dsc ? dsc->name : "unknown"); -+ if (lavc_UpdateVideoFormat(p_dec, p_context, hwfmt, swfmt)) -+ continue; /* Unsupported brand of hardware acceleration */ -+ post_mt(p_sys); -+ -+ picture_t *test_pic = decoder_NewPicture(p_dec); -+ assert(!test_pic || test_pic->format.i_chroma == p_dec->fmt_out.video.i_chroma); -+ vlc_va_t *va = vlc_va_New(VLC_OBJECT(p_dec), p_context, hwfmt, -+ &p_dec->fmt_in, -+ test_pic ? test_pic->p_sys : NULL); -+ if (test_pic) -+ picture_Release(test_pic); -+ if (va == NULL) -+ { -+ wait_mt(p_sys); -+ continue; /* Unsupported codec profile or such */ -+ } -+ -+ if (va->description != NULL) -+ msg_Info(p_dec, "Using %s for hardware decoding", va->description); -+ -+ p_sys->p_va = va; -+ p_sys->pix_fmt = hwfmt; -+ p_context->draw_horiz_band = NULL; -+ return hwfmt; -+ } -+ -+ post_mt(p_sys); -+ /* Fallback to default behaviour */ -+ p_sys->pix_fmt = swfmt; -+ return swfmt; -+#endif -+} -+ -+/***************************************************************************** -+ * InitVideo: initialize the video decoder -+ ***************************************************************************** -+ * the ffmpeg codec will be opened, some memory allocated. The vout is not yet -+ * opened (done after the first decoded frame). -+ *****************************************************************************/ -+ -+/***************************************************************************** -+ * ffmpeg_OpenCodec: -+ *****************************************************************************/ -+ -+static int MmalAvcodecOpenDecoder( vlc_object_t *obj ) -+{ -+ decoder_t *p_dec = (decoder_t *)obj; -+ const AVCodec *p_codec; -+ -+ if (p_dec->fmt_in.i_codec != VLC_CODEC_HEVC) -+ return VLC_EGENERIC; -+ -+ AVCodecContext *p_context = ffmpeg_AllocContext( p_dec, &p_codec ); -+ if( p_context == NULL ) -+ return VLC_EGENERIC; -+ -+ int i_val; -+ -+ /* Allocate the memory needed to store the decoder's structure */ -+ decoder_sys_t *p_sys = calloc( 1, sizeof(*p_sys) ); -+ if( unlikely(p_sys == NULL) ) -+ { -+ avcodec_free_context( &p_context ); -+ return VLC_ENOMEM; -+ } -+ -+ p_dec->p_sys = p_sys; -+ p_sys->p_context = p_context; -+ p_sys->p_codec = p_codec; -+// p_sys->p_va = NULL; -+ -+ /* ***** Fill p_context with init values ***** */ -+ p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_original_fourcc ? -+ p_dec->fmt_in.i_original_fourcc : p_dec->fmt_in.i_codec ); -+ -+ /* ***** Get configuration of ffmpeg plugin ***** */ -+ p_context->workaround_bugs = -+ var_InheritInteger( p_dec, "avcodec-workaround-bugs" ); -+ p_context->err_recognition = -+ var_InheritInteger( p_dec, "avcodec-error-resilience" ); -+ -+ if( var_CreateGetBool( p_dec, "grayscale" ) ) -+ p_context->flags |= AV_CODEC_FLAG_GRAY; -+ -+ /* ***** Output always the frames ***** */ -+ p_context->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT; -+ -+ i_val = var_CreateGetInteger( p_dec, "avcodec-skiploopfilter" ); -+ if( i_val >= 4 ) p_context->skip_loop_filter = AVDISCARD_ALL; -+ else if( i_val == 3 ) p_context->skip_loop_filter = AVDISCARD_NONKEY; -+ else if( i_val == 2 ) p_context->skip_loop_filter = AVDISCARD_BIDIR; -+ else if( i_val == 1 ) p_context->skip_loop_filter = AVDISCARD_NONREF; -+ else p_context->skip_loop_filter = AVDISCARD_DEFAULT; -+ -+ if( var_CreateGetBool( p_dec, "avcodec-fast" ) ) -+ p_context->flags2 |= AV_CODEC_FLAG2_FAST; -+ -+ /* ***** libavcodec frame skipping ***** */ -+ p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" ); -+ p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" ); -+ -+ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-frame" ); -+ if( i_val >= 4 ) p_sys->i_skip_frame = AVDISCARD_ALL; -+ else if( i_val == 3 ) p_sys->i_skip_frame = AVDISCARD_NONKEY; -+ else if( i_val == 2 ) p_sys->i_skip_frame = AVDISCARD_BIDIR; -+ else if( i_val == 1 ) p_sys->i_skip_frame = AVDISCARD_NONREF; -+ else if( i_val == -1 ) p_sys->i_skip_frame = AVDISCARD_NONE; -+ else p_sys->i_skip_frame = AVDISCARD_DEFAULT; -+ p_context->skip_frame = p_sys->i_skip_frame; -+ -+ i_val = var_CreateGetInteger( p_dec, "avcodec-skip-idct" ); -+ if( i_val >= 4 ) p_context->skip_idct = AVDISCARD_ALL; -+ else if( i_val == 3 ) p_context->skip_idct = AVDISCARD_NONKEY; -+ else if( i_val == 2 ) p_context->skip_idct = AVDISCARD_BIDIR; -+ else if( i_val == 1 ) p_context->skip_idct = AVDISCARD_NONREF; -+ else if( i_val == -1 ) p_context->skip_idct = AVDISCARD_NONE; -+ else p_context->skip_idct = AVDISCARD_DEFAULT; -+ -+ /* ***** libavcodec direct rendering ***** */ -+ p_sys->b_direct_rendering = false; -+ atomic_init(&p_sys->b_dr_failure, false); -+ if( var_CreateGetBool( p_dec, "avcodec-dr" ) && -+ (p_codec->capabilities & AV_CODEC_CAP_DR1) && -+ /* No idea why ... but this fixes flickering on some TSCC streams */ -+ p_sys->p_codec->id != AV_CODEC_ID_TSCC && -+ p_sys->p_codec->id != AV_CODEC_ID_CSCD && -+ p_sys->p_codec->id != AV_CODEC_ID_CINEPAK ) -+ { -+ /* Some codecs set pix_fmt only after the 1st frame has been decoded, -+ * so we need to do another check in ffmpeg_GetFrameBuf() */ -+ p_sys->b_direct_rendering = true; -+ } -+ -+ p_context->get_format = ffmpeg_GetFormat; -+ /* Always use our get_buffer wrapper so we can calculate the -+ * PTS correctly */ -+// p_context->get_buffer2 = lavc_GetFrame; -+// p_context->opaque = p_dec; -+ -+ int i_thread_count = var_InheritInteger( p_dec, "avcodec-threads" ); -+ if( i_thread_count <= 0 ) -+ i_thread_count = 6; -+#if 0 -+ if( i_thread_count <= 0 ) -+ { -+ i_thread_count = vlc_GetCPUCount(); -+ if( i_thread_count > 1 ) -+ i_thread_count++; -+ -+ //FIXME: take in count the decoding time -+#if VLC_WINSTORE_APP -+ i_thread_count = __MIN( i_thread_count, 6 ); -+#else -+ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 10 : 6 ); -+#endif -+ } -+ i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); -+#endif -+ msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); -+ p_context->thread_count = i_thread_count; -+ p_context->thread_safe_callbacks = true; -+ -+ p_context->thread_type = FF_THREAD_SLICE | FF_THREAD_FRAME; -+ -+ if( p_context->thread_type & FF_THREAD_FRAME ) -+ p_dec->i_extra_picture_buffers = 2 * p_context->thread_count; -+ -+ /* ***** misc init ***** */ -+ date_Init(&p_sys->pts, 1, 30001); -+ date_Set(&p_sys->pts, VLC_TS_INVALID); -+ p_sys->b_first_frame = true; -+ p_sys->i_late_frames = 0; -+ p_sys->b_from_preroll = false; -+ -+ /* Set output properties */ -+ if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS ) -+ { -+ /* we are doomed. but not really, because most codecs set their pix_fmt later on */ -+ p_dec->fmt_out.i_codec = VLC_CODEC_I420; -+ } -+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; -+ -+ p_dec->fmt_out.video.orientation = p_dec->fmt_in.video.orientation; -+ -+ if( p_dec->fmt_in.video.p_palette ) { -+ p_sys->palette_sent = false; -+ p_dec->fmt_out.video.p_palette = malloc( sizeof(video_palette_t) ); -+ if( p_dec->fmt_out.video.p_palette ) -+ *p_dec->fmt_out.video.p_palette = *p_dec->fmt_in.video.p_palette; -+ } else -+ p_sys->palette_sent = true; ++ memcpy( &p[0], "SVQ3", 4 ); ++ memset( &p[4], 0, 8 ); ++ memcpy( &p[12], p_dec->fmt_in.p_extra, i_size ); + -+ /* ***** init this codec with special data ***** */ -+ ffmpeg_InitCodec( p_dec ); ++ /* Now remove all atoms before the SMI one */ ++ if( p_sys->p_context->extradata_size > 0x5a && ++ strncmp( (char*)&p[0x56], "SMI ", 4 ) ) ++ { ++ uint8_t *psz = &p[0x52]; + -+ /* ***** Open the codec ***** */ -+ if( OpenVideoCodec( p_dec ) < 0 ) -+ { -+ free( p_sys ); -+ avcodec_free_context( &p_context ); -+ return VLC_EGENERIC; -+ } ++ while( psz < &p[p_sys->p_context->extradata_size - 8] ) ++ { ++ uint_fast32_t atom_size = GetDWBE( psz ); ++ if( atom_size <= 1 ) ++ { ++ /* FIXME handle 1 as long size */ ++ break; ++ } ++ if( !strncmp( (char*)&psz[4], "SMI ", 4 ) ) ++ { ++ memmove( &p[0x52], psz, ++ &p[p_sys->p_context->extradata_size] - psz ); ++ break; ++ } + -+ if ((p_sys->out_pool = mmal_pool_create(5, 0)) == NULL) ++ psz += atom_size; ++ } ++ } ++ } ++ else + { -+ msg_Err(p_dec, "Failed to create mmal buffer pool"); -+ goto fail; ++ p_sys->p_context->extradata_size = i_size; ++ p_sys->p_context->extradata = ++ av_malloc( i_size + FF_INPUT_BUFFER_PADDING_SIZE ); ++ if( p_sys->p_context->extradata ) ++ { ++ memcpy( p_sys->p_context->extradata, ++ p_dec->fmt_in.p_extra, i_size ); ++ memset( p_sys->p_context->extradata + i_size, ++ 0, FF_INPUT_BUFFER_PADDING_SIZE ); ++ } + } -+ -+ p_dec->pf_decode = DecodeVideo; -+ p_dec->pf_flush = Flush; -+ -+ /* XXX: Writing input format makes little sense. */ -+ if( p_context->profile != FF_PROFILE_UNKNOWN ) -+ p_dec->fmt_in.i_profile = p_context->profile; -+ if( p_context->level != FF_LEVEL_UNKNOWN ) -+ p_dec->fmt_in.i_level = p_context->level; -+ return VLC_SUCCESS; -+ -+fail: -+ MmalAvcodecCloseDecoder(VLC_OBJECT(p_dec)); -+ return VLC_EGENERIC; +} + + -+ +vlc_module_begin() + set_category( CAT_INPUT ) + set_subcategory( SUBCAT_INPUT_VCODEC ) + set_shortname(N_("MMAL avcodec")) + set_description(N_("MMAL buffered avcodec ")) -+ set_capability("video decoder", 800) ++ set_capability("video decoder", 80) + add_shortcut("mmal_avcodec") ++ add_integer(MMAL_AVCODEC_BUFFERS, -1, MMAL_AVCODEC_BUFFERS_TEXT, ++ MMAL_AVCODEC_BUFFERS_LONGTEXT, true) + set_callbacks(MmalAvcodecOpenDecoder, MmalAvcodecCloseDecoder) +vlc_module_end() + --- /dev/null +++ b/modules/hw/mmal/mmal_cma.c -@@ -0,0 +1,377 @@ +@@ -0,0 +1,668 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif @@ -6722,13 +7082,24 @@ +#include <vlc_picture.h> + +#include "mmal_cma.h" ++#include "mmal_picture.h" + +#include <assert.h> + ++#define TRACE_ALL 0 ++ ++//----------------------------------------------------------------------------- ++// ++// Generic pool functions ++// Knows nothing about pool entries + +typedef void * cma_pool_alloc_fn(void * v, size_t size); +typedef void cma_pool_free_fn(void * v, void * el, size_t size); + ++#if TRACE_ALL ++static atomic_int pool_seq; ++#endif ++ +// Pool structure +// Ref count is held by pool owner and pool els that have been got +// Els in the pool do not count towards its ref count @@ -6740,95 +7111,145 @@ + unsigned int n_in; + unsigned int n_out; + unsigned int pool_size; ++ int flight_size; + size_t el_size; + void ** pool; + ++ bool cancel; ++ int in_flight; ++ vlc_cond_t flight_cond; ++ + void * alloc_v; + cma_pool_alloc_fn * el_alloc_fn; + cma_pool_free_fn * el_free_fn; ++ cma_pool_on_delete_fn * on_delete_fn; ++ ++ const char * name; ++#if TRACE_ALL ++ int seq; ++#endif +}; + -+typedef struct cma_buf_s { -+ size_t size; -+ unsigned int vcsm_h; // VCSM handle from initial alloc -+ unsigned int vc_h; // VC handle for ZC mmal buffers -+ int fd; // dmabuf handle for GL -+ void * mmap; // ARM mapped address -+ picture_context_t *ctx2; -+} cma_buf_t; ++static inline unsigned int inc_mod(const unsigned int n, const unsigned int m) ++{ ++ return n + 1 >= m ? 0 : n + 1; ++} + -+static int free_pool(const cma_pool_fixed_t * const p, void ** pool, unsigned int n, size_t el_size) ++static void free_pool(const cma_pool_fixed_t * const p, void ** const pool, ++ const unsigned int pool_size, const size_t el_size) +{ -+ int i = 0; -+ assert(pool != NULL); ++ if (pool == NULL) ++ return; + -+ while (pool[n] != NULL) -+ { -+ p->el_free_fn(p->alloc_v, pool[n], el_size); -+ pool[n] = NULL; -+ n = n + 1 < p->pool_size ? n + 1 : 0; -+ ++i; -+ } ++ for (unsigned int n = 0; n != pool_size; ++n) ++ if (pool[n] != NULL) ++ p->el_free_fn(p->alloc_v, pool[n], el_size); + free(pool); -+ return i; +} + +// Just kill this - no checks +static void cma_pool_fixed_delete(cma_pool_fixed_t * const p) +{ -+ if (p->pool != NULL) -+ free_pool(p, p->pool, p->n_in, p->el_size); ++ cma_pool_on_delete_fn *const on_delete_fn = p->on_delete_fn; ++ void *const v = p->alloc_v; ++ ++ free_pool(p, p->pool, p->pool_size, p->el_size); ++ ++ if (p->name != NULL) ++ free((void *)p->name); // Discard const + ++ vlc_cond_destroy(&p->flight_cond); + vlc_mutex_destroy(&p->lock); + free(p); ++ ++ // Inform our container that we are dead (if it cares) ++ if (on_delete_fn) ++ on_delete_fn(v); +} + -+void cma_pool_fixed_unref(cma_pool_fixed_t * const p) ++static void cma_pool_fixed_unref(cma_pool_fixed_t * const p) +{ + if (atomic_fetch_sub(&p->ref_count, 1) <= 1) + cma_pool_fixed_delete(p); +} + -+void cma_pool_fixed_ref(cma_pool_fixed_t * const p) ++static void cma_pool_fixed_ref(cma_pool_fixed_t * const p) +{ + atomic_fetch_add(&p->ref_count, 1); +} + -+void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size) ++static void cma_pool_fixed_inc_in_flight(cma_pool_fixed_t * const p) ++{ ++ vlc_mutex_lock(&p->lock); ++ ++p->in_flight; ++ vlc_mutex_unlock(&p->lock); ++} ++ ++static void cma_pool_fixed_dec_in_flight(cma_pool_fixed_t * const p) ++{ ++ vlc_mutex_lock(&p->lock); ++ if (--p->in_flight == 0) ++ vlc_cond_signal(&p->flight_cond); ++ vlc_mutex_unlock(&p->lock); ++} ++ ++static void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size, const bool inc_flight, const bool no_pool) +{ + void * v = NULL; -+ void ** deadpool = NULL; -+ size_t dead_size = 0; -+ unsigned int dead_n = 0; + + vlc_mutex_lock(&p->lock); + -+ if (req_el_size != p->el_size) ++ for (;;) + { -+ deadpool = p->pool; -+ dead_n = p->n_in; -+ dead_size = p->el_size; ++ if (req_el_size != p->el_size) ++ { ++ void ** const deadpool = p->pool; ++ const size_t dead_size = p->el_size; ++ const unsigned int dead_n = p->pool_size; + -+ p->pool = NULL; -+ p->n_in = 0; -+ p->n_out = 0; -+ p->el_size = req_el_size; -+ } -+ else if (p->pool != NULL) -+ { -+ v = p->pool[p->n_in]; -+ if (v != NULL) ++ p->pool = NULL; ++ p->n_in = 0; ++ p->n_out = 0; ++ p->el_size = req_el_size; ++ ++ if (deadpool != NULL) ++ { ++ vlc_mutex_unlock(&p->lock); ++ // Do the free old op outside the mutex in case the free is slow ++ free_pool(p, deadpool, dead_n, dead_size); ++ vlc_mutex_lock(&p->lock); ++ continue; ++ } ++ } ++ ++ // Late abort if flush or cancel so we can still kill the pool ++ if (req_el_size == 0 || p->cancel) ++ { ++ vlc_mutex_unlock(&p->lock); ++ return NULL; ++ } ++ ++ if (p->pool != NULL && !no_pool) + { -+ p->pool[p->n_in] = NULL; -+ p->n_in = p->n_in + 1 < p->pool_size ? p->n_in + 1 : 0; ++ v = p->pool[p->n_in]; ++ if (v != NULL) ++ { ++ p->pool[p->n_in] = NULL; ++ p->n_in = inc_mod(p->n_in, p->pool_size); ++ break; ++ } + } ++ ++ if (p->in_flight <= 0) ++ break; ++ ++ vlc_cond_wait(&p->flight_cond, &p->lock); + } + -+ vlc_mutex_unlock(&p->lock); ++ if (inc_flight) ++ ++p->in_flight; + -+ // Do the free old op outside the mutex in case the free is slow -+ if (deadpool != NULL) -+ free_pool(p, deadpool, dead_n, dead_size); ++ vlc_mutex_unlock(&p->lock); + + if (v == NULL && req_el_size != 0) + v = p->el_alloc_fn(p->alloc_v, req_el_size); @@ -6836,11 +7257,14 @@ + // Tag ref + if (v != NULL) + cma_pool_fixed_ref(p); ++ // Remove flight if we set it and error ++ else if (inc_flight) ++ cma_pool_fixed_dec_in_flight(p); + + return v; +} + -+void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size) ++static void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size, const bool was_in_flight) +{ + vlc_mutex_lock(&p->lock); + @@ -6850,29 +7274,123 @@ + p->pool = calloc(p->pool_size, sizeof(void*)); + + p->pool[p->n_out] = v; -+ p->n_out = p->n_out + 1 < p->pool_size ? p->n_out + 1 : 0; ++ p->n_out = inc_mod(p->n_out, p->pool_size); + v = NULL; + } + ++ if (was_in_flight) ++ --p->in_flight; ++ + vlc_mutex_unlock(&p->lock); + ++ vlc_cond_signal(&p->flight_cond); ++ + if (v != NULL) + p->el_free_fn(p->alloc_v, v, el_size); + + cma_pool_fixed_unref(p); +} + ++static int cma_pool_fixed_resize(cma_pool_fixed_t * const p, ++ const unsigned int new_pool_size, const int new_flight_size) ++{ ++ void ** dead_pool = NULL; ++ size_t dead_size = 0; ++ unsigned int dead_n = 0; ++ ++ // This makes this non-reentrant but saves us a lot of time in the normal ++ // "nothing happens" case ++ if (p->pool_size == new_pool_size && p->flight_size == new_flight_size) ++ return 0; ++ ++ vlc_mutex_lock(&p->lock); ++ ++ if (p->pool != NULL && new_pool_size != p->pool_size) ++ { ++ void ** const new_pool = calloc(new_pool_size, sizeof(void*)); ++ unsigned int d, s; ++ dead_pool = p->pool; ++ dead_size = p->el_size; ++ dead_n = p->pool_size; ++ ++ if (new_pool == NULL) ++ { ++ vlc_mutex_unlock(&p->lock); ++ return -1; ++ } ++ ++ for (d = 0, s = p->n_in; d != new_pool_size && (new_pool[d] = dead_pool[s]) != NULL; ++d, s = inc_mod(s, dead_n)) ++ dead_pool[s] = NULL; ++ ++ p->n_out = 0; ++ p->n_in = (d != new_pool_size) ? d : 0; ++ p->pool = new_pool; ++ } ++ ++ p->pool_size = new_pool_size; ++ if (new_flight_size > p->flight_size) ++ vlc_cond_broadcast(&p->flight_cond); // Lock still active so nothing happens till we release it ++ p->in_flight += p->flight_size - new_flight_size; ++ p->flight_size = new_flight_size; ++ ++ vlc_mutex_unlock(&p->lock); ++ ++ free_pool(p, dead_pool, dead_n, dead_size); ++ return 0; ++} ++ ++static int cma_pool_fixed_fill(cma_pool_fixed_t * const p, const size_t el_size) ++{ ++ for (;;) ++ { ++ vlc_mutex_lock(&p->lock); ++ bool done = el_size == p->el_size && p->pool != NULL && p->pool[p->n_out] != NULL; ++ vlc_mutex_unlock(&p->lock); ++ if (done) ++ break; ++ void * buf = cma_pool_fixed_get(p, el_size, false, true); ++ if (buf == NULL) ++ return -ENOMEM; ++ cma_pool_fixed_put(p, buf, el_size, false); ++ } ++ return 0; ++} ++ ++static void cma_pool_fixed_cancel(cma_pool_fixed_t * const p) ++{ ++ vlc_mutex_lock(&p->lock); ++ p->cancel = true; ++ vlc_cond_broadcast(&p->flight_cond); ++ vlc_mutex_unlock(&p->lock); ++} ++ ++static void cma_pool_fixed_uncancel(cma_pool_fixed_t * const p) ++{ ++ vlc_mutex_lock(&p->lock); ++ p->cancel = false; ++ vlc_mutex_unlock(&p->lock); ++} ++ ++ +// Purge pool & unref -+void cma_pool_fixed_kill(cma_pool_fixed_t * const p) ++static void cma_pool_fixed_kill(cma_pool_fixed_t * const p) +{ ++ if (p == NULL) ++ return; ++ + // This flush is not strictly needed but it reclaims what memory we can reclaim asap -+ cma_pool_fixed_get(p, 0); ++ cma_pool_fixed_get(p, 0, false, false); + cma_pool_fixed_unref(p); +} + -+cma_pool_fixed_t* -+cma_pool_fixed_new(const unsigned int pool_size, void * const alloc_v, -+ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn) ++// Create a new pool ++static cma_pool_fixed_t* ++cma_pool_fixed_new(const unsigned int pool_size, ++ const int flight_size, ++ void * const alloc_v, ++ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn, ++ cma_pool_on_delete_fn * const on_delete_fn, ++ const char * const name) +{ + cma_pool_fixed_t* const p = calloc(1, sizeof(cma_pool_fixed_t)); + if (p == NULL) @@ -6880,24 +7398,71 @@ + + atomic_store(&p->ref_count, 1); + vlc_mutex_init(&p->lock); ++ vlc_cond_init(&p->flight_cond); + + p->pool_size = pool_size; ++ p->flight_size = flight_size; ++ p->in_flight = -flight_size; + + p->alloc_v = alloc_v; + p->el_alloc_fn = alloc_fn; + p->el_free_fn = free_fn; ++ p->on_delete_fn = on_delete_fn; ++ p->name = name == NULL ? NULL : strdup(name); ++#if TRACE_ALL ++ p->seq = atomic_fetch_add(&pool_seq, 1); ++#endif + + return p; +} + ++// --------------------------------------------------------------------------- ++// ++// CMA buffer functions - uses cma_pool_fixed for pooling ++ ++struct cma_buf_pool_s { ++ cma_pool_fixed_t * pool; ++ vcsm_init_type_t init_type; ++ ++ bool all_in_flight; ++#if TRACE_ALL ++ size_t alloc_n; ++ size_t alloc_size; ++#endif ++}; ++ ++typedef struct cma_buf_s { ++ atomic_int ref_count; ++ cma_buf_pool_t * cbp; ++ bool in_flight; ++ size_t size; ++ unsigned int vcsm_h; // VCSM handle from initial alloc ++ unsigned int vc_h; // VC handle for ZC mmal buffers ++ unsigned int vc_addr; // VC addr - unused by us but wanted by FFmpeg ++ int fd; // dmabuf handle for GL ++ void * mmap; // ARM mapped address ++ picture_context_t *ctx2; ++} cma_buf_t; + +static void cma_pool_delete(cma_buf_t * const cb) +{ ++ assert(atomic_load(&cb->ref_count) == 0); ++#if TRACE_ALL ++ cb->cbp->alloc_size -= cb->size; ++ --cb->cbp->alloc_n; ++ fprintf(stderr, "%s[%d:%s]: N=%d, Total=%d\n", __func__, cb->cbp->pool->seq, cb->cbp->pool->name, cb->cbp->alloc_n, cb->cbp->alloc_size); ++#endif ++ + if (cb->ctx2 != NULL) + cb->ctx2->destroy(cb->ctx2); + + if (cb->mmap != MAP_FAILED) -+ munmap(cb->mmap, cb->size); ++ { ++ if (cb->cbp->init_type == VCSM_INIT_CMA) ++ munmap(cb->mmap, cb->size); ++ else ++ vcsm_unlock_hdl(cb->vcsm_h); ++ } + if (cb->fd != -1) + close(cb->fd); + if (cb->vcsm_h != 0) @@ -6915,13 +7480,16 @@ + +static void * cma_pool_alloc_cb(void * v, size_t size) +{ -+ VLC_UNUSED(v); ++ cma_buf_pool_t * const cbp = v; + + cma_buf_t * const cb = malloc(sizeof(cma_buf_t)); + if (cb == NULL) + return NULL; + + *cb = (cma_buf_t){ ++ .ref_count = ATOMIC_VAR_INIT(0), ++ .cbp = cbp, ++ .in_flight = 0, + .size = size, + .vcsm_h = 0, + .vc_h = 0, @@ -6929,18 +7497,57 @@ + .mmap = MAP_FAILED, + .ctx2 = NULL + }; ++#if TRACE_ALL ++ cb->cbp->alloc_size += cb->size; ++ ++cb->cbp->alloc_n; ++ fprintf(stderr, "%s[%d:%s]: N=%d, Total=%d\n", __func__, cbp->pool->seq, cbp->pool->name, cbp->alloc_n, cbp->alloc_size); ++#endif + -+ if ((cb->vcsm_h = vcsm_malloc_cache(size, VCSM_CACHE_TYPE_HOST, (char*)"VLC frame")) == 0) ++ // 0x80 is magic value to force full ARM-side mapping - otherwise ++ // cache requests can cause kernel crashes ++ if ((cb->vcsm_h = vcsm_malloc_cache(size, VCSM_CACHE_TYPE_HOST | 0x80, "VLC frame")) == 0) ++ { ++#if TRACE_ALL ++ fprintf(stderr, "vcsm_malloc_cache fail\n"); ++#endif + goto fail; ++ } + + if ((cb->vc_h = vcsm_vc_hdl_from_hdl(cb->vcsm_h)) == 0) ++ { ++#if TRACE_ALL ++ fprintf(stderr, "vcsm_vc_hdl_from_hdl fail\n"); ++#endif + goto fail; ++ } + -+ if ((cb->fd = vcsm_export_dmabuf(cb->vcsm_h)) == -1) -+ goto fail; ++ if (cbp->init_type == VCSM_INIT_CMA) ++ { ++ if ((cb->fd = vcsm_export_dmabuf(cb->vcsm_h)) == -1) ++ { ++#if TRACE_ALL ++ fprintf(stderr, "vcsm_export_dmabuf fail\n"); ++#endif ++ goto fail; ++ } + -+ if ((cb->mmap = mmap(NULL, cb->size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, cb->fd, 0)) == MAP_FAILED) -+ goto fail; ++ if ((cb->mmap = mmap(NULL, cb->size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, cb->fd, 0)) == MAP_FAILED) ++ goto fail; ++ } ++ else ++ { ++ void * arm_addr; ++ if ((arm_addr = vcsm_lock(cb->vcsm_h)) == NULL) ++ { ++#if TRACE_ALL ++ fprintf(stderr, "vcsm_lock fail\n"); ++#endif ++ goto fail; ++ } ++ cb->mmap = arm_addr; ++ } ++ ++ cb->vc_addr = vcsm_vc_addr_from_hdl(cb->vcsm_h); + + return cb; + @@ -6949,188 +7556,258 @@ + return NULL; +} + -+void cma_buf_pool_delete(cma_pool_fixed_t * const p) ++// Pool has died - safe now to exit vcsm ++static void cma_buf_pool_on_delete_cb(void * v) +{ -+ assert(p != NULL); ++ cma_buf_pool_t * const cbp = v; + -+ cma_pool_fixed_kill(p); ++ cma_vcsm_exit(cbp->init_type); ++ free(cbp); +} + -+cma_pool_fixed_t * cma_buf_pool_new(void) ++void cma_buf_pool_cancel(cma_buf_pool_t * const cbp) +{ -+ return cma_pool_fixed_new(5, NULL, cma_pool_alloc_cb, cma_pool_free_cb); ++ if (cbp == NULL || cbp->pool == NULL) ++ return; ++ ++ cma_pool_fixed_cancel(cbp->pool); +} + ++void cma_buf_pool_uncancel(cma_buf_pool_t * const cbp) ++{ ++ if (cbp == NULL || cbp->pool == NULL) ++ return; + -+typedef struct cma_pic_context_s { -+ picture_context_t cmn; ++ cma_pool_fixed_uncancel(cbp->pool); ++} + -+ atomic_int ref_count; -+ cma_pool_fixed_t * p; -+ cma_buf_t * cb; -+} cma_pic_context_t; ++// User finished with pool ++void cma_buf_pool_delete(cma_buf_pool_t * const cbp) ++{ ++ if (cbp == NULL) ++ return; ++ ++ if (cbp->pool != NULL) ++ { ++ // We will call cma_buf_pool_on_delete_cb when the pool finally dies ++ // (might be now) which will free up our env. ++ cma_pool_fixed_kill(cbp->pool); ++ } ++ else ++ { ++ // Had no pool for some reason (error) but must still finish cleanup ++ cma_buf_pool_on_delete_cb(cbp); ++ } ++} + ++int cma_buf_pool_fill(cma_buf_pool_t * const cbp, const size_t el_size) ++{ ++ return cma_pool_fixed_fill(cbp->pool, el_size); ++} + -+static void cma_buf_pic_ctx_ref(cma_pic_context_t * const ctx) ++int cma_buf_pool_resize(cma_buf_pool_t * const cbp, ++ const unsigned int new_pool_size, const int new_flight_size) +{ -+ atomic_fetch_add(&ctx->ref_count, 1); ++ return cma_pool_fixed_resize(cbp->pool, new_pool_size, new_flight_size); +} + -+static void cma_buf_pic_ctx_unref(cma_pic_context_t * const ctx) ++cma_buf_pool_t * cma_buf_pool_new(const unsigned int pool_size, const unsigned int flight_size, const bool all_in_flight, const char * const name) +{ -+ if (atomic_fetch_sub(&ctx->ref_count, 1) > 0) -+ return; ++ vcsm_init_type_t const init_type = cma_vcsm_init(); ++ if (init_type == VCSM_INIT_NONE) ++ return NULL; ++ ++ cma_buf_pool_t * const cbp = calloc(1, sizeof(cma_buf_pool_t)); ++ if (cbp == NULL) ++ return NULL; + -+ if (ctx->cb != NULL) -+ cma_pool_fixed_put(ctx->p, ctx->cb, ctx->cb->size); ++ cbp->init_type = init_type; ++ cbp->all_in_flight = all_in_flight; + -+ free(ctx); -+} ++ if ((cbp->pool = cma_pool_fixed_new(pool_size, flight_size, cbp, cma_pool_alloc_cb, cma_pool_free_cb, cma_buf_pool_on_delete_cb, name)) == NULL) ++ goto fail; ++ return cbp; + -+static picture_context_t * cma_buf_pic_ctx_copy(picture_context_t * pic_ctx) -+{ -+ cma_buf_pic_ctx_ref((cma_pic_context_t *)pic_ctx); -+ return pic_ctx; ++fail: ++ cma_buf_pool_delete(cbp); ++ return NULL; +} + -+static void cma_buf_pic_ctx_destroy(picture_context_t * pic_ctx) ++ ++void cma_buf_in_flight(cma_buf_t * const cb) +{ -+ cma_buf_pic_ctx_unref((cma_pic_context_t *)pic_ctx); ++ if (!cb->cbp->all_in_flight) ++ { ++ assert(!cb->in_flight); ++ cb->in_flight = true; ++ cma_pool_fixed_inc_in_flight(cb->cbp->pool); ++ } +} + -+int cma_buf_pic_attach(cma_pool_fixed_t * const p, picture_t * const pic, const size_t size) ++void cma_buf_end_flight(cma_buf_t * const cb) +{ -+ if (!is_cma_buf_pic_chroma(pic->format.i_chroma)) -+ return VLC_EGENERIC; -+ if (pic->context != NULL) -+ return VLC_EBADVAR; -+ -+ cma_buf_t * const cb = cma_pool_fixed_get(p, size); -+ if (cb == NULL) -+ return VLC_ENOMEM; -+ -+ cma_pic_context_t * const ctx = malloc(sizeof(cma_pic_context_t)); -+ if (ctx == NULL) -+ goto fail; ++ if (cb != NULL && !cb->cbp->all_in_flight && cb->in_flight) ++ { ++ cb->in_flight = false; ++ cma_pool_fixed_dec_in_flight(cb->cbp->pool); ++ } ++} + -+ *ctx = (cma_pic_context_t){ -+ .cmn = { -+ .destroy = cma_buf_pic_ctx_destroy, -+ .copy = cma_buf_pic_ctx_copy -+ }, -+ .ref_count = 0, -+ .p = p, -+ .cb = cb -+ }; + -+ pic->context = &ctx->cmn; -+ return VLC_SUCCESS; ++// Return vcsm handle ++unsigned int cma_buf_vcsm_handle(const cma_buf_t * const cb) ++{ ++ return cb->vcsm_h; ++} + -+fail: -+ cma_pool_fixed_put(p, cb, size); -+ return VLC_EGENERIC; ++size_t cma_buf_size(const cma_buf_t * const cb) ++{ ++ return cb->size; +} + -+int cma_buf_pic_add_context2(picture_t *const pic, picture_context_t * const ctx2) ++int cma_buf_add_context2(cma_buf_t *const cb, picture_context_t * const ctx2) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; -+ if (!is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL || ctx->cb == NULL || ctx->cb->ctx2 != NULL) ++ if (cb->ctx2 != NULL) + return VLC_EGENERIC; + -+ ctx->cb->ctx2 = ctx2; ++ cb->ctx2 = ctx2; + return VLC_SUCCESS; +} + -+unsigned int cma_buf_pic_vc_handle(const picture_t * const pic) ++unsigned int cma_buf_vc_handle(const cma_buf_t *const cb) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; -+ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? 0 : ctx->cb == NULL ? 0 : ctx->cb->vc_h; ++ return cb->vc_h; +} + -+int cma_buf_pic_fd(const picture_t * const pic) ++int cma_buf_fd(const cma_buf_t *const cb) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; -+ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? -1 : ctx->cb == NULL ? -1 : ctx->cb->fd; ++ return cb->fd; +} + -+void * cma_buf_pic_addr(const picture_t * const pic) ++void * cma_buf_addr(const cma_buf_t *const cb) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; -+ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? NULL : ctx->cb == NULL ? NULL : ctx->cb->mmap; ++ return cb->mmap; +} + -+picture_context_t * cma_buf_pic_context2(const picture_t * const pic) ++unsigned int cma_buf_vc_addr(const cma_buf_t *const cb) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; -+ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? NULL : ctx->cb == NULL ? NULL : ctx->cb->ctx2; ++ return cb->vc_addr; +} + -+cma_pic_context_t * cma_buf_pic_context_ref(const picture_t * const pic) ++ ++picture_context_t * cma_buf_context2(const cma_buf_t *const cb) +{ -+ cma_pic_context_t *const ctx = (cma_pic_context_t *)pic->context; ++ return cb->ctx2; ++} + -+ if (!is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL || ctx->cb == NULL) -+ return NULL; + -+ cma_buf_pic_ctx_ref(ctx); -+ return ctx; ++void cma_buf_unref(cma_buf_t * const cb) ++{ ++ if (cb == NULL) ++ return; ++ if (atomic_fetch_sub(&cb->ref_count, 1) <= 1) ++ { ++ const bool was_in_flight = cb->in_flight; ++ cb->in_flight = false; ++ cma_pool_fixed_put(cb->cbp->pool, cb, cb->size, was_in_flight); ++ } +} + -+void cma_buf_pic_context_unref(cma_pic_context_t * const ctx) ++cma_buf_t * cma_buf_ref(cma_buf_t * const cb) +{ -+ if (ctx != NULL) -+ cma_buf_pic_ctx_unref(ctx); ++ if (cb == NULL) ++ return NULL; ++ atomic_fetch_add(&cb->ref_count, 1); ++ return cb; +} + ++cma_buf_t * cma_buf_pool_alloc_buf(cma_buf_pool_t * const cbp, const size_t size) ++{ ++ cma_buf_t *const cb = cma_pool_fixed_get(cbp->pool, size, cbp->all_in_flight, false); ++ ++ if (cb == NULL) ++ return NULL; ++ ++ cb->in_flight = cbp->all_in_flight; ++ // When 1st allocated or retrieved from the pool the block will have a ++ // ref count of 0 so ref here ++ return cma_buf_ref(cb); ++} + --- /dev/null +++ b/modules/hw/mmal/mmal_cma.h -@@ -0,0 +1,45 @@ +@@ -0,0 +1,71 @@ ++#ifndef VLC_MMAL_MMAL_CMA_H_ ++#define VLC_MMAL_MMAL_CMA_H_ ++ + +struct cma_pool_fixed_s; +typedef struct cma_pool_fixed_s cma_pool_fixed_t; + +typedef void * cma_pool_alloc_fn(void * v, size_t size); +typedef void cma_pool_free_fn(void * v, void * el, size_t size); ++typedef void cma_pool_on_delete_fn(void * v); + ++#if 0 +void cma_pool_fixed_unref(cma_pool_fixed_t * const p); +void cma_pool_fixed_ref(cma_pool_fixed_t * const p); -+void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size); -+void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size); ++void * cma_pool_fixed_get(cma_pool_fixed_t * const p, const size_t req_el_size, const bool in_flight); ++void cma_pool_fixed_put(cma_pool_fixed_t * const p, void * v, const size_t el_size, const bool was_in_flight); ++void cma_pool_fixed_inc_in_flight(cma_pool_fixed_t * const p); ++void cma_pool_fixed_dec_in_flight(cma_pool_fixed_t * const p); ++void cma_pool_fixed_cancel(cma_pool_fixed_t * const p); ++void cma_pool_fixed_uncancel(cma_pool_fixed_t * const p); +void cma_pool_fixed_kill(cma_pool_fixed_t * const p); -+cma_pool_fixed_t* cma_pool_fixed_new(const unsigned int pool_size, void * const alloc_v, -+ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn); -+ -+void cma_buf_pool_delete(cma_pool_fixed_t * const p); -+cma_pool_fixed_t * cma_buf_pool_new(void); -+ -+int cma_buf_pic_attach(cma_pool_fixed_t * const p, picture_t * const pic, const size_t size); -+int cma_buf_pic_add_context2(picture_t *const pic, picture_context_t * const ctx2); -+unsigned int cma_buf_pic_vc_handle(const picture_t * const pic); -+int cma_buf_pic_fd(const picture_t * const pic); -+void * cma_buf_pic_addr(const picture_t * const pic); -+picture_context_t * cma_buf_pic_context2(const picture_t * const pic); -+struct cma_pic_context_s; -+struct cma_pic_context_s * cma_buf_pic_context_ref(const picture_t * const pic); -+void cma_buf_pic_context_unref(struct cma_pic_context_s * const ctx); -+ -+#include <vlc_fourcc.h> -+ -+static inline bool is_cma_buf_pic_chroma(const uint32_t chroma) -+{ -+ return chroma == VLC_CODEC_MMAL_ZC_RGB32 || chroma == VLC_CODEC_MMAL_ZC_SAND8 || chroma == VLC_CODEC_MMAL_ZC_I420; -+} -+ -+static inline void cma_buf_pool_deletez(cma_pool_fixed_t ** const pp) -+{ -+ cma_pool_fixed_t * const p = *pp; ++int cma_pool_fixed_resize(cma_pool_fixed_t * const p, ++ const unsigned int new_pool_size, const int new_flight_size); ++cma_pool_fixed_t * cma_pool_fixed_new(const unsigned int pool_size, ++ const int flight_size, ++ void * const alloc_v, ++ cma_pool_alloc_fn * const alloc_fn, cma_pool_free_fn * const free_fn, ++ cma_pool_on_delete_fn * const on_delete_fn, ++ const char * const name); ++#endif ++ ++struct cma_buf_s; ++typedef struct cma_buf_s cma_buf_t; ++ ++void cma_buf_in_flight(cma_buf_t * const cb); ++void cma_buf_end_flight(cma_buf_t * const cb); ++unsigned int cma_buf_vcsm_handle(const cma_buf_t * const cb); ++size_t cma_buf_size(const cma_buf_t * const cb); ++int cma_buf_add_context2(cma_buf_t *const cb, picture_context_t * const ctx2); ++unsigned int cma_buf_vc_handle(const cma_buf_t *const cb); ++int cma_buf_fd(const cma_buf_t *const cb); ++void * cma_buf_addr(const cma_buf_t *const cb); ++unsigned int cma_buf_vc_addr(const cma_buf_t *const cb); ++picture_context_t * cma_buf_context2(const cma_buf_t *const cb); ++ ++void cma_buf_unref(cma_buf_t * const cb); ++cma_buf_t * cma_buf_ref(cma_buf_t * const cb); ++ ++struct cma_buf_pool_s; ++typedef struct cma_buf_pool_s cma_buf_pool_t; ++ ++cma_buf_t * cma_buf_pool_alloc_buf(cma_buf_pool_t * const p, const size_t size); ++void cma_buf_pool_cancel(cma_buf_pool_t * const cbp); ++void cma_buf_pool_uncancel(cma_buf_pool_t * const cbp); ++void cma_buf_pool_delete(cma_buf_pool_t * const p); ++int cma_buf_pool_fill(cma_buf_pool_t * const cbp, const size_t el_size); ++int cma_buf_pool_resize(cma_buf_pool_t * const cbp, ++ const unsigned int new_pool_size, const int new_flight_size); ++cma_buf_pool_t * cma_buf_pool_new(const unsigned int pool_size, const unsigned int flight_size, ++ const bool all_in_flight, const char * const name); ++ ++static inline void cma_buf_pool_deletez(cma_buf_pool_t ** const pp) ++{ ++ cma_buf_pool_t * const p = *pp; + if (p != NULL) { + *pp = NULL; + cma_buf_pool_delete(p); + } +} + -+ ++#endif // VLC_MMAL_MMAL_CMA_H_ --- /dev/null +++ b/modules/hw/mmal/mmal_gl.h @@ -0,0 +1,45 @@ @@ -7179,9 +7856,117 @@ + return pic_sys->cmabuf->h_vcsm; +} + +--- /dev/null ++++ b/modules/hw/mmal/mmal_piccpy_neon.S +@@ -0,0 +1,105 @@ ++// Copy pix ++ ++ .syntax unified ++ .arm ++// .thumb ++ .text ++ .align 16 ++ .arch armv7-a ++ .fpu neon-vfpv4 ++ ++ ++.macro function name ++ .global \name ++#ifdef __ELF__ ++ .type \name, %function ++#endif ++\name: ++.endm ++ ++ ++.macro piccpy_to_8, bit_depth ++ subs r2, #128 ++ vpush {q4-q7} ++ blt 2f ++1: ++ vldm r1!, {q0-q7} ++ subs r2, #128 ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vqrshrn.u16 d1, q1, #\bit_depth - 8 ++ vqrshrn.u16 d2, q2, #\bit_depth - 8 ++ vqrshrn.u16 d3, q3, #\bit_depth - 8 ++ vldm r1!, {q8-q15} ++ vqrshrn.u16 d4, q4, #\bit_depth - 8 ++ vqrshrn.u16 d5, q5, #\bit_depth - 8 ++ vqrshrn.u16 d6, q6, #\bit_depth - 8 ++ vqrshrn.u16 d7, q7, #\bit_depth - 8 ++ vqrshrn.u16 d8, q8, #\bit_depth - 8 ++ vqrshrn.u16 d9, q9, #\bit_depth - 8 ++ vqrshrn.u16 d10, q10, #\bit_depth - 8 ++ vqrshrn.u16 d11, q11, #\bit_depth - 8 ++ vqrshrn.u16 d12, q12, #\bit_depth - 8 ++ vqrshrn.u16 d13, q13, #\bit_depth - 8 ++ vqrshrn.u16 d14, q14, #\bit_depth - 8 ++ vqrshrn.u16 d15, q15, #\bit_depth - 8 ++ vstm r0!, {q0-q7} ++ bge 1b ++2: ++ adds r2, #64 ++ blt 1f ++ ++ vldm r1!, {q0-q7} ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vqrshrn.u16 d1, q1, #\bit_depth - 8 ++ vqrshrn.u16 d2, q2, #\bit_depth - 8 ++ vqrshrn.u16 d3, q3, #\bit_depth - 8 ++ vqrshrn.u16 d4, q4, #\bit_depth - 8 ++ vqrshrn.u16 d5, q5, #\bit_depth - 8 ++ vqrshrn.u16 d6, q6, #\bit_depth - 8 ++ vqrshrn.u16 d7, q7, #\bit_depth - 8 ++ vstm r0!, {q0-q3} ++1: ++ adds r2, #32 ++ blt 1f ++ ++ vldm r1!, {q0-q3} ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vqrshrn.u16 d1, q1, #\bit_depth - 8 ++ vqrshrn.u16 d2, q2, #\bit_depth - 8 ++ vqrshrn.u16 d3, q3, #\bit_depth - 8 ++ vstm r0!, {q0-q1} ++1: ++ adds r2, #16 ++ blt 1f ++ ++ vldm r1!, {q0-q1} ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vqrshrn.u16 d1, q1, #\bit_depth - 8 ++ vstm r0!, {q0} ++1: ++ adds r2, #8 ++ blt 1f ++ ++ vldm r1!, {q0} ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vstr d0, [r0] ++ add r0, #8 ++1: ++ adds r2, #4 ++ blt 1f ++ ++ vldr d0, [r1] ++ vqrshrn.u16 d0, q0, #\bit_depth - 8 ++ vstr s0, [r0] ++1: ++ vpop {q4-q7} ++ bx lr ++.endm ++ ++ ++@ [r0] Dest ++@ [r1] Src ++@ r2 Pels ++function mmal_piccpy_10_to_8_neon ++ piccpy_to_8 10 ++ --- a/modules/hw/mmal/mmal_picture.c +++ b/modules/hw/mmal/mmal_picture.c -@@ -21,25 +21,1034 @@ +@@ -21,25 +21,1509 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ @@ -7194,15 +7979,20 @@ +#include <fcntl.h> + #include <vlc_common.h> ++#include <vlc_cpu.h> #include <vlc_picture.h> ++ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wbad-function-cast" ++#include <bcm_host.h> ++#pragma GCC diagnostic pop #include <interface/mmal/mmal.h> +#include <interface/mmal/util/mmal_util.h> +#include <interface/mmal/util/mmal_default_components.h> +#include <interface/vmcs_host/vcgencmd.h> +#include <interface/vcsm/user-vcsm.h> -+ -+#include "mmal_cma.h" // ************** ++#include "mmal_cma.h" #include "mmal_picture.h" -int mmal_picture_lock(picture_t *picture) @@ -7281,6 +8071,17 @@ + return MMAL_ENCODING_ARGB; + break; + } ++ case VLC_CODEC_RGB16: ++ { ++ // VLC RGB16 aka RV16 means we have to look at the mask values ++ const uint32_t r = vf_vlc->i_rmask; ++ const uint32_t g = vf_vlc->i_gmask; ++ const uint32_t b = vf_vlc->i_bmask; ++ if (r == 0xf800 && g == 0x7e0 && b == 0x1f) ++ return MMAL_ENCODING_RGB16; ++ break; ++ } ++ case VLC_CODEC_I420: + case VLC_CODEC_MMAL_ZC_I420: + return MMAL_ENCODING_I420; + case VLC_CODEC_RGBA: @@ -7296,18 +8097,20 @@ + return MMAL_ENCODING_YUVUV128; + case VLC_CODEC_MMAL_ZC_SAND10: + return MMAL_ENCODING_YUVUV64_10; ++ case VLC_CODEC_MMAL_ZC_SAND30: ++ return MMAL_ENCODING_YUV10_COL; + default: + break; + } + return 0; +} + -+ -+void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc) ++static void vlc_fmt_to_video_format(MMAL_VIDEO_FORMAT_T *const vf_mmal, const video_frame_format_t * const vf_vlc) +{ -+ MMAL_VIDEO_FORMAT_T * const vf_mmal = &es_fmt->es->video; ++ const unsigned int wmask = (vf_vlc->i_chroma == VLC_CODEC_MMAL_ZC_I420 || ++ vf_vlc->i_chroma == VLC_CODEC_I420) ? 31 : 15; + -+ vf_mmal->width = (vf_vlc->i_width + 31) & ~31; ++ vf_mmal->width = (vf_vlc->i_width + wmask) & ~wmask; + vf_mmal->height = (vf_vlc->i_height + 15) & ~15; + vf_mmal->crop.x = vf_vlc->i_x_offset; + vf_mmal->crop.y = vf_vlc->i_y_offset; @@ -7325,6 +8128,73 @@ + vf_mmal->color_space = vlc_to_mmal_color_space(vf_vlc->space); +} + ++ ++void hw_mmal_vlc_fmt_to_mmal_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc) ++{ ++ vlc_fmt_to_video_format(&es_fmt->es->video, vf_vlc); ++} ++ ++bool hw_mmal_vlc_pic_to_mmal_fmt_update(MMAL_ES_FORMAT_T *const es_fmt, const picture_t * const pic) ++{ ++ MMAL_VIDEO_FORMAT_T vf_new_ss; ++ MMAL_VIDEO_FORMAT_T *const vf_old = &es_fmt->es->video; ++ MMAL_VIDEO_FORMAT_T *const vf_new = &vf_new_ss; ++ ++ vlc_fmt_to_video_format(vf_new, &pic->format); ++ ++ // If we have a format that might have come from ffmpeg then rework for ++ // a better guess as to layout. All sand stuff is "special" with regards to ++ // width/height vs real layout so leave as is if that ++ if ((pic->format.i_chroma == VLC_CODEC_MMAL_ZC_I420 || ++ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_RGB32) && ++ pic->p[0].i_pixel_pitch != 0) ++ { ++ // Now overwrite width/height with a better guess as to actual layout info ++ vf_new->height = pic->p[0].i_lines; ++ vf_new->width = pic->p[0].i_pitch / pic->p[0].i_pixel_pitch; ++ } ++ ++ if ( ++ vf_new->width != vf_old->width || ++ vf_new->height != vf_old->height || ++ vf_new->crop.x != vf_old->crop.x || ++ vf_new->crop.y != vf_old->crop.y || ++ vf_new->crop.width != vf_old->crop.width || ++ vf_new->crop.height != vf_old->crop.height || ++ vf_new->par.num != vf_old->par.num || ++ vf_new->par.den != vf_old->par.den || ++ // Frame rate ignored ++ vf_new->color_space != vf_old->color_space) ++ { ++#if 0 ++ char dbuf0[5], dbuf1[5]; ++ printf("%dx%d (%d,%d %dx%d) par:%d/%d %s -> %dx%d (%d,%d %dx%d) par:%d/%d %s\n", ++ vf_old->width , ++ vf_old->height , ++ vf_old->crop.x , ++ vf_old->crop.y , ++ vf_old->crop.width , ++ vf_old->crop.height , ++ vf_old->par.num , ++ vf_old->par.den , ++ str_fourcc(dbuf0, vf_old->color_space) , ++ vf_new->width , ++ vf_new->height , ++ vf_new->crop.x , ++ vf_new->crop.y , ++ vf_new->crop.width , ++ vf_new->crop.height , ++ vf_new->par.num , ++ vf_new->par.den , ++ str_fourcc(dbuf1, vf_new->color_space) ); ++#endif ++ *vf_old = *vf_new; ++ return true; ++ } ++ return false; ++} ++ ++ +hw_mmal_port_pool_ref_t * hw_mmal_port_pool_ref_create(MMAL_PORT_T * const port, + const unsigned int headers, const uint32_t payload_size) +{ @@ -7407,9 +8277,7 @@ + hw_mmal_port_pool_ref_t ** pppr, + MMAL_PORT_T * const port, + const unsigned int extra_buffers, MMAL_PORT_BH_CB_T callback) - { -- picture_sys_t *pic_sys = picture->p_sys; -- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++{ + MMAL_STATUS_T status; + + port->userdata = (struct MMAL_PORT_USERDATA_T *)obj; @@ -7444,20 +8312,16 @@ + msg_Err(obj, "Failed to create output pool"); + return status; + } - -- int offset = 0; -- picture->p[0].p_pixels = buffer->data; -- for (int i = 1; i < picture->i_planes; i++) { -- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; -- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ + status = mmal_port_enable(port, callback); + if (status != MMAL_SUCCESS) { ++ hw_mmal_port_pool_ref_release(*pppr, false); ++ *pppr = NULL; + msg_Err(obj, "Failed to enable output port %s (status=%"PRIx32" %s)", + port->name, status, mmal_status_to_string(status)); + return status; - } - -- pic_sys->displayed = false; ++ } ++ + return MMAL_SUCCESS; +} + @@ -7468,78 +8332,317 @@ + unsigned int i; + + for (i = 0; i != ctx->buf_count; ++i) { -+ mmal_buffer_header_release(ctx->bufs[i]); ++ if (ctx->bufs[i] != NULL) ++ mmal_buffer_header_release(ctx->bufs[i]); + } ++ ++ cma_buf_end_flight(ctx->cb); ++ cma_buf_unref(ctx->cb); ++ + free(ctx); +} + -+picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn) ++picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn) ++{ ++ const pic_ctx_mmal_t * const src_ctx = (pic_ctx_mmal_t *)pic_ctx_cmn; ++ pic_ctx_mmal_t * const dst_ctx = calloc(1, sizeof(*dst_ctx)); ++ unsigned int i; ++ ++ if (dst_ctx == NULL) ++ return NULL; ++ ++ // Copy ++ dst_ctx->cmn = src_ctx->cmn; ++ ++ dst_ctx->cb = cma_buf_ref(src_ctx->cb); ++ ++ dst_ctx->buf_count = src_ctx->buf_count; ++ for (i = 0; i != src_ctx->buf_count; ++i) { ++ dst_ctx->bufs[i] = src_ctx->bufs[i]; ++ if (dst_ctx->bufs[i] != NULL) ++ mmal_buffer_header_acquire(dst_ctx->bufs[i]); ++ } ++ ++ return &dst_ctx->cmn; ++} ++ ++static MMAL_BOOL_T ++buf_pre_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) ++{ ++ hw_mmal_port_pool_ref_t * const ppr = userdata; ++ ++ // Kill the callback - otherwise we will go in circles! ++ mmal_buffer_header_pre_release_cb_set(buf, (MMAL_BH_PRE_RELEASE_CB_T)0, NULL); ++ mmal_buffer_header_acquire(buf); // Ref it again ++ ++ // As we have re-acquired the buffer we need a full release ++ // (not continue) to zap the ref count back to zero ++ // This is "safe" 'cos we have already reset the cb ++ hw_mmal_port_pool_ref_recycle(ppr, buf); ++ hw_mmal_port_pool_ref_release(ppr, true); // Assume in callback ++ ++ return MMAL_TRUE; ++} ++ ++// Buffer belongs to context on successful return from this fn ++// is still valid on failure ++picture_context_t * ++hw_mmal_gen_context(MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr) ++{ ++ pic_ctx_mmal_t * const ctx = calloc(1, sizeof(pic_ctx_mmal_t)); ++ ++ if (ctx == NULL) ++ return NULL; ++ ++ // If we have an associated ppr then ref & set appropriate callbacks ++ if (ppr != NULL) { ++ hw_mmal_port_pool_ref_acquire(ppr); ++ mmal_buffer_header_pre_release_cb_set(buf, buf_pre_release_cb, ppr); ++ buf->user_data = NULL; ++ } ++ ++ ctx->cmn.copy = hw_mmal_pic_ctx_copy; ++ ctx->cmn.destroy = hw_mmal_pic_ctx_destroy; ++ ++ ctx->buf_count = 1; ++ ctx->bufs[0] = buf; ++ ++ return &ctx->cmn; ++} ++ ++// n is els ++// * Make NEON! ++typedef void piccpy_fn(void * dest, const void * src, size_t n); ++ ++extern piccpy_fn mmal_piccpy_10_to_8_neon; ++ ++static void piccpy_10_to_8_c(void * dest, const void * src, size_t n) + { +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++ uint8_t * d = dest; ++ const uint16_t * s = src; ++ while (n-- != 0) ++ *d++ = *s++ >> 2; ++} ++ ++// Do a stride converting copy - if the strides are the same and line_len is ++// close then do a single block copy - we don't expect to have to preserve ++// pixels in the output frame ++static void mem_copy_2d(uint8_t * d_ptr, const size_t d_stride, ++ const uint8_t * s_ptr, const size_t s_stride, ++ size_t lines, const size_t line_len) ++{ ++ if (s_stride == d_stride && d_stride < line_len + 32) ++ { ++ memcpy(d_ptr, s_ptr, d_stride * lines); ++ } ++ else ++ { ++ while (lines-- != 0) { ++ memcpy(d_ptr, s_ptr, line_len); ++ d_ptr += d_stride; ++ s_ptr += s_stride; ++ } ++ } ++} ++ ++// line_len in D units ++static void mem_copy_2d_10_to_8(uint8_t * d_ptr, const size_t d_stride, ++ const uint8_t * s_ptr, const size_t s_stride, ++ size_t lines, const size_t line_len) ++{ ++ piccpy_fn * const docpy = vlc_CPU_ARM_NEON() ? mmal_piccpy_10_to_8_neon : piccpy_10_to_8_c; ++ if (s_stride == d_stride * 2 && d_stride < line_len + 32) ++ { ++ docpy(d_ptr, s_ptr, d_stride * lines); ++ } ++ else ++ { ++ while (lines-- != 0) { ++ docpy(d_ptr, s_ptr, line_len); ++ d_ptr += d_stride; ++ s_ptr += s_stride; ++ } ++ } ++} ++ ++ ++int hw_mmal_copy_pic_to_buf(void * const buf_data, ++ uint32_t * const pLength, ++ const MMAL_ES_FORMAT_T * const fmt, ++ const picture_t * const pic) ++{ ++ const MMAL_VIDEO_FORMAT_T *const video = &fmt->es->video; ++ uint8_t * const dest = buf_data; ++ size_t length = 0; ++ ++ //**** Worry about x/y_offsets + +- int offset = 0; +- picture->p[0].p_pixels = buffer->data; +- for (int i = 1; i < picture->i_planes; i++) { +- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; +- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ assert(fmt->encoding == MMAL_ENCODING_I420); ++ ++ switch (pic->format.i_chroma) { ++ case VLC_CODEC_I420: ++ { ++ const size_t y_size = video->width * video->height; ++ mem_copy_2d(dest, video->width, ++ pic->p[0].p_pixels, pic->p[0].i_pitch, ++ video->crop.height, ++ video->crop.width); ++ ++ mem_copy_2d(dest + y_size, video->width / 2, ++ pic->p[1].p_pixels, pic->p[1].i_pitch, ++ video->crop.height / 2, ++ video->crop.width / 2); ++ ++ mem_copy_2d(dest + y_size + y_size / 4, video->width / 2, ++ pic->p[2].p_pixels, pic->p[2].i_pitch, ++ video->crop.height / 2, ++ video->crop.width / 2); ++ ++ // And make sure it is actually in memory ++ length = y_size + y_size / 2; ++ break; ++ } ++ ++ case VLC_CODEC_I420_10L: ++ { ++ const size_t y_size = video->width * video->height; ++ mem_copy_2d_10_to_8(dest, video->width, ++ pic->p[0].p_pixels, pic->p[0].i_pitch, ++ video->crop.height, ++ video->crop.width); ++ ++ mem_copy_2d_10_to_8(dest + y_size, video->width / 2, ++ pic->p[1].p_pixels, pic->p[1].i_pitch, ++ video->crop.height / 2, ++ video->crop.width / 2); ++ ++ mem_copy_2d_10_to_8(dest + y_size + y_size / 4, video->width / 2, ++ pic->p[2].p_pixels, pic->p[2].i_pitch, ++ video->crop.height / 2, ++ video->crop.width / 2); ++ ++ // And make sure it is actually in memory ++ length = y_size + y_size / 2; ++ break; ++ } ++ ++ default: ++ if (pLength != NULL) ++ *pLength = 0; ++ return VLC_EBADVAR; ++ } ++ ++ if (cma_vcsm_type() == VCSM_INIT_LEGACY) { // ** CMA is currently always uncached ++ flush_range(dest, length); + } + +- pic_sys->displayed = false; ++ if (pLength != NULL) ++ *pLength = (uint32_t)length; + + return VLC_SUCCESS; + } ++ ++ ++static MMAL_BOOL_T rep_buf_free_cb(MMAL_BUFFER_HEADER_T *header, void *userdata) +{ -+ const pic_ctx_mmal_t * const src_ctx = (pic_ctx_mmal_t *)pic_ctx_cmn; -+ pic_ctx_mmal_t * const dst_ctx = calloc(1, sizeof(*dst_ctx)); -+ unsigned int i; ++ cma_buf_t * const cb = userdata; ++ VLC_UNUSED(header); + -+ if (dst_ctx == NULL) -+ return NULL; -+ -+ // Copy -+ dst_ctx->cmn = src_ctx->cmn; ++ cma_buf_unref(cb); ++ return MMAL_FALSE; ++} + -+ dst_ctx->buf_count = src_ctx->buf_count; -+ for (i = 0; i != src_ctx->buf_count; ++i) { -+ dst_ctx->bufs[i] = src_ctx->bufs[i]; -+ mmal_buffer_header_acquire(dst_ctx->bufs[i]); -+ } ++static int cma_buf_buf_attach(MMAL_BUFFER_HEADER_T * const buf, cma_buf_t * const cb) ++{ ++ // Just a CMA buffer - fill in new buffer ++ const uintptr_t vc_h = cma_buf_vc_handle(cb); ++ if (vc_h == 0) ++ return VLC_EGENERIC; + -+ return &dst_ctx->cmn; ++ mmal_buffer_header_reset(buf); ++ buf->data = (uint8_t *)vc_h; ++ buf->alloc_size = cma_buf_size(cb); ++ buf->length = buf->alloc_size; ++ // Ensure cb remains valid for the duration of this buffer ++ mmal_buffer_header_pre_release_cb_set(buf, rep_buf_free_cb, cma_buf_ref(cb)); ++ return VLC_SUCCESS; +} + -+static MMAL_BOOL_T -+buf_pre_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata) ++MMAL_BUFFER_HEADER_T * hw_mmal_pic_buf_copied(const picture_t *const pic, ++ MMAL_POOL_T * const rep_pool, ++ MMAL_PORT_T * const port, ++ cma_buf_pool_t * const cbp) +{ -+ hw_mmal_port_pool_ref_t * const ppr = userdata; ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(rep_pool->queue); ++ if (buf == NULL) ++ goto fail0; + -+ // Kill the callback - otherwise we will go in circles! -+ mmal_buffer_header_pre_release_cb_set(buf, (MMAL_BH_PRE_RELEASE_CB_T)0, NULL); -+ mmal_buffer_header_acquire(buf); // Ref it again ++ cma_buf_t * const cb = cma_buf_pool_alloc_buf(cbp, port->buffer_size); ++ if (cb == NULL) ++ goto fail1; + -+ // As we have re-acquired the buffer we need a full release -+ // (not continue) to zap the ref count back to zero -+ // This is "safe" 'cos we have already reset the cb -+ hw_mmal_port_pool_ref_recycle(ppr, buf); -+ hw_mmal_port_pool_ref_release(ppr, true); // Assume in callback ++ if (cma_buf_buf_attach(buf, cb) != VLC_SUCCESS) ++ goto fail2; + -+ return MMAL_TRUE; ++ pic_to_buf_copy_props(buf, pic); ++ ++ if (hw_mmal_copy_pic_to_buf(cma_buf_addr(cb), &buf->length, port->format, pic) != VLC_SUCCESS) ++ goto fail2; ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ ++ cma_buf_unref(cb); ++ return buf; ++ ++fail2: ++ cma_buf_unref(cb); ++fail1: ++ mmal_buffer_header_release(buf); ++fail0: ++ return NULL; +} - -- return VLC_SUCCESS; -+// Buffer belongs to context on successful return from this fn -+// is still valid on failure -+picture_context_t * -+hw_mmal_gen_context(const MMAL_FOURCC_T fmt, MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr) ++ ++MMAL_BUFFER_HEADER_T * hw_mmal_pic_buf_replicated(const picture_t *const pic, MMAL_POOL_T * const rep_pool) +{ -+ pic_ctx_mmal_t * const ctx = calloc(1, sizeof(pic_ctx_mmal_t)); ++ pic_ctx_mmal_t *const ctx = (pic_ctx_mmal_t *)pic->context; ++ MMAL_BUFFER_HEADER_T *const rep_buf = mmal_queue_wait(rep_pool->queue); + -+ if (ctx == NULL) ++ if (rep_buf == NULL) + return NULL; + -+ // If we have an associated ppr then ref & set appropriate callbacks -+ if (ppr != NULL) { -+ hw_mmal_port_pool_ref_acquire(ppr); -+ mmal_buffer_header_pre_release_cb_set(buf, buf_pre_release_cb, ppr); -+ buf->user_data = NULL; ++ if (ctx->bufs[0] != NULL) ++ { ++ // Existing buffer - replicate it ++ if (mmal_buffer_header_replicate(rep_buf, ctx->bufs[0]) != MMAL_SUCCESS) ++ goto fail; + } ++ else if (ctx->cb != NULL) ++ { ++ // Just a CMA buffer - fill in new buffer ++ if (cma_buf_buf_attach(rep_buf, ctx->cb) != 0) ++ goto fail; ++ } ++ else ++ goto fail; + -+ ctx->cmn.copy = hw_mmal_pic_ctx_copy; -+ ctx->cmn.destroy = hw_mmal_pic_ctx_destroy; -+ -+ ctx->fmt = fmt; -+ ctx->buf_count = 1; -+ ctx->bufs[0] = buf; ++ pic_to_buf_copy_props(rep_buf, pic); ++ return rep_buf; + -+ return &ctx->cmn; ++fail: ++ mmal_buffer_header_release(rep_buf); ++ return NULL; +} + ++ ++ ++ +int hw_mmal_get_gpu_mem(void) { + static int stashed_val = -2; + VCHI_INSTANCE_T vchi_instance; @@ -7642,6 +8745,8 @@ + vlc_mutex_t lock; + + MMAL_POOL_T * buf_pool; ++ ++ vcsm_init_type_t vcsm_init_type; +}; + +typedef struct vzc_subbuf_ent_s @@ -7752,7 +8857,7 @@ + ent = ent->prev; + } + return NULL; - } ++} + +#define POOL_ENT_ALLOC_BLOCK 0x10000 + @@ -7919,10 +9024,17 @@ + +static void rescale_rect(MMAL_RECT_T * const d, const MMAL_RECT_T * const s, const MMAL_RECT_T * mul_rect, const MMAL_RECT_T * div_rect) +{ -+ d->x = rescale_x(s->x, mul_rect->width, div_rect->width); -+ d->y = rescale_x(s->y, mul_rect->height, div_rect->height); -+ d->width = rescale_x(s->width, mul_rect->width, div_rect->width); -+ d->height = rescale_x(s->height, mul_rect->height, div_rect->height); ++ d->x = rescale_x(s->x - div_rect->x, mul_rect->width, div_rect->width) + mul_rect->x; ++ d->y = rescale_x(s->y - div_rect->y, mul_rect->height, div_rect->height) + mul_rect->y; ++ d->width = rescale_x(s->width, mul_rect->width, div_rect->width); ++ d->height = rescale_x(s->height, mul_rect->height, div_rect->height); ++#if 0 ++ fprintf(stderr, "(%d,%d %dx%d) * (%d,%d %dx%d) / (%d,%d %dx%d) -> (%d,%d %dx%d)\n", ++ s->x, s->y, s->width, s->height, ++ mul_rect->x, mul_rect->y, mul_rect->width, mul_rect->height, ++ div_rect->x, div_rect->y, div_rect->width, div_rect->height, ++ d->x, d->y, d->width, d->height); ++#endif +} + +void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect) @@ -8070,17 +9182,15 @@ + + // 2D copy + { -+ unsigned int i; + uint8_t *d = ent->buf; + const uint8_t *s = pic->p[0].p_pixels + xl * bpp + fmt->i_y_offset * pic->p[0].i_pitch; -+ for (i = 0; i != fmt->i_visible_height; ++i) { -+ memcpy(d, s, dst_stride); -+ d += dst_stride; -+ s += pic->p[0].i_pitch; -+ } ++ ++ mem_copy_2d(d, dst_stride, s, pic->p[0].i_pitch, fmt->i_visible_height, dst_stride); + + // And make sure it is actually in memory -+ flush_range(ent->buf, d - (uint8_t *)ent->buf); ++ if (pc->vcsm_init_type != VCSM_INIT_CMA) { // ** CMA is currently always uncached ++ flush_range(ent->buf, dst_stride * fmt->i_visible_height); ++ } + } + } + } @@ -8114,13 +9224,12 @@ + + vlc_mutex_destroy(&pc->lock); + -+// memset(pc, 0xba, sizeof(*pc)); // Zap for (hopefully) faster crash ++ cma_vcsm_exit(pc->vcsm_init_type); + ++// memset(pc, 0xba, sizeof(*pc)); // Zap for (hopefully) faster crash + free (pc); + -+ vcsm_exit(); -+ -+// printf(">>> %s\n", __func__); ++ // printf(">>> %s\n", __func__); +} + +void hw_mmal_vzc_pool_release(vzc_pool_ctl_t * const pc) @@ -8171,7 +9280,11 @@ + if (pc == NULL) + return NULL; + -+ vcsm_init(); ++ if ((pc->vcsm_init_type = cma_vcsm_init()) == VCSM_INIT_NONE) ++ { ++ free(pc); ++ return NULL; ++ } + + pc->max_n = 8; + vlc_mutex_init(&pc->lock); // Must init before potential destruction @@ -8189,24 +9302,170 @@ + return pc; +} + ++//---------------------------------------------------------------------------- ++ ++ ++static const uint8_t shift_00[] = {0,0,0,0}; ++static const uint8_t shift_01[] = {0,1,1,1}; ++ ++int cma_pic_set_data(picture_t * const pic, ++ const MMAL_ES_FORMAT_T * const mm_esfmt, ++ const MMAL_BUFFER_HEADER_T * const buf) ++{ ++ const MMAL_VIDEO_FORMAT_T * const mm_fmt = &mm_esfmt->es->video; ++ const MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T *const buf_vid = (buf == NULL) ? NULL : &buf->type->video; ++ cma_buf_t *const cb = cma_buf_pic_get(pic); ++ unsigned int planes = 1; ++ ++ uint8_t * const data = cma_buf_addr(cb); ++ if (data == NULL) { ++ return VLC_ENOMEM; ++ } ++ ++ const uint8_t * ws = shift_00; ++ const uint8_t * hs = shift_00; ++ int pb = 1; ++ ++ switch (mm_esfmt->encoding) ++ { ++ case MMAL_ENCODING_ARGB: ++ case MMAL_ENCODING_ABGR: ++ case MMAL_ENCODING_RGBA: ++ case MMAL_ENCODING_BGRA: ++ case MMAL_ENCODING_RGB32: ++ case MMAL_ENCODING_BGR32: ++ pb = 4; ++ break; ++ case MMAL_ENCODING_RGB16: ++ pb = 2; ++ break; ++ ++ case MMAL_ENCODING_I420: ++ ws = shift_01; ++ hs = shift_01; ++ planes = 3; ++ break; ++ ++ case MMAL_ENCODING_YUVUV128: ++ hs = shift_01; ++ planes = 2; ++ break; ++ ++ default: ++// msg_Err(p_filter, "%s: Unexpected format", __func__); ++ return VLC_EGENERIC; ++ } ++ ++ // Fix up SAR if unset ++ if (pic->format.i_sar_den == 0 || pic->format.i_sar_num == 0) { ++ pic->format.i_sar_den = mm_fmt->par.den; ++ pic->format.i_sar_num = mm_fmt->par.num; ++ } ++ ++ pic->i_planes = planes; ++ unsigned int offset = 0; ++ for (unsigned int i = 0; i != planes; ++i) { ++ pic->p[i] = (plane_t){ ++ .p_pixels = data + (buf_vid != NULL ? buf_vid->offset[i] : offset), ++ .i_lines = mm_fmt->height >> hs[i], ++ .i_pitch = buf_vid != NULL ? buf_vid->pitch[i] : mm_fmt->width * pb, ++ .i_pixel_pitch = pb, ++ .i_visible_lines = mm_fmt->crop.height >> hs[i], ++ .i_visible_pitch = mm_fmt->crop.width >> ws[i] ++ }; ++ offset += pic->p[i].i_pitch * pic->p[i].i_lines; ++ } ++ return VLC_SUCCESS; ++} ++ ++int cma_buf_pic_attach(cma_buf_t * const cb, picture_t * const pic) ++{ ++ if (!is_cma_buf_pic_chroma(pic->format.i_chroma)) ++ return VLC_EGENERIC; ++ if (pic->context != NULL) ++ return VLC_EBADVAR; ++ ++ pic_ctx_mmal_t * const ctx = calloc(1, sizeof(pic_ctx_mmal_t)); ++ ++ if (ctx == NULL) ++ return VLC_ENOMEM; ++ ++ ctx->cmn.copy = hw_mmal_pic_ctx_copy; ++ ctx->cmn.destroy = hw_mmal_pic_ctx_destroy; ++ ctx->buf_count = 1; // cb takes the place of the 1st buf ++ ctx->cb = cb; ++ ++ cma_buf_in_flight(cb); ++ ++ pic->context = &ctx->cmn; ++ return VLC_SUCCESS; ++} ++ ++cma_buf_t * cma_buf_pic_get(picture_t * const pic) ++{ ++ pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; ++ return !is_cma_buf_pic_chroma(pic->format.i_chroma) || ctx == NULL ? 0 : ctx->cb; ++} ++ + +//---------------------------------------------------------------------------- + ++/* Returns the type of the Pi being used ++*/ ++bool rpi_is_model_pi4(void) { ++ return bcm_host_is_model_pi4(); ++} ++ ++// Preferred mode - none->cma on Pi4 otherwise legacy ++static volatile vcsm_init_type_t last_vcsm_type = VCSM_INIT_NONE; ++ ++vcsm_init_type_t cma_vcsm_type(void) ++{ ++ return last_vcsm_type; ++} ++ +vcsm_init_type_t cma_vcsm_init(void) +{ -+ if (vcsm_init_ex(1, -1) == 0) { -+ return VCSM_INIT_CMA; ++ vcsm_init_type_t rv = VCSM_INIT_NONE; ++ // We don't bother locking - taking a copy here should be good enough ++ vcsm_init_type_t try_type = last_vcsm_type; ++ ++ if (try_type == VCSM_INIT_NONE) { ++ if (bcm_host_is_fkms_active()) ++ try_type = VCSM_INIT_CMA; ++ else ++ try_type = VCSM_INIT_LEGACY; ++ } ++ ++ if (try_type == VCSM_INIT_CMA) { ++ if (vcsm_init_ex(1, -1) == 0) ++ rv = VCSM_INIT_CMA; ++ else if (vcsm_init_ex(0, -1) == 0) ++ rv = VCSM_INIT_LEGACY; + } -+ else if (vcsm_init_ex(0, -1) == 0) { -+ return VCSM_INIT_LEGACY; ++ else ++ { ++ if (vcsm_init_ex(0, -1) == 0) ++ rv = VCSM_INIT_LEGACY; ++ else if (vcsm_init_ex(1, -1) == 0) ++ rv = VCSM_INIT_CMA; + } -+ return VCSM_INIT_NONE; ++ ++ // Just in case this affects vcsm init do after that ++ if (rv != VCSM_INIT_NONE) ++ bcm_host_init(); ++ ++ last_vcsm_type = rv; ++ return rv; +} + +void cma_vcsm_exit(const vcsm_init_type_t init_mode) +{ + if (init_mode != VCSM_INIT_NONE) ++ { + vcsm_exit(); ++ bcm_host_deinit(); // Does nothing but add in case it ever does ++ } +} + +const char * cma_vcsm_init_str(const vcsm_init_type_t init_mode) @@ -8228,7 +9487,7 @@ + --- a/modules/hw/mmal/mmal_picture.h +++ b/modules/hw/mmal/mmal_picture.h -@@ -24,19 +24,275 @@ +@@ -24,19 +24,298 @@ #ifndef VLC_MMAL_MMAL_PICTURE_H_ #define VLC_MMAL_MMAL_PICTURE_H_ @@ -8237,6 +9496,8 @@ #include <vlc_common.h> #include <interface/mmal/mmal.h> ++#include "mmal_cma.h" ++ /* Think twice before changing this. Incorrect values cause havoc. */ #define NUM_ACTUAL_OPAQUE_BUFFERS 30 @@ -8264,31 +9525,28 @@ + + +#define CTX_BUFS_MAX 4 -+ +typedef struct pic_ctx_mmal_s { + picture_context_t cmn; // PARENT: Common els at start + -+ MMAL_FOURCC_T fmt; ++ cma_buf_t * cb; + + unsigned int buf_count; + MMAL_BUFFER_HEADER_T * bufs[CTX_BUFS_MAX]; + -+#if 0 -+ MMAL_BUFFER_HEADER_T * buf; -+ hw_mmal_port_pool_ref_t * ppr; -+ -+ MMAL_BUFFER_HEADER_T * sub_bufs; -+ MMAL_BUFFER_HEADER_T * sub_tail; -+ -+ vlc_object_t * obj; -+#endif +} pic_ctx_mmal_t; + +const char * str_fourcc(char * const buf, const unsigned int fcc); + +MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc); +MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs); -+void vlc_to_mmal_video_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc); ++void hw_mmal_vlc_fmt_to_mmal_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc); ++// Returns true if fmt_changed ++// frame_rate ignored for compare, but is set if something else is updated ++bool hw_mmal_vlc_pic_to_mmal_fmt_update(MMAL_ES_FORMAT_T *const es_fmt, const picture_t * const pic); ++ ++// Copy pic contents into an existing buffer ++int hw_mmal_copy_pic_to_buf(void * const buf_data, uint32_t * const pLength, ++ const MMAL_ES_FORMAT_T * const fmt, const picture_t * const pic); + +hw_mmal_port_pool_ref_t * hw_mmal_port_pool_ref_create(MMAL_PORT_T * const port, + const unsigned int headers, const uint32_t payload_size); @@ -8329,24 +9587,25 @@ + return n + 1 > ctx->buf_count ? NULL : ctx->bufs[n + 1]; +} + -+static inline bool hw_mmal_pic_is_mmal(const picture_t * const pic) ++static inline bool hw_mmal_chroma_is_mmal(const vlc_fourcc_t chroma) +{ -+ return pic->format.i_chroma == VLC_CODEC_MMAL_OPAQUE || -+ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND8 || -+ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_SAND10 || -+ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_I420 || -+ pic->format.i_chroma == VLC_CODEC_MMAL_ZC_RGB32; ++ return ++ chroma == VLC_CODEC_MMAL_OPAQUE || ++ chroma == VLC_CODEC_MMAL_ZC_SAND8 || ++ chroma == VLC_CODEC_MMAL_ZC_SAND10 || ++ chroma == VLC_CODEC_MMAL_ZC_SAND30 || ++ chroma == VLC_CODEC_MMAL_ZC_I420 || ++ chroma == VLC_CODEC_MMAL_ZC_RGB32; +} + -+static inline MMAL_FOURCC_T hw_mmal_pic_format(const picture_t *const pic) ++static inline bool hw_mmal_pic_is_mmal(const picture_t * const pic) +{ -+ const pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context; -+ return ctx->fmt; ++ return hw_mmal_chroma_is_mmal(pic->format.i_chroma); +} + +picture_context_t * hw_mmal_pic_ctx_copy(picture_context_t * pic_ctx_cmn); +void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn); -+picture_context_t * hw_mmal_gen_context(const MMAL_FOURCC_T fmt, ++picture_context_t * hw_mmal_gen_context( + MMAL_BUFFER_HEADER_T * buf, hw_mmal_port_pool_ref_t * const ppr); + +int hw_mmal_get_gpu_mem(void); @@ -8394,6 +9653,7 @@ + return MMAL_SUCCESS; +} + ++ +static inline void pic_to_buf_copy_props(MMAL_BUFFER_HEADER_T * const buf, const picture_t * const pic) +{ + if (!pic->b_progressive) @@ -8432,16 +9692,12 @@ + VLC_TICK_INVALID; +} + -+// Retrieve buf from pic & update with pic props -+// Note that this is a weak pointer - replicate before putting in a Q -+static inline MMAL_BUFFER_HEADER_T * pic_mmal_buffer(const picture_t *const pic) -+{ -+ MMAL_BUFFER_HEADER_T * const buf = ((pic_ctx_mmal_t *)pic->context)->bufs[0]; -+ if (buf != NULL) -+ pic_to_buf_copy_props(buf, pic); ++MMAL_BUFFER_HEADER_T * hw_mmal_pic_buf_copied(const picture_t *const pic, ++ MMAL_POOL_T * const rep_pool, ++ MMAL_PORT_T * const port, ++ cma_buf_pool_t * const cbp); + -+ return buf; -+} ++MMAL_BUFFER_HEADER_T * hw_mmal_pic_buf_replicated(const picture_t *const pic, MMAL_POOL_T * const rep_pool); + +struct vzc_pool_ctl_s; +typedef struct vzc_pool_ctl_s vzc_pool_ctl_t; @@ -8487,6 +9743,31 @@ + }; +} + ++int cma_pic_set_data(picture_t * const pic, ++ const MMAL_ES_FORMAT_T * const mm_esfmt, ++ const MMAL_BUFFER_HEADER_T * const buf); ++ ++// Attaches cma buf to pic ++// Marks in_flight if not all_in_flight anyway ++int cma_buf_pic_attach(cma_buf_t * const cb, picture_t * const pic); ++// Returns a pointer to the cma_buf attached to the pic ++// Just a pointer - doesn't add a ref ++cma_buf_t * cma_buf_pic_get(picture_t * const pic); ++ ++static inline bool is_cma_buf_pic_chroma(const uint32_t chroma) ++{ ++ return chroma == VLC_CODEC_MMAL_ZC_RGB32 || ++ chroma == VLC_CODEC_MMAL_ZC_SAND8 || ++ chroma == VLC_CODEC_MMAL_ZC_SAND10 || ++ chroma == VLC_CODEC_MMAL_ZC_SAND30 || ++ chroma == VLC_CODEC_MMAL_ZC_I420; ++} ++ ++ ++int rpi_get_model_type(void); ++bool rpi_is_model_pi4(void); ++bool rpi_is_fkms_active(void); ++ +typedef enum vcsm_init_type_e { + VCSM_INIT_NONE = 0, + VCSM_INIT_LEGACY, @@ -8495,6 +9776,7 @@ + +vcsm_init_type_t cma_vcsm_init(void); +void cma_vcsm_exit(const vcsm_init_type_t init_mode); ++vcsm_init_type_t cma_vcsm_type(void); +const char * cma_vcsm_init_str(const vcsm_init_type_t init_mode); + @@ -8625,7 +9907,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.c -@@ -0,0 +1,227 @@ +@@ -0,0 +1,234 @@ +/***************************************************************************** + * mmal.c: MMAL-based decoder plugin for Raspberry Pi + ***************************************************************************** @@ -8693,7 +9975,8 @@ + *spe = (subpic_reg_stash_t){NULL}; +} + -+MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer) ++MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, ++ const int display_id, const unsigned int layer) +{ + MMAL_STATUS_T err; + @@ -8714,6 +9997,7 @@ + + port->userdata = (void *)p_filter; + spe->port = port; ++ spe->display_id = display_id; + spe->layer = layer; + + return MMAL_SUCCESS; @@ -8752,7 +10036,7 @@ + return -1; + } +#if TRACE_ALL -+ msg_Dbg(p_filter, "Remove pic for sub %d", sub_no); ++ msg_Dbg(p_filter, "Remove pic for sub %d", spe->seq); +#endif + buf->cmd = 0; + buf->data = NULL; @@ -8797,6 +10081,11 @@ + spe->dest_rect = dreg->dest_rect; + needs_update = true; + ++ if (spe->display_id >= 0) ++ { ++ dreg->display_num = spe->display_id; ++ dreg->set |= MMAL_DISPLAY_SET_NUM; ++ } + dreg->layer = spe->layer; + dreg->set |= MMAL_DISPLAY_SET_LAYER; + @@ -8837,7 +10126,7 @@ + if (needs_update) + { +#if TRACE_ALL -+ msg_Dbg(p_filter, "Update pic for sub %d", sub_no); ++ msg_Dbg(p_filter, "Update pic for sub %d", spe->seq); +#endif + if ((err = port_send_replicated(spe->port, spe->pool, sub_buf, pts)) != MMAL_SUCCESS) + { @@ -8855,7 +10144,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.h -@@ -0,0 +1,29 @@ +@@ -0,0 +1,32 @@ +#ifndef VLC_HW_MMAL_SUBPIC_H_ +#define VLC_HW_MMAL_SUBPIC_H_ + @@ -8863,6 +10152,7 @@ +{ + MMAL_PORT_T * port; + MMAL_POOL_T * pool; ++ int display_id; // -1 => do not set + unsigned int layer; + // Shadow vars so we can tell if stuff has changed + MMAL_RECT_T dest_rect; @@ -8881,7 +10171,9 @@ + +void hw_mmal_subpic_close(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); + -+MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, const unsigned int layer); ++// If display id is -1 it will be unset ++MMAL_STATUS_T hw_mmal_subpic_open(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, MMAL_PORT_T * const port, ++ const int display_id, const unsigned int layer); + +#endif + @@ -9269,7 +10561,7 @@ + --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c -@@ -27,21 +27,24 @@ +@@ -27,21 +27,27 @@ #endif #include <math.h> @@ -9282,21 +10574,26 @@ #include <vlc_vout_display.h> +#include <vlc_modules.h> - #include "mmal_picture.h" -+#include "subpic.h" - +-#include "mmal_picture.h" +- ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wbad-function-cast" #include <bcm_host.h> ++#pragma GCC diagnostic pop #include <interface/mmal/mmal.h> #include <interface/mmal/util/mmal_util.h> #include <interface/mmal/util/mmal_default_components.h> #include <interface/vmcs_host/vc_tvservice.h> -#include <interface/vmcs_host/vc_dispmanx.h> + ++#include "mmal_picture.h" ++#include "subpic.h" ++ +#define TRACE_ALL 0 #define MAX_BUFFERS_IN_TRANSIT 1 #define VC_TV_MAX_MODE_IDS 127 -@@ -50,11 +53,6 @@ +@@ -50,10 +56,12 @@ #define MMAL_LAYER_TEXT N_("VideoCore layer where the video is displayed.") #define MMAL_LAYER_LONGTEXT N_("VideoCore layer where the video is displayed. Subpictures are displayed directly above and a black background directly below.") @@ -9304,11 +10601,16 @@ -#define MMAL_BLANK_BACKGROUND_TEXT N_("Blank screen below video.") -#define MMAL_BLANK_BACKGROUND_LONGTEXT N_("Render blank screen below video. " \ - "Increases VideoCore load.") -- ++#define MMAL_DISPLAY_NAME "mmal-display" ++#define MMAL_DISPLAY_TEXT N_("Output device for Rpi fullscreen.") ++#define MMAL_DISPLAY_LONGTEXT N_("Output device for Rpi fullscreen. " \ ++"Valid values are HDMI-1,HDMI-2. By default if qt-fullscreen-screennumber " \ ++"is specified (or set by Fullscreen Output Device in Preferences) " \ ++"HDMI-<qt-fullscreen-screennumber+1> will be used, otherwise HDMI-1.") + #define MMAL_ADJUST_REFRESHRATE_NAME "mmal-adjust-refreshrate" #define MMAL_ADJUST_REFRESHRATE_TEXT N_("Adjust HDMI refresh rate to the video.") - #define MMAL_ADJUST_REFRESHRATE_LONGTEXT N_("Adjust HDMI refresh rate to the video.") -@@ -68,64 +66,30 @@ +@@ -68,64 +76,33 @@ #define PHASE_OFFSET_TARGET ((double)0.25) #define PHASE_CHECK_INTERVAL 100 @@ -9371,17 +10673,20 @@ - DISPMANX_DISPLAY_HANDLE_T dmx_handle; - DISPMANX_ELEMENT_HANDLE_T bkg_element; - DISPMANX_RESOURCE_HANDLE_T bkg_resource; ++ int display_id; unsigned display_width; unsigned display_height; - int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ - int i_frame_rate; ++ MMAL_RECT_T dest_rect; // Output rectangle in display coords ++ + unsigned int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ + unsigned int i_frame_rate; int next_phase_check; /* lowpass for phase check frequency */ int phase_offset; /* currently applied offset to presentation time in ns */ -@@ -136,264 +100,451 @@ +@@ -136,264 +113,485 @@ bool native_interlaced; bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ bool b_progressive; @@ -9471,36 +10776,22 @@ - return VLC_EGENERIC; +static inline bool want_copy(const vout_display_t * const vd) +{ -+ return (vd->fmt.i_chroma == VLC_CODEC_I420); ++ return (vd->fmt.i_chroma == VLC_CODEC_I420 || vd->fmt.i_chroma == VLC_CODEC_I420_10L); +} - sys = calloc(1, sizeof(struct vout_display_sys_t)); - if (!sys) - return VLC_ENOMEM; - vd->sys = sys; -+// Do a stride converting copy - if the strides are the same and line_len is -+// close then do a single block copy - we don't expect to have to preserve -+// pixels in the output frame -+static inline void mem_copy_2d(uint8_t * d_ptr, const size_t d_stride, const uint8_t * s_ptr, const size_t s_stride, size_t lines, const size_t line_len) ++static inline vlc_fourcc_t req_chroma(const vout_display_t * const vd) +{ -+ if (s_stride == d_stride && s_stride < line_len + 32) -+ { -+ memcpy(d_ptr, s_ptr, s_stride * lines); -+ } -+ else -+ { -+ while (lines-- != 0) { -+ memcpy(d_ptr, s_ptr, line_len); -+ d_ptr += d_stride; -+ s_ptr += s_stride; -+ } -+ } ++ return !hw_mmal_chroma_is_mmal(vd->fmt.i_chroma) && !want_copy(vd) ? ++ VLC_CODEC_I420 : ++ vd->fmt.i_chroma; +} - sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); - bcm_host_init(); - -- sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; +static MMAL_FOURCC_T vout_vlc_to_mmal_pic_fourcc(const unsigned int fcc) +{ + switch (fcc){ @@ -9509,29 +10800,33 @@ + case VLC_CODEC_MMAL_ZC_SAND8: + return MMAL_ENCODING_YUVUV128; + case VLC_CODEC_MMAL_ZC_SAND10: -+ return MMAL_ENCODING_YUVUV64_10; // It will be after we've converted it... ++ return MMAL_ENCODING_YUVUV64_10; ++ case VLC_CODEC_MMAL_ZC_SAND30: ++ return MMAL_ENCODING_YUV10_COL; ++ case VLC_CODEC_MMAL_ZC_I420: + case VLC_CODEC_I420: + return MMAL_ENCODING_I420; + default: + break; + } -+ return 0; ++ return MMAL_ENCODING_I420; +} +- sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE; ++static void display_set_format(const vout_display_t * const vd, MMAL_ES_FORMAT_T *const es_fmt, const bool is_intermediate) ++{ ++ const unsigned int w = is_intermediate ? vd->fmt.i_visible_width : vd->fmt.i_width ; ++ const unsigned int h = is_intermediate ? vd->fmt.i_visible_height : vd->fmt.i_height; ++ MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; + - status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); - if (status != MMAL_SUCCESS) { - msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", - MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -+static void display_set_format(const vout_display_t * const vd, MMAL_ES_FORMAT_T *const es_fmt, const bool is_intermediate) -+{ -+ const unsigned int w = is_intermediate ? vd->fmt.i_visible_width : vd->fmt.i_width ; -+ const unsigned int h = is_intermediate ? vd->fmt.i_visible_height : vd->fmt.i_height; -+ MMAL_VIDEO_FORMAT_T * const v_fmt = &es_fmt->es->video; -+ + es_fmt->type = MMAL_ES_TYPE_VIDEO; -+ es_fmt->encoding = is_intermediate ? MMAL_ENCODING_I420 : vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma);; ++ es_fmt->encoding = is_intermediate ? MMAL_ENCODING_I420 : vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma); + es_fmt->encoding_variant = 0; + + v_fmt->width = (w + 31) & ~31; @@ -9550,7 +10845,6 @@ + v_fmt->frame_rate.num = vd->fmt.i_frame_rate; + v_fmt->frame_rate.den = vd->fmt.i_frame_rate_base; + v_fmt->color_space = vlc_to_mmal_color_space(vd->fmt.space); -+} - sys->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; - status = mmal_port_enable(sys->component->control, control_port_cb); @@ -9559,6 +10853,9 @@ - sys->component->control->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; ++ msg_Dbg(vd, "WxH: %dx%d, Crop: %dx%d", v_fmt->width, v_fmt->height, v_fmt->crop.width, v_fmt->crop.height); ++} ++ +static void display_src_rect(const vout_display_t * const vd, MMAL_RECT_T *const rect) +{ + const bool wants_isp = want_isp(vd); @@ -9899,14 +11196,14 @@ + isp->output->buffer_size = isp->output->buffer_size_recommended; + isp->output->buffer_num = 2; + isp->output->userdata = (void *)vd; - -- bcm_host_deinit(); ++ + if ((isp->out_pool = mmal_port_pool_create(isp->output, isp->output->buffer_num, isp->output->buffer_size)) == NULL) + { + msg_Err(vd, "Failed to make ISP port pool"); + goto fail; + } -+ + +- bcm_host_deinit(); + mmal_pool_callback_set(isp->out_pool, isp_out_pool_cb, isp); + + if ((err = isp_prepare(vd, isp)) != MMAL_SUCCESS) @@ -9981,12 +11278,12 @@ +#endif +} + -+static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height) ++static int query_resolution(vout_display_t *vd, const int display_id, unsigned *width, unsigned *height) +{ -+ TV_DISPLAY_STATE_T display_state; ++ TV_DISPLAY_STATE_T display_state = {0}; + int ret = 0; + -+ if (vc_tv_get_display_state(&display_state) == 0) { ++ if (vc_tv_get_display_state_id(display_id, &display_state) == 0) { + msg_Dbg(vd, "State=%#x", display_state.state); + if (display_state.state & 0xFF) { + msg_Dbg(vd, "HDMI: %dx%d", display_state.display.hdmi.width, display_state.display.hdmi.height); @@ -10005,15 +11302,58 @@ + ret = -1; + } + -+ return ret; - } - ++ return ret; ++} ++ ++static inline MMAL_RECT_T ++place_to_mmal_rect(const vout_display_place_t place) ++{ ++ return (MMAL_RECT_T){ ++ .x = place.x, ++ .y = place.y, ++ .width = place.width, ++ .height = place.height ++ }; + } + ++static void ++place_dest(vout_display_t *vd, vout_display_sys_t * const sys, ++ const vout_display_cfg_t * const cfg, const video_format_t * fmt) ++{ ++ video_format_t tfmt; ++ ++ // Fix SAR if unknown ++ if (fmt->i_sar_den == 0 || fmt->i_sar_num == 0) { ++ tfmt = *fmt; ++ tfmt.i_sar_den = 1; ++ tfmt.i_sar_num = 1; ++ fmt = &tfmt; ++ } ++ ++ // Ignore what VLC thinks might be going on with display size ++ vout_display_cfg_t tcfg = *cfg; ++ vout_display_place_t place; ++ tcfg.display.width = sys->display_width; ++ tcfg.display.height = sys->display_height; ++ tcfg.is_display_filled = true; ++ vout_display_PlacePicture(&place, fmt, &tcfg, false); ++ ++ sys->dest_rect = place_to_mmal_rect(place); ++#if TRACE_ALL ++ msg_Dbg(vd, "%s: %dx%d -> %dx%d @ %d,%d", __func__, ++ tcfg.display.width, tcfg.display.height, ++ place.width, place.height, place.x, place.y); ++#endif ++} ++ ++ ++ static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, const video_format_t *fmt) { - vout_display_sys_t *sys = vd->sys; +- vout_display_place_t place; + vout_display_sys_t * const sys = vd->sys; - vout_display_place_t place; MMAL_DISPLAYREGION_T display_region; MMAL_STATUS_T status; @@ -10027,21 +11367,12 @@ if (fmt) { sys->input->format->es->video.par.num = fmt->i_sar_num; -@@ -412,22 +563,29 @@ +@@ -412,22 +610,17 @@ if (!cfg) cfg = vd->cfg; - vout_display_PlacePicture(&place, fmt, cfg, false); -+ { -+ // Ignore what VLC thinks might be going on with display size -+ vout_display_cfg_t tcfg = *cfg; -+ tcfg.display.width = sys->display_width; -+ tcfg.display.height = sys->display_height; -+ tcfg.is_display_filled = true; -+ vout_display_PlacePicture(&place, fmt, &tcfg, false); -+ -+ msg_Dbg(vd, "%dx%d -> %dx%d @ %d,%d", tcfg.display.width, tcfg.display.height, place.width, place.height, place.x, place.y); -+ } ++ place_dest(vd, sys, cfg, fmt); display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); @@ -10050,11 +11381,12 @@ - display_region.src_rect.y = fmt->i_y_offset; - display_region.src_rect.width = fmt->i_visible_width; - display_region.src_rect.height = fmt->i_visible_height; +- display_region.dest_rect.x = place.x; +- display_region.dest_rect.y = place.y; +- display_region.dest_rect.width = place.width; +- display_region.dest_rect.height = place.height; + display_src_rect(vd, &display_region.src_rect); - display_region.dest_rect.x = place.x; - display_region.dest_rect.y = place.y; - display_region.dest_rect.width = place.width; - display_region.dest_rect.height = place.height; ++ display_region.dest_rect = sys->dest_rect; display_region.layer = sys->layer; + display_region.alpha = 0xff | (1 << 29); display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | @@ -10063,7 +11395,7 @@ status = mmal_port_parameter_set(sys->input, &display_region.hdr); if (status != MMAL_SUCCESS) { msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", -@@ -435,7 +593,6 @@ +@@ -435,7 +628,6 @@ return -EINVAL; } @@ -10071,7 +11403,7 @@ sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -@@ -446,192 +603,153 @@ +@@ -446,192 +638,161 @@ return 0; } @@ -10135,7 +11467,14 @@ -#ifndef NDEBUG - msg_Dbg(vd, "Creating picture pool with %u pictures", count); +#if TRACE_ALL -+ msg_Dbg(vd, "<<< %s", __func__); ++ { ++ char dbuf0[5]; ++ msg_Dbg(vd, "<<< %s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, ++ str_fourcc(dbuf0, p_pic->format.i_chroma), p_pic->format.i_width, p_pic->format.i_height, ++ p_pic->format.i_x_offset, p_pic->format.i_y_offset, ++ p_pic->format.i_visible_width, p_pic->format.i_visible_height, ++ p_pic->format.i_sar_num, p_pic->format.i_sar_den); ++ } #endif - sys->input->buffer_num = count; @@ -10144,40 +11483,17 @@ - msg_Err(vd, "Failed to enable input port %s (status=%"PRIx32" %s)", - sys->input->name, status, mmal_status_to_string(status)); - goto out; -- } -- -- status = mmal_component_enable(sys->component); -- if (status != MMAL_SUCCESS) { -- msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", -- sys->component->name, status, mmal_status_to_string(status)); -- goto out; + // If we had subpics then we have attached them to the main pic in prepare + // so all we have to do here is delete the refs + if (subpicture != NULL) { + subpicture_Delete(subpicture); } -- sys->num_buffers = count; -- sys->pool = mmal_port_pool_create(sys->input, sys->num_buffers, -- sys->input->buffer_size); -- if (!sys->pool) { -- msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32, -- count, sys->input->buffer_size); +- status = mmal_component_enable(sys->component); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", +- sys->component->name, status, mmal_status_to_string(status)); - goto out; -+ if (sys->force_config || -+ p_pic->format.i_frame_rate != sys->i_frame_rate || -+ p_pic->format.i_frame_rate_base != sys->i_frame_rate_base || -+ p_pic->b_progressive != sys->b_progressive || -+ p_pic->b_top_field_first != sys->b_top_field_first) -+ { -+ sys->force_config = false; -+ sys->b_top_field_first = p_pic->b_top_field_first; -+ sys->b_progressive = p_pic->b_progressive; -+ sys->i_frame_rate = p_pic->format.i_frame_rate; -+ sys->i_frame_rate_base = p_pic->format.i_frame_rate_base; -+ configure_display(vd, NULL, &p_pic->format); -+ } -+ + if (!sys->input->is_enabled && + (err = mmal_port_enable(sys->input, vd_input_port_cb)) != MMAL_SUCCESS) + { @@ -10200,6 +11516,27 @@ + } } - +- sys->num_buffers = count; +- sys->pool = mmal_port_pool_create(sys->input, sys->num_buffers, +- sys->input->buffer_size); +- if (!sys->pool) { +- msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32, +- count, sys->input->buffer_size); +- goto out; ++ else if (sys->isp.pending) { ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->isp.out_q); ++ sys->isp.pending = false; ++#if TRACE_ALL ++ msg_Dbg(vd, "--- %s: ISP stuff", __func__); ++#endif ++ if (mmal_port_send_buffer(sys->input, buf) != MMAL_SUCCESS) ++ { ++ mmal_buffer_header_release(buf); ++ msg_Err(vd, "Send ISP buffer to render input failed"); ++ goto fail; ++ } + } +- - memset(&picture_res, 0, sizeof(picture_resource_t)); - sys->pictures = calloc(sys->num_buffers, sizeof(picture_t *)); - for (i = 0; i < sys->num_buffers; ++i) { @@ -10212,40 +11549,40 @@ - msg_Err(vd, "Failed to create picture"); - free(picture_res.p_sys); - goto out; -+ else if (sys->isp.pending) { -+ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(sys->isp.out_q); -+ sys->isp.pending = false; -+#if TRACE_ALL -+ msg_Dbg(vd, "--- %s: ISP stuff", __func__); -+#endif -+ if (mmal_port_send_buffer(sys->input, buf) != MMAL_SUCCESS) ++ else ++ { ++ MMAL_BUFFER_HEADER_T *const pic_buf = hw_mmal_pic_buf_replicated(p_pic, sys->pool); ++ if (pic_buf == NULL) + { -+ mmal_buffer_header_release(buf); -+ msg_Err(vd, "Send ISP buffer to render input failed"); ++ msg_Err(vd, "Replicated buffer get fail"); + goto fail; } -- + - sys->pictures[i]->i_planes = sys->i_planes; - memcpy(sys->pictures[i]->p, sys->planes, sys->i_planes * sizeof(plane_t)); - } -- +- } + - memset(&picture_pool_cfg, 0, sizeof(picture_pool_configuration_t)); - picture_pool_cfg.picture_count = sys->num_buffers; - picture_pool_cfg.picture = sys->pictures; - picture_pool_cfg.lock = mmal_picture_lock; -- ++ // If dimensions have chnaged then fix that ++ if (hw_mmal_vlc_pic_to_mmal_fmt_update(sys->input->format, p_pic)) ++ { ++ msg_Dbg(vd, "Reset port format"); ++ ++ // HVS can deal with on-line dimension changes ++ if (mmal_port_format_commit(sys->input) != MMAL_SUCCESS) ++ msg_Warn(vd, "Input format commit failed"); ++ } + - sys->picture_pool = picture_pool_NewExtended(&picture_pool_cfg); - if (!sys->picture_pool) { - msg_Err(vd, "Failed to create picture pool"); - goto out; -+ else -+ { -+ MMAL_BUFFER_HEADER_T * const pic_buf = pic_mmal_buffer(p_pic); -+#if TRACE_ALL -+ msg_Dbg(vd, "--- %s: Buf stuff", __func__); -+#endif -+ if ((err = port_send_replicated(sys->input, sys->pool, pic_buf, pic_buf->pts)) != MMAL_SUCCESS) ++ if ((err = mmal_port_send_buffer(sys->input, pic_buf)) != MMAL_SUCCESS) + { ++ mmal_buffer_header_release(pic_buf); + msg_Err(vd, "Send buffer to input failed"); + goto fail; + } @@ -10314,7 +11651,7 @@ + sub_buf != NULL ? sub_buf : *psub_bufs2++, + &sys->subs[sub_no].sub, + &p_pic->format, -+ &(MMAL_RECT_T){.width = sys->display_width, .height = sys->display_height}, ++ &sys->dest_rect, + p_pic->date)) == 0) + break; + else if (rv < 0) @@ -10377,14 +11714,15 @@ case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: case VOUT_DISPLAY_CHANGE_SOURCE_CROP: -@@ -640,11 +758,38 @@ +@@ -640,11 +801,39 @@ break; case VOUT_DISPLAY_RESET_PICTURES: - vlc_assert_unreachable(); + msg_Warn(vd, "Reset Pictures"); + kill_pool(sys); -+ vd->fmt = vd->source; // Take whatever source wants to give us ++ vd->fmt = vd->source; // Take (nearly) whatever source wants to give us ++ vd->fmt.i_chroma = req_chroma(vd); // Adjust chroma to something we can actaully deal with + ret = VLC_SUCCESS; + break; + @@ -10417,14 +11755,15 @@ default: msg_Warn(vd, "Unknown control query %d", query); break; -@@ -661,13 +806,11 @@ +@@ -661,13 +850,11 @@ vlc_mutex_lock(&sys->manage_mutex); if (sys->need_configure_display) { - close_dmx(vd); - sys->dmx_handle = vc_dispmanx_display_open(0); - - if (query_resolution(vd, &width, &height) >= 0) { +- if (query_resolution(vd, &width, &height) >= 0) { ++ if (query_resolution(vd, sys->display_id, &width, &height) >= 0) { sys->display_width = width; sys->display_height = height; - vout_display_SendEventDisplaySize(vd, width, height); @@ -10433,7 +11772,7 @@ } sys->need_configure_display = false; -@@ -676,56 +819,164 @@ +@@ -676,56 +863,171 @@ vlc_mutex_unlock(&sys->manage_mutex); } @@ -10466,16 +11805,21 @@ + +#if 0 + char dbuf0[5]; -+ msg_Dbg(vd, " [%p:%p] Pos=%d,%d src=%dx%d/%dx%d, vd=%dx%d/%dx%d, Alpha=%d, Fmt=%s", src, src->p[0].p_pixels, ++ msg_Dbg(vd, " [%p:%p] Pos=%d,%d src=%dx%d/%dx%d, vd->fmt=%dx%d/%dx%d, vd->source=%dx%d/%dx%d, cfg=%dx%d, Alpha=%d, Fmt=%s", src, src->p[0].p_pixels, + sreg->i_x, sreg->i_y, + src->format.i_visible_width, src->format.i_visible_height, + src->format.i_width, src->format.i_height, + vd->fmt.i_visible_width, vd->fmt.i_visible_height, + vd->fmt.i_width, vd->fmt.i_height, ++ vd->source.i_visible_width, vd->source.i_visible_height, ++ vd->source.i_width, vd->source.i_height, ++ vd->cfg->display.width, vd->cfg->display.height, + sreg->i_alpha, + str_fourcc(dbuf0, src->format.i_chroma)); +#endif + ++ // At this point I think the subtitles are being placed in the ++ // coord space of the cfg rectangle + if ((sys->subpic_bufs[n] = hw_mmal_vzc_buf_from_pic(sys->vzc, + src, + (MMAL_RECT_T){.width = vd->cfg->display.width, .height=vd->cfg->display.height}, @@ -10510,8 +11854,22 @@ + + vd_manage(vd); + ++ if (sys->force_config || ++ p_pic->format.i_frame_rate != sys->i_frame_rate || ++ p_pic->format.i_frame_rate_base != sys->i_frame_rate_base || ++ p_pic->b_progressive != sys->b_progressive || ++ p_pic->b_top_field_first != sys->b_top_field_first) ++ { ++ sys->force_config = false; ++ sys->b_top_field_first = p_pic->b_top_field_first; ++ sys->b_progressive = p_pic->b_progressive; ++ sys->i_frame_rate = p_pic->format.i_frame_rate; ++ sys->i_frame_rate_base = p_pic->format.i_frame_rate_base; ++ configure_display(vd, NULL, &p_pic->format); ++ } ++ + // Subpics can either turn up attached to the main pic or in the -+ // subpic list here - if they turn up here then process inrto temp ++ // subpic list here - if they turn up here then process into temp + // buffers + if (subpicture != NULL) { + attach_subpics(vd, sys, subpicture); @@ -10527,25 +11885,8 @@ + + MMAL_BUFFER_HEADER_T * const buf = mmal_queue_wait(sys->copy_pool->queue); + // Copy 2d -+ unsigned int y_size = sys->input->format->es->video.width * sys->input->format->es->video.height; -+ ++ hw_mmal_copy_pic_to_buf(buf->data, &buf->length, sys->input->format, p_pic); + buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; -+ buf->length = sys->input->buffer_size; -+ -+ mem_copy_2d(buf->data, sys->input->format->es->video.width, -+ p_pic->p[0].p_pixels, p_pic->p[0].i_pitch, -+ sys->input->format->es->video.crop.height, -+ sys->input->format->es->video.crop.width); -+ -+ mem_copy_2d(buf->data + y_size, sys->input->format->es->video.width / 2, -+ p_pic->p[1].p_pixels, p_pic->p[1].i_pitch, -+ sys->input->format->es->video.crop.height / 2, -+ sys->input->format->es->video.crop.width / 2); -+ -+ mem_copy_2d(buf->data + y_size + y_size / 4, sys->input->format->es->video.width / 2, -+ p_pic->p[2].p_pixels, p_pic->p[2].i_pitch, -+ sys->input->format->es->video.crop.height / 2, -+ sys->input->format->es->video.crop.width / 2); + + sys->copy_buf = buf; + } @@ -10567,11 +11908,16 @@ + if (isp_prepare(vd, isp) != MMAL_SUCCESS) + return; + -+ buf = pic_mmal_buffer(p_pic); -+ if ((err = port_send_replicated(isp->input, isp->in_pool, -+ buf, buf->pts)) != MMAL_SUCCESS) ++ if ((buf = hw_mmal_pic_buf_replicated(p_pic, isp->in_pool)) == NULL) ++ { ++ msg_Err(vd, "Pic has no attached buffer"); ++ return; ++ } ++ ++ if ((err = mmal_port_send_buffer(isp->input, buf)) != MMAL_SUCCESS) + { + msg_Err(vd, "Send buffer to input failed"); ++ mmal_buffer_header_release(buf); + return; + } + @@ -10632,7 +11978,28 @@ } static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) -@@ -828,148 +1079,12 @@ +@@ -780,9 +1082,9 @@ + double best_score, score; + int i; + +- vc_tv_get_display_state(&display_state); ++ vc_tv_get_display_state_id(sys->display_id, &display_state); + if(display_state.display.hdmi.mode != HDMI_MODE_OFF) { +- num_modes = vc_tv_hdmi_get_supported_modes_new(display_state.display.hdmi.group, ++ num_modes = vc_tv_hdmi_get_supported_modes_new_id(sys->display_id, display_state.display.hdmi.group, + supported_modes, VC_TV_MAX_MODE_IDS, NULL, NULL); + + for (i = 0; i < num_modes; ++i) { +@@ -810,7 +1112,7 @@ + if((best_id >= 0) && (display_state.display.hdmi.mode != supported_modes[best_id].code)) { + msg_Info(vd, "Setting HDMI refresh rate to %"PRIu32, + supported_modes[best_id].frame_rate); +- vc_tv_hdmi_power_on_explicit_new(HDMI_MODE_HDMI, ++ vc_tv_hdmi_power_on_explicit_new_id(sys->display_id, HDMI_MODE_HDMI, + supported_modes[best_id].group, + supported_modes[best_id].code); + } +@@ -828,148 +1130,12 @@ } } @@ -10782,7 +12149,7 @@ ((double)vd->sys->i_frame_rate / vd->sys->i_frame_rate_base); vout_display_sys_t *sys = vd->sys; -@@ -1012,32 +1127,286 @@ +@@ -1012,32 +1178,317 @@ } } @@ -10886,41 +12253,72 @@ +#endif +} + ++ ++static const struct { ++ const char * name; ++ int num; ++} display_name_to_num[] = { ++ {"auto", -1}, ++ {"hdmi-1", DISPMANX_ID_HDMI0}, ++ {"hdmi-2", DISPMANX_ID_HDMI1}, ++ {NULL, -2} ++}; ++ ++static int find_display_num(const char * name) ++{ ++ unsigned int i; ++ for (i = 0; display_name_to_num[i].name != NULL && strcasecmp(display_name_to_num[i].name, name) != 0; ++i) ++ /* Loop */; ++ return display_name_to_num[i].num; ++} ++ +static int OpenMmalVout(vlc_object_t *object) +{ + vout_display_t *vd = (vout_display_t *)object; + vout_display_sys_t *sys; -+ vout_display_place_t place; + MMAL_DISPLAYREGION_T display_region; + MMAL_STATUS_T status; + int ret = VLC_EGENERIC; -+ const MMAL_FOURCC_T enc_in = vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma); ++ // At the moment all copy is via I420 ++ const bool needs_copy = !hw_mmal_chroma_is_mmal(vd->fmt.i_chroma); ++ const MMAL_FOURCC_T enc_in = needs_copy ? MMAL_ENCODING_I420 : ++ vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma); + +#if TRACE_ALL + msg_Dbg(vd, "<<< %s", __func__); +#endif -+ if (enc_in == 0) -+ { -+#if TRACE_ALL -+ char dbuf0[5]; -+ msg_Dbg(vd, ">>> %s: Format %s not MMAL", __func__, str_fourcc(dbuf0, vd->fmt.i_chroma)); -+#endif -+ return VLC_EGENERIC; -+ } + + sys = calloc(1, sizeof(struct vout_display_sys_t)); + if (!sys) + return VLC_ENOMEM; + vd->sys = sys; + ++ vlc_mutex_init(&sys->manage_mutex); ++ + if ((sys->init_type = cma_vcsm_init()) == VCSM_INIT_NONE) + { + msg_Err(vd, "VCSM init fail"); + goto fail; + } + ++ vc_tv_register_callback(tvservice_cb, vd); ++ + sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); + ++ { ++ const char *display_name = var_InheritString(vd, MMAL_DISPLAY_NAME); ++ int qt_num = var_InheritInteger(vd, "qt-fullscreen-screennumber" ); ++ int display_id = find_display_num(display_name); ++// sys->display_id = display_id < 0 ? vc_tv_get_default_display_id() : display_id; ++ sys->display_id = display_id >= 0 ? display_id : ++ qt_num == 1 ? DISPMANX_ID_HDMI1 : DISPMANX_ID_HDMI; ++ if (display_id < -1) ++ msg_Warn(vd, "Unknown display device: '%s'", display_name); ++ else ++ msg_Dbg(vd, "Display device: %s, qt=%d id=%d display=%d", display_name, ++ qt_num, display_id, sys->display_id); ++ } ++ + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); + if (status != MMAL_SUCCESS) { + msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", @@ -10961,7 +12359,7 @@ + + sys->input->buffer_size = sys->input->buffer_size_recommended; + -+ if (!want_copy(vd)) { ++ if (!needs_copy) { + sys->input->buffer_num = 30; + } + else { @@ -10973,18 +12371,25 @@ + } + } + -+ vout_display_PlacePicture(&place, &vd->source, vd->cfg, false); ++ if (query_resolution(vd, sys->display_id, &sys->display_width, &sys->display_height) < 0) ++ { ++ sys->display_width = vd->cfg->display.width; ++ sys->display_height = vd->cfg->display.height; ++ } ++ ++ place_dest(vd, sys, vd->cfg, &vd->source); // Sets sys->dest_rect ++ + display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; + display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); ++ display_region.display_num = sys->display_id; + display_region.fullscreen = MMAL_FALSE; + display_src_rect(vd, &display_region.src_rect); -+ display_region.dest_rect.x = place.x; -+ display_region.dest_rect.y = place.y; -+ display_region.dest_rect.width = place.width; -+ display_region.dest_rect.height = place.height; ++ display_region.dest_rect = sys->dest_rect; + display_region.layer = sys->layer; -+ display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | -+ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; ++ display_region.set = ++ MMAL_DISPLAY_SET_NUM | ++ MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | ++ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; + status = mmal_port_parameter_set(sys->input, &display_region.hdr); + if (status != MMAL_SUCCESS) { + msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", @@ -11012,35 +12417,33 @@ + goto fail; + } + -+ { -+ unsigned int i; -+ for (i = 0; i != SUBS_MAX; ++i) { -+ vout_subpic_t * const sub = sys->subs + i; -+ if ((status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sub->component)) != MMAL_SUCCESS) -+ { -+ msg_Dbg(vd, "Failed to create subpic component %d", i); -+ goto fail; -+ } -+ sub->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; -+ if ((status = mmal_port_enable(sub->component->control, vd_control_port_cb)) != MMAL_SUCCESS) { -+ msg_Err(vd, "Failed to enable control port %s on sub %d (status=%"PRIx32" %s)", -+ sys->component->control->name, i, status, mmal_status_to_string(status)); -+ goto fail; -+ } -+ if ((status = hw_mmal_subpic_open(VLC_OBJECT(vd), &sub->sub, sub->component->input[0], sys->layer + i + 1)) != MMAL_SUCCESS) { -+ msg_Dbg(vd, "Failed to open subpic %d", i); -+ goto fail; -+ } -+ if ((status = mmal_component_enable(sub->component)) != MMAL_SUCCESS) -+ { -+ msg_Dbg(vd, "Failed to enable subpic component %d", i); -+ goto fail; -+ } ++ for (unsigned int i = 0; i != SUBS_MAX; ++i) { ++ vout_subpic_t * const sub = sys->subs + i; ++ if ((status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sub->component)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(vd, "Failed to create subpic component %d", i); ++ goto fail; ++ } ++ sub->component->control->userdata = (struct MMAL_PORT_USERDATA_T *)vd; ++ if ((status = mmal_port_enable(sub->component->control, vd_control_port_cb)) != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to enable control port %s on sub %d (status=%"PRIx32" %s)", ++ sys->component->control->name, i, status, mmal_status_to_string(status)); ++ goto fail; ++ } ++ if ((status = hw_mmal_subpic_open(VLC_OBJECT(vd), &sub->sub, sub->component->input[0], ++ sys->display_id, sys->layer + i + 1)) != MMAL_SUCCESS) { ++ msg_Dbg(vd, "Failed to open subpic %d", i); ++ goto fail; ++ } ++ if ((status = mmal_component_enable(sub->component)) != MMAL_SUCCESS) ++ { ++ msg_Dbg(vd, "Failed to enable subpic component %d", i); ++ goto fail; + } + } + -+ -+ vlc_mutex_init(&sys->manage_mutex); ++ // If we can't deal with it directly ask for I420 ++ vd->fmt.i_chroma = req_chroma(vd); + + vd->info = (vout_display_info_t){ + .is_slow = false, @@ -11055,13 +12458,6 @@ + vd->display = vd_display; + vd->control = vd_control; + -+ vc_tv_register_callback(tvservice_cb, vd); -+ -+ if (query_resolution(vd, &sys->display_width, &sys->display_height) < 0) -+ { -+ sys->display_width = vd->cfg->display.width; -+ sys->display_height = vd->cfg->display.height; -+ } + + msg_Dbg(vd, ">>> %s: ok", __func__); + return VLC_SUCCESS; @@ -11090,6 +12486,8 @@ + MMAL_ADJUST_REFRESHRATE_LONGTEXT, false) + add_bool(MMAL_NATIVE_INTERLACED, false, MMAL_NATIVE_INTERLACE_TEXT, + MMAL_NATIVE_INTERLACE_LONGTEXT, false) ++ add_string(MMAL_DISPLAY_NAME, "auto", MMAL_DISPLAY_TEXT, ++ MMAL_DISPLAY_LONGTEXT, false) + set_callbacks(OpenMmalVout, CloseMmalVout) + +vlc_module_end() @@ -11097,7 +12495,7 @@ + --- /dev/null +++ b/modules/hw/mmal/xsplitter.c -@@ -0,0 +1,437 @@ +@@ -0,0 +1,560 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif @@ -11119,16 +12517,97 @@ + +#define TRACE_ALL 0 + ++typedef struct display_desc_s ++{ ++ vout_display_t * vout; ++ unsigned int max_pels; ++} display_desc_t; ++ +typedef struct mmal_x11_sys_s +{ + bool use_mmal; -+ vout_display_t * cur_vout; -+ vout_display_t * mmal_vout; -+ vout_display_t * x_vout; ++ display_desc_t * cur_desc; ++ display_desc_t mmal_desc; ++ display_desc_t x_desc; + uint32_t changed; + vlc_fourcc_t subpicture_chromas[16]; +} mmal_x11_sys_t; + ++#define MAX_GL_PELS (1920*1080) ++#define MAX_MMAL_PELS (4096*4096) // Should never be hit ++ ++#if 0 ++// Gen prog for the following table ++// Not done inline in case we end up pulling in FP libs we don't want ++#include <math.h> ++#include <stdio.h> ++ ++int main(int argc, char *argv[]) ++{ ++ unsigned int i; ++ for (i = 0; i != 64; ++i) ++ { ++ printf(" [%2u]=%5u,", i, (unsigned int)(0.5 + (1/sqrt((i + 5)/4.0) * 65536.0))); ++ if (i % 4 == 3) ++ printf("\n"); ++ } ++} ++#endif ++ ++static const uint16_t sqrt_tab[64] = { ++ [ 0]=58617, [ 1]=53510, [ 2]=49541, [ 3]=46341, ++ [ 4]=43691, [ 5]=41449, [ 6]=39520, [ 7]=37837, ++ [ 8]=36353, [ 9]=35030, [10]=33843, [11]=32768, ++ [12]=31790, [13]=30894, [14]=30070, [15]=29309, ++ [16]=28602, [17]=27945, [18]=27330, [19]=26755, ++ [20]=26214, [21]=25705, [22]=25225, [23]=24770, ++ [24]=24339, [25]=23930, [26]=23541, [27]=23170, ++ [28]=22817, [29]=22479, [30]=22155, [31]=21845, ++ [32]=21548, [33]=21263, [34]=20988, [35]=20724, ++ [36]=20470, [37]=20225, [38]=19988, [39]=19760, ++ [40]=19539, [41]=19326, [42]=19119, [43]=18919, ++ [44]=18725, [45]=18536, [46]=18354, [47]=18176, ++ [48]=18004, [49]=17837, [50]=17674, [51]=17515, ++ [52]=17361, [53]=17211, [54]=17064, [55]=16921, ++ [56]=16782, [57]=16646, [58]=16514, [59]=16384, ++ [60]=16257, [61]=16134, [62]=16013, [63]=15895 ++}; ++#define SQRT_MAX (sizeof(sqrt_tab)/sizeof(sqrt_tab[0]) - 1) ++ ++static bool cpy_fmt_limit_size(const display_desc_t * const dd, ++ video_format_t * const dst, ++ const video_format_t * const src) ++{ ++ const unsigned int src_pel = src->i_visible_width * src->i_visible_height; ++ ++ *dst = *src; ++ ++ if (src_pel <= dd->max_pels) ++ return false; ++ ++ // scaling factor sqrt(max_pel/cur_pel) ++ // sqrt done by lookup & 16 bit fixed-point maths - not exactly accurate but ++ // easily good enough & avoids floating point (which may be slow) ++ // src_pel > max_pel so n >= 0 ++ // Rounding should be such that exact sqrts work and everything else rounds ++ // down ++ unsigned int n = ((src_pel * 4 - 1) / dd->max_pels) - 4; ++ unsigned int scale = sqrt_tab[n >= SQRT_MAX ? SQRT_MAX : n]; ++ ++ // Rescale width - rounding up to 16 ++ unsigned int width = ((src->i_visible_width * scale + (16 << 16) - 1) >> 16) & ~15; ++ // Rescale height based on new width ++ unsigned int height = (src->i_visible_height * width + src->i_visible_width/2) / src->i_visible_width; ++ ++// fprintf(stderr, "%dx%d -> %dx%d\n", src->i_visible_width, src->i_visible_height, width, height); ++ ++ dst->i_width = width; ++ dst->i_visible_width = width; ++ dst->i_height = height; ++ dst->i_visible_height = height; ++ return true; ++} ++ +static void unload_display_module(vout_display_t * const x_vout) +{ + if (x_vout != NULL) { @@ -11149,9 +12628,9 @@ + if (sys == NULL) + return; + -+ unload_display_module(sys->x_vout); ++ unload_display_module(sys->x_desc.vout); + -+ unload_display_module(sys->mmal_vout); ++ unload_display_module(sys->mmal_desc.vout); + + free(sys); + @@ -11192,13 +12671,16 @@ +} + + -+static vout_display_t * load_display_module(vout_display_t * const vd, -+ const char * const cap, const char * const module_name) ++static int load_display_module(vout_display_t * const vd, ++ display_desc_t * const dd, ++ const char * const cap, ++ const char * const module_name) +{ + vout_display_t * const x_vout = vlc_object_create(vd, sizeof(*x_vout)); + ++ dd->vout = NULL; + if (!x_vout) -+ return NULL; ++ return -1; + + x_vout->owner.sys = vd; + x_vout->owner.event = mmal_x11_event; @@ -11206,10 +12688,9 @@ + x_vout->owner.window_del = mmal_x11_window_del; + + x_vout->cfg = vd->cfg; -+ x_vout->source = vd->source; + x_vout->info = vd->info; -+ -+ x_vout->fmt = vd->fmt; ++ cpy_fmt_limit_size(dd, &x_vout->source, &vd->source); ++ cpy_fmt_limit_size(dd, &x_vout->fmt, &vd->fmt); + + if ((x_vout->module = module_need(x_vout, cap, module_name, true)) == NULL) + { @@ -11219,11 +12700,12 @@ + + msg_Dbg(vd, "R/G/B: %08x/%08x/%08x", x_vout->fmt.i_rmask, x_vout->fmt.i_gmask, x_vout->fmt.i_bmask); + -+ return x_vout; ++ dd->vout = x_vout; ++ return 0; + +fail: + vlc_object_release(x_vout); -+ return NULL; ++ return -1; +} + + @@ -11239,7 +12721,7 @@ +static picture_pool_t * mmal_x11_pool(vout_display_t * vd, unsigned count) +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; -+ vout_display_t * const x_vd = sys->cur_vout; ++ vout_display_t * const x_vd = sys->cur_desc->vout; +#if TRACE_ALL + char buf0[5]; + msg_Dbg(vd, "<<< %s (count=%d) %s:%dx%d->%s:%dx%d", __func__, count, @@ -11268,7 +12750,7 @@ +static void mmal_x11_prepare(vout_display_t * vd, picture_t * pic, subpicture_t * sub) +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; -+ vout_display_t * const x_vd = sys->cur_vout; ++ vout_display_t * const x_vd = sys->cur_desc->vout; +#if TRACE_ALL + msg_Dbg(vd, "<<< %s", __func__); +#endif @@ -11289,10 +12771,10 @@ +static void mmal_x11_display(vout_display_t * vd, picture_t * pic, subpicture_t * sub) +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; -+ vout_display_t * const x_vd = sys->cur_vout; -+ const bool is_mmal_pic = hw_mmal_pic_is_mmal(pic); ++ vout_display_t * const x_vd = sys->cur_desc->vout; + +#if TRACE_ALL ++ const bool is_mmal_pic = hw_mmal_pic_is_mmal(pic); + msg_Dbg(vd, "<<< %s: fmt: %dx%d/%dx%d, pic:%dx%d, pts=%lld, mmal=%d/%d", __func__, vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, pic->format.i_width, pic->format.i_height, (long long)pic->date, + is_mmal_pic, sys->use_mmal); +#endif @@ -11312,28 +12794,29 @@ +} + + -+static int vout_display_Control(vout_display_t *vd, int query, ...) ++static int vout_display_Control(display_desc_t * const dd, int query, ...) +{ + va_list args; + int result; + + va_start(args, query); -+ result = vd->control(vd, query, args); ++ result = dd->vout->control(dd->vout, query, args); + va_end(args); + + return result; +} + -+static bool want_mmal_vout(vout_display_t * vd, const mmal_x11_sys_t * const sys) ++static bool want_mmal_vout(vout_display_t * const vd, const mmal_x11_sys_t * const sys) +{ -+ return sys->mmal_vout != NULL && (sys->x_vout == NULL || var_InheritBool(vd, "fullscreen")); ++ return sys->mmal_desc.vout != NULL && ++ (sys->x_desc.vout == NULL || var_InheritBool(vd, "fullscreen")); +} + +/* Control on the module (mandatory) */ +static int mmal_x11_control(vout_display_t * vd, int ctl, va_list va) +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; -+ vout_display_t *x_vd = sys->cur_vout; ++ display_desc_t *x_desc = sys->cur_desc; + int rv; +#if TRACE_ALL + msg_Dbg(vd, "<<< %s[%d] (ctl=%d)", __func__, sys->use_mmal, ctl); @@ -11348,23 +12831,23 @@ + const vout_display_cfg_t * const cfg = va_arg(va, const vout_display_cfg_t *); + const bool want_mmal = want_mmal_vout(vd, sys); + const bool swap_vout = (sys->use_mmal != want_mmal); -+ vout_display_t * const new_vd = want_mmal ? sys->mmal_vout : sys->x_vout; ++ display_desc_t * const new_desc = want_mmal ? &sys->mmal_desc : &sys->x_desc; + + msg_Dbg(vd, "Change size: %d, %d: mmal_vout=%p, want_mmal=%d, fs=%d", -+ cfg->display.width, cfg->display.height, sys->mmal_vout, want_mmal, ++ cfg->display.width, cfg->display.height, sys->mmal_desc.vout, want_mmal, + var_InheritBool(vd, "fullscreen")); + + if (swap_vout) { + if (sys->use_mmal) { -+ vout_display_Control(x_vd, VOUT_DISPLAY_CHANGE_MMAL_HIDE); ++ vout_display_Control(x_desc, VOUT_DISPLAY_CHANGE_MMAL_HIDE); + } + vout_display_SendEventPicturesInvalid(vd); + } + -+ rv = vout_display_Control(new_vd, ctl, cfg); ++ rv = vout_display_Control(new_desc, ctl, cfg); + if (rv == VLC_SUCCESS) { -+ vd->fmt = new_vd->fmt; -+ sys->cur_vout = new_vd; ++ vd->fmt = new_desc->vout->fmt; ++ sys->cur_desc = new_desc; + sys->use_mmal = want_mmal; + } + @@ -11373,43 +12856,50 @@ + const uint32_t changed = sys->changed; + sys->changed = 0; + if ((changed & (1 << VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)) != 0) -+ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, vd->cfg); ++ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, vd->cfg); + if ((changed & (1 << VOUT_DISPLAY_CHANGE_ZOOM)) != 0) -+ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); -+ if ((changed & ((1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP) | (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))) != 0) -+ new_vd->source = vd->source; ++ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); ++ if ((changed & ((1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP) | ++ (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))) != 0) ++ cpy_fmt_limit_size(new_desc, &new_desc->vout->source, &vd->source); + if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT)) != 0) -+ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT); ++ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT); + if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP)) != 0) -+ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP); ++ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_SOURCE_CROP); + if ((changed & (1 << VOUT_DISPLAY_CHANGE_VIEWPOINT)) != 0) -+ vout_display_Control(new_vd, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); ++ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_VIEWPOINT, vd->cfg); + } + + break; + } + + case VOUT_DISPLAY_RESET_PICTURES: -+ msg_Dbg(vd, "<<< %s: Pic reset: fmt: %dx%d<-%dx%d, source: %dx%d/%dx%d", __func__, -+ vd->fmt.i_width, vd->fmt.i_height, x_vd->fmt.i_width, x_vd->fmt.i_height, -+ vd->source.i_width, vd->source.i_height, x_vd->source.i_width, x_vd->source.i_height); ++ { ++ char dbuf0[5], dbuf1[5], dbuf2[5]; ++ msg_Dbg(vd, "<<< %s: Pic reset: fmt: %s,%dx%d<-%s,%dx%d, source: %s,%dx%d/%dx%d", __func__, ++ str_fourcc(dbuf0, vd->fmt.i_chroma), vd->fmt.i_width, vd->fmt.i_height, ++ str_fourcc(dbuf1, x_desc->vout->fmt.i_chroma), x_desc->vout->fmt.i_width, x_desc->vout->fmt.i_height, ++ str_fourcc(dbuf2, vd->source.i_chroma), vd->source.i_width, vd->source.i_height, x_desc->vout->source.i_width, ++ x_desc->vout->source.i_height); ++ } + // If the display doesn't have has_pictures_invalid then it doesn't + // expect RESET_PICTURES -+ if (sys->x_vout->info.has_pictures_invalid) { -+ rv = sys->x_vout->control(sys->x_vout, ctl, va); ++ if (sys->x_desc.vout->info.has_pictures_invalid) { ++ rv = sys->x_desc.vout->control(sys->x_desc.vout, ctl, va); + } -+ if (sys->mmal_vout && sys->mmal_vout->info.has_pictures_invalid) { -+ rv = sys->mmal_vout->control(sys->mmal_vout, ctl, va); ++ if (sys->mmal_desc.vout && sys->mmal_desc.vout->info.has_pictures_invalid) { ++ rv = sys->mmal_desc.vout->control(sys->mmal_desc.vout, ctl, va); + } -+ vd->fmt = x_vd->fmt; ++ vd->fmt = x_desc->vout->fmt; + break; + + case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: + case VOUT_DISPLAY_CHANGE_SOURCE_CROP: -+ x_vd->source = vd->source; ++ cpy_fmt_limit_size(x_desc, &x_desc->vout->source, &vd->source); ++ + /* FALLTHRU */ + default: -+ rv = x_vd->control(x_vd, ctl, va); ++ rv = x_desc->vout->control(x_desc->vout, ctl, va); +// vd->fmt = x_vd->fmt; + break; + } @@ -11426,7 +12916,7 @@ +static void mmal_x11_manage(vout_display_t * vd) +{ + mmal_x11_sys_t * const sys = (mmal_x11_sys_t *)vd->sys; -+ vout_display_t * const x_vd = sys->cur_vout; ++ vout_display_t * const x_vd = sys->cur_desc->vout; +#if TRACE_ALL + msg_Dbg(vd, "<<< %s", __func__); +#endif @@ -11453,15 +12943,34 @@ + .subpicture_chromas = NULL + }; + -+ if ((sys->x_vout = load_display_module(vd, "vout display", "opengles2")) != NULL) ++ { ++ char dbuf0[5]; ++ msg_Dbg(vd, ">>> %s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, ++ str_fourcc(dbuf0, vd->fmt.i_chroma), ++ vd->fmt.i_width, vd->fmt.i_height, ++ vd->fmt.i_x_offset, vd->fmt.i_y_offset, ++ vd->fmt.i_visible_width, vd->fmt.i_visible_height, ++ vd->fmt.i_sar_num, vd->fmt.i_sar_den); ++ } ++ ++ sys->x_desc.max_pels = MAX_GL_PELS; ++ sys->mmal_desc.max_pels = MAX_MMAL_PELS; ++ ++ if (load_display_module(vd, &sys->x_desc, "vout display", "opengles2") == 0) ++ { + msg_Dbg(vd, "Opengles2 output found"); -+ else if ((sys->x_vout = load_display_module(vd, "vout display", "xcb_x11")) != NULL) -+ msg_Dbg(vd, "X11 XCB output found"); ++ } ++ else ++ { ++ sys->x_desc.max_pels = MAX_MMAL_PELS; ++ if (load_display_module(vd, &sys->x_desc, "vout display", "xcb_x11") == 0) ++ msg_Dbg(vd, "X11 XCB output found"); ++ } + -+ if ((sys->mmal_vout = load_display_module(vd, "vout display", "mmal_vout")) != NULL) ++ if ((load_display_module(vd, &sys->mmal_desc, "vout display", "mmal_vout")) == 0) + msg_Dbg(vd, "MMAL output found"); + -+ if (sys->mmal_vout == NULL && sys->x_vout == NULL) { ++ if (sys->mmal_desc.vout == NULL && sys->x_desc.vout == NULL) { + char dbuf0[5], dbuf1[5]; + msg_Info(vd, "No valid output found for vout (%s/%s)", str_fourcc(dbuf0, vd->fmt.i_chroma), str_fourcc(dbuf1, vd->source.i_chroma)); + goto fail; @@ -11476,33 +12985,33 @@ +#endif + + if (want_mmal_vout(vd, sys)) { -+ sys->cur_vout = sys->mmal_vout; ++ sys->cur_desc = &sys->mmal_desc; + sys->use_mmal = true; + } + else { -+ sys->cur_vout = sys->x_vout; ++ sys->cur_desc = &sys->x_desc; + sys->use_mmal = false; + } + -+ if (sys->mmal_vout == NULL || sys->x_vout == NULL) { -+ vd->info = sys->cur_vout->info; ++ if (sys->mmal_desc.vout == NULL || sys->x_desc.vout == NULL) { ++ vd->info = sys->cur_desc->vout->info; + vd->info.has_pictures_invalid = true; // Should make this unwanted + } + else { + // We have both - construct a combination + vd->info = (vout_display_info_t){ + .is_slow = false, -+ .has_double_click = sys->mmal_vout->info.has_double_click || sys->x_vout->info.has_double_click, -+ .needs_hide_mouse = sys->mmal_vout->info.needs_hide_mouse || sys->x_vout->info.needs_hide_mouse, ++ .has_double_click = sys->mmal_desc.vout->info.has_double_click || sys->x_desc.vout->info.has_double_click, ++ .needs_hide_mouse = sys->mmal_desc.vout->info.needs_hide_mouse || sys->x_desc.vout->info.needs_hide_mouse, + .has_pictures_invalid = true, + }; + // Construct intersection of subpicture chromas + // sys calloced so no need to add the terminating zero -+ if (sys->mmal_vout->info.subpicture_chromas != NULL && sys->x_vout->info.subpicture_chromas != NULL) { ++ if (sys->mmal_desc.vout->info.subpicture_chromas != NULL && sys->x_desc.vout->info.subpicture_chromas != NULL) { + unsigned int n = 0; + // N^2 - fix if we ever care -+ for (const vlc_fourcc_t * p1 = sys->mmal_vout->info.subpicture_chromas; *p1 != 0 && n != 15; ++p1) { -+ for (const vlc_fourcc_t * p2 = sys->x_vout->info.subpicture_chromas; *p2 != 0; ++p2) { ++ for (const vlc_fourcc_t * p1 = sys->mmal_desc.vout->info.subpicture_chromas; *p1 != 0 && n != 15; ++p1) { ++ for (const vlc_fourcc_t * p2 = sys->x_desc.vout->info.subpicture_chromas; *p2 != 0; ++p2) { + if (*p1 == *p2) { + sys->subpicture_chromas[n++] = *p1; + break; @@ -11513,8 +13022,20 @@ + vd->info.subpicture_chromas = sys->subpicture_chromas; + } + } -+ vd->fmt = sys->cur_vout->fmt; ++ vd->fmt = sys->cur_desc->vout->fmt; + ++#if TRACE_ALL ++ { ++ char dbuf0[5]; ++ msg_Dbg(vd, ">>> %s: (%s) %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, ++ module_get_name(sys->cur_desc->vout->module, false), ++ str_fourcc(dbuf0, vd->fmt.i_chroma), ++ vd->fmt.i_width, vd->fmt.i_height, ++ vd->fmt.i_x_offset, vd->fmt.i_y_offset, ++ vd->fmt.i_visible_width, vd->fmt.i_visible_height, ++ vd->fmt.i_sar_num, vd->fmt.i_sar_den); ++ } ++#endif + return VLC_SUCCESS; + +fail: @@ -11561,15 +13082,34 @@ const EGLint conf_attr[] = { EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 5, +--- a/src/input/decoder.c ++++ b/src/input/decoder.c +@@ -1995,6 +1995,7 @@ + vlc_mutex_lock( &p_owner->lock ); + p_owner->b_waiting = false; + vlc_cond_signal( &p_owner->wait_request ); ++ vlc_mutex_unlock( &p_owner->lock ); + + /* If the video output is paused or slow, or if the picture pool size was + * under-estimated (e.g. greedy video filter, buggy decoder...), the +@@ -2005,7 +2006,6 @@ + * worker threads (if any) and the decoder thread to terminate. */ + if( p_owner->p_vout != NULL ) + vout_Cancel( p_owner->p_vout, true ); +- vlc_mutex_unlock( &p_owner->lock ); + + vlc_join( p_owner->thread, NULL ); + --- a/src/misc/fourcc.c +++ b/src/misc/fourcc.c -@@ -755,8 +755,12 @@ +@@ -755,8 +755,13 @@ { { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422, VLC_CODEC_VDPAU_VIDEO_444, VLC_CODEC_VDPAU_OUTPUT }, FAKE_FMT() }, - { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE, - VLC_CODEC_D3D9_OPAQUE, VLC_CODEC_D3D11_OPAQUE }, -+ { { VLC_CODEC_ANDROID_OPAQUE, VLC_CODEC_MMAL_OPAQUE }, ++ { { VLC_CODEC_ANDROID_OPAQUE }, FAKE_FMT() }, ++ { { VLC_CODEC_MMAL_OPAQUE, VLC_CODEC_MMAL_ZC_SAND30 }, + FAKE_FMT() }, + { { VLC_CODEC_MMAL_ZC_I420, VLC_CODEC_MMAL_ZC_SAND8, + VLC_CODEC_MMAL_ZC_SAND10, VLC_CODEC_MMAL_ZC_RGB32 }, @@ -11578,3 +13118,67 @@ FAKE_FMT() }, { { VLC_CODEC_D3D11_OPAQUE_10B, VLC_CODEC_D3D9_OPAQUE_10B }, FAKE_FMT() }, +--- a/src/misc/picture.c ++++ b/src/misc/picture.c +@@ -365,10 +365,30 @@ + p_dst->b_top_field_first = p_src->b_top_field_first; + } + ++static inline bool is_zc_chroma(const vlc_fourcc_t i_chroma) ++{ ++ return i_chroma == VLC_CODEC_MMAL_OPAQUE || ++ i_chroma == VLC_CODEC_MMAL_ZC_I420 || ++ i_chroma == VLC_CODEC_MMAL_ZC_RGB32 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND10 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND30 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND8; ++} ++ + void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src ) + { +- for( int i = 0; i < p_src->i_planes ; i++ ) +- plane_CopyPixels( p_dst->p+i, p_src->p+i ); ++ if( is_zc_chroma(p_src->format.i_chroma) ) ++ { ++ assert(p_dst->i_planes == 0); ++ p_dst->i_planes = p_src->i_planes; ++ for( int i = 0; i < p_src->i_planes; i++ ) ++ p_dst->p[i] = p_src->p[i]; ++ } ++ else ++ { ++ for( int i = 0; i < p_src->i_planes; i++ ) ++ plane_CopyPixels( p_dst->p+i, p_src->p+i ); ++ } + + assert( p_dst->context == NULL ); + +--- a/src/video_output/video_output.c ++++ b/src/video_output/video_output.c +@@ -964,6 +964,17 @@ + return NULL; + } + ++ ++static inline bool is_zc_chroma(const vlc_fourcc_t i_chroma) ++{ ++ return i_chroma == VLC_CODEC_MMAL_OPAQUE || ++ i_chroma == VLC_CODEC_MMAL_ZC_I420 || ++ i_chroma == VLC_CODEC_MMAL_ZC_RGB32 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND10 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND30 || ++ i_chroma == VLC_CODEC_MMAL_ZC_SAND8; ++} ++ + static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) + { + vout_thread_sys_t *sys = vout->p; +@@ -1098,7 +1109,7 @@ + } + + assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr); +- if (sys->display.use_dr && !is_direct) { ++ if (sys->display.use_dr && !is_direct && !is_zc_chroma(todisplay->format.i_chroma)) { + picture_t *direct = NULL; + if (likely(vout->p->display_pool != NULL)) + direct = picture_pool_Get(vout->p->display_pool); diff --git a/sources b/sources index cc99bb4..3bf1f0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.9-20191014-0223.tar.xz) = c4585121d67d426d4cc1441f3b7f11be864b2a9e4da100e5b5f3a7116a4bce8e96c809ee9048b9566cf8c1893d2326ca9afad5913696ecfd8b502f80cdfd1a78 +SHA512 (vlc-3.0.9-20200118-0223.tar.xz) = 3ad1e02a4603953fc08e4be7b3a4bb2fb05fe987b26559467e6b19b437dfc01c76ce4d03185fe3bda7d3d6c07cca9b99607a2cc530f266f4eb0f37d05e0f32c9 diff --git a/vlc.spec b/vlc.spec index 2b1ccf9..8e4ec8e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_date 20191014 +%global vlc_date 20200118 #global vlc_rc -rc9 %global vlc_tag -%{?vlc_date}-0223 %if 0%{?vlc_tag:1} @@ -54,11 +54,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 27%{?dist} +Release: 28%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_10.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch Patch1: libplacebo_patch_1.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch @@ -129,7 +129,9 @@ BuildRequires: libmtp-devel >= 1.0.0 %{?_with_projectm:BuildRequires: libprojectM-devel} BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 +%if ! 0%{?el8} BuildRequires: libssh2-devel +%endif BuildRequires: libsysfs-devel BuildRequires: libshout-devel BuildRequires: libsmbclient-devel @@ -560,6 +562,11 @@ fi || : %changelog +* Sat Jan 18 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-28 +- Update to current snapshot +- Drop libssh2 from el8 - rfbz#5519 +- Update mmal patch + * Sun Dec 22 2019 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-27 - Rebuild for new protobuf version From 268a8d92aed45460ec0f7ca9f34a84ef7033a991 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jan 2020 09:35:09 +0100 Subject: [PATCH 476/671] Enable mmal-avcodec for rpi --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 8e4ec8e..1deb4ad 100644 --- a/vlc.spec +++ b/vlc.spec @@ -341,6 +341,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-omxil-vout \ --enable-rpi-omxil \ --enable-mmal \ + --enable-mmal-avcodec \ } \ %{?_with_aom:--enable-aom} \ %{!?_with_a52dec:--disable-a52} \ From a49035837f010946ee2b5e0eabbcfa32917ac292 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jan 2020 09:46:58 +0100 Subject: [PATCH 477/671] disable libssh2 on el8 --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 1deb4ad..a3c5935 100644 --- a/vlc.spec +++ b/vlc.spec @@ -354,6 +354,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?!_without_freeworld: --enable-realrtsp} \ --enable-flac \ --enable-tremor \ +%{?el8:--disable-libssh2} \ --enable-speex \ --enable-theora \ --enable-libass \ From b83425fef3983af36dca0779e6e92a47b5cb5e68 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jan 2020 09:54:14 +0100 Subject: [PATCH 478/671] Fixup sftp disabled for el8 --- vlc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index a3c5935..73a61bc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -334,7 +334,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --enable-lua \ %{?_with_live555:--enable-live555} \ %{?_with_opencv:--enable-opencv} \ - --enable-sftp \ +%{!?el8:--enable-sftp} \ %{?_with_vcdimager:--enable-vcdx} \ %{?_with_rpi: \ --enable-omxil \ @@ -354,7 +354,6 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : %{?!_without_freeworld: --enable-realrtsp} \ --enable-flac \ --enable-tremor \ -%{?el8:--disable-libssh2} \ --enable-speex \ --enable-theora \ --enable-libass \ From 25ed67c21fad322bf3e28d4087cc1e5a6b41c361 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 1 Feb 2020 08:51:35 +0000 Subject: [PATCH 479/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 73a61bc..9899c2e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 28%{?dist} +Release: 29%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -563,6 +563,9 @@ fi || : %changelog +* Sat Feb 01 2020 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-29 +- rebuilt + * Sat Jan 18 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-28 - Update to current snapshot - Drop libssh2 from el8 - rfbz#5519 From 49215ee5f6f29853d8624f8019050482ae72d8a4 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 8 Feb 2020 20:13:34 +0000 Subject: [PATCH 480/671] Rebuild for new libplacebo version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9899c2e..03c7e2d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -563,6 +563,9 @@ fi || : %changelog +* Sat Feb 08 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-30 +- Rebuild for new libplacebo version + * Sat Feb 01 2020 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9-29 - rebuilt From dcdcafada6bf3401590835fa6f0c8bfcdda4fb35 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sat, 22 Feb 2020 20:24:16 +0000 Subject: [PATCH 481/671] - Rebuild for ffmpeg-4.3 git Signed-off-by: leigh123linux <leigh123linux@googlemail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 03c7e2d..ab68c0e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 30%{?dist} +Release: 31%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -563,6 +563,9 @@ fi || : %changelog +* Sat Feb 22 2020 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 1:3.0.9-31 +- Rebuild for ffmpeg-4.3 git + * Sat Feb 08 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.9-30 - Rebuild for new libplacebo version From 952402246eee6fb202fcf65b8b59f78d9460b8e4 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Sun, 23 Feb 2020 15:11:30 +0000 Subject: [PATCH 482/671] - Rebuild for x265 Signed-off-by: leigh123linux <leigh123linux@googlemail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ab68c0e..42e86b6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 31%{?dist} +Release: 32%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -563,6 +563,9 @@ fi || : %changelog +* Sun Feb 23 2020 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 1:3.0.9-32 +- Rebuild for x265 + * Sat Feb 22 2020 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 1:3.0.9-31 - Rebuild for ffmpeg-4.3 git From ee6b5e1d4b554e9ff496d50eadf4be001754b5d4 Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 6 Mar 2020 09:31:16 +0000 Subject: [PATCH 483/671] Update to current snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 3bf1f0a..8313376 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.9-20200118-0223.tar.xz) = 3ad1e02a4603953fc08e4be7b3a4bb2fb05fe987b26559467e6b19b437dfc01c76ce4d03185fe3bda7d3d6c07cca9b99607a2cc530f266f4eb0f37d05e0f32c9 +SHA512 (vlc-3.0.9-20200306-0223.tar.xz) = ca85dfab616d72572f83e67dc7b2b4e683237e0df2b2a4cec0c261c903932aa87dc7339dc6adfc45cf10eb1ca3f61e55058849e700f29144901cfafb1f6705dd diff --git a/vlc.spec b/vlc.spec index 42e86b6..b9410ca 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global vlc_date 20200118 +%global vlc_date 20200306 #global vlc_rc -rc9 %global vlc_tag -%{?vlc_date}-0223 %if 0%{?vlc_tag:1} @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 32%{?dist} +Release: 33%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz @@ -563,6 +563,9 @@ fi || : %changelog +* Fri Mar 06 2020 leigh123linux <leigh123linux@googlemail.com> - 1:3.0.9-33 +- Update to current snapshot + * Sun Feb 23 2020 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 1:3.0.9-32 - Rebuild for x265 From 7eafeaa7b630a9c1d1fea60da473e33f3cea0b6e Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 6 Mar 2020 10:31:47 +0000 Subject: [PATCH 484/671] Fix f30 build with old dav1d --- buildfix_for_old_dav1d.patch | 30 ++++++++++++++++++++++++++++++ vlc.spec | 6 ++++++ 2 files changed, 36 insertions(+) create mode 100644 buildfix_for_old_dav1d.patch diff --git a/buildfix_for_old_dav1d.patch b/buildfix_for_old_dav1d.patch new file mode 100644 index 0000000..ab484ff --- /dev/null +++ b/buildfix_for_old_dav1d.patch @@ -0,0 +1,30 @@ +--- a/modules/codec/dav1d.c ++++ b/modules/codec/dav1d.c +@@ -223,7 +223,7 @@ + if( p_data ) + { + res = dav1d_send_data(p_sys->c, p_data); +- if (res < 0 && res != DAV1D_ERR(EAGAIN)) ++ if (res < 0 && res != -EAGAIN) + { + msg_Err(dec, "Decoder feed error %d!", res); + i_ret = VLC_EGENERIC; +@@ -248,15 +248,14 @@ + decoder_QueueVideo(dec, pic); + dav1d_picture_unref(&img); + } +- else if (res != DAV1D_ERR(EAGAIN)) ++ else if (res != -EAGAIN) + { + msg_Warn(dec, "Decoder error %d!", res); + break; + } + + /* on drain, we must ignore the 1st EAGAIN */ +- if(!b_draining && (res == DAV1D_ERR(EAGAIN) || res == 0) +- && (p_data == NULL||b_eos)) ++ if(!b_draining && (res == -EAGAIN || res == 0) && (p_data == NULL||b_eos)) + { + b_draining = true; + res = 0; + diff --git a/vlc.spec b/vlc.spec index b9410ca..825572c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -62,6 +62,9 @@ Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16 Patch1: libplacebo_patch_1.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +# Revert commit for f30 +# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 +Patch4: buildfix_for_old_dav1d.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -304,6 +307,9 @@ VLC media player extras modules. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%if 0%{?fedora} == 30 +%patch4 -p1 +%endif %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable From 768c6946bc8a7389c0837416fba86e68c1e65ffc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 31 Mar 2020 22:16:36 +0200 Subject: [PATCH 485/671] Enable aom dav1d asdcp for all --- vlc.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index 825572c..2937f84 100644 --- a/vlc.spec +++ b/vlc.spec @@ -28,18 +28,16 @@ %global _with_fluidsynth 1 %global _with_schroedinger 1 %global _with_freerdp 1 +%global _with_dav1d 1 +%global _with_aom 1 +%global _with_asdcp 1 %if 0%{?fedora} || 0%{?el8} -%global _with_aom 1 %global _with_bluray 1 -%global _with_dav1d 1 %global _with_wayland 1 %endif %if 0%{?fedora} -%ifarch x86_64 -%global _with_asdcp 1 -%endif %ifarch x86_64 i686 %global _with_crystalhd 1 %endif From 7555b0e096aab6157d89f2de39fdbbeaa7d61bd2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 31 Mar 2020 22:19:04 +0200 Subject: [PATCH 486/671] ifarch asdcplib --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 2937f84..0061557 100644 --- a/vlc.spec +++ b/vlc.spec @@ -30,7 +30,9 @@ %global _with_freerdp 1 %global _with_dav1d 1 %global _with_aom 1 +%ifarch x86_64 ppc64le aarch64 %global _with_asdcp 1 +%endif %if 0%{?fedora} || 0%{?el8} %global _with_bluray 1 From eb9238b971121c92405cec7b545b7495bc599b8c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 2 Apr 2020 15:35:40 +0200 Subject: [PATCH 487/671] Update to 20200402 --- sources | 2 +- vlc.spec | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 8313376..4ce1d9b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.9-20200306-0223.tar.xz) = ca85dfab616d72572f83e67dc7b2b4e683237e0df2b2a4cec0c261c903932aa87dc7339dc6adfc45cf10eb1ca3f61e55058849e700f29144901cfafb1f6705dd +SHA512 (vlc-3.0.9-20200402-0222.tar.xz) = b83d99d780713b21fceab88ea794e5e620d756728e69f9578536bd12d66315aa9b3ab48ec65988e1bb83b0dd51f5b49aba4fddbd67f6faea6e13d9e6e5a5c272 diff --git a/vlc.spec b/vlc.spec index 0061557..8919217 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global vlc_date 20200306 +%global vlc_date 20200402 #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0223 +%global vlc_tag -%{?vlc_date}-0222 %if 0%{?vlc_tag:1} %global vlc_url https://nightlies.videolan.org/build/source/ %else @@ -54,12 +54,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 33%{?dist} +Release: 34%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch -Patch1: libplacebo_patch_1.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 @@ -304,12 +303,15 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } -%patch1 -p1 %patch2 -p1 %patch3 -p1 %if 0%{?fedora} == 30 %patch4 -p1 %endif +%if 0%{?el7} +# Lower opus requirement - rfbz#5585 +sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac +%endif %if 0%{?rhel} == 7 . /opt/rh/devtoolset-7/enable @@ -421,6 +423,9 @@ rm -rf %{buildroot}%{_datadir}/kde4 %find_lang %{name} +%check +make check + %ldconfig_scriptlets core @@ -569,6 +574,10 @@ fi || : %changelog +* Thu Apr 02 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-34 +- Update to 20200402 +- Enable make tests + * Fri Mar 06 2020 leigh123linux <leigh123linux@googlemail.com> - 1:3.0.9-33 - Update to current snapshot From f9bf28c299cd9ef541fc4dc9d95882e9338d6ce7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 2 Apr 2020 16:06:05 +0200 Subject: [PATCH 488/671] Update for qt5-qtwayland and phonon for el8 --- vlc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 8919217..b5f9b31 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,8 +59,8 @@ License: GPLv2+ URL: https://www.videolan.org Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch -Patch2: Fix_aom_abi_break.patch -Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +Patch2: Fix_aom_abi_break.patch +Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 # https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 Patch4: buildfix_for_old_dav1d.patch @@ -225,7 +225,7 @@ BuildRequires: raspberrypi-vc-static BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: phonon-qt5-devel BuildRequires: phonon-qt5-backend-gstreamer %else @@ -237,7 +237,7 @@ Provides: phonon-backend-vlc = 0.6.2-3 %{?_with_wayland: # Fedora 25 Workstation default to wayland but not all # Boolean deps will handle this better when allowed -%if 0%{?fedora} >= 25 +%if 0%{?fedora} || 0%{?rhel} >= 8 Recommends: qt5-qtwayland%{_isa} %endif } From 456e09651201d8727297036177b525aed4bd0a45 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 5 Apr 2020 15:03:49 +0200 Subject: [PATCH 489/671] Switch to gitlab snapshot --- .gitignore | 1 + sources | 2 +- vlc.spec | 56 +++++++++++++++++++++++++++++++----------------------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 6d32910..bd25b59 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vlc-*.tar.xz +vlc-*.tar.gz diff --git a/sources b/sources index 4ce1d9b..a635077 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.9-20200402-0222.tar.xz) = b83d99d780713b21fceab88ea794e5e620d756728e69f9578536bd12d66315aa9b3ab48ec65988e1bb83b0dd51f5b49aba4fddbd67f6faea6e13d9e6e5a5c272 +SHA512 (vlc-8b5cff4.tar.gz) = 868bf13a61407775a272448bad84c9d4fea761a94feaf61de428357ff4e69d18ad416b1911286c921b82c4574ae8029524c11b3a6c7d48c2d0b627a3b57d0dc8 diff --git a/vlc.spec b/vlc.spec index b5f9b31..a0d6d05 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,11 +1,6 @@ -%global vlc_date 20200402 +%global commit0 8b5cff44981b3af508678b7eb687944e8f2688ea +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 -%global vlc_tag -%{?vlc_date}-0222 -%if 0%{?vlc_tag:1} -%global vlc_url https://nightlies.videolan.org/build/source/ -%else -%global vlc_url https://download.videolan.org/pub/videolan/vlc/ -%endif %global _with_bootstrap 1 @@ -21,7 +16,7 @@ %endif %global _with_a52dec 1 -%global _with_libdvbpsi 1 +%global _with_libdvbpsi 1 %global _with_libmad 1 %global _with_libmpeg2 1 %global _with_twolame 1 @@ -54,19 +49,28 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv2+ URL: https://www.videolan.org -Source0: %{vlc_url}/%{?!vlc_tag:%{version}/}vlc-%{version}%{?vlc_tag}.tar.xz +%if 0%{?commit0:1} +Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz +%global vlc_setup vlc-3.0-%{?commit0} +%elif 0%{?vlc_rc:1} +Source0: https://download.videolan.org/pub/videolan/testing/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz +%global vlc_setup vlc-%{version}%{?vlc_rc} +%else +Source0: https://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}.tar.xz +%global vlc_setup vlc-%{version} +%endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 # https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 -Patch4: buildfix_for_old_dav1d.patch +Patch4: buildfix_for_old_dav1d.patch BuildRequires: desktop-file-utils -BuildRequires: libappstream-glib -BuildRequires: fontpackages-devel +BuildRequires: libappstream-glib +BuildRequires: fontpackages-devel %{?_with_bootstrap: BuildRequires: bison @@ -221,8 +225,8 @@ BuildRequires: raspberrypi-vc-devel BuildRequires: raspberrypi-vc-static } -%if 0%{?rhel} == 7 -BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel +%if 0%{?el7} +BuildRequires: devtoolset-8-toolchain, devtoolset-8-libatomic-devel %endif %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -299,7 +303,7 @@ VLC media player extras modules. %prep -%setup -q -n %{name}-%{version}%{?vlc_rc} +%setup -q -n %{vlc_setup} %{?_with_rpi: %patch0 -p1 } @@ -311,10 +315,7 @@ VLC media player extras modules. %if 0%{?el7} # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac -%endif - -%if 0%{?rhel} == 7 -. /opt/rh/devtoolset-7/enable +. /opt/rh/devtoolset-8/enable %endif %{?_with_bootstrap: @@ -322,10 +323,12 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap } +touch src/revision.txt + %build -%if 0%{?rhel} == 7 -. /opt/rh/devtoolset-7/enable +%if 0%{?el7} +. /opt/rh/devtoolset-8/enable %endif %configure \ @@ -336,8 +339,9 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : --with-default-font-family=DejaVuSans \ --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ --with-default-monospace-font-family=DejaVuSansMono \ + --with-kde-solid=no \ --with-pic \ - --disable-rpath \ + --disable-rpath \ --with-binary-version=%{version} \ --enable-lua \ %{?_with_live555:--enable-live555} \ @@ -472,7 +476,7 @@ fi || : %files -%doc AUTHORS ChangeLog NEWS README THANKS +%doc AUTHORS NEWS README THANKS %license COPYING %{_datadir}/metainfo/vlc.appdata.xml %{_datadir}/applications/*%{name}.desktop @@ -574,6 +578,10 @@ fi || : %changelog +* Sun Apr 05 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-35 +- Switch to gitlab snapshot +- Switch to devtoolset-8 for el7 + * Thu Apr 02 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-34 - Update to 20200402 - Enable make tests From 1d36e5a2abbe9196bf65564bdc7dd0274ee39e4c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 5 Apr 2020 18:24:16 +0200 Subject: [PATCH 490/671] Add patch for dvdnav/read --- ...av-Fix-cases-where-DVD-_VERSION-are-.patch | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch diff --git a/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch b/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch new file mode 100644 index 0000000..94eed8a --- /dev/null +++ b/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch @@ -0,0 +1,75 @@ +From 92b65796875fbd30c3ae4c98a924b735ede60038 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Thu, 2 Apr 2020 16:25:56 +0200 +Subject: [PATCH] vlc-3x: dvdread/nav: Fix cases where DVD*_VERSION* are + undefined + +With libdvdread/nav 5.0.3 (as in EL7/8) DVDREAD_VERSION_CODE is undefined +leading to a comparison error. Use the older version notation for vlc-3.x +instead. + +Also DVDNAV_VERSION is undefined there leading to a warning as it will +assume VERSION = 0. Use a #if defined to clear that warning. + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + modules/access/dvdnav.c | 6 +++--- + modules/access/dvdread.c | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c +index 61a9157111..86954e0d96 100644 +--- a/modules/access/dvdnav.c ++++ b/modules/access/dvdnav.c +@@ -191,7 +191,7 @@ static int EventMouse( vlc_object_t *, char const *, + static int EventIntf( vlc_object_t *, char const *, + vlc_value_t, vlc_value_t, void * ); + +-#if DVDNAV_VERSION >= 60100 ++#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 + static void DvdNavLog( void *foo, dvdnav_logger_level_t i, const char *p, va_list z) + { + msg_GenericVa( (demux_t*)foo, i, p, z ); +@@ -367,7 +367,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) + + /* Open dvdnav */ + psz_path = ToLocale( psz_file ); +-#if DVDNAV_VERSION >= 60100 ++#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 + dvdnav_logger_cb cbs; + cbs.pf_log = DvdNavLog; + if( dvdnav_open2( &p_dvdnav, p_demux, &cbs, psz_path ) != DVDNAV_STATUS_OK ) +@@ -479,7 +479,7 @@ static int DemuxOpen ( vlc_object_t *p_this ) + }; + + /* Open dvdnav with stream callbacks */ +-#if DVDNAV_VERSION >= 60100 ++#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 + dvdnav_logger_cb cbs; + cbs.pf_log = DvdNavLog; + if( dvdnav_open_stream2( &p_dvdnav, p_demux, +diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c +index 442b3a0e49..5fe184193b 100644 +--- a/modules/access/dvdread.c ++++ b/modules/access/dvdread.c +@@ -157,7 +157,7 @@ static int DvdReadSeek ( demux_t *, int ); + static void DvdReadHandleDSI( demux_t *, uint8_t * ); + static void DvdReadFindCell ( demux_t * ); + +-#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) ++#if defined(DVDREAD_VERSION) && DVDREAD_VERSION >= 60100 + static void DvdReadLog( void *foo, dvd_logger_level_t i, const char *p, va_list z ) + { + demux_t *p_demux = (demux_t*)foo; +@@ -200,7 +200,7 @@ static int Open( vlc_object_t *p_this ) + + /* Open dvdread */ + const char *psz_path = ToLocale( psz_file ); +-#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) ++#if defined(DVDREAD_VERSION) && DVDREAD_VERSION >= 60100 + dvd_logger_cb cbs; + cbs.pf_log = DvdReadLog; + dvd_reader_t *p_dvdread = DVDOpen2( p_demux, &cbs, psz_path ); +-- +2.25.1 + From 86e1df2f4253077f6b9bb96e44a6afc41364a9b8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 5 Apr 2020 18:26:49 +0200 Subject: [PATCH 491/671] Update changelog --- vlc.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/vlc.spec b/vlc.spec index a0d6d05..c7cebaf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -49,20 +49,23 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9 -Release: 35%{?dist} +Release: 36%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz %global vlc_setup vlc-3.0-%{?commit0} -%elif 0%{?vlc_rc:1} +%else +%if 0%{?vlc_rc:1} Source0: https://download.videolan.org/pub/videolan/testing/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} %else Source0: https://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}.tar.xz %global vlc_setup vlc-%{version} %endif +%endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch +Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 @@ -191,12 +194,12 @@ BuildRequires: pkgconfig(wayland-client) >= 1.5.91 BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) } -%{?_with_schroedinger:BuildRequires: schroedinger-devel >= 1.0.10} -BuildRequires: sqlite-devel +%{?_with_schroedinger:BuildRequires: pkgconfig(schroedinger-1.0)} +BuildRequires: pkgconfig(sqlite3) %{?_with_sidplay:BuildRequires: pkgconfig(libsidplay2)} -BuildRequires: speex-devel >= 1.1.5 -BuildRequires: taglib-devel -%{?_with_twolame:BuildRequires: twolame-devel} +BuildRequires: pkgconfig(speex) +BuildRequires: pkgconfig(taglib) +%{?_with_twolame:BuildRequires: pkgconfig(twolame)} %{?_with_vcdimager:BuildRequires: vcdimager-devel >= 0.7.21} %{?_with_x264:BuildRequires: x264-devel >= 0-0.8.20061028} %{?_with_x265:BuildRequires: x265-devel} @@ -307,6 +310,7 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } +%patch1 -p1 %patch2 -p1 %patch3 -p1 %if 0%{?fedora} == 30 @@ -315,6 +319,8 @@ VLC media player extras modules. %if 0%{?el7} # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac +sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c +sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c . /opt/rh/devtoolset-8/enable %endif @@ -578,6 +584,10 @@ fi || : %changelog +* Sun Apr 05 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-36 +- Lower libopus requirement for el7 - rfbz#5585 +- Add patch to build with libdvdread/libdvdnav for rhel + * Sun Apr 05 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-35 - Switch to gitlab snapshot - Switch to devtoolset-8 for el7 From 46a6493d0f0e1dcacd75e3d188c0255f4698137b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 6 Apr 2020 17:33:03 +0200 Subject: [PATCH 492/671] Fix for el7 --- Lower-libgcrypt-to-1.5.3.patch | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Lower-libgcrypt-to-1.5.3.patch diff --git a/Lower-libgcrypt-to-1.5.3.patch b/Lower-libgcrypt-to-1.5.3.patch new file mode 100644 index 0000000..3b86e3b --- /dev/null +++ b/Lower-libgcrypt-to-1.5.3.patch @@ -0,0 +1,44 @@ +From fefc0d51b9d3ec6046a73cf317b31870048d1fc2 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Mon, 6 Apr 2020 09:08:08 +0200 +Subject: [PATCH] Lower libgcrypt to 1.5.3 + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1dfe2fce9b..cdac533e10 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4038,14 +4038,14 @@ AC_ARG_ENABLE(libgcrypt, + AC_ARG_VAR([GCRYPT_CFLAGS], [C compiler flags for gcrypt]) + AC_ARG_VAR([GCRYPT_LIBS], [linker flags flags for gcrypt]) + +-# require libgcrypt >= 1.6.0 ++# require libgcrypt >= 1.5.3 + AS_IF([test "${enable_libgcrypt}" != "no"], [ +- AC_CACHE_CHECK([for gcrypt 1.6.0 or later], [ac_cv_lib_gcrypt], [ ++ AC_CACHE_CHECK([for gcrypt 1.5.3 or later], [ac_cv_lib_gcrypt], [ + VLC_SAVE_FLAGS + CFLAGS="${CFLAGS} ${GCRYPT_CFLAGS}" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + [#include <gcrypt.h> +-#if GCRYPT_VERSION_NUMBER < 0x010600 ++#if GCRYPT_VERSION_NUMBER < 0x010503 + #error + #endif]])], [ + ac_cv_lib_gcrypt=yes +@@ -4059,7 +4059,7 @@ AS_IF([test "${enable_libgcrypt}" != "no"], [ + AC_DEFINE([HAVE_GCRYPT], 1, [Defined if having gcrypt]) + ], [ + AS_IF([test "${enable_libgcrypt}" = "yes"], [ +- AC_MSG_ERROR([libgcrypt version 1.6.0 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) ++ AC_MSG_ERROR([libgcrypt version 1.5.3 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) + ]) + ]) + ]) +-- +2.25.1 + From 844ed5d34136c63e23f4d902455db305079f80cb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 6 Apr 2020 17:33:07 +0200 Subject: [PATCH 493/671] More fixes for el7 --- vlc.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlc.spec b/vlc.spec index c7cebaf..8432a0b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -71,6 +71,7 @@ Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 # https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 Patch4: buildfix_for_old_dav1d.patch +Patch5: Lower-libgcrypt-to-1.5.3.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -317,10 +318,13 @@ VLC media player extras modules. %patch4 -p1 %endif %if 0%{?el7} +%patch5 -p1 # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c +# Lower taglib +sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac . /opt/rh/devtoolset-8/enable %endif @@ -434,6 +438,9 @@ rm -rf %{buildroot}%{_datadir}/kde4 %find_lang %{name} %check +%if 0%{?el7} +. /opt/rh/devtoolset-8/enable +%endif make check From 1ea37c8af1dd9a8ae3da651d0ac91b13e4c9a97b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 10 Apr 2020 11:23:04 +0200 Subject: [PATCH 494/671] Update to 3.0.9.2 --- Fix_aom_abi_break.patch | 11 ----------- sources | 2 +- vlc.spec | 28 +++++++++++++++++++--------- 3 files changed, 20 insertions(+), 21 deletions(-) delete mode 100644 Fix_aom_abi_break.patch diff --git a/Fix_aom_abi_break.patch b/Fix_aom_abi_break.patch deleted file mode 100644 index 16b15a1..0000000 --- a/Fix_aom_abi_break.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/modules/codec/aom.c -+++ b/modules/codec/aom.c -@@ -98,7 +98,6 @@ - { VLC_CODEC_I444, AOM_IMG_FMT_I444, 8, 0 }, - - { VLC_CODEC_YV12, AOM_IMG_FMT_YV12, 8, 0 }, --{ VLC_CODEC_YUVA, AOM_IMG_FMT_444A, 8, 0 }, - - { VLC_CODEC_GBR_PLANAR, AOM_IMG_FMT_I444, 8, 1 }, - { VLC_CODEC_GBR_PLANAR_10L, AOM_IMG_FMT_I44416, 10, 1 }, - diff --git a/sources b/sources index a635077..5220d8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-8b5cff4.tar.gz) = 868bf13a61407775a272448bad84c9d4fea761a94feaf61de428357ff4e69d18ad416b1911286c921b82c4574ae8029524c11b3a6c7d48c2d0b627a3b57d0dc8 +SHA512 (vlc-3.0.9.2.tar.xz) = c1009871449b3547ee8fec0c6e95fcf8f7b0328aa85c0c9670aa38ce11d083bae74584ec501b131232cd00fda707d6269ffa5f42c95aa04fe84b44045ca44409 diff --git a/vlc.spec b/vlc.spec index 8432a0b..0dbb7a7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global commit0 8b5cff44981b3af508678b7eb687944e8f2688ea -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +#global commit0 8b5cff44981b3af508678b7eb687944e8f2688ea +#global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 %global _with_bootstrap 1 @@ -48,8 +48,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.9 -Release: 36%{?dist} +Version: 3.0.9.2 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -66,7 +66,6 @@ Source0: https://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version %endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch -Patch2: Fix_aom_abi_break.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch # Revert commit for f30 # https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 @@ -139,9 +138,7 @@ BuildRequires: libmtp-devel >= 1.0.0 %{?_with_projectm:BuildRequires: libprojectM-devel} BuildRequires: libproxy-devel BuildRequires: librsvg2-devel >= 2.9.0 -%if ! 0%{?el8} BuildRequires: libssh2-devel -%endif BuildRequires: libsysfs-devel BuildRequires: libshout-devel BuildRequires: libsmbclient-devel @@ -182,7 +179,7 @@ BuildRequires: pcre-devel BuildRequires: pkgconfig(libarchive) >= 3.1.0 BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 -BuildRequires: pkgconfig(microdns) +BuildRequires: pkgconfig(microdns) >= 0.1.2 BuildRequires: pkgconfig(protobuf-lite) >= 2.5 BuildRequires: pkgconfig(Qt5Core) >= 5.5 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 @@ -190,6 +187,9 @@ BuildRequires: pkgconfig(Qt5Svg) >= 5.5 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) >= 1.0.5 +%if 0%{?fedora} > 30 && 0%{?rhel} +BuildRequires: pkgconfig(srt) +%endif %{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 BuildRequires: pkgconfig(wayland-egl) @@ -292,6 +292,10 @@ Summary: VLC media player core Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} +Requires: libmicrodns%{?_isa} > 0.1.2-1 +%if 0%{?fc31} +Requires: srt-libs%{?_isa} > 1.4.1-1 +%endif %description core VLC media player core components @@ -311,8 +315,9 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } +%if 0%{?rhel} %patch1 -p1 -%patch2 -p1 +%endif %patch3 -p1 %if 0%{?fedora} == 30 %patch4 -p1 @@ -591,6 +596,11 @@ fi || : %changelog +* Wed Apr 08 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9.2-1 +- Update to 3.0.9.2 +- Enable srt +- Enable libssh2 even on el8 + * Sun Apr 05 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9-36 - Lower libopus requirement for el7 - rfbz#5585 - Add patch to build with libdvdread/libdvdnav for rhel From 8d03619dcf9fcb25356a425bd801250c65517f72 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 13 Apr 2020 09:48:33 +0200 Subject: [PATCH 495/671] Rebuilt for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0dbb7a7..836cabd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -49,7 +49,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Mon Apr 13 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9.2-2 +- Rebuilt for live555 + * Wed Apr 08 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9.2-1 - Update to 3.0.9.2 - Enable srt From b5ff756297e7e096f97c68bcca1694703e3d3ccb Mon Sep 17 00:00:00 2001 From: leigh123linux <leigh123linux@googlemail.com> Date: Fri, 24 Apr 2020 10:02:02 +0100 Subject: [PATCH 496/671] Fix srt issue (rfbz#5614) --- vlc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 836cabd..ef00bc0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -49,7 +49,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.9.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -187,7 +187,7 @@ BuildRequires: pkgconfig(Qt5Svg) >= 5.5 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) >= 1.0.5 -%if 0%{?fedora} > 30 && 0%{?rhel} +%if 0%{?fedora} > 30 || 0%{?rhel} BuildRequires: pkgconfig(srt) %endif %{?_with_wayland: @@ -294,7 +294,7 @@ Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?lua_version:Requires: lua(abi) = %{lua_version}} Requires: libmicrodns%{?_isa} > 0.1.2-1 %if 0%{?fc31} -Requires: srt-libs%{?_isa} > 1.4.1-1 +Requires: srt-libs%{?_isa} > 1.4.1-3 %endif %description core @@ -596,6 +596,9 @@ fi || : %changelog +* Fri Apr 24 2020 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9.2-3 +- Fix srt issue (rfbz#5614) + * Mon Apr 13 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.9.2-2 - Rebuilt for live555 From 27c9d870f3a805e1896acf76760dd5e1a3866664 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 28 Apr 2020 12:06:33 +0200 Subject: [PATCH 497/671] Update to 3.0.10 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 5220d8f..ebdd8b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.9.2.tar.xz) = c1009871449b3547ee8fec0c6e95fcf8f7b0328aa85c0c9670aa38ce11d083bae74584ec501b131232cd00fda707d6269ffa5f42c95aa04fe84b44045ca44409 +SHA512 (vlc-3.0.10.tar.xz) = dcfa39e3e61bf522ea3a0e1686251356ec262dd8826fc64ccae5ac34a62f72ddc9fe9f2e2b45588013d5907e39649cf39d0c9156980d1eb679eac9b9cb434341 diff --git a/vlc.spec b/vlc.spec index ef00bc0..e2cccc7 100644 --- a/vlc.spec +++ b/vlc.spec @@ -48,8 +48,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.9.2 -Release: 3%{?dist} +Version: 3.0.10 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Tue Apr 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.10-1 +- Update to 3.0.10 + * Fri Apr 24 2020 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9.2-3 - Fix srt issue (rfbz#5614) From 9dde866843e1d9f5a02cc6b1a4516150d83ef106 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 28 Apr 2020 12:19:11 +0200 Subject: [PATCH 498/671] Back to devtoolset-7 --- vlc.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index e2cccc7..1a1e289 100644 --- a/vlc.spec +++ b/vlc.spec @@ -230,7 +230,7 @@ BuildRequires: raspberrypi-vc-static } %if 0%{?el7} -BuildRequires: devtoolset-8-toolchain, devtoolset-8-libatomic-devel +BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -330,7 +330,7 @@ sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_c sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c # Lower taglib sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac -. /opt/rh/devtoolset-8/enable +. /opt/rh/devtoolset-7/enable %endif %{?_with_bootstrap: @@ -343,7 +343,7 @@ touch src/revision.txt %build %if 0%{?el7} -. /opt/rh/devtoolset-8/enable +. /opt/rh/devtoolset-7/enable %endif %configure \ @@ -598,6 +598,7 @@ fi || : %changelog * Tue Apr 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.10-1 - Update to 3.0.10 +- Back to devtoolset-7 for EL7 * Fri Apr 24 2020 Leigh Scott <leigh123linux@googlemail.com> - 1:3.0.9.2-3 - Fix srt issue (rfbz#5614) From b425a2be62b60aa08f952671a6af43eafc2487e6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 28 Apr 2020 15:34:54 +0200 Subject: [PATCH 499/671] Fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1a1e289..c807872 100644 --- a/vlc.spec +++ b/vlc.spec @@ -444,7 +444,7 @@ rm -rf %{buildroot}%{_datadir}/kde4 %check %if 0%{?el7} -. /opt/rh/devtoolset-8/enable +. /opt/rh/devtoolset-7/enable %endif make check From bf8ea03fa8bdcaac17dbfc3272b37ab42936fef9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 24 May 2020 10:48:36 +0100 Subject: [PATCH 500/671] Rebuild for dav1d SONAME bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c807872..a0ec635 100644 --- a/vlc.spec +++ b/vlc.spec @@ -49,7 +49,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.10 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Sun May 24 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.10-2 +- Rebuild for dav1d SONAME bump + * Tue Apr 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.10-1 - Update to 3.0.10 - Back to devtoolset-7 for EL7 From 72fe3dce7b9f4df1bb384b67b151c1106ff3d918 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 31 May 2020 18:03:23 +0100 Subject: [PATCH 501/671] Rebuild for new x265 version --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a0ec635..4e7e410 100644 --- a/vlc.spec +++ b/vlc.spec @@ -49,7 +49,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Sun May 31 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.10-3 +- Rebuild for new x265 version + * Sun May 24 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.10-2 - Rebuild for dav1d SONAME bump From abe9ec591b4bb4d8376a179aac8ffb84937a10c0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Jun 2020 09:11:20 +0200 Subject: [PATCH 502/671] Remove old patch --- buildfix_for_old_dav1d.patch | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 buildfix_for_old_dav1d.patch diff --git a/buildfix_for_old_dav1d.patch b/buildfix_for_old_dav1d.patch deleted file mode 100644 index ab484ff..0000000 --- a/buildfix_for_old_dav1d.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/modules/codec/dav1d.c -+++ b/modules/codec/dav1d.c -@@ -223,7 +223,7 @@ - if( p_data ) - { - res = dav1d_send_data(p_sys->c, p_data); -- if (res < 0 && res != DAV1D_ERR(EAGAIN)) -+ if (res < 0 && res != -EAGAIN) - { - msg_Err(dec, "Decoder feed error %d!", res); - i_ret = VLC_EGENERIC; -@@ -248,15 +248,14 @@ - decoder_QueueVideo(dec, pic); - dav1d_picture_unref(&img); - } -- else if (res != DAV1D_ERR(EAGAIN)) -+ else if (res != -EAGAIN) - { - msg_Warn(dec, "Decoder error %d!", res); - break; - } - - /* on drain, we must ignore the 1st EAGAIN */ -- if(!b_draining && (res == DAV1D_ERR(EAGAIN) || res == 0) -- && (p_data == NULL||b_eos)) -+ if(!b_draining && (res == -EAGAIN || res == 0) && (p_data == NULL||b_eos)) - { - b_draining = true; - res = 0; - From 9c01685e076186fb428b3e37b4bdfd3bc3e3bd11 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Jun 2020 09:19:29 +0200 Subject: [PATCH 503/671] Simplify version/rc --- vlc.spec | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/vlc.spec b/vlc.spec index 4e7e410..5e22256 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,20 +56,12 @@ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz %global vlc_setup vlc-3.0-%{?commit0} %else -%if 0%{?vlc_rc:1} -Source0: https://download.videolan.org/pub/videolan/testing/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz +Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} -%else -Source0: https://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}.tar.xz -%global vlc_setup vlc-%{version} -%endif %endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch -# Revert commit for f30 -# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commitdiff;h=bb98c9a1bda8972a83ec102e286da00228c1f2d3 -Patch4: buildfix_for_old_dav1d.patch Patch5: Lower-libgcrypt-to-1.5.3.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib From 42d24165843b0b99b5f4f0d4ee057d141df26e9d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Jun 2020 09:20:23 +0200 Subject: [PATCH 504/671] Add macro for dts_ver --- vlc.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 5e22256..2274eb0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -42,6 +42,8 @@ %if 0%{?el7} %global _with_opencv 1 +# Developper toolset version +%global dts_ver 7 %endif @@ -222,7 +224,7 @@ BuildRequires: raspberrypi-vc-static } %if 0%{?el7} -BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel +BuildRequires: devtoolset-%{dts_ver}-toolchain, devtoolset-%{dts_ver}-libatomic-devel %endif %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -335,7 +337,7 @@ touch src/revision.txt %build %if 0%{?el7} -. /opt/rh/devtoolset-7/enable +. /opt/rh/devtoolset-%{dts_ver}/enable %endif %configure \ @@ -436,7 +438,7 @@ rm -rf %{buildroot}%{_datadir}/kde4 %check %if 0%{?el7} -. /opt/rh/devtoolset-7/enable +. /opt/rh/devtoolset-%{dts_ver}/enable %endif make check From 62bc873b3434d5a0af6001d42c63a38a134c60c7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Jun 2020 22:59:10 +0200 Subject: [PATCH 505/671] Update to 3.0.11 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ebdd8b6..bc903cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.10.tar.xz) = dcfa39e3e61bf522ea3a0e1686251356ec262dd8826fc64ccae5ac34a62f72ddc9fe9f2e2b45588013d5907e39649cf39d0c9156980d1eb679eac9b9cb434341 +SHA512 (vlc-3.0.11.tar.xz) = 8219cc46e434c7b2f12321d4e1b21eae123a546eeb22f768c463537a4a4986ab395053f8a794628cfd17236f81665f12b2b3f6867af73b102b81628204b6c444 diff --git a/vlc.spec b/vlc.spec index 2274eb0..698a6e9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.10 -Release: 3%{?dist} +Version: 3.0.11 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -590,6 +590,9 @@ fi || : %changelog +* Mon Jun 15 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-1 +- Update to 3.0.11 + * Sun May 31 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.10-3 - Rebuild for new x265 version From 813743980e549a9a930bde5b2d1f4a7097656881 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 16 Jun 2020 08:12:58 +0200 Subject: [PATCH 506/671] Clean-up old f30 patch --- vlc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 698a6e9..f70b0d0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -313,9 +313,6 @@ VLC media player extras modules. %patch1 -p1 %endif %patch3 -p1 -%if 0%{?fedora} == 30 -%patch4 -p1 -%endif %if 0%{?el7} %patch5 -p1 # Lower opus requirement - rfbz#5585 From 9e8f30f6385763fe071f967fcf3308de2c4ebbc5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 16 Jun 2020 08:14:46 +0200 Subject: [PATCH 507/671] Clean-up srt --- vlc.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index f70b0d0..fcf3d63 100644 --- a/vlc.spec +++ b/vlc.spec @@ -181,9 +181,7 @@ BuildRequires: pkgconfig(Qt5Svg) >= 5.5 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speexdsp) >= 1.0.5 -%if 0%{?fedora} > 30 || 0%{?rhel} BuildRequires: pkgconfig(srt) -%endif %{?_with_wayland: BuildRequires: pkgconfig(wayland-client) >= 1.5.91 BuildRequires: pkgconfig(wayland-egl) From 7cb35073284074b06947e79adb63513027d21931 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 16 Jun 2020 08:19:14 +0200 Subject: [PATCH 508/671] Switch to devtoolset-8 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index fcf3d63..698f5cc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -43,7 +43,7 @@ %if 0%{?el7} %global _with_opencv 1 # Developper toolset version -%global dts_ver 7 +%global dts_ver 8 %endif From 4b8399bb6bb5113d1485f2e810ff693317a088a5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 16 Jun 2020 08:20:29 +0200 Subject: [PATCH 509/671] Don't disable shortcommit0 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 698f5cc..715a03d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ #global commit0 8b5cff44981b3af508678b7eb687944e8f2688ea -#global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 %global _with_bootstrap 1 From ffe738cac3b95c03ff3ab8b51256217e05462e15 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 16 Jun 2020 08:32:58 +0200 Subject: [PATCH 510/671] Fix dts_ver occurence --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 715a03d..1c77364 100644 --- a/vlc.spec +++ b/vlc.spec @@ -319,7 +319,7 @@ sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_c sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c # Lower taglib sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac -. /opt/rh/devtoolset-7/enable +. /opt/rh/devtoolset-%{dts_ver}/enable %endif %{?_with_bootstrap: From 3e89a0d589ee658759c588f21940a2204aab4940 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 24 Jun 2020 17:45:29 +0200 Subject: [PATCH 511/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1c77364..b02f1b8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -585,6 +585,9 @@ fi || : %changelog +* Wed Jun 24 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-2 +- rebuilt + * Mon Jun 15 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-1 - Update to 3.0.11 From 6012dbac7caa2afe2d973a2737b5d8a0f4ea0d78 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 24 Jun 2020 19:18:40 +0100 Subject: [PATCH 512/671] Add BuildRequires qt5-qtbase-private-devel for f33 --- vlc.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlc.spec b/vlc.spec index b02f1b8..6cae8a1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -175,6 +175,9 @@ BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 BuildRequires: pkgconfig(microdns) >= 0.1.2 BuildRequires: pkgconfig(protobuf-lite) >= 2.5 +%if 0%{?fedora} > 32 +BuildRequires: qt5-qtbase-private-devel +%endif BuildRequires: pkgconfig(Qt5Core) >= 5.5 BuildRequires: pkgconfig(Qt5Gui) >= 5.5 BuildRequires: pkgconfig(Qt5Svg) >= 5.5 From fb55b06a41c6661c3d3ce7dba631c8086b7b8e7d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 30 Jun 2020 18:36:01 +0200 Subject: [PATCH 513/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6cae8a1..6b6ba17 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -588,6 +588,9 @@ fi || : %changelog +* Tue Jun 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-3 +- Rebuilt + * Wed Jun 24 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-2 - rebuilt From 8110bab34b874db75504f23bfffe76c7cb50d64b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 30 Jun 2020 20:46:38 +0100 Subject: [PATCH 514/671] Add conditional --- replace_deprecated_luaL_checkint.patch | 261 +++++++++++++++++++++++++ vlc.spec | 5 + 2 files changed, 266 insertions(+) create mode 100644 replace_deprecated_luaL_checkint.patch diff --git a/replace_deprecated_luaL_checkint.patch b/replace_deprecated_luaL_checkint.patch new file mode 100644 index 0000000..3759d96 --- /dev/null +++ b/replace_deprecated_luaL_checkint.patch @@ -0,0 +1,261 @@ +From f90c88f72b87111992cb793d5d203a5d4aab97d4 Mon Sep 17 00:00:00 2001 +From: Leigh Scott <leigh123linux@gmail.com> +Date: Tue, 30 Jun 2020 20:05:31 +0100 +Subject: [PATCH] lua: replace deprecated luaL_checkint with luaL_checkinteger + +--- + modules/lua/demux.c | 4 ++-- + modules/lua/libs/dialog.c | 14 +++++++------- + modules/lua/libs/io.c | 2 +- + modules/lua/libs/net.c | 16 ++++++++-------- + modules/lua/libs/osd.c | 4 ++-- + modules/lua/libs/playlist.c | 10 +++++----- + modules/lua/libs/stream.c | 2 +- + modules/lua/libs/volume.c | 2 +- + 8 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/modules/lua/demux.c b/modules/lua/demux.c +index a4ea3af1aa..aec774af46 100644 +--- a/modules/lua/demux.c ++++ b/modules/lua/demux.c +@@ -52,7 +52,7 @@ struct vlclua_playlist + static int vlclua_demux_peek( lua_State *L ) + { + stream_t *s = (stream_t *)vlclua_get_this(L); +- int n = luaL_checkint( L, 1 ); ++ int n = luaL_checkinteger( L, 1 ); + const uint8_t *p_peek; + + ssize_t val = vlc_stream_Peek(s->p_source, &p_peek, n); +@@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State *L ) + static int vlclua_demux_read( lua_State *L ) + { + stream_t *s = (stream_t *)vlclua_get_this(L); +- int n = luaL_checkint( L, 1 ); ++ int n = luaL_checkinteger( L, 1 ); + char *buf = malloc(n); + + if (buf != NULL) +diff --git a/modules/lua/libs/dialog.c b/modules/lua/libs/dialog.c +index 488b032226..8c1ab2c339 100644 +--- a/modules/lua/libs/dialog.c ++++ b/modules/lua/libs/dialog.c +@@ -382,7 +382,7 @@ static int lua_GetDialogUpdate( lua_State *L ) + /* Read entry in the Lua registry */ + lua_pushlightuserdata( L, (void*) &key_update ); + lua_gettable( L, LUA_REGISTRYINDEX ); +- return luaL_checkint( L, -1 ); ++ return luaL_checkinteger( L, -1 ); + } + + /** Manually update a dialog +@@ -573,22 +573,22 @@ static int vlclua_create_widget_inner( lua_State *L, int i_args, + + /* Set common arguments: col, row, hspan, vspan, width, height */ + if( lua_isnumber( L, arg ) ) +- p_widget->i_column = luaL_checkint( L, arg ); ++ p_widget->i_column = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_row = luaL_checkint( L, arg ); ++ p_widget->i_row = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_horiz_span = luaL_checkint( L, arg ); ++ p_widget->i_horiz_span = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_vert_span = luaL_checkint( L, arg ); ++ p_widget->i_vert_span = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_width = luaL_checkint( L, arg ); ++ p_widget->i_width = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_height = luaL_checkint( L, arg ); ++ p_widget->i_height = luaL_checkinteger( L, arg ); + else goto end_of_args; + + end_of_args: +diff --git a/modules/lua/libs/io.c b/modules/lua/libs/io.c +index c01cf7137d..12267e1822 100644 +--- a/modules/lua/libs/io.c ++++ b/modules/lua/libs/io.c +@@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_State *L ) + const char* psz_mode = luaL_optstring( L, 2, NULL ); + if ( psz_mode != NULL ) + { +- long i_offset = luaL_optlong( L, 3, 0 ); ++ long i_offset = luaL_optinteger( L, 3, 0 ); + int i_mode; + if ( !strcmp( psz_mode, "set" ) ) + i_mode = SEEK_SET; +diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c +index 5e10ee4860..8feba3d7b5 100644 +--- a/modules/lua/libs/net.c ++++ b/modules/lua/libs/net.c +@@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_State *L ) + { + vlc_object_t *p_this = vlclua_get_this( L ); + const char *psz_host = luaL_checkstring( L, 1 ); +- int i_port = luaL_checkint( L, 2 ); ++ int i_port = luaL_checkinteger( L, 2 ); + int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); + if( pi_fd == NULL ) + return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); +@@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_State *L ) + { + vlc_object_t *p_this = vlclua_get_this( L ); + const char *psz_host = luaL_checkstring( L, 1 ); +- int i_port = luaL_checkint( L, 2 ); ++ int i_port = luaL_checkinteger( L, 2 ); + int i_fd = net_ConnectTCP( p_this, psz_host, i_port ); + lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); + return 1; +@@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_State *L ) + + static int vlclua_net_close( lua_State *L ) + { +- int i_fd = luaL_checkint( L, 1 ); ++ int i_fd = luaL_checkinteger( L, 1 ); + vlclua_fd_unmap_safe( L, i_fd ); + return 0; + } + + static int vlclua_net_send( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len; + const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); + +@@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L ) + + static int vlclua_net_recv( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); + char psz_buffer[i_len]; + +@@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L ) + lua_pushnil( L ); + for( int i = 0; lua_next( L, 1 ); i++ ) + { +- luafds[i] = luaL_checkint( L, -2 ); ++ luafds[i] = luaL_checkinteger( L, -2 ); + p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); + p_fds[i].events = luaL_checkinteger( L, -1 ); + p_fds[i].events &= POLLIN | POLLOUT | POLLPRI; +@@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L ) + #ifndef _WIN32 + static int vlclua_fd_write( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len; + const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); + +@@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L ) + + static int vlclua_fd_read( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); + char psz_buffer[i_len]; + +diff --git a/modules/lua/libs/osd.c b/modules/lua/libs/osd.c +index 917e52eab6..6c75d92448 100644 +--- a/modules/lua/libs/osd.c ++++ b/modules/lua/libs/osd.c +@@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_string( const char *psz_name ) + + static int vlclua_osd_slider( lua_State *L ) + { +- int i_position = luaL_checkint( L, 1 ); ++ int i_position = luaL_checkinteger( L, 1 ); + const char *psz_type = luaL_checkstring( L, 2 ); + int i_type = vlc_osd_slider_type_from_string( psz_type ); + int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD ); +@@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( lua_State *L ) + + static int vlclua_spu_channel_clear( lua_State *L ) + { +- int i_chan = luaL_checkint( L, 1 ); ++ int i_chan = luaL_checkinteger( L, 1 ); + input_thread_t *p_input = vlclua_get_input_internal( L ); + if( !p_input ) + return luaL_error( L, "Unable to find input." ); +diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c +index 5cf879ea7a..c6d42081c1 100644 +--- a/modules/lua/libs/playlist.c ++++ b/modules/lua/libs/playlist.c +@@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_State * L ) + + static int vlclua_playlist_skip( lua_State * L ) + { +- int i_skip = luaL_checkint( L, 1 ); ++ int i_skip = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + playlist_Skip( p_playlist, i_skip ); + return 0; +@@ -127,7 +127,7 @@ static int vlclua_playlist_random( lua_State * L ) + + static int vlclua_playlist_gotoitem( lua_State * L ) + { +- int i_id = luaL_checkint( L, 1 ); ++ int i_id = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; + playlist_ViewPlay( p_playlist, NULL, +@@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua_State * L ) + + static int vlclua_playlist_delete( lua_State * L ) + { +- int i_id = luaL_checkint( L, 1 ); ++ int i_id = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + + PL_LOCK; +@@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_State * L ) + + static int vlclua_playlist_move( lua_State * L ) + { +- int i_item = luaL_checkint( L, 1 ); +- int i_target = luaL_checkint( L, 2 ); ++ int i_item = luaL_checkinteger( L, 1 ); ++ int i_target = luaL_checkinteger( L, 2 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; + playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); +diff --git a/modules/lua/libs/stream.c b/modules/lua/libs/stream.c +index c682759838..c9713a223c 100644 +--- a/modules/lua/libs/stream.c ++++ b/modules/lua/libs/stream.c +@@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State *L ) + { + int i_read; + stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); +- int n = luaL_checkint( L, 2 ); ++ int n = luaL_checkinteger( L, 2 ); + uint8_t *p_read = malloc( n ); + if( !p_read ) return vlclua_error( L ); + +diff --git a/modules/lua/libs/volume.c b/modules/lua/libs/volume.c +index 81a6156c2a..a7dbe86465 100644 +--- a/modules/lua/libs/volume.c ++++ b/modules/lua/libs/volume.c +@@ -48,7 +48,7 @@ + static int vlclua_volume_set( lua_State *L ) + { + playlist_t *p_this = vlclua_get_playlist_internal( L ); +- int i_volume = luaL_checkint( L, 1 ); ++ int i_volume = luaL_checkinteger( L, 1 ); + if( i_volume < 0 ) + i_volume = 0; + int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); +-- +2.26.2 + diff --git a/vlc.spec b/vlc.spec index 6b6ba17..2887a0a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -65,6 +65,8 @@ Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16. Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch +# Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 +Patch6: replace_deprecated_luaL_checkint.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -324,6 +326,9 @@ sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac . /opt/rh/devtoolset-%{dts_ver}/enable %endif +%if 0%{?fedora} +%patch6 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From 50a2ce2c29e4773031080fc7e7df39adfd71e0db Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 1 Jul 2020 16:04:46 +0100 Subject: [PATCH 515/671] Rebuilt for new dav1d and libplacebo --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2887a0a..645c41c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -593,6 +593,9 @@ fi || : %changelog +* Wed Jul 01 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-4 +- Rebuilt for new dav1d and libplacebo + * Tue Jun 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11-3 - Rebuilt From 75ffdd724590ff592955be8c9d04f1e3610e8d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Tue, 7 Jul 2020 05:52:05 +0100 Subject: [PATCH 516/671] Mass rebuild for x264 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 645c41c..215fd54 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -593,6 +593,9 @@ fi || : %changelog +* Tue Jul 07 2020 Sérgio Basto <sergio@serjux.com> - 1:3.0.11-5 +- Mass rebuild for x264 + * Wed Jul 01 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-4 - Rebuilt for new dav1d and libplacebo From 37ba87ac82f1c2d62efb53b6dc8071e1fe261d8b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 8 Jul 2020 09:50:28 +0100 Subject: [PATCH 517/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 215fd54..a81618e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -593,6 +593,9 @@ fi || : %changelog +* Wed Jul 08 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-6 +- Rebuilt + * Tue Jul 07 2020 Sérgio Basto <sergio@serjux.com> - 1:3.0.11-5 - Mass rebuild for x264 From a3f7b2e098a7eee584454a432f244cde79d6c8e9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 18 Jul 2020 02:49:18 +0100 Subject: [PATCH 518/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a81618e..ad6f49a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -593,6 +593,9 @@ fi || : %changelog +* Sat Jul 18 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-7 +- Rebuilt + * Wed Jul 08 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-6 - Rebuilt From 114522d3a729de0f9ec1ffa2049d9c0b80e695f8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 15:39:31 +0200 Subject: [PATCH 519/671] Update mmal_17.patch --- mmal_16.patch => mmal_17.patch | 920 ++++++++++++++++++++++++--------- 1 file changed, 678 insertions(+), 242 deletions(-) rename mmal_16.patch => mmal_17.patch (95%) diff --git a/mmal_16.patch b/mmal_17.patch similarity index 95% rename from mmal_16.patch rename to mmal_17.patch index b56b533..9ea7a60 100644 --- a/mmal_16.patch +++ b/mmal_17.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -3420,6 +3420,9 @@ +@@ -3444,6 +3444,9 @@ AC_ARG_ENABLE(mmal, AS_HELP_STRING([--enable-mmal], [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)])) @@ -10,7 +10,7 @@ if test "${enable_mmal}" != "no"; then VLC_SAVE_FLAGS LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif" -@@ -3430,7 +3433,7 @@ +@@ -3454,7 +3457,7 @@ VLC_ADD_PLUGIN([mmal]) VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) @@ -19,7 +19,7 @@ AS_IF([test "${enable_mmal}" = "yes"], [ AC_MSG_ERROR([Cannot find bcm library...]) ], [ AC_MSG_WARN([Cannot find bcm library...]) ]) -@@ -3442,6 +3445,7 @@ +@@ -3466,6 +3469,7 @@ VLC_RESTORE_FLAGS fi AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"]) @@ -43,7 +43,7 @@ #define VLC_CODEC_D3D9_OPAQUE VLC_FOURCC('D','X','A','9') /* 4:2:0 8 bpc */ --- a/modules/hw/mmal/Makefile.am +++ b/modules/hw/mmal/Makefile.am -@@ -1,23 +1,46 @@ +@@ -1,23 +1,57 @@ include $(top_srcdir)/modules/common.am mmaldir = $(pluginsdir)/mmal @@ -53,41 +53,53 @@ +AM_LDFLAGS += -pthread -rpath '$(mmaldir)' $(LDFLAGS_mmal) -libmmal_vout_plugin_la_SOURCES = vout.c mmal_picture.c mmal_picture.h -+libmmal_vout_plugin_la_SOURCES = vout.c subpic.c mmal_picture.c subpic.h mmal_cma.c mmal_picture.h mmal_piccpy_neon.S ++libmmal_vout_plugin_la_SOURCES = vout.c mmal_cma.c mmal_picture.c subpic.c\ ++ mmal_cma.h mmal_picture.h subpic.h transform_ops.h\ ++ mmal_piccpy_neon.S libmmal_vout_plugin_la_CFLAGS = $(AM_CFLAGS) - libmmal_vout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -lm +-libmmal_vout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -lm ++libmmal_vout_plugin_la_LDFLAGS = $(AM_LDFLAGS) -lm -lX11 -lXrandr libmmal_vout_plugin_la_LIBADD = $(LIBS_mmal) mmal_LTLIBRARIES = libmmal_vout_plugin.la -libmmal_codec_plugin_la_SOURCES = codec.c -+libmmal_codec_plugin_la_SOURCES = codec.c subpic.c mmal_picture.c blend_rgba_neon.S subpic.h mmal_picture.h mmal_piccpy_neon.S\ -+ mmal_cma.c mmal_cma.h ++libmmal_codec_plugin_la_SOURCES = codec.c mmal_cma.c mmal_picture.c subpic.c\ ++ mmal_cma.h mmal_picture.h subpic.h transform_ops.h\ ++ blend_rgba_neon.S mmal_piccpy_neon.S libmmal_codec_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_codec_plugin_la_LDFLAGS = $(AM_LDFLAGS) libmmal_codec_plugin_la_LIBADD = $(LIBS_mmal) mmal_LTLIBRARIES += libmmal_codec_plugin.la -libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c -+libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c mmal_cma.c mmal_picture.h mmal_piccpy_neon.S ++libmmal_deinterlace_plugin_la_SOURCES = deinterlace.c mmal_picture.c mmal_cma.c\ ++ mmal_cma.h mmal_picture.h transform_ops.h\ ++ mmal_piccpy_neon.S libmmal_deinterlace_plugin_la_CFLAGS = $(AM_CFLAGS) libmmal_deinterlace_plugin_la_LDFLAGS = $(AM_LDFLAGS) libmmal_deinterlace_plugin_la_LIBADD = $(LIBS_mmal) mmal_LTLIBRARIES += libmmal_deinterlace_plugin.la + -+libmmal_xsplitter_plugin_la_SOURCES = xsplitter.c mmal_picture.c mmal_cma.c mmal_picture.h mmal_piccpy_neon.S ++libmmal_xsplitter_plugin_la_SOURCES = xsplitter.c mmal_picture.c mmal_cma.c\ ++ mmal_cma.h mmal_picture.h transform_ops.h\ ++ mmal_piccpy_neon.S +libmmal_xsplitter_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_xsplitter_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_xsplitter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_xsplitter_plugin.la + -+libmmal_converter_plugin_la_SOURCES = converter_mmal.c mmal_cma.c mmal_picture.c mmal_cma.h mmal_picture.h mmal_piccpy_neon.S ++libmmal_converter_plugin_la_SOURCES = converter_mmal.c mmal_cma.c mmal_picture.c\ ++ mmal_cma.h mmal_picture.h transform_ops.h\ ++ mmal_piccpy_neon.S +libmmal_converter_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_converter_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_converter_plugin_la_LIBADD = $(LIBS_mmal) +mmal_LTLIBRARIES += libmmal_converter_plugin.la + +if HAVE_MMAL_AVCODEC -+libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_cma.c mmal_picture.c mmal_picture.h mmal_cma.h mmal_piccpy_neon.S ++libmmal_avcodec_plugin_la_SOURCES = mmal_avcodec.c mmal_cma.c mmal_picture.c\ ++ mmal_cma.h mmal_picture.h transform_ops.h\ ++ mmal_piccpy_neon.S +libmmal_avcodec_plugin_la_CFLAGS = $(AM_CFLAGS) +libmmal_avcodec_plugin_la_LDFLAGS = $(AM_LDFLAGS) +libmmal_avcodec_plugin_la_LIBADD = $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(LIBS_mmal) @@ -500,7 +512,7 @@ + --- a/modules/hw/mmal/codec.c +++ b/modules/hw/mmal/codec.c -@@ -26,267 +26,396 @@ +@@ -26,267 +26,443 @@ #include "config.h" #endif @@ -844,29 +856,37 @@ - ret = VLC_EGENERIC; - goto out; - } -+// Buffer either attached to pic or released -+static picture_t * alloc_opaque_pic(decoder_t * const dec, MMAL_BUFFER_HEADER_T * const buf) ++static MMAL_RATIONAL_T ++rationalize_sar(unsigned int num, unsigned int den) +{ -+ decoder_sys_t *const dec_sys = dec->p_sys; ++ static const unsigned int primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 0}; ++ const unsigned int * p = primes; - msg_Dbg(dec, "Activate zero-copy for output port"); - MMAL_PARAMETER_BOOLEAN_T zero_copy = { - { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, - 1 - }; -+ vlc_mutex_lock(&dec_sys->pic_lock); -+ picture_t * const pic = decoder_NewPicture(dec); -+ vlc_mutex_unlock(&dec_sys->pic_lock); ++ // If either num or den is 0 then return a well formed "unknown" ++ if (num == 0 || den == 0) { ++ return (MMAL_RATIONAL_T){.num = 0, .den = 0}; ++ } - status = mmal_port_parameter_set(sys->output, &zero_copy.hdr); - if (status != MMAL_SUCCESS) { - msg_Err(dec, "Failed to set zero copy on port %s (status=%"PRIx32" %s)", - sys->output->name, status, mmal_status_to_string(status)); - goto out; -- } -- } -+ if (pic == NULL) -+ goto fail1; ++ while (*p != 0 && num >= *p && den >= *p) { ++ if (num % *p != 0 || den % *p != 0) ++ ++p; ++ else { ++ num /= *p; ++ den /= *p; + } + } ++ return (MMAL_RATIONAL_T){.num = num, .den = den}; ++} - status = mmal_port_enable(sys->output, output_port_cb); - if (status != MMAL_SUCCESS) { @@ -874,10 +894,11 @@ - sys->output->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -+ if (buf->length == 0) { -+ msg_Err(dec, "%s: Empty buffer", __func__); -+ goto fail2; - } +- } ++// Buffer either attached to pic or released ++static picture_t * alloc_opaque_pic(decoder_t * const dec, MMAL_BUFFER_HEADER_T * const buf) ++{ ++ decoder_sys_t *const dec_sys = dec->p_sys; - status = mmal_component_enable(sys->component); - if (status != MMAL_SUCCESS) { @@ -885,12 +906,21 @@ - sys->component->name, status, mmal_status_to_string(status)); - ret = VLC_EGENERIC; - goto out; -- } -+ if ((pic->context = hw_mmal_gen_context(buf, dec_sys->ppr)) == NULL) ++ vlc_mutex_lock(&dec_sys->pic_lock); ++ picture_t * const pic = decoder_NewPicture(dec); ++ vlc_mutex_unlock(&dec_sys->pic_lock); ++ ++ if (pic == NULL) ++ goto fail1; ++ ++ if (buf->length == 0) { ++ msg_Err(dec, "%s: Empty buffer", __func__); + goto fail2; + } - sys->input_pool = mmal_pool_create(sys->input->buffer_num, 0); -+ buf_to_pic_copy_props(pic, buf); ++ if ((pic->context = hw_mmal_gen_context(buf, dec_sys->ppr)) == NULL) ++ goto fail2; - if (sys->opaque) { - dec->fmt_out.i_codec = VLC_CODEC_MMAL_OPAQUE; @@ -898,6 +928,8 @@ - } else { - dec->fmt_out.i_codec = VLC_CODEC_I420; - dec->fmt_out.video.i_chroma = VLC_CODEC_I420; ++ buf_to_pic_copy_props(pic, buf); ++ +#if TRACE_ALL + msg_Dbg(dec, "pic: prog=%d, tff=%d, date=%lld", pic->b_progressive, pic->b_top_field_first, (long long)pic->date); +#endif @@ -1002,11 +1034,40 @@ - if (sys->output && sys->output->is_enabled) - mmal_port_disable(sys->output); -+ if (sys->output_format != NULL) -+ mmal_format_free(sys->output_format); ++ // If no PAR in the stream - see if we've got one from the demux ++ if (format->es->video.par.den <= 0 || format->es->video.par.num <= 0) { ++ unsigned int n = dec->fmt_in.video.i_sar_num; ++ unsigned int d = dec->fmt_in.video.i_sar_den; ++ ++ if (n == 0 || d == 0) { ++ // Guesswork required ++ const unsigned int w = format->es->video.width; ++ const unsigned int h = format->es->video.height; ++ if ((w == 704 || w == 720) && (h == 480 || h == 576)) { ++ // Very likely SD 4:3 ++ n = w * 3; ++ d = h * 4; ++ } ++ else ++ { ++ // Otherwise guess SAR 1:1 ++ n = 1; ++ d = 1; ++ } ++ } - if (sys->component && sys->component->is_enabled) - mmal_component_disable(sys->component); ++ format->es->video.par = rationalize_sar(n, d); ++ } + +- if (sys->input_pool) +- mmal_pool_destroy(sys->input_pool); ++ if (sys->output_format != NULL) ++ mmal_format_free(sys->output_format); + +- if (sys->output_format) +- mmal_format_free(sys->output_format); + sys->output_format = format; + } + } @@ -1015,8 +1076,8 @@ + msg_Warn(dec, "Unexpected output cb event: %s", str_fourcc(buf0, buffer->cmd)); + } -- if (sys->input_pool) -- mmal_pool_destroy(sys->input_pool); +- if (sys->output_pool) +- mmal_pool_destroy(sys->output_pool); + // If we get here then we were flushing (cmd == 0 && len == 0) or + // that was an EVENT - in either case we want to release the buffer + // back to its pool rather than recycle it. @@ -1025,20 +1086,17 @@ + mmal_buffer_header_release(buffer); +} -- if (sys->output_format) -- mmal_format_free(sys->output_format); - -- if (sys->output_pool) -- mmal_pool_destroy(sys->output_pool); - - if (sys->component) - mmal_component_release(sys->component); -+static void fill_output_port(decoder_t *dec) -+{ -+ decoder_sys_t *sys = dec->p_sys; - vlc_sem_destroy(&sys->sem); - free(sys); + +- bcm_host_deinit(); ++static void fill_output_port(decoder_t *dec) ++{ ++ decoder_sys_t *sys = dec->p_sys; ++ + if (decoder_UpdateVideoFormat(dec) != 0) + { + // If we have a new format don't bother stuffing the buffer @@ -1046,8 +1104,7 @@ +#if TRACE_ALL + msg_Dbg(dec, "%s: Updated", __func__); +#endif - -- bcm_host_deinit(); ++ + return; + } + @@ -1071,7 +1128,7 @@ if (atomic_load(&sys->started)) { mmal_format_full_copy(sys->output->format, sys->output_format); status = mmal_port_format_commit(sys->output); -@@ -300,7 +429,9 @@ +@@ -300,7 +476,9 @@ } port_reset: @@ -1081,7 +1138,15 @@ status = mmal_port_disable(sys->output); if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to disable output port (status=%"PRIx32" %s)", -@@ -318,18 +449,10 @@ +@@ -310,6 +488,7 @@ + } + + mmal_format_full_copy(sys->output->format, sys->output_format); ++ + status = mmal_port_format_commit(sys->output); + if (status != MMAL_SUCCESS) { + msg_Err(dec, "Failed to commit output format (status=%"PRIx32" %s)", +@@ -318,18 +497,10 @@ goto out; } @@ -1102,7 +1167,7 @@ if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to enable output port (status=%"PRIx32" %s)", status, mmal_status_to_string(status)); -@@ -338,25 +461,14 @@ +@@ -338,25 +509,14 @@ } if (!atomic_load(&sys->started)) { @@ -1131,7 +1196,18 @@ } apply_fmt: -@@ -382,12 +494,19 @@ +@@ -366,8 +526,8 @@ + dec->fmt_out.video.i_y_offset = sys->output->format->es->video.crop.y; + dec->fmt_out.video.i_visible_width = sys->output->format->es->video.crop.width; + dec->fmt_out.video.i_visible_height = sys->output->format->es->video.crop.height; +- dec->fmt_out.video.i_sar_num = sys->output->format->es->video.par.num; +- dec->fmt_out.video.i_sar_den = sys->output->format->es->video.par.den; ++ dec->fmt_out.video.i_sar_num = sys->output_format->es->video.par.num; // SAR can be killed by commit ++ dec->fmt_out.video.i_sar_den = sys->output_format->es->video.par.den; + dec->fmt_out.video.i_frame_rate = sys->output->format->es->video.frame_rate.num; + dec->fmt_out.video.i_frame_rate_base = sys->output->format->es->video.frame_rate.den; + +@@ -382,12 +542,19 @@ sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive); sys->b_top_field_first = sys->b_progressive ? true : (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst); @@ -1151,7 +1227,7 @@ out: mmal_format_free(sys->output_format); sys->output_format = NULL; -@@ -395,144 +514,85 @@ +@@ -395,144 +562,85 @@ return ret; } @@ -1191,7 +1267,7 @@ - p_sys = picture->p_sys; - for (int i = 0; i < picture->i_planes; i++) - buffer_size += picture->p[i].i_lines * picture->p[i].i_pitch; -- + - if (sys->output_pool) { - mmal_buffer_header_reset(buffer); - buffer->alloc_size = sys->output->buffer_size; @@ -1215,7 +1291,7 @@ - } - buffer->user_data = picture; - buffer->cmd = 0; - +- - status = mmal_port_send_buffer(sys->output, buffer); + status = mmal_port_format_commit(sys->input); if (status != MMAL_SUCCESS) { @@ -1245,6 +1321,11 @@ +static MMAL_STATUS_T decoder_send_extradata(decoder_t * const dec, decoder_sys_t *const sys) { - decoder_sys_t *sys = dec->p_sys; +- +- unsigned max_buffers_in_transit = 0; +- int buffers_available = 0; +- int buffers_to_send = 0; +- int i; + if (dec->fmt_in.i_codec == VLC_CODEC_H264 && + dec->fmt_in.i_extra > 0) + { @@ -1259,11 +1340,6 @@ + buf->data = dec->fmt_in.p_extra; + buf->flags = MMAL_BUFFER_HEADER_FLAG_CONFIG; -- unsigned max_buffers_in_transit = 0; -- int buffers_available = 0; -- int buffers_to_send = 0; -- int i; -- - if (sys->output_pool) { - max_buffers_in_transit = __MAX(sys->output_pool->headers_num, - MIN_NUM_BUFFERS_IN_TRANSIT); @@ -1302,10 +1378,6 @@ - MMAL_BUFFER_HEADER_T *buffer; - MMAL_STATUS_T status; + decoder_sys_t *const sys = dec->p_sys; -+ -+#if TRACE_ALL -+ msg_Dbg(dec, "%s: <<<", __func__); -+#endif - msg_Dbg(dec, "Flushing decoder ports..."); - mmal_port_flush(sys->output); @@ -1314,6 +1386,10 @@ - while (atomic_load(&sys->output_in_transit) || - atomic_load(&sys->input_in_transit)) - vlc_sem_wait(&sys->sem); ++#if TRACE_ALL ++ msg_Dbg(dec, "%s: <<<", __func__); ++#endif ++ + if (!sys->b_flushed) { + mmal_port_disable(sys->input); + mmal_port_disable(sys->output); @@ -1349,7 +1425,7 @@ /* * Configure output port if necessary */ -@@ -541,18 +601,50 @@ +@@ -541,18 +649,50 @@ msg_Err(dec, "Failed to change output port format"); } @@ -1403,7 +1479,7 @@ if (atomic_load(&sys->started)) fill_output_port(dec); -@@ -563,18 +655,21 @@ +@@ -563,18 +703,21 @@ if (block->i_flags & BLOCK_FLAG_CORRUPTED) flags |= MMAL_BUFFER_HEADER_FLAG_CORRUPTED; @@ -1430,7 +1506,7 @@ len = block->i_buffer; if (len > buffer->alloc_size) -@@ -590,89 +685,1733 @@ +@@ -590,89 +733,1751 @@ } buffer->flags = flags; @@ -1516,14 +1592,21 @@ + { + char buf1[5], buf2[5], buf2a[5]; + char buf3[5], buf4[5]; -+ msg_Dbg(dec, "%s: <<< (%s/%s)[%s] %dx%d -> (%s/%s) %dx%d", __func__, ++ MMAL_RATIONAL_T r = rationalize_sar(dec->fmt_in.video.i_sar_num, dec->fmt_in.video.i_sar_den); ++ ++ msg_Dbg(dec, "%s: <<< (%s/%s)[%s] %dx%d %d/%d=%d/%d o:%#x -> (%s/%s) %dx%d %d/%d o:%#x", __func__, + str_fourcc(buf1, dec->fmt_in.i_codec), + str_fourcc(buf2, dec->fmt_in.video.i_chroma), + str_fourcc(buf2a, in_fcc), + dec->fmt_in.video.i_width, dec->fmt_in.video.i_height, ++ dec->fmt_in.video.i_sar_num, dec->fmt_in.video.i_sar_den, ++ r.num, r.den, ++ (int)dec->fmt_in.video.orientation, + str_fourcc(buf3, dec->fmt_out.i_codec), + str_fourcc(buf4, dec->fmt_out.video.i_chroma), -+ dec->fmt_out.video.i_width, dec->fmt_out.video.i_height); ++ dec->fmt_out.video.i_width, dec->fmt_out.video.i_height, ++ dec->fmt_out.video.i_sar_num, dec->fmt_out.video.i_sar_den, ++ (int)dec->fmt_out.video.orientation); + } +#endif + @@ -1606,12 +1689,18 @@ + } + + sys->b_flushed = true; -+ dec->fmt_out.i_codec = VLC_CODEC_MMAL_OPAQUE; -+ dec->fmt_out.video.i_chroma = VLC_CODEC_MMAL_OPAQUE; + + if ((status = decoder_send_extradata(dec, sys)) != MMAL_SUCCESS) + goto fail; + ++ // Given no better ideas at this point copy input format to output ++ // This also copies container stuff (such as orientation) that we do not ++ // decode from the ES but may be important to display ++ video_format_Copy(&dec->fmt_out.video, &dec->fmt_in.video); ++ dec->fmt_out.i_codec = VLC_CODEC_MMAL_OPAQUE; ++ dec->fmt_out.video.i_chroma = VLC_CODEC_MMAL_OPAQUE; ++ ++ + dec->pf_decode = decode; + dec->pf_flush = flush_decoder; + @@ -2221,6 +2310,7 @@ + sys->subs + sub_no, + &p_pic->format, + &sys->output->format->es->video.crop, ++ MMAL_DISPLAY_ROT0, + frame_seq)) == 0) + break; + else if (rv < 0) @@ -2511,8 +2601,7 @@ + + return 0; +} - -- sys->output_format = format; ++ +static inline MMAL_FOURCC_T filter_enc_out(const video_format_t * const fmt) +{ + const MMAL_FOURCC_T mmes = vlc_to_mmal_video_fourcc(fmt); @@ -2537,6 +2626,10 @@ + if (enc_in == 0 || enc_out == 0) + return VLC_EGENERIC; + ++ // Can't transform ++ if (p_filter->fmt_in.video.orientation != p_filter->fmt_out.video.orientation) ++ return VLC_EGENERIC; ++ + use_resizer = var_InheritBool(p_filter, MMAL_RESIZE_NAME); + use_isp = var_InheritBool(p_filter, MMAL_ISP_NAME); + @@ -2592,7 +2685,8 @@ + p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den, + gpu_mem); + } -+ + +- sys->output_format = format; + sys = calloc(1, sizeof(filter_sys_t)); + if (!sys) { + ret = VLC_ENOMEM; @@ -2731,13 +2825,13 @@ + use_resizer = true; + msg_Warn(p_filter, "Lack of memory to use HVS/ISP: trying resizer"); + goto retry; - } ++ } + +#if TRACE_ALL + msg_Dbg(p_filter, ">>> %s: FAIL: %d", __func__, ret); +#endif + return ret; - } ++} + +#if OPT_TO_FROM_ZC +//---------------------------------------------------------------------------- @@ -2966,8 +3060,8 @@ + hw_mmal_pic_sub_buf_add(dst, buf); + + sys->last_dst = dst; -+ } -+} + } + } + +static void FlushBlendMmal(filter_t * p_filter) +{ @@ -7966,7 +8060,7 @@ + --- a/modules/hw/mmal/mmal_picture.c +++ b/modules/hw/mmal/mmal_picture.c -@@ -21,25 +21,1509 @@ +@@ -21,25 +21,1542 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ @@ -7994,8 +8088,10 @@ +#include "mmal_cma.h" #include "mmal_picture.h" - --int mmal_picture_lock(picture_t *picture) ++#include "transform_ops.h" ++ ++#define TRACE_TRANSFORMS 0 ++ +#define UINT64_SIZE(s) (((s) + sizeof(uint64_t) - 1)/sizeof(uint64_t)) + +static inline char safe_char(const unsigned int c0) @@ -8417,9 +8513,7 @@ +extern piccpy_fn mmal_piccpy_10_to_8_neon; + +static void piccpy_10_to_8_c(void * dest, const void * src, size_t n) - { -- picture_sys_t *pic_sys = picture->p_sys; -- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; ++{ + uint8_t * d = dest; + const uint16_t * s = src; + while (n-- != 0) @@ -8478,12 +8572,7 @@ + size_t length = 0; + + //**** Worry about x/y_offsets - -- int offset = 0; -- picture->p[0].p_pixels = buffer->data; -- for (int i = 1; i < picture->i_planes; i++) { -- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; -- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; ++ + assert(fmt->encoding == MMAL_ENCODING_I420); + + switch (pic->format.i_chroma) { @@ -8541,14 +8630,13 @@ + + if (cma_vcsm_type() == VCSM_INIT_LEGACY) { // ** CMA is currently always uncached + flush_range(dest, length); - } - -- pic_sys->displayed = false; ++ } ++ + if (pLength != NULL) + *pLength = (uint32_t)length; - - return VLC_SUCCESS; - } ++ ++ return VLC_SUCCESS; ++} + + +static MMAL_BOOL_T rep_buf_free_cb(MMAL_BUFFER_HEADER_T *header, void *userdata) @@ -9028,7 +9116,7 @@ + d->y = rescale_x(s->y - div_rect->y, mul_rect->height, div_rect->height) + mul_rect->y; + d->width = rescale_x(s->width, mul_rect->width, div_rect->width); + d->height = rescale_x(s->height, mul_rect->height, div_rect->height); -+#if 0 ++#if TRACE_TRANSFORMS + fprintf(stderr, "(%d,%d %dx%d) * (%d,%d %dx%d) / (%d,%d %dx%d) -> (%d,%d %dx%d)\n", + s->x, s->y, s->width, s->height, + mul_rect->x, mul_rect->y, mul_rect->width, mul_rect->height, @@ -9037,16 +9125,43 @@ +#endif +} + -+void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect) ++static MMAL_RECT_T ++rect_transform(MMAL_RECT_T s, const MMAL_RECT_T c, const MMAL_DISPLAYTRANSFORM_T t) ++{ ++#if TRACE_TRANSFORMS ++ fprintf(stderr, "t=%d, s=%d,%d:%dx%d, c=%d,%d:%dx%d -> ", (int)t, ++ s.x,s.y,s.width,s.height, ++ c.x,c.y,c.width,c.height); ++#endif ++ if (is_transform_hflip(t)) ++ s = rect_hflip(s, c); ++ if (is_transform_vflip(t) != 0) ++ s = rect_vflip(s, c); ++ if (is_transform_transpose(t) != 0) ++ s = rect_transpose(s); ++#if TRACE_TRANSFORMS ++ fprintf(stderr, "s=%d,%d:%dx%d\n", ++ s.x,s.y,s.width,s.height); ++#endif ++ return s; ++} ++ ++void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect, const MMAL_DISPLAYTRANSFORM_T scale_transform) +{ + vzc_subbuf_ent_t * sb = buf->user_data; + if (scale_rect == NULL) { + sb->dreg.dest_rect = sb->orig_dest_rect; ++ sb->dreg.transform = MMAL_DISPLAY_ROT0; + } + else + { ++ // The scale rect has been transposed if we have a transposing ++ // transform - untranspose so we are the same way up as the source ++ const MMAL_RECT_T c = (scale_transform & 4) == 0 ? *scale_rect : rect_transpose(*scale_rect); + rescale_rect(&sb->dreg.dest_rect, &sb->orig_dest_rect, -+ scale_rect, &sb->pic_rect); ++ &c, &sb->pic_rect); ++ sb->dreg.dest_rect = rect_transform(sb->dreg.dest_rect, c, scale_transform); ++ sb->dreg.transform = scale_transform; + } +} + @@ -9113,7 +9228,8 @@ + ent = ent_list_extract_pic_ent(&pc->ents_cur, pic); + +// printf("ent_found: %p\n", ent); -+ + +-int mmal_picture_lock(picture_t *picture) + if (ent == NULL) + { + // Need a new ent @@ -9149,10 +9265,13 @@ + sb->dreg.set = MMAL_DISPLAY_SET_SRC_RECT | + MMAL_DISPLAY_SET_DEST_RECT | + MMAL_DISPLAY_SET_FULLSCREEN | ++ MMAL_DISPLAY_SET_TRANSFORM | + MMAL_DISPLAY_SET_ALPHA; + + sb->dreg.fullscreen = 0; ++ + // Will be set later - zero now to avoid any confusion ++ sb->dreg.transform = MMAL_DISPLAY_ROT0; + sb->dreg.dest_rect = (MMAL_RECT_T){0, 0, 0, 0}; + + sb->dreg.alpha = (uint32_t)(alpha & 0xff) | MMAL_DISPLAY_ALPHA_FLAGS_MIX; @@ -9311,7 +9430,9 @@ +int cma_pic_set_data(picture_t * const pic, + const MMAL_ES_FORMAT_T * const mm_esfmt, + const MMAL_BUFFER_HEADER_T * const buf) -+{ + { +- picture_sys_t *pic_sys = picture->p_sys; +- MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer; + const MMAL_VIDEO_FORMAT_T * const mm_fmt = &mm_esfmt->es->video; + const MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T *const buf_vid = (buf == NULL) ? NULL : &buf->type->video; + cma_buf_t *const cb = cma_buf_pic_get(pic); @@ -9339,7 +9460,12 @@ + case MMAL_ENCODING_RGB16: + pb = 2; + break; -+ + +- int offset = 0; +- picture->p[0].p_pixels = buffer->data; +- for (int i = 1; i < picture->i_planes; i++) { +- offset = offset + picture->p[i - 1].i_pitch * picture->p[i - 1].i_lines; +- picture->p[i].p_pixels = (ptrdiff_t)buffer->data + offset; + case MMAL_ENCODING_I420: + ws = shift_01; + hs = shift_01; @@ -9354,14 +9480,15 @@ + default: +// msg_Err(p_filter, "%s: Unexpected format", __func__); + return VLC_EGENERIC; -+ } -+ + } + +- pic_sys->displayed = false; + // Fix up SAR if unset + if (pic->format.i_sar_den == 0 || pic->format.i_sar_num == 0) { + pic->format.i_sar_den = mm_fmt->par.den; + pic->format.i_sar_num = mm_fmt->par.num; + } -+ + + pic->i_planes = planes; + unsigned int offset = 0; + for (unsigned int i = 0; i != planes; ++i) { @@ -9375,8 +9502,8 @@ + }; + offset += pic->p[i].i_pitch * pic->p[i].i_lines; + } -+ return VLC_SUCCESS; -+} + return VLC_SUCCESS; + } + +int cma_buf_pic_attach(cma_buf_t * const cb, picture_t * const pic) +{ @@ -9717,7 +9844,7 @@ + +bool hw_mmal_vzc_buf_set_format(MMAL_BUFFER_HEADER_T * const buf, MMAL_ES_FORMAT_T * const es_fmt); +MMAL_DISPLAYREGION_T * hw_mmal_vzc_buf_region(MMAL_BUFFER_HEADER_T * const buf); -+void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect); ++void hw_mmal_vzc_buf_scale_dest_rect(MMAL_BUFFER_HEADER_T * const buf, const MMAL_RECT_T * const scale_rect, const MMAL_DISPLAYTRANSFORM_T scale_transform); +void hw_mmal_vzc_buf_get_wh(MMAL_BUFFER_HEADER_T * const buf, int * const pW, int * const pH); +unsigned int hw_mmal_vzc_buf_seq(MMAL_BUFFER_HEADER_T * const buf); +MMAL_BUFFER_HEADER_T * hw_mmal_vzc_buf_from_pic(vzc_pool_ctl_t * const pc, picture_t * const pic, @@ -9907,7 +10034,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.c -@@ -0,0 +1,234 @@ +@@ -0,0 +1,257 @@ +/***************************************************************************** + * mmal.c: MMAL-based decoder plugin for Raspberry Pi + ***************************************************************************** @@ -10015,12 +10142,47 @@ + mmal_buffer_header_release(buf); // Will extract & release pic in pool callback +} + ++static int ++subpic_send_empty(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe, const uint64_t pts) ++{ ++ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(spe->pool->queue); ++ MMAL_STATUS_T err; ++ ++ if (buf == NULL) { ++ msg_Err(p_filter, "Buffer get for subpic failed"); ++ return -1; ++ } ++#if TRACE_ALL ++ msg_Dbg(p_filter, "Remove pic for sub %d", spe->seq); ++#endif ++ buf->cmd = 0; ++ buf->data = NULL; ++ buf->alloc_size = 0; ++ buf->offset = 0; ++ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ buf->pts = pts; ++ buf->dts = MMAL_TIME_UNKNOWN; ++ buf->user_data = NULL; ++ ++ if ((err = mmal_port_send_buffer(spe->port, buf)) != MMAL_SUCCESS) ++ { ++ msg_Err(p_filter, "Send buffer to subput failed"); ++ mmal_buffer_header_release(buf); ++ return -1; ++ } ++ return 0; ++} ++ ++// < 0 Error ++// 0 Done & stop ++// 1 Done & continue + +int hw_mmal_subpic_update(vlc_object_t * const p_filter, + MMAL_BUFFER_HEADER_T * const sub_buf, + subpic_reg_stash_t * const spe, + const video_format_t * const fmt, + const MMAL_RECT_T * const scale_out, ++ const MMAL_DISPLAYTRANSFORM_T transform_out, + const uint64_t pts) +{ + MMAL_STATUS_T err; @@ -10029,31 +10191,7 @@ + { + if (spe->port->is_enabled && spe->seq != 0) + { -+ MMAL_BUFFER_HEADER_T *const buf = mmal_queue_wait(spe->pool->queue); -+ -+ if (buf == NULL) { -+ msg_Err(p_filter, "Buffer get for subpic failed"); -+ return -1; -+ } -+#if TRACE_ALL -+ msg_Dbg(p_filter, "Remove pic for sub %d", spe->seq); -+#endif -+ buf->cmd = 0; -+ buf->data = NULL; -+ buf->alloc_size = 0; -+ buf->offset = 0; -+ buf->flags = MMAL_BUFFER_HEADER_FLAG_FRAME_END; -+ buf->pts = pts; -+ buf->dts = MMAL_TIME_UNKNOWN; -+ buf->user_data = NULL; -+ -+ if ((err = mmal_port_send_buffer(spe->port, buf)) != MMAL_SUCCESS) -+ { -+ msg_Err(p_filter, "Send buffer to subput failed"); -+ mmal_buffer_header_release(buf); -+ return -1; -+ } -+ ++ subpic_send_empty(p_filter, spe, pts); + spe->seq = 0; + } + } @@ -10062,7 +10200,7 @@ + const unsigned int seq = hw_mmal_vzc_buf_seq(sub_buf); + bool needs_update = (spe->seq != seq); + -+ hw_mmal_vzc_buf_scale_dest_rect(sub_buf, scale_out); ++ hw_mmal_vzc_buf_scale_dest_rect(sub_buf, scale_out, transform_out); + + if (hw_mmal_vzc_buf_set_format(sub_buf, spe->port->format)) + { @@ -10097,6 +10235,18 @@ + dreg->layer, dreg->alpha); +#endif + ++ // If now completely offscreen just flush this & return ++ // We only do -ve as (a) that is easy and (b) it seems to be ++ // something that can confuse mmal ++ if (dreg->dest_rect.y + dreg->dest_rect.height <= 0 || ++ dreg->dest_rect.x + dreg->dest_rect.width <= 0) ++ { ++ if (spe->port->is_enabled) ++ subpic_send_empty(p_filter, spe, pts); ++ spe->seq = seq; ++ return 1; ++ } ++ + if ((err = mmal_port_parameter_set(spe->port, &dreg->hdr)) != MMAL_SUCCESS) + { + msg_Err(p_filter, "Set display region on subput failed"); @@ -10144,7 +10294,7 @@ + --- /dev/null +++ b/modules/hw/mmal/subpic.h -@@ -0,0 +1,32 @@ +@@ -0,0 +1,33 @@ +#ifndef VLC_HW_MMAL_SUBPIC_H_ +#define VLC_HW_MMAL_SUBPIC_H_ + @@ -10165,6 +10315,7 @@ + subpic_reg_stash_t * const spe, + const video_format_t * const fmt, + const MMAL_RECT_T * const scale_out, ++ const MMAL_DISPLAYTRANSFORM_T transform_out, + const uint64_t pts); + +void hw_mmal_subpic_flush(vlc_object_t * const p_filter, subpic_reg_stash_t * const spe); @@ -10178,6 +10329,103 @@ +#endif + --- /dev/null ++++ b/modules/hw/mmal/transform_ops.h +@@ -0,0 +1,94 @@ ++#ifndef VLC_MMAL_TRANSFORM_OPS_H ++#define VLC_MMAL_TRANSFORM_OPS_H ++ ++#include <vlc_common.h> ++#include <vlc_picture.h> ++#include <interface/mmal/mmal.h> ++ ++ ++// These are enums with the same order so simply coerce ++static inline MMAL_DISPLAYTRANSFORM_T vlc_to_mmal_transform(const video_orientation_t orientation){ ++ return (MMAL_DISPLAYTRANSFORM_T)orientation; ++} ++ ++// MMAL headers comment these (getting 2 a bit wrong) but do not give ++// defines ++#define XFORM_H_SHIFT 0 // Hflip ++#define XFORM_V_SHIFT 1 // Vflip ++#define XFORM_T_SHIFT 2 // Transpose ++#define XFORM_H_BIT (1 << XFORM_H_SHIFT) ++#define XFORM_V_BIT (1 << XFORM_V_SHIFT) ++#define XFORM_T_BIT (1 << XFORM_T_SHIFT) ++ ++static inline bool ++is_transform_transpose(const MMAL_DISPLAYTRANSFORM_T t) ++{ ++ return ((unsigned int)t & XFORM_T_BIT) != 0; ++} ++ ++static inline bool ++is_transform_hflip(const MMAL_DISPLAYTRANSFORM_T t) ++{ ++ return ((unsigned int)t & XFORM_H_BIT) != 0; ++} ++ ++static inline bool ++is_transform_vflip(const MMAL_DISPLAYTRANSFORM_T t) ++{ ++ return ((unsigned int)t & XFORM_V_BIT) != 0; ++} ++ ++ ++static inline MMAL_DISPLAYTRANSFORM_T ++swap_transform_hv(const MMAL_DISPLAYTRANSFORM_T x) ++{ ++ return (((x >> XFORM_H_SHIFT) & 1) << XFORM_V_SHIFT) | ++ (((x >> XFORM_V_SHIFT) & 1) << XFORM_H_SHIFT) | ++ (x & XFORM_T_BIT); ++} ++ ++// Transform generated by A then B ++// All ops are self inverse so can simply be XORed on their own ++// H & V flips after a transpose need to be swapped ++static inline MMAL_DISPLAYTRANSFORM_T ++combine_transform(const MMAL_DISPLAYTRANSFORM_T a, const MMAL_DISPLAYTRANSFORM_T b) ++{ ++ return a ^ (is_transform_transpose(a) ? swap_transform_hv(b) : b); ++} ++ ++static inline MMAL_RECT_T ++rect_transpose(const MMAL_RECT_T s) ++{ ++ return (MMAL_RECT_T){ ++ .x = s.y, ++ .y = s.x, ++ .width = s.height, ++ .height = s.width ++ }; ++} ++ ++// hflip s in c ++static inline MMAL_RECT_T rect_hflip(const MMAL_RECT_T s, const MMAL_RECT_T c) ++{ ++ return (MMAL_RECT_T){ ++ .x = c.x + (c.x + c.width) - (s.x + s.width), ++ .y = s.y, ++ .width = s.width, ++ .height = s.height ++ }; ++} ++ ++// vflip s in c ++static inline MMAL_RECT_T rect_vflip(const MMAL_RECT_T s, const MMAL_RECT_T c) ++{ ++ return (MMAL_RECT_T){ ++ .x = s.x, ++ .y = (c.y + c.height) - (s.y - c.y) - s.height, ++ .width = s.width, ++ .height = s.height ++ }; ++} ++ ++ ++#endif ++ +--- /dev/null +++ b/modules/hw/mmal/v7_pmu.S @@ -0,0 +1,263 @@ +/*------------------------------------------------------------ @@ -10561,7 +10809,7 @@ + --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c -@@ -27,21 +27,27 @@ +@@ -27,21 +27,28 @@ #endif #include <math.h> @@ -10588,12 +10836,13 @@ + +#include "mmal_picture.h" +#include "subpic.h" ++#include "transform_ops.h" + +#define TRACE_ALL 0 #define MAX_BUFFERS_IN_TRANSIT 1 #define VC_TV_MAX_MODE_IDS 127 -@@ -50,10 +56,12 @@ +@@ -50,10 +57,18 @@ #define MMAL_LAYER_TEXT N_("VideoCore layer where the video is displayed.") #define MMAL_LAYER_LONGTEXT N_("VideoCore layer where the video is displayed. Subpictures are displayed directly above and a black background directly below.") @@ -10607,16 +10856,23 @@ +"Valid values are HDMI-1,HDMI-2. By default if qt-fullscreen-screennumber " \ +"is specified (or set by Fullscreen Output Device in Preferences) " \ +"HDMI-<qt-fullscreen-screennumber+1> will be used, otherwise HDMI-1.") ++ ++#define MMAL_VOUT_TRANSFORM_NAME "mmal-vout-transform" ++#define MMAL_VOUT_TRANSFORM_TEXT N_("Video transform for Rpi fullscreen.") ++#define MMAL_VOUT_TRANSFORM_LONGTEXT N_("Video transform for Rpi fullscreen."\ ++"Transforms availible: auto, 0, 90, 180, 270, hflip, vflip, transpose, antitranspose") ++ #define MMAL_ADJUST_REFRESHRATE_NAME "mmal-adjust-refreshrate" #define MMAL_ADJUST_REFRESHRATE_TEXT N_("Adjust HDMI refresh rate to the video.") -@@ -68,64 +76,33 @@ +@@ -68,64 +83,36 @@ #define PHASE_OFFSET_TARGET ((double)0.25) #define PHASE_CHECK_INTERVAL 100 -static int Open(vlc_object_t *); -static void Close(vlc_object_t *); -- ++#define SUBS_MAX 4 + -vlc_module_begin() - set_shortname(N_("MMAL vout")) - set_description(N_("MMAL-based vout plugin for Raspberry Pi")) @@ -10631,8 +10887,7 @@ - MMAL_NATIVE_INTERLACE_LONGTEXT, false) - set_callbacks(Open, Close) -vlc_module_end() -+#define SUBS_MAX 4 - +- -struct dmx_region_t { - struct dmx_region_t *next; - picture_t *picture; @@ -10679,14 +10934,17 @@ - int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ - int i_frame_rate; ++ MMAL_RECT_T spu_rect; // Output rectangle in cfg coords (for subpic placement) + MMAL_RECT_T dest_rect; // Output rectangle in display coords ++ MMAL_DISPLAYTRANSFORM_T display_transform; // "Native" display transform ++ MMAL_DISPLAYTRANSFORM_T dest_transform; // Combined config+native transform + + unsigned int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ + unsigned int i_frame_rate; int next_phase_check; /* lowpass for phase check frequency */ int phase_offset; /* currently applied offset to presentation time in ns */ -@@ -136,264 +113,485 @@ +@@ -136,264 +123,565 @@ bool native_interlaced; bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ bool b_progressive; @@ -10856,13 +11114,15 @@ + msg_Dbg(vd, "WxH: %dx%d, Crop: %dx%d", v_fmt->width, v_fmt->height, v_fmt->crop.width, v_fmt->crop.height); +} + -+static void display_src_rect(const vout_display_t * const vd, MMAL_RECT_T *const rect) ++static MMAL_RECT_T display_src_rect(const vout_display_t * const vd) +{ + const bool wants_isp = want_isp(vd); -+ rect->x = wants_isp ? 0 : vd->fmt.i_x_offset; -+ rect->y = wants_isp ? 0 : vd->fmt.i_y_offset; -+ rect->width = vd->fmt.i_visible_width; -+ rect->height = vd->fmt.i_visible_height; ++ return (MMAL_RECT_T){ ++ .x = wants_isp ? 0 : vd->fmt.i_x_offset, ++ .y = wants_isp ? 0 : vd->fmt.i_y_offset, ++ .width = vd->fmt.i_visible_width, ++ .height = vd->fmt.i_visible_height ++ }; +} + +static void isp_input_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf) @@ -11196,14 +11456,14 @@ + isp->output->buffer_size = isp->output->buffer_size_recommended; + isp->output->buffer_num = 2; + isp->output->userdata = (void *)vd; -+ + +- bcm_host_deinit(); + if ((isp->out_pool = mmal_port_pool_create(isp->output, isp->output->buffer_num, isp->output->buffer_size)) == NULL) + { + msg_Err(vd, "Failed to make ISP port pool"); + goto fail; + } - -- bcm_host_deinit(); ++ + mmal_pool_callback_set(isp->out_pool, isp_out_pool_cb, isp); + + if ((err = isp_prepare(vd, isp)) != MMAL_SUCCESS) @@ -11314,13 +11574,16 @@ + .width = place.width, + .height = place.height + }; - } - -+static void -+place_dest(vout_display_t *vd, vout_display_sys_t * const sys, -+ const vout_display_cfg_t * const cfg, const video_format_t * fmt) ++} ++ ++static MMAL_RECT_T ++place_out(const vout_display_cfg_t * cfg, ++ const video_format_t * fmt, ++ unsigned int w, unsigned int h) +{ + video_format_t tfmt; ++ vout_display_cfg_t tcfg; ++ vout_display_place_t place; + + // Fix SAR if unknown + if (fmt->i_sar_den == 0 || fmt->i_sar_num == 0) { @@ -11330,31 +11593,107 @@ + fmt = &tfmt; + } + -+ // Ignore what VLC thinks might be going on with display size -+ vout_display_cfg_t tcfg = *cfg; -+ vout_display_place_t place; -+ tcfg.display.width = sys->display_width; -+ tcfg.display.height = sys->display_height; -+ tcfg.is_display_filled = true; -+ vout_display_PlacePicture(&place, fmt, &tcfg, false); ++ // Override what VLC thinks might be going on with display size ++ // if we know better ++ if (w != 0 && h != 0) ++ { ++ tcfg = *cfg; ++ tcfg.display.width = w; ++ tcfg.display.height = h; ++ cfg = &tcfg; ++ } + -+ sys->dest_rect = place_to_mmal_rect(place); -+#if TRACE_ALL -+ msg_Dbg(vd, "%s: %dx%d -> %dx%d @ %d,%d", __func__, -+ tcfg.display.width, tcfg.display.height, -+ place.width, place.height, place.x, place.y); -+#endif ++ vout_display_PlacePicture(&place, fmt, cfg, false); ++ return place_to_mmal_rect(place); +} + ++static void ++place_dest_rect(vout_display_t * const vd, ++ const vout_display_cfg_t * const cfg, ++ const video_format_t * fmt) ++{ ++ vout_display_sys_t * const sys = vd->sys; ++ // If the display is transposed then we need to swap width/height ++ // when asking for placement. Video orientation will we dealt with ++ // in place_out ++ sys->dest_rect = is_transform_transpose(sys->display_transform) ? ++ rect_transpose(place_out(cfg, fmt, sys->display_height, sys->display_width)) : ++ place_out(cfg, fmt, sys->display_width, sys->display_height); ++} + ++static void ++place_spu_rect(vout_display_t * const vd, ++ const vout_display_cfg_t * const cfg, ++ const video_format_t * fmt) ++{ ++ vout_display_sys_t * const sys = vd->sys; ++ ++ sys->spu_rect = place_out(cfg, fmt, 0, 0); ++ sys->spu_rect.x = 0; ++ sys->spu_rect.y = 0; ++ ++ // Copy place override logic for spu pos from video_output.c ++ // This info doesn't appear to reside anywhere natively ++ ++ if (fmt->i_width * fmt->i_height >= (unsigned int)(sys->spu_rect.width * sys->spu_rect.height)) { ++ sys->spu_rect.width = fmt->i_width; ++ sys->spu_rect.height = fmt->i_height; ++ } ++ ++ if (ORIENT_IS_SWAP(fmt->orientation)) ++ sys->spu_rect = rect_transpose(sys->spu_rect); ++} ++ ++static void ++place_rects(vout_display_t * const vd, ++ const vout_display_cfg_t * const cfg, ++ const video_format_t * fmt) ++{ ++ place_dest_rect(vd, cfg, fmt); ++ place_spu_rect(vd, cfg, fmt); ++} + ++static int ++set_input_region(vout_display_t * const vd) ++{ ++ const vout_display_sys_t * const sys = vd->sys; ++ MMAL_DISPLAYREGION_T display_region = { ++ .hdr = { ++ .id = MMAL_PARAMETER_DISPLAYREGION, ++ .size = sizeof(MMAL_DISPLAYREGION_T) ++ }, ++ .display_num = sys->display_id, ++ .fullscreen = MMAL_FALSE, ++ .transform = sys->dest_transform, ++ .src_rect = display_src_rect(vd), ++ .dest_rect = sys->dest_rect, ++ .layer = sys->layer, ++ .alpha = 0xff | (1 << 29), ++ .set = ++ MMAL_DISPLAY_SET_NUM | ++ MMAL_DISPLAY_SET_FULLSCREEN | ++ MMAL_DISPLAY_SET_TRANSFORM | ++ MMAL_DISPLAY_SET_SRC_RECT | ++ MMAL_DISPLAY_SET_DEST_RECT | ++ MMAL_DISPLAY_SET_LAYER | ++ MMAL_DISPLAY_SET_ALPHA ++ }; ++ MMAL_STATUS_T status = mmal_port_parameter_set(sys->input, &display_region.hdr); ++ if (status != MMAL_SUCCESS) { ++ msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", ++ status, mmal_status_to_string(status)); ++ return -EINVAL; ++ } ++ return 0; + } + static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, const video_format_t *fmt) { - vout_display_sys_t *sys = vd->sys; - vout_display_place_t place; +- MMAL_DISPLAYREGION_T display_region; + vout_display_sys_t * const sys = vd->sys; - MMAL_DISPLAYREGION_T display_region; MMAL_STATUS_T status; if (!cfg && !fmt) @@ -11367,16 +11706,17 @@ if (fmt) { sys->input->format->es->video.par.num = fmt->i_sar_num; -@@ -412,22 +610,17 @@ +@@ -412,30 +700,14 @@ if (!cfg) cfg = vd->cfg; - vout_display_PlacePicture(&place, fmt, cfg, false); -+ place_dest(vd, sys, cfg, fmt); ++ sys->dest_transform = combine_transform( ++ vlc_to_mmal_transform(fmt->orientation), sys->display_transform); - display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; - display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); - display_region.fullscreen = MMAL_FALSE; +- display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; +- display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); +- display_region.fullscreen = MMAL_FALSE; - display_region.src_rect.x = fmt->i_x_offset; - display_region.src_rect.y = fmt->i_y_offset; - display_region.src_rect.width = fmt->i_visible_width; @@ -11385,25 +11725,24 @@ - display_region.dest_rect.y = place.y; - display_region.dest_rect.width = place.width; - display_region.dest_rect.height = place.height; -+ display_src_rect(vd, &display_region.src_rect); -+ display_region.dest_rect = sys->dest_rect; - display_region.layer = sys->layer; -+ display_region.alpha = 0xff | (1 << 29); - display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | +- display_region.layer = sys->layer; +- display_region.set = MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | - MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; -+ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER | MMAL_DISPLAY_SET_ALPHA; - status = mmal_port_parameter_set(sys->input, &display_region.hdr); - if (status != MMAL_SUCCESS) { - msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", -@@ -435,7 +628,6 @@ +- status = mmal_port_parameter_set(sys->input, &display_region.hdr); +- if (status != MMAL_SUCCESS) { +- msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", +- status, mmal_status_to_string(status)); ++ place_rects(vd, cfg, fmt); ++ ++ if (set_input_region(vd) != 0) return -EINVAL; - } +- } - show_background(vd, var_InheritBool(vd, MMAL_BLANK_BACKGROUND_NAME)); sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -@@ -446,192 +638,161 @@ +@@ -446,204 +718,202 @@ return 0; } @@ -11469,11 +11808,12 @@ +#if TRACE_ALL + { + char dbuf0[5]; -+ msg_Dbg(vd, "<<< %s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d", __func__, ++ msg_Dbg(vd, "<<< %s: %s,%dx%d [(%d,%d) %d/%d] sar:%d/%d -> %dx%d@%d,%d", __func__, + str_fourcc(dbuf0, p_pic->format.i_chroma), p_pic->format.i_width, p_pic->format.i_height, + p_pic->format.i_x_offset, p_pic->format.i_y_offset, + p_pic->format.i_visible_width, p_pic->format.i_visible_height, -+ p_pic->format.i_sar_num, p_pic->format.i_sar_den); ++ p_pic->format.i_sar_num, p_pic->format.i_sar_den, ++ sys->dest_rect.width, sys->dest_rect.height, sys->dest_rect.x, sys->dest_rect.y); + } #endif @@ -11652,24 +11992,25 @@ + &sys->subs[sub_no].sub, + &p_pic->format, + &sys->dest_rect, ++ sys->display_transform, + p_pic->date)) == 0) + break; + else if (rv < 0) + goto fail; } -- ++ } + - pic_sys->displayed = true; - } else { - picture_Release(picture); - } - -- display_subpicture(vd, subpicture); +fail: + for (unsigned int i = 0; i != SUBS_MAX && sys->subpic_bufs[i] != NULL; ++i) { + mmal_buffer_header_release(sys->subpic_bufs[i]); + sys->subpic_bufs[i] = NULL; -+ } + } +- display_subpicture(vd, subpicture); +- - if (subpicture) - subpicture_Delete(subpicture); + picture_Release(p_pic); @@ -11696,7 +12037,7 @@ + VLC_UNUSED(args); switch (query) { - case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: +- case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: - tmp_cfg = va_arg(args, const vout_display_cfg_t *); - if (tmp_cfg->display.width == sys->display_width && - tmp_cfg->display.height == sys->display_height) { @@ -11706,19 +12047,30 @@ - if (configure_display(vd, &cfg, NULL) >= 0) - ret = VLC_SUCCESS; - } -+ { -+ // Ignore this - we just use full screen anyway -+ ret = VLC_SUCCESS; - break; -+ } - +- break; +- case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: case VOUT_DISPLAY_CHANGE_SOURCE_CROP: -@@ -640,11 +801,39 @@ +- if (configure_display(vd, NULL, &vd->source) >= 0) ++ if (configure_display(vd, vd->cfg, &vd->source) >= 0) + ret = VLC_SUCCESS; break; - case VOUT_DISPLAY_RESET_PICTURES: +- case VOUT_DISPLAY_RESET_PICTURES: - vlc_assert_unreachable(); + case VOUT_DISPLAY_CHANGE_ZOOM: +- msg_Warn(vd, "Unsupported control query %d", query); ++ case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: ++ case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: ++ { ++ const vout_display_cfg_t * const cfg = va_arg(args, const vout_display_cfg_t *); ++ ++ if (configure_display(vd, cfg, &vd->source) >= 0) ++ ret = VLC_SUCCESS; ++ break; ++ } ++ ++ case VOUT_DISPLAY_RESET_PICTURES: + msg_Warn(vd, "Reset Pictures"); + kill_pool(sys); + vd->fmt = vd->source; // Take (nearly) whatever source wants to give us @@ -11726,11 +12078,6 @@ + ret = VLC_SUCCESS; + break; + - case VOUT_DISPLAY_CHANGE_ZOOM: - msg_Warn(vd, "Unsupported control query %d", query); -+ ret = VLC_SUCCESS; - break; - + case VOUT_DISPLAY_CHANGE_MMAL_HIDE: + { + MMAL_STATUS_T err; @@ -11749,13 +12096,12 @@ + } + sys->force_config = true; + ret = VLC_SUCCESS; -+ break; + break; + } -+ + default: msg_Warn(vd, "Unknown control query %d", query); - break; -@@ -661,13 +850,11 @@ +@@ -661,13 +931,11 @@ vlc_mutex_lock(&sys->manage_mutex); if (sys->need_configure_display) { @@ -11772,7 +12118,7 @@ } sys->need_configure_display = false; -@@ -676,56 +863,171 @@ +@@ -676,56 +944,175 @@ vlc_mutex_unlock(&sys->manage_mutex); } @@ -11803,26 +12149,30 @@ + for (subpicture_region_t *sreg = spic->p_region; sreg != NULL; sreg = sreg->p_next) { + picture_t *const src = sreg->p_picture; + -+#if 0 ++#if TRACE_ALL + char dbuf0[5]; -+ msg_Dbg(vd, " [%p:%p] Pos=%d,%d src=%dx%d/%dx%d, vd->fmt=%dx%d/%dx%d, vd->source=%dx%d/%dx%d, cfg=%dx%d, Alpha=%d, Fmt=%s", src, src->p[0].p_pixels, ++ msg_Dbg(vd, " [%p:%p] Pos=%d,%d max=%dx%d, src=%dx%d/%dx%d o:%d, spu=%d,%d:%dx%d, vd->fmt=%dx%d/%dx%d, vd->source=%dx%d/%dx%d, cfg=%dx%d, zoom=%d/%d, Alpha=%d, Fmt=%s", src, src->p[0].p_pixels, + sreg->i_x, sreg->i_y, ++ sreg->i_max_width, sreg->i_max_height, + src->format.i_visible_width, src->format.i_visible_height, + src->format.i_width, src->format.i_height, ++ src->format.orientation, ++ sys->spu_rect.x, sys->spu_rect.y, sys->spu_rect.width, sys->spu_rect.height, + vd->fmt.i_visible_width, vd->fmt.i_visible_height, + vd->fmt.i_width, vd->fmt.i_height, + vd->source.i_visible_width, vd->source.i_visible_height, + vd->source.i_width, vd->source.i_height, + vd->cfg->display.width, vd->cfg->display.height, ++ vd->cfg->zoom.num, vd->cfg->zoom.den, + sreg->i_alpha, + str_fourcc(dbuf0, src->format.i_chroma)); +#endif + + // At this point I think the subtitles are being placed in the -+ // coord space of the cfg rectangle ++ // coord space of the placed rectangle in the cfg display space + if ((sys->subpic_bufs[n] = hw_mmal_vzc_buf_from_pic(sys->vzc, + src, -+ (MMAL_RECT_T){.width = vd->cfg->display.width, .height=vd->cfg->display.height}, ++ (MMAL_RECT_T){.width = sys->spu_rect.width, .height=sys->spu_rect.height}, + sreg->i_x, sreg->i_y, + sreg->i_alpha, + n == 0)) == NULL) @@ -11978,7 +12328,7 @@ } static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) -@@ -780,9 +1082,9 @@ +@@ -780,9 +1167,9 @@ double best_score, score; int i; @@ -11990,7 +12340,7 @@ supported_modes, VC_TV_MAX_MODE_IDS, NULL, NULL); for (i = 0; i < num_modes; ++i) { -@@ -810,7 +1112,7 @@ +@@ -810,7 +1197,7 @@ if((best_id >= 0) && (display_state.display.hdmi.mode != supported_modes[best_id].code)) { msg_Info(vd, "Setting HDMI refresh rate to %"PRIu32, supported_modes[best_id].frame_rate); @@ -11999,7 +12349,7 @@ supported_modes[best_id].group, supported_modes[best_id].code); } -@@ -828,148 +1130,12 @@ +@@ -828,148 +1215,12 @@ } } @@ -12149,7 +12499,7 @@ ((double)vd->sys->i_frame_rate / vd->sys->i_frame_rate_base); vout_display_sys_t *sys = vd->sys; -@@ -1012,32 +1178,317 @@ +@@ -1012,32 +1263,403 @@ } } @@ -12209,7 +12559,7 @@ + mmal_component_release(sub->component); + sub->component = NULL; + } - } ++ } + + if (sys->input && sys->input->is_enabled) + mmal_port_disable(sys->input); @@ -12264,7 +12614,23 @@ + {NULL, -2} +}; + -+static int find_display_num(const char * name) ++static const struct { ++ const char * name; ++ int transform_num; ++} transform_name_to_num[] = { ++ {"auto", -1}, ++ {"0", MMAL_DISPLAY_ROT0}, ++ {"hflip", MMAL_DISPLAY_MIRROR_ROT0}, ++ {"vflip", MMAL_DISPLAY_MIRROR_ROT180}, ++ {"180", MMAL_DISPLAY_ROT180}, ++ {"transpose", MMAL_DISPLAY_MIRROR_ROT90}, ++ {"270", MMAL_DISPLAY_ROT270}, ++ {"90", MMAL_DISPLAY_ROT90}, ++ {"antitranspose", MMAL_DISPLAY_MIRROR_ROT270}, ++ {NULL, -2} ++}; ++ ++static int find_display_num(const char * const name) +{ + unsigned int i; + for (i = 0; display_name_to_num[i].name != NULL && strcasecmp(display_name_to_num[i].name, name) != 0; ++i) @@ -12272,11 +12638,73 @@ + return display_name_to_num[i].num; +} + ++static int find_transform_num(const char * const name) ++{ ++ unsigned int i; ++ for (i = 0; transform_name_to_num[i].name != NULL && strcasecmp(transform_name_to_num[i].name, name) != 0; ++i) ++ /* Loop */; ++ return transform_name_to_num[i].transform_num; ++} ++ ++#if HAVE_X11_XLIB_H ++#include <X11/Xlib.h> ++#include <X11/extensions/Xrandr.h> ++static MMAL_DISPLAYTRANSFORM_T get_xrandr_rotation(vout_display_t * const vd) ++{ ++ Display * const x = XOpenDisplay(NULL); ++ Rotation cur_rot = 0; ++ MMAL_DISPLAYTRANSFORM_T trans; ++ ++ if (x == NULL) ++ return MMAL_DISPLAY_ROT0; ++ ++ XRRRotations(x, 0, &cur_rot); ++ XCloseDisplay(x); ++ ++ // Convert to MMAL ++ // xrandr seems to rotate the other way to mmal ++ ++ switch (cur_rot) ++ { ++ case 0: ++ case RR_Rotate_0: ++ trans = MMAL_DISPLAY_ROT0; ++ break; ++ case RR_Rotate_90: ++ trans = MMAL_DISPLAY_ROT270; ++ break; ++ case RR_Rotate_180: ++ trans = MMAL_DISPLAY_ROT180; ++ break; ++ case RR_Rotate_270: ++ trans = MMAL_DISPLAY_ROT90; ++ break; ++ case RR_Reflect_X: ++ trans = MMAL_DISPLAY_MIRROR_ROT0; ++ break; ++ case RR_Reflect_Y: ++ trans = MMAL_DISPLAY_MIRROR_ROT180; ++ break; ++ default: ++ msg_Info(vd, "Unexpected X rotation value: %#x", cur_rot); ++ trans = MMAL_DISPLAY_ROT0; ++ break; ++ } ++ ++ return trans; ++} ++#else ++static MMAL_DISPLAYTRANSFORM_T get_xrandr_rotation(vout_display_t * const vd) ++{ ++ VLC_UNUSED(vd); ++ return MMAL_DISPLAY_ROT0; ++} ++#endif ++ +static int OpenMmalVout(vlc_object_t *object) +{ + vout_display_t *vd = (vout_display_t *)object; + vout_display_sys_t *sys; -+ MMAL_DISPLAYREGION_T display_region; + MMAL_STATUS_T status; + int ret = VLC_EGENERIC; + // At the moment all copy is via I420 @@ -12285,9 +12713,11 @@ + vout_vlc_to_mmal_pic_fourcc(vd->fmt.i_chroma); + +#if TRACE_ALL -+ msg_Dbg(vd, "<<< %s", __func__); ++ msg_Dbg(vd, "<<< %s: o:%d", __func__, (int)vd->fmt.orientation); +#endif + ++ get_xrandr_rotation(vd); ++ + sys = calloc(1, sizeof(struct vout_display_sys_t)); + if (!sys) + return VLC_ENOMEM; @@ -12319,6 +12749,23 @@ + qt_num, display_id, sys->display_id); + } + ++ { ++ const char *transform_name = var_InheritString(vd, MMAL_VOUT_TRANSFORM_NAME); ++ int transform_num = find_transform_num(transform_name); ++ sys->display_transform = transform_num < 0 ? ++ get_xrandr_rotation(vd) : ++ (MMAL_DISPLAYTRANSFORM_T)transform_num; ++ ++ if (transform_num < -1) ++ msg_Warn(vd, "Unknown vout transform: '%s'", transform_name); ++ else ++ msg_Dbg(vd, "Display transform: %s, mmal_display_transform=%d", ++ transform_name, (int)sys->display_transform); ++ ++ sys->dest_transform = combine_transform( ++ vlc_to_mmal_transform(vd->fmt.orientation), sys->display_transform); ++ } ++ + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); + if (status != MMAL_SUCCESS) { + msg_Err(vd, "Failed to create MMAL component %s (status=%"PRIx32" %s)", @@ -12377,25 +12824,10 @@ + sys->display_height = vd->cfg->display.height; + } + -+ place_dest(vd, sys, vd->cfg, &vd->source); // Sets sys->dest_rect -+ -+ display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; -+ display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T); -+ display_region.display_num = sys->display_id; -+ display_region.fullscreen = MMAL_FALSE; -+ display_src_rect(vd, &display_region.src_rect); -+ display_region.dest_rect = sys->dest_rect; -+ display_region.layer = sys->layer; -+ display_region.set = -+ MMAL_DISPLAY_SET_NUM | -+ MMAL_DISPLAY_SET_FULLSCREEN | MMAL_DISPLAY_SET_SRC_RECT | -+ MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_LAYER; -+ status = mmal_port_parameter_set(sys->input, &display_region.hdr); -+ if (status != MMAL_SUCCESS) { -+ msg_Err(vd, "Failed to set display region (status=%"PRIx32" %s)", -+ status, mmal_status_to_string(status)); ++ place_rects(vd, vd->cfg, &vd->source); // Sets sys->dest_rect ++ ++ if (set_input_region(vd) != 0) + goto fail; -+ } + + status = mmal_port_enable(sys->input, vd_input_port_cb); + if (status != MMAL_SUCCESS) { @@ -12409,7 +12841,7 @@ + msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", + sys->component->name, status, mmal_status_to_string(status)); + goto fail; -+ } + } + + if ((sys->pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) + { @@ -12488,6 +12920,10 @@ + MMAL_NATIVE_INTERLACE_LONGTEXT, false) + add_string(MMAL_DISPLAY_NAME, "auto", MMAL_DISPLAY_TEXT, + MMAL_DISPLAY_LONGTEXT, false) ++ add_string(MMAL_DISPLAY_NAME, "auto", MMAL_DISPLAY_TEXT, ++ MMAL_DISPLAY_LONGTEXT, false) ++ add_string(MMAL_VOUT_TRANSFORM_NAME, "auto", MMAL_VOUT_TRANSFORM_TEXT, ++ MMAL_VOUT_TRANSFORM_LONGTEXT, false) + set_callbacks(OpenMmalVout, CloseMmalVout) + +vlc_module_end() @@ -13067,7 +13503,7 @@ typedef struct vlc_gl_sys_t { EGLDisplay display; -@@ -354,6 +356,14 @@ +@@ -355,6 +357,14 @@ goto error; } From e52505530d6f5e76c87b6ad5ffce618e03277ba5 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 15:41:35 +0200 Subject: [PATCH 520/671] Update to 3.0.11 wip --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index ad6f49a..336a24c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -#global commit0 8b5cff44981b3af508678b7eb687944e8f2688ea +%global commit0 f5ec9e0acaa5e5bc7c5e7cf09019185b0da3bd37 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -61,7 +61,7 @@ Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{s Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} %endif -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_16.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_17.patch Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch From 6c002dc8c0e50b92e3a2d3ebfd8884de1e8d0cd2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 16:10:35 +0200 Subject: [PATCH 521/671] Reverse opencv condition --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 336a24c..506a29a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -357,7 +357,7 @@ touch src/revision.txt --with-binary-version=%{version} \ --enable-lua \ %{?_with_live555:--enable-live555} \ -%{?_with_opencv:--enable-opencv} \ +%{!?_with_opencv:--disable-opencv} \ %{!?el8:--enable-sftp} \ %{?_with_vcdimager:--enable-vcdx} \ %{?_with_rpi: \ From 07f9d567190a45a3d6e559aa3fbbbd1e5127f4c0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 16:11:01 +0200 Subject: [PATCH 522/671] Update gnutls patch --- 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch index 81983be..da5d8c4 100644 --- a/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +++ b/0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch @@ -1,9 +1,9 @@ -From 680849e6b9ced55fe8ac61771fd57e694c9ff79c Mon Sep 17 00:00:00 2001 +From 3039aec58203513f29edb03f84471ea941a0c226 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 24 Sep 2018 18:28:26 +0200 Subject: [PATCH] Use @SYSTEM wide ciphers for gnutls -Gnutls upstream has support for system +Gnutls upstream has support for system defined ciphers list This is decribed at https://fedoraproject.org/wiki/Packaging:CryptoPolicies Also found on the debian wiki @@ -15,10 +15,10 @@ Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> 1 file changed, 2 insertions(+) diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c -index 1b214358d4..05b4209692 100644 +index 7b63cc34c4..3ca665f3d3 100644 --- a/modules/misc/gnutls.c +++ b/modules/misc/gnutls.c -@@ -768,6 +768,7 @@ static void CloseServer (vlc_tls_creds_t *crd) +@@ -768,12 +768,14 @@ static void CloseServer (vlc_tls_creds_t *crd) "hash functions and compression methods can be selected. " \ "Refer to GNU TLS documentation for detailed syntax.") static const char *const priorities_values[] = { @@ -26,8 +26,7 @@ index 1b214358d4..05b4209692 100644 "PERFORMANCE", "NORMAL", "SECURE128", -@@ -775,6 +776,7 @@ static const char *const priorities_values[] = { - "EXPORT", + "SECURE256", }; static const char *const priorities_text[] = { + N_("System (default to system crypto ciphers policy)"), @@ -35,5 +34,5 @@ index 1b214358d4..05b4209692 100644 N_("Normal"), N_("Secure 128-bits (exclude 256-bits ciphers)"), -- -2.17.2 +2.25.4 From 12d4d16e270ed700f18ced150a46dde0baef6126 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 16:16:04 +0200 Subject: [PATCH 523/671] Wrap ldconfig calls for el7 --- vlc.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlc.spec b/vlc.spec index 506a29a..f64b89a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -263,8 +263,10 @@ Requires: xdg-utils Requires: hicolor-icon-theme +%if 0%{?el7:1} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig +%endif %description @@ -300,8 +302,10 @@ VLC media player core components %package extras Summary: VLC media player with extras modules Requires: vlc-core%{_isa} = %{epoch}:%{version}-%{release} +%if 0%{?el7:1} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig +%endif %description extras VLC media player extras modules. From 658016f145ab521006c5ba0f8dc473b1c900f6d9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 16:19:25 +0200 Subject: [PATCH 524/671] Add spatialaudio --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index f64b89a..ad60d68 100644 --- a/vlc.spec +++ b/vlc.spec @@ -185,6 +185,7 @@ BuildRequires: pkgconfig(Qt5Gui) >= 5.5 BuildRequires: pkgconfig(Qt5Svg) >= 5.5 BuildRequires: pkgconfig(Qt5X11Extras) >= 5.5 BuildRequires: pkgconfig(soxr) +BuildRequires: pkgconfig(spatialaudio) BuildRequires: pkgconfig(speexdsp) >= 1.0.5 BuildRequires: pkgconfig(srt) %{?_with_wayland: From 7e046ad603e7e452466032e5c3387545c33743c0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 17:22:44 +0200 Subject: [PATCH 525/671] Remove patch --- ...av-Fix-cases-where-DVD-_VERSION-are-.patch | 75 ------------------- 1 file changed, 75 deletions(-) delete mode 100644 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch diff --git a/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch b/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch deleted file mode 100644 index 94eed8a..0000000 --- a/0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 92b65796875fbd30c3ae4c98a924b735ede60038 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Thu, 2 Apr 2020 16:25:56 +0200 -Subject: [PATCH] vlc-3x: dvdread/nav: Fix cases where DVD*_VERSION* are - undefined - -With libdvdread/nav 5.0.3 (as in EL7/8) DVDREAD_VERSION_CODE is undefined -leading to a comparison error. Use the older version notation for vlc-3.x -instead. - -Also DVDNAV_VERSION is undefined there leading to a warning as it will -assume VERSION = 0. Use a #if defined to clear that warning. - -Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> ---- - modules/access/dvdnav.c | 6 +++--- - modules/access/dvdread.c | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c -index 61a9157111..86954e0d96 100644 ---- a/modules/access/dvdnav.c -+++ b/modules/access/dvdnav.c -@@ -191,7 +191,7 @@ static int EventMouse( vlc_object_t *, char const *, - static int EventIntf( vlc_object_t *, char const *, - vlc_value_t, vlc_value_t, void * ); - --#if DVDNAV_VERSION >= 60100 -+#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 - static void DvdNavLog( void *foo, dvdnav_logger_level_t i, const char *p, va_list z) - { - msg_GenericVa( (demux_t*)foo, i, p, z ); -@@ -367,7 +367,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) - - /* Open dvdnav */ - psz_path = ToLocale( psz_file ); --#if DVDNAV_VERSION >= 60100 -+#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 - dvdnav_logger_cb cbs; - cbs.pf_log = DvdNavLog; - if( dvdnav_open2( &p_dvdnav, p_demux, &cbs, psz_path ) != DVDNAV_STATUS_OK ) -@@ -479,7 +479,7 @@ static int DemuxOpen ( vlc_object_t *p_this ) - }; - - /* Open dvdnav with stream callbacks */ --#if DVDNAV_VERSION >= 60100 -+#if defined(DVDNAV_VERSION) && DVDNAV_VERSION >= 60100 - dvdnav_logger_cb cbs; - cbs.pf_log = DvdNavLog; - if( dvdnav_open_stream2( &p_dvdnav, p_demux, -diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c -index 442b3a0e49..5fe184193b 100644 ---- a/modules/access/dvdread.c -+++ b/modules/access/dvdread.c -@@ -157,7 +157,7 @@ static int DvdReadSeek ( demux_t *, int ); - static void DvdReadHandleDSI( demux_t *, uint8_t * ); - static void DvdReadFindCell ( demux_t * ); - --#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) -+#if defined(DVDREAD_VERSION) && DVDREAD_VERSION >= 60100 - static void DvdReadLog( void *foo, dvd_logger_level_t i, const char *p, va_list z ) - { - demux_t *p_demux = (demux_t*)foo; -@@ -200,7 +200,7 @@ static int Open( vlc_object_t *p_this ) - - /* Open dvdread */ - const char *psz_path = ToLocale( psz_file ); --#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) -+#if defined(DVDREAD_VERSION) && DVDREAD_VERSION >= 60100 - dvd_logger_cb cbs; - cbs.pf_log = DvdReadLog; - dvd_reader_t *p_dvdread = DVDOpen2( p_demux, &cbs, psz_path ); --- -2.25.1 - From 57baa21f0f79c779f1e7f06eee318e586878f6f0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 15 Jul 2020 17:22:59 +0200 Subject: [PATCH 526/671] Drop patch for DVD support --- vlc.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index ad60d68..5769339 100644 --- a/vlc.spec +++ b/vlc.spec @@ -62,7 +62,6 @@ Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{ver %global vlc_setup vlc-%{version}%{?vlc_rc} %endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_17.patch -Patch1: 0001-vlc-3x-dvdread-nav-Fix-cases-where-DVD-_VERSION-are-.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch # Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 @@ -317,9 +316,6 @@ VLC media player extras modules. %{?_with_rpi: %patch0 -p1 } -%if 0%{?rhel} -%patch1 -p1 -%endif %patch3 -p1 %if 0%{?el7} %patch5 -p1 From 908d00cbb61227e018b454b927e3a916b92bf3c4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jul 2020 19:11:50 +0200 Subject: [PATCH 527/671] Apply gcrypt downgrade patch --- vlc.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5769339..6923543 100644 --- a/vlc.spec +++ b/vlc.spec @@ -64,8 +64,9 @@ Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{ver Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_17.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch +Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 -Patch6: replace_deprecated_luaL_checkint.patch +Patch7: replace_deprecated_luaL_checkint.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -319,6 +320,7 @@ VLC media player extras modules. %patch3 -p1 %if 0%{?el7} %patch5 -p1 +%patch6 -p1 # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c From d41695f8bd5fa6fb2f9f61c56785e753abb6be03 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 18 Jul 2020 19:12:11 +0200 Subject: [PATCH 528/671] Add gcrypt downgrade patch --- ...for-thread-callbacks-for-older-gcryp.patch | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Restore-support-for-thread-callbacks-for-older-gcryp.patch diff --git a/Restore-support-for-thread-callbacks-for-older-gcryp.patch b/Restore-support-for-thread-callbacks-for-older-gcryp.patch new file mode 100644 index 0000000..819f0d0 --- /dev/null +++ b/Restore-support-for-thread-callbacks-for-older-gcryp.patch @@ -0,0 +1,94 @@ +From 43332a4fa12ff79f284749177dc0743a495caea6 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Sat, 18 Jul 2020 15:19:31 +0200 +Subject: [PATCH 1/1] Restore support for thread callbacks for older gcrypt + +--- + include/vlc_gcrypt.h | 64 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 64 insertions(+) + +diff --git a/include/vlc_gcrypt.h b/include/vlc_gcrypt.h +index a04e1b1d86..4c7f1e86b0 100644 +--- a/include/vlc_gcrypt.h ++++ b/include/vlc_gcrypt.h +@@ -25,6 +25,67 @@ + + #include <errno.h> + ++#if GCRYPT_VERSION_NUMBER < 0x010600 ++#ifdef LIBVLC_USE_PTHREAD ++/** ++ * If possible, use gcrypt-provided thread implementation. This is so that ++ * other non-VLC components (inside the process) can also use gcrypt safely. ++ */ ++GCRY_THREAD_OPTION_PTHREAD_IMPL; ++# define gcry_threads_vlc gcry_threads_pthread ++#else ++ ++/** ++ * gcrypt thread option VLC implementation ++ */ ++ ++static int gcry_vlc_mutex_init( void **p_sys ) ++{ ++ vlc_mutex_t *p_lock = (vlc_mutex_t *)malloc( sizeof( vlc_mutex_t ) ); ++ if( p_lock == NULL) ++ return ENOMEM; ++ ++ vlc_mutex_init( p_lock ); ++ *p_sys = p_lock; ++ return VLC_SUCCESS; ++} ++ ++static int gcry_vlc_mutex_destroy( void **p_sys ) ++{ ++ vlc_mutex_t *p_lock = (vlc_mutex_t *)*p_sys; ++ vlc_mutex_destroy( p_lock ); ++ free( p_lock ); ++ return VLC_SUCCESS; ++} ++ ++static int gcry_vlc_mutex_lock( void **p_sys ) ++{ ++ vlc_mutex_lock( (vlc_mutex_t *)*p_sys ); ++ return VLC_SUCCESS; ++} ++ ++static int gcry_vlc_mutex_unlock( void **lock ) ++{ ++ vlc_mutex_unlock( (vlc_mutex_t *)*lock ); ++ return VLC_SUCCESS; ++} ++ ++static const struct gcry_thread_cbs gcry_threads_vlc = ++{ ++ GCRY_THREAD_OPTION_USER, ++ NULL, ++ gcry_vlc_mutex_init, ++ gcry_vlc_mutex_destroy, ++ gcry_vlc_mutex_lock, ++ gcry_vlc_mutex_unlock, ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ++}; ++#endif ++#endif ++ ++/** ++ * Initializes gcrypt with proper locking. ++ */ + static inline void vlc_gcrypt_init (void) + { + /* This would need a process-wide static mutex with all libraries linking +@@ -37,6 +98,9 @@ static inline void vlc_gcrypt_init (void) + vlc_global_lock (VLC_GCRYPT_MUTEX); + if (!done) + { ++#if GCRYPT_VERSION_NUMBER < 0x010600 ++ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_vlc); ++#endif + /* The suggested way for an application to make sure that global_init + * has been called is by using gcry_check_version. (see global_init + * comments in gcrypt sources) */ +-- +2.25.4 + From 04d2efe6b3a9f855d585e790b3f3bc1f7e6a428f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 27 Jul 2020 18:13:50 +0200 Subject: [PATCH 529/671] Update to 3.0.11.1 --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index bc903cf..2605a0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.11.tar.xz) = 8219cc46e434c7b2f12321d4e1b21eae123a546eeb22f768c463537a4a4986ab395053f8a794628cfd17236f81665f12b2b3f6867af73b102b81628204b6c444 +SHA512 (vlc-3.0.11.1.tar.xz) = 8ce1e2f11aabf847dc5c55cf21ce6d7c0419a1051b5f4795e36cd060eab82d5056e44b4c070b80af56744e6aa841ef538386d08bc3b397a444e7258b2ba3f76b diff --git a/vlc.spec b/vlc.spec index 6923543..df23ebe 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 f5ec9e0acaa5e5bc7c5e7cf09019185b0da3bd37 +#global commit0 f5ec9e0acaa5e5bc7c5e7cf09019185b0da3bd37 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.11 -Release: 7%{?dist} +Version: 3.0.11.1 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Mon Jul 27 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11.1-1 +- Update to 3.0.11.1 + * Sat Jul 18 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11-7 - Rebuilt From 22fbe106c4eae93b78701c6b402c02020404f0f0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 28 Jul 2020 18:04:26 +0200 Subject: [PATCH 530/671] Fixup patch7 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index df23ebe..6029aac 100644 --- a/vlc.spec +++ b/vlc.spec @@ -330,7 +330,7 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac . /opt/rh/devtoolset-%{dts_ver}/enable %endif %if 0%{?fedora} -%patch6 -p1 +%patch7 -p1 %endif %{?_with_bootstrap: From 52e4c32bc63c7b7dcbb4699c7323f393c12cc200 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 1 Aug 2020 21:47:19 +0100 Subject: [PATCH 531/671] Rebuilt for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6029aac..7eb0713 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Sat Aug 01 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-2 +- Rebuilt for live555 + * Mon Jul 27 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.11.1-1 - Update to 3.0.11.1 From 7f06b05087dc47d79682998ad62ac5688cb602a6 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 2 Aug 2020 07:54:41 +0100 Subject: [PATCH 532/671] Disable LTO --- vlc.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlc.spec b/vlc.spec index 7eb0713..ef17df8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -342,6 +342,9 @@ touch src/revision.txt %build +%if 0%{?fedora} > 32 +%define _lto_cflags %{nil} +%endif %if 0%{?el7} . /opt/rh/devtoolset-%{dts_ver}/enable %endif From a2bea7302a374f78e41a17c49b81b7b294dc6c90 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 2 Aug 2020 17:19:55 +0100 Subject: [PATCH 533/671] Revert "Disable LTO" This reverts commit 7f06b05087dc47d79682998ad62ac5688cb602a6. --- vlc.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index ef17df8..7eb0713 100644 --- a/vlc.spec +++ b/vlc.spec @@ -342,9 +342,6 @@ touch src/revision.txt %build -%if 0%{?fedora} > 32 -%define _lto_cflags %{nil} -%endif %if 0%{?el7} . /opt/rh/devtoolset-%{dts_ver}/enable %endif From e727fcf13a51038c39751300aadd6dcce1b46bea Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 2 Aug 2020 19:25:25 +0100 Subject: [PATCH 534/671] Revert "Disable LTO" --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7eb0713..625d915 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Sun Aug 02 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-3 +- Revert "Disable LTO" + * Sat Aug 01 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-2 - Rebuilt for live555 From 57761796a1fd1baa3e28ae42d0e0566c086f5c9a Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 18 Aug 2020 23:50:34 +0100 Subject: [PATCH 535/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Leigh Scott <leigh123linux@gmail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 625d915..662e0d3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.11.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Sun Aug 02 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-3 - Revert "Disable LTO" From f8e5cc612f462691af0df85248a045b26ad29c3b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 28 Sep 2020 16:17:09 +0100 Subject: [PATCH 536/671] rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 662e0d3..ade7ed6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -596,6 +596,9 @@ fi || : %changelog +* Mon Sep 28 16:16:44 BST 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-5 +- rebuilt + * Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.11.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From cf7f85b25e96257c150a8c572ede4b6e2cbc9f22 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 28 Sep 2020 16:43:10 +0100 Subject: [PATCH 537/671] Rebuild for new protobuf --- ...9efc13a3a8f5259ce260655dfdd6f4830299.patch | 55 +++++++++++++++++++ ...32db726559743d08d2fcafbb90fc923c43ff.patch | 27 +++++++++ vlc.spec | 9 ++- 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 4f899efc13a3a8f5259ce260655dfdd6f4830299.patch create mode 100644 85aa32db726559743d08d2fcafbb90fc923c43ff.patch diff --git a/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch b/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch new file mode 100644 index 0000000..d7d78c4 --- /dev/null +++ b/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch @@ -0,0 +1,55 @@ +From 4f899efc13a3a8f5259ce260655dfdd6f4830299 Mon Sep 17 00:00:00 2001 +From: Alexandre Janniaux <ajanni@videolabs.io> +Date: Fri, 28 Aug 2020 10:08:37 +0200 +Subject: [PATCH 1/1] qt: add missing include for QPainterPath + +The include is not transitively included anymore with Qt 5.15. + +Original contribution of menaquinone from ticket #24882. + +Fix #24882, #25059 +--- + modules/gui/qt/components/playlist/views.cpp | 1 + + modules/gui/qt/util/timetooltip.cpp | 1 - + modules/gui/qt/util/timetooltip.hpp | 1 + + 3 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp +index ecc6b9918d..70dd29df72 100644 +--- a/modules/gui/qt/components/playlist/views.cpp ++++ b/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> +diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp +index 7a63a9d7d9..8cfdab3206 100644 +--- a/modules/gui/qt/util/timetooltip.cpp ++++ b/modules/gui/qt/util/timetooltip.cpp +@@ -23,7 +23,6 @@ + + #include <QApplication> + #include <QPainter> +-#include <QPainterPath> + #include <QBitmap> + #include <QFontMetrics> + #include <QDesktopWidget> +diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp +index b6d7c646c9..f213eac459 100644 +--- a/modules/gui/qt/util/timetooltip.hpp ++++ b/modules/gui/qt/util/timetooltip.hpp +@@ -25,6 +25,7 @@ + #include "qt.hpp" + + #include <QWidget> ++#include <QPainterPath> + + class TimeTooltip : public QWidget + { +-- +2.20.1 + diff --git a/85aa32db726559743d08d2fcafbb90fc923c43ff.patch b/85aa32db726559743d08d2fcafbb90fc923c43ff.patch new file mode 100644 index 0000000..2c315ec --- /dev/null +++ b/85aa32db726559743d08d2fcafbb90fc923c43ff.patch @@ -0,0 +1,27 @@ +From 85aa32db726559743d08d2fcafbb90fc923c43ff Mon Sep 17 00:00:00 2001 +From: Pierre Lamot <pierre@videolabs.io> +Date: Wed, 27 May 2020 11:05:53 +0200 +Subject: [PATCH 1/1] qt: fix missing header when compiling with Qt 5.15 + +Cherry-picked from commit 0e88143ed2fe8eedfa4d3afdafcd0df901644c1d. + +Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io> +--- + modules/gui/qt/dialogs/plugins.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp +index 93c92b9fa6..e05ec0594a 100644 +--- a/modules/gui/qt/dialogs/plugins.cpp ++++ b/modules/gui/qt/dialogs/plugins.cpp +@@ -66,6 +66,7 @@ + #include <QSplitter> + #include <QToolButton> + #include <QStackedWidget> ++#include <QPainterPath> + + //match the image source (width/height) + #define SCORE_ICON_WIDTH_SCALE 4 +-- +2.20.1 + diff --git a/vlc.spec b/vlc.spec index ade7ed6..8afd6cf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -67,6 +67,11 @@ Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 Patch7: replace_deprecated_luaL_checkint.patch +# Fix build with qt5-5.15 +# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=85aa32db726559743d08d2fcafbb90fc923c43ff +# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=4f899efc13a3a8f5259ce260655dfdd6f4830299 +Patch8: 85aa32db726559743d08d2fcafbb90fc923c43ff.patch +Patch9: 4f899efc13a3a8f5259ce260655dfdd6f4830299.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -596,8 +601,8 @@ fi || : %changelog -* Mon Sep 28 16:16:44 BST 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-5 -- rebuilt +* Mon Sep 28 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-5 +- Rebuild for new protobuf * Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.11.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 42eb3492d54e60669b2e08e944ac13aa5287b163 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 28 Sep 2020 16:48:12 +0100 Subject: [PATCH 538/671] Add patches --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 8afd6cf..05f542f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -336,6 +336,8 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac %endif %if 0%{?fedora} %patch7 -p1 +%patch8 -p1 +%patch9 -p1 %endif %{?_with_bootstrap: From 417faf9d11ce0c0963cfe65b380bf00fd15f5c1a Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 28 Sep 2020 22:45:40 +0100 Subject: [PATCH 539/671] Fix arm tests --- vlc.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlc.spec b/vlc.spec index 05f542f..bd3635d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -453,7 +453,11 @@ rm -rf %{buildroot}%{_datadir}/kde4 %if 0%{?el7} . /opt/rh/devtoolset-%{dts_ver}/enable %endif +%ifnarch %{arm} make check +%else +make check || : +%endif %ldconfig_scriptlets core From 453f7d224ff0fe265d1e76279d88f8f6f7af7ce1 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 21 Oct 2020 12:01:36 +0100 Subject: [PATCH 540/671] Rebuild for new libdvdread --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bd3635d..43f793c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.11.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -607,6 +607,9 @@ fi || : %changelog +* Wed Oct 21 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-6 +- Rebuild for new libdvdread + * Mon Sep 28 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-5 - Rebuild for new protobuf From 4bc2da4f435b1d13c3748767ac9d153926b4c312 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:10:15 +0100 Subject: [PATCH 541/671] Move mmal_20 --- mmal_17.patch => mmal_20.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mmal_17.patch => mmal_20.patch (100%) diff --git a/mmal_17.patch b/mmal_20.patch similarity index 100% rename from mmal_17.patch rename to mmal_20.patch From 7cf4d6a0168582a1e926964410222e087700ca00 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:11:07 +0100 Subject: [PATCH 542/671] Update to mmal_20 --- mmal_20.patch | 587 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 394 insertions(+), 193 deletions(-) diff --git a/mmal_20.patch b/mmal_20.patch index 9ea7a60..923f3ba 100644 --- a/mmal_20.patch +++ b/mmal_20.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -3444,6 +3444,9 @@ +@@ -3444,6 +3444,9 @@ dnl AC_ARG_ENABLE(mmal, AS_HELP_STRING([--enable-mmal], [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)])) @@ -10,7 +10,7 @@ if test "${enable_mmal}" != "no"; then VLC_SAVE_FLAGS LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif" -@@ -3454,7 +3457,7 @@ +@@ -3454,7 +3457,7 @@ if test "${enable_mmal}" != "no"; then VLC_ADD_PLUGIN([mmal]) VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) @@ -19,7 +19,7 @@ AS_IF([test "${enable_mmal}" = "yes"], [ AC_MSG_ERROR([Cannot find bcm library...]) ], [ AC_MSG_WARN([Cannot find bcm library...]) ]) -@@ -3466,6 +3469,7 @@ +@@ -3466,6 +3469,7 @@ if test "${enable_mmal}" != "no"; then VLC_RESTORE_FLAGS fi AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"]) @@ -562,14 +562,7 @@ -static int OpenDecoder(decoder_t *dec); -static void CloseDecoder(decoder_t *dec); -+#define MMAL_RESIZE_NAME "mmal-resize" -+#define MMAL_RESIZE_TEXT N_("Use mmal resizer rather than hvs.") -+#define MMAL_RESIZE_LONGTEXT N_("Use mmal resizer rather than isp. This uses less gpu memory than the ISP but is slower.") -+ -+#define MMAL_ISP_NAME "mmal-isp" -+#define MMAL_ISP_TEXT N_("Use mmal isp rather than hvs.") -+#define MMAL_ISP_LONGTEXT N_("Use mmal isp rather than hvs. This may be faster but has no blend.") - +- -vlc_module_begin() - set_shortname(N_("MMAL decoder")) - set_description(N_("MMAL-based decoder plugin for Raspberry Pi")) @@ -578,7 +571,14 @@ - add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false) - set_callbacks(OpenDecoder, CloseDecoder) -vlc_module_end() -- ++#define MMAL_RESIZE_NAME "mmal-resize" ++#define MMAL_RESIZE_TEXT N_("Use mmal resizer rather than hvs.") ++#define MMAL_RESIZE_LONGTEXT N_("Use mmal resizer rather than isp. This uses less gpu memory than the ISP but is slower.") ++ ++#define MMAL_ISP_NAME "mmal-isp" ++#define MMAL_ISP_TEXT N_("Use mmal isp rather than hvs.") ++#define MMAL_ISP_LONGTEXT N_("Use mmal isp rather than hvs. This may be faster but has no blend.") + -struct decoder_sys_t { - bool opaque; +typedef struct decoder_sys_t @@ -1128,7 +1128,7 @@ if (atomic_load(&sys->started)) { mmal_format_full_copy(sys->output->format, sys->output_format); status = mmal_port_format_commit(sys->output); -@@ -300,7 +476,9 @@ +@@ -300,7 +476,9 @@ static int change_output_format(decoder_ } port_reset: @@ -1138,7 +1138,7 @@ status = mmal_port_disable(sys->output); if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to disable output port (status=%"PRIx32" %s)", -@@ -310,6 +488,7 @@ +@@ -310,6 +488,7 @@ port_reset: } mmal_format_full_copy(sys->output->format, sys->output_format); @@ -1146,7 +1146,7 @@ status = mmal_port_format_commit(sys->output); if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to commit output format (status=%"PRIx32" %s)", -@@ -318,18 +497,10 @@ +@@ -318,18 +497,10 @@ port_reset: goto out; } @@ -1167,7 +1167,7 @@ if (status != MMAL_SUCCESS) { msg_Err(dec, "Failed to enable output port (status=%"PRIx32" %s)", status, mmal_status_to_string(status)); -@@ -338,25 +509,14 @@ +@@ -338,25 +509,14 @@ port_reset: } if (!atomic_load(&sys->started)) { @@ -1196,7 +1196,7 @@ } apply_fmt: -@@ -366,8 +526,8 @@ +@@ -366,8 +526,8 @@ apply_fmt: dec->fmt_out.video.i_y_offset = sys->output->format->es->video.crop.y; dec->fmt_out.video.i_visible_width = sys->output->format->es->video.crop.width; dec->fmt_out.video.i_visible_height = sys->output->format->es->video.crop.height; @@ -1207,7 +1207,7 @@ dec->fmt_out.video.i_frame_rate = sys->output->format->es->video.frame_rate.num; dec->fmt_out.video.i_frame_rate_base = sys->output->format->es->video.frame_rate.den; -@@ -382,12 +542,19 @@ +@@ -382,12 +542,19 @@ apply_fmt: sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive); sys->b_top_field_first = sys->b_progressive ? true : (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst); @@ -1227,7 +1227,7 @@ out: mmal_format_free(sys->output_format); sys->output_format = NULL; -@@ -395,144 +562,85 @@ +@@ -395,144 +562,85 @@ out: return ret; } @@ -1242,7 +1242,7 @@ MMAL_STATUS_T status; - unsigned buffer_size = 0; - int ret = 0; -- + - if (!sys->output->is_enabled) - return VLC_EGENERIC; - @@ -1267,7 +1267,7 @@ - p_sys = picture->p_sys; - for (int i = 0; i < picture->i_planes; i++) - buffer_size += picture->p[i].i_lines * picture->p[i].i_pitch; - +- - if (sys->output_pool) { - mmal_buffer_header_reset(buffer); - buffer->alloc_size = sys->output->buffer_size; @@ -1409,7 +1409,8 @@ MMAL_BUFFER_HEADER_T *buffer; - bool need_flush = false; uint32_t len; - uint32_t flags = 0; +- uint32_t flags = 0; ++ uint32_t flags = MMAL_BUFFER_HEADER_FLAG_FRAME_START; MMAL_STATUS_T status; +#if TRACE_ALL @@ -1425,7 +1426,7 @@ /* * Configure output port if necessary */ -@@ -541,18 +649,50 @@ +@@ -541,18 +649,50 @@ static int decode(decoder_t *dec, block_ msg_Err(dec, "Failed to change output port format"); } @@ -1479,7 +1480,7 @@ if (atomic_load(&sys->started)) fill_output_port(dec); -@@ -563,18 +703,21 @@ +@@ -563,18 +703,21 @@ static int decode(decoder_t *dec, block_ if (block->i_flags & BLOCK_FLAG_CORRUPTED) flags |= MMAL_BUFFER_HEADER_FLAG_CORRUPTED; @@ -1506,12 +1507,24 @@ len = block->i_buffer; if (len > buffer->alloc_size) -@@ -590,89 +733,1751 @@ +@@ -585,94 +728,1808 @@ static int decode(decoder_t *dec, block_ + block->i_buffer -= len; + buffer->length = len; + if (block->i_buffer == 0) { ++ flags |= MMAL_BUFFER_HEADER_FLAG_FRAME_END; ++ if (block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE) { ++ msg_Dbg(dec, "EOS sent"); ++ flags |= MMAL_BUFFER_HEADER_FLAG_EOS; ++ } + buffer->user_data = block; + block = NULL; } buffer->flags = flags; +#if TRACE_ALL -+ msg_Dbg(dec, "%s: -- Send buffer: len=%d", __func__, len); ++ msg_Dbg(dec, "%s: -- Send buffer: cmd=%d, data=%p, size=%d, len=%d, offset=%d, flags=%#x, pts=%lld, dts=%lld", __func__,\ ++ buffer->cmd, buffer->data, buffer->alloc_size, buffer->length, buffer->offset, ++ buffer->flags, (long long)buffer->pts, (long long)buffer->dts); +#endif status = mmal_port_send_buffer(sys->input, buffer); if (status != MMAL_SUCCESS) { @@ -1524,6 +1537,7 @@ + + // Reset flushed flag once we have sent a buf + sys->b_flushed = false; ++ flags &= ~MMAL_BUFFER_HEADER_FLAG_FRAME_START; } + return VLCDEC_SUCCESS; @@ -1671,6 +1685,21 @@ + goto fail; + } + ++ // Set vanishingly unlikely shape (or at least crop) ++ // to ensure that we get a resolution changed event ++ // Small wxh are rejected (128x128 is rejected) so pick a ++ // plausible size. ++ // Crop doesn't seem to be checked for being constrained by wxh ++ // so we could place it outside the pic to be sure that it is ++ // never matched but stick with something legal in case it is ever ++ // actually checked ++ sys->output->format->es->video.height = 256; ++ sys->output->format->es->video.width = 256; ++ sys->output->format->es->video.crop.height = 4; ++ sys->output->format->es->video.crop.width = 2; ++ sys->output->format->es->video.crop.x = 66; ++ sys->output->format->es->video.crop.y = 88; ++ + if ((status = hw_mmal_opaque_output(VLC_OBJECT(dec), &sys->ppr, + sys->output, NUM_EXTRA_BUFFERS, decoder_output_cb)) != MMAL_SUCCESS) + goto fail; @@ -2257,10 +2286,25 @@ + return MMAL_SUCCESS; +} + ++ ++static picture_t *conv_get_out_pics(filter_sys_t * const sys) ++{ ++ picture_t * ret_pics; ++ ++ vlc_sem_wait(&sys->sem); ++ ++ // Return a single pending buffer ++ vlc_mutex_lock(&sys->lock); ++ ret_pics = pic_fifo_get(&sys->ret_pics); ++ vlc_mutex_unlock(&sys->lock); ++ ++ return ret_pics; ++} ++ +static picture_t *conv_filter(filter_t *p_filter, picture_t *p_pic) +{ + filter_sys_t * const sys = p_filter->p_sys; -+ picture_t * ret_pics; ++ picture_t * ret_pics = NULL; + MMAL_STATUS_T err; + const uint64_t frame_seq = ++sys->frame_seq; + conv_frame_stash_t * const stash = sys->stash + (frame_seq & 0xf); @@ -2286,12 +2330,29 @@ + } + + // Check pic fmt corresponds to what we have set up -+ // ??? ISP may require flush (disable) but actually seems quite happy -+ // without + if (hw_mmal_vlc_pic_to_mmal_fmt_update(sys->input->format, p_pic)) + { + msg_Dbg(p_filter, "Reset input port format"); -+ mmal_port_format_commit(sys->input); ++ ++ // HVS can take new formats without disable, others need it ++ if (sys->resizer_type != FILTER_RESIZER_HVS) { ++ // Extract any pending pic ++ if (sys->pic_n >= 2) { ++ ret_pics = conv_get_out_pics(sys); ++ // If pic_n == 1 then we return without trying to get stuff ++ sys->pic_n = 1; ++ } ++ if (sys->input->is_enabled) { ++ if ((err = mmal_port_disable(sys->input)) != MMAL_SUCCESS) ++ msg_Warn(p_filter, "Format update disable failed: %s", mmal_status_to_string(err)); ++ } ++ } ++ ++// mmal_log_dump_port(sys->input); ++ if ((err = mmal_port_format_commit(sys->input)) != MMAL_SUCCESS) ++ msg_Warn(p_filter, "Format update commit failed: %s", mmal_status_to_string(err)); ++ ++ // (Re)enable if required will be done later + } + + if (p_pic->context == NULL) { @@ -2497,16 +2558,12 @@ + // This means we get a single static pic out + if (sys->pic_n++ == 1) { +#if TRACE_ALL -+ msg_Dbg(p_filter, ">>> %s: Pic1=NULL", __func__); ++ msg_Dbg(p_filter, ">>> %s: Pic1=%p", __func__, ret_pics); +#endif -+ return NULL; ++ return ret_pics; + } -+ vlc_sem_wait(&sys->sem); + -+ // Return a single pending buffer -+ vlc_mutex_lock(&sys->lock); -+ ret_pics = pic_fifo_get(&sys->ret_pics); -+ vlc_mutex_unlock(&sys->lock); ++ ret_pics = conv_get_out_pics(sys); + + if (sys->err_stream != MMAL_SUCCESS) + goto stream_fail; @@ -2524,8 +2581,9 @@ +fail: +#if TRACE_ALL + msg_Err(p_filter, ">>> %s: FAIL", __func__); -+ picture_Release(ret_pics); +#endif ++ if (ret_pics != NULL) ++ picture_Release(ret_pics); + if (out_buf != NULL) + mmal_buffer_header_release(out_buf); + if (p_pic != NULL) @@ -2653,8 +2711,10 @@ + if (use_isp || use_resizer) + return VLC_EGENERIC; + } -+ -+ + +- sys->output_format = format; + +- mmal_buffer_header_release(buffer); + if (use_resizer) { + // use resizer overrides use_isp + use_isp = false; @@ -2685,16 +2745,14 @@ + p_filter->fmt_out.video.i_sar_num, p_filter->fmt_out.video.i_sar_den, + gpu_mem); + } - -- sys->output_format = format; ++ + sys = calloc(1, sizeof(filter_sys_t)); + if (!sys) { + ret = VLC_ENOMEM; + goto fail; + } + p_filter->p_sys = sys; - -- mmal_buffer_header_release(buffer); ++ + // Init stuff the we destroy unconditionaly in Close first + vlc_mutex_init(&sys->lock); + vlc_sem_init(&sys->sem, 0); @@ -2741,7 +2799,7 @@ + msg_Err(p_filter, "Failed to create MMAL component %s (status=%"PRIx32" %s)", + MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, status, mmal_status_to_string(status)); + goto fail; -+ } + } + sys->output = sys->component->output[0]; + sys->input = sys->component->input[0]; + @@ -2919,7 +2977,7 @@ +static void to_zc_flush(filter_t * p_filter) +{ + VLC_UNUSED(p_filter); -+} + } + +static void CloseConverterToZc(vlc_object_t * obj) +{ @@ -3060,8 +3118,8 @@ + hw_mmal_pic_sub_buf_add(dst, buf); + + sys->last_dst = dst; - } - } ++ } ++} + +static void FlushBlendMmal(filter_t * p_filter) +{ @@ -4984,7 +5042,7 @@ -} --- /dev/null +++ b/modules/hw/mmal/mmal_avcodec.c -@@ -0,0 +1,2172 @@ +@@ -0,0 +1,2175 @@ +/***************************************************************************** + * video.c: video decoder using the libavcodec library + ***************************************************************************** @@ -7035,7 +7093,10 @@ + bool error = false; + while( ( p_pic = DecodeBlock( p_dec, pp_block, &error ) ) != NULL ) + decoder_QueueVideo( p_dec, p_pic ); -+ return error ? VLCDEC_ECRITICAL : VLCDEC_SUCCESS; ++ return VLCDEC_SUCCESS; ++// Easiest to just ignore all errors - returning a real error seems to ++// kill output forever ++// return error ? VLCDEC_ECRITICAL : VLCDEC_SUCCESS; +} + +/***************************************************************************** @@ -9126,7 +9187,7 @@ +} + +static MMAL_RECT_T -+rect_transform(MMAL_RECT_T s, const MMAL_RECT_T c, const MMAL_DISPLAYTRANSFORM_T t) ++rect_untransform(MMAL_RECT_T s, const MMAL_RECT_T c, const MMAL_DISPLAYTRANSFORM_T t) +{ +#if TRACE_TRANSFORMS + fprintf(stderr, "t=%d, s=%d,%d:%dx%d, c=%d,%d:%dx%d -> ", (int)t, @@ -9160,7 +9221,7 @@ + const MMAL_RECT_T c = (scale_transform & 4) == 0 ? *scale_rect : rect_transpose(*scale_rect); + rescale_rect(&sb->dreg.dest_rect, &sb->orig_dest_rect, + &c, &sb->pic_rect); -+ sb->dreg.dest_rect = rect_transform(sb->dreg.dest_rect, c, scale_transform); ++ sb->dreg.dest_rect = rect_untransform(sb->dreg.dest_rect, c, scale_transform); + sb->dreg.transform = scale_transform; + } +} @@ -10330,7 +10391,7 @@ + --- /dev/null +++ b/modules/hw/mmal/transform_ops.h -@@ -0,0 +1,94 @@ +@@ -0,0 +1,99 @@ +#ifndef VLC_MMAL_TRANSFORM_OPS_H +#define VLC_MMAL_TRANSFORM_OPS_H + @@ -10371,7 +10432,6 @@ + return ((unsigned int)t & XFORM_V_BIT) != 0; +} + -+ +static inline MMAL_DISPLAYTRANSFORM_T +swap_transform_hv(const MMAL_DISPLAYTRANSFORM_T x) +{ @@ -10380,6 +10440,12 @@ + (x & XFORM_T_BIT); +} + ++static inline MMAL_DISPLAYTRANSFORM_T ++transform_inverse(const MMAL_DISPLAYTRANSFORM_T x) ++{ ++ return is_transform_transpose(x) ? swap_transform_hv(x) : x; ++} ++ +// Transform generated by A then B +// All ops are self inverse so can simply be XORed on their own +// H & V flips after a transpose need to be swapped @@ -10842,7 +10908,7 @@ #define MAX_BUFFERS_IN_TRANSIT 1 #define VC_TV_MAX_MODE_IDS 127 -@@ -50,10 +57,18 @@ +@@ -50,10 +57,28 @@ #define MMAL_LAYER_TEXT N_("VideoCore layer where the video is displayed.") #define MMAL_LAYER_LONGTEXT N_("VideoCore layer where the video is displayed. Subpictures are displayed directly above and a black background directly below.") @@ -10862,17 +10928,26 @@ +#define MMAL_VOUT_TRANSFORM_LONGTEXT N_("Video transform for Rpi fullscreen."\ +"Transforms availible: auto, 0, 90, 180, 270, hflip, vflip, transpose, antitranspose") + ++#define MMAL_VOUT_WINDOW_NAME "mmal-vout-window" ++#define MMAL_VOUT_WINDOW_TEXT N_("Display window for Rpi fullscreen") ++#define MMAL_VOUT_WINDOW_LONGTEXT N_("Display window for Rpi fullscreen."\ ++"fullscreen|<width>x<height>+<x>+<y>") ++ ++#define MMAL_VOUT_TRANSPARENT_NAME "mmal-vout-transparent" ++#define MMAL_VOUT_TRANSPARENT_TEXT N_("Enable layers beneeth the vodeo layer.") ++#define MMAL_VOUT_TRANSPARENT_LONGTEXT N_("Enable layers beneath the video layer."\ ++" By default these are disabled."\ ++" Having the lower layers enabled can impact video performance") #define MMAL_ADJUST_REFRESHRATE_NAME "mmal-adjust-refreshrate" #define MMAL_ADJUST_REFRESHRATE_TEXT N_("Adjust HDMI refresh rate to the video.") -@@ -68,64 +83,36 @@ +@@ -68,332 +93,628 @@ #define PHASE_OFFSET_TARGET ((double)0.25) #define PHASE_CHECK_INTERVAL 100 -static int Open(vlc_object_t *); -static void Close(vlc_object_t *); -+#define SUBS_MAX 4 - +- -vlc_module_begin() - set_shortname(N_("MMAL vout")) - set_description(N_("MMAL-based vout plugin for Raspberry Pi")) @@ -10887,7 +10962,8 @@ - MMAL_NATIVE_INTERLACE_LONGTEXT, false) - set_callbacks(Open, Close) -vlc_module_end() -- ++#define SUBS_MAX 4 + -struct dmx_region_t { - struct dmx_region_t *next; - picture_t *picture; @@ -10928,23 +11004,31 @@ - DISPMANX_DISPLAY_HANDLE_T dmx_handle; - DISPMANX_ELEMENT_HANDLE_T bkg_element; - DISPMANX_RESOURCE_HANDLE_T bkg_resource; +- unsigned display_width; +- unsigned display_height; + int display_id; - unsigned display_width; - unsigned display_height; - -- int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ -- int i_frame_rate; ++ MMAL_RECT_T win_rect; // Window rect after transform(s) ++ MMAL_RECT_T display_rect; // Actual shape of display (x, y always 0) ++ MMAL_RECT_T req_win; // User requested window (w=0 => fullscreen) ++ + MMAL_RECT_T spu_rect; // Output rectangle in cfg coords (for subpic placement) + MMAL_RECT_T dest_rect; // Output rectangle in display coords ++ MMAL_DISPLAYTRANSFORM_T dest_transform; // Dest window coord transform + MMAL_DISPLAYTRANSFORM_T display_transform; // "Native" display transform -+ MMAL_DISPLAYTRANSFORM_T dest_transform; // Combined config+native transform -+ ++ MMAL_DISPLAYTRANSFORM_T video_transform; // Combined config+native transform + +- int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ +- int i_frame_rate; + unsigned int i_frame_rate_base; /* cached framerate to detect changes for rate adjustment */ + unsigned int i_frame_rate; int next_phase_check; /* lowpass for phase check frequency */ int phase_offset; /* currently applied offset to presentation time in ns */ -@@ -136,264 +123,565 @@ + int layer; /* the dispman layer (z-index) used for video rendering */ ++ bool transparent; // Do not disable layers beneath ours + + bool need_configure_display; /* indicates a required display reconfigure to main thread */ + bool adjust_refresh_rate; bool native_interlaced; bool b_top_field_first; /* cached interlaced settings to detect changes for native mode */ bool b_progressive; @@ -11114,14 +11198,17 @@ + msg_Dbg(vd, "WxH: %dx%d, Crop: %dx%d", v_fmt->width, v_fmt->height, v_fmt->crop.width, v_fmt->crop.height); +} + -+static MMAL_RECT_T display_src_rect(const vout_display_t * const vd) ++static MMAL_RECT_T ++display_src_rect(const vout_display_t * const vd, const video_format_t * const src) +{ + const bool wants_isp = want_isp(vd); ++ ++ // Scale source derived cropping to actual picture shape + return (MMAL_RECT_T){ -+ .x = wants_isp ? 0 : vd->fmt.i_x_offset, -+ .y = wants_isp ? 0 : vd->fmt.i_y_offset, -+ .width = vd->fmt.i_visible_width, -+ .height = vd->fmt.i_visible_height ++ .x = wants_isp ? 0 : src->i_x_offset * vd->fmt.i_width / src->i_width, ++ .y = wants_isp ? 0 : src->i_y_offset * vd->fmt.i_height / src->i_height, ++ .width = src->i_visible_width * vd->fmt.i_width / src->i_width, ++ .height = src->i_visible_height * vd->fmt.i_height / src->i_height + }; +} + @@ -11456,8 +11543,7 @@ + isp->output->buffer_size = isp->output->buffer_size_recommended; + isp->output->buffer_num = 2; + isp->output->userdata = (void *)vd; - -- bcm_host_deinit(); ++ + if ((isp->out_pool = mmal_port_pool_create(isp->output, isp->output->buffer_num, isp->output->buffer_size)) == NULL) + { + msg_Err(vd, "Failed to make ISP port pool"); @@ -11470,7 +11556,8 @@ + goto fail; + + return MMAL_SUCCESS; -+ + +- bcm_host_deinit(); +fail: + isp_close(vd, vd_sys); + return err; @@ -11579,7 +11666,7 @@ +static MMAL_RECT_T +place_out(const vout_display_cfg_t * cfg, + const video_format_t * fmt, -+ unsigned int w, unsigned int h) ++ const MMAL_RECT_T r) +{ + video_format_t tfmt; + vout_display_cfg_t tcfg; @@ -11595,30 +11682,42 @@ + + // Override what VLC thinks might be going on with display size + // if we know better -+ if (w != 0 && h != 0) ++ if (r.width != 0 && r.height != 0) + { + tcfg = *cfg; -+ tcfg.display.width = w; -+ tcfg.display.height = h; ++ tcfg.display.width = r.width; ++ tcfg.display.height = r.height; + cfg = &tcfg; + } + + vout_display_PlacePicture(&place, fmt, cfg, false); ++ ++ place.x += r.x; ++ place.y += r.y; ++ + return place_to_mmal_rect(place); +} + ++static MMAL_RECT_T ++rect_transform(MMAL_RECT_T s, const MMAL_RECT_T c, const MMAL_DISPLAYTRANSFORM_T t) ++{ ++ if (is_transform_transpose(t)) ++ s = rect_transpose(s); ++ if (is_transform_hflip(t)) ++ s = rect_hflip(s, c); ++ if (is_transform_vflip(t) != 0) ++ s = rect_vflip(s, c); ++ return s; ++} ++ +static void +place_dest_rect(vout_display_t * const vd, + const vout_display_cfg_t * const cfg, + const video_format_t * fmt) +{ + vout_display_sys_t * const sys = vd->sys; -+ // If the display is transposed then we need to swap width/height -+ // when asking for placement. Video orientation will we dealt with -+ // in place_out -+ sys->dest_rect = is_transform_transpose(sys->display_transform) ? -+ rect_transpose(place_out(cfg, fmt, sys->display_height, sys->display_width)) : -+ place_out(cfg, fmt, sys->display_width, sys->display_height); ++ sys->dest_rect = rect_transform(place_out(cfg, fmt, sys->win_rect), ++ sys->display_rect, sys->dest_transform); +} + +static void @@ -11627,8 +11726,9 @@ + const video_format_t * fmt) +{ + vout_display_sys_t * const sys = vd->sys; ++ static const MMAL_RECT_T r0 = {0}; + -+ sys->spu_rect = place_out(cfg, fmt, 0, 0); ++ sys->spu_rect = place_out(cfg, fmt, r0); + sys->spu_rect.x = 0; + sys->spu_rect.y = 0; + @@ -11636,8 +11736,8 @@ + // This info doesn't appear to reside anywhere natively + + if (fmt->i_width * fmt->i_height >= (unsigned int)(sys->spu_rect.width * sys->spu_rect.height)) { -+ sys->spu_rect.width = fmt->i_width; -+ sys->spu_rect.height = fmt->i_height; ++ sys->spu_rect.width = fmt->i_visible_width; ++ sys->spu_rect.height = fmt->i_visible_height; + } + + if (ORIENT_IS_SWAP(fmt->orientation)) @@ -11654,7 +11754,7 @@ +} + +static int -+set_input_region(vout_display_t * const vd) ++set_input_region(vout_display_t * const vd, const video_format_t * const fmt) +{ + const vout_display_sys_t * const sys = vd->sys; + MMAL_DISPLAYREGION_T display_region = { @@ -11664,17 +11764,21 @@ + }, + .display_num = sys->display_id, + .fullscreen = MMAL_FALSE, -+ .transform = sys->dest_transform, -+ .src_rect = display_src_rect(vd), ++ .transform = sys->video_transform, + .dest_rect = sys->dest_rect, ++ .src_rect = display_src_rect(vd, fmt), ++ .noaspect = MMAL_TRUE, ++ .mode = MMAL_DISPLAY_MODE_FILL, + .layer = sys->layer, -+ .alpha = 0xff | (1 << 29), ++ .alpha = 0xff | (sys->transparent ? 0 : (1 << 29)), + .set = + MMAL_DISPLAY_SET_NUM | + MMAL_DISPLAY_SET_FULLSCREEN | + MMAL_DISPLAY_SET_TRANSFORM | -+ MMAL_DISPLAY_SET_SRC_RECT | + MMAL_DISPLAY_SET_DEST_RECT | ++ MMAL_DISPLAY_SET_SRC_RECT | ++ MMAL_DISPLAY_SET_NOASPECT | ++ MMAL_DISPLAY_SET_MODE | + MMAL_DISPLAY_SET_LAYER | + MMAL_DISPLAY_SET_ALPHA + }; @@ -11706,12 +11810,12 @@ if (fmt) { sys->input->format->es->video.par.num = fmt->i_sar_num; -@@ -412,30 +700,14 @@ +@@ -412,30 +733,14 @@ static int configure_display(vout_displa if (!cfg) cfg = vd->cfg; - vout_display_PlacePicture(&place, fmt, cfg, false); -+ sys->dest_transform = combine_transform( ++ sys->video_transform = combine_transform( + vlc_to_mmal_transform(fmt->orientation), sys->display_transform); - display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION; @@ -11734,7 +11838,7 @@ - status, mmal_status_to_string(status)); + place_rects(vd, cfg, fmt); + -+ if (set_input_region(vd) != 0) ++ if (set_input_region(vd, fmt) != 0) return -EINVAL; - } @@ -11742,12 +11846,20 @@ sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -@@ -446,204 +718,202 @@ +@@ -446,204 +751,217 @@ static int configure_display(vout_displa return 0; } --static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) +static void kill_pool(vout_display_sys_t * const sys) ++{ ++ if (sys->pic_pool != NULL) { ++ picture_pool_Release(sys->pic_pool); ++ sys->pic_pool = NULL; ++ } ++} ++ ++// Actual picture pool for MMAL opaques is just a set of trivial containers + static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) { - vout_display_sys_t *sys = vd->sys; - picture_resource_t picture_res; @@ -11755,33 +11867,43 @@ - video_format_t fmt = vd->fmt; - MMAL_STATUS_T status; - unsigned i; -- ++ vout_display_sys_t * const sys = vd->sys; + - if (sys->picture_pool) { - if (sys->num_buffers < count) - msg_Warn(vd, "Picture pool with %u pictures requested, but we already have one with %u pictures", - count, sys->num_buffers); -- ++ msg_Dbg(vd, "%s: fmt:%dx%d,sar:%d/%d; source:%dx%d", __func__, ++ vd->fmt.i_width, vd->fmt.i_height, vd->fmt.i_sar_num, vd->fmt.i_sar_den, vd->source.i_width, vd->source.i_height); + - goto out; -+ if (sys->pic_pool != NULL) { -+ picture_pool_Release(sys->pic_pool); -+ sys->pic_pool = NULL; ++ if (sys->pic_pool == NULL) { ++ sys->pic_pool = picture_pool_NewFromFormat(&vd->fmt, count); } ++ return sys->pic_pool; +} - if (sys->opaque) { - if (count <= NUM_ACTUAL_OPAQUE_BUFFERS) - count = NUM_ACTUAL_OPAQUE_BUFFERS; -+// Actual picture pool for MMAL opaques is just a set of trivial containers -+static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) ++static inline bool ++check_shape(vout_display_t * const vd, const picture_t * const p_pic) +{ -+ vout_display_sys_t * const sys = vd->sys; ++ if (vd->fmt.i_width == p_pic->format.i_width && ++ vd->fmt.i_height == p_pic->format.i_height) ++ return true; ++ return false; ++} - MMAL_PARAMETER_BOOLEAN_T zero_copy = { - { MMAL_PARAMETER_ZERO_COPY, sizeof(MMAL_PARAMETER_BOOLEAN_T) }, - 1 - }; -+ msg_Dbg(vd, "%s: fmt:%dx%d,sar:%d/%d; source:%dx%d", __func__, -+ vd->fmt.i_width, vd->fmt.i_height, vd->fmt.i_sar_num, vd->fmt.i_sar_den, vd->source.i_width, vd->source.i_height); ++static void vd_display(vout_display_t *vd, picture_t *p_pic, ++ subpicture_t *subpicture) ++{ ++ vout_display_sys_t * const sys = vd->sys; ++ MMAL_STATUS_T err; - status = mmal_port_parameter_set(sys->input, &zero_copy.hdr); - if (status != MMAL_SUCCESS) { @@ -11789,22 +11911,6 @@ - sys->input->name, status, mmal_status_to_string(status)); - goto out; - } -+ if (sys->pic_pool == NULL) { -+ sys->pic_pool = picture_pool_NewFromFormat(&vd->fmt, count); - } -+ return sys->pic_pool; -+} - -- if (count < sys->input->buffer_num_recommended) -- count = sys->input->buffer_num_recommended; -+static void vd_display(vout_display_t *vd, picture_t *p_pic, -+ subpicture_t *subpicture) -+{ -+ vout_display_sys_t * const sys = vd->sys; -+ MMAL_STATUS_T err; - --#ifndef NDEBUG -- msg_Dbg(vd, "Creating picture pool with %u pictures", count); +#if TRACE_ALL + { + char dbuf0[5]; @@ -11814,7 +11920,13 @@ + p_pic->format.i_visible_width, p_pic->format.i_visible_height, + p_pic->format.i_sar_num, p_pic->format.i_sar_den, + sys->dest_rect.width, sys->dest_rect.height, sys->dest_rect.x, sys->dest_rect.y); -+ } + } +- +- if (count < sys->input->buffer_num_recommended) +- count = sys->input->buffer_num_recommended; +- +-#ifndef NDEBUG +- msg_Dbg(vd, "Creating picture pool with %u pictures", count); #endif - sys->input->buffer_num = count; @@ -11834,6 +11946,12 @@ - msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", - sys->component->name, status, mmal_status_to_string(status)); - goto out; ++ if (!check_shape(vd, p_pic)) ++ { ++ msg_Err(vd, "Pic/fmt shape mismatch"); ++ goto fail; ++ } ++ + if (!sys->input->is_enabled && + (err = mmal_port_enable(sys->input, vd_input_port_cb)) != MMAL_SUCCESS) + { @@ -11998,19 +12116,19 @@ + else if (rv < 0) + goto fail; } -+ } - +- - pic_sys->displayed = true; - } else { - picture_Release(picture); + } + +- display_subpicture(vd, subpicture); +fail: + for (unsigned int i = 0; i != SUBS_MAX && sys->subpic_bufs[i] != NULL; ++i) { + mmal_buffer_header_release(sys->subpic_bufs[i]); + sys->subpic_bufs[i] = NULL; - } ++ } -- display_subpicture(vd, subpicture); -- - if (subpicture) - subpicture_Delete(subpicture); + picture_Release(p_pic); @@ -12101,7 +12219,31 @@ default: msg_Warn(vd, "Unknown control query %d", query); -@@ -661,13 +931,11 @@ +@@ -653,79 +971,207 @@ static int vd_control(vout_display_t *vd + return ret; + } + ++static void set_display_windows(vout_display_t *const vd, vout_display_sys_t *const sys) ++{ ++ unsigned int width, height; ++ if (query_resolution(vd, sys->display_id, &width, &height) < 0) { ++ width = vd->cfg->display.width; ++ height = vd->cfg->display.height; ++ } ++ sys->display_rect = (MMAL_RECT_T){0, 0, width, height}; ++ ++ sys->win_rect = (sys->req_win.width != 0) ? ++ sys->req_win : ++ is_transform_transpose(sys->display_transform) ? ++ rect_transpose(sys->display_rect) : sys->display_rect; ++} ++ + static void vd_manage(vout_display_t *vd) + { +- vout_display_sys_t *sys = vd->sys; +- unsigned width, height; ++ vout_display_sys_t *const sys = vd->sys; + vlc_mutex_lock(&sys->manage_mutex); if (sys->need_configure_display) { @@ -12109,16 +12251,15 @@ - sys->dmx_handle = vc_dispmanx_display_open(0); - - if (query_resolution(vd, &width, &height) >= 0) { -+ if (query_resolution(vd, sys->display_id, &width, &height) >= 0) { - sys->display_width = width; - sys->display_height = height; +- sys->display_width = width; +- sys->display_height = height; - vout_display_SendEventDisplaySize(vd, width, height); -+// msg_Dbg(vd, "%s: %dx%d", __func__, width, height); -+// vout_window_ReportSize(vd->cfg->window, width, height); - } - +- } +- sys->need_configure_display = false; -@@ -676,56 +944,175 @@ ++ set_display_windows(vd, sys); + } + vlc_mutex_unlock(&sys->manage_mutex); } @@ -12204,6 +12345,9 @@ + + vd_manage(vd); + ++ if (!check_shape(vd, p_pic)) ++ return; ++ + if (sys->force_config || + p_pic->format.i_frame_rate != sys->i_frame_rate || + p_pic->format.i_frame_rate_base != sys->i_frame_rate_base || @@ -12215,7 +12359,7 @@ + sys->b_progressive = p_pic->b_progressive; + sys->i_frame_rate = p_pic->format.i_frame_rate; + sys->i_frame_rate_base = p_pic->format.i_frame_rate_base; -+ configure_display(vd, NULL, &p_pic->format); ++ configure_display(vd, NULL, &vd->source); + } + + // Subpics can either turn up attached to the main pic or in the @@ -12328,7 +12472,7 @@ } static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2) -@@ -780,9 +1167,9 @@ +@@ -780,9 +1226,9 @@ static void adjust_refresh_rate(vout_dis double best_score, score; int i; @@ -12340,7 +12484,7 @@ supported_modes, VC_TV_MAX_MODE_IDS, NULL, NULL); for (i = 0; i < num_modes; ++i) { -@@ -810,7 +1197,7 @@ +@@ -810,7 +1256,7 @@ static void adjust_refresh_rate(vout_dis if((best_id >= 0) && (display_state.display.hdmi.mode != supported_modes[best_id].code)) { msg_Info(vd, "Setting HDMI refresh rate to %"PRIu32, supported_modes[best_id].frame_rate); @@ -12349,7 +12493,7 @@ supported_modes[best_id].group, supported_modes[best_id].code); } -@@ -828,148 +1215,12 @@ +@@ -828,148 +1274,12 @@ static void adjust_refresh_rate(vout_dis } } @@ -12499,7 +12643,7 @@ ((double)vd->sys->i_frame_rate / vd->sys->i_frame_rate_base); vout_display_sys_t *sys = vd->sys; -@@ -1012,32 +1263,403 @@ +@@ -1012,32 +1322,436 @@ static void maintain_phase_sync(vout_dis } } @@ -12559,7 +12703,7 @@ + mmal_component_release(sub->component); + sub->component = NULL; + } -+ } + } + + if (sys->input && sys->input->is_enabled) + mmal_port_disable(sys->input); @@ -12701,6 +12845,33 @@ +} +#endif + ++static MMAL_RECT_T str_to_rect(const char * s) ++{ ++ MMAL_RECT_T rect = {0}; ++ rect.width = strtoul(s, (char**)&s, 0); ++ if (*s == '\0') ++ return rect; ++ if (*s++ != 'x') ++ goto fail; ++ rect.height = strtoul(s, (char**)&s, 0); ++ if (*s == '\0') ++ return rect; ++ if (*s++ != '+') ++ goto fail; ++ rect.x = strtoul(s, (char**)&s, 0); ++ if (*s == '\0') ++ return rect; ++ if (*s++ != '+') ++ goto fail; ++ rect.y = strtoul(s, (char**)&s, 0); ++ if (*s != '\0') ++ goto fail; ++ return rect; ++ ++fail: ++ return (MMAL_RECT_T){0,0,0,0}; ++} ++ +static int OpenMmalVout(vlc_object_t *object) +{ + vout_display_t *vd = (vout_display_t *)object; @@ -12734,6 +12905,7 @@ + vc_tv_register_callback(tvservice_cb, vd); + + sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME); ++ sys->transparent = var_InheritBool(vd, MMAL_VOUT_TRANSPARENT_NAME); + + { + const char *display_name = var_InheritString(vd, MMAL_DISPLAY_NAME); @@ -12750,6 +12922,15 @@ + } + + { ++ const char *window_str = var_InheritString(vd, MMAL_VOUT_WINDOW_NAME); ++ sys->req_win = str_to_rect(window_str); ++ if (sys->req_win.width != 0) ++ msg_Dbg(vd, "Window: %dx%d @ %d,%d", ++ sys->req_win.width, sys->req_win.height, ++ sys->req_win.x, sys->req_win.y); ++ } ++ ++ { + const char *transform_name = var_InheritString(vd, MMAL_VOUT_TRANSFORM_NAME); + int transform_num = find_transform_num(transform_name); + sys->display_transform = transform_num < 0 ? @@ -12762,8 +12943,9 @@ + msg_Dbg(vd, "Display transform: %s, mmal_display_transform=%d", + transform_name, (int)sys->display_transform); + -+ sys->dest_transform = combine_transform( ++ sys->video_transform = combine_transform( + vlc_to_mmal_transform(vd->fmt.orientation), sys->display_transform); ++ sys->dest_transform = transform_inverse(sys->display_transform); + } + + status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &sys->component); @@ -12818,16 +13000,9 @@ + } + } + -+ if (query_resolution(vd, sys->display_id, &sys->display_width, &sys->display_height) < 0) -+ { -+ sys->display_width = vd->cfg->display.width; -+ sys->display_height = vd->cfg->display.height; -+ } -+ -+ place_rects(vd, vd->cfg, &vd->source); // Sets sys->dest_rect ++ set_display_windows(vd, sys); + -+ if (set_input_region(vd) != 0) -+ goto fail; ++ configure_display(vd, vd->cfg, &vd->source); + + status = mmal_port_enable(sys->input, vd_input_port_cb); + if (status != MMAL_SUCCESS) { @@ -12841,7 +13016,7 @@ + msg_Err(vd, "Failed to enable component %s (status=%"PRIx32" %s)", + sys->component->name, status, mmal_status_to_string(status)); + goto fail; - } ++ } + + if ((sys->pool = mmal_pool_create(sys->input->buffer_num, 0)) == NULL) + { @@ -12920,10 +13095,12 @@ + MMAL_NATIVE_INTERLACE_LONGTEXT, false) + add_string(MMAL_DISPLAY_NAME, "auto", MMAL_DISPLAY_TEXT, + MMAL_DISPLAY_LONGTEXT, false) -+ add_string(MMAL_DISPLAY_NAME, "auto", MMAL_DISPLAY_TEXT, -+ MMAL_DISPLAY_LONGTEXT, false) + add_string(MMAL_VOUT_TRANSFORM_NAME, "auto", MMAL_VOUT_TRANSFORM_TEXT, + MMAL_VOUT_TRANSFORM_LONGTEXT, false) ++ add_string(MMAL_VOUT_WINDOW_NAME, "fullscreen", MMAL_VOUT_WINDOW_TEXT, ++ MMAL_VOUT_WINDOW_LONGTEXT, false) ++ add_bool(MMAL_VOUT_TRANSPARENT_NAME, false, MMAL_VOUT_TRANSPARENT_TEXT, ++ MMAL_VOUT_TRANSPARENT_LONGTEXT, false) + set_callbacks(OpenMmalVout, CloseMmalVout) + +vlc_module_end() @@ -12931,7 +13108,7 @@ + --- /dev/null +++ b/modules/hw/mmal/xsplitter.c -@@ -0,0 +1,560 @@ +@@ -0,0 +1,584 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif @@ -13230,7 +13407,7 @@ +} + + -+static int vout_display_Control(display_desc_t * const dd, int query, ...) ++static int vout_display_Control(const display_desc_t * const dd, int query, ...) +{ + va_list args; + int result; @@ -13248,6 +13425,46 @@ + (sys->x_desc.vout == NULL || var_InheritBool(vd, "fullscreen")); +} + ++static inline int ++up_rv(const int a, const int b) ++{ ++ return a != 0 ? a : b; ++} ++ ++static int ++reset_pictures(vout_display_t * const vd, const display_desc_t * const desc) ++{ ++ int rv = 0; ++ VLC_UNUSED(vd); ++ if (desc->vout) ++ { ++ // If the display doesn't have has_pictures_invalid then it doesn't ++ // expect RESET_PICTURES ++ if (desc->vout->info.has_pictures_invalid) ++ vout_display_Control(desc, VOUT_DISPLAY_RESET_PICTURES); ++ } ++ return rv; ++} ++ ++static int ++replay_controls(vout_display_t * const vd, const display_desc_t * const desc, const int32_t changed) ++{ ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)) != 0) ++ vout_display_Control(desc, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, vd->cfg); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_ZOOM)) != 0) ++ vout_display_Control(desc, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); ++ if ((changed & ((1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP) | ++ (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))) != 0) ++ cpy_fmt_limit_size(desc, &desc->vout->source, &vd->source); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT)) != 0) ++ vout_display_Control(desc, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP)) != 0) ++ vout_display_Control(desc, VOUT_DISPLAY_CHANGE_SOURCE_CROP); ++ if ((changed & (1 << VOUT_DISPLAY_CHANGE_VIEWPOINT)) != 0) ++ vout_display_Control(desc, VOUT_DISPLAY_CHANGE_VIEWPOINT, vd->cfg); ++ return 0; ++} ++ +/* Control on the module (mandatory) */ +static int mmal_x11_control(vout_display_t * vd, int ctl, va_list va) +{ @@ -13273,6 +13490,13 @@ + cfg->display.width, cfg->display.height, sys->mmal_desc.vout, want_mmal, + var_InheritBool(vd, "fullscreen")); + ++ // Repeat any control calls that we sent to the previous vd ++ if (swap_vout && sys->changed != 0) { ++ const uint32_t changed = sys->changed; ++ sys->changed = 0; ++ replay_controls(vd, new_desc, changed); ++ } ++ + if (swap_vout) { + if (sys->use_mmal) { + vout_display_Control(x_desc, VOUT_DISPLAY_CHANGE_MMAL_HIDE); @@ -13287,24 +13511,6 @@ + sys->use_mmal = want_mmal; + } + -+ // Repeat any control calls that we sent to the previous vd -+ if (swap_vout && sys->changed != 0) { -+ const uint32_t changed = sys->changed; -+ sys->changed = 0; -+ if ((changed & (1 << VOUT_DISPLAY_CHANGE_DISPLAY_FILLED)) != 0) -+ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, vd->cfg); -+ if ((changed & (1 << VOUT_DISPLAY_CHANGE_ZOOM)) != 0) -+ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_ZOOM, vd->cfg); -+ if ((changed & ((1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP) | -+ (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))) != 0) -+ cpy_fmt_limit_size(new_desc, &new_desc->vout->source, &vd->source); -+ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_ASPECT)) != 0) -+ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT); -+ if ((changed & (1 << VOUT_DISPLAY_CHANGE_SOURCE_CROP)) != 0) -+ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_SOURCE_CROP); -+ if ((changed & (1 << VOUT_DISPLAY_CHANGE_VIEWPOINT)) != 0) -+ vout_display_Control(new_desc, VOUT_DISPLAY_CHANGE_VIEWPOINT, vd->cfg); -+ } + + break; + } @@ -13318,14 +13524,9 @@ + str_fourcc(dbuf2, vd->source.i_chroma), vd->source.i_width, vd->source.i_height, x_desc->vout->source.i_width, + x_desc->vout->source.i_height); + } -+ // If the display doesn't have has_pictures_invalid then it doesn't -+ // expect RESET_PICTURES -+ if (sys->x_desc.vout->info.has_pictures_invalid) { -+ rv = sys->x_desc.vout->control(sys->x_desc.vout, ctl, va); -+ } -+ if (sys->mmal_desc.vout && sys->mmal_desc.vout->info.has_pictures_invalid) { -+ rv = sys->mmal_desc.vout->control(sys->mmal_desc.vout, ctl, va); -+ } ++ rv = reset_pictures(vd, &sys->x_desc); ++ rv = up_rv(rv, reset_pictures(vd, &sys->mmal_desc)); ++ + vd->fmt = x_desc->vout->fmt; + break; + @@ -13503,7 +13704,7 @@ typedef struct vlc_gl_sys_t { EGLDisplay display; -@@ -355,6 +357,14 @@ +@@ -355,6 +357,14 @@ static int Open (vlc_object_t *obj, cons goto error; } @@ -13520,7 +13721,7 @@ EGL_GREEN_SIZE, 5, --- a/src/input/decoder.c +++ b/src/input/decoder.c -@@ -1995,6 +1995,7 @@ +@@ -1995,6 +1995,7 @@ void input_DecoderDelete( decoder_t *p_d vlc_mutex_lock( &p_owner->lock ); p_owner->b_waiting = false; vlc_cond_signal( &p_owner->wait_request ); @@ -13528,7 +13729,7 @@ /* If the video output is paused or slow, or if the picture pool size was * under-estimated (e.g. greedy video filter, buggy decoder...), the -@@ -2005,7 +2006,6 @@ +@@ -2005,7 +2006,6 @@ void input_DecoderDelete( decoder_t *p_d * worker threads (if any) and the decoder thread to terminate. */ if( p_owner->p_vout != NULL ) vout_Cancel( p_owner->p_vout, true ); @@ -13538,7 +13739,7 @@ --- a/src/misc/fourcc.c +++ b/src/misc/fourcc.c -@@ -755,8 +755,13 @@ +@@ -755,8 +755,13 @@ static const struct { { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422, VLC_CODEC_VDPAU_VIDEO_444, VLC_CODEC_VDPAU_OUTPUT }, FAKE_FMT() }, @@ -13556,7 +13757,7 @@ FAKE_FMT() }, --- a/src/misc/picture.c +++ b/src/misc/picture.c -@@ -365,10 +365,30 @@ +@@ -365,10 +365,30 @@ void picture_CopyProperties( picture_t * p_dst->b_top_field_first = p_src->b_top_field_first; } @@ -13591,7 +13792,7 @@ --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c -@@ -964,6 +964,17 @@ +@@ -964,6 +964,17 @@ static picture_t *ConvertRGB32AndBlend(v return NULL; } @@ -13609,7 +13810,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) { vout_thread_sys_t *sys = vout->p; -@@ -1098,7 +1109,7 @@ +@@ -1098,7 +1109,7 @@ static int ThreadDisplayRenderPicture(vo } assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr); From 46a3f6a1b0d46d3323d1d82d1d10705415dd0c74 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:14:56 +0100 Subject: [PATCH 543/671] Add mmal_chain --- mmal_chain.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 mmal_chain.patch diff --git a/mmal_chain.patch b/mmal_chain.patch new file mode 100644 index 0000000..03e4acb --- /dev/null +++ b/mmal_chain.patch @@ -0,0 +1,14 @@ +--- a/modules/video_chroma/chain.c ++++ b/modules/video_chroma/chain.c +@@ -280,8 +280,9 @@ static int BuildTransformChain( filter_t + return VLC_SUCCESS; + + /* Lets try resize+chroma first, then transform */ +- msg_Dbg( p_filter, "Trying to build chroma+resize" ); +- EsFormatMergeSize( &fmt_mid, &p_filter->fmt_out, &p_filter->fmt_in ); ++ msg_Dbg( p_filter, "Trying to build chroma+resize, then transform" ); ++ es_format_Copy( &fmt_mid, &p_filter->fmt_out ); ++ video_format_TransformTo(&fmt_mid.video, p_filter->fmt_in.video.orientation); + i_ret = CreateChain( p_filter, &fmt_mid ); + es_format_Clean( &fmt_mid ); + if( i_ret == VLC_SUCCESS ) From 46a690e567168e55902dad2e9e1025c0a392bf44 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:15:09 +0100 Subject: [PATCH 544/671] Update mmal patches --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 43f793c..b13e438 100644 --- a/vlc.spec +++ b/vlc.spec @@ -61,7 +61,8 @@ Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{s Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} %endif -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_17.patch +Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_20.patch +Patch1: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_chain.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch From d58f68280b6750eef5d55e1c95be9d153bf9decb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:34:03 +0100 Subject: [PATCH 545/671] Update snapshot --- sources | 2 +- vlc.spec | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sources b/sources index 2605a0a..4b4d01d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.11.1.tar.xz) = 8ce1e2f11aabf847dc5c55cf21ce6d7c0419a1051b5f4795e36cd060eab82d5056e44b4c070b80af56744e6aa841ef538386d08bc3b397a444e7258b2ba3f76b +SHA512 (vlc-a66f141.tar.gz) = efd0bb066bf71d5fde2539e1308844d1b2e6acfe25bf128a68d8c50eda7f4a1709a92e2a28dff55f0f8dde8839867250adbb3e85cd1e36134399e61870e7707a diff --git a/vlc.spec b/vlc.spec index b13e438..9f9fca8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -#global commit0 f5ec9e0acaa5e5bc7c5e7cf09019185b0da3bd37 +%global commit0 a66f141b17e792bcc298c83496749ec93265ff14 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.11.1 -Release: 6%{?dist} +Version: 3.0.12 +Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -68,11 +68,6 @@ Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 Patch7: replace_deprecated_luaL_checkint.patch -# Fix build with qt5-5.15 -# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=85aa32db726559743d08d2fcafbb90fc923c43ff -# https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=4f899efc13a3a8f5259ce260655dfdd6f4830299 -Patch8: 85aa32db726559743d08d2fcafbb90fc923c43ff.patch -Patch9: 4f899efc13a3a8f5259ce260655dfdd6f4830299.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -170,7 +165,11 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: libsamplerate-devel BuildRequires: libshout-devel +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: lua5.1-devel +%else BuildRequires: lua-devel +%endif BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: libmpeg2-devel >= 0.3.2} BuildRequires: ncurses-devel @@ -335,10 +334,8 @@ sed -i -e 's/ header.channel_mapping,//' modules/codec/opus.c sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac . /opt/rh/devtoolset-%{dts_ver}/enable %endif -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 7 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 %endif %{?_with_bootstrap: @@ -608,6 +605,10 @@ fi || : %changelog +* Fri Oct 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-0.1 +- Update snapshoot +- Switch to lua-5.1 + * Wed Oct 21 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.11.1-6 - Rebuild for new libdvdread From 4058237d262bf5f19e9b732b9ed3d9791f941e1c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:53:31 +0100 Subject: [PATCH 546/671] Add lua-5.1 patch --- Switch-to-Fedora-lua-5.1.patch | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Switch-to-Fedora-lua-5.1.patch diff --git a/Switch-to-Fedora-lua-5.1.patch b/Switch-to-Fedora-lua-5.1.patch new file mode 100644 index 0000000..7c8c575 --- /dev/null +++ b/Switch-to-Fedora-lua-5.1.patch @@ -0,0 +1,36 @@ +From 3965d3cf07a62a7ed64c79f44a7cc416b76cb27e Mon Sep 17 00:00:00 2001 +From: Leigh Scott <leigh123linux@gmail.com> +Date: Fri, 30 Oct 2020 10:51:52 +0100 +Subject: [PATCH] Switch to Fedora lua-5.1 + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3aa07a8c715d..9bc7ceafb5ff 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1681,7 +1681,7 @@ then + [ + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead]) + +- PKG_CHECK_MODULES(LUA, lua5.1, ++ PKG_CHECK_MODULES(LUA, lua-5.1, + [ have_lua=yes ], + [ + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead]) +@@ -1695,8 +1695,8 @@ then + [ have_lua=no ] ) + AC_CHECK_LIB( lua5.2 , luaL_newstate, + [LUA_LIBS="-llua5.2"], +- AC_CHECK_LIB( lua5.1 , luaL_newstate, +- [LUA_LIBS="-llua5.1"], ++ AC_CHECK_LIB( lua-5.1 , luaL_newstate, ++ [LUA_LIBS="-llua-5.1"], + AC_CHECK_LIB( lua51 , luaL_newstate, + [LUA_LIBS="-llua51"], + AC_CHECK_LIB( lua , luaL_newstate, +-- +2.25.4 + From daf4e0aad764456dce012739eb23508de9b0f4f8 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 10:53:50 +0100 Subject: [PATCH 547/671] Switch to lua-5.1 when needed --- vlc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 9f9fca8..6a5b090 100644 --- a/vlc.spec +++ b/vlc.spec @@ -66,8 +66,8 @@ Patch1: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_cha Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch -# Patch based on https://code.videolan.org/videolan/vlc/commit/0e0b070c26d197e848f1548fca455bf97db471a3 -Patch7: replace_deprecated_luaL_checkint.patch +# lua-5.1 is used by default for vlc build +Patch7: Switch-to-Fedora-lua-5.1.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel From ad3d48e3f49a9b16c6d8e157f77575855526d689 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 11:15:36 +0100 Subject: [PATCH 548/671] Also switch luac --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6a5b090..2e34608 100644 --- a/vlc.spec +++ b/vlc.spec @@ -166,7 +166,7 @@ BuildRequires: pkgconfig(glu) BuildRequires: libsamplerate-devel BuildRequires: libshout-devel %if 0%{?fedora} || 0%{?rhel} > 7 -BuildRequires: lua5.1-devel +BuildRequires: lua5.1-devel, lua5.1 %else BuildRequires: lua-devel %endif @@ -336,6 +336,7 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac %endif %if 0%{?fedora} || 0%{?rhel} > 7 %patch7 -p1 +sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %{?_with_bootstrap: From 55d25101a4892f830e94938c33d6c27801648303 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 13:42:05 +0100 Subject: [PATCH 549/671] Add notify patch --- notify-don-t-depend-on-any-GTK-version.patch | 101 +++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 notify-don-t-depend-on-any-GTK-version.patch diff --git a/notify-don-t-depend-on-any-GTK-version.patch b/notify-don-t-depend-on-any-GTK-version.patch new file mode 100644 index 0000000..b01a73c --- /dev/null +++ b/notify-don-t-depend-on-any-GTK-version.patch @@ -0,0 +1,101 @@ +From c25400b146f7a7b3b4a29c0efa4daee9d1c49633 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> +Date: Tue, 5 May 2020 18:48:06 +0300 +Subject: [PATCH] notify: don't depend on any GTK version + +If there's one in the process use it. If there's none fallback to +default VLC icon with the old code. + +This not only avoids VLC builds depending on GTK, but this should +prevent crashes if GTK 2 is present in the process (e.g. through Qt plugin). + +Adapted to vlc-3.x by "Nicolas Chauvet <kwizart@gmail.com>" +--- + configure.ac | 2 +- + modules/notify/notify.c | 38 ++++++++++++++++++++++---------------- + 2 files changed, 23 insertions(+), 17 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 09ac250ff483..a3ef64318561 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4206,7 +4206,7 @@ AS_IF([test "${enable_osx_notifications}" != "no"], [ + dnl + dnl Libnotify notification plugin + dnl +-PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-3.0], [libnotify notification], [auto]) ++PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify], [libnotify notification], [auto]) + + dnl + dnl libplacebo support +diff --git a/modules/notify/notify.c b/modules/notify/notify.c +index bd6bba6c32c8..20b7c4acb761 100644 +--- a/modules/notify/notify.c ++++ b/modules/notify/notify.c +@@ -36,10 +36,16 @@ + #include <vlc_playlist.h> + #include <vlc_url.h> + +-#include <gtk/gtk.h> + #include <gdk-pixbuf/gdk-pixbuf.h> + #include <libnotify/notify.h> + ++typedef struct GtkIconTheme GtkIconTheme; ++enum GtkIconLookupFlags { dummy = 0x7fffffff }; ++ ++__attribute__((weak)) GtkIconTheme *gtk_icon_theme_get_default(void); ++__attribute__((weak)) GdkPixbuf *gtk_icon_theme_load_icon(GtkIconTheme *, ++ const char *icon_name, int size, enum GtkIconLookupFlags, GError **); ++ + #ifndef NOTIFY_CHECK_VERSION + # define NOTIFY_CHECK_VERSION(x,y,z) 0 + #endif +@@ -222,30 +228,30 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, + GError *p_error = NULL; + pix = gdk_pixbuf_new_from_file_at_scale( psz_arturl, + 72, 72, TRUE, &p_error ); ++ free( psz_arturl ); + } +- else /* else we show state-of-the art logo */ ++ else ++ /* else we show state-of-the art logo */ ++ if( gtk_icon_theme_get_default != NULL ++ && gtk_icon_theme_load_icon != NULL ) + { + /* First try to get an icon from the current theme. */ + GtkIconTheme* p_theme = gtk_icon_theme_get_default(); + pix = gtk_icon_theme_load_icon( p_theme, "vlc", 72, 0, NULL); +- +- if( !pix ) ++ } ++ else ++ { /* Load icon from share/ */ ++ GError *p_error = NULL; ++ char *psz_pixbuf; ++ char *psz_data = config_GetDataDir(); ++ if( asprintf( &psz_pixbuf, "%s/icons/48x48/vlc.png", psz_data ) >= 0 ) + { +- /* Load icon from share/ */ +- GError *p_error = NULL; +- char *psz_pixbuf; +- char *psz_data = config_GetDataDir(); +- if( asprintf( &psz_pixbuf, "%s/icons/48x48/vlc.png", psz_data ) >= 0 ) +- { +- pix = gdk_pixbuf_new_from_file( psz_pixbuf, &p_error ); +- free( psz_pixbuf ); +- } +- free( psz_data ); ++ pix = gdk_pixbuf_new_from_file( psz_pixbuf, &p_error ); ++ free( psz_pixbuf ); + } ++ free( psz_data ); + } + +- free( psz_arturl ); +- + /* we need to replace '&' with '&' because '&' is a keyword of + * notification-daemon parser */ + const int i_len = strlen( psz_tmp ); +-- +2.25.4 + From 7ee7aef757bde758644c62f236f2716c58424320 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Oct 2020 13:53:09 +0100 Subject: [PATCH 550/671] Apply notify patch --- vlc.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2e34608..c773e1e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -68,6 +68,10 @@ Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build Patch7: Switch-to-Fedora-lua-5.1.patch + +# Backport for 3.0 notifyd without gtk3 +Patch9: notify-don-t-depend-on-any-GTK-version.patch + BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -151,6 +155,7 @@ BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libvncclient) +BuildRequires: pkgconfig(libnotify) BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} @@ -339,6 +344,8 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac sed -i -e 's/luac/luac-5.1/g' configure.ac %endif +%patch9 -p1 + %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -606,6 +613,9 @@ fi || : %changelog +* Fri Oct 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-0.2 +- Backport fix for libnotify - Enable vlc notify + * Fri Oct 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-0.1 - Update snapshoot - Switch to lua-5.1 From 4974293c9cf88022c678d0ee506a0120c54961bf Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 1 Nov 2020 15:27:28 +0000 Subject: [PATCH 551/671] Drop obsolete patches --- ...9efc13a3a8f5259ce260655dfdd6f4830299.patch | 55 ---- ...32db726559743d08d2fcafbb90fc923c43ff.patch | 27 -- libplacebo_patch_1.patch | 101 ------- recent_srt_fix.patch | 25 ++ replace_deprecated_luaL_checkint.patch | 261 ------------------ vlc.spec | 4 + 6 files changed, 29 insertions(+), 444 deletions(-) delete mode 100644 4f899efc13a3a8f5259ce260655dfdd6f4830299.patch delete mode 100644 85aa32db726559743d08d2fcafbb90fc923c43ff.patch delete mode 100644 libplacebo_patch_1.patch create mode 100644 recent_srt_fix.patch delete mode 100644 replace_deprecated_luaL_checkint.patch diff --git a/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch b/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch deleted file mode 100644 index d7d78c4..0000000 --- a/4f899efc13a3a8f5259ce260655dfdd6f4830299.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4f899efc13a3a8f5259ce260655dfdd6f4830299 Mon Sep 17 00:00:00 2001 -From: Alexandre Janniaux <ajanni@videolabs.io> -Date: Fri, 28 Aug 2020 10:08:37 +0200 -Subject: [PATCH 1/1] qt: add missing include for QPainterPath - -The include is not transitively included anymore with Qt 5.15. - -Original contribution of menaquinone from ticket #24882. - -Fix #24882, #25059 ---- - modules/gui/qt/components/playlist/views.cpp | 1 + - modules/gui/qt/util/timetooltip.cpp | 1 - - modules/gui/qt/util/timetooltip.hpp | 1 + - 3 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp -index ecc6b9918d..70dd29df72 100644 ---- a/modules/gui/qt/components/playlist/views.cpp -+++ b/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> -diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp -index 7a63a9d7d9..8cfdab3206 100644 ---- a/modules/gui/qt/util/timetooltip.cpp -+++ b/modules/gui/qt/util/timetooltip.cpp -@@ -23,7 +23,6 @@ - - #include <QApplication> - #include <QPainter> --#include <QPainterPath> - #include <QBitmap> - #include <QFontMetrics> - #include <QDesktopWidget> -diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp -index b6d7c646c9..f213eac459 100644 ---- a/modules/gui/qt/util/timetooltip.hpp -+++ b/modules/gui/qt/util/timetooltip.hpp -@@ -25,6 +25,7 @@ - #include "qt.hpp" - - #include <QWidget> -+#include <QPainterPath> - - class TimeTooltip : public QWidget - { --- -2.20.1 - diff --git a/85aa32db726559743d08d2fcafbb90fc923c43ff.patch b/85aa32db726559743d08d2fcafbb90fc923c43ff.patch deleted file mode 100644 index 2c315ec..0000000 --- a/85aa32db726559743d08d2fcafbb90fc923c43ff.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 85aa32db726559743d08d2fcafbb90fc923c43ff Mon Sep 17 00:00:00 2001 -From: Pierre Lamot <pierre@videolabs.io> -Date: Wed, 27 May 2020 11:05:53 +0200 -Subject: [PATCH 1/1] qt: fix missing header when compiling with Qt 5.15 - -Cherry-picked from commit 0e88143ed2fe8eedfa4d3afdafcd0df901644c1d. - -Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io> ---- - modules/gui/qt/dialogs/plugins.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp -index 93c92b9fa6..e05ec0594a 100644 ---- a/modules/gui/qt/dialogs/plugins.cpp -+++ b/modules/gui/qt/dialogs/plugins.cpp -@@ -66,6 +66,7 @@ - #include <QSplitter> - #include <QToolButton> - #include <QStackedWidget> -+#include <QPainterPath> - - //match the image source (width/height) - #define SCORE_ICON_WIDTH_SCALE 4 --- -2.20.1 - diff --git a/libplacebo_patch_1.patch b/libplacebo_patch_1.patch deleted file mode 100644 index f47fce3..0000000 --- a/libplacebo_patch_1.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 2215a98fbb1f11e5df8e58eba2ea15733cff7905 Mon Sep 17 00:00:00 2001 -From: Leigh Scott <leigh123linux@gmail.com> -Date: Thu, 19 Dec 2019 15:03:32 +0000 -Subject: [PATCH] Adapt patch from videolan mailing list - ---- - .../video_output/opengl/fragment_shaders.c | 6 +++++ - modules/video_output/opengl/vout_helper.c | 4 ++- - modules/video_output/opengl/vout_helper.h | 27 +++++++++++++++++-- - 3 files changed, 34 insertions(+), 3 deletions(-) - -diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c -index 8c1f67ee7a..f6fb2be6c5 100644 ---- a/modules/video_output/opengl/fragment_shaders.c -+++ b/modules/video_output/opengl/fragment_shaders.c -@@ -616,7 +616,13 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, - color_params.intent = var_InheritInteger(tc->gl, "rendering-intent"); - color_params.tone_mapping_algo = var_InheritInteger(tc->gl, "tone-mapping"); - color_params.tone_mapping_param = var_InheritFloat(tc->gl, "tone-mapping-param"); -+# if PL_API_VER >= 10 -+ color_params.desaturation_strength = var_InheritFloat(tc->gl, "desat-strength"); -+ color_params.desaturation_exponent = var_InheritFloat(tc->gl, "desat-exponent"); -+ color_params.desaturation_base = var_InheritFloat(tc->gl, "desat-base"); -+# else - color_params.tone_mapping_desaturate = var_InheritFloat(tc->gl, "tone-mapping-desat"); -+# endif - color_params.gamut_warning = var_InheritBool(tc->gl, "tone-mapping-warn"); - - struct pl_color_space dst_space = pl_color_space_unknown; -diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c -index 919560e603..12308e2060 100644 ---- a/modules/video_output/opengl/vout_helper.c -+++ b/modules/video_output/opengl/vout_helper.c -@@ -628,7 +628,9 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, - .log_level = PL_LOG_INFO, - }); - if (tc->pl_ctx) { --# if PL_API_VER >= 6 -+# if PL_API_VER >= 20 -+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); -+# elif PL_API_VER >= 6 - tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); - # else - tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0); -diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h -index 978669f89c..cfc256530e 100644 ---- a/modules/video_output/opengl/vout_helper.h -+++ b/modules/video_output/opengl/vout_helper.h -@@ -148,6 +148,15 @@ static const char * const tone_text[] = { - #define TONEMAP_DESAT_TEXT "Tone-mapping desaturation coefficient" - #define TONEMAP_DESAT_LONGTEXT "How strongly to desaturate overbright colors towards white. 0.0 disables this behavior." - -+#define DESAT_STRENGTH_TEXT "Desaturation strength" -+#define DESAT_STRENGTH_LONGTEXT "How strongly to desaturate bright spectral colors towards white. 0.0 disables this behavior, 1.0 enables full desaturation (hollywood-style)" -+ -+#define DESAT_EXPONENT_TEXT "Desaturation exponent" -+#define DESAT_EXPONENT_LONGTEXT "Controls the steepness of the desaturation curve. If you set this to 0.0, the curve will be flat, i.e. desaturation always enabled (hollywood-style)." -+ -+#define DESAT_BASE_TEXT "Desaturation base" -+#define DESAT_BASE_LONGTEXT "Controls the starting offset of the desaturation curve. Brightness values below this base will always be colorimetrically tone mapped (never desaturated)." -+ - #define TONEMAP_WARN_TEXT "Highlight clipped pixels" - #define TONEMAP_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process." - -@@ -171,6 +180,21 @@ static const char * const dither_text[] = { - #define DEPTH_TEXT "Dither depth override (0 = framebuffer depth)" - #define DEPTH_LONGTEXT "Overrides the detected framebuffer depth. Useful to dither to lower bit depths than otherwise required." - -+ -+#if PL_API_VER >= 10 -+#define add_desat_params() \ -+ add_float("desat-strength", pl_color_map_default_params.desaturation_strength, \ -+ DESAT_STRENGTH_TEXT, DESAT_STRENGTH_LONGTEXT, false) \ -+ add_float("desat-exponent", pl_color_map_default_params.desaturation_exponent, \ -+ DESAT_EXPONENT_TEXT, DESAT_EXPONENT_LONGTEXT, false) \ -+ add_float("desat-base", pl_color_map_default_params.desaturation_base, \ -+ DESAT_BASE_TEXT, DESAT_BASE_LONGTEXT, false) -+#else -+#define add_desat_params() \ -+ add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \ -+ TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false) -+#endif -+ - #define add_glopts_placebo() \ - set_section("Colorspace conversion", NULL) \ - add_integer("rendering-intent", pl_color_map_default_params.intent, \ -@@ -184,10 +208,9 @@ static const char * const dither_text[] = { - add_integer("tone-mapping", PL_TONE_MAPPING_HABLE, \ - TONEMAPPING_TEXT, TONEMAPPING_LONGTEXT, false) \ - change_integer_list(tone_values, tone_text) \ -+ add_desat_params() \ - add_float("tone-mapping-param", pl_color_map_default_params.tone_mapping_param, \ - TONEMAP_PARAM_TEXT, TONEMAP_PARAM_LONGTEXT, true) \ -- add_float("tone-mapping-desat", pl_color_map_default_params.tone_mapping_desaturate, \ -- TONEMAP_DESAT_TEXT, TONEMAP_DESAT_LONGTEXT, false) \ - add_bool("tone-mapping-warn", false, TONEMAP_WARN_TEXT, TONEMAP_WARN_LONGTEXT, false) \ - set_section("Dithering", NULL) \ - add_integer("dither-algo", -1, DITHER_TEXT, DITHER_LONGTEXT, false) \ --- -2.24.1 - diff --git a/recent_srt_fix.patch b/recent_srt_fix.patch new file mode 100644 index 0000000..b6c4fa1 --- /dev/null +++ b/recent_srt_fix.patch @@ -0,0 +1,25 @@ +--- a/modules/access/srt.c ++++ b/modules/access/srt.c +@@ -165,7 +165,7 @@ + + /* Set latency */ + i_latency = var_InheritInteger( p_stream, "latency" ); +- srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY, ++ srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY, + &i_latency, sizeof( int ) ); + + psz_passphrase = var_InheritString( p_stream, "passphrase" ); + +--- a/modules/access_output/srt.c ++++ b/modules/access_output/srt.c +@@ -162,7 +162,7 @@ + + /* Set latency */ + i_latency = var_InheritInteger( p_access, "latency" ); +- srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY, ++ srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY, + &i_latency, sizeof( int ) ); + + if ( psz_passphrase != NULL && psz_passphrase[0] != '\0') + + diff --git a/replace_deprecated_luaL_checkint.patch b/replace_deprecated_luaL_checkint.patch deleted file mode 100644 index 3759d96..0000000 --- a/replace_deprecated_luaL_checkint.patch +++ /dev/null @@ -1,261 +0,0 @@ -From f90c88f72b87111992cb793d5d203a5d4aab97d4 Mon Sep 17 00:00:00 2001 -From: Leigh Scott <leigh123linux@gmail.com> -Date: Tue, 30 Jun 2020 20:05:31 +0100 -Subject: [PATCH] lua: replace deprecated luaL_checkint with luaL_checkinteger - ---- - modules/lua/demux.c | 4 ++-- - modules/lua/libs/dialog.c | 14 +++++++------- - modules/lua/libs/io.c | 2 +- - modules/lua/libs/net.c | 16 ++++++++-------- - modules/lua/libs/osd.c | 4 ++-- - modules/lua/libs/playlist.c | 10 +++++----- - modules/lua/libs/stream.c | 2 +- - modules/lua/libs/volume.c | 2 +- - 8 files changed, 27 insertions(+), 27 deletions(-) - -diff --git a/modules/lua/demux.c b/modules/lua/demux.c -index a4ea3af1aa..aec774af46 100644 ---- a/modules/lua/demux.c -+++ b/modules/lua/demux.c -@@ -52,7 +52,7 @@ struct vlclua_playlist - static int vlclua_demux_peek( lua_State *L ) - { - stream_t *s = (stream_t *)vlclua_get_this(L); -- int n = luaL_checkint( L, 1 ); -+ int n = luaL_checkinteger( L, 1 ); - const uint8_t *p_peek; - - ssize_t val = vlc_stream_Peek(s->p_source, &p_peek, n); -@@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State *L ) - static int vlclua_demux_read( lua_State *L ) - { - stream_t *s = (stream_t *)vlclua_get_this(L); -- int n = luaL_checkint( L, 1 ); -+ int n = luaL_checkinteger( L, 1 ); - char *buf = malloc(n); - - if (buf != NULL) -diff --git a/modules/lua/libs/dialog.c b/modules/lua/libs/dialog.c -index 488b032226..8c1ab2c339 100644 ---- a/modules/lua/libs/dialog.c -+++ b/modules/lua/libs/dialog.c -@@ -382,7 +382,7 @@ static int lua_GetDialogUpdate( lua_State *L ) - /* Read entry in the Lua registry */ - lua_pushlightuserdata( L, (void*) &key_update ); - lua_gettable( L, LUA_REGISTRYINDEX ); -- return luaL_checkint( L, -1 ); -+ return luaL_checkinteger( L, -1 ); - } - - /** Manually update a dialog -@@ -573,22 +573,22 @@ static int vlclua_create_widget_inner( lua_State *L, int i_args, - - /* Set common arguments: col, row, hspan, vspan, width, height */ - if( lua_isnumber( L, arg ) ) -- p_widget->i_column = luaL_checkint( L, arg ); -+ p_widget->i_column = luaL_checkinteger( L, arg ); - else goto end_of_args; - if( lua_isnumber( L, ++arg ) ) -- p_widget->i_row = luaL_checkint( L, arg ); -+ p_widget->i_row = luaL_checkinteger( L, arg ); - else goto end_of_args; - if( lua_isnumber( L, ++arg ) ) -- p_widget->i_horiz_span = luaL_checkint( L, arg ); -+ p_widget->i_horiz_span = luaL_checkinteger( L, arg ); - else goto end_of_args; - if( lua_isnumber( L, ++arg ) ) -- p_widget->i_vert_span = luaL_checkint( L, arg ); -+ p_widget->i_vert_span = luaL_checkinteger( L, arg ); - else goto end_of_args; - if( lua_isnumber( L, ++arg ) ) -- p_widget->i_width = luaL_checkint( L, arg ); -+ p_widget->i_width = luaL_checkinteger( L, arg ); - else goto end_of_args; - if( lua_isnumber( L, ++arg ) ) -- p_widget->i_height = luaL_checkint( L, arg ); -+ p_widget->i_height = luaL_checkinteger( L, arg ); - else goto end_of_args; - - end_of_args: -diff --git a/modules/lua/libs/io.c b/modules/lua/libs/io.c -index c01cf7137d..12267e1822 100644 ---- a/modules/lua/libs/io.c -+++ b/modules/lua/libs/io.c -@@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_State *L ) - const char* psz_mode = luaL_optstring( L, 2, NULL ); - if ( psz_mode != NULL ) - { -- long i_offset = luaL_optlong( L, 3, 0 ); -+ long i_offset = luaL_optinteger( L, 3, 0 ); - int i_mode; - if ( !strcmp( psz_mode, "set" ) ) - i_mode = SEEK_SET; -diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c -index 5e10ee4860..8feba3d7b5 100644 ---- a/modules/lua/libs/net.c -+++ b/modules/lua/libs/net.c -@@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_State *L ) - { - vlc_object_t *p_this = vlclua_get_this( L ); - const char *psz_host = luaL_checkstring( L, 1 ); -- int i_port = luaL_checkint( L, 2 ); -+ int i_port = luaL_checkinteger( L, 2 ); - int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); - if( pi_fd == NULL ) - return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); -@@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_State *L ) - { - vlc_object_t *p_this = vlclua_get_this( L ); - const char *psz_host = luaL_checkstring( L, 1 ); -- int i_port = luaL_checkint( L, 2 ); -+ int i_port = luaL_checkinteger( L, 2 ); - int i_fd = net_ConnectTCP( p_this, psz_host, i_port ); - lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); - return 1; -@@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_State *L ) - - static int vlclua_net_close( lua_State *L ) - { -- int i_fd = luaL_checkint( L, 1 ); -+ int i_fd = luaL_checkinteger( L, 1 ); - vlclua_fd_unmap_safe( L, i_fd ); - return 0; - } - - static int vlclua_net_send( lua_State *L ) - { -- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -+ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); - size_t i_len; - const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); - -@@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L ) - - static int vlclua_net_recv( lua_State *L ) - { -- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -+ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); - size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); - char psz_buffer[i_len]; - -@@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L ) - lua_pushnil( L ); - for( int i = 0; lua_next( L, 1 ); i++ ) - { -- luafds[i] = luaL_checkint( L, -2 ); -+ luafds[i] = luaL_checkinteger( L, -2 ); - p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); - p_fds[i].events = luaL_checkinteger( L, -1 ); - p_fds[i].events &= POLLIN | POLLOUT | POLLPRI; -@@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L ) - #ifndef _WIN32 - static int vlclua_fd_write( lua_State *L ) - { -- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -+ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); - size_t i_len; - const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); - -@@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L ) - - static int vlclua_fd_read( lua_State *L ) - { -- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -+ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); - size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); - char psz_buffer[i_len]; - -diff --git a/modules/lua/libs/osd.c b/modules/lua/libs/osd.c -index 917e52eab6..6c75d92448 100644 ---- a/modules/lua/libs/osd.c -+++ b/modules/lua/libs/osd.c -@@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_string( const char *psz_name ) - - static int vlclua_osd_slider( lua_State *L ) - { -- int i_position = luaL_checkint( L, 1 ); -+ int i_position = luaL_checkinteger( L, 1 ); - const char *psz_type = luaL_checkstring( L, 2 ); - int i_type = vlc_osd_slider_type_from_string( psz_type ); - int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD ); -@@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( lua_State *L ) - - static int vlclua_spu_channel_clear( lua_State *L ) - { -- int i_chan = luaL_checkint( L, 1 ); -+ int i_chan = luaL_checkinteger( L, 1 ); - input_thread_t *p_input = vlclua_get_input_internal( L ); - if( !p_input ) - return luaL_error( L, "Unable to find input." ); -diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c -index 5cf879ea7a..c6d42081c1 100644 ---- a/modules/lua/libs/playlist.c -+++ b/modules/lua/libs/playlist.c -@@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_State * L ) - - static int vlclua_playlist_skip( lua_State * L ) - { -- int i_skip = luaL_checkint( L, 1 ); -+ int i_skip = luaL_checkinteger( L, 1 ); - playlist_t *p_playlist = vlclua_get_playlist_internal( L ); - playlist_Skip( p_playlist, i_skip ); - return 0; -@@ -127,7 +127,7 @@ static int vlclua_playlist_random( lua_State * L ) - - static int vlclua_playlist_gotoitem( lua_State * L ) - { -- int i_id = luaL_checkint( L, 1 ); -+ int i_id = luaL_checkinteger( L, 1 ); - playlist_t *p_playlist = vlclua_get_playlist_internal( L ); - PL_LOCK; - playlist_ViewPlay( p_playlist, NULL, -@@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua_State * L ) - - static int vlclua_playlist_delete( lua_State * L ) - { -- int i_id = luaL_checkint( L, 1 ); -+ int i_id = luaL_checkinteger( L, 1 ); - playlist_t *p_playlist = vlclua_get_playlist_internal( L ); - - PL_LOCK; -@@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_State * L ) - - static int vlclua_playlist_move( lua_State * L ) - { -- int i_item = luaL_checkint( L, 1 ); -- int i_target = luaL_checkint( L, 2 ); -+ int i_item = luaL_checkinteger( L, 1 ); -+ int i_target = luaL_checkinteger( L, 2 ); - playlist_t *p_playlist = vlclua_get_playlist_internal( L ); - PL_LOCK; - playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); -diff --git a/modules/lua/libs/stream.c b/modules/lua/libs/stream.c -index c682759838..c9713a223c 100644 ---- a/modules/lua/libs/stream.c -+++ b/modules/lua/libs/stream.c -@@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State *L ) - { - int i_read; - stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); -- int n = luaL_checkint( L, 2 ); -+ int n = luaL_checkinteger( L, 2 ); - uint8_t *p_read = malloc( n ); - if( !p_read ) return vlclua_error( L ); - -diff --git a/modules/lua/libs/volume.c b/modules/lua/libs/volume.c -index 81a6156c2a..a7dbe86465 100644 ---- a/modules/lua/libs/volume.c -+++ b/modules/lua/libs/volume.c -@@ -48,7 +48,7 @@ - static int vlclua_volume_set( lua_State *L ) - { - playlist_t *p_this = vlclua_get_playlist_internal( L ); -- int i_volume = luaL_checkint( L, 1 ); -+ int i_volume = luaL_checkinteger( L, 1 ); - if( i_volume < 0 ) - i_volume = 0; - int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); --- -2.26.2 - diff --git a/vlc.spec b/vlc.spec index c773e1e..15d1a8a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -71,6 +71,9 @@ Patch7: Switch-to-Fedora-lua-5.1.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch +# Fix build issue with recent SRT library +# Based on https://git.videolan.org/?p=vlc.git;a=commit;h=6e8d77431127c482196115a6eeb769daf56347b3 +Patch10: recent_srt_fix.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -345,6 +348,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %patch9 -p1 +%patch10 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From 15f29b1a0300b36efe2e182f9cad3464e3dae74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Fri, 27 Nov 2020 14:42:50 +0000 Subject: [PATCH 552/671] Mass rebuild for x264-0.161 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 15d1a8a..88182b0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -617,6 +617,9 @@ fi || : %changelog +* Fri Nov 27 2020 Sérgio Basto <sergio@serjux.com> - 1:3.0.12-0.3 +- Mass rebuild for x264-0.161 + * Fri Oct 30 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-0.2 - Backport fix for libnotify - Enable vlc notify From 1d6fb920c390e896a1dab193b64cfe9251e260d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Mon, 14 Dec 2020 02:49:24 +0100 Subject: [PATCH 553/671] Rebuild for dav1d SONAME bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 88182b0..9022725 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -617,6 +617,9 @@ fi || : %changelog +* Mon Dec 14 2020 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.12-0.4 +- Rebuild for dav1d SONAME bump + * Fri Nov 27 2020 Sérgio Basto <sergio@serjux.com> - 1:3.0.12-0.3 - Mass rebuild for x264-0.161 From e9cfb13edeb22163d29b104ff97296c19b77f4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Mon, 14 Dec 2020 12:16:50 +0100 Subject: [PATCH 554/671] Add patch to build with GCC 11.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- ...dd-missing-include-limits-to-modules.patch | 39 +++++++++++++++++++ vlc.spec | 6 +++ 2 files changed, 45 insertions(+) create mode 100644 0001-Add-missing-include-limits-to-modules.patch diff --git a/0001-Add-missing-include-limits-to-modules.patch b/0001-Add-missing-include-limits-to-modules.patch new file mode 100644 index 0000000..67a63ac --- /dev/null +++ b/0001-Add-missing-include-limits-to-modules.patch @@ -0,0 +1,39 @@ +From 8783290f260292ecba5aa2e3d63cad614fe9ed81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> +Date: Mon, 14 Dec 2020 03:23:52 +0100 +Subject: [PATCH] Add missing include <limits> to modules/ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +demux/adaptive/playlist/SegmentInformation.cpp + +Compilation would fail with: + +> error: 'numeric_limits' is not a member of 'std' + +without this include because of some hardening build +flags mandated on Fedora Linux. + +Fix: #25325 + +Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> +--- + modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/demux/adaptive/playlist/SegmentInformation.cpp b/modules/demux/adaptive/playlist/SegmentInformation.cpp +index c4fe204783..aacc1d7bc1 100644 +--- a/modules/demux/adaptive/playlist/SegmentInformation.cpp ++++ b/modules/demux/adaptive/playlist/SegmentInformation.cpp +@@ -34,6 +34,7 @@ + + #include <algorithm> + #include <cassert> ++#include <limits> + + using namespace adaptive::playlist; + +-- +2.29.2 + diff --git a/vlc.spec b/vlc.spec index 9022725..18d0330 100644 --- a/vlc.spec +++ b/vlc.spec @@ -74,6 +74,10 @@ Patch9: notify-don-t-depend-on-any-GTK-version.patch # Fix build issue with recent SRT library # Based on https://git.videolan.org/?p=vlc.git;a=commit;h=6e8d77431127c482196115a6eeb769daf56347b3 Patch10: recent_srt_fix.patch +# Add a missing include that would make the build fail: +# https://trac.videolan.org/vlc/ticket/25325 +# Drop next release +Patch11: 0001-Add-missing-include-limits-to-modules.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -349,6 +353,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %patch9 -p1 %patch10 -p1 +%patch11 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -619,6 +624,7 @@ fi || : %changelog * Mon Dec 14 2020 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.12-0.4 - Rebuild for dav1d SONAME bump +- Add patch to build with GCC 11.0.0 * Fri Nov 27 2020 Sérgio Basto <sergio@serjux.com> - 1:3.0.12-0.3 - Mass rebuild for x264-0.161 From 9fb2fdf0418a221d54566ba05ebe5214fece4ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Mon, 14 Dec 2020 20:02:40 +0100 Subject: [PATCH 555/671] Fix patch to build with GCC 11.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- ...dd-missing-include-limits-to-modules.patch | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/0001-Add-missing-include-limits-to-modules.patch b/0001-Add-missing-include-limits-to-modules.patch index 67a63ac..09cec85 100644 --- a/0001-Add-missing-include-limits-to-modules.patch +++ b/0001-Add-missing-include-limits-to-modules.patch @@ -1,6 +1,6 @@ -From 8783290f260292ecba5aa2e3d63cad614fe9ed81 Mon Sep 17 00:00:00 2001 +From 8e8afa27865e3781c0add1f26bc330d4d6cb92d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> -Date: Mon, 14 Dec 2020 03:23:52 +0100 +Date: Mon, 14 Dec 2020 12:54:39 +0100 Subject: [PATCH] Add missing include <limits> to modules/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -12,15 +12,13 @@ Compilation would fail with: > error: 'numeric_limits' is not a member of 'std' -without this include because of some hardening build -flags mandated on Fedora Linux. - -Fix: #25325 +without this include with GCC 11.0.0 Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 + - 1 file changed, 1 insertion(+) + modules/demux/hls/playlist/Parser.cpp | 1 + + 2 files changed, 2 insertions(+) diff --git a/modules/demux/adaptive/playlist/SegmentInformation.cpp b/modules/demux/adaptive/playlist/SegmentInformation.cpp index c4fe204783..aacc1d7bc1 100644 @@ -34,6 +32,18 @@ index c4fe204783..aacc1d7bc1 100644 using namespace adaptive::playlist; +diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp +index e2e1aaefe4..5dc889d78f 100644 +--- a/modules/demux/hls/playlist/Parser.cpp ++++ b/modules/demux/hls/playlist/Parser.cpp +@@ -42,6 +42,7 @@ + #include <map> + #include <cctype> + #include <algorithm> ++#include <limits> + + using namespace adaptive; + using namespace adaptive::playlist; -- 2.29.2 From b819f9d289f72a36341e5bb6bdcdaf4986ae5979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Mon, 14 Dec 2020 20:08:39 +0100 Subject: [PATCH 556/671] Fix patch to build with GCC 11.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> --- ...ing-include-limits-to-file-using-std.patch | 76 +++++++++++++++++++ ...dd-missing-include-limits-to-modules.patch | 49 ------------ vlc.spec | 2 +- 3 files changed, 77 insertions(+), 50 deletions(-) create mode 100644 0001-Add-missing-include-limits-to-file-using-std.patch delete mode 100644 0001-Add-missing-include-limits-to-modules.patch diff --git a/0001-Add-missing-include-limits-to-file-using-std.patch b/0001-Add-missing-include-limits-to-file-using-std.patch new file mode 100644 index 0000000..1d4f5f8 --- /dev/null +++ b/0001-Add-missing-include-limits-to-file-using-std.patch @@ -0,0 +1,76 @@ +From 804aacea64e2b83f7434efd3c11dbca2eb7fa80b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> +Date: Mon, 14 Dec 2020 12:54:39 +0100 +Subject: [PATCH] Add missing include <limits> to file using std:: +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +numeric_limits<uint64_t>::max() + +Compilation would fail with: + +> error: 'numeric_limits' is not a member of 'std' + +without this include because of some hardening build +flags mandated on Fedora Linux, with GCC 11. + +Fix: #25325 + +Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> +--- + modules/demux/adaptive/playlist/Inheritables.cpp | 1 + + modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 + + modules/demux/adaptive/playlist/SegmentTimeline.cpp | 1 + + modules/demux/hls/playlist/Parser.cpp | 1 + + modules/demux/mkv/matroska_segment.cpp | 1 + + modules/demux/mkv/mkv.cpp | 1 + + 6 files changed, 6 insertions(+) + +diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp +--- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp.orig 2020-10-27 09:16:09.000000000 +0100 ++++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp 2020-12-14 19:34:41.600005319 +0100 +@@ -34,6 +34,7 @@ + + #include <algorithm> + #include <cassert> ++#include <limits> + + using namespace adaptive::playlist; + +diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp +--- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp.orig 2020-10-27 09:16:09.000000000 +0100 ++++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp 2020-12-14 19:34:41.600005319 +0100 +@@ -42,6 +42,7 @@ + #include <map> + #include <cctype> + #include <algorithm> ++#include <limits> + + using namespace adaptive; + using namespace adaptive::playlist; +diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp +--- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp.orig 2020-10-27 09:16:09.000000000 +0100 ++++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp 2020-12-14 19:34:41.601005298 +0100 +@@ -31,6 +31,7 @@ + + #include <new> + #include <iterator> ++#include <limits> + + matroska_segment_c::matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream, KaxSegment *p_seg ) + :segment(p_seg) +diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp +--- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp.orig 2020-10-27 09:16:09.000000000 +0100 ++++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp 2020-12-14 19:34:41.601005298 +0100 +@@ -34,6 +34,7 @@ + #include "stream_io_callback.hpp" + + #include <new> ++#include <limits> + + extern "C" { + #include "../av1_unpack.h" +-- +2.29.2 + diff --git a/0001-Add-missing-include-limits-to-modules.patch b/0001-Add-missing-include-limits-to-modules.patch deleted file mode 100644 index 09cec85..0000000 --- a/0001-Add-missing-include-limits-to-modules.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 8e8afa27865e3781c0add1f26bc330d4d6cb92d6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> -Date: Mon, 14 Dec 2020 12:54:39 +0100 -Subject: [PATCH] Add missing include <limits> to modules/ -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -demux/adaptive/playlist/SegmentInformation.cpp - -Compilation would fail with: - -> error: 'numeric_limits' is not a member of 'std' - -without this include with GCC 11.0.0 - -Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> ---- - modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 + - modules/demux/hls/playlist/Parser.cpp | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/modules/demux/adaptive/playlist/SegmentInformation.cpp b/modules/demux/adaptive/playlist/SegmentInformation.cpp -index c4fe204783..aacc1d7bc1 100644 ---- a/modules/demux/adaptive/playlist/SegmentInformation.cpp -+++ b/modules/demux/adaptive/playlist/SegmentInformation.cpp -@@ -34,6 +34,7 @@ - - #include <algorithm> - #include <cassert> -+#include <limits> - - using namespace adaptive::playlist; - -diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp -index e2e1aaefe4..5dc889d78f 100644 ---- a/modules/demux/hls/playlist/Parser.cpp -+++ b/modules/demux/hls/playlist/Parser.cpp -@@ -42,6 +42,7 @@ - #include <map> - #include <cctype> - #include <algorithm> -+#include <limits> - - using namespace adaptive; - using namespace adaptive::playlist; --- -2.29.2 - diff --git a/vlc.spec b/vlc.spec index 18d0330..c511876 100644 --- a/vlc.spec +++ b/vlc.spec @@ -77,7 +77,7 @@ Patch10: recent_srt_fix.patch # Add a missing include that would make the build fail: # https://trac.videolan.org/vlc/ticket/25325 # Drop next release -Patch11: 0001-Add-missing-include-limits-to-modules.patch +Patch11: 0001-Add-missing-include-limits-to-file-using-std.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib From d0ad4ca8bfd27ee0ff61e398b27891705696ff79 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 16 Dec 2020 10:10:49 +0100 Subject: [PATCH 557/671] Update to 3.0.12 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c511876..3001a0c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12 -Release: 0.4%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Wed Dec 16 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-1 +- Update to 3.0.12 + * Mon Dec 14 2020 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.12-0.4 - Rebuild for dav1d SONAME bump - Add patch to build with GCC 11.0.0 From 0886c74f2b4fadf9a647805782ea0a5984805db0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 28 Dec 2020 11:50:04 +0100 Subject: [PATCH 558/671] Update to 3.0.12.1 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 3001a0c..f14da83 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,7 +50,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.12 +Version: 3.0.12.1 Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org @@ -622,6 +622,9 @@ fi || : %changelog +* Mon Dec 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12.1-1 +- Update to 3.0.12.1 + * Wed Dec 16 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12-1 - Update to 3.0.12 From 10423d8b7711172ec75a4982432b894f0bca58ea Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 31 Dec 2020 20:16:59 +0000 Subject: [PATCH 559/671] Rebuilt for new ffmpeg snapshot --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f14da83..ef8a06f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Thu Dec 31 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-2 +- Rebuilt for new ffmpeg snapshot + * Mon Dec 28 2020 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12.1-1 - Update to 3.0.12.1 From ed32fc0ca5ccb5e7598da31f9a00239eaf0fb4e1 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 20 Jan 2021 08:17:18 +0000 Subject: [PATCH 560/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ef8a06f..eb6d93d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Wed Jan 20 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-3 +- Rebuild + * Thu Dec 31 2020 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-2 - Rebuilt for new ffmpeg snapshot From 723aa95a7fbdf9614207e19337b2ef9173ea4ba9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 24 Jan 2021 15:42:06 +0000 Subject: [PATCH 561/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index eb6d93d..de53bc3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Sun Jan 24 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-4 +- Rebuild + * Wed Jan 20 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-3 - Rebuild From cb18748acfe7111330d0633c927268e44b79c1c5 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 4 Feb 2021 09:03:10 +0000 Subject: [PATCH 562/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Leigh Scott <leigh123linux@gmail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index de53bc3..c26974b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Thu Feb 04 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.12.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sun Jan 24 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-4 - Rebuild From 2b94e4d9e97b694fec494aa4d033e85223cd5b4a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 11 Feb 2021 21:41:35 +0100 Subject: [PATCH 563/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c26974b..a9cc40d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Thu Feb 11 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12.1-6 +- Rebuilt + * Thu Feb 04 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.12.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 6bbbaeafbf0ef167a71e438a47bd9f27b64210a3 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 2 Mar 2021 17:03:47 +0000 Subject: [PATCH 564/671] Update snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 4b4d01d..cb56ed3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-a66f141.tar.gz) = efd0bb066bf71d5fde2539e1308844d1b2e6acfe25bf128a68d8c50eda7f4a1709a92e2a28dff55f0f8dde8839867250adbb3e85cd1e36134399e61870e7707a +SHA512 (vlc-1701574.tar.gz) = 37cccc3bb65e02fae78b03cbaccd2972d9e4ee378c2930ada83374191f248e7e0e5b56b9cb2b32f5635ff274371a8b09b301e8a8d4784ee3a65b6d528d67bf49 diff --git a/vlc.spec b/vlc.spec index a9cc40d..76be12a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 a66f141b17e792bcc298c83496749ec93265ff14 +%global commit0 170157402b9c9ee5651838499549328c6715b5fe %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Tue Mar 02 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-7 +- Update snapshot + * Thu Feb 11 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.12.1-6 - Rebuilt From 060ca7a481f91b66a66017e5c6359c79cbf24e49 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Fri, 2 Apr 2021 16:35:13 +0100 Subject: [PATCH 565/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 76be12a..50c13c3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Fri Apr 02 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-8 +- rebuilt + * Tue Mar 02 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-7 - Update snapshot From 9c06e77cac4ebe321fd29fffbf52fff165b2f1d2 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 14 Apr 2021 07:32:07 +0100 Subject: [PATCH 566/671] Rebuild for new x265 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 50c13c3..1f92116 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.12.1 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Wed Apr 14 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-9 +- Rebuild for new x265 + * Fri Apr 02 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-8 - rebuilt From 6e88e390dda5d690fcf908c13bbac396f1af3a85 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 29 Apr 2021 13:03:59 +0200 Subject: [PATCH 567/671] Update to 3.0.13 --- sources | 2 +- vlc.spec | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sources b/sources index cb56ed3..540ed37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-1701574.tar.gz) = 37cccc3bb65e02fae78b03cbaccd2972d9e4ee378c2930ada83374191f248e7e0e5b56b9cb2b32f5635ff274371a8b09b301e8a8d4784ee3a65b6d528d67bf49 +SHA512 (vlc-3.0.13.tar.xz) = 0badca9d71b682b1dd6f05acab48d77baffe22e6a00be6db2a790644bab74738f9807e889fd0348af72628694b5210896638ac2cd99d0efc0e1c2cef7ab28bff diff --git a/vlc.spec b/vlc.spec index 1f92116..7bf5c4e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -%global commit0 170157402b9c9ee5651838499549328c6715b5fe -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +#global commit0 170157402b9c9ee5651838499549328c6715b5fe +#global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 %global _with_bootstrap 1 @@ -50,15 +50,15 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.12.1 -Release: 9%{?dist} +Version: 3.0.13 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz %global vlc_setup vlc-3.0-%{?commit0} %else -Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing}/vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz +Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing/}vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} %endif Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_20.patch @@ -74,10 +74,7 @@ Patch9: notify-don-t-depend-on-any-GTK-version.patch # Fix build issue with recent SRT library # Based on https://git.videolan.org/?p=vlc.git;a=commit;h=6e8d77431127c482196115a6eeb769daf56347b3 Patch10: recent_srt_fix.patch -# Add a missing include that would make the build fail: -# https://trac.videolan.org/vlc/ticket/25325 -# Drop next release -Patch11: 0001-Add-missing-include-limits-to-file-using-std.patch +Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -622,6 +619,9 @@ fi || : %changelog +* Thu Apr 29 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.13-1 +- Update to 3.0.13 + * Wed Apr 14 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.12.1-9 - Rebuild for new x265 From 5585a133ce20cab1282f07d48da12d79c0814698 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Apr 2021 00:00:19 +0200 Subject: [PATCH 568/671] Add patch --- ...-Revert-configure-ignore-too-new-SRT.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 0001-Revert-configure-ignore-too-new-SRT.patch diff --git a/0001-Revert-configure-ignore-too-new-SRT.patch b/0001-Revert-configure-ignore-too-new-SRT.patch new file mode 100644 index 0000000..7b1c9fb --- /dev/null +++ b/0001-Revert-configure-ignore-too-new-SRT.patch @@ -0,0 +1,26 @@ +From 903923d4f491c4b557ad2a9a4fd28e47975d8054 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Thu, 29 Apr 2021 23:56:35 +0200 +Subject: [PATCH] Revert "configure: ignore too new SRT" + +This reverts commit 3aad852a05d9a3b2469328cb9ea2e20b0acbce5c. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d37af9e4179e..14028f478bd0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4016,7 +4016,7 @@ AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"]) + dnl + dnl SRT plugin + dnl +-PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2 srt < 1.3.0], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT]) ++PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT]) + + EXTEND_HELP_STRING([Visualisations and Video filter plugins:]) + dnl +-- +2.30.2 + From c13272d4d91f9ac3fe872249893914ba63f4a23c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 3 May 2021 22:26:10 +0200 Subject: [PATCH 569/671] gsm is provided via ffmpeg --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7bf5c4e..d1565f0 100644 --- a/vlc.spec +++ b/vlc.spec @@ -103,7 +103,6 @@ BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} BuildRequires: fribidi-devel BuildRequires: gnutls-devel >= 1.0.17 -BuildRequires: gsm-devel BuildRequires: hostname BuildRequires: jack-audio-connection-kit-devel BuildRequires: game-music-emu-devel From ea58e78274fb2d9bac35a29994db05f7ad3cadf2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 5 May 2021 11:14:25 +0200 Subject: [PATCH 570/671] rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index d1565f0..fb3ef6c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.13 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Wed May 05 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.13-1.1 +- rebuilt + * Thu Apr 29 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.13-1 - Update to 3.0.13 From 061fe7c2ae768e51f253f74e82b52f97cbce5804 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 10 May 2021 11:44:08 +0100 Subject: [PATCH 571/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index fb3ef6c..9ae1b36 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.13 -Release: 1%{?dist}.1 +Release: 2%{?dist}.1 License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Mon May 10 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.13-2.1 +- rebuilt + * Wed May 05 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.13-1.1 - rebuilt From 0555b30e92af1688193fa38c54277cd6ea7a9511 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 11 May 2021 08:57:23 +0100 Subject: [PATCH 572/671] Update to 3.0.14 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 540ed37..3f69e46 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.13.tar.xz) = 0badca9d71b682b1dd6f05acab48d77baffe22e6a00be6db2a790644bab74738f9807e889fd0348af72628694b5210896638ac2cd99d0efc0e1c2cef7ab28bff +SHA512 (vlc-3.0.14.tar.xz) = d809ec062d5c1ce15cd0ce3bc4777b6451fe8bea372678eac84b7ea1777a9a8891de31d81e26ac651cc9ce02b99b514f1672de829410fc1ddc81cccfd41db47a diff --git a/vlc.spec b/vlc.spec index 9ae1b36..8b733c2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.13 -Release: 2%{?dist}.1 +Version: 3.0.14 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Tue May 11 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.14-1 +- Update to 3.0.14 + * Mon May 10 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.13-2.1 - rebuilt From fd16caac24c8b9bff8f46a26b46267e8a9e588ef Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sat, 12 Jun 2021 11:21:17 +0200 Subject: [PATCH 573/671] Update to 3.0.15 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 3f69e46..a6a356b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.14.tar.xz) = d809ec062d5c1ce15cd0ce3bc4777b6451fe8bea372678eac84b7ea1777a9a8891de31d81e26ac651cc9ce02b99b514f1672de829410fc1ddc81cccfd41db47a +SHA512 (vlc-3.0.15.tar.xz) = 4645d7e9cc894ddf4c1776fe15124b1c123c3860f6dceec7bc0087a37a6e98f62e35856cdb59f8759b8f4aeea766b25c9a7767b65f1be8bb9ee23c71376cd914 diff --git a/vlc.spec b/vlc.spec index 8b733c2..b54987f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,12 +50,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.14 +Version: 3.0.15 Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} -Source0: https://code.videolan.org/videolan/vlc-3.0/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz +Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz %global vlc_setup vlc-3.0-%{?commit0} %else Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing/}vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz @@ -618,6 +618,9 @@ fi || : %changelog +* Sat Jun 12 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.15-1 +- Update to 3.0.15 + * Tue May 11 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.14-1 - Update to 3.0.14 From f3beae6f8bb9746529100d457e35df5519987b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Sun, 13 Jun 2021 20:33:53 +0200 Subject: [PATCH 574/671] Rebuild for new aom --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index b54987f..c1607d1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.15 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Sun Jun 13 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.15-2 +- Rebuild for new aom + * Sat Jun 12 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.15-1 - Update to 3.0.15 From 828661b4106fe1ce33414cc5941fce83f46347fa Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 14 Jun 2021 12:41:26 +0100 Subject: [PATCH 575/671] Fix dvdread undefined macro for el7 --- ...bdvdread-6.1.2-supports-UTF-8-paths-.patch | 74 +++++++++++++++++++ vlc.spec | 2 + 2 files changed, 76 insertions(+) create mode 100644 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch diff --git a/0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch b/0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch new file mode 100644 index 0000000..84eee48 --- /dev/null +++ b/0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch @@ -0,0 +1,74 @@ +From b107d105f8489edd6deafb340c65f435ab6e1c29 Mon Sep 17 00:00:00 2001 +From: Leigh Scott <leigh123linux@gmail.com> +Date: Mon, 14 Jun 2021 12:26:09 +0100 +Subject: [PATCH] Revert "access: libdvdread 6.1.2 supports UTF-8 paths in + Windows." + +This reverts commit 02b784c0cefe6d0d36bbc3b668a7f238c7f7b3ed. +--- + modules/access/dvdnav.c | 9 --------- + modules/access/dvdread.c | 9 --------- + 2 files changed, 18 deletions(-) + +diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c +index 69abe50c8c..89fb66f11e 100644 +--- a/modules/access/dvdnav.c ++++ b/modules/access/dvdnav.c +@@ -371,14 +371,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) + goto bailout; + + /* Open dvdnav */ +-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) +- /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and +- * requires a prior conversion. +- * For non win32/os2 platforms, this is just a no-op */ + psz_path = ToLocale( psz_file ); +-#else +- psz_path = psz_file; +-#endif + #if DVDNAV_VERSION >= 60100 + dvdnav_logger_cb cbs; + cbs.pf_log = DvdNavLog; +@@ -397,10 +390,8 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) + + bailout: + free( psz_file ); +-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) + if( psz_path ) + LocaleFree( psz_path ); +-#endif + return i_ret; + } + +diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c +index 749cbd47e0..e75bef5986 100644 +--- a/modules/access/dvdread.c ++++ b/modules/access/dvdread.c +@@ -212,14 +212,7 @@ static int Open( vlc_object_t *p_this ) + } + + /* Open dvdread */ +-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) +- /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and +- * requires a prior conversion. +- * For non win32/os2 platforms, this is just a no-op */ + const char *psz_path = ToLocale( psz_file ); +-#else +- const char *psz_path = psz_file; +-#endif + #if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) + dvd_logger_cb cbs; + cbs.pf_log = DvdReadLog; +@@ -227,9 +220,7 @@ static int Open( vlc_object_t *p_this ) + #else + dvd_reader_t *p_dvdread = DVDOpen( psz_path ); + #endif +-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) + LocaleFree( psz_path ); +-#endif + if( p_dvdread == NULL ) + { + msg_Err( p_demux, "DVDRead cannot open source: %s", psz_file ); +-- +2.31.1 + diff --git a/vlc.spec b/vlc.spec index c1607d1..91b21d5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -75,6 +75,7 @@ Patch9: notify-don-t-depend-on-any-GTK-version.patch # Based on https://git.videolan.org/?p=vlc.git;a=commit;h=6e8d77431127c482196115a6eeb769daf56347b3 Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch +Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -334,6 +335,7 @@ VLC media player extras modules. %if 0%{?el7} %patch5 -p1 %patch6 -p1 +%patch12 -p1 # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c From 649c6db1b0c588fbcf43f68d28c490324a0aa502 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 14 Jun 2021 12:52:37 +0100 Subject: [PATCH 576/671] tweak last commit --- vlc.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 91b21d5..bc41fc9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -335,7 +335,6 @@ VLC media player extras modules. %if 0%{?el7} %patch5 -p1 %patch6 -p1 -%patch12 -p1 # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c @@ -352,6 +351,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %patch9 -p1 %patch10 -p1 %patch11 -p1 +%if 0%{?rhel} >= 7 +%patch12 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From 3d52a7660efe6d5a19da704d4da091018d26ace2 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 16 Jun 2021 20:40:15 +0100 Subject: [PATCH 577/671] Bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bc41fc9..9577c86 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.15 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Wed Jun 16 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.15-3 +- Bump + * Sun Jun 13 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.15-2 - Rebuild for new aom From 639363a72075464a81658f2b482874b7627da111 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 19 Jun 2021 17:25:53 +0100 Subject: [PATCH 578/671] Update to 3.0.16 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a6a356b..ed2ba8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.15.tar.xz) = 4645d7e9cc894ddf4c1776fe15124b1c123c3860f6dceec7bc0087a37a6e98f62e35856cdb59f8759b8f4aeea766b25c9a7767b65f1be8bb9ee23c71376cd914 +SHA512 (vlc-3.0.16.tar.xz) = 35cdf191071224d0cf1b5a83c00773ff87b9e5bfcf0f5523f7edd53f75b23eda6b27bb49ffa97d69a1d176b8fe4786d959aeeb00d4380beab71c9f7e6b7c7298 diff --git a/vlc.spec b/vlc.spec index 9577c86..a6033cb 100644 --- a/vlc.spec +++ b/vlc.spec @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.15 -Release: 3%{?dist} +Version: 3.0.16 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Sat Jun 19 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-1 +- Update to 3.0.16 + * Wed Jun 16 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.15-3 - Bump From 2c67a4a98c0706eee4c9fc8c4b7f006c283807f9 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 19 Jun 2021 18:01:40 +0100 Subject: [PATCH 579/671] Make aarch64 check failure non-fatal --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index a6033cb..30a63be 100644 --- a/vlc.spec +++ b/vlc.spec @@ -468,7 +468,7 @@ rm -rf %{buildroot}%{_datadir}/kde4 %if 0%{?el7} . /opt/rh/devtoolset-%{dts_ver}/enable %endif -%ifnarch %{arm} +%ifnarch %{arm} %{arm64} make check %else make check || : From b4c36b75b6e16507aa2aea58c1ede45c5ba1f01f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 30 Jun 2021 21:16:12 +0100 Subject: [PATCH 580/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 30a63be..b4fefbc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -622,6 +622,9 @@ fi || : %changelog +* Wed Jun 30 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-2 +- Rebuilt + * Sat Jun 19 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-1 - Update to 3.0.16 From 3baadf2c7c867ce7b9ab289041877c41566aa8b0 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 30 Jun 2021 21:33:04 +0100 Subject: [PATCH 581/671] Make check non-fatal --- vlc.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index b4fefbc..91aae00 100644 --- a/vlc.spec +++ b/vlc.spec @@ -468,11 +468,7 @@ rm -rf %{buildroot}%{_datadir}/kde4 %if 0%{?el7} . /opt/rh/devtoolset-%{dts_ver}/enable %endif -%ifnarch %{arm} %{arm64} -make check -%else make check || : -%endif %ldconfig_scriptlets core From 4c7bbeba46657171d4e821a761201bd05a86ee97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sun, 11 Jul 2021 02:55:32 +0100 Subject: [PATCH 582/671] Mass rebuild for x264-0.163 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 91aae00..86d470b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Sun Jul 11 2021 Sérgio Basto <sergio@serjux.com> - 1:3.0.16-3 +- Mass rebuild for x264-0.163 + * Wed Jun 30 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-2 - Rebuilt From b9e3759a147f86414a0fb23f8ea97a73f53326ca Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 3 Aug 2021 19:47:42 +0100 Subject: [PATCH 583/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Leigh Scott <leigh123linux@gmail.com> --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 86d470b..6910fb8 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Tue Aug 03 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sun Jul 11 2021 Sérgio Basto <sergio@serjux.com> - 1:3.0.16-3 - Mass rebuild for x264-0.163 From 8e9d909395fb2e3103192c92beda00116b2839d1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 19 Aug 2021 16:38:58 +0200 Subject: [PATCH 584/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6910fb8..32421f3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Thu Aug 19 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.16-5 +- Rebuilt + * Tue Aug 03 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:3.0.16-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From e953da7dad21fa420f8cd2f78b6cd17431016003 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 30 Oct 2021 21:29:45 +0100 Subject: [PATCH 585/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 32421f3..46fbea1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Sat Oct 30 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-6 +- rebuilt + * Thu Aug 19 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.16-5 - Rebuilt From 4cfe09e38260ec02ba675adce2a052f104f72abf Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 9 Nov 2021 11:51:14 +0000 Subject: [PATCH 586/671] Rebuilt for new ffmpeg snapshot --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 46fbea1..b804318 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.16 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -618,6 +618,9 @@ fi || : %changelog +* Tue Nov 09 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-7 +- Rebuilt for new ffmpeg snapshot + * Sat Oct 30 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-6 - rebuilt From 3e020fd312946ee112f5c326c02c4d71ea6d1c43 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Tue, 9 Nov 2021 12:22:21 +0000 Subject: [PATCH 587/671] fix --- ffmpeg45.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ vlc.spec | 3 +++ 2 files changed, 68 insertions(+) create mode 100644 ffmpeg45.patch diff --git a/ffmpeg45.patch b/ffmpeg45.patch new file mode 100644 index 0000000..8d76211 --- /dev/null +++ b/ffmpeg45.patch @@ -0,0 +1,65 @@ +From 21d5a1933275edb7f67d05ea62a762464e07c2cb Mon Sep 17 00:00:00 2001 +From: Alexandre Janniaux <ajanni@videolabs.io> +Date: Wed, 8 Apr 2020 15:07:15 +0200 +Subject: [PATCH] avcodec: remove deprecation warning for av*_register_all + +From doc/APIchanges: + + 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h + Deprecate use of av_register_input_format(), av_register_output_format(), + av_register_all(), av_iformat_next(), av_oformat_next(). + Add av_demuxer_iterate(), and av_muxer_iterate(). + + 2018-02-06 - 36c85d6e77 - lavc 58.10.100 - avcodec.h + Deprecate use of avcodec_register(), avcodec_register_all(), + av_codec_next(), av_register_codec_parser(), and av_parser_next(). + Add av_codec_iterate() and av_parser_iterate(). + +They are no-op since those updates. If compiling with a recent release, +just don't call av*_register_all to prevent warnings. +--- + modules/codec/avcodec/avcommon.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h +index 671cde5c81..fa06616433 100644 +--- a/modules/codec/avcodec/avcommon.h ++++ b/modules/codec/avcodec/avcommon.h +@@ -109,6 +109,7 @@ static inline void vlc_init_avutil(vlc_object_t *obj) + + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + # include <libavformat/avformat.h> ++# include <libavformat/version.h> + static inline void vlc_init_avformat(vlc_object_t *obj) + { + vlc_avcodec_lock(); +@@ -117,7 +118,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + + avformat_network_init(); + ++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) + av_register_all(); ++#endif + + vlc_avcodec_unlock(); + } +@@ -125,13 +128,16 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + + #ifdef HAVE_LIBAVCODEC_AVCODEC_H + # include <libavcodec/avcodec.h> ++# include <libavcodec/version.h> + static inline void vlc_init_avcodec(vlc_object_t *obj) + { + vlc_avcodec_lock(); + + vlc_init_avutil(obj); + ++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) + avcodec_register_all(); ++#endif + + vlc_avcodec_unlock(); + } +-- +GitLab + diff --git a/vlc.spec b/vlc.spec index b804318..10a7cfc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -77,6 +77,8 @@ Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch +Patch13: ffmpeg45.patch + BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -354,6 +356,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif +%patch13 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From d4bf359633c49fb567de1156e11bc283b9713c2f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 15 Nov 2021 11:12:14 +0000 Subject: [PATCH 588/671] Apply upstream ffmpeg fix to f36+ --- ffmpeg45.patch | 354 ++++++++++++++++++++++++++++++++++++++++++------- vlc.spec | 4 +- 2 files changed, 311 insertions(+), 47 deletions(-) diff --git a/ffmpeg45.patch b/ffmpeg45.patch index 8d76211..df4c3c8 100644 --- a/ffmpeg45.patch +++ b/ffmpeg45.patch @@ -1,65 +1,327 @@ -From 21d5a1933275edb7f67d05ea62a762464e07c2cb Mon Sep 17 00:00:00 2001 -From: Alexandre Janniaux <ajanni@videolabs.io> -Date: Wed, 8 Apr 2020 15:07:15 +0200 -Subject: [PATCH] avcodec: remove deprecation warning for av*_register_all +From cde283fef6dc1f70fd46fe891642f3e07edbc433 Mon Sep 17 00:00:00 2001 +From: Ilkka Ollakka <ileoo@videolan.org> +Date: Wed, 7 Jul 2021 12:37:58 +0000 +Subject: [PATCH 1/2] avcodec: remove use of av_init_packet as it is deprecated + in new ffmpeg major version +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -From doc/APIchanges: +av_init_packet is deprecated in new major version of ffmpeg. - 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h - Deprecate use of av_register_input_format(), av_register_output_format(), - av_register_all(), av_iformat_next(), av_oformat_next(). - Add av_demuxer_iterate(), and av_muxer_iterate(). +Also use av_packet_free instead of unref. - 2018-02-06 - 36c85d6e77 - lavc 58.10.100 - avcodec.h - Deprecate use of avcodec_register(), avcodec_register_all(), - av_codec_next(), av_register_codec_parser(), and av_parser_next(). - Add av_codec_iterate() and av_parser_iterate(). +Use av_packet_clone and AVPacket * in vlc_av_packet_t. -They are no-op since those updates. If compiling with a recent release, -just don't call av*_register_all to prevent warnings. +(cherry picked from commit 16fd46fa506424134beb53ec88be3eea1b42a221) +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> --- - modules/codec/avcodec/avcommon.h | 6 ++++++ - 1 file changed, 6 insertions(+) + modules/codec/avcodec/audio.c | 12 +++++++----- + modules/codec/avcodec/encoder.c | 25 ++++++++++++++----------- + modules/codec/avcodec/subtitle.c | 17 +++++++++++------ + modules/codec/avcodec/video.c | 30 +++++++++++++++++------------- + modules/demux/avformat/mux.c | 29 +++++++++++++++++------------ + 5 files changed, 66 insertions(+), 47 deletions(-) -diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h -index 671cde5c81..fa06616433 100644 ---- a/modules/codec/avcodec/avcommon.h -+++ b/modules/codec/avcodec/avcommon.h -@@ -109,6 +109,7 @@ static inline void vlc_init_avutil(vlc_object_t *obj) - - #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H - # include <libavformat/avformat.h> -+# include <libavformat/version.h> - static inline void vlc_init_avformat(vlc_object_t *obj) +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index eec255ae0b..8c3fa7a217 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -363,11 +363,13 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) + /* Feed in the loop as buffer could have been full on first iterations */ + if( p_block ) + { +- AVPacket pkt; +- av_init_packet( &pkt ); +- pkt.data = p_block->p_buffer; +- pkt.size = p_block->i_buffer; +- ret = avcodec_send_packet( ctx, &pkt ); ++ AVPacket *pkt = av_packet_alloc(); ++ if( !pkt ) ++ goto end; ++ pkt->data = p_block->p_buffer; ++ pkt->size = p_block->i_buffer; ++ ret = avcodec_send_packet( ctx, pkt ); ++ av_packet_free(&pkt); + if( ret == 0 ) /* Block has been consumed */ + { + /* Only set new pts from input block if it has been used, +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index b083d171f3..27af11a412 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -1061,14 +1061,14 @@ error: + typedef struct { - vlc_avcodec_lock(); -@@ -117,7 +118,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + block_t self; +- AVPacket packet; ++ AVPacket *packet; + } vlc_av_packet_t; - avformat_network_init(); - -+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) - av_register_all(); -+#endif + static void vlc_av_packet_Release(block_t *block) + { + vlc_av_packet_t *b = (void *) block; - vlc_avcodec_unlock(); +- av_packet_unref(&b->packet); ++ av_packet_free( &b->packet ); + free(b); } -@@ -125,13 +128,16 @@ static inline void vlc_init_avformat(vlc_object_t *obj) - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - # include <libavcodec/avcodec.h> -+# include <libavcodec/version.h> - static inline void vlc_init_avcodec(vlc_object_t *obj) +@@ -1089,7 +1089,7 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo + block_Init( p_block, packet->data, packet->size ); + p_block->i_nb_samples = 0; + p_block->pf_release = vlc_av_packet_Release; +- b->packet = *packet; ++ b->packet = packet; + + p_block->i_length = i_length; + p_block->i_pts = packet->pts; +@@ -1138,11 +1138,13 @@ static void check_hurry_up( encoder_sys_t *p_sys, AVFrame *frame, encoder_t *p_e + + static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame *frame ) { - vlc_avcodec_lock(); +- AVPacket av_pkt; +- av_pkt.data = NULL; +- av_pkt.size = 0; ++ AVPacket *av_pkt = av_packet_alloc(); + +- av_init_packet( &av_pkt ); ++ if( !av_pkt ) ++ { ++ av_frame_unref( frame ); ++ return NULL; ++ } + + int ret = avcodec_send_frame( p_sys->p_context, frame ); + if( frame && ret != 0 && ret != AVERROR(EAGAIN) ) +@@ -1150,18 +1152,19 @@ static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame + msg_Warn( p_enc, "cannot send one frame to encoder %d", ret ); + return NULL; + } +- ret = avcodec_receive_packet( p_sys->p_context, &av_pkt ); ++ ret = avcodec_receive_packet( p_sys->p_context, av_pkt ); + if( ret != 0 && ret != AVERROR(EAGAIN) ) + { + msg_Warn( p_enc, "cannot encode one frame" ); ++ av_packet_free( &av_pkt ); + return NULL; + } + +- block_t *p_block = vlc_av_packet_Wrap( &av_pkt, +- av_pkt.duration / p_sys->p_context->time_base.den, p_sys->p_context ); ++ block_t *p_block = vlc_av_packet_Wrap( av_pkt, ++ av_pkt->duration / p_sys->p_context->time_base.den, p_sys->p_context ); + if( unlikely(p_block == NULL) ) + { +- av_packet_unref( &av_pkt ); ++ av_packet_free( &av_pkt ); + return NULL; + } + return p_block; +diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c +index 5cac6339d6..a17ba985e1 100644 +--- a/modules/codec/avcodec/subtitle.c ++++ b/modules/codec/avcodec/subtitle.c +@@ -186,16 +186,21 @@ static subpicture_t *DecodeBlock(decoder_t *dec, block_t **block_ptr) + AVSubtitle subtitle; + memset(&subtitle, 0, sizeof(subtitle)); + +- AVPacket pkt; +- av_init_packet(&pkt); +- pkt.data = block->p_buffer; +- pkt.size = block->i_buffer; +- pkt.pts = block->i_pts; ++ AVPacket *pkt = av_packet_alloc(); ++ if(!pkt) ++ { ++ block_Release(block); ++ return NULL; ++ } ++ pkt->data = block->p_buffer; ++ pkt->size = block->i_buffer; ++ pkt->pts = block->i_pts; + + int has_subtitle = 0; + int used = avcodec_decode_subtitle2(sys->p_context, +- &subtitle, &has_subtitle, &pkt); ++ &subtitle, &has_subtitle, pkt); + ++ av_packet_free(&pkt); + if (used < 0) { + msg_Warn(dec, "cannot decode one subtitle (%zu bytes)", + block->i_buffer); +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index b99eb56e4a..e175cef3a6 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1015,14 +1015,18 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + + if( b_has_data || b_start_drain ) + { +- AVPacket pkt; +- av_init_packet( &pkt ); ++ AVPacket *pkt = av_packet_alloc(); ++ if(!pkt) ++ { ++ *error = true; ++ break; ++ } + if( b_has_data ) + { +- pkt.data = p_block->p_buffer; +- pkt.size = p_block->i_buffer; +- pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; +- pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; ++ pkt->data = p_block->p_buffer; ++ pkt->size = p_block->i_buffer; ++ pkt->pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; ++ pkt->dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; + + /* Make sure we don't reuse the same timestamps twice */ + p_block->i_pts = +@@ -1031,21 +1035,21 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + else /* start drain */ + { + /* Return delayed frames if codec has CODEC_CAP_DELAY */ +- pkt.data = NULL; +- pkt.size = 0; ++ pkt->data = NULL; ++ pkt->size = 0; + p_sys->b_draining = true; + } + + if( !p_sys->palette_sent ) + { +- uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); ++ uint8_t *pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); + if (pal) { + memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE); + p_sys->palette_sent = true; + } + } + +- ret = avcodec_send_packet(p_context, &pkt); ++ ret = avcodec_send_packet(p_context, pkt); + if( ret != 0 && ret != AVERROR(EAGAIN) ) + { + if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) +@@ -1053,11 +1057,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + msg_Err(p_dec, "avcodec_send_packet critical error"); + *error = true; + } +- av_packet_unref( &pkt ); ++ av_packet_free( &pkt ); + break; + } +- i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0; +- av_packet_unref( &pkt ); ++ i_used = ret != AVERROR(EAGAIN) ? pkt->size : 0; ++ av_packet_unref( pkt ); + } + + AVFrame *frame = av_frame_alloc(); +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 48878c712b..405a6f6933 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -341,14 +341,16 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) + block_t *p_data = block_FifoGet( p_input->p_fifo ); + int i_stream = *((int *)p_input->p_sys); + AVStream *p_stream = p_sys->oc->streams[i_stream]; +- AVPacket pkt; +- +- memset( &pkt, 0, sizeof(AVPacket) ); ++ AVPacket *pkt = av_packet_alloc(); ++ if( !pkt ) ++ { ++ block_Release( p_data ); ++ return VLC_EGENERIC; ++ } - vlc_init_avutil(obj); +- av_init_packet(&pkt); +- pkt.data = p_data->p_buffer; +- pkt.size = p_data->i_buffer; +- pkt.stream_index = i_stream; ++ pkt->data = p_data->p_buffer; ++ pkt->size = p_data->i_buffer; ++ pkt->stream_index = i_stream; -+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) - avcodec_register_all(); -+#endif + if( p_data->i_flags & BLOCK_FLAG_TYPE_I ) + { +@@ -359,29 +361,32 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) + #endif - vlc_avcodec_unlock(); + p_sys->b_write_keyframe = true; +- pkt.flags |= AV_PKT_FLAG_KEY; ++ pkt->flags |= AV_PKT_FLAG_KEY; + } + + if( p_data->i_pts > 0 ) +- pkt.pts = p_data->i_pts * p_stream->time_base.den / ++ pkt->pts = p_data->i_pts * p_stream->time_base.den / + CLOCK_FREQ / p_stream->time_base.num; + if( p_data->i_dts > 0 ) +- pkt.dts = p_data->i_dts * p_stream->time_base.den / ++ pkt->dts = p_data->i_dts * p_stream->time_base.den / + CLOCK_FREQ / p_stream->time_base.num; + + /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */ + p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den / + CLOCK_FREQ / p_stream->time_base.num ) - 1; + +- if( av_write_frame( p_sys->oc, &pkt ) < 0 ) ++ if( av_write_frame( p_sys->oc, pkt ) < 0 ) + { + msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") " + "(pkt pts: %"PRId64", dts: %"PRId64")", +- p_data->i_pts, p_data->i_dts, pkt.pts, pkt.dts ); ++ p_data->i_pts, p_data->i_dts, pkt->pts, pkt->dts ); + block_Release( p_data ); ++ av_packet_unref( pkt ); + return VLC_EGENERIC; + } + ++ ++ av_packet_unref( pkt ); + block_Release( p_data ); + return VLC_SUCCESS; } -- GitLab + +From 149141346ddb419aa7c34fb59803c1db4035ced7 Mon Sep 17 00:00:00 2001 +From: Ilkka Ollakka <ileoo@videolan.org> +Date: Fri, 18 Jun 2021 10:23:35 +0300 +Subject: [PATCH 2/2] avcodec/subtitle: stop using removed setter for pkt + timebase +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Removed from ffmpeg repo in commit 23bb78d2ea4f0e3a0835744d59708efed50abccc. + +(cherry picked from commit e7190e7a70e9701754c50348f5b6357759440657) +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +--- + modules/codec/avcodec/subtitle.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c +index a17ba985e1..d3afe4270b 100644 +--- a/modules/codec/avcodec/subtitle.c ++++ b/modules/codec/avcodec/subtitle.c +@@ -90,7 +90,9 @@ int InitSubtitleDec(vlc_object_t *obj) + context->extradata_size = 0; + context->extradata = NULL; + +-#if LIBAVFORMAT_VERSION_MICRO >= 100 ++#if LIBAVFORMAT_VERSION_MAJOR >= 59 ++ context->pkt_timebase=AV_TIME_BASE_Q; ++#elif LIBAVFORMAT_VERSION_MICRO >= 100 + av_codec_set_pkt_timebase(context, AV_TIME_BASE_Q); + #endif + +-- +GitLab + diff --git a/vlc.spec b/vlc.spec index 10a7cfc..dbea93c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -77,7 +77,7 @@ Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch -Patch13: ffmpeg45.patch +Patch13: https://code.videolan.org/videolan/vlc/-/merge_requests/895.patch#/ffmpeg45.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -356,7 +356,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif +%if 0%{?fedora} > 35 %patch13 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From 3d5a5922200b72d209049b3b82c584db6aadb4ff Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 15 Nov 2021 14:58:08 +0100 Subject: [PATCH 589/671] Update to snapshot --- vlc.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index dbea93c..ed8b4f5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,5 +1,5 @@ -#global commit0 170157402b9c9ee5651838499549328c6715b5fe -#global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global commit0 a108715f1d0f6e7c878a5b9ba01c799f08dc78f3 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 %global _with_bootstrap 1 @@ -50,13 +50,13 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.16 -Release: 7%{?dist} +Version: 3.0.17 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz -%global vlc_setup vlc-3.0-%{?commit0} +%global vlc_setup vlc-%{?commit0} %else Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing/}vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz %global vlc_setup vlc-%{version}%{?vlc_rc} @@ -623,6 +623,9 @@ fi || : %changelog +* Thu Nov 11 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-1 +- Update to 3.x snapshot + * Tue Nov 09 2021 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.16-7 - Rebuilt for new ffmpeg snapshot From 46051cf58e3e0356e73cac237e18ebe71042f83b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Nov 2021 11:13:53 +0100 Subject: [PATCH 590/671] Update patch --- ffmpeg45.patch | 133 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 125 insertions(+), 8 deletions(-) diff --git a/ffmpeg45.patch b/ffmpeg45.patch index df4c3c8..a4eaa02 100644 --- a/ffmpeg45.patch +++ b/ffmpeg45.patch @@ -1,7 +1,7 @@ -From cde283fef6dc1f70fd46fe891642f3e07edbc433 Mon Sep 17 00:00:00 2001 +From e51408a0549371efae3792aa40f5c2d992d8b4d4 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka <ileoo@videolan.org> Date: Wed, 7 Jul 2021 12:37:58 +0000 -Subject: [PATCH 1/2] avcodec: remove use of av_init_packet as it is deprecated +Subject: [PATCH 1/4] avcodec: remove use of av_init_packet as it is deprecated in new ffmpeg major version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -14,7 +14,7 @@ Also use av_packet_free instead of unref. Use av_packet_clone and AVPacket * in vlc_av_packet_t. (cherry picked from commit 16fd46fa506424134beb53ec88be3eea1b42a221) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> --- modules/codec/avcodec/audio.c | 12 +++++++----- modules/codec/avcodec/encoder.c | 25 ++++++++++++++----------- @@ -151,7 +151,7 @@ index 5cac6339d6..a17ba985e1 100644 msg_Warn(dec, "cannot decode one subtitle (%zu bytes)", block->i_buffer); diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index b99eb56e4a..e175cef3a6 100644 +index b99eb56e4a..2b1e3ad314 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -1015,14 +1015,18 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error @@ -216,7 +216,7 @@ index b99eb56e4a..e175cef3a6 100644 - i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0; - av_packet_unref( &pkt ); + i_used = ret != AVERROR(EAGAIN) ? pkt->size : 0; -+ av_packet_unref( pkt ); ++ av_packet_free( &pkt ); } AVFrame *frame = av_frame_alloc(); @@ -290,10 +290,10 @@ index 48878c712b..405a6f6933 100644 GitLab -From 149141346ddb419aa7c34fb59803c1db4035ced7 Mon Sep 17 00:00:00 2001 +From c70bb79bb84a59d2bb37ddffb4c3098f76c3f71b Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka <ileoo@videolan.org> Date: Fri, 18 Jun 2021 10:23:35 +0300 -Subject: [PATCH 2/2] avcodec/subtitle: stop using removed setter for pkt +Subject: [PATCH 2/4] avcodec/subtitle: stop using removed setter for pkt timebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -302,7 +302,7 @@ Content-Transfer-Encoding: 8bit Removed from ffmpeg repo in commit 23bb78d2ea4f0e3a0835744d59708efed50abccc. (cherry picked from commit e7190e7a70e9701754c50348f5b6357759440657) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> --- modules/codec/avcodec/subtitle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) @@ -325,3 +325,120 @@ index a17ba985e1..d3afe4270b 100644 -- GitLab + +From ab36b209ff07d5465a4958201521a9c2345fd918 Mon Sep 17 00:00:00 2001 +From: Alexandre Janniaux <ajanni@videolabs.io> +Date: Wed, 8 Apr 2020 15:07:15 +0200 +Subject: [PATCH 3/4] avcodec: remove deprecation warning for av*_register_all +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From doc/APIchanges: + + 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h + Deprecate use of av_register_input_format(), av_register_output_format(), + av_register_all(), av_iformat_next(), av_oformat_next(). + Add av_demuxer_iterate(), and av_muxer_iterate(). + + 2018-02-06 - 36c85d6e77 - lavc 58.10.100 - avcodec.h + Deprecate use of avcodec_register(), avcodec_register_all(), + av_codec_next(), av_register_codec_parser(), and av_parser_next(). + Add av_codec_iterate() and av_parser_iterate(). + +They are no-op since those updates. If compiling with a recent release, +just don't call av*_register_all to prevent warnings. + +(cherry picked from commit 21d5a1933275edb7f67d05ea62a762464e07c2cb) +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +--- + modules/codec/avcodec/avcommon.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h +index 8c8298014f..158c01e320 100644 +--- a/modules/codec/avcodec/avcommon.h ++++ b/modules/codec/avcodec/avcommon.h +@@ -97,6 +97,7 @@ static inline void vlc_init_avutil(vlc_object_t *obj) + + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + # include <libavformat/avformat.h> ++# include <libavformat/version.h> + static inline void vlc_init_avformat(vlc_object_t *obj) + { + vlc_avcodec_lock(); +@@ -105,7 +106,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + + avformat_network_init(); + ++#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) + av_register_all(); ++#endif + + vlc_avcodec_unlock(); + } +@@ -113,13 +116,16 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + + #ifdef HAVE_LIBAVCODEC_AVCODEC_H + # include <libavcodec/avcodec.h> ++# include <libavcodec/version.h> + static inline void vlc_init_avcodec(vlc_object_t *obj) + { + vlc_avcodec_lock(); + + vlc_init_avutil(obj); + ++#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) + avcodec_register_all(); ++#endif + + vlc_avcodec_unlock(); + } +-- +GitLab + + +From 8a0afbf54ba5b694deb5dcba7a63959fb222f93a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> +Date: Tue, 14 Apr 2020 19:25:07 +0300 +Subject: [PATCH 4/4] avcodec: fix flawed logic +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cannot find any codec. + +Regression from 21d5a1933275edb7f67d05ea62a762464e07c2cb. + +(cherry picked from commit 067dcd0a1974b00a92e900b0e5c976349ad13859) +Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> +--- + modules/codec/avcodec/avcommon.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h +index 158c01e320..ff5dba06c9 100644 +--- a/modules/codec/avcodec/avcommon.h ++++ b/modules/codec/avcodec/avcommon.h +@@ -106,7 +106,7 @@ static inline void vlc_init_avformat(vlc_object_t *obj) + + avformat_network_init(); + +-#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) ++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) + av_register_all(); + #endif + +@@ -123,7 +123,7 @@ static inline void vlc_init_avcodec(vlc_object_t *obj) + + vlc_init_avutil(obj); + +-#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) ++#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) + avcodec_register_all(); + #endif + +-- +GitLab + + From c008e7ebde78aacda651f80b1dfee25d3156f26b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Nov 2021 11:14:38 +0100 Subject: [PATCH 591/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index ed8b4f5..936df74 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -623,6 +623,9 @@ fi || : %changelog +* Fri Nov 19 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-2 +- Rebuilt + * Thu Nov 11 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-1 - Update to 3.x snapshot From 410c5350d95c36555413893f6261706c6ddd953e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 19 Nov 2021 11:21:34 +0100 Subject: [PATCH 592/671] Add sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index ed2ba8a..8370137 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3.0.16.tar.xz) = 35cdf191071224d0cf1b5a83c00773ff87b9e5bfcf0f5523f7edd53f75b23eda6b27bb49ffa97d69a1d176b8fe4786d959aeeb00d4380beab71c9f7e6b7c7298 +SHA512 (vlc-a108715.tar.gz) = 1c07ded8648642fb8839de59d3b410d7e7182b3f53a38bbd2db4a1b601bf5ca0d686ca3e1384ec7572f387a1801336ec268c118b50e652d8d8f56beae9c5edda From 9de2aaa93b153a3372ae387a4390df0ef1cb5fbe Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 15 Jan 2022 11:43:39 +0000 Subject: [PATCH 593/671] Update 3.x snapshot --- ffmpeg45.patch | 444 ------------------------------------------------- sources | 2 +- vlc.spec | 12 +- 3 files changed, 6 insertions(+), 452 deletions(-) delete mode 100644 ffmpeg45.patch diff --git a/ffmpeg45.patch b/ffmpeg45.patch deleted file mode 100644 index a4eaa02..0000000 --- a/ffmpeg45.patch +++ /dev/null @@ -1,444 +0,0 @@ -From e51408a0549371efae3792aa40f5c2d992d8b4d4 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka <ileoo@videolan.org> -Date: Wed, 7 Jul 2021 12:37:58 +0000 -Subject: [PATCH 1/4] avcodec: remove use of av_init_packet as it is deprecated - in new ffmpeg major version -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -av_init_packet is deprecated in new major version of ffmpeg. - -Also use av_packet_free instead of unref. - -Use av_packet_clone and AVPacket * in vlc_av_packet_t. - -(cherry picked from commit 16fd46fa506424134beb53ec88be3eea1b42a221) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> ---- - modules/codec/avcodec/audio.c | 12 +++++++----- - modules/codec/avcodec/encoder.c | 25 ++++++++++++++----------- - modules/codec/avcodec/subtitle.c | 17 +++++++++++------ - modules/codec/avcodec/video.c | 30 +++++++++++++++++------------- - modules/demux/avformat/mux.c | 29 +++++++++++++++++------------ - 5 files changed, 66 insertions(+), 47 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index eec255ae0b..8c3fa7a217 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -363,11 +363,13 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block ) - /* Feed in the loop as buffer could have been full on first iterations */ - if( p_block ) - { -- AVPacket pkt; -- av_init_packet( &pkt ); -- pkt.data = p_block->p_buffer; -- pkt.size = p_block->i_buffer; -- ret = avcodec_send_packet( ctx, &pkt ); -+ AVPacket *pkt = av_packet_alloc(); -+ if( !pkt ) -+ goto end; -+ pkt->data = p_block->p_buffer; -+ pkt->size = p_block->i_buffer; -+ ret = avcodec_send_packet( ctx, pkt ); -+ av_packet_free(&pkt); - if( ret == 0 ) /* Block has been consumed */ - { - /* Only set new pts from input block if it has been used, -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index b083d171f3..27af11a412 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -1061,14 +1061,14 @@ error: - typedef struct - { - block_t self; -- AVPacket packet; -+ AVPacket *packet; - } vlc_av_packet_t; - - static void vlc_av_packet_Release(block_t *block) - { - vlc_av_packet_t *b = (void *) block; - -- av_packet_unref(&b->packet); -+ av_packet_free( &b->packet ); - free(b); - } - -@@ -1089,7 +1089,7 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo - block_Init( p_block, packet->data, packet->size ); - p_block->i_nb_samples = 0; - p_block->pf_release = vlc_av_packet_Release; -- b->packet = *packet; -+ b->packet = packet; - - p_block->i_length = i_length; - p_block->i_pts = packet->pts; -@@ -1138,11 +1138,13 @@ static void check_hurry_up( encoder_sys_t *p_sys, AVFrame *frame, encoder_t *p_e - - static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame *frame ) - { -- AVPacket av_pkt; -- av_pkt.data = NULL; -- av_pkt.size = 0; -+ AVPacket *av_pkt = av_packet_alloc(); - -- av_init_packet( &av_pkt ); -+ if( !av_pkt ) -+ { -+ av_frame_unref( frame ); -+ return NULL; -+ } - - int ret = avcodec_send_frame( p_sys->p_context, frame ); - if( frame && ret != 0 && ret != AVERROR(EAGAIN) ) -@@ -1150,18 +1152,19 @@ static block_t *encode_avframe( encoder_t *p_enc, encoder_sys_t *p_sys, AVFrame - msg_Warn( p_enc, "cannot send one frame to encoder %d", ret ); - return NULL; - } -- ret = avcodec_receive_packet( p_sys->p_context, &av_pkt ); -+ ret = avcodec_receive_packet( p_sys->p_context, av_pkt ); - if( ret != 0 && ret != AVERROR(EAGAIN) ) - { - msg_Warn( p_enc, "cannot encode one frame" ); -+ av_packet_free( &av_pkt ); - return NULL; - } - -- block_t *p_block = vlc_av_packet_Wrap( &av_pkt, -- av_pkt.duration / p_sys->p_context->time_base.den, p_sys->p_context ); -+ block_t *p_block = vlc_av_packet_Wrap( av_pkt, -+ av_pkt->duration / p_sys->p_context->time_base.den, p_sys->p_context ); - if( unlikely(p_block == NULL) ) - { -- av_packet_unref( &av_pkt ); -+ av_packet_free( &av_pkt ); - return NULL; - } - return p_block; -diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c -index 5cac6339d6..a17ba985e1 100644 ---- a/modules/codec/avcodec/subtitle.c -+++ b/modules/codec/avcodec/subtitle.c -@@ -186,16 +186,21 @@ static subpicture_t *DecodeBlock(decoder_t *dec, block_t **block_ptr) - AVSubtitle subtitle; - memset(&subtitle, 0, sizeof(subtitle)); - -- AVPacket pkt; -- av_init_packet(&pkt); -- pkt.data = block->p_buffer; -- pkt.size = block->i_buffer; -- pkt.pts = block->i_pts; -+ AVPacket *pkt = av_packet_alloc(); -+ if(!pkt) -+ { -+ block_Release(block); -+ return NULL; -+ } -+ pkt->data = block->p_buffer; -+ pkt->size = block->i_buffer; -+ pkt->pts = block->i_pts; - - int has_subtitle = 0; - int used = avcodec_decode_subtitle2(sys->p_context, -- &subtitle, &has_subtitle, &pkt); -+ &subtitle, &has_subtitle, pkt); - -+ av_packet_free(&pkt); - if (used < 0) { - msg_Warn(dec, "cannot decode one subtitle (%zu bytes)", - block->i_buffer); -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index b99eb56e4a..2b1e3ad314 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1015,14 +1015,18 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - - if( b_has_data || b_start_drain ) - { -- AVPacket pkt; -- av_init_packet( &pkt ); -+ AVPacket *pkt = av_packet_alloc(); -+ if(!pkt) -+ { -+ *error = true; -+ break; -+ } - if( b_has_data ) - { -- pkt.data = p_block->p_buffer; -- pkt.size = p_block->i_buffer; -- pkt.pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; -- pkt.dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; -+ pkt->data = p_block->p_buffer; -+ pkt->size = p_block->i_buffer; -+ pkt->pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : AV_NOPTS_VALUE; -+ pkt->dts = p_block->i_dts > VLC_TS_INVALID ? p_block->i_dts : AV_NOPTS_VALUE; - - /* Make sure we don't reuse the same timestamps twice */ - p_block->i_pts = -@@ -1031,21 +1035,21 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - else /* start drain */ - { - /* Return delayed frames if codec has CODEC_CAP_DELAY */ -- pkt.data = NULL; -- pkt.size = 0; -+ pkt->data = NULL; -+ pkt->size = 0; - p_sys->b_draining = true; - } - - if( !p_sys->palette_sent ) - { -- uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); -+ uint8_t *pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); - if (pal) { - memcpy(pal, p_dec->fmt_in.video.p_palette->palette, AVPALETTE_SIZE); - p_sys->palette_sent = true; - } - } - -- ret = avcodec_send_packet(p_context, &pkt); -+ ret = avcodec_send_packet(p_context, pkt); - if( ret != 0 && ret != AVERROR(EAGAIN) ) - { - if (ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL)) -@@ -1053,11 +1057,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - msg_Err(p_dec, "avcodec_send_packet critical error"); - *error = true; - } -- av_packet_unref( &pkt ); -+ av_packet_free( &pkt ); - break; - } -- i_used = ret != AVERROR(EAGAIN) ? pkt.size : 0; -- av_packet_unref( &pkt ); -+ i_used = ret != AVERROR(EAGAIN) ? pkt->size : 0; -+ av_packet_free( &pkt ); - } - - AVFrame *frame = av_frame_alloc(); -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 48878c712b..405a6f6933 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -341,14 +341,16 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - block_t *p_data = block_FifoGet( p_input->p_fifo ); - int i_stream = *((int *)p_input->p_sys); - AVStream *p_stream = p_sys->oc->streams[i_stream]; -- AVPacket pkt; -- -- memset( &pkt, 0, sizeof(AVPacket) ); -+ AVPacket *pkt = av_packet_alloc(); -+ if( !pkt ) -+ { -+ block_Release( p_data ); -+ return VLC_EGENERIC; -+ } - -- av_init_packet(&pkt); -- pkt.data = p_data->p_buffer; -- pkt.size = p_data->i_buffer; -- pkt.stream_index = i_stream; -+ pkt->data = p_data->p_buffer; -+ pkt->size = p_data->i_buffer; -+ pkt->stream_index = i_stream; - - if( p_data->i_flags & BLOCK_FLAG_TYPE_I ) - { -@@ -359,29 +361,32 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - #endif - - p_sys->b_write_keyframe = true; -- pkt.flags |= AV_PKT_FLAG_KEY; -+ pkt->flags |= AV_PKT_FLAG_KEY; - } - - if( p_data->i_pts > 0 ) -- pkt.pts = p_data->i_pts * p_stream->time_base.den / -+ pkt->pts = p_data->i_pts * p_stream->time_base.den / - CLOCK_FREQ / p_stream->time_base.num; - if( p_data->i_dts > 0 ) -- pkt.dts = p_data->i_dts * p_stream->time_base.den / -+ pkt->dts = p_data->i_dts * p_stream->time_base.den / - CLOCK_FREQ / p_stream->time_base.num; - - /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */ - p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den / - CLOCK_FREQ / p_stream->time_base.num ) - 1; - -- if( av_write_frame( p_sys->oc, &pkt ) < 0 ) -+ if( av_write_frame( p_sys->oc, pkt ) < 0 ) - { - msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") " - "(pkt pts: %"PRId64", dts: %"PRId64")", -- p_data->i_pts, p_data->i_dts, pkt.pts, pkt.dts ); -+ p_data->i_pts, p_data->i_dts, pkt->pts, pkt->dts ); - block_Release( p_data ); -+ av_packet_unref( pkt ); - return VLC_EGENERIC; - } - -+ -+ av_packet_unref( pkt ); - block_Release( p_data ); - return VLC_SUCCESS; - } --- -GitLab - - -From c70bb79bb84a59d2bb37ddffb4c3098f76c3f71b Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka <ileoo@videolan.org> -Date: Fri, 18 Jun 2021 10:23:35 +0300 -Subject: [PATCH 2/4] avcodec/subtitle: stop using removed setter for pkt - timebase -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Removed from ffmpeg repo in commit 23bb78d2ea4f0e3a0835744d59708efed50abccc. - -(cherry picked from commit e7190e7a70e9701754c50348f5b6357759440657) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> ---- - modules/codec/avcodec/subtitle.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c -index a17ba985e1..d3afe4270b 100644 ---- a/modules/codec/avcodec/subtitle.c -+++ b/modules/codec/avcodec/subtitle.c -@@ -90,7 +90,9 @@ int InitSubtitleDec(vlc_object_t *obj) - context->extradata_size = 0; - context->extradata = NULL; - --#if LIBAVFORMAT_VERSION_MICRO >= 100 -+#if LIBAVFORMAT_VERSION_MAJOR >= 59 -+ context->pkt_timebase=AV_TIME_BASE_Q; -+#elif LIBAVFORMAT_VERSION_MICRO >= 100 - av_codec_set_pkt_timebase(context, AV_TIME_BASE_Q); - #endif - --- -GitLab - - -From ab36b209ff07d5465a4958201521a9c2345fd918 Mon Sep 17 00:00:00 2001 -From: Alexandre Janniaux <ajanni@videolabs.io> -Date: Wed, 8 Apr 2020 15:07:15 +0200 -Subject: [PATCH 3/4] avcodec: remove deprecation warning for av*_register_all -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From doc/APIchanges: - - 2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h - Deprecate use of av_register_input_format(), av_register_output_format(), - av_register_all(), av_iformat_next(), av_oformat_next(). - Add av_demuxer_iterate(), and av_muxer_iterate(). - - 2018-02-06 - 36c85d6e77 - lavc 58.10.100 - avcodec.h - Deprecate use of avcodec_register(), avcodec_register_all(), - av_codec_next(), av_register_codec_parser(), and av_parser_next(). - Add av_codec_iterate() and av_parser_iterate(). - -They are no-op since those updates. If compiling with a recent release, -just don't call av*_register_all to prevent warnings. - -(cherry picked from commit 21d5a1933275edb7f67d05ea62a762464e07c2cb) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> ---- - modules/codec/avcodec/avcommon.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h -index 8c8298014f..158c01e320 100644 ---- a/modules/codec/avcodec/avcommon.h -+++ b/modules/codec/avcodec/avcommon.h -@@ -97,6 +97,7 @@ static inline void vlc_init_avutil(vlc_object_t *obj) - - #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H - # include <libavformat/avformat.h> -+# include <libavformat/version.h> - static inline void vlc_init_avformat(vlc_object_t *obj) - { - vlc_avcodec_lock(); -@@ -105,7 +106,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj) - - avformat_network_init(); - -+#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) - av_register_all(); -+#endif - - vlc_avcodec_unlock(); - } -@@ -113,13 +116,16 @@ static inline void vlc_init_avformat(vlc_object_t *obj) - - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - # include <libavcodec/avcodec.h> -+# include <libavcodec/version.h> - static inline void vlc_init_avcodec(vlc_object_t *obj) - { - vlc_avcodec_lock(); - - vlc_init_avutil(obj); - -+#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) - avcodec_register_all(); -+#endif - - vlc_avcodec_unlock(); - } --- -GitLab - - -From 8a0afbf54ba5b694deb5dcba7a63959fb222f93a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> -Date: Tue, 14 Apr 2020 19:25:07 +0300 -Subject: [PATCH 4/4] avcodec: fix flawed logic -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Cannot find any codec. - -Regression from 21d5a1933275edb7f67d05ea62a762464e07c2cb. - -(cherry picked from commit 067dcd0a1974b00a92e900b0e5c976349ad13859) -Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> ---- - modules/codec/avcodec/avcommon.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h -index 158c01e320..ff5dba06c9 100644 ---- a/modules/codec/avcodec/avcommon.h -+++ b/modules/codec/avcodec/avcommon.h -@@ -106,7 +106,7 @@ static inline void vlc_init_avformat(vlc_object_t *obj) - - avformat_network_init(); - --#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) -+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)) - av_register_all(); - #endif - -@@ -123,7 +123,7 @@ static inline void vlc_init_avcodec(vlc_object_t *obj) - - vlc_init_avutil(obj); - --#if (LIBAVFORMAT_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) -+#if (LIBAVFORMAT_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)) - avcodec_register_all(); - #endif - --- -GitLab - - diff --git a/sources b/sources index 8370137..954b6a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-a108715.tar.gz) = 1c07ded8648642fb8839de59d3b410d7e7182b3f53a38bbd2db4a1b601bf5ca0d686ca3e1384ec7572f387a1801336ec268c118b50e652d8d8f56beae9c5edda +SHA512 (vlc-584bf4f.tar.gz) = 1a71b37821c63efe120d71aa54ec5630320c03457b7bdd23bbef7c3cb430fd4a4234c18abad888d65a57e7b099cd130519eaa28de90400b1beaa861249b135d2 diff --git a/vlc.spec b/vlc.spec index 936df74..647c06a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 a108715f1d0f6e7c878a5b9ba01c799f08dc78f3 +%global commit0 584bf4f6414daf73adba01fd10f7b0aafdc1330d %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -77,8 +77,6 @@ Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch -Patch13: https://code.videolan.org/videolan/vlc/-/merge_requests/895.patch#/ffmpeg45.patch - BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: fontpackages-devel @@ -356,9 +354,6 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif -%if 0%{?fedora} > 35 -%patch13 -p1 -%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -623,6 +618,9 @@ fi || : %changelog +* Sat Jan 15 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17-3 +- Update 3.x snapshot + * Fri Nov 19 2021 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-2 - Rebuilt From 5a5f6fbaf04a427a5026f4b4f5312e79136c39a5 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 15 Jan 2022 13:08:17 +0000 Subject: [PATCH 594/671] Fix build with new live555 --- ...f.-from-getConnectionEndpointAddress.patch | 50 +++++++++++++++++++ vlc.spec | 5 ++ 2 files changed, 55 insertions(+) create mode 100644 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch diff --git a/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch b/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch new file mode 100644 index 0000000..a4dca5c --- /dev/null +++ b/0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch @@ -0,0 +1,50 @@ +From 94845266b705dc9de7921408531b9d7704f4458f Mon Sep 17 00:00:00 2001 +From: Dominic Mayers <dominic.mayers@meditationstudies.org> +Date: Sun, 28 Mar 2021 04:37:54 -0400 +Subject: [PATCH] Get addr by ref. from getConnectionEndpointAddress. + +Fixes issue #25473 in code.videolan.org. The maintainers of live555 changed +connectionEndpointAddresss to getConnectionEndpointAddress, which now provides +the address value by reference. Before, connectionEndpointAddresss returned +the value. So, in modules/access/live555.cpp, we must first get the value and +then pass it to IsMulticastAddress. The code will not compile with the recent +live555 unless we also modify modules/access/Makefile.am - a different patch. +--- + modules/access/live555.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp +index 01c535ca5b..95e15e35d9 100644 +--- a/modules/access/live555.cpp ++++ b/modules/access/live555.cpp +@@ -60,6 +60,7 @@ + #include <liveMedia.hh> + #include <liveMedia_version.hh> + #include <Base64.hh> ++#include <NetAddress.hh> + + extern "C" { + #include "../access/mms/asf.h" /* Who said ugly ? */ +@@ -727,7 +728,8 @@ static int SessionsSetup( demux_t *p_demux ) + unsigned const thresh = 200000; /* RTP reorder threshold .2 second (default .1) */ + const char *p_sess_lang = NULL; + const char *p_lang; +- ++ struct sockaddr_storage addr; ++ + b_rtsp_tcp = var_CreateGetBool( p_demux, "rtsp-tcp" ) || + var_GetBool( p_demux, "rtsp-http" ); + i_client_port = var_InheritInteger( p_demux, "rtp-client-port" ); +@@ -850,7 +852,8 @@ static int SessionsSetup( demux_t *p_demux ) + if( !p_sys->b_multicast ) + { + /* We need different rollover behaviour for multicast */ +- p_sys->b_multicast = IsMulticastAddress( sub->connectionEndpointAddress() ); ++ sub->getConnectionEndpointAddress(addr); ++ p_sys->b_multicast = IsMulticastAddress( addr ); + } + + tk = (live_track_t*)malloc( sizeof( live_track_t ) ); +-- +2.25.1 + diff --git a/vlc.spec b/vlc.spec index 647c06a..024fd60 100644 --- a/vlc.spec +++ b/vlc.spec @@ -76,6 +76,8 @@ Patch9: notify-don-t-depend-on-any-GTK-version.patch Patch10: recent_srt_fix.patch Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch +# https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 +Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -354,6 +356,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif +%if 0%{?fedora} > 35 +%patch13 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From b2e2ca70f6c7d0554ba043a9f1b640ff190ed113 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jan 2022 17:50:45 +0100 Subject: [PATCH 595/671] Add WIP remaining patch for FFmpeg-5.0 --- 1245.patch | 382 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 382 insertions(+) create mode 100644 1245.patch diff --git a/1245.patch b/1245.patch new file mode 100644 index 0000000..d4bb33d --- /dev/null +++ b/1245.patch @@ -0,0 +1,382 @@ +From dbf942baa1169affbb32094cbdeecee488971a13 Mon Sep 17 00:00:00 2001 +From: Romain Vimont <rom1v@videolabs.io> +Date: Tue, 18 Jan 2022 15:06:28 +0100 +Subject: [PATCH 1/8] avcodec: use AVFrame.pts + +> Decoders now export the frame timestamp as AVFrame.pts. It was +> previously exported as AVFrame.pkt_pts, which is now deprecated. + +Refs ffmpeg/32c8359093d1ff4f45ed19518b449b3ac3769d27 (deprecation) +Refs ffmpeg/6e30b35b85b81c802e52a1078ec7a3097e353c6d (removal) +--- + modules/codec/avcodec/video.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 2b1e3ad314..c7da048f86 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1114,14 +1114,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + } + + /* Compute the PTS */ +-#ifdef FF_API_PKT_PTS + mtime_t i_pts = frame->pts; +-#else +- mtime_t i_pts = frame->pkt_pts; +-#endif +- if (i_pts == AV_NOPTS_VALUE ) +- i_pts = frame->pkt_dts; +- + if( i_pts == AV_NOPTS_VALUE ) + i_pts = date_Get( &p_sys->pts ); + +-- +GitLab + + +From c0e2450a6ce557f26a44c2da0b7c2ac86984183d Mon Sep 17 00:00:00 2001 +From: Romain Vimont <rom1v@videolabs.io> +Date: Tue, 18 Jan 2022 15:08:38 +0100 +Subject: [PATCH 2/8] avcodec: remove thread_safe_callbacks from API 60 + +In current FFmpeg 5.0 (API 59), we must still set the variable, and it +is already deprecated, so we can't get rid of the deprecation warning. + +ffmpeg/a83098ab03a47179d54a9b9c8bcefc81b9c6aafd (deprecation) +ffmpeg/54e5d21acabb452e5680de5db3bf7567d351d68e (doc) +--- + modules/codec/avcodec/video.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index c7da048f86..21a8a6be50 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -573,7 +573,9 @@ int InitVideoDec( vlc_object_t *obj ) + i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); + msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); + p_context->thread_count = i_thread_count; ++#if LIBAVCODEC_VERSION_MAJOR < 60 + p_context->thread_safe_callbacks = true; ++#endif + + switch( p_codec->id ) + { +-- +GitLab + + +From d24ba02fe8820fa2ba24decee433f52c04fac543 Mon Sep 17 00:00:00 2001 +From: Romain Vimont <rom1v@videolabs.io> +Date: Tue, 18 Jan 2022 15:12:26 +0100 +Subject: [PATCH 3/8] avcodec: replace removed FMT_VAAPI_VLD enum value + +Replace AV_PIX_FMT_VAAPI_VLD by AV_PIX_FMT_VAAPI. + +ffmpeg/9f8e57efe4400ca86352277873792792279c3b15 (deprecation) +ffmpeg/ad524cb9eeb298f7a60d923094fbebb1fda7e0e3 (removal) +--- + modules/codec/avcodec/va.c | 2 +- + modules/codec/avcodec/vaapi.c | 4 ++-- + modules/codec/avcodec/video.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c +index 05831232d2..beedcc6027 100644 +--- a/modules/codec/avcodec/va.c ++++ b/modules/codec/avcodec/va.c +@@ -37,7 +37,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt) + * fatal, especially not if a software format. */ + switch (hwfmt) + { +- case AV_PIX_FMT_VAAPI_VLD: ++ case AV_PIX_FMT_VAAPI: + switch (swfmt) + { + case AV_PIX_FMT_YUVJ420P: +diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c +index 35e6c47263..3675d2fc79 100644 +--- a/modules/codec/avcodec/vaapi.c ++++ b/modules/codec/avcodec/vaapi.c +@@ -154,7 +154,7 @@ static void Delete(vlc_va_t *va, void **hwctx) + static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt, + const es_format_t *fmt, picture_sys_t *p_sys) + { +- if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys == NULL) ++ if (pix_fmt != AV_PIX_FMT_VAAPI || p_sys == NULL) + return VLC_EGENERIC; + + (void) fmt; +@@ -263,7 +263,7 @@ static void DeleteDRM(vlc_va_t *va, void **hwctx) + static int CreateDRM(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt, + const es_format_t *fmt, picture_sys_t *p_sys) + { +- if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys) ++ if (pix_fmt != AV_PIX_FMT_VAAPI || p_sys) + return VLC_EGENERIC; + + (void) fmt; +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 21a8a6be50..199af50c6f 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1613,7 +1613,7 @@ no_reuse: + #endif + AV_PIX_FMT_DXVA2_VLD, + #endif +- AV_PIX_FMT_VAAPI_VLD, ++ AV_PIX_FMT_VAAPI, + #if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) + AV_PIX_FMT_VDPAU, + #endif +-- +GitLab + + +From abb9e9a21d9a6d4c952101e45a70182a37fe855e Mon Sep 17 00:00:00 2001 +From: Romain Vimont <rom1v@videolabs.io> +Date: Tue, 18 Jan 2022 15:16:39 +0100 +Subject: [PATCH 4/8] avcodec: adapt AVCodec API constification + +Refs ffmpeg/626535f6a169e2d821b969e0ea77125ba7482113 +--- + modules/codec/avcodec/encoder.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index c10f44c0c2..46573b17c9 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -93,7 +93,7 @@ struct encoder_sys_t + /* + * libavcodec properties + */ +- AVCodec *p_codec; ++ const AVCodec *p_codec; + AVCodecContext *p_context; + + /* +@@ -234,7 +234,7 @@ static const int DEFAULT_ALIGN = 0; + /***************************************************************************** + * InitVideoEnc: probe the encoder + *****************************************************************************/ +-static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, AVCodec *p_codec ) ++static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, const AVCodec *p_codec ) + { + /* if we don't have i_frame_rate_base, we are probing and just checking if we can find codec + * so set fps to requested fps if asked by user or input fps is availabled */ +@@ -296,7 +296,7 @@ int InitVideoEnc( vlc_object_t *p_this ) + encoder_t *p_enc = (encoder_t *)p_this; + encoder_sys_t *p_sys; + AVCodecContext *p_context; +- AVCodec *p_codec = NULL; ++ const AVCodec *p_codec = NULL; + unsigned i_codec_id; + const char *psz_namecodec; + float f_val; +-- +GitLab + + +From 83eb99de2bd0a14cfe561106c007bf6e385881c1 Mon Sep 17 00:00:00 2001 +From: Ilkka Ollakka <ileoo@videolan.org> +Date: Fri, 18 Jun 2021 10:08:44 +0300 +Subject: [PATCH 5/8] avcodec: move picture type to use sidedata on encoding + +Sidedata AV_PKT_DATA_QUALITY_STATS has been present since 2015 on +version 56.51.100. Also previous coded_frame->pict_type doesn't seem to +be present anymore in ffmpeg master. + +(cherry picked from commit 8ed4f2a7a2dbc9522c3feebb39b2e4ccc7bf5d24) + +Refs ffmpeg/11bc79089378a5ec00547d0f85bc152afdf30dfa +--- + modules/codec/avcodec/encoder.c | 44 +++++++++++++++++---------------- + 1 file changed, 23 insertions(+), 21 deletions(-) + +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index 46573b17c9..5ea65de787 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -1101,6 +1101,29 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo + p_block->i_pts = p_block->i_pts * CLOCK_FREQ * context->time_base.num / context->time_base.den; + p_block->i_dts = p_block->i_dts * CLOCK_FREQ * context->time_base.num / context->time_base.den; + ++ uint8_t *av_packet_sidedata = av_packet_get_side_data(packet, AV_PKT_DATA_QUALITY_STATS, NULL); ++ if( av_packet_sidedata ) ++ { ++ switch ( av_packet_sidedata[4] ) ++ { ++ case AV_PICTURE_TYPE_I: ++ case AV_PICTURE_TYPE_SI: ++ p_block->i_flags |= BLOCK_FLAG_TYPE_I; ++ break; ++ case AV_PICTURE_TYPE_P: ++ case AV_PICTURE_TYPE_SP: ++ p_block->i_flags |= BLOCK_FLAG_TYPE_P; ++ break; ++ case AV_PICTURE_TYPE_B: ++ case AV_PICTURE_TYPE_BI: ++ p_block->i_flags |= BLOCK_FLAG_TYPE_B; ++ break; ++ default: ++ p_block->i_flags |= BLOCK_FLAG_TYPE_PB; ++ } ++ ++ } ++ + return p_block; + } + +@@ -1234,27 +1257,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) + + block_t *p_block = encode_avframe( p_enc, p_sys, frame ); + +- if( p_block ) +- { +- switch ( p_sys->p_context->coded_frame->pict_type ) +- { +- case AV_PICTURE_TYPE_I: +- case AV_PICTURE_TYPE_SI: +- p_block->i_flags |= BLOCK_FLAG_TYPE_I; +- break; +- case AV_PICTURE_TYPE_P: +- case AV_PICTURE_TYPE_SP: +- p_block->i_flags |= BLOCK_FLAG_TYPE_P; +- break; +- case AV_PICTURE_TYPE_B: +- case AV_PICTURE_TYPE_BI: +- p_block->i_flags |= BLOCK_FLAG_TYPE_B; +- break; +- default: +- p_block->i_flags |= BLOCK_FLAG_TYPE_PB; +- } +- } +- + return p_block; + } + +-- +GitLab + + +From de270df11646414bc4173e1f890492b6887d98ee Mon Sep 17 00:00:00 2001 +From: Romain Vimont <rom1v@videolabs.io> +Date: Tue, 18 Jan 2022 15:43:27 +0100 +Subject: [PATCH 6/8] avformat: adapt AVOutputFormat API constification + +Refs ffmpeg/56450a0ee4fdda160f4039fc2ae33edfd27765c9 +--- + modules/demux/avformat/mux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index 0b00640baf..ff1a5e45ee 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -86,7 +86,7 @@ static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, + *****************************************************************************/ + int avformat_OpenMux( vlc_object_t *p_this ) + { +- AVOutputFormat *file_oformat; ++ const AVOutputFormat *file_oformat; + sout_mux_t *p_mux = (sout_mux_t*)p_this; + bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); + +-- +GitLab + + +From 657cadbbef00ec9c38528c5948331bb2a0448df3 Mon Sep 17 00:00:00 2001 +From: Mehdi Sabwat <mehdisabwat@gmail.com> +Date: Thu, 9 Apr 2020 21:59:56 +0200 +Subject: [PATCH 7/8] avformat: add support for url field in AvFormatContext + +Since Jan 21, 2018 filename field was deprecated in favor +of `url` which now has no length restrictions. + +From doc/APIChanges: +``` +2018-01-28 - ea3672b7d6 - lavf 58.7.100 - avformat.h + Deprecate AVFormatContext filename field which had limited length, use the + new dynamically allocated url field instead. +``` + +The URL field is freed by libavformat in avformat_free_context() in +avformat_CloseMux(). + +Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io> +(cherry picked from commit a2ce2e3a8436845378af3b1828f2bb0fa0f4a268) + +Refs ffmpeg/30f7021aa0be2c978aefb73894b643c9bafbf51c +--- + modules/demux/avformat/mux.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index ff1a5e45ee..ffff7bee83 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -90,9 +90,12 @@ int avformat_OpenMux( vlc_object_t *p_this ) + sout_mux_t *p_mux = (sout_mux_t*)p_this; + bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); + ++#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ ++ && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 7, 100)) ) + if( dummy && strlen(p_mux->p_access->psz_path) + >= sizeof (((AVFormatContext *)NULL)->filename) ) + return VLC_EGENERIC; ++#endif + + msg_Dbg( p_mux, "using %s %s", AVPROVIDER(LIBAVFORMAT), LIBAVFORMAT_IDENT ); + +@@ -127,7 +130,12 @@ int avformat_OpenMux( vlc_object_t *p_this ) + p_sys->oc->oformat = file_oformat; + /* If we use dummy access, let avformat write output */ + if( dummy ) ++#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ ++ && (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 7, 100)) ) ++ p_sys->oc->url = av_strdup(p_mux->p_access->psz_path); ++#else + strcpy( p_sys->oc->filename, p_mux->p_access->psz_path ); ++#endif + + /* Create I/O wrapper */ + p_sys->io_buffer_size = 10 * 1024 * 1024; /* FIXME */ +-- +GitLab + + +From b42e6cb9c82a74980c7c062b0ee6e07ae51d32af Mon Sep 17 00:00:00 2001 +From: Ilkka Ollakka <ileoo@videolan.org> +Date: Fri, 18 Jun 2021 10:31:00 +0300 +Subject: [PATCH 8/8] avformat: remove pts hack from demuxing + +pstream->cur_dts is no longer available from libavformat + +(cherry picked from commit c2ba623f0ad425e7743fca0bdc251d5bc9289e77) + +Refs ffmpeg/591b88e6787c4e678237f02a50421d101abd25c2 +--- + modules/demux/avformat/mux.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c +index ffff7bee83..8dd8c2f7e6 100644 +--- a/modules/demux/avformat/mux.c ++++ b/modules/demux/avformat/mux.c +@@ -379,10 +379,6 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) + pkt->dts = p_data->i_dts * p_stream->time_base.den / + CLOCK_FREQ / p_stream->time_base.num; + +- /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */ +- p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den / +- CLOCK_FREQ / p_stream->time_base.num ) - 1; +- + if( av_write_frame( p_sys->oc, pkt ) < 0 ) + { + msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") " +-- +GitLab + From 0d3efe4b945a79b5e0c1feac9f5f3c15ff08728d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jan 2022 17:50:51 +0100 Subject: [PATCH 596/671] Apply patch --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 024fd60..978c350 100644 --- a/vlc.spec +++ b/vlc.spec @@ -78,6 +78,7 @@ Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch # https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch +Patch14: https://code.videolan.org/videolan/vlc/-/merge_requests/1245.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -358,6 +359,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %if 0%{?fedora} > 35 %patch13 -p1 +%patch14 -p1 %endif %{?_with_bootstrap: From 224705741e9b94d65110d9df88261f241f4c1fb1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 18 Jan 2022 17:51:06 +0100 Subject: [PATCH 597/671] Bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 978c350..ae97266 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -625,6 +625,9 @@ fi || : %changelog +* Tue Jan 18 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-4 +- Bump + * Sat Jan 15 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17-3 - Update 3.x snapshot From 43434e55afa766c0198bc81d3423d0bf3375f830 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 19 Jan 2022 01:10:07 +0000 Subject: [PATCH 598/671] fix --- 1244.patch | 259 +++++++++++++++++++++++++++++++++++++++ Remove_legacy_caca.patch | 98 +++++++++++++++ vlc.spec | 5 + 3 files changed, 362 insertions(+) create mode 100644 1244.patch create mode 100644 Remove_legacy_caca.patch diff --git a/1244.patch b/1244.patch new file mode 100644 index 0000000..f73550b --- /dev/null +++ b/1244.patch @@ -0,0 +1,259 @@ +From 110d69c8245bb2bc1f0cf183dcdd6ba636973bfc Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.dev> +Date: Tue, 18 Jan 2022 16:47:22 +0100 +Subject: [PATCH 1/4] Revert "opengl: vout_helper: use pl_gpu_dummy for + shaders" + +This reverts commit 2437484d7684a4661048df1e095484a276bbea0b. + +The referenced commit is not a good way of fixing the issue described in +its commit message. Attaching a dummy GPU to the pl_shader makes the +shader think a GPU is actually available, and can lead to e.g. the use +of a dither texture (which VLC has no mapping code for, and would thus +result in a shader compilation error). + +All of the queried limits are also irrelevant for the way we use shaders +in this code, since they only affect GPU resources (which we can't use) +or texture sampling (which we don't use). + +Fixes #26503 by removing the conflicting code +--- + modules/video_output/opengl/converter.h | 1 - + modules/video_output/opengl/vout_helper.c | 78 +---------------------- + 2 files changed, 2 insertions(+), 77 deletions(-) + +diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h +index f8f0c12024..b69807f8cd 100644 +--- a/modules/video_output/opengl/converter.h ++++ b/modules/video_output/opengl/converter.h +@@ -340,7 +340,6 @@ struct opengl_tex_converter_t + bool yuv_color; + GLfloat yuv_coefficients[16]; + +- const struct pl_gpu *pl_gpu; + struct pl_shader *pl_sh; + const struct pl_shader_res *pl_sh_res; + +diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c +index bf07c1c03f..711a14b7ae 100644 +--- a/modules/video_output/opengl/vout_helper.c ++++ b/modules/video_output/opengl/vout_helper.c +@@ -44,12 +44,6 @@ + #include "vout_helper.h" + #include "internal.h" + +-#if HAVE_LIBPLACEBO +-#if PL_API_VER >= 18 +-#include <libplacebo/dummy.h> +-#endif +-#endif +- + #ifndef GL_CLAMP_TO_EDGE + # define GL_CLAMP_TO_EDGE 0x812F + #endif +@@ -576,10 +570,6 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm) + + #ifdef HAVE_LIBPLACEBO + FREENULL(tc->uloc.pl_vars); +-#if PL_API_VER >= 18 +- if (tc->pl_gpu) +- pl_gpu_dummy_destroy(&tc->pl_gpu); +-#endif + if (tc->pl_ctx) + pl_context_destroy(&tc->pl_ctx); + #endif +@@ -632,78 +622,14 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, + // create the main libplacebo context + if (!subpics) + { +-#if PL_API_VER >= 18 +- struct pl_gpu_dummy_params gpu_dummy_params = { +- .caps = PL_GPU_CAP_INPUT_VARIABLES, +- .glsl = (struct pl_glsl_desc) { +-#ifdef USE_OPENGL_ES2 +- .version = 100, +- .gles = true, +-#else +- .version = 120, +-#endif +- .vulkan = false, +- }, +- .limits = { 0 } +- }; +-#endif +- +- const opengl_vtable_t *vt = tc->vt; +- +-#if PL_API_VER >= 18 +- vt->GetIntegerv(GL_MAX_TEXTURE_SIZE, +- (GLint *)&gpu_dummy_params.limits.max_tex_1d_dim); +- gpu_dummy_params.limits.max_tex_2d_dim = gpu_dummy_params.limits.max_tex_1d_dim; +-#ifndef USE_OPENGL_ES2 +- vt->GetIntegerv(GL_MAX_3D_TEXTURE_SIZE, +- (GLint *)&gpu_dummy_params.limits.max_tex_3d_dim); +- vt->GetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, +- (GLint *)&gpu_dummy_params.limits.max_ubo_size); +- vt->GetIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, +- (GLint *)&gpu_dummy_params.limits.max_ssbo_size); +- vt->GetIntegerv(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, +- (GLint *)&gpu_dummy_params.limits.min_gather_offset); +- vt->GetIntegerv(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, +- (GLint *)&gpu_dummy_params.limits.max_gather_offset); +- vt->GetIntegerv(GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, +- (GLint *)&gpu_dummy_params.limits.max_shmem_size); +- vt->GetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, +- (GLint *)&gpu_dummy_params.limits.max_group_threads); +- if (vt->GetIntegeri_v != NULL) +- { +- for (int i = 0; i < 3; i++) +- { +- vt->GetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, i, +- (GLint *)&gpu_dummy_params.limits.max_dispatch[i]); +- vt->GetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, i, +- (GLint *)&gpu_dummy_params.limits.max_group_size[i]); +- } +- } +-#endif +-#endif +- +- /* Drain potential errors, non-existing variables will be set to zero */ +- while (vt->GetError() != GL_NO_ERROR) {} +- + tc->pl_ctx = pl_context_create(PL_API_VER, &(struct pl_context_params) { + .log_cb = log_cb, + .log_priv = tc, + .log_level = PL_LOG_INFO, + }); +- + if (tc->pl_ctx) { +-#if PL_API_VER >= 18 +- /* pl_gpu = NULL is not fatal but might generate incorrect shaders +- * depending or more recent GLSL version than VLC shaders. */ +- tc->pl_gpu = pl_gpu_dummy_create(tc->pl_ctx, &gpu_dummy_params); +- +- struct pl_shader_params shader_params = { +- .gpu = tc->pl_gpu, +- }; +-#endif +- + # if PL_API_VER >= 20 +- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &shader_params); ++ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); + # elif PL_API_VER >= 6 + tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); + # else +@@ -861,7 +787,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, + GET_PROC_ADDR_CORE(GetError); + GET_PROC_ADDR_CORE(GetIntegerv); + #ifndef USE_OPENGL_ES2 +- GET_PROC_ADDR_OPTIONAL(GetIntegeri_v); ++ GET_PROC_ADDR_CORE(GetIntegeri_v); + #endif + GET_PROC_ADDR_CORE(GetString); + GET_PROC_ADDR_CORE(PixelStorei); +-- +GitLab + + +From 6d145e38c03d4ffa5b6bff31e358a5ca6ceb3461 Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.dev> +Date: Tue, 18 Jan 2022 17:07:25 +0100 +Subject: [PATCH 2/4] opengl: vout_helper: use pl_shader_params.glsl + +This is the proper way to limit the GLSL version when using standalone +shaders without an associated GPU backend. +--- + modules/video_output/opengl/vout_helper.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c +index 711a14b7ae..a98621a859 100644 +--- a/modules/video_output/opengl/vout_helper.c ++++ b/modules/video_output/opengl/vout_helper.c +@@ -629,7 +629,10 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, + }); + if (tc->pl_ctx) { + # if PL_API_VER >= 20 +- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); ++ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &(struct pl_shader_params) { ++ .glsl.version = tc->glsl_version, ++ .glsl.gles = tc->is_gles, ++ }); + # elif PL_API_VER >= 6 + tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); + # else +-- +GitLab + + +From 645cbd6fac5bd07d1c973be9fc048b0f329c087c Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.dev> +Date: Tue, 18 Jan 2022 17:19:27 +0100 +Subject: [PATCH 3/4] opengl: don't error on no-op libplacebo shader + +See 6efc345d81a12 +--- + modules/video_output/opengl/fragment_shaders.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c +index e0b98732ca..ecf7226f0e 100644 +--- a/modules/video_output/opengl/fragment_shaders.c ++++ b/modules/video_output/opengl/fragment_shaders.c +@@ -765,8 +765,8 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, + } + + #ifdef HAVE_LIBPLACEBO +- if (tc->pl_sh_res) { +- const struct pl_shader_res *res = tc->pl_sh_res; ++ const struct pl_shader_res *res = tc->pl_sh_res; ++ if (res && res->input != PL_SHADER_SIG_NONE) { + assert(res->input == PL_SHADER_SIG_COLOR); + assert(res->output == PL_SHADER_SIG_COLOR); + ADDF(" result = %s(result);\n", res->name); +-- +GitLab + + +From 37bf74e6645d3023c1ebcbd81ffae1e552d3a73e Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.dev> +Date: Tue, 18 Jan 2022 18:03:48 +0100 +Subject: [PATCH 4/4] opengl: drop unneeded GetIntegeri_v + +This causes issues on some platforms, and we don't need it +--- + modules/video_output/opengl/converter.h | 3 --- + modules/video_output/opengl/vout_helper.c | 3 --- + 2 files changed, 6 deletions(-) + +diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h +index b69807f8cd..7000e1f38e 100644 +--- a/modules/video_output/opengl/converter.h ++++ b/modules/video_output/opengl/converter.h +@@ -167,9 +167,6 @@ typedef struct { + PFNGLGENTEXTURESPROC GenTextures; + PFNGLGETERRORPROC GetError; + PFNGLGETINTEGERVPROC GetIntegerv; +-#ifndef USE_OPENGL_ES2 +- PFNGLGETINTEGERIVPROC GetIntegeri_v; +-#endif + PFNGLGETSTRINGPROC GetString; + PFNGLPIXELSTOREIPROC PixelStorei; + PFNGLTEXIMAGE2DPROC TexImage2D; +diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c +index a98621a859..13d65e04c8 100644 +--- a/modules/video_output/opengl/vout_helper.c ++++ b/modules/video_output/opengl/vout_helper.c +@@ -789,9 +789,6 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, + GET_PROC_ADDR_CORE(GenTextures); + GET_PROC_ADDR_CORE(GetError); + GET_PROC_ADDR_CORE(GetIntegerv); +-#ifndef USE_OPENGL_ES2 +- GET_PROC_ADDR_CORE(GetIntegeri_v); +-#endif + GET_PROC_ADDR_CORE(GetString); + GET_PROC_ADDR_CORE(PixelStorei); + GET_PROC_ADDR_CORE(TexImage2D); +-- +GitLab + diff --git a/Remove_legacy_caca.patch b/Remove_legacy_caca.patch new file mode 100644 index 0000000..8374e71 --- /dev/null +++ b/Remove_legacy_caca.patch @@ -0,0 +1,98 @@ +diff -uNrp a/modules/video_output/caca.c b/modules/video_output/caca.c +--- a/modules/video_output/caca.c 2022-01-14 06:09:28.000000000 +0000 ++++ b/modules/video_output/caca.c 2022-01-18 23:09:44.979137301 +0000 +@@ -74,9 +74,9 @@ static void Place(vout_display_t *, vout + + /* */ + struct vout_display_sys_t { +- cucul_canvas_t *cv; ++ caca_canvas_t *cv; + caca_display_t *dp; +- cucul_dither_t *dither; ++ caca_dither_t *dither; + + picture_pool_t *pool; + vout_display_event_thread_t *et; +@@ -153,9 +153,9 @@ static int Open(vlc_object_t *object) + if (!sys) + goto error; + +- sys->cv = cucul_create_canvas(0, 0); ++ sys->cv = caca_create_canvas(0, 0); + if (!sys->cv) { +- msg_Err(vd, "cannot initialize libcucul"); ++ msg_Err(vd, "cannot initialize libcaca"); + goto error; + } + +@@ -209,11 +209,11 @@ error: + if (sys->pool) + picture_pool_Release(sys->pool); + if (sys->dither) +- cucul_free_dither(sys->dither); ++ caca_free_dither(sys->dither); + if (sys->dp) + caca_free_display(sys->dp); + if (sys->cv) +- cucul_free_canvas(sys->cv); ++ caca_free_canvas(sys->cv); + + free(sys); + } +@@ -235,9 +235,9 @@ static void Close(vlc_object_t *object) + if (sys->pool) + picture_pool_Release(sys->pool); + if (sys->dither) +- cucul_free_dither(sys->dither); ++ caca_free_dither(sys->dither); + caca_free_display(sys->dp); +- cucul_free_canvas(sys->cv); ++ caca_free_canvas(sys->cv); + + #if defined(_WIN32) + FreeConsole(); +@@ -266,7 +266,7 @@ static void Prepare(vout_display_t *vd, + + if (!sys->dither) { + /* Create the libcaca dither object */ +- sys->dither = cucul_create_dither(32, ++ sys->dither = caca_create_dither(32, + vd->source.i_visible_width, + vd->source.i_visible_height, + picture->p[0].i_pitch, +@@ -284,12 +284,12 @@ static void Prepare(vout_display_t *vd, + vout_display_place_t place; + Place(vd, &place); + +- cucul_set_color_ansi(sys->cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK); +- cucul_clear_canvas(sys->cv); ++ caca_set_color_ansi(sys->cv, CACA_DEFAULT, CACA_BLACK); ++ caca_clear_canvas(sys->cv); + + const int crop_offset = vd->source.i_y_offset * picture->p->i_pitch + + vd->source.i_x_offset * picture->p->i_pixel_pitch; +- cucul_dither_bitmap(sys->cv, place.x, place.y, ++ caca_dither_bitmap(sys->cv, place.x, place.y, + place.width, place.height, + sys->dither, + &picture->p->p_pixels[crop_offset]); +@@ -328,7 +328,7 @@ static int Control(vout_display_t *vd, i + + case VOUT_DISPLAY_CHANGE_SOURCE_CROP: + if (sys->dither) +- cucul_free_dither(sys->dither); ++ caca_free_dither(sys->dither); + sys->dither = NULL; + return VLC_SUCCESS; + +@@ -366,8 +366,8 @@ static void Place(vout_display_t *vd, vo + + vout_display_PlacePicture(place, &vd->source, vd->cfg, false); + +- const int canvas_width = cucul_get_canvas_width(sys->cv); +- const int canvas_height = cucul_get_canvas_height(sys->cv); ++ const int canvas_width = caca_get_canvas_width(sys->cv); ++ const int canvas_height = caca_get_canvas_height(sys->cv); + const int display_width = caca_get_display_width(sys->dp); + const int display_height = caca_get_display_height(sys->dp); + diff --git a/vlc.spec b/vlc.spec index ae97266..6241c57 100644 --- a/vlc.spec +++ b/vlc.spec @@ -79,6 +79,9 @@ Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch # https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch Patch14: https://code.videolan.org/videolan/vlc/-/merge_requests/1245.patch +# https://code.videolan.org/videolan/vlc/-/merge_requests/889 +Patch15: Remove_legacy_caca.patch +Patch16: https://code.videolan.org/videolan/vlc/-/merge_requests/1244.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -360,6 +363,8 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?fedora} > 35 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 %endif %{?_with_bootstrap: From 2bdfb5987597dc4659592f08a90144c6fb513f6b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 19 Jan 2022 09:32:58 +0100 Subject: [PATCH 599/671] Reword conditions --- vlc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index 6241c57..f69c2ef 100644 --- a/vlc.spec +++ b/vlc.spec @@ -160,7 +160,7 @@ BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) # Not Yet in EL8 -%if 0%{?fedora} || 0%{?el7} +%if ! 0%{?el8} BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) @@ -180,7 +180,7 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: libsamplerate-devel BuildRequires: libshout-devel -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?el8} BuildRequires: lua5.1-devel, lua5.1 %else BuildRequires: lua-devel @@ -197,7 +197,7 @@ BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 BuildRequires: pkgconfig(microdns) >= 0.1.2 BuildRequires: pkgconfig(protobuf-lite) >= 2.5 -%if 0%{?fedora} > 32 +%if 0%{?fedora} BuildRequires: qt5-qtbase-private-devel %endif BuildRequires: pkgconfig(Qt5Core) >= 5.5 From 62442a1680ad0192af5b15dc5667ccc58a06cccb Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 19 Jan 2022 09:34:13 +0100 Subject: [PATCH 600/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f69c2ef..436b855 100644 --- a/vlc.spec +++ b/vlc.spec @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -630,6 +630,9 @@ fi || : %changelog +* Wed Jan 19 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-5 +- rebuilt + * Tue Jan 18 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-4 - Bump From 285ea575b7d16934b561730b66316fd73bbd6736 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Fri, 4 Feb 2022 18:16:02 +0000 Subject: [PATCH 601/671] Rebuild --- 1244.patch | 259 ------------------------------------ 1245.patch | 382 ----------------------------------------------------- sources | 2 +- vlc.spec | 13 +- 4 files changed, 7 insertions(+), 649 deletions(-) delete mode 100644 1244.patch delete mode 100644 1245.patch diff --git a/1244.patch b/1244.patch deleted file mode 100644 index f73550b..0000000 --- a/1244.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 110d69c8245bb2bc1f0cf183dcdd6ba636973bfc Mon Sep 17 00:00:00 2001 -From: Niklas Haas <git@haasn.dev> -Date: Tue, 18 Jan 2022 16:47:22 +0100 -Subject: [PATCH 1/4] Revert "opengl: vout_helper: use pl_gpu_dummy for - shaders" - -This reverts commit 2437484d7684a4661048df1e095484a276bbea0b. - -The referenced commit is not a good way of fixing the issue described in -its commit message. Attaching a dummy GPU to the pl_shader makes the -shader think a GPU is actually available, and can lead to e.g. the use -of a dither texture (which VLC has no mapping code for, and would thus -result in a shader compilation error). - -All of the queried limits are also irrelevant for the way we use shaders -in this code, since they only affect GPU resources (which we can't use) -or texture sampling (which we don't use). - -Fixes #26503 by removing the conflicting code ---- - modules/video_output/opengl/converter.h | 1 - - modules/video_output/opengl/vout_helper.c | 78 +---------------------- - 2 files changed, 2 insertions(+), 77 deletions(-) - -diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h -index f8f0c12024..b69807f8cd 100644 ---- a/modules/video_output/opengl/converter.h -+++ b/modules/video_output/opengl/converter.h -@@ -340,7 +340,6 @@ struct opengl_tex_converter_t - bool yuv_color; - GLfloat yuv_coefficients[16]; - -- const struct pl_gpu *pl_gpu; - struct pl_shader *pl_sh; - const struct pl_shader_res *pl_sh_res; - -diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c -index bf07c1c03f..711a14b7ae 100644 ---- a/modules/video_output/opengl/vout_helper.c -+++ b/modules/video_output/opengl/vout_helper.c -@@ -44,12 +44,6 @@ - #include "vout_helper.h" - #include "internal.h" - --#if HAVE_LIBPLACEBO --#if PL_API_VER >= 18 --#include <libplacebo/dummy.h> --#endif --#endif -- - #ifndef GL_CLAMP_TO_EDGE - # define GL_CLAMP_TO_EDGE 0x812F - #endif -@@ -576,10 +570,6 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm) - - #ifdef HAVE_LIBPLACEBO - FREENULL(tc->uloc.pl_vars); --#if PL_API_VER >= 18 -- if (tc->pl_gpu) -- pl_gpu_dummy_destroy(&tc->pl_gpu); --#endif - if (tc->pl_ctx) - pl_context_destroy(&tc->pl_ctx); - #endif -@@ -632,78 +622,14 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, - // create the main libplacebo context - if (!subpics) - { --#if PL_API_VER >= 18 -- struct pl_gpu_dummy_params gpu_dummy_params = { -- .caps = PL_GPU_CAP_INPUT_VARIABLES, -- .glsl = (struct pl_glsl_desc) { --#ifdef USE_OPENGL_ES2 -- .version = 100, -- .gles = true, --#else -- .version = 120, --#endif -- .vulkan = false, -- }, -- .limits = { 0 } -- }; --#endif -- -- const opengl_vtable_t *vt = tc->vt; -- --#if PL_API_VER >= 18 -- vt->GetIntegerv(GL_MAX_TEXTURE_SIZE, -- (GLint *)&gpu_dummy_params.limits.max_tex_1d_dim); -- gpu_dummy_params.limits.max_tex_2d_dim = gpu_dummy_params.limits.max_tex_1d_dim; --#ifndef USE_OPENGL_ES2 -- vt->GetIntegerv(GL_MAX_3D_TEXTURE_SIZE, -- (GLint *)&gpu_dummy_params.limits.max_tex_3d_dim); -- vt->GetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, -- (GLint *)&gpu_dummy_params.limits.max_ubo_size); -- vt->GetIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, -- (GLint *)&gpu_dummy_params.limits.max_ssbo_size); -- vt->GetIntegerv(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, -- (GLint *)&gpu_dummy_params.limits.min_gather_offset); -- vt->GetIntegerv(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, -- (GLint *)&gpu_dummy_params.limits.max_gather_offset); -- vt->GetIntegerv(GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, -- (GLint *)&gpu_dummy_params.limits.max_shmem_size); -- vt->GetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, -- (GLint *)&gpu_dummy_params.limits.max_group_threads); -- if (vt->GetIntegeri_v != NULL) -- { -- for (int i = 0; i < 3; i++) -- { -- vt->GetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, i, -- (GLint *)&gpu_dummy_params.limits.max_dispatch[i]); -- vt->GetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_SIZE, i, -- (GLint *)&gpu_dummy_params.limits.max_group_size[i]); -- } -- } --#endif --#endif -- -- /* Drain potential errors, non-existing variables will be set to zero */ -- while (vt->GetError() != GL_NO_ERROR) {} -- - tc->pl_ctx = pl_context_create(PL_API_VER, &(struct pl_context_params) { - .log_cb = log_cb, - .log_priv = tc, - .log_level = PL_LOG_INFO, - }); -- - if (tc->pl_ctx) { --#if PL_API_VER >= 18 -- /* pl_gpu = NULL is not fatal but might generate incorrect shaders -- * depending or more recent GLSL version than VLC shaders. */ -- tc->pl_gpu = pl_gpu_dummy_create(tc->pl_ctx, &gpu_dummy_params); -- -- struct pl_shader_params shader_params = { -- .gpu = tc->pl_gpu, -- }; --#endif -- - # if PL_API_VER >= 20 -- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &shader_params); -+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); - # elif PL_API_VER >= 6 - tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); - # else -@@ -861,7 +787,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, - GET_PROC_ADDR_CORE(GetError); - GET_PROC_ADDR_CORE(GetIntegerv); - #ifndef USE_OPENGL_ES2 -- GET_PROC_ADDR_OPTIONAL(GetIntegeri_v); -+ GET_PROC_ADDR_CORE(GetIntegeri_v); - #endif - GET_PROC_ADDR_CORE(GetString); - GET_PROC_ADDR_CORE(PixelStorei); --- -GitLab - - -From 6d145e38c03d4ffa5b6bff31e358a5ca6ceb3461 Mon Sep 17 00:00:00 2001 -From: Niklas Haas <git@haasn.dev> -Date: Tue, 18 Jan 2022 17:07:25 +0100 -Subject: [PATCH 2/4] opengl: vout_helper: use pl_shader_params.glsl - -This is the proper way to limit the GLSL version when using standalone -shaders without an associated GPU backend. ---- - modules/video_output/opengl/vout_helper.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c -index 711a14b7ae..a98621a859 100644 ---- a/modules/video_output/opengl/vout_helper.c -+++ b/modules/video_output/opengl/vout_helper.c -@@ -629,7 +629,10 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, - }); - if (tc->pl_ctx) { - # if PL_API_VER >= 20 -- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL); -+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &(struct pl_shader_params) { -+ .glsl.version = tc->glsl_version, -+ .glsl.gles = tc->is_gles, -+ }); - # elif PL_API_VER >= 6 - tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); - # else --- -GitLab - - -From 645cbd6fac5bd07d1c973be9fc048b0f329c087c Mon Sep 17 00:00:00 2001 -From: Niklas Haas <git@haasn.dev> -Date: Tue, 18 Jan 2022 17:19:27 +0100 -Subject: [PATCH 3/4] opengl: don't error on no-op libplacebo shader - -See 6efc345d81a12 ---- - modules/video_output/opengl/fragment_shaders.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c -index e0b98732ca..ecf7226f0e 100644 ---- a/modules/video_output/opengl/fragment_shaders.c -+++ b/modules/video_output/opengl/fragment_shaders.c -@@ -765,8 +765,8 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, - } - - #ifdef HAVE_LIBPLACEBO -- if (tc->pl_sh_res) { -- const struct pl_shader_res *res = tc->pl_sh_res; -+ const struct pl_shader_res *res = tc->pl_sh_res; -+ if (res && res->input != PL_SHADER_SIG_NONE) { - assert(res->input == PL_SHADER_SIG_COLOR); - assert(res->output == PL_SHADER_SIG_COLOR); - ADDF(" result = %s(result);\n", res->name); --- -GitLab - - -From 37bf74e6645d3023c1ebcbd81ffae1e552d3a73e Mon Sep 17 00:00:00 2001 -From: Niklas Haas <git@haasn.dev> -Date: Tue, 18 Jan 2022 18:03:48 +0100 -Subject: [PATCH 4/4] opengl: drop unneeded GetIntegeri_v - -This causes issues on some platforms, and we don't need it ---- - modules/video_output/opengl/converter.h | 3 --- - modules/video_output/opengl/vout_helper.c | 3 --- - 2 files changed, 6 deletions(-) - -diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h -index b69807f8cd..7000e1f38e 100644 ---- a/modules/video_output/opengl/converter.h -+++ b/modules/video_output/opengl/converter.h -@@ -167,9 +167,6 @@ typedef struct { - PFNGLGENTEXTURESPROC GenTextures; - PFNGLGETERRORPROC GetError; - PFNGLGETINTEGERVPROC GetIntegerv; --#ifndef USE_OPENGL_ES2 -- PFNGLGETINTEGERIVPROC GetIntegeri_v; --#endif - PFNGLGETSTRINGPROC GetString; - PFNGLPIXELSTOREIPROC PixelStorei; - PFNGLTEXIMAGE2DPROC TexImage2D; -diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c -index a98621a859..13d65e04c8 100644 ---- a/modules/video_output/opengl/vout_helper.c -+++ b/modules/video_output/opengl/vout_helper.c -@@ -789,9 +789,6 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, - GET_PROC_ADDR_CORE(GenTextures); - GET_PROC_ADDR_CORE(GetError); - GET_PROC_ADDR_CORE(GetIntegerv); --#ifndef USE_OPENGL_ES2 -- GET_PROC_ADDR_CORE(GetIntegeri_v); --#endif - GET_PROC_ADDR_CORE(GetString); - GET_PROC_ADDR_CORE(PixelStorei); - GET_PROC_ADDR_CORE(TexImage2D); --- -GitLab - diff --git a/1245.patch b/1245.patch deleted file mode 100644 index d4bb33d..0000000 --- a/1245.patch +++ /dev/null @@ -1,382 +0,0 @@ -From dbf942baa1169affbb32094cbdeecee488971a13 Mon Sep 17 00:00:00 2001 -From: Romain Vimont <rom1v@videolabs.io> -Date: Tue, 18 Jan 2022 15:06:28 +0100 -Subject: [PATCH 1/8] avcodec: use AVFrame.pts - -> Decoders now export the frame timestamp as AVFrame.pts. It was -> previously exported as AVFrame.pkt_pts, which is now deprecated. - -Refs ffmpeg/32c8359093d1ff4f45ed19518b449b3ac3769d27 (deprecation) -Refs ffmpeg/6e30b35b85b81c802e52a1078ec7a3097e353c6d (removal) ---- - modules/codec/avcodec/video.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 2b1e3ad314..c7da048f86 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1114,14 +1114,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error - } - - /* Compute the PTS */ --#ifdef FF_API_PKT_PTS - mtime_t i_pts = frame->pts; --#else -- mtime_t i_pts = frame->pkt_pts; --#endif -- if (i_pts == AV_NOPTS_VALUE ) -- i_pts = frame->pkt_dts; -- - if( i_pts == AV_NOPTS_VALUE ) - i_pts = date_Get( &p_sys->pts ); - --- -GitLab - - -From c0e2450a6ce557f26a44c2da0b7c2ac86984183d Mon Sep 17 00:00:00 2001 -From: Romain Vimont <rom1v@videolabs.io> -Date: Tue, 18 Jan 2022 15:08:38 +0100 -Subject: [PATCH 2/8] avcodec: remove thread_safe_callbacks from API 60 - -In current FFmpeg 5.0 (API 59), we must still set the variable, and it -is already deprecated, so we can't get rid of the deprecation warning. - -ffmpeg/a83098ab03a47179d54a9b9c8bcefc81b9c6aafd (deprecation) -ffmpeg/54e5d21acabb452e5680de5db3bf7567d351d68e (doc) ---- - modules/codec/avcodec/video.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index c7da048f86..21a8a6be50 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -573,7 +573,9 @@ int InitVideoDec( vlc_object_t *obj ) - i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 ); - msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); - p_context->thread_count = i_thread_count; -+#if LIBAVCODEC_VERSION_MAJOR < 60 - p_context->thread_safe_callbacks = true; -+#endif - - switch( p_codec->id ) - { --- -GitLab - - -From d24ba02fe8820fa2ba24decee433f52c04fac543 Mon Sep 17 00:00:00 2001 -From: Romain Vimont <rom1v@videolabs.io> -Date: Tue, 18 Jan 2022 15:12:26 +0100 -Subject: [PATCH 3/8] avcodec: replace removed FMT_VAAPI_VLD enum value - -Replace AV_PIX_FMT_VAAPI_VLD by AV_PIX_FMT_VAAPI. - -ffmpeg/9f8e57efe4400ca86352277873792792279c3b15 (deprecation) -ffmpeg/ad524cb9eeb298f7a60d923094fbebb1fda7e0e3 (removal) ---- - modules/codec/avcodec/va.c | 2 +- - modules/codec/avcodec/vaapi.c | 4 ++-- - modules/codec/avcodec/video.c | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c -index 05831232d2..beedcc6027 100644 ---- a/modules/codec/avcodec/va.c -+++ b/modules/codec/avcodec/va.c -@@ -37,7 +37,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt) - * fatal, especially not if a software format. */ - switch (hwfmt) - { -- case AV_PIX_FMT_VAAPI_VLD: -+ case AV_PIX_FMT_VAAPI: - switch (swfmt) - { - case AV_PIX_FMT_YUVJ420P: -diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c -index 35e6c47263..3675d2fc79 100644 ---- a/modules/codec/avcodec/vaapi.c -+++ b/modules/codec/avcodec/vaapi.c -@@ -154,7 +154,7 @@ static void Delete(vlc_va_t *va, void **hwctx) - static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt, - const es_format_t *fmt, picture_sys_t *p_sys) - { -- if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys == NULL) -+ if (pix_fmt != AV_PIX_FMT_VAAPI || p_sys == NULL) - return VLC_EGENERIC; - - (void) fmt; -@@ -263,7 +263,7 @@ static void DeleteDRM(vlc_va_t *va, void **hwctx) - static int CreateDRM(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt, - const es_format_t *fmt, picture_sys_t *p_sys) - { -- if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys) -+ if (pix_fmt != AV_PIX_FMT_VAAPI || p_sys) - return VLC_EGENERIC; - - (void) fmt; -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 21a8a6be50..199af50c6f 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -1613,7 +1613,7 @@ no_reuse: - #endif - AV_PIX_FMT_DXVA2_VLD, - #endif -- AV_PIX_FMT_VAAPI_VLD, -+ AV_PIX_FMT_VAAPI, - #if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) - AV_PIX_FMT_VDPAU, - #endif --- -GitLab - - -From abb9e9a21d9a6d4c952101e45a70182a37fe855e Mon Sep 17 00:00:00 2001 -From: Romain Vimont <rom1v@videolabs.io> -Date: Tue, 18 Jan 2022 15:16:39 +0100 -Subject: [PATCH 4/8] avcodec: adapt AVCodec API constification - -Refs ffmpeg/626535f6a169e2d821b969e0ea77125ba7482113 ---- - modules/codec/avcodec/encoder.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index c10f44c0c2..46573b17c9 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -93,7 +93,7 @@ struct encoder_sys_t - /* - * libavcodec properties - */ -- AVCodec *p_codec; -+ const AVCodec *p_codec; - AVCodecContext *p_context; - - /* -@@ -234,7 +234,7 @@ static const int DEFAULT_ALIGN = 0; - /***************************************************************************** - * InitVideoEnc: probe the encoder - *****************************************************************************/ --static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, AVCodec *p_codec ) -+static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, const AVCodec *p_codec ) - { - /* if we don't have i_frame_rate_base, we are probing and just checking if we can find codec - * so set fps to requested fps if asked by user or input fps is availabled */ -@@ -296,7 +296,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - encoder_t *p_enc = (encoder_t *)p_this; - encoder_sys_t *p_sys; - AVCodecContext *p_context; -- AVCodec *p_codec = NULL; -+ const AVCodec *p_codec = NULL; - unsigned i_codec_id; - const char *psz_namecodec; - float f_val; --- -GitLab - - -From 83eb99de2bd0a14cfe561106c007bf6e385881c1 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka <ileoo@videolan.org> -Date: Fri, 18 Jun 2021 10:08:44 +0300 -Subject: [PATCH 5/8] avcodec: move picture type to use sidedata on encoding - -Sidedata AV_PKT_DATA_QUALITY_STATS has been present since 2015 on -version 56.51.100. Also previous coded_frame->pict_type doesn't seem to -be present anymore in ffmpeg master. - -(cherry picked from commit 8ed4f2a7a2dbc9522c3feebb39b2e4ccc7bf5d24) - -Refs ffmpeg/11bc79089378a5ec00547d0f85bc152afdf30dfa ---- - modules/codec/avcodec/encoder.c | 44 +++++++++++++++++---------------- - 1 file changed, 23 insertions(+), 21 deletions(-) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 46573b17c9..5ea65de787 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -1101,6 +1101,29 @@ static block_t *vlc_av_packet_Wrap(AVPacket *packet, mtime_t i_length, AVCodecCo - p_block->i_pts = p_block->i_pts * CLOCK_FREQ * context->time_base.num / context->time_base.den; - p_block->i_dts = p_block->i_dts * CLOCK_FREQ * context->time_base.num / context->time_base.den; - -+ uint8_t *av_packet_sidedata = av_packet_get_side_data(packet, AV_PKT_DATA_QUALITY_STATS, NULL); -+ if( av_packet_sidedata ) -+ { -+ switch ( av_packet_sidedata[4] ) -+ { -+ case AV_PICTURE_TYPE_I: -+ case AV_PICTURE_TYPE_SI: -+ p_block->i_flags |= BLOCK_FLAG_TYPE_I; -+ break; -+ case AV_PICTURE_TYPE_P: -+ case AV_PICTURE_TYPE_SP: -+ p_block->i_flags |= BLOCK_FLAG_TYPE_P; -+ break; -+ case AV_PICTURE_TYPE_B: -+ case AV_PICTURE_TYPE_BI: -+ p_block->i_flags |= BLOCK_FLAG_TYPE_B; -+ break; -+ default: -+ p_block->i_flags |= BLOCK_FLAG_TYPE_PB; -+ } -+ -+ } -+ - return p_block; - } - -@@ -1234,27 +1257,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) - - block_t *p_block = encode_avframe( p_enc, p_sys, frame ); - -- if( p_block ) -- { -- switch ( p_sys->p_context->coded_frame->pict_type ) -- { -- case AV_PICTURE_TYPE_I: -- case AV_PICTURE_TYPE_SI: -- p_block->i_flags |= BLOCK_FLAG_TYPE_I; -- break; -- case AV_PICTURE_TYPE_P: -- case AV_PICTURE_TYPE_SP: -- p_block->i_flags |= BLOCK_FLAG_TYPE_P; -- break; -- case AV_PICTURE_TYPE_B: -- case AV_PICTURE_TYPE_BI: -- p_block->i_flags |= BLOCK_FLAG_TYPE_B; -- break; -- default: -- p_block->i_flags |= BLOCK_FLAG_TYPE_PB; -- } -- } -- - return p_block; - } - --- -GitLab - - -From de270df11646414bc4173e1f890492b6887d98ee Mon Sep 17 00:00:00 2001 -From: Romain Vimont <rom1v@videolabs.io> -Date: Tue, 18 Jan 2022 15:43:27 +0100 -Subject: [PATCH 6/8] avformat: adapt AVOutputFormat API constification - -Refs ffmpeg/56450a0ee4fdda160f4039fc2ae33edfd27765c9 ---- - modules/demux/avformat/mux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 0b00640baf..ff1a5e45ee 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -86,7 +86,7 @@ static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, - *****************************************************************************/ - int avformat_OpenMux( vlc_object_t *p_this ) - { -- AVOutputFormat *file_oformat; -+ const AVOutputFormat *file_oformat; - sout_mux_t *p_mux = (sout_mux_t*)p_this; - bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); - --- -GitLab - - -From 657cadbbef00ec9c38528c5948331bb2a0448df3 Mon Sep 17 00:00:00 2001 -From: Mehdi Sabwat <mehdisabwat@gmail.com> -Date: Thu, 9 Apr 2020 21:59:56 +0200 -Subject: [PATCH 7/8] avformat: add support for url field in AvFormatContext - -Since Jan 21, 2018 filename field was deprecated in favor -of `url` which now has no length restrictions. - -From doc/APIChanges: -``` -2018-01-28 - ea3672b7d6 - lavf 58.7.100 - avformat.h - Deprecate AVFormatContext filename field which had limited length, use the - new dynamically allocated url field instead. -``` - -The URL field is freed by libavformat in avformat_free_context() in -avformat_CloseMux(). - -Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io> -(cherry picked from commit a2ce2e3a8436845378af3b1828f2bb0fa0f4a268) - -Refs ffmpeg/30f7021aa0be2c978aefb73894b643c9bafbf51c ---- - modules/demux/avformat/mux.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index ff1a5e45ee..ffff7bee83 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -90,9 +90,12 @@ int avformat_OpenMux( vlc_object_t *p_this ) - sout_mux_t *p_mux = (sout_mux_t*)p_this; - bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy"); - -+#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ -+ && (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 7, 100)) ) - if( dummy && strlen(p_mux->p_access->psz_path) - >= sizeof (((AVFormatContext *)NULL)->filename) ) - return VLC_EGENERIC; -+#endif - - msg_Dbg( p_mux, "using %s %s", AVPROVIDER(LIBAVFORMAT), LIBAVFORMAT_IDENT ); - -@@ -127,7 +130,12 @@ int avformat_OpenMux( vlc_object_t *p_this ) - p_sys->oc->oformat = file_oformat; - /* If we use dummy access, let avformat write output */ - if( dummy ) -+#if ( (LIBAVFORMAT_VERSION_MICRO >= 100) \ -+ && (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 7, 100)) ) -+ p_sys->oc->url = av_strdup(p_mux->p_access->psz_path); -+#else - strcpy( p_sys->oc->filename, p_mux->p_access->psz_path ); -+#endif - - /* Create I/O wrapper */ - p_sys->io_buffer_size = 10 * 1024 * 1024; /* FIXME */ --- -GitLab - - -From b42e6cb9c82a74980c7c062b0ee6e07ae51d32af Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka <ileoo@videolan.org> -Date: Fri, 18 Jun 2021 10:31:00 +0300 -Subject: [PATCH 8/8] avformat: remove pts hack from demuxing - -pstream->cur_dts is no longer available from libavformat - -(cherry picked from commit c2ba623f0ad425e7743fca0bdc251d5bc9289e77) - -Refs ffmpeg/591b88e6787c4e678237f02a50421d101abd25c2 ---- - modules/demux/avformat/mux.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index ffff7bee83..8dd8c2f7e6 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -379,10 +379,6 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - pkt->dts = p_data->i_dts * p_stream->time_base.den / - CLOCK_FREQ / p_stream->time_base.num; - -- /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */ -- p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den / -- CLOCK_FREQ / p_stream->time_base.num ) - 1; -- - if( av_write_frame( p_sys->oc, pkt ) < 0 ) - { - msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") " --- -GitLab - diff --git a/sources b/sources index 954b6a8..bdef25b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-584bf4f.tar.gz) = 1a71b37821c63efe120d71aa54ec5630320c03457b7bdd23bbef7c3cb430fd4a4234c18abad888d65a57e7b099cd130519eaa28de90400b1beaa861249b135d2 +SHA512 (vlc-bfca680.tar.gz) = 92acc32a7de62f4dd367f4e46808cfa49d47fc6f24960ef5a0704824525e54989a9d1634a5f6376a390c1630fbd663ad90d692adc41f20c2d1810aa38a978d85 diff --git a/vlc.spec b/vlc.spec index 436b855..6677906 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 584bf4f6414daf73adba01fd10f7b0aafdc1330d +%global commit0 bfca6804525d6d748d261e1a3cf57a59612102dc %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -78,10 +78,8 @@ Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch # https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch -Patch14: https://code.videolan.org/videolan/vlc/-/merge_requests/1245.patch # https://code.videolan.org/videolan/vlc/-/merge_requests/889 -Patch15: Remove_legacy_caca.patch -Patch16: https://code.videolan.org/videolan/vlc/-/merge_requests/1244.patch +Patch14: Remove_legacy_caca.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -363,8 +361,6 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?fedora} > 35 %patch13 -p1 %patch14 -p1 -%patch15 -p1 -%patch16 -p1 %endif %{?_with_bootstrap: @@ -630,6 +626,9 @@ fi || : %changelog +* Fri Feb 04 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17-6 +- rebuilt + * Wed Jan 19 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-5 - rebuilt From 98c4ce01d4888f63394b19555440f26f2374a709 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 22 Feb 2022 19:28:51 +0100 Subject: [PATCH 602/671] Update to 3.0.17 --- sources | 2 +- vlc.spec | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/sources b/sources index bdef25b..5b9a5e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-bfca680.tar.gz) = 92acc32a7de62f4dd367f4e46808cfa49d47fc6f24960ef5a0704824525e54989a9d1634a5f6376a390c1630fbd663ad90d692adc41f20c2d1810aa38a978d85 +SHA512 (vlc-758b718.tar.gz) = 02dc1f6a9516e7bbb2ed0dd04b57a0e944435847bcde32770370a24563234134f3b08755769a98437d33ebd32a517c32324fd6635173c5793442bd36f100e8c7 diff --git a/vlc.spec b/vlc.spec index 6677906..f20e41e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 bfca6804525d6d748d261e1a3cf57a59612102dc +%global commit0 758b718347094af7e7e35ec18359d32f8928766e %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -51,7 +51,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -71,10 +71,6 @@ Patch7: Switch-to-Fedora-lua-5.1.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch -# Fix build issue with recent SRT library -# Based on https://git.videolan.org/?p=vlc.git;a=commit;h=6e8d77431127c482196115a6eeb769daf56347b3 -Patch10: recent_srt_fix.patch -Patch11: 0001-Revert-configure-ignore-too-new-SRT.patch Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch # https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch @@ -353,13 +349,11 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %patch9 -p1 -%patch10 -p1 -%patch11 -p1 %if 0%{?rhel} >= 7 %patch12 -p1 %endif %if 0%{?fedora} > 35 -%patch13 -p1 +#patch13 -p1 %patch14 -p1 %endif @@ -626,6 +620,9 @@ fi || : %changelog +* Tue Feb 22 2022 Nicolas Chauvet <kwizart@gmail.com> +- Update to 3.0.17 + * Fri Feb 04 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17-6 - rebuilt From 88ad0230e905785046121e83893f4bc1f78e9b73 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 22 Feb 2022 22:15:52 +0100 Subject: [PATCH 603/671] Fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f20e41e..350e060 100644 --- a/vlc.spec +++ b/vlc.spec @@ -352,8 +352,8 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?rhel} >= 7 %patch12 -p1 %endif +%patch13 -p1 %if 0%{?fedora} > 35 -#patch13 -p1 %patch14 -p1 %endif From f633042c9086b9e2d17cfbdfb749f99826944a89 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 27 Feb 2022 21:20:49 +0100 Subject: [PATCH 604/671] Fixup private headers usage --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 350e060..2bde75c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -191,7 +191,7 @@ BuildRequires: pkgconfig(libpulse) >= 0.9.8 BuildRequires: pkgconfig(libsecret-1) >= 0.18 BuildRequires: pkgconfig(microdns) >= 0.1.2 BuildRequires: pkgconfig(protobuf-lite) >= 2.5 -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: qt5-qtbase-private-devel %endif BuildRequires: pkgconfig(Qt5Core) >= 5.5 From 4e98573ec8b83c554c572522c63d2db654a948d0 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 10 Mar 2022 07:46:49 +0000 Subject: [PATCH 605/671] Update to 3.0.17.2 (rfbz#6241) --- ...ing-include-limits-to-file-using-std.patch | 76 ------------------- ...-Revert-configure-ignore-too-new-SRT.patch | 26 ------- recent_srt_fix.patch | 25 ------ sources | 2 +- vlc.spec | 11 ++- 5 files changed, 8 insertions(+), 132 deletions(-) delete mode 100644 0001-Add-missing-include-limits-to-file-using-std.patch delete mode 100644 0001-Revert-configure-ignore-too-new-SRT.patch delete mode 100644 recent_srt_fix.patch diff --git a/0001-Add-missing-include-limits-to-file-using-std.patch b/0001-Add-missing-include-limits-to-file-using-std.patch deleted file mode 100644 index 1d4f5f8..0000000 --- a/0001-Add-missing-include-limits-to-file-using-std.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 804aacea64e2b83f7434efd3c11dbca2eb7fa80b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> -Date: Mon, 14 Dec 2020 12:54:39 +0100 -Subject: [PATCH] Add missing include <limits> to file using std:: -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -numeric_limits<uint64_t>::max() - -Compilation would fail with: - -> error: 'numeric_limits' is not a member of 'std' - -without this include because of some hardening build -flags mandated on Fedora Linux, with GCC 11. - -Fix: #25325 - -Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> ---- - modules/demux/adaptive/playlist/Inheritables.cpp | 1 + - modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 + - modules/demux/adaptive/playlist/SegmentTimeline.cpp | 1 + - modules/demux/hls/playlist/Parser.cpp | 1 + - modules/demux/mkv/matroska_segment.cpp | 1 + - modules/demux/mkv/mkv.cpp | 1 + - 6 files changed, 6 insertions(+) - -diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp ---- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp.orig 2020-10-27 09:16:09.000000000 +0100 -+++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/adaptive/playlist/SegmentInformation.cpp 2020-12-14 19:34:41.600005319 +0100 -@@ -34,6 +34,7 @@ - - #include <algorithm> - #include <cassert> -+#include <limits> - - using namespace adaptive::playlist; - -diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp ---- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp.orig 2020-10-27 09:16:09.000000000 +0100 -+++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/hls/playlist/Parser.cpp 2020-12-14 19:34:41.600005319 +0100 -@@ -42,6 +42,7 @@ - #include <map> - #include <cctype> - #include <algorithm> -+#include <limits> - - using namespace adaptive; - using namespace adaptive::playlist; -diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp ---- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp.orig 2020-10-27 09:16:09.000000000 +0100 -+++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/matroska_segment.cpp 2020-12-14 19:34:41.601005298 +0100 -@@ -31,6 +31,7 @@ - - #include <new> - #include <iterator> -+#include <limits> - - matroska_segment_c::matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream, KaxSegment *p_seg ) - :segment(p_seg) -diff -up vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp.orig vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp ---- vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp.orig 2020-10-27 09:16:09.000000000 +0100 -+++ vlc-3.0-a66f141b17e792bcc298c83496749ec93265ff14/modules/demux/mkv/mkv.cpp 2020-12-14 19:34:41.601005298 +0100 -@@ -34,6 +34,7 @@ - #include "stream_io_callback.hpp" - - #include <new> -+#include <limits> - - extern "C" { - #include "../av1_unpack.h" --- -2.29.2 - diff --git a/0001-Revert-configure-ignore-too-new-SRT.patch b/0001-Revert-configure-ignore-too-new-SRT.patch deleted file mode 100644 index 7b1c9fb..0000000 --- a/0001-Revert-configure-ignore-too-new-SRT.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 903923d4f491c4b557ad2a9a4fd28e47975d8054 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet <kwizart@gmail.com> -Date: Thu, 29 Apr 2021 23:56:35 +0200 -Subject: [PATCH] Revert "configure: ignore too new SRT" - -This reverts commit 3aad852a05d9a3b2469328cb9ea2e20b0acbce5c. ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index d37af9e4179e..14028f478bd0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4016,7 +4016,7 @@ AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"]) - dnl - dnl SRT plugin - dnl --PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2 srt < 1.3.0], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT]) -+PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT]) - - EXTEND_HELP_STRING([Visualisations and Video filter plugins:]) - dnl --- -2.30.2 - diff --git a/recent_srt_fix.patch b/recent_srt_fix.patch deleted file mode 100644 index b6c4fa1..0000000 --- a/recent_srt_fix.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/modules/access/srt.c -+++ b/modules/access/srt.c -@@ -165,7 +165,7 @@ - - /* Set latency */ - i_latency = var_InheritInteger( p_stream, "latency" ); -- srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY, -+ srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY, - &i_latency, sizeof( int ) ); - - psz_passphrase = var_InheritString( p_stream, "passphrase" ); - ---- a/modules/access_output/srt.c -+++ b/modules/access_output/srt.c -@@ -162,7 +162,7 @@ - - /* Set latency */ - i_latency = var_InheritInteger( p_access, "latency" ); -- srt_setsockopt( p_sys->sock, 0, SRTO_TSBPDDELAY, -+ srt_setsockopt( p_sys->sock, 0, SRTO_LATENCY, - &i_latency, sizeof( int ) ); - - if ( psz_passphrase != NULL && psz_passphrase[0] != '\0') - - diff --git a/sources b/sources index 5b9a5e9..bee4498 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-758b718.tar.gz) = 02dc1f6a9516e7bbb2ed0dd04b57a0e944435847bcde32770370a24563234134f3b08755769a98437d33ebd32a517c32324fd6635173c5793442bd36f100e8c7 +SHA512 (vlc-c4ab31d.tar.gz) = 1d3f5b61c6aa7b9f3f62badc153143c0ec4b86fbe0b807edc3101d951bc4b4c615dacc734eeb3376b9ff9e7a8299e2d11ca463ddcceadaa1cf9d5ea1b015eb76 diff --git a/vlc.spec b/vlc.spec index 2bde75c..5605b5a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 758b718347094af7e7e35ec18359d32f8928766e +%global commit0 c4ab31d5f0d5d0ba298706241d5b67ae49215935 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -50,8 +50,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.17 -Release: 7%{?dist} +Version: 3.0.17.2 +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -620,7 +620,10 @@ fi || : %changelog -* Tue Feb 22 2022 Nicolas Chauvet <kwizart@gmail.com> +* Thu Mar 10 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.2-1 +- Update to 3.0.17.2 (rfbz#6241) + +* Tue Feb 22 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17-7 - Update to 3.0.17 * Fri Feb 04 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17-6 From 3d972023df25ef41e2fbc3ae0cf7a43897569d55 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 15:42:53 +0200 Subject: [PATCH 606/671] Drop deprecated libmp4v2 --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5605b5a..bb603db 100644 --- a/vlc.spec +++ b/vlc.spec @@ -136,7 +136,6 @@ BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmfx-devel %endif BuildRequires: libmodplug-devel -BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmpg123-devel BuildRequires: libmtp-devel >= 1.0.0 From 9d482354cebb6a71cd46c8a72f30a7398c61c6be Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 15:46:01 +0200 Subject: [PATCH 607/671] Drop unused libdv --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bb603db..60c72fa 100644 --- a/vlc.spec +++ b/vlc.spec @@ -123,7 +123,6 @@ BuildRequires: pkgconfig(daaladec) BuildRequires: pkgconfig(daalaenc) BuildRequires: libdc1394-devel >= 2.1.0 %{?_with_libdca:BuildRequires: libdca-devel} -BuildRequires: libdv-devel %{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel BuildRequires: libebml-devel From 74419de838a8fcd8d1a6c49376d460ca04680c7d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 15:46:53 +0200 Subject: [PATCH 608/671] Drop unused libtar --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 60c72fa..7219d63 100644 --- a/vlc.spec +++ b/vlc.spec @@ -145,7 +145,6 @@ BuildRequires: libssh2-devel BuildRequires: libsysfs-devel BuildRequires: libshout-devel BuildRequires: libsmbclient-devel -BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel From ad0c8bd1c0cc5e51a3586a73bf55422362008f3e Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 16:40:43 +0200 Subject: [PATCH 609/671] Reverse condition --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 7219d63..98df3b6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,7 +29,7 @@ %global _with_asdcp 1 %endif -%if 0%{?fedora} || 0%{?el8} +%if ! 0%{?el7} %global _with_bluray 1 %global _with_wayland 1 %endif From f86d80f805e7efc4e6d7150cd3f695bb692e3637 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 16:43:05 +0200 Subject: [PATCH 610/671] Drop libdc1394 for el9+ --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 98df3b6..2d6e8d5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -29,6 +29,10 @@ %global _with_asdcp 1 %endif +%if 0%{?rhel} && 0%{?rhel} >= 9 +%global _without_libdc1394 1 +%endif + %if ! 0%{?el7} %global _with_bluray 1 %global _with_wayland 1 @@ -121,7 +125,7 @@ BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: pkgconfig(daaladec) BuildRequires: pkgconfig(daalaenc) -BuildRequires: libdc1394-devel >= 2.1.0 +%{!?_without_libdc1394:BuildRequires: libdc1394-devel} %{?_with_libdca:BuildRequires: libdca-devel} %{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel From 9d2b8771cc1037d635fdb8e969a839598b408ee0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 5 May 2022 19:34:51 +0200 Subject: [PATCH 611/671] Drop unused minizip --- vlc.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2d6e8d5..28b8379 100644 --- a/vlc.spec +++ b/vlc.spec @@ -180,7 +180,6 @@ BuildRequires: lua5.1-devel, lua5.1 %else BuildRequires: lua-devel %endif -BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: libmpeg2-devel >= 0.3.2} BuildRequires: ncurses-devel %{?_with_opencv:BuildRequires: pkgconfig(opencv)} From b835a2257028606c01f0a9c8c68414108d8cf708 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 15 May 2022 16:00:15 +0200 Subject: [PATCH 612/671] Update to 3.0.17.4 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 28b8379..89f5c0a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -54,7 +54,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.17.2 +Version: 3.0.17.4 Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org @@ -620,6 +620,9 @@ fi || : %changelog +* Sun May 15 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-1 +- Update to 3.0.17.4 + * Thu Mar 10 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.2-1 - Update to 3.0.17.2 (rfbz#6241) From ccc8619ace27cfd3a92d32c0b9c2d41f31a7341d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 15 May 2022 16:30:47 +0200 Subject: [PATCH 613/671] Condition lirc --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 89f5c0a..5775c7d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -39,6 +39,7 @@ %endif %if 0%{?fedora} +%global _with_lirc 1 %ifarch x86_64 i686 %global _with_crystalhd 1 %endif @@ -168,7 +169,7 @@ BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: lirc-devel +%{?_with_lirc:BuildRequires: lirc-devel } %{?_with_live555:BuildRequires: live555-devel >= 0-0.33} BuildRequires: kernel-headers BuildRequires: pkgconfig(gl) From ca75b3efc0f3f2d96f766fbcac1ac183fd01bbe2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 15 May 2022 16:31:39 +0200 Subject: [PATCH 614/671] Switch placebo fedora only for now --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 5775c7d..2bacd27 100644 --- a/vlc.spec +++ b/vlc.spec @@ -156,7 +156,7 @@ BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) # Not Yet in EL8 -%if ! 0%{?el8} +%if 0%{?fedora} BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) From 6bcb482bf24fc1f09070927a94b65b283c54b728 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Wed, 11 May 2022 12:22:09 +0100 Subject: [PATCH 615/671] Use compat-ffmpeg4 for F36+ --- vlc.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 2bacd27..e88023d 100644 --- a/vlc.spec +++ b/vlc.spec @@ -104,7 +104,11 @@ BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} BuildRequires: pkgconfig(dbus-1) %{?_with_faad2:BuildRequires: faad2-devel} +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 +%{?_with_ffmpeg:BuildRequires: compat-ffmpeg4-devel} +%else %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} +%endif BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} BuildRequires: fribidi-devel @@ -371,14 +375,18 @@ touch src/revision.txt . /opt/rh/devtoolset-%{dts_ver}/enable %endif +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 +export PKG_CONFIG_PATH=%{_libdir}/compat-ffmpeg4/pkgconfig +%endif + %configure \ --disable-dependency-tracking \ --disable-optimizations \ --disable-silent-rules \ - --with-default-font=%{_fontbasedir}/dejavu/DejaVuSans.ttf \ - --with-default-font-family=DejaVuSans \ - --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ - --with-default-monospace-font-family=DejaVuSansMono \ + --with-default-font=%{_fontbasedir}/dejavu/DejaVuSans.ttf \ + --with-default-font-family=DejaVuSans \ + --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ + --with-default-monospace-font-family=DejaVuSansMono \ --with-kde-solid=no \ --with-pic \ --disable-rpath \ From c91e4966081770a33d17d5322d214b0b42befa16 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 31 May 2022 10:16:20 +0200 Subject: [PATCH 616/671] Fixup for el9 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e88023d..42da8c6 100644 --- a/vlc.spec +++ b/vlc.spec @@ -180,7 +180,7 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: libsamplerate-devel BuildRequires: libshout-devel -%if 0%{?fedora} || 0%{?el8} +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: lua5.1-devel, lua5.1 %else BuildRequires: lua-devel From 4e43f3ea817dc9af93e4a693112240548a6fb7d7 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 31 May 2022 10:31:25 +0200 Subject: [PATCH 617/671] Fixup libcaca --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 42da8c6..26bcf6e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -358,7 +358,7 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %patch12 -p1 %endif %patch13 -p1 -%if 0%{?fedora} > 35 +%if 0%{?fedora} > 35 || 0%{?rhel} >= 9 %patch14 -p1 %endif From 80f8a6b399cad037e9c8a5ec0f558af065ae146c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Sun, 12 Jun 2022 12:48:21 +0100 Subject: [PATCH 618/671] Mass rebuild for x264-0.164 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 26bcf6e..aa5f53b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -629,6 +629,9 @@ fi || : %changelog +* Sun Jun 12 2022 Sérgio Basto <sergio@serjux.com> - 1:3.0.17.4-2 +- Mass rebuild for x264-0.164 + * Sun May 15 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-1 - Update to 3.0.17.4 From e14b0540dc8d6ab3842dd8e964513168f2374db1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 24 Jun 2022 09:50:19 +0200 Subject: [PATCH 619/671] Bump --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index aa5f53b..1e42634 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -629,6 +629,9 @@ fi || : %changelog +* Fri Jun 24 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-3 +- Rebuilt + * Sun Jun 12 2022 Sérgio Basto <sergio@serjux.com> - 1:3.0.17.4-2 - Mass rebuild for x264-0.164 From f6ec72a913ec373b2cac5563130e08fc7262c248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com> Date: Thu, 23 Jun 2022 15:11:03 +0200 Subject: [PATCH 620/671] Rebuilt for new AOM and dav1d --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 1e42634..798c773 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -629,6 +629,9 @@ fi || : %changelog +* Thu Jun 24 2022 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.17.4-4 +- Rebuilt for new AOM and dav1d + * Fri Jun 24 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-3 - Rebuilt From bac4125196c77d155937eaafc133a03c2797da5b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 25 Jun 2022 00:42:16 +0100 Subject: [PATCH 621/671] fix --- fix-dav1d-1.0.patch | 149 ++++++++++++++++++++++++++++++++++++++++++++ vlc.spec | 8 ++- 2 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 fix-dav1d-1.0.patch diff --git a/fix-dav1d-1.0.patch b/fix-dav1d-1.0.patch new file mode 100644 index 0000000..47799bc --- /dev/null +++ b/fix-dav1d-1.0.patch @@ -0,0 +1,149 @@ +From 55b24abf7219a0c6a6560187496e41fd60638552 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Fri, 18 Mar 2022 11:42:49 +0100 +Subject: [PATCH 1/2] dav1d: fix compilation with (upcoming) dav1d 1.0 + +(cherry picked from commit dbf45cea2a8abdfbef897b8a71f3eb782bb1b712) (edited) +edited: +- 3.0 has the 128 pixels padding elsewhere +- 3.0 has an extra parameter for add_integer_with_range() +- 3.0 was setting i_extra_picture_buffers further down in the code +- 3.0 uses 16 threads max + +Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> +--- + modules/codec/dav1d.c | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c +index 039165f52e..cfabbc27cb 100644 +--- a/modules/codec/dav1d.c ++++ b/modules/codec/dav1d.c +@@ -63,10 +63,16 @@ vlc_module_begin () + set_category(CAT_INPUT) + set_subcategory(SUBCAT_INPUT_VCODEC) + ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_THREADS, ++ THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) ++ add_obsolete_string("dav1d-thread-tiles") // unused with dav1d 1.0 ++#else + add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_FRAME_THREADS, + THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) + add_integer_with_range("dav1d-thread-tiles", 0, 0, DAV1D_MAX_TILE_THREADS, + THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false) ++#endif + vlc_module_end () + + /***************************************************************************** +@@ -294,6 +300,11 @@ static int OpenDecoder(vlc_object_t *p_this) + return VLC_ENOMEM; + + dav1d_default_settings(&p_sys->s); ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); ++ if (p_sys->s.n_threads == 0) ++ p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; ++#else + p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); + if (p_sys->s.n_tile_threads == 0) + p_sys->s.n_tile_threads = +@@ -303,6 +314,7 @@ static int OpenDecoder(vlc_object_t *p_this) + p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); + if (p_sys->s.n_frame_threads == 0) + p_sys->s.n_frame_threads = (i_core_count < 16) ? i_core_count : 16; ++#endif + p_sys->s.allocator.cookie = dec; + p_sys->s.allocator.alloc_picture_callback = NewPicture; + p_sys->s.allocator.release_picture_callback = FreePicture; +@@ -313,12 +325,20 @@ static int OpenDecoder(vlc_object_t *p_this) + return VLC_EGENERIC; + } + ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ msg_Dbg(p_this, "Using dav1d version %s with %d threads", ++ dav1d_version(), p_sys->s.n_threads); ++ ++ dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); ++#else + msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", + dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); + ++ dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); ++#endif ++ + dec->pf_decode = Decode; + dec->pf_flush = FlushDecoder; +- dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); + + dec->fmt_out.video.i_width = dec->fmt_in.video.i_width; + dec->fmt_out.video.i_height = dec->fmt_in.video.i_height; +-- +2.36.1 + + +From c95e5288ab2d222346b19552a462afe5159d1122 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme <robux4@ycbcr.xyz> +Date: Mon, 21 Mar 2022 15:53:52 +0100 +Subject: [PATCH 2/2] dav1d: limit the number of extra frames needed by the + decoder + +The i_extra_picture_buffers is used to add pictures to the pool that the core +will allocate. dav1d is actually using n_threads frames. And the core is +allocating 10 frames per default for AV1. So we need to add the missing ones. + +(cherry picked from commit a32031dc0f5f32083fc54a21397bce732742ccbe) (rebased) +rebased: +- the code dav1d 1.0.0 in 3.0 uses different max versions + +Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> +--- + modules/codec/dav1d.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c +index cfabbc27cb..8a439ce4ff 100644 +--- a/modules/codec/dav1d.c ++++ b/modules/codec/dav1d.c +@@ -304,7 +304,28 @@ static int OpenDecoder(vlc_object_t *p_this) + p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); + if (p_sys->s.n_threads == 0) + p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; +-#else ++ ++#if DAV1D_API_VERSION_MAJOR > 6 || DAV1D_API_VERSION_MINOR >= 7 ++ // after dav1d 1.0.0 ++ p_sys->s.max_frame_delay = dav1d_get_frame_delay( &p_sys->s ); ++#else // 1.0.0 ++ // corresponds to c->n_fc when max_frame_delay is 0 in dav1d 1.0.0 ++ static const uint8_t fc_lut[49] = { ++ 1, /* 1 */ ++ 2, 2, 2, /* 2- 4 */ ++ 3, 3, 3, 3, 3, /* 5- 9 */ ++ 4, 4, 4, 4, 4, 4, 4, /* 10-16 */ ++ 5, 5, 5, 5, 5, 5, 5, 5, 5, /* 17-25 */ ++ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, /* 26-36 */ ++ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 37-49 */ ++ }; ++ if (p_sys->s.n_threads >= 50) ++ p_sys->s.max_frame_delay = 8; ++ else ++ p_sys->s.max_frame_delay = fc_lut[p_sys->s.n_threads - 1]; ++#endif ++ ++#else // before dav1d 1.0.0 + p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); + if (p_sys->s.n_tile_threads == 0) + p_sys->s.n_tile_threads = +@@ -329,7 +350,7 @@ static int OpenDecoder(vlc_object_t *p_this) + msg_Dbg(p_this, "Using dav1d version %s with %d threads", + dav1d_version(), p_sys->s.n_threads); + +- dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); ++ dec->i_extra_picture_buffers = p_sys->s.max_frame_delay; + #else + msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", + dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); +-- +2.36.1 + diff --git a/vlc.spec b/vlc.spec index 798c773..6b4fb61 100644 --- a/vlc.spec +++ b/vlc.spec @@ -81,6 +81,9 @@ Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch # https://code.videolan.org/videolan/vlc/-/merge_requests/889 Patch14: Remove_legacy_caca.patch +# https://code.videolan.org/videolan/vlc/-/commit/2202c892c8dc1381b596c53c2ebd3ca680061f95 +# https://code.videolan.org/videolan/vlc/-/commit/d38ddd7270ffaea705981b6a48086778850d3c96 +Patch15: fix-dav1d-1.0.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -361,6 +364,9 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %if 0%{?fedora} > 35 || 0%{?rhel} >= 9 %patch14 -p1 %endif +%if 0%{?fedora} > 36 +%patch15 -p1 +%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -629,7 +635,7 @@ fi || : %changelog -* Thu Jun 24 2022 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.17.4-4 +* Fri Jun 24 2022 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.17.4-4 - Rebuilt for new AOM and dav1d * Fri Jun 24 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-3 From 499b02be52ce33dcce014ba5e924d6062f6b8363 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 5 Jul 2022 09:06:47 +0200 Subject: [PATCH 622/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6b4fb61..6e31384 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -635,6 +635,9 @@ fi || : %changelog +* Tue Jul 05 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-5 +- rebuilt + * Fri Jun 24 2022 Robert-André Mauchin <zebob.m@gmail.com> - 1:3.0.17.4-4 - Rebuilt for new AOM and dav1d From e324a74469c969b4c8cbea87bc6340b46cc3b17f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Fri, 15 Jul 2022 15:07:49 +0100 Subject: [PATCH 623/671] rebuilt --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index bee4498..66bbbca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-c4ab31d.tar.gz) = 1d3f5b61c6aa7b9f3f62badc153143c0ec4b86fbe0b807edc3101d951bc4b4c615dacc734eeb3376b9ff9e7a8299e2d11ca463ddcceadaa1cf9d5ea1b015eb76 +SHA512 (vlc-c650ce1.tar.gz) = 2cec2cd378f2101fa267a2f1eb47ec7d641a38ebb7163d57830ee82c6f02030e401e9abe45860d1b82cdd25a6dba7f586e142209a8979712f988e6c2f576c050 diff --git a/vlc.spec b/vlc.spec index 6e31384..2c97aba 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 c4ab31d5f0d5d0ba298706241d5b67ae49215935 +%global commit0 c650ce1a4e352cc04192229a8878b8b6c312527d %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc9 @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -635,6 +635,9 @@ fi || : %changelog +* Fri Jul 15 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.4-6 +- rebuilt + * Tue Jul 05 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.17.4-5 - rebuilt From 2b817a02a020a77d974a0bf5ae879fdf29c6d656 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sat, 23 Jul 2022 00:00:57 +0100 Subject: [PATCH 624/671] Rebuild for new ffmpeg --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2c97aba..cadaeb5 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -635,6 +635,9 @@ fi || : %changelog +* Fri Jul 22 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.4-7 +- Rebuild for new ffmpeg + * Fri Jul 15 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.4-6 - rebuilt From 254f1499e33f966008473f873cbf3f443a5b7dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> Date: Mon, 8 Aug 2022 03:02:53 +0100 Subject: [PATCH 625/671] - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg 5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sérgio M. Basto <sergio@serjux.com> --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index cadaeb5..3c03661 100644 --- a/vlc.spec +++ b/vlc.spec @@ -56,7 +56,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.17.4 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: https://www.videolan.org %if 0%{?commit0:1} @@ -635,6 +635,10 @@ fi || : %changelog +* Mon Aug 08 2022 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 1:3.0.17.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg + 5.1 + * Fri Jul 22 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.17.4-7 - Rebuild for new ffmpeg From 294ec1a54a0941f0e269297c4924bd9088d46052 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 29 Aug 2022 14:06:25 +0200 Subject: [PATCH 626/671] Update to 3.0.18-rc --- vlc.spec | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/vlc.spec b/vlc.spec index 3c03661..0943ad4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,7 @@ -%global commit0 c650ce1a4e352cc04192229a8878b8b6c312527d +%global commit0 675232e5932e5f205f03a485f1b56c7ae4f1ca6d %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -#global vlc_rc -rc9 +%global vlc_rc -rc +%global vlc_setup vlc-%{?commit0} %global _with_bootstrap 1 @@ -55,19 +56,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.17.4 -Release: 8%{?dist} +Version: 3.0.18 +Release: 0.1.rc%{?dist} License: GPLv2+ URL: https://www.videolan.org -%if 0%{?commit0:1} Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz -%global vlc_setup vlc-%{?commit0} -%else -Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing/}vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz -%global vlc_setup vlc-%{version}%{?vlc_rc} -%endif -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_20.patch -Patch1: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_chain.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch @@ -76,14 +69,6 @@ Patch7: Switch-to-Fedora-lua-5.1.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch -Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch -# https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 -Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch -# https://code.videolan.org/videolan/vlc/-/merge_requests/889 -Patch14: Remove_legacy_caca.patch -# https://code.videolan.org/videolan/vlc/-/commit/2202c892c8dc1381b596c53c2ebd3ca680061f95 -# https://code.videolan.org/videolan/vlc/-/commit/d38ddd7270ffaea705981b6a48086778850d3c96 -Patch15: fix-dav1d-1.0.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -314,10 +299,6 @@ Summary: VLC media player core Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} -Requires: libmicrodns%{?_isa} > 0.1.2-1 -%if 0%{?fc31} -Requires: srt-libs%{?_isa} > 1.4.1-3 -%endif %description core VLC media player core components @@ -336,9 +317,6 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} -%{?_with_rpi: -%patch0 -p1 -} %patch3 -p1 %if 0%{?el7} %patch5 -p1 @@ -357,16 +335,6 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %patch9 -p1 -%if 0%{?rhel} >= 7 -%patch12 -p1 -%endif -%patch13 -p1 -%if 0%{?fedora} > 35 || 0%{?rhel} >= 9 -%patch14 -p1 -%endif -%if 0%{?fedora} > 36 -%patch15 -p1 -%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -635,6 +603,11 @@ fi || : %changelog +* Mon Aug 29 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.1.rc +- Update to 3.0.18-rc +- Drop mmal downstream (rpi) patches +- Drop merged patches + * Mon Aug 08 2022 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 1:3.0.17.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg 5.1 From 09bb15e224910df117e39c93b7aaf0f51e5adf56 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 29 Aug 2022 14:07:10 +0200 Subject: [PATCH 627/671] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 66bbbca..71050e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-c650ce1.tar.gz) = 2cec2cd378f2101fa267a2f1eb47ec7d641a38ebb7163d57830ee82c6f02030e401e9abe45860d1b82cdd25a6dba7f586e142209a8979712f988e6c2f576c050 +SHA512 (vlc-675232e.tar.gz) = be7a4ac945f19c68609ed3a2b5b6e69dfaca03deabbc9ee898223f64c22d71823b3bfc30959c36199fec5dc2f2a1d49684a6d8b38e19c1b7d5b2e1bd9796072e From ba01a0a2d3cd3f2c1a0b909b3222fc42d1551e21 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 4 Sep 2022 11:33:06 +0100 Subject: [PATCH 628/671] Add requires ffmpeg-libs --- vlc.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 0943ad4..d47cf8b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,7 +57,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.1.rc%{?dist} +Release: 0.2.rc%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -299,6 +299,7 @@ Summary: VLC media player core Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} +Requires: ffmpeg-libs%{?_isa} %description core VLC media player core components @@ -603,6 +604,9 @@ fi || : %changelog +* Sun Sep 04 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-0.2.rc +- Add requires ffmpeg-libs + * Mon Aug 29 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.1.rc - Update to 3.0.18-rc - Drop mmal downstream (rpi) patches From acb8dd7eb265d08cff45ef3d753f7fecda712c51 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 4 Sep 2022 13:40:37 +0100 Subject: [PATCH 629/671] Revert "Add requires ffmpeg-libs" This reverts commit ba01a0a2d3cd3f2c1a0b909b3222fc42d1551e21. --- vlc.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index d47cf8b..0943ad4 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,7 +57,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.2.rc%{?dist} +Release: 0.1.rc%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -299,7 +299,6 @@ Summary: VLC media player core Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} -Requires: ffmpeg-libs%{?_isa} %description core VLC media player core components @@ -604,9 +603,6 @@ fi || : %changelog -* Sun Sep 04 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-0.2.rc -- Add requires ffmpeg-libs - * Mon Aug 29 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.1.rc - Update to 3.0.18-rc - Drop mmal downstream (rpi) patches From 4e40ba64be04feaf74b05386d45fe125df95cc78 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 5 Sep 2022 06:19:03 +0100 Subject: [PATCH 630/671] Remove compat-ffmpeg4 export --- vlc.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 0943ad4..10df5ed 100644 --- a/vlc.spec +++ b/vlc.spec @@ -349,10 +349,6 @@ touch src/revision.txt . /opt/rh/devtoolset-%{dts_ver}/enable %endif -%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 -export PKG_CONFIG_PATH=%{_libdir}/compat-ffmpeg4/pkgconfig -%endif - %configure \ --disable-dependency-tracking \ --disable-optimizations \ From d4b1b493283310ae10440d20a6976f2e9a718aba Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 26 Sep 2022 15:35:29 +0100 Subject: [PATCH 631/671] Rebuild for new flac --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 10df5ed..bf59e89 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,7 +57,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.1.rc%{?dist} +Release: 0.2.rc%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -599,6 +599,9 @@ fi || : %changelog +* Mon Sep 26 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-0.2.rc +- Rebuild for new flac + * Mon Aug 29 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.1.rc - Update to 3.0.18-rc - Drop mmal downstream (rpi) patches From de726dfdcb02fa8ca4fdc26d1d2851d33219bd88 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Sep 2022 13:18:20 +0200 Subject: [PATCH 632/671] Workaround breaking api with dcp --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index bf59e89..2bc29cc 100644 --- a/vlc.spec +++ b/vlc.spec @@ -27,8 +27,10 @@ %global _with_dav1d 1 %global _with_aom 1 %ifarch x86_64 ppc64le aarch64 +%if ! 0%{?fedora} >= 37 %global _with_asdcp 1 %endif +%endif %if 0%{?rhel} && 0%{?rhel} >= 9 %global _without_libdc1394 1 From c7d23fa52f735149fed59f76cba23d276a0ec1a0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 27 Sep 2022 17:54:57 +0200 Subject: [PATCH 633/671] fixup --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 2bc29cc..bb58e54 100644 --- a/vlc.spec +++ b/vlc.spec @@ -27,7 +27,7 @@ %global _with_dav1d 1 %global _with_aom 1 %ifarch x86_64 ppc64le aarch64 -%if ! 0%{?fedora} >= 37 +%if ! (0%{?fedora} >= 37) %global _with_asdcp 1 %endif %endif From 2a99c9d36d7d2acac337a717bd3ff7d0bf0e520f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Sep 2022 12:51:36 +0200 Subject: [PATCH 634/671] Update to vlc-3.0.18-rc2 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 71050e4..8ddacb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-675232e.tar.gz) = be7a4ac945f19c68609ed3a2b5b6e69dfaca03deabbc9ee898223f64c22d71823b3bfc30959c36199fec5dc2f2a1d49684a6d8b38e19c1b7d5b2e1bd9796072e +SHA512 (vlc-ed93768.tar.gz) = cc97a4e2f81f0eda09a726b22228ec7cc11a186a69eed139da16c2137bd8dfa358d65b6773027f4c016d9b0f517272ffb1840a6754240af65a8a3b791e70c963 From c312188f23528b826b137551ff442b5d898a5edd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Sep 2022 12:52:34 +0200 Subject: [PATCH 635/671] Update spec --- vlc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vlc.spec b/vlc.spec index bb58e54..bfd8563 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global commit0 675232e5932e5f205f03a485f1b56c7ae4f1ca6d +%global commit0 ed93768cedee7dae31a5b44d57a38d59da4dd1cf %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%global vlc_rc -rc +%global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} %global _with_bootstrap 1 @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.2.rc%{?dist} +Release: 0.3.rc%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -601,6 +601,9 @@ fi || : %changelog +* Fri Sep 30 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.3.rc +- Update to 3.0.18-rc2 + * Mon Sep 26 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-0.2.rc - Rebuild for new flac From 0dfa3c8b4713cbe7b9aebbc3f1691ecbb7309ae4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 30 Sep 2022 20:35:03 +0200 Subject: [PATCH 636/671] fixup rc2 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bfd8563..f3093e2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.3.rc%{?dist} +Release: 0.3.rc2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz From ca4689ca8ca579e04d6a4ccf42d617b247c8ea62 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 16 Oct 2022 16:35:34 +0200 Subject: [PATCH 637/671] Update to 3.0.18 --- sources | 2 +- vlc.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 8ddacb4..111f80b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-ed93768.tar.gz) = cc97a4e2f81f0eda09a726b22228ec7cc11a186a69eed139da16c2137bd8dfa358d65b6773027f4c016d9b0f517272ffb1840a6754240af65a8a3b791e70c963 +SHA512 (vlc-e9eceae.tar.gz) = 164e9e96954415ed25b5b0256e50f588a6853223a859805609ba7a4ce2ab0f1cc0966926182e7fe74a1a6d7b63deacbe3aaf67316b41c33b024999fb45b5902e diff --git a/vlc.spec b/vlc.spec index f3093e2..e782f9e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,6 @@ -%global commit0 ed93768cedee7dae31a5b44d57a38d59da4dd1cf +%global commit0 e9eceaed4d838dbd84638bfb2e4bdd08294163b1 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%global vlc_rc -rc2 +#global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} %global _with_bootstrap 1 @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 0.3.rc2%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -601,6 +601,9 @@ fi || : %changelog +* Sun Oct 16 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-1 +- Update to 3.0.18 + * Fri Sep 30 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-0.3.rc - Update to 3.0.18-rc2 From 672d261db49320044ecb608175325482b94ef889 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 6 Nov 2022 13:52:08 +0000 Subject: [PATCH 638/671] Rebuild for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index e782f9e..aca17a1 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -601,6 +601,9 @@ fi || : %changelog +* Sun Nov 06 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-2 +- Rebuild for live555 + * Sun Oct 16 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-1 - Update to 3.0.18 From 4b4eace026319a3cb89a3d2a5e4ce3b2665ba572 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Dec 2022 18:33:10 +0100 Subject: [PATCH 639/671] Update to current snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 111f80b..1a95114 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-e9eceae.tar.gz) = 164e9e96954415ed25b5b0256e50f588a6853223a859805609ba7a4ce2ab0f1cc0966926182e7fe74a1a6d7b63deacbe3aaf67316b41c33b024999fb45b5902e +SHA512 (vlc-6183d1e.tar.gz) = 50ead4f163337885c3bfb48a74869bb9d4ec6de9ebbeb97234ca6719c962422070ab88942e29f84cfc162eaad562e0b95aa735ed0ae9110bdbbd19ba8d1b2121 diff --git a/vlc.spec b/vlc.spec index aca17a1..f2c0219 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 e9eceaed4d838dbd84638bfb2e4bdd08294163b1 +%global commit0 6183d1e1530e5fee926a4fbbae8fe8628a2bcd57 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -601,6 +601,9 @@ fi || : %changelog +* Fri Dec 23 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-3 +- Update to current snapshot + * Sun Nov 06 2022 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-2 - Rebuild for live555 From 3eba6e6a71878536123f397d0b02f09e8a2d4263 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 23 Dec 2022 21:53:38 +0100 Subject: [PATCH 640/671] Disable placebo on f38 --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f2c0219..844190a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -150,7 +150,7 @@ BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) # Not Yet in EL8 -%if 0%{?fedora} +%if 0%{?fedora} && 0%{?fedora} < 38 BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) From 9bcd7d402900183ddc5a1f64b244135ddb44be53 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Dec 2022 17:33:53 +0100 Subject: [PATCH 641/671] Revert "Disable placebo on f38" This reverts commit 3eba6e6a71878536123f397d0b02f09e8a2d4263. --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 844190a..f2c0219 100644 --- a/vlc.spec +++ b/vlc.spec @@ -150,7 +150,7 @@ BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) # Not Yet in EL8 -%if 0%{?fedora} && 0%{?fedora} < 38 +%if 0%{?fedora} BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) From f92d042ebbf5c35729312a10b84db082c262d0b0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Dec 2022 17:34:11 +0100 Subject: [PATCH 642/671] Add libplacebo-5.patch --- vlc-libplacebo-5.patch | 131 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 vlc-libplacebo-5.patch diff --git a/vlc-libplacebo-5.patch b/vlc-libplacebo-5.patch new file mode 100644 index 0000000..8da84e5 --- /dev/null +++ b/vlc-libplacebo-5.patch @@ -0,0 +1,131 @@ +From efbb1fdbc4420365b3ffd22e55dd27ad520037c7 Mon Sep 17 00:00:00 2001 +From: Niklas Haas <git@haasn.dev> +Date: Sat, 16 Jul 2022 14:41:13 +0200 +Subject: [PATCH] opengl: port to libplacebo v4 API + +These v3.x APIs will be removed in v5.x. Fortunately, the new APIs are a +near drop-in replacement, so the change was minimal. Only the error +handling was cleaned up slightly. +--- + modules/video_output/opengl/converter.h | 18 ++++++++++-------- + modules/video_output/opengl/fragment_shaders.c | 4 ++-- + modules/video_output/opengl/vout_helper.c | 14 +++++++------- + 3 files changed, 19 insertions(+), 17 deletions(-) + +diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h +index 7000e1f38e..cb8e593a9a 100644 +--- a/modules/video_output/opengl/converter.h ++++ b/modules/video_output/opengl/converter.h +@@ -52,6 +52,11 @@ + # endif + #endif + ++#ifdef HAVE_LIBPLACEBO ++# include <libplacebo/log.h> ++# include <libplacebo/shaders.h> ++#endif ++ + #define VLCGL_PICTURE_MAX 128 + + #ifndef GL_TEXTURE_RECTANGLE +@@ -253,10 +258,6 @@ static inline bool HasExtension(const char *apis, const char *api) + return false; + } + +-struct pl_context; +-struct pl_shader; +-struct pl_shader_res; +- + /* + * Structure that is filled by "glhw converter" module probe function + * The implementation should initialize every members of the struct that are +@@ -272,8 +273,12 @@ struct opengl_tex_converter_t + /* Pointer to object gl, set by the caller */ + vlc_gl_t *gl; + ++#ifdef HAVE_LIBPLACEBO + /* libplacebo context, created by the caller (optional) */ +- struct pl_context *pl_ctx; ++ pl_log pl_log; ++ pl_shader pl_sh; ++ const struct pl_shader_res *pl_sh_res; ++#endif + + /* Function pointers to OpenGL functions, set by the caller */ + const opengl_vtable_t *vt; +@@ -337,9 +342,6 @@ struct opengl_tex_converter_t + bool yuv_color; + GLfloat yuv_coefficients[16]; + +- struct pl_shader *pl_sh; +- const struct pl_shader_res *pl_sh_res; +- + /* Private context */ + void *priv; + +diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c +index 2246e33afd..16380335cc 100644 +--- a/modules/video_output/opengl/fragment_shaders.c ++++ b/modules/video_output/opengl/fragment_shaders.c +@@ -611,7 +611,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, + + #ifdef HAVE_LIBPLACEBO + if (tc->pl_sh) { +- struct pl_shader *sh = tc->pl_sh; ++ pl_shader sh = tc->pl_sh; + struct pl_color_map_params color_params = pl_color_map_default_params; + color_params.intent = var_InheritInteger(tc->gl, "rendering-intent"); + color_params.tone_mapping_algo = var_InheritInteger(tc->gl, "tone-mapping"); +@@ -634,7 +634,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target, + pl_color_space_from_video_format(&tc->fmt), + dst_space, NULL, false); + +- struct pl_shader_obj *dither_state = NULL; ++ pl_shader_obj dither_state = NULL; + int method = var_InheritInteger(tc->gl, "dither-algo"); + if (method >= 0) { + +diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c +index 13d65e04c8..e971f5170b 100644 +--- a/modules/video_output/opengl/vout_helper.c ++++ b/modules/video_output/opengl/vout_helper.c +@@ -570,8 +570,8 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm) + + #ifdef HAVE_LIBPLACEBO + FREENULL(tc->uloc.pl_vars); +- if (tc->pl_ctx) +- pl_context_destroy(&tc->pl_ctx); ++ pl_shader_free(&tc->pl_sh); ++ pl_log_destroy(&tc->pl_log); + #endif + + vlc_object_release(tc); +@@ -622,21 +622,21 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm, + // create the main libplacebo context + if (!subpics) + { +- tc->pl_ctx = pl_context_create(PL_API_VER, &(struct pl_context_params) { ++ tc->pl_log = pl_log_create(PL_API_VER, &(struct pl_log_params) { + .log_cb = log_cb, + .log_priv = tc, + .log_level = PL_LOG_INFO, + }); +- if (tc->pl_ctx) { ++ if (tc->pl_log) { + # if PL_API_VER >= 20 +- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, &(struct pl_shader_params) { ++ tc->pl_sh = pl_shader_alloc(tc->pl_log, &(struct pl_shader_params) { + .glsl.version = tc->glsl_version, + .glsl.gles = tc->is_gles, + }); + # elif PL_API_VER >= 6 +- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0); ++ tc->pl_sh = pl_shader_alloc(tc->pl_log, NULL, 0); + # else +- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0); ++ tc->pl_sh = pl_shader_alloc(tc->pl_log, NULL, 0, 0); + # endif + } + } +-- +2.38.1 From d86100c98bd3fef259bcfc2ff3a3d83344a3a951 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Dec 2022 17:35:14 +0100 Subject: [PATCH 643/671] Apply patch --- vlc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index f2c0219..bf5a718 100644 --- a/vlc.spec +++ b/vlc.spec @@ -68,7 +68,8 @@ Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build Patch7: Switch-to-Fedora-lua-5.1.patch - +# https://build.opensuse.org/package/view_file/openSUSE:Factory/vlc/vlc-libplacebo-5.patch?expand=1 +Patch8: vlc-libplacebo-5.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch From 3a41ed25d0cedc89d8247fdc0bb4a67c51979a8c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Dec 2022 17:36:06 +0100 Subject: [PATCH 644/671] Update changelog --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index bf5a718..20c7f64 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -602,6 +602,9 @@ fi || : %changelog +* Sun Dec 25 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-4 +- Add libplacebo-5 + * Fri Dec 23 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-3 - Update to current snapshot From 9f57825606eb90ac6e44ca2ae8ec55ecb7ec4c62 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Sun, 25 Dec 2022 17:52:41 +0100 Subject: [PATCH 645/671] Apply patch8 --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index 20c7f64..0eb38ca 100644 --- a/vlc.spec +++ b/vlc.spec @@ -336,6 +336,7 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac %patch7 -p1 sed -i -e 's/luac/luac-5.1/g' configure.ac %endif +%patch8 -p1 %patch9 -p1 From 1d7c9a9473c8d80a80e3a3c962e3a39b9fe7246b Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Thu, 2 Mar 2023 11:03:13 +0000 Subject: [PATCH 646/671] Drop chromaprint support due to it's ffmpeg requires --- vlc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 0eb38ca..02defbd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -99,6 +99,7 @@ BuildRequires: pkgconfig(dbus-1) %{?_with_ffmpeg:BuildRequires: compat-ffmpeg4-devel} %else %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} +BuildRequires: pkgconfig(libchromaprint) %endif BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} @@ -117,7 +118,6 @@ BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 -BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: pkgconfig(daaladec) BuildRequires: pkgconfig(daalaenc) @@ -603,6 +603,9 @@ fi || : %changelog +* Thu Mar 02 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-5 +- Drop chromaprint support due to it's ffmpeg requires + * Sun Dec 25 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-4 - Add libplacebo-5 From bd6da12872f448ed2ebf5182e0a03496e8942e3f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 22 Mar 2023 22:58:08 +0100 Subject: [PATCH 647/671] Revert "Drop chromaprint support due to it's ffmpeg requires" This reverts commit 1d7c9a9473c8d80a80e3a3c962e3a39b9fe7246b. --- vlc.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index 02defbd..0eb38ca 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.18 -Release: 5%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -99,7 +99,6 @@ BuildRequires: pkgconfig(dbus-1) %{?_with_ffmpeg:BuildRequires: compat-ffmpeg4-devel} %else %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} -BuildRequires: pkgconfig(libchromaprint) %endif BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} @@ -118,6 +117,7 @@ BuildRequires: libass-devel >= 0.9.7 BuildRequires: libcaca-devel BuildRequires: libcddb-devel BuildRequires: libcdio-devel >= 0.77-3 +BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: pkgconfig(daaladec) BuildRequires: pkgconfig(daalaenc) @@ -603,9 +603,6 @@ fi || : %changelog -* Thu Mar 02 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.18-5 -- Drop chromaprint support due to it's ffmpeg requires - * Sun Dec 25 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-4 - Add libplacebo-5 From 6040d5b70dec05ba226b2fed035cfb7c27775bc1 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Wed, 22 Mar 2023 23:12:13 +0100 Subject: [PATCH 648/671] Update to 3.0.19 snapshot --- sources | 2 +- vlc.spec | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 1a95114..9f9eb94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-6183d1e.tar.gz) = 50ead4f163337885c3bfb48a74869bb9d4ec6de9ebbeb97234ca6719c962422070ab88942e29f84cfc162eaad562e0b95aa735ed0ae9110bdbbd19ba8d1b2121 +SHA512 (vlc-3e48354.tar.gz) = fca7723ab1760d6ca8cda0cd997039b9a2b0f4171d47550e5a5268445a4c31ee23e2786e9cb9a2525dc844886b49da47e492a80f38a04084b9cdf9341d8d6934 diff --git a/vlc.spec b/vlc.spec index 0eb38ca..8c9781c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 6183d1e1530e5fee926a4fbbae8fe8628a2bcd57 +%global commit0 3e483547037e49f8ef828f2f0455593400968cf4 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} @@ -58,8 +58,8 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.18 -Release: 4%{?dist} +Version: 3.0.19 +Release: 0.1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -68,8 +68,6 @@ Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build Patch7: Switch-to-Fedora-lua-5.1.patch -# https://build.opensuse.org/package/view_file/openSUSE:Factory/vlc/vlc-libplacebo-5.patch?expand=1 -Patch8: vlc-libplacebo-5.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch @@ -336,7 +334,6 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac %patch7 -p1 sed -i -e 's/luac/luac-5.1/g' configure.ac %endif -%patch8 -p1 %patch9 -p1 @@ -603,6 +600,9 @@ fi || : %changelog +* Wed Mar 22 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.2 +- Update snapshot + * Sun Dec 25 2022 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.18-4 - Add libplacebo-5 From 616ec9c6650db7ecb6e579077c8a3cf65e42b7fc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 23 Mar 2023 14:12:20 +0100 Subject: [PATCH 649/671] Rebuilt --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 8c9781c..6d610bf 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.1%{?dist} +Release: 0.1%{?dist}.1 License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -600,6 +600,9 @@ fi || : %changelog +* Thu Mar 23 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.1.1 +- rebuilt + * Wed Mar 22 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.2 - Update snapshot From 03bf0f6caebc23a51d8f3b8a86af84b0484bad9f Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 26 Mar 2023 14:07:12 +0100 Subject: [PATCH 650/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 6d610bf..e174f4a 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.1%{?dist}.1 +Release: 0.2%{?dist}.1 License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -600,6 +600,9 @@ fi || : %changelog +* Sun Mar 26 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.2.1 +- rebuilt + * Thu Mar 23 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.1.1 - rebuilt From fb2170b2badcb963198e05360a9fc2074df8f79a Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 26 Mar 2023 14:11:18 +0100 Subject: [PATCH 651/671] Fix deprecated patch method --- vlc.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vlc.spec b/vlc.spec index e174f4a..9e87495 100644 --- a/vlc.spec +++ b/vlc.spec @@ -318,10 +318,10 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} -%patch3 -p1 +%patch -P3 -p1 %if 0%{?el7} -%patch5 -p1 -%patch6 -p1 +%patch -P5 -p1 +%patch -P6 -p1 # Lower opus requirement - rfbz#5585 sed -i -e 's/opus >= 1.0.3/opus >= 1.0.2/' configure.ac sed -i -e 's/opus_multistream_surround_encoder_create/opus_multistream_encoder_create/g' modules/codec/opus.c @@ -331,11 +331,11 @@ sed -i -e 's/taglib >= 1.9/taglib >= 1.8/' configure.ac . /opt/rh/devtoolset-%{dts_ver}/enable %endif %if 0%{?fedora} || 0%{?rhel} > 7 -%patch7 -p1 +%patch -P7 -p1 sed -i -e 's/luac/luac-5.1/g' configure.ac %endif -%patch9 -p1 +%patch -P9 -p1 %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : From c158dd0b566e8a141e14767a19e038a2f2da9f79 Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Mon, 10 Apr 2023 19:23:15 +0100 Subject: [PATCH 652/671] Rebuild for live555 --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 9e87495..245cfdd 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.2%{?dist}.1 +Release: 0.3%{?dist}.1 License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -600,6 +600,9 @@ fi || : %changelog +* Mon Apr 10 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.3.1 +- Rebuild for live555 + * Sun Mar 26 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.2.1 - rebuilt From 34397371fbab4c80487642eca02d769262032f3c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 11 Apr 2023 10:25:54 +0200 Subject: [PATCH 653/671] Remove right bump --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 245cfdd..1b6287f 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.3%{?dist}.1 +Release: 0.3%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz From 062d42a55f4b01a080643b92ba0757114fa283f0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Mon, 17 Apr 2023 09:30:21 +0200 Subject: [PATCH 654/671] Explicit comment about compat-ffmpeg4 usage --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 1b6287f..c49ef06 100644 --- a/vlc.spec +++ b/vlc.spec @@ -93,6 +93,8 @@ BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} BuildRequires: pkgconfig(dbus-1) %{?_with_faad2:BuildRequires: faad2-devel} +# vlc-3 works with ffmpeg <= 4 for vaapi support +#https://code.videolan.org/videolan/vlc/-/issues/26772 %if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 %{?_with_ffmpeg:BuildRequires: compat-ffmpeg4-devel} %else From f550af0ebb9782d61621d301af7e5d61053edd7c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Jun 2023 17:37:27 +0200 Subject: [PATCH 655/671] Rework freeworld --- vlc.spec | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vlc.spec b/vlc.spec index c49ef06..db0f367 100644 --- a/vlc.spec +++ b/vlc.spec @@ -6,26 +6,26 @@ %global _with_bootstrap 1 %if 0%{?!_without_freeworld:1} -%global _with_faad2 1 -%global _with_ffmpeg 1 -%global _with_libdca 1 %global _with_x264 1 %global _with_x265 1 -%global _with_xvidcore 1 %global _with_live555 1 -%global _with_vaapi 1 %endif %global _with_a52dec 1 +%global _with_aom 1 +%global _with_dav1d 1 +%global _with_faad2 1 +%global _with_ffmpeg 1 +%global _with_fluidsynth 1 +%global _with_freerdp 1 +%global _with_libdca 1 %global _with_libdvbpsi 1 %global _with_libmad 1 %global _with_libmpeg2 1 -%global _with_twolame 1 -%global _with_fluidsynth 1 %global _with_schroedinger 1 -%global _with_freerdp 1 -%global _with_dav1d 1 -%global _with_aom 1 +%global _with_twolame 1 +%global _with_vaapi 1 +%global _with_xvidcore 1 %ifarch x86_64 ppc64le aarch64 %if ! (0%{?fedora} >= 37) %global _with_asdcp 1 From 485563d78e50a5700630a6adfde9cda80f4f1e48 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Jun 2023 17:40:02 +0200 Subject: [PATCH 656/671] Update to 3.0.19.0 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 9f9eb94..f974dd1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-3e48354.tar.gz) = fca7723ab1760d6ca8cda0cd997039b9a2b0f4171d47550e5a5268445a4c31ee23e2786e9cb9a2525dc844886b49da47e492a80f38a04084b9cdf9341d8d6934 +SHA512 (vlc-df6ab08.tar.gz) = c1bb77f89c413a9e8d90e96abdc2f1825caa27c68c843875ebaf36aea26ae8011cfc9a016a79d73f9bb1da4eb164bfa54387c8e4fae72a778b7e462455f98cf1 diff --git a/vlc.spec b/vlc.spec index db0f367..b78b983 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 3e483547037e49f8ef828f2f0455593400968cf4 +%global commit0 df6ab0815338f6fbfda971e95cd6e3a9c626f91c %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -602,6 +602,9 @@ fi || : %changelog +* Tue Jun 13 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.4 +- Update snapshot + * Mon Apr 10 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.3.1 - Rebuild for live555 From 443c8e6219dfa4ec3c7726983348c04663d8eae2 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Tue, 13 Jun 2023 17:56:36 +0200 Subject: [PATCH 657/671] Switch to current 3.x branch --- sources | 2 +- vlc.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index f974dd1..5787eb7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-df6ab08.tar.gz) = c1bb77f89c413a9e8d90e96abdc2f1825caa27c68c843875ebaf36aea26ae8011cfc9a016a79d73f9bb1da4eb164bfa54387c8e4fae72a778b7e462455f98cf1 +SHA512 (vlc-26fb05e.tar.gz) = fc7c06f06eb8fe1af6a10103a7842590519c28c39388bbfea6611902aeaa152a9bbfd9a2e6fb9ab17af47aad5fdbd93b93175999bbf4713b3185304a58c1ef83 diff --git a/vlc.spec b/vlc.spec index b78b983..ed47a01 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 df6ab0815338f6fbfda971e95cd6e3a9c626f91c +%global commit0 26fb05e95724bd19f9a144c51bc11f79c609f3bc %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} From 8df13f605bc126353ee508bdcf3afeb8e0f7125b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 08:47:40 +0200 Subject: [PATCH 658/671] Drop libplacebo for rawhide --- vlc.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index ed47a01..a4c24e2 100644 --- a/vlc.spec +++ b/vlc.spec @@ -150,8 +150,9 @@ BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) -# Not Yet in EL8 -%if 0%{?fedora} +# Not Yet in EL - libplacebo-6 incompatible +# https://code.videolan.org/videolan/vlc/-/merge_requests/3950 +%if 0%{?fedora} && 0%{?fedora} < 39 BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) From 1d74fc70ac61fe9604089207e746ddad1e9fb7f6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 08:51:46 +0200 Subject: [PATCH 659/671] Update snapshot --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 5787eb7..7f9995e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-26fb05e.tar.gz) = fc7c06f06eb8fe1af6a10103a7842590519c28c39388bbfea6611902aeaa152a9bbfd9a2e6fb9ab17af47aad5fdbd93b93175999bbf4713b3185304a58c1ef83 +SHA512 (vlc-dfdc90c.tar.gz) = 67f55465fa3a410baad10d85deb56d2c08e92298e7d25d87352f61ba7c05f4c187adb2dbbd2d944171487d9f4492682ff69258a11ef9b76b245e592352f58afe diff --git a/vlc.spec b/vlc.spec index a4c24e2..6be513c 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 26fb05e95724bd19f9a144c51bc11f79c609f3bc +%global commit0 dfdc90c30a50a7e4fbdddeac2c06d51ade7ab385 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -603,6 +603,9 @@ fi || : %changelog +* Fri Jul 28 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.5 +- Update snapshot + * Tue Jun 13 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.4 - Update snapshot From b9132e4faf0bda9a751457031b4ed8d39e40adc0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 11:58:40 +0200 Subject: [PATCH 660/671] Add vlc-onevpl.patch --- vlc-onevpl.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 vlc-onevpl.patch diff --git a/vlc-onevpl.patch b/vlc-onevpl.patch new file mode 100644 index 0000000..3475fef --- /dev/null +++ b/vlc-onevpl.patch @@ -0,0 +1,24 @@ +diff -up vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/configure.ac.vpl vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/configure.ac +--- vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/configure.ac.vpl 2023-06-17 17:19:28.954540887 +0200 ++++ vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/configure.ac 2023-06-17 17:19:28.956540899 +0200 +@@ -2925,7 +2925,7 @@ fi + dnl + dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder + dnl +-PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto]) ++PKG_ENABLE_MODULES_VLC([MFX], [qsv], [vpl], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto]) + + dnl + dnl libfluidsynth (MIDI synthetizer) plugin +diff -up vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/modules/codec/qsv.c.vpl vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/modules/codec/qsv.c +--- vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/modules/codec/qsv.c.vpl 2023-06-09 17:29:29.000000000 +0200 ++++ vlc-26fb05e95724bd19f9a144c51bc11f79c609f3bc/modules/codec/qsv.c 2023-06-17 17:22:05.468382540 +0200 +@@ -33,7 +33,7 @@ + #include <vlc_picture.h> + #include <vlc_codec.h> + +-#include <mfx/mfxvideo.h> ++#include <vpl/mfxvideo.h> + + #define SOUT_CFG_PREFIX "sout-qsv-" + From adb509bfbdca1a1fc32fb181a40b2e984e02957d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 12:01:09 +0200 Subject: [PATCH 661/671] Apply onevpl --- vlc.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlc.spec b/vlc.spec index 6be513c..dc11143 100644 --- a/vlc.spec +++ b/vlc.spec @@ -64,6 +64,7 @@ License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +Patch4: vlc-onevpl.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build @@ -322,6 +323,9 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} %patch -P3 -p1 +%if 0%{?fedora} > 37 || 0%{?rhel} > 8 +%patch -P4 -p1 +%endif %if 0%{?el7} %patch -P5 -p1 %patch -P6 -p1 From 6a23f87ef081a452dfaee2c143a0c7b99d5af031 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 12:01:45 +0200 Subject: [PATCH 662/671] Update changelog --- vlc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/vlc.spec b/vlc.spec index dc11143..90973c9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -609,6 +609,7 @@ fi || : %changelog * Fri Jul 28 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.5 - Update snapshot +- Use onevpl for f38+ and el9+ * Tue Jun 13 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.4 - Update snapshot From ceb392cafa0709a477b79179a954fa4468f3eb7d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 12:29:02 +0200 Subject: [PATCH 663/671] Add patch --- 0001-po-Fixup-invalid-format-string.patch | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 0001-po-Fixup-invalid-format-string.patch diff --git a/0001-po-Fixup-invalid-format-string.patch b/0001-po-Fixup-invalid-format-string.patch new file mode 100644 index 0000000..2fd7609 --- /dev/null +++ b/0001-po-Fixup-invalid-format-string.patch @@ -0,0 +1,45 @@ +From 982f44d09bb61490194baf371d52c12016e0c5c9 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet <kwizart@gmail.com> +Date: Fri, 28 Jul 2023 12:25:44 +0200 +Subject: [PATCH] po: Fixup invalid format string + +Will fix the following errors + +oc.po:5301: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 1, the argument size specifier is invalid. +oc.po:5306: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 1, the argument size specifier is invalid. +oc.po:5312: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 1, the argument size specifier is invalid. + +Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> +--- + po/oc.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/po/oc.po b/po/oc.po +index 667696cfe785..ddb1677d8a53 100644 +--- a/po/oc.po ++++ b/po/oc.po +@@ -5298,18 +5298,18 @@ msgstr "Comanda+" + #: src/misc/update.c:482 + #, c-format + msgid "%.1f GiB" +-msgstr "%.lf Gio" ++msgstr "%.1f Gio" + + #: src/misc/update.c:484 + #, c-format + msgid "%.1f MiB" +-msgstr "%.lf Mio" ++msgstr "%.1f Mio" + + #: src/misc/update.c:486 modules/gui/macosx/VLCPlaylistInfo.m:138 + #: modules/gui/macosx/VLCPlaylistInfo.m:140 + #, c-format + msgid "%.1f KiB" +-msgstr "%.lf Kio" ++msgstr "%.1f Kio" + + #: src/misc/update.c:488 + #, c-format +-- +2.41.0 + From 1a0b4fb3576f69e9bf12fcd348281d92bc7fd98b Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 12:29:13 +0200 Subject: [PATCH 664/671] apply patch --- vlc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlc.spec b/vlc.spec index 90973c9..51426e3 100644 --- a/vlc.spec +++ b/vlc.spec @@ -63,6 +63,7 @@ Release: 0.5%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz +Patch2: 0001-po-Fixup-invalid-format-string.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch4: vlc-onevpl.patch Patch5: Lower-libgcrypt-to-1.5.3.patch @@ -322,6 +323,7 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} +%patch -P2 -p1 %patch -P3 -p1 %if 0%{?fedora} > 37 || 0%{?rhel} > 8 %patch -P4 -p1 From c44daa81c52a62d1c0ed1d322666632bebb281bd Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 17:16:09 +0200 Subject: [PATCH 665/671] Revert "Apply onevpl" This reverts commit adb509bfbdca1a1fc32fb181a40b2e984e02957d. --- vlc.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlc.spec b/vlc.spec index 51426e3..e40a134 100644 --- a/vlc.spec +++ b/vlc.spec @@ -65,7 +65,6 @@ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz Patch2: 0001-po-Fixup-invalid-format-string.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch -Patch4: vlc-onevpl.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build @@ -325,9 +324,6 @@ VLC media player extras modules. %setup -q -n %{vlc_setup} %patch -P2 -p1 %patch -P3 -p1 -%if 0%{?fedora} > 37 || 0%{?rhel} > 8 -%patch -P4 -p1 -%endif %if 0%{?el7} %patch -P5 -p1 %patch -P6 -p1 From 1a3be5f5f40e8769e0a58c2b0e4e7c0f5d7e68cc Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 17:19:31 +0200 Subject: [PATCH 666/671] Update changelog --- vlc.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlc.spec b/vlc.spec index e40a134..491ed0b 100644 --- a/vlc.spec +++ b/vlc.spec @@ -605,6 +605,9 @@ fi || : %changelog +* Fri Jul 28 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.6 +- Drop onevpl for now (see rfbz#6711) + * Fri Jul 28 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.5 - Update snapshot - Use onevpl for f38+ and el9+ From 725e2fb748415ff35d74a40b38a9b95962828960 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Fri, 28 Jul 2023 17:20:11 +0200 Subject: [PATCH 667/671] bump --- vlc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index 491ed0b..c7217b9 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.5%{?dist} +Release: 0.6%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz From a3d1f690d99aaf1528d4ec3874015b23d22d0e6d Mon Sep 17 00:00:00 2001 From: Leigh Scott <leigh123linux@gmail.com> Date: Sun, 6 Aug 2023 15:09:41 +0100 Subject: [PATCH 668/671] Rebuild --- vlc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlc.spec b/vlc.spec index c7217b9..c15cc74 100644 --- a/vlc.spec +++ b/vlc.spec @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.6%{?dist} +Release: 0.7%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -605,6 +605,9 @@ fi || : %changelog +* Sun Aug 06 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.7 +- rebuilt + * Fri Jul 28 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-0.6 - Drop onevpl for now (see rfbz#6711) From 3d8fcb06bf0f590c17768a3c41a55b65f0210b84 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 12 Oct 2023 11:34:21 +0200 Subject: [PATCH 669/671] Update to 3.0.19 --- sources | 2 +- vlc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 7f9995e..88897f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-dfdc90c.tar.gz) = 67f55465fa3a410baad10d85deb56d2c08e92298e7d25d87352f61ba7c05f4c187adb2dbbd2d944171487d9f4492682ff69258a11ef9b76b245e592352f58afe +SHA512 (vlc-32b50de.tar.gz) = 6a2b393cd45704528f9ef4aa894f552b93c0831f81dd54fa29ad877c0e5bc8bda836f830bf2d0bf049d482d4dad46135dddc73d28c5365bd15c1c33e460e72ed diff --git a/vlc.spec b/vlc.spec index c15cc74..857fbae 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,4 +1,4 @@ -%global commit0 dfdc90c30a50a7e4fbdddeac2c06d51ade7ab385 +%global commit0 32b50de2a28418ca9e843e91383dd09b4cd1c529 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global vlc_rc -rc2 %global vlc_setup vlc-%{?commit0} @@ -59,7 +59,7 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc Version: 3.0.19 -Release: 0.7%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz @@ -605,6 +605,9 @@ fi || : %changelog +* Thu Oct 12 2023 Nicolas Chauvet <kwizart@gmail.com> - 1:3.0.19-1 +- Update to 3.0.19 + * Sun Aug 06 2023 Leigh Scott <leigh123linux@gmail.com> - 1:3.0.19-0.7 - rebuilt From 5618e1ba0bc73c0fa6830e3794b3e6a8b9be4ed4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet <kwizart@gmail.com> Date: Thu, 12 Oct 2023 11:44:30 +0200 Subject: [PATCH 670/671] Drop merged patch --- vlc.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/vlc.spec b/vlc.spec index 857fbae..b5b4d25 100644 --- a/vlc.spec +++ b/vlc.spec @@ -63,7 +63,6 @@ Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz -Patch2: 0001-po-Fixup-invalid-format-string.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch @@ -322,7 +321,6 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} -%patch -P2 -p1 %patch -P3 -p1 %if 0%{?el7} %patch -P5 -p1 From 70b315d13328b7c77c8f60378be8883bbb216fbd Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team <packager@msvsphere-os.ru> Date: Tue, 31 Oct 2023 00:26:27 +0300 Subject: [PATCH 671/671] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index 88897f4..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (vlc-32b50de.tar.gz) = 6a2b393cd45704528f9ef4aa894f552b93c0831f81dd54fa29ad877c0e5bc8bda836f830bf2d0bf049d482d4dad46135dddc73d28c5365bd15c1c33e460e72ed