GNOME Bugzilla – Bug 792111
x264enc: Compilation Error with Git x264
Last modified: 2018-02-28 10:48:50 UTC
When I try to compile GStreamer from git against x264 compiled on Ubuntu 16.04LTS also from latest Git. I get compilation error as follows: make[3]: Entering directory '/home/tladmin/src/gstreamer/gst-plugins-ugly/ext/x264' CC libgstx264_la-gstx264enc.lo gstx264enc.c: In function ‘plugin_init’: gstx264enc.c:2927:36: error: ‘x264_bit_depth’ undeclared (first use in this function) default_vtable.x264_bit_depth = &x264_bit_depth;
Right, I guess that's related to https://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=71ed44c7312438fac7c5c5301e45522e57127db4
Here is the related ffmpeg fix: https://github.com/FFmpeg/FFmpeg/commit/650cb712efc47cf4c1f4f419ea220fcedc65f122
*** Bug 793809 has been marked as a duplicate of this bug. ***
The solution here would be to disable all the dlopen() related code when compiling with a new enough x264, check the compile-time #defines to see if it was only compiled for a single bit depth and otherwise assume that all formats are supported. And configure the bitdepth in the encoder parameters.
I'll have a look at this.
Created attachment 369090 [details] [review] x264enc: fix build with newer x264 with support for multiple bit depths
mit 83c38dc44622611c1f67dd26e4cb383c5aef90f6 (HEAD -> master) Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Feb 28 10:07:13 2018 +0000 x264enc: fix build with newer x264 with support for multiple bit depths libx264 used to be built for one specific bit depth, and if we wanted to support multiple bit depths we would have to dynamically load the right .so from different paths. That has changed now, and libx264 can include support for multiple depths in the same lib, so we don't need to do the dlopen() dance any more. We'll keep the vtable stuff around until we can drop support for older x264. gstx264enc.c:2927:36: error: ‘x264_bit_depth’ undeclared https://bugzilla.gnome.org/show_bug.cgi?id=792111