commit 1e5cee61f4fcd61c97c9eb8ef616b2e5c47f3d6a
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Thu Jan 18 14:51:52 2018 +0000
Update to 0.3.9
.gitignore | 1 +
ffmpeg35_buildfix.patch | 74 +++++++++++++++++++++++++++++++++++++++++++++++++
freshplayerplugin.spec | 20 +++++++------
sources | 2 +-
4 files changed, 88 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4991cc9..6fd706c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/freshplayerplugin-0.3.5.tar.gz
/freshplayerplugin-0.3.6.tar.gz
/freshplayerplugin-0.3.7.tar.gz
+/freshplayerplugin-0.3.9.tar.gz
diff --git a/ffmpeg35_buildfix.patch b/ffmpeg35_buildfix.patch
new file mode 100644
index 0000000..15d713b
--- /dev/null
+++ b/ffmpeg35_buildfix.patch
@@ -0,0 +1,74 @@
+From 934aa9c24d34f8203744b56e4ac6e8599446ca02 Mon Sep 17 00:00:00 2001
+From: Rinat Ibragimov <ibragimovrinat(a)mail.ru>
+Date: Tue, 26 Dec 2017 16:16:39 +0300
+Subject: [PATCH] ppb_video_decoder: use AV_ prefixed macros
+
+Looks like newer FFmpeg versions have droped old definitions.
+---
+ cmake/ffmpeg-compat/CMakeLists.txt | 1 +
+ cmake/ffmpeg-compat/cfg_avcodecflags.c | 4 ++++
+ cmake/ffmpeg-compat/ffmpeg_compat.h.in | 1 +
+ src/ppb_video_decoder.c | 11 ++++++++---
+ 4 files changed, 14 insertions(+), 3 deletions(-)
+ create mode 100644 cmake/ffmpeg-compat/cfg_avcodecflags.c
+
+diff --git a/cmake/ffmpeg-compat/CMakeLists.txt b/cmake/ffmpeg-compat/CMakeLists.txt
+index 732a71ee..8f67c581 100644
+--- a/cmake/ffmpeg-compat/CMakeLists.txt
++++ b/cmake/ffmpeg-compat/CMakeLists.txt
+@@ -29,6 +29,7 @@ MACRO_C_SOURCE_CHECK(cfg_av_pix_fmt_vdpau.c HAVE_AV_PIX_FMT_VDPAU)
+ MACRO_C_SOURCE_CHECK(cfg_avcodecid.c HAVE_AVCodecID)
+ MACRO_C_SOURCE_CHECK(cfg_avcodeccontext_get_buffer2.c HAVE_AVCodecContext_get_buffer2)
+ MACRO_C_SOURCE_CHECK(cfg_AVVDPAUContext.c HAVE_AVVDPAUContext)
++MACRO_C_SOURCE_CHECK(cfg_avcodecflags.c HAVE_AV_CODEC_FLAGS)
+
+ MACRO_SYMBOL_CHECK(av_frame_alloc "libavcodec/avcodec.h" HAVE_av_frame_alloc)
+ MACRO_SYMBOL_CHECK(av_frame_free "libavcodec/avcodec.h" HAVE_av_frame_free)
+diff --git a/cmake/ffmpeg-compat/cfg_avcodecflags.c
b/cmake/ffmpeg-compat/cfg_avcodecflags.c
+new file mode 100644
+index 00000000..d04de55b
+--- /dev/null
++++ b/cmake/ffmpeg-compat/cfg_avcodecflags.c
+@@ -0,0 +1,4 @@
++#include <libavcodec/avcodec.h>
++int main(void) {
++ return AV_CODEC_FLAG_TRUNCATED + AV_CODEC_CAP_TRUNCATED;
++}
+diff --git a/cmake/ffmpeg-compat/ffmpeg_compat.h.in
b/cmake/ffmpeg-compat/ffmpeg_compat.h.in
+index dd40922c..da7834b1 100644
+--- a/cmake/ffmpeg-compat/ffmpeg_compat.h.in
++++ b/cmake/ffmpeg-compat/ffmpeg_compat.h.in
+@@ -6,3 +6,4 @@
+ #define HAVE_av_frame_free (@HAVE_av_frame_free@)
+ #define HAVE_avcodec_free_context (@HAVE_avcodec_free_context@)
+ #define HAVE_AVVDPAUContext (@HAVE_AVVDPAUContext@)
++#define HAVE_AV_CODEC_FLAGS (@HAVE_AV_CODEC_FLAGS@)
+diff --git a/src/ppb_video_decoder.c b/src/ppb_video_decoder.c
+index eb150725..23647cdd 100644
+--- a/src/ppb_video_decoder.c
++++ b/src/ppb_video_decoder.c
+@@ -70,6 +70,11 @@
+ #define AV_CODEC_ID_H264 CODEC_ID_H264
+ #endif // !HAVE_AVCodecID
+
++#if !HAVE_AV_CODEC_FLAGS
++#define AV_CODEC_CAP_TRUNCATED CODEC_CAP_TRUNCATED
++#define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED
++#endif // !HAVE_AV_CODEC_FLAGS
++
+ enum hwdec_api_e {
+ HWDEC_NONE = 0,
+ HWDEC_VAAPI,
+@@ -620,9 +625,9 @@ initialize_decoder(struct pp_video_decoder_s *vd)
+ goto err;
+ }
+
+- if (vd->avcodec->capabilities & CODEC_CAP_TRUNCATED) {
+- trace_info("%s, codec have CODEC_CAP_TRUNCATED\n", __func__);
+- vd->avctx->flags |= CODEC_FLAG_TRUNCATED;
++ if (vd->avcodec->capabilities & AV_CODEC_CAP_TRUNCATED) {
++ trace_info("%s, codec have AV_CODEC_CAP_TRUNCATED\n", __func__);
++ vd->avctx->flags |= AV_CODEC_FLAG_TRUNCATED;
+ }
+
+ vd->avctx->opaque = vd;
diff --git a/freshplayerplugin.spec b/freshplayerplugin.spec
index f05a98f..8751070 100644
--- a/freshplayerplugin.spec
+++ b/freshplayerplugin.spec
@@ -1,14 +1,15 @@
Name: freshplayerplugin
-Version: 0.3.7
-Release: 5%{?dist}
+Version: 0.3.9
+Release: 1%{?dist}
Summary: PPAPI-host NPAPI-plugin adapter
Group: Applications/Internet
License: MIT
-URL:
https://github.com/i-rinat/freshplayerplugin
-Source0:
https://github.com/i-rinat/%{name}/archive/v%{version}/%{name}-%{version}...
+URL:
https://github.com/i-rinat/%{name}
+Source0: %url/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch0:
%url/commit/934aa9c24d34f8203744b56e4ac6e8599446ca02.patch#/ffmpeg35_buildfix.patch
BuildRequires: gcc-c++
-BuildRequires: cmake
+BuildRequires: cmake3
BuildRequires: make
BuildRequires: ragel
BuildRequires: glib2-devel
@@ -66,7 +67,7 @@ Second way will be used for the project. It will benefit other browsers
too,
not only Firefox.
%prep
-%autosetup
+%autosetup -p1
# Disable 3D (because some intel graphics i915 and others display slow videos)
#sed -i 's|enable_3d = 1|enable_3d = 0|g' data/freshwrapper.conf.example
#sed -i 's|enable_3d = 1,|enable_3d = 0,|g'
src/config.c
@@ -74,12 +75,12 @@ not only Firefox.
%build
mkdir build
cd build
-%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_SKIP_RPATH=true ..
+%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_SKIP_RPATH=true ..
%make_build
%install
pushd build
- %make_install
+%make_install
popd
install -Dm 0644 data/freshwrapper.conf.example %{buildroot}/etc/freshwrapper.conf
@@ -90,6 +91,9 @@ install -Dm 0644 data/freshwrapper.conf.example
%{buildroot}/etc/freshwrapper.co
%config(noreplace) %{_sysconfdir}/freshwrapper.conf
%changelog
+* Thu Jan 18 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 0.3.9-1
+- Update to 0.3.9
+
* Thu Jan 18 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 0.3.7-5
- Rebuilt for ffmpeg-3.5 git
diff --git a/sources b/sources
index cba0a6d..8b72dba 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9076ce1e61c9ec12234306b62afff9ce freshplayerplugin-0.3.7.tar.gz
+a6ccf674b64e250b334ffcb748dd2317 freshplayerplugin-0.3.9.tar.gz