GNOME Bugzilla – Bug 763297
x264enc: Add parameter to explicitly load a specific x264 library
Last modified: 2016-11-15 12:55:23 UTC
See commit message. What an awful library packaging /o\
Created attachment 323361 [details] [review] x264enc: Add parameter to explicitly load a specific x264 library We still use the headers and default symbols given by the linker, but we now allow loading a x264 library from a specific path too. This is useful for running x264enc with a 8-bit and 10-bit x264 library in the same process. Both are ABI compatible but are different libraries.
The 10-bit variant doesn't support 8-bit encoding?
Correct, and the 12 bit variant doesn't support 10 or 8 bit :) (But we don't support 12 bits in GStreamer currently).
It'd be nice if there was a way that exposed different elements for the different lib options then, so the app doesn't have to know.
but those elements would still have to know where the 10-bit/8-bit variants are packaged, and iirc, making assumptions about packaging of libx264 8-bit vs. 10-bit on various distros is difficult/unfeasible to do. so the app would have to know the library paths after all.
Exactly, there is no standard location for the different libs, they gave the same name and there's only a single pkg-config file. It's a complete packaging failure on the x264 side we're working around here.
Any chance we can convince the x264 guys to create different sonames for 10/12-bit versions ?
Considering how active that project currently is... probably not.
Are you ok with merging then or do you have any concerns? :)
I think we should at least try to get this done properly upstream first? Didn't you get some patches merged recently?
After some discussion on IRC the game plan is as follows: - remove runtime lib path property - add configure options for additional lib versions for different depths - just do the right thing in x264enc and pick from available libs based on input format
Created attachment 339615 [details] [review] x264enc: Add configure parameter to specify additional x264 libraries x264 has to be compiled specifically for a target bit depth. Distributions currently ship various libraries in their packages, with different bit depths. This change now allows to provide them all at configure time and have the x264enc element dynamically switch between them based on the bit depth of the input format.
Created attachment 339617 [details] [review] x264enc: Add configure parameter to specify additional x264 libraries x264 has to be compiled specifically for a target bit depth. Distributions currently ship various libraries in their packages, with different bit depths. This change now allows to provide them all at configure time and have the x264enc element dynamically switch between them based on the bit depth of the input format.
Created attachment 339815 [details] [review] x264enc: Add configure parameter to specify additional x264 libraries x264 has to be compiled specifically for a target bit depth. Distributions currently ship various libraries in their packages, with different bit depths. This change now allows to provide them all at configure time and have the x264enc element dynamically switch between them based on the bit depth of the input format.
Created attachment 339816 [details] [review] x264enc: Add configure parameter to specify additional x264 libraries with e.g. different depth configuration x264 has to be compiled specifically for a target bit depth. Distributions currently ship various libraries in their packages, with different bit depths. This change now allows to provide them all at configure time and have the x264enc element dynamically switch between them based on the bit depth of the input format.
Attachment 339816 [details] pushed as 7bf576b - x264enc: Add configure parameter to specify additional x264 libraries with e.g. different depth configuration