Build media backends with common_cflags and export the symbol

Fixes: #2771
This commit is contained in:
Qiu Wenbo 2020-05-22 16:45:44 +08:00
parent 2da14da32c
commit 340a8e11b0
6 changed files with 19 additions and 6 deletions

View File

@ -96,6 +96,8 @@ gtk_gst_media_file_paintable_init (GdkPaintableInterface *iface)
G_DEFINE_TYPE_EXTENDED (GtkGstMediaFile, gtk_gst_media_file, GTK_TYPE_MEDIA_FILE, 0,
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
gtk_gst_media_file_paintable_init))
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -107,17 +109,20 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
G_GNUC_NORETURN
void
g_io_module_unload (GIOModule *module)
{
g_assert_not_reached ();
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{
char *eps[] = {
GTK_MEDIA_FILE_EXTENSION_POINT_NAME,
(char *) GTK_MEDIA_FILE_EXTENSION_POINT_NAME,
NULL
};

View File

@ -24,11 +24,7 @@ media_subdir = 'gtk-4.0/@0@/media'.format(gtk_binary_version)
media_install_dir = join_paths(get_option('libdir'), media_subdir)
extra_c_args = ['-DGTK_COMPILATION']
# Detect and set symbol visibility
if cc.get_id() == 'msvc'
extra_c_args += ['-D_GLIB_EXTERN=__declspec (dllexport) extern']
endif
extra_c_args += common_cflags
if media_backends.contains('ffmpeg')
libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: true)

View File

@ -103,6 +103,7 @@ void t_goa_account_free (gpointer data);
G_DEFINE_DYNAMIC_TYPE (GtkPrintBackendCloudprint, gtk_print_backend_cloudprint, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -118,11 +119,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -236,6 +236,7 @@ static void secrets_service_vanished_cb (GDBusConnec
G_DEFINE_DYNAMIC_TYPE(GtkPrintBackendCups, gtk_print_backend_cups, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -250,11 +251,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -102,6 +102,7 @@ static GtkPageSetup * file_printer_get_default_page_size (GtkPrinter
G_DEFINE_DYNAMIC_TYPE(GtkPrintBackendFile, gtk_print_backend_file, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -115,11 +116,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -83,6 +83,7 @@ static void gtk_print_backend_lpr_print_stream (GtkPrintBacke
G_DEFINE_DYNAMIC_TYPE (GtkPrintBackendLpr, gtk_print_backend_lpr, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -96,11 +97,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{