pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia/gst-plugins1-ugly gst-plugin1-x264 (yes, re...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8c526caf6dfa
branches:  trunk
changeset: 376410:8c526caf6dfa
user:      snj <snj%pkgsrc.org@localhost>
date:      Thu Mar 01 22:31:08 2018 +0000

description:
gst-plugin1-x264 (yes, really): fix build with x264-devel-20180224

diffstat:

 multimedia/gst-plugins1-ugly/distinfo                            |   3 +-
 multimedia/gst-plugins1-ugly/patches/patch-ext_x264_gstx264enc.c |  80 ++++++++++
 2 files changed, 82 insertions(+), 1 deletions(-)

diffs (97 lines):

diff -r 69f519bfe1c2 -r 8c526caf6dfa multimedia/gst-plugins1-ugly/distinfo
--- a/multimedia/gst-plugins1-ugly/distinfo     Thu Mar 01 20:10:57 2018 +0000
+++ b/multimedia/gst-plugins1-ugly/distinfo     Thu Mar 01 22:31:08 2018 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.28 2017/11/10 09:26:48 prlw1 Exp $
+$NetBSD: distinfo,v 1.29 2018/03/01 22:31:08 snj Exp $
 
 SHA1 (gst-plugins-ugly-1.12.3.tar.xz) = 28e7a492a96ff6845d9fe8509031a2ab9fcbf046
 RMD160 (gst-plugins-ugly-1.12.3.tar.xz) = 6c740784b09e73523dc568cb32ab7d86522a3855
 SHA512 (gst-plugins-ugly-1.12.3.tar.xz) = 9ca5769c325df3d2d97ba83d785fab08da5119f6d26c4ac4db72853af143477ea8fb7087464a8614b6e59f384463ac01087ee76cec2af8acd80a4dc15e392e34
 Size (gst-plugins-ugly-1.12.3.tar.xz) = 903784 bytes
 SHA1 (patch-configure) = f8fcbcebcb55334ba66c22076d6d01382444c930
+SHA1 (patch-ext_x264_gstx264enc.c) = e7001ca77a1397b76bf70bdc257f1a6d448b1809
diff -r 69f519bfe1c2 -r 8c526caf6dfa multimedia/gst-plugins1-ugly/patches/patch-ext_x264_gstx264enc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/gst-plugins1-ugly/patches/patch-ext_x264_gstx264enc.c  Thu Mar 01 22:31:08 2018 +0000
@@ -0,0 +1,80 @@
+$NetBSD: patch-ext_x264_gstx264enc.c,v 1.1 2018/03/01 22:31:08 snj Exp $
+
+Fix build with newer libx264.  From:
+https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=83c38dc44622611c1f67dd26e4cb383c5aef90f6
+
+--- ext/x264/gstx264enc.c.orig 2017-07-25 01:26:28.000000000 -0700
++++ ext/x264/gstx264enc.c      2018-03-01 14:16:58.880753252 -0800
+@@ -117,7 +117,9 @@ struct _GstX264EncVTable
+ {
+   GModule *module;
+ 
++#if X264_BUILD < 153
+   const int *x264_bit_depth;
++#endif
+   const int *x264_chroma_format;
+   void (*x264_encoder_close) (x264_t *);
+   int (*x264_encoder_delayed_frames) (x264_t *);
+@@ -170,8 +172,9 @@ load_x264 (const gchar * filename)
+         "' from '%s'. Incompatible version?", filename);
+     goto error;
+   }
+-
++#if X264_BUILD < 153
+   LOAD_SYMBOL (x264_bit_depth);
++#endif
+   LOAD_SYMBOL (x264_chroma_format);
+   LOAD_SYMBOL (x264_encoder_close);
+   LOAD_SYMBOL (x264_encoder_delayed_frames);
+@@ -288,6 +291,7 @@ gst_x264_enc_add_x264_chroma_format (Gst
+   return ret;
+ }
+ 
++#if X264_BUILD < 153
+ static gboolean
+ load_x264_libraries (void)
+ {
+@@ -326,6 +330,33 @@ load_x264_libraries (void)
+   return TRUE;
+ }
+ 
++#else /* X264_BUILD >= 153 */
++
++static gboolean
++load_x264_libraries (void)
++{
++#if X264_BIT_DEPTH == 0         /* all */
++  vtable_8bit = &default_vtable;
++  vtable_10bit = &default_vtable;
++#elif X264_BIT_DEPTH == 8
++  vtable_8bit = &default_vtable;
++#elif X264_BIT_DEPTH == 10
++  vtable_10bit = &default_vtable;
++#else
++#error "unexpected X264_BIT_DEPTH value"
++#endif
++
++#ifdef HAVE_X264_ADDITIONAL_LIBRARIES
++  GST_WARNING ("Ignoring configured additional libraries %s, using libx264 "
++      "version enabled for multiple bit depths",
++      HAVE_X264_ADDITIONAL_LIBRARIES);
++#endif
++
++  return TRUE;
++}
++
++#endif
++
+ enum
+ {
+   ARG_0,
+@@ -2897,7 +2928,9 @@ plugin_init (GstPlugin * plugin)
+    * if needed. We can't initialize statically because these values are not
+    * constant on Windows. */
+   default_vtable.module = NULL;
++#if X264_BUILD < 153
+   default_vtable.x264_bit_depth = &x264_bit_depth;
++#endif
+   default_vtable.x264_chroma_format = &x264_chroma_format;
+   default_vtable.x264_encoder_close = x264_encoder_close;
+   default_vtable.x264_encoder_delayed_frames = x264_encoder_delayed_frames;



Home | Main Index | Thread Index | Old Index