Hello community,

here is the log from the commit of package gstreamer-plugins-vaapi for 
openSUSE:Factory checked in at 2017-11-17 10:56:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer-plugins-vaapi (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer-plugins-vaapi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer-plugins-vaapi"

Fri Nov 17 10:56:40 2017 rev:19 rq:542256 version:1.12.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gstreamer-plugins-vaapi/gstreamer-plugins-vaapi.changes
  2017-09-25 13:58:30.566491289 +0200
+++ 
/work/SRC/openSUSE:Factory/.gstreamer-plugins-vaapi.new/gstreamer-plugins-vaapi.changes
     2017-11-17 11:00:47.606988734 +0100
@@ -1,0 +2,11 @@
+Thu Nov 16 13:26:49 UTC 2017 - [email protected]
+
+- Add gst-vaapi-version-fix.patch: Fix build with new libva 2.0
+  version (bgo#784398, bgo#786173, bgo#787818).
+- Following the above, add libtool BuildRequires and pass
+  autogen.sh before configure, as the patch touches buildsystem.
+- Further drop pkgconfig(libva-egl) and pkgconfig(libva-tpi)
+  BuildRequires: No longer available.
+- Also drop obsolete --disable-builtin-libvpx configure call.
+
+-------------------------------------------------------------------

New:
----
  gst-vaapi-version-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gstreamer-plugins-vaapi.spec ++++++
--- /var/tmp/diff_new_pack.lU9GV6/_old  2017-11-17 11:00:48.170968093 +0100
+++ /var/tmp/diff_new_pack.lU9GV6/_new  2017-11-17 11:00:48.174967946 +0100
@@ -26,9 +26,13 @@
 Group:          Productivity/Multimedia/Other
 Url:            https://gstreamer.freedesktop.org/
 Source0:        
https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM gst-vaapi-version-fix.patch bgo#784398 
[email protected] -- Fix build with new libva 2.0
+Patch0:         gst-vaapi-version-fix.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  Mesa-libGLESv3-devel
 BuildRequires:  gtk-doc
+# Needed for patch0
+BuildRequires:  libtool
 BuildRequires:  pkgconfig
 BuildRequires:  vaapi-wayland-tools
 BuildRequires:  yasm
@@ -42,9 +46,7 @@
 BuildRequires:  pkgconfig(libudev)
 BuildRequires:  pkgconfig(libva) >= 0.30.4
 BuildRequires:  pkgconfig(libva-drm) >= 0.33.0
-BuildRequires:  pkgconfig(libva-egl)
 BuildRequires:  pkgconfig(libva-glx)
-BuildRequires:  pkgconfig(libva-tpi)
 BuildRequires:  pkgconfig(libva-wayland)
 BuildRequires:  pkgconfig(libva-x11)
 BuildRequires:  pkgconfig(vpx)
@@ -88,11 +90,13 @@
 
 %prep
 %setup -q -n gstreamer-vaapi-%{version}
+%patch0 -p1
 
 %build
+# Needed for patch0
+NOCONFIGURE=1 ./autogen.sh
 %configure \
        --disable-static \
-       --disable-builtin-libvpx \
        --enable-egl \
        --enable-encoders \
        --enable-drm \

++++++ gst-vaapi-version-fix.patch ++++++
>From 9cf26c81a17a71c4ededd944d2668b576a4e404b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Thu, 24 Aug 2017 21:51:22 +0200
Subject: libs: decoder: at update_caps() decode codec_data

When updating the caps in decoder, if the caps has codec_data (avC
format), it has to be parsed to update the state of the decoder.

https://bugzilla.gnome.org/show_bug.cgi?id=786173

diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c 
b/gst-libs/gst/vaapi/gstvaapidecoder.c
index ce9c065..9e716db 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder.c
@@ -1182,10 +1182,8 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * 
decoder, GstCaps * caps)
   if (!decoder_caps)
     return FALSE;
 
-  if (gst_caps_is_always_compatible (caps, decoder_caps)) {
-    set_caps (decoder, caps);
-    return TRUE;
-  }
+  if (gst_caps_is_always_compatible (caps, decoder_caps))
+    return set_caps (decoder, caps);
 
   profile = gst_vaapi_profile_from_caps (caps);
   if (profile == GST_VAAPI_PROFILE_UNKNOWN)
@@ -1194,8 +1192,11 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * 
decoder, GstCaps * caps)
   if (codec == 0)
     return FALSE;
   if (codec == decoder->codec) {
-    set_caps (decoder, caps);
-    return TRUE;
+    if (set_caps (decoder, caps)) {
+      return
+          gst_vaapi_decoder_decode_codec_data (decoder) ==
+          GST_VAAPI_DECODER_STATUS_SUCCESS;
+    }
   }
 
   return FALSE;
-- 
cgit v0.10.2


>From a4c60fb2a96e52bf3244a0ae74d3d2eeaea3acc1 Mon Sep 17 00:00:00 2001
From: Hyunjun Ko <[email protected]>
Date: Mon, 18 Sep 2017 14:29:55 +0900
Subject: libs: decoder: h264/h265: decode codec data only if opened

Fixes regression introduced by commit 2eb2b26a.

There is a use case when the decoder set the src caps and immediatly
tries to process the media codec_data, this happens before decoder is
even opened, thus priv->parser is not instantiated yet.

https://bugzilla.gnome.org/show_bug.cgi?id=787818

diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c 
b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index da9b291..d76c387 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -4309,6 +4309,9 @@ gst_vaapi_decoder_h264_decode_codec_data (GstVaapiDecoder 
* base_decoder,
   GstH264ParserResult result;
   guint i, ofs, num_sps, num_pps;
 
+  if (!priv->is_opened)
+    return GST_VAAPI_DECODER_STATUS_SUCCESS;
+
   unit.parsed_info = NULL;
 
   if (buf_size < 7)
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c 
b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
index bc80754..53093d3 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
@@ -2653,6 +2653,9 @@ gst_vaapi_decoder_h265_decode_codec_data (GstVaapiDecoder 
*
   guint num_nal_arrays, num_nals;
   guint i, j, ofs;
 
+  if (!priv->is_opened)
+    return GST_VAAPI_DECODER_STATUS_SUCCESS;
+
   unit.parsed_info = NULL;
   if (buf_size < 23)
     return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
-- 
cgit v0.10.2


>From 6b98d6a0763e366e3d663c7ba91c5d5cf9c17bbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Mon, 25 Sep 2017 15:50:19 +0200
Subject: vaapidecode: drain pending frames before set format

Drain pending frames, if any, in the internal decoder before setting
the new negotiated format.

https://bugzilla.gnome.org/show_bug.cgi?id=786173

diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index 9401fe8..71436cd 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -1071,6 +1071,8 @@ gst_vaapidecode_set_format (GstVideoDecoder * vdec, 
GstVideoCodecState * state)
 
   if (!gst_vaapi_decode_input_state_replace (decode, state))
     return TRUE;
+  if (gst_vaapidecode_drain (vdec) == GST_FLOW_ERROR)
+    return FALSE;
   if (!gst_vaapidecode_update_sink_caps (decode, state->caps))
     return FALSE;
   if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
-- 
cgit v0.10.2


>From e5ef90f98d9e6a82b1d287018017608bd9cea8d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Mon, 25 Sep 2017 17:04:12 +0200
Subject: vaapiencode: flush pending frames before set format

Flush pending frames, if any, in the internal encorder, before setting
the new negotiated format.

https://bugzilla.gnome.org/show_bug.cgi?id=786173

diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c
index 5712a7d..fc50f71 100644
--- a/gst/vaapi/gstvaapiencode.c
+++ b/gst/vaapi/gstvaapiencode.c
@@ -553,6 +553,22 @@ set_codec_state (GstVaapiEncode * encode, 
GstVideoCodecState * state)
 }
 
 static gboolean
+gst_vaapiencode_drain (GstVaapiEncode * encode)
+{
+  GstVaapiEncoderStatus status;
+
+  if (!encode->encoder)
+    return TRUE;
+
+  status = gst_vaapi_encoder_flush (encode->encoder);
+  if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
+    return FALSE;
+  gst_vaapiencode_purge (encode);
+
+  return TRUE;
+}
+
+static gboolean
 gst_vaapiencode_set_format (GstVideoEncoder * venc, GstVideoCodecState * state)
 {
   GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
@@ -567,6 +583,9 @@ gst_vaapiencode_set_format (GstVideoEncoder * venc, 
GstVideoCodecState * state)
           state->caps, NULL))
     return FALSE;
 
+  if (!gst_vaapiencode_drain (encode))
+    return FALSE;
+
   if (encode->input_state)
     gst_video_codec_state_unref (encode->input_state);
   encode->input_state = gst_video_codec_state_ref (state);
@@ -763,17 +782,14 @@ static gboolean
 gst_vaapiencode_flush (GstVideoEncoder * venc)
 {
   GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
-  GstVaapiEncoderStatus status;
 
   if (!encode->encoder)
     return FALSE;
 
   GST_LOG_OBJECT (encode, "flushing");
 
-  status = gst_vaapi_encoder_flush (encode->encoder);
-  if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
+  if (!gst_vaapiencode_drain (encode))
     return FALSE;
-  gst_vaapiencode_purge (encode);
 
   gst_vaapi_encoder_replace (&encode->encoder, NULL);
   if (!ensure_encoder (encode))
-- 
cgit v0.10.2



>From 0d710edb0684c5f461bf7d77814d559114d9179a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Tue, 11 Jul 2017 16:55:26 +0200
Subject: build: blacklist only libva 0.99.0

Intel's MSDK uses libva 0.99.0, meanwhile open source libva bumped
its API version to 1.0.0. Thus we have to blacklist only the MSDK's
libva (0.99.0)

https://bugzilla.gnome.org/show_bug.cgi?id=784398

diff --git a/configure.ac b/configure.ac
index d6661df..20dae22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -484,7 +484,7 @@ dnl -- VA-API                                               
                 --
 dnl ---------------------------------------------------------------------------
 
 dnl Core API
-PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_REQ libva < 0.99.0])
+PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_REQ libva != 0.99.0])
 VA_VERSION_STR=`$PKG_CONFIG --modversion libva`
 VA_DRIVERS_PATH=`$PKG_CONFIG --variable=driverdir libva`
 AC_DEFINE_UNQUOTED([VA_DRIVERS_PATH], ["$VA_DRIVERS_PATH"],
diff --git a/meson.build b/meson.build
index 5b41dda..beb74e4 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,7 @@ else
   gst_version_nano = 0
 endif
 
+libva_req = ['>= 0.30.4', '!= 0.99.0']
 glib_req = '>= 2.40.0'
 gst_req = '>= @0@.@[email protected]'.format(gst_version_major, gst_version_minor)
 
@@ -37,7 +38,7 @@ gstcodecparsers_dep = 
dependency('gstreamer-codecparsers-1.0', version : gst_req
 gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
     fallback : ['gst-plugins-bad', 'gstgl_dep'], required: false)
 gmodule_dep = dependency('gmodule-2.0', required: false)
-libva_dep = dependency('libva', version: ['>= 0.30.4', '< 0.99.0'])
+libva_dep = dependency('libva', version: libva_req)
 
 libva_drm_dep = dependency('libva-drm', version: '>= 0.33.0', required: false)
 libva_wayland_dep = dependency('libva-wayland', version: '>= 0.33.0', 
required: false)
-- 
cgit v0.10.2


>From de014623d60156a734f3f7e5af30c85afe9b0b80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Tue, 11 Jul 2017 17:27:32 +0200
Subject: libs: decoder: h264: libva 1.0 deprecated baseline

libva 1.0 deprecated H.264 baseline profile and FMO support
(commit b4f332b3).

https://bugzilla.gnome.org/show_bug.cgi?id=784398

diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c 
b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index d76c387..ae644c6 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -3781,9 +3781,12 @@ fill_picture (GstVaapiDecoderH264 * decoder, 
GstVaapiPictureH264 * picture)
   COPY_FIELD (sps, bit_depth_luma_minus8);
   COPY_FIELD (sps, bit_depth_chroma_minus8);
   COPY_FIELD (sps, num_ref_frames);
+#if !VA_CHECK_VERSION(1,0,0)
+  /* Deprecate H.264 baseline profile and FMO support */
   COPY_FIELD (pps, num_slice_groups_minus1);
   COPY_FIELD (pps, slice_group_map_type);
   COPY_FIELD (pps, slice_group_change_rate_minus1);
+#endif
   COPY_FIELD (pps, pic_init_qp_minus26);
   COPY_FIELD (pps, pic_init_qs_minus26);
   COPY_FIELD (pps, chroma_qp_index_offset);
-- 
cgit v0.10.2


>From 4c77aba7ceeb39748bc08a3a98cd0b8a53c4c297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Tue, 11 Jul 2017 17:29:13 +0200
Subject: libs: utils: libva 1.0 changed the logging

The logging mechanism in libva has changed it's functions
signatures. This patch updates that for libva versions >= 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=784398

diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c 
b/gst-libs/gst/vaapi/gstvaapiutils.c
index 0ed1efe..c24bed7 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils.c
@@ -46,15 +46,43 @@
 #define STRCASE(x)      case x: return STRINGIFY(x)
 
 #if VA_CHECK_VERSION (0,40,0)
-static void
-gst_vaapi_log (const char *message)
+static gchar *
+strip_msg (const char *message)
 {
   gchar *msg;
 
   msg = g_strdup (message);
   if (!msg)
+    return NULL;
+  return g_strstrip (msg);
+}
+
+#if VA_CHECK_VERSION (1,0,0)
+static void
+gst_vaapi_err (void *data, const char *message)
+{
+  gchar *msg;
+
+  msg = strip_msg (message);
+  if (!msg)
+    return;
+  GST_ERROR ("%s", msg);
+  g_free (msg);
+}
+#endif
+
+static void
+gst_vaapi_log (
+#if VA_CHECK_VERSION (1,0,0)
+    void *data,
+#endif
+    const char *message)
+{
+  gchar *msg;
+
+  msg = strip_msg (message);
+  if (!msg)
     return;
-  g_strchomp (msg);
   GST_INFO ("%s", msg);
   g_free (msg);
 }
@@ -66,7 +94,10 @@ vaapi_initialize (VADisplay dpy)
   gint major_version, minor_version;
   VAStatus status;
 
-#if VA_CHECK_VERSION (0,40,0)
+#if VA_CHECK_VERSION (1,0,0)
+  vaSetErrorCallback (dpy, gst_vaapi_err, NULL);
+  vaSetInfoCallback (dpy, gst_vaapi_log, NULL);
+#elif VA_CHECK_VERSION (0,40,0)
   vaSetInfoCallback (gst_vaapi_log);
 #endif
 
-- 
cgit v0.10.2


>From 520ec3c9a3682aa9068ea60f8f53c010b4c5e7b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Fri, 25 Aug 2017 16:07:34 +0200
Subject: libs: guard deprecated symbols

In VA-API 1.0 the H.264 baseline profile is deprecated. This patch
guards the H.264 baseline usage. Consider this commit as a
continuation of commit e0e0a474

https://bugzilla.gnome.org/show_bug.cgi?id=784398

diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c 
b/gst-libs/gst/vaapi/gstvaapiprofile.c
index 9c353c5..6e8fd0a 100644
--- a/gst-libs/gst/vaapi/gstvaapiprofile.c
+++ b/gst-libs/gst/vaapi/gstvaapiprofile.c
@@ -94,8 +94,10 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
   {GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
       "video/x-h263, variant=itu, h263version=h263", "baseline"},
 #endif
+#if !VA_CHECK_VERSION(1,0,0)
   {GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
       "video/x-h264", "baseline"},
+#endif
 #if VA_CHECK_VERSION(0,31,1)
   {GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
         VAProfileH264ConstrainedBaseline,
diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c 
b/gst-libs/gst/vaapi/gstvaapiutils.c
index c24bed7..0f1c2cf 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils.c
@@ -206,7 +206,9 @@ string_of_VAProfile (VAProfile profile)
       MAP (H263Baseline);
       MAP (H264ConstrainedBaseline);
 #endif
+#if !VA_CHECK_VERSION(1,0,0)
       MAP (H264Baseline);
+#endif
       MAP (H264Main);
       MAP (H264High);
 #if VA_CHECK_VERSION(0,35,2)
-- 
cgit v0.10.2


>From 325ecbc1eed2c6a331ea8c94280c1a91613a320d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
 <[email protected]>
Date: Fri, 25 Aug 2017 16:22:59 +0200
Subject: libs: encoder: h264: handle deprecated enum

In VA-API 1.0 the enum VAEncPackedHeaderH264_SEI is deprecated, and
instead VAEncPackedHeaderRawData should be used.

This patch creates a compatibility symbol,
VA_ENC_PACKED_HEADER_H264_SEI, to expose the used enum according the
VA-API version.

https://bugzilla.gnome.org/show_bug.cgi?id=784398

diff --git a/gst-libs/gst/vaapi/gstvaapicompat.h 
b/gst-libs/gst/vaapi/gstvaapicompat.h
index 781e30d..697046e 100644
--- a/gst-libs/gst/vaapi/gstvaapicompat.h
+++ b/gst-libs/gst/vaapi/gstvaapicompat.h
@@ -37,6 +37,12 @@
 #define vaAssociateSubpicture   vaAssociateSubpicture2
 #endif
 
+#if VA_CHECK_VERSION(1,0,0)
+#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
+#else
+#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
+#endif
+
 /* Compatibility glue with VA-API 0.34 */
 #if VA_CHECK_VERSION(0,34,0)
 # include <va/va_compat.h>
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c 
b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index 0d4d96c..f091eb9 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -1506,7 +1506,7 @@ add_packed_sei_header (GstVaapiEncoderH264 * encoder,
   data_bit_size = GST_BIT_WRITER_BIT_SIZE (&bs);
   data = GST_BIT_WRITER_DATA (&bs);
 
-  packed_sei_param.type = VAEncPackedHeaderH264_SEI;
+  packed_sei_param.type = VA_ENC_PACKED_HEADER_H264_SEI;
   packed_sei_param.bit_length = data_bit_size;
   packed_sei_param.has_emulation_bytes = 0;
 
-- 
cgit v0.10.2




Reply via email to