x264: Only enable dynamic loading code for x264 < 253

Otherwise we get some compiler warnings:

../subprojects/gst-plugins-ugly/ext/x264/gstx264enc.c:200:1: warning: ‘unload_x264’ defined but not used [-Wunused-function]
 unload_x264 (GstX264EncVTable * vtable)
 ^~~~~~~~~~~
../subprojects/gst-plugins-ugly/ext/x264/gstx264enc.c:154:1: warning: ‘load_x264’ defined but not used [-Wunused-function]
 load_x264 (const gchar * filename)
 ^~~~~~~~~
This commit is contained in:
Sebastian Dröge 2019-01-25 14:38:05 +02:00
parent 7ac2f7fec5
commit 2942f7d931

View file

@ -142,6 +142,7 @@ static GstX264EncVTable default_vtable;
static GstX264EncVTable *vtable_8bit = NULL, *vtable_10bit = NULL; static GstX264EncVTable *vtable_8bit = NULL, *vtable_10bit = NULL;
#if X264_BUILD < 153
#define LOAD_SYMBOL(name) G_STMT_START { \ #define LOAD_SYMBOL(name) G_STMT_START { \
if (!g_module_symbol (module, #name, (gpointer *) &vtable->name)) { \ if (!g_module_symbol (module, #name, (gpointer *) &vtable->name)) { \
GST_ERROR ("Failed to load '" #name "' from '%s'", filename); \ GST_ERROR ("Failed to load '" #name "' from '%s'", filename); \
@ -171,9 +172,7 @@ load_x264 (const gchar * filename)
"' from '%s'. Incompatible version?", filename); "' from '%s'. Incompatible version?", filename);
goto error; goto error;
} }
#if X264_BUILD < 153
LOAD_SYMBOL (x264_bit_depth); LOAD_SYMBOL (x264_bit_depth);
#endif
LOAD_SYMBOL (x264_chroma_format); LOAD_SYMBOL (x264_chroma_format);
LOAD_SYMBOL (x264_encoder_close); LOAD_SYMBOL (x264_encoder_close);
LOAD_SYMBOL (x264_encoder_delayed_frames); LOAD_SYMBOL (x264_encoder_delayed_frames);
@ -207,6 +206,7 @@ unload_x264 (GstX264EncVTable * vtable)
#endif #endif
#undef LOAD_SYMBOL #undef LOAD_SYMBOL
#endif
static gboolean static gboolean
gst_x264_enc_add_x264_chroma_format (GstStructure * s, gst_x264_enc_add_x264_chroma_format (GstStructure * s,