• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1rtsp_sources = files([
2  'gstrtsptransport.c',
3  'gstrtspurl.c',
4  'gstrtspmessage.c',
5  'gstrtspconnection.c',
6  'gstrtspdefs.c',
7  'gstrtspextension.c',
8  'gstrtsprange.c'
9  ])
10
11rtsp_headers = files([
12  'gstrtspconnection.h',
13  'gstrtspdefs.h',
14  'gstrtspextension.h',
15  'gstrtsp.h',
16  'gstrtspmessage.h',
17  'gstrtsprange.h',
18  'gstrtsptransport.h',
19  'gstrtspurl.h',
20  'rtsp-prelude.h',
21  'rtsp.h',
22])
23install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
24
25rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
26  sources : rtsp_headers,
27  body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
28  header_prefix : '#include <gst/rtsp/rtsp-prelude.h>',
29  decorator : 'GST_RTSP_API',
30  install_header: true,
31  install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/rtsp'))
32gstrtsp_c = rtsp_enums[0]
33gstrtsp_h = rtsp_enums[1]
34
35if host_system == 'windows'
36  winsock2 = cc.find_library('ws2_32')
37else
38  winsock2 = []
39endif
40gstrtsp_deps = [gst_base_dep, gst_dep, gio_dep, libm, winsock2]
41
42gst_rtsp = library('gstrtsp-@0@'.format(api_version),
43  rtsp_sources,
44  gstrtsp_h, gstrtsp_c,
45  c_args : gst_plugins_base_args + ['-DBUILDING_GST_RTSP', '-DG_LOG_DOMAIN="GStreamer-RTSP"'],
46  include_directories: [configinc, libsinc],
47  version : libversion,
48  soversion : soversion,
49  darwin_versions : osxversion,
50  install : true,
51  dependencies : gstrtsp_deps,
52)
53
54library_def = {'lib': gst_rtsp}
55pkg_name = 'gstreamer-rtsp-1.0'
56pkgconfig.generate(gst_rtsp,
57  libraries : [gst_dep, sdp_dep, gio_dep],
58  variables : pkgconfig_variables,
59  subdirs : pkgconfig_subdirs,
60  name : pkg_name,
61  description : 'RTSP base classes and helper functions',
62)
63
64rtsp_gen_sources = [gstrtsp_h]
65if build_gir
66  gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ]
67  gir = {
68    'sources' : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h],
69    'namespace' : 'GstRtsp',
70    'nsversion' : api_version,
71    'identifier_prefix' : 'Gst',
72    'symbol_prefix' : 'gst',
73    'export_packages' : pkg_name,
74    'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstSdp-1.0', 'Gio-2.0'],
75    'install' : true,
76    'extra_args' : gst_gir_extra_args,
77    'dependencies' : gstrtsp_deps + [sdp_dep]
78  }
79  library_def = {'lib': library_def['lib'], 'gir': [gir]}
80  if not static_build
81    rtsp_gir = gnome.generate_gir(gst_rtsp, kwargs: gir)
82    rtsp_gen_sources += [rtsp_gir]
83  endif
84endif
85libraries += [[pkg_name, library_def]]
86
87rtsp_dep = declare_dependency(link_with : gst_rtsp,
88  include_directories : [libsinc],
89  dependencies : gstrtsp_deps,
90  sources : rtsp_gen_sources)
91
92meson.override_dependency(pkg_name, rtsp_dep)
93