1webrtc_sources = files([ 2 'dtlstransport.c', 3 'icetransport.c', 4 'rtcsessiondescription.c', 5 'rtpreceiver.c', 6 'rtpsender.c', 7 'rtptransceiver.c', 8 'datachannel.c', 9 'sctptransport.c', 10 'webrtc.c', 11]) 12 13webrtc_headers = files([ 14 'dtlstransport.h', 15 'icetransport.h', 16 'rtcsessiondescription.h', 17 'rtpreceiver.h', 18 'rtpsender.h', 19 'rtptransceiver.h', 20 'datachannel.h', 21 'webrtc_fwd.h', 22 'webrtc.h', 23 'sctptransport.h', 24]) 25 26webrtc_enumtypes_headers = files([ 27 'dtlstransport.h', 28 'icetransport.h', 29 'rtptransceiver.h', 30 'webrtc_fwd.h', 31]) 32 33webrtc_enums = gnome.mkenums_simple('webrtc-enumtypes', 34 sources : webrtc_enumtypes_headers, 35 body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', 36 header_prefix : '#include <gst/webrtc/webrtc_fwd.h>', 37 decorator: 'GST_WEBRTC_API', 38 install_header: true, 39 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/webrtc/')) 40 41gstwebrtc_c = webrtc_enums[0] 42gstwebrtc_h = webrtc_enums[1] 43 44webrtc_gen_sources = [gstwebrtc_h] 45 46gstwebrtc_dependencies = [gstbase_dep, gstsdp_dep] 47 48gstwebrtc = library('gstwebrtc-' + api_version, 49 webrtc_sources, gstwebrtc_c, gstwebrtc_h, 50 c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WEBRTC', '-DG_LOG_DOMAIN="GStreamer-WebRTC"'], 51 include_directories : [configinc, libsinc], 52 version : libversion, 53 soversion : soversion, 54 darwin_versions : osxversion, 55 install : true, 56 dependencies : gstwebrtc_dependencies, 57) 58 59library_def = {'lib': gstwebrtc} 60pkg_name = 'gstreamer-webrtc-1.0' 61pkgconfig.generate(gstwebrtc, 62 libraries : [gst_dep, gstbase_dep], 63 variables : pkgconfig_variables, 64 subdirs : pkgconfig_subdirs, 65 name : pkg_name, 66 description : 'GStreamer WebRTC support', 67) 68 69if build_gir 70 gir = { 71 'sources' : webrtc_sources + webrtc_headers + [gstwebrtc_h], 72 'namespace' : 'GstWebRTC', 73 'nsversion' : api_version, 74 'identifier_prefix' : 'Gst', 75 'symbol_prefix' : 'gst', 76 'export_packages' : pkg_name, 77 'includes' : ['Gst-1.0', 'GstSdp-1.0'], 78 'install' : true, 79 'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'] + ['--c-include=gst/webrtc/webrtc.h'], 80 'dependencies' : gstwebrtc_dependencies, 81 } 82 library_def = {'lib': library_def['lib'], 'gir': [gir]} 83 if not static_build 84 webrtc_gir = gnome.generate_gir(gstwebrtc, kwargs: gir) 85 webrtc_gen_sources += webrtc_gir 86 endif 87endif 88libraries += [[pkg_name, library_def]] 89 90install_headers(webrtc_headers, subdir : 'gstreamer-1.0/gst/webrtc') 91 92gstwebrtc_dep = declare_dependency(link_with: gstwebrtc, 93 include_directories : libsinc, 94 sources: webrtc_gen_sources, 95 dependencies: gstwebrtc_dependencies) 96 97meson.override_dependency(pkg_name, gstwebrtc_dep) 98