endforeach
# Check if we need to also build glib-networking for TLS modules
+giomodules = []
glib_dep = dependency('glib-2.0')
if glib_dep.type_name() == 'internal'
- subproject('glib-networking', required : get_option('tls'),
+ subp = subproject('glib-networking', required : get_option('tls'),
default_options: ['gnutls=auto', 'openssl=auto'])
+ if subp.found()
+ giomodules += subp.get_variable('giomodules', [])
+ endif
endif
gst_plugins_doc_dep = custom_target('plugins-doc-cache',
'-e ' + get_option('gst-full-elements'),
'-t ' + get_option('gst-full-typefind-functions'),
'-d ' + get_option('gst-full-device-providers'),
- '-T ' + get_option('gst-full-dynamic-types')
+ '-T ' + get_option('gst-full-dynamic-types'),
+ '--giomodules', ';'.join(giomodules),
]
)
endif
endif
+ giomodules_deps = []
+ foreach module : giomodules
+ giomodules_deps += dependency(module)
+ endforeach
+
# Build both shared and static library
gstfull = both_libraries('gstreamer-full-1.0',
init_static_plugins_c,
link_args: gstfull_link_args,
link_whole : exposed_libs,
- dependencies : [incdir_deps, glib_deps, all_plugins],
+ dependencies : [incdir_deps, glib_deps, all_plugins, giomodules_deps],
link_depends : link_deps,
install : true,
)
$device_providers_declaration
$dynamic_types_declaration
$plugins_declaration
+$giomodules_declaration
void
gst_init_static_plugins (void)
$device_providers_registration
$dynamic_types_registration
$plugins_registration
+ $giomodules_registration
g_once_init_leave (&initialization_value, 1);
}
dest="deviceproviders", help="The list of plugin:deviceproviders")
parser.add_argument('-T', '--dynamic-types', nargs='?', default='',
dest="dynamictypes", help="The list of plugin:dynamictypes")
+ parser.add_argument('--giomodules', nargs='?', default='',
+ dest="giomodules", help="The list of GIO modules")
options = parser.parse_args()
if options.output is None:
output_file = 'gstinitstaticplugins.c'
dynamic_types_registration = []
plugins_declaration = []
plugins_registration = []
+ giomodules_declaration = []
+ giomodules_registration = []
if ',' in options.plugins or ':' in options.plugins:
print("Only ';' is allowed in the list of plugins.")
plugins_registration += ['GST_PLUGIN_STATIC_REGISTER(%s);' % (plugin_name)]
plugins_declaration += ['GST_PLUGIN_STATIC_DECLARE(%s);' % (plugin_name)]
+ giomodules = options.giomodules.split(';') if options.giomodules else []
+ for module_name in giomodules:
+ if module_name.startswith('gio'):
+ module_name = module_name[3:]
+ giomodules_declaration.append(f'extern void g_io_{module_name}_load (gpointer data);')
+ giomodules_registration.append(f'g_io_{module_name}_load (NULL);')
+
with open(output_file.strip(), "w") as f:
static_elements_plugin = ''
f.write(TEMPLATE.substitute({
'dynamic_types_registration': '\n '.join(dynamic_types_registration),
'plugins_declaration': '\n'.join(plugins_declaration),
'plugins_registration': '\n '.join(plugins_registration),
+ 'giomodules_declaration': '\n'.join(giomodules_declaration),
+ 'giomodules_registration': '\n '.join(giomodules_registration),
}))