[gstreamer1-libav] Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders (rfbz#4334)

Leigh Scott leigh123linux at rpmfusion.org
Fri Nov 11 01:09:35 CET 2016


commit 578ce446d5b5fb5ccf50f9296c90256d0c44eba8
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Fri Nov 11 00:09:29 2016 +0000

    Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders (rfbz#4334)

 gstreamer1-libav.spec |  7 ++++++-
 ignore_vaapi.patch    | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec
index aea3514..9910738 100644
--- a/gstreamer1-libav.spec
+++ b/gstreamer1-libav.spec
@@ -1,12 +1,13 @@
 Name:           gstreamer1-libav
 Version:        1.8.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        GStreamer 1.0 libav-based plug-ins
 Group:          Applications/Multimedia
 License:        LGPLv2+
 URL:            http://gstreamer.freedesktop.org/
 Source0:        http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-%{version}.tar.xz
 Patch0:         gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch
+Patch1:         ignore_vaapi.patch
 BuildRequires:  gstreamer1-devel >= 1.6.0
 BuildRequires:  gstreamer1-plugins-base-devel >= 1.6.0
 BuildRequires:  orc-devel bzip2-devel zlib-devel ffmpeg-devel
@@ -42,6 +43,7 @@ plug-in.
 %prep
 %setup -q -n gst-libav-%{version}
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -69,6 +71,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgst*.la
 
 
 %changelog
+* Fri Nov 11 2016 Leigh Scott <leigh123linux at googlemail.com> - 1.8.2-3
+- Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders
+
 * Sat Jul 30 2016 Julian Sikorski <belegdol at fedoraproject.org> - 1.8.2-2
 - Rebuilt for ffmpeg-3.1.1
 
diff --git a/ignore_vaapi.patch b/ignore_vaapi.patch
new file mode 100644
index 0000000..a79c992
--- /dev/null
+++ b/ignore_vaapi.patch
@@ -0,0 +1,53 @@
+From 8666d9fda0be7f86f548297dc83b09d92824de49 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian at centricular.com>
+Date: Fri, 22 Jul 2016 14:42:59 +0300
+Subject: libav: Ignore VAAPI decoders and VAAPI/nvenc encoders
+
+These can show up when having a build against a system version of ffmpeg.
+
+diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
+index 53391ad..2fdff95 100644
+--- a/ext/libav/gstavviddec.c
++++ b/ext/libav/gstavviddec.c
+@@ -2061,6 +2061,13 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
+       goto next;
+     }
+ 
++    if (strstr (in_plugin->name, "vaapi")) {
++      GST_DEBUG
++          ("Ignoring VAAPI decoder %s. We can't handle this outside of ffmpeg",
++          in_plugin->name);
++      goto next;
++    }
++
+     GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
+ 
+     /* no codecs for which we're GUARANTEED to have better alternatives */
+diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c
+index 2d8391b..f22f697 100644
+--- a/ext/libav/gstavvidenc.c
++++ b/ext/libav/gstavvidenc.c
+@@ -973,6 +973,20 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
+       goto next;
+     }
+ 
++    if (strstr (in_plugin->name, "vaapi")) {
++      GST_DEBUG
++          ("Ignoring VAAPI encoder %s. We can't handle this outside of ffmpeg",
++          in_plugin->name);
++      goto next;
++    }
++
++    if (g_str_has_suffix (in_plugin->name, "_nvenc")) {
++      GST_DEBUG
++          ("Ignoring nvenc encoder %s. We can't handle this outside of ffmpeg",
++          in_plugin->name);
++      goto next;
++    }
++
+     /* only video encoders */
+     if (!av_codec_is_encoder (in_plugin)
+         || in_plugin->type != AVMEDIA_TYPE_VIDEO)
+-- 
+cgit v0.10.2
+


More information about the rpmfusion-commits mailing list