2019-01-18 19:21:41 +03:00
|
|
|
project('jami-daemon', ['c', 'cpp'],
|
swarm: add call support
This patch introduces the ability to start calls and extends the
usage of rendezvous points to swarm with multiple participants.
When starting a call in a swarm with multiple participats, one device
will work as the host of the conference, and the caller will
immediately start the call alone.
Other peers will receive a commit and a notification to be able
to join the active call. To join a call, users needs to call
rdv:uri/device/convId/confId to be added (if authorized) to the conf.
There are some majors differences in the process.
First, every conversation will be able to decide a default host
for conferences. This still needs some design and will be
introduced in another patch. For now, the caller is the host.
Then, because all members of the call may not be interested to join
a call, or they may want to get several calls at the same time, the
system must be able to manage more than one active calls (e.g. a
company with multiple projects can do several standups at the same
time).
Finally, in the conversation, two commits will be generated to be
able to know what active calls are available. The first is
announcing that a conference started, the second announces that
the conference stopped (the host closed the call).
However, this introduces a difficulty. The host may crash and not
commit the end of the call in time. In this case, hostedCalls are
stored in a file and the conversation is updated during the init
of the daemon.
Change-Id: I081a4920edb3773bbed884ae50f34e476ad42094
Documentation: https://docs.jami.net/technical/swarm.html#call-in-swarm
GitLab: #312
2021-07-26 14:16:53 -04:00
|
|
|
version: '13.7.0',
|
2019-01-18 19:21:41 +03:00
|
|
|
license: 'GPL3+',
|
2020-07-09 17:02:35 -04:00
|
|
|
default_options: ['cpp_std=gnu++17', 'buildtype=debugoptimized'],
|
2021-12-22 14:06:00 +03:00
|
|
|
meson_version:'>= 0.56'
|
2019-01-18 19:21:41 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
modpkgconfig = import('pkgconfig')
|
|
|
|
|
2021-11-12 01:10:23 +03:00
|
|
|
if host_machine.system() == 'darwin'
|
|
|
|
add_languages('objcpp')
|
|
|
|
endif
|
|
|
|
|
2019-01-18 19:21:41 +03:00
|
|
|
#################################################
|
|
|
|
# Required dependencies
|
|
|
|
#################################################
|
2023-01-22 01:45:19 +03:00
|
|
|
depthreads = dependency('threads')
|
|
|
|
depopendht = dependency('opendht', version: '>= 2.1.0')
|
2023-07-21 14:34:22 -04:00
|
|
|
depdhtnet = dependency('dhtnet')
|
2023-01-22 01:45:19 +03:00
|
|
|
depgnutls = dependency('gnutls', version: '>= 3.6.7')
|
|
|
|
depnettle = dependency('nettle', version: '>= 3.0.0')
|
|
|
|
deplibpjproject = dependency('libpjproject') # a custom fork, see contrib/src/pjproject/rules.mak
|
|
|
|
deplibgit2 = dependency('libgit2', version: '>= 1.1.0')
|
|
|
|
deplibsecp256k1 = dependency('libsecp256k1', version: '>= 0.1')
|
|
|
|
deplibavcodec = dependency('libavcodec', version: '>= 56.60.100')
|
|
|
|
deplibavfilter = dependency('libavfilter', version: '>= 5.40.101')
|
|
|
|
deplibavdevice = dependency('libavdevice', version: '>= 56.4.100')
|
|
|
|
deplibavformat = dependency('libavformat', version: '>= 56.40.101')
|
|
|
|
deplibswscale = dependency('libswscale', version: '>= 3.1.101')
|
|
|
|
deplibswresample = dependency('libswresample', version: '>= 1.2.101')
|
|
|
|
deplibavutil = dependency('libavutil', version: '>= 55.75.100')
|
|
|
|
depfmt = dependency('fmt', version: '>= 5.3')
|
|
|
|
depyamlcpp = dependency('yaml-cpp', version: '>= 0.5.1')
|
|
|
|
depjsoncpp = dependency('jsoncpp', version: '>= 1.6.5')
|
|
|
|
depzlib = dependency('zlib')
|
2019-01-18 19:21:41 +03:00
|
|
|
|
|
|
|
if get_option('interfaces').contains('dbus')
|
2023-05-21 17:29:37 +03:00
|
|
|
depsdbuscpp = dependency('sdbus-c++', version: '>= 1.2.0')
|
|
|
|
progsdbuscppxml2cpp = find_program('sdbus-c++-xml2cpp', native: true)
|
2019-01-18 19:21:41 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('interfaces').contains('nodejs')
|
|
|
|
progswig = find_program('swig', native: true)
|
|
|
|
prognodegyp = find_program('node-gyp', native: true)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('tests')
|
|
|
|
depcppunit = dependency('cppunit', version: '>= 1.12')
|
|
|
|
endif
|
|
|
|
|
|
|
|
#################################################
|
|
|
|
# Optional dependencies and configuration
|
|
|
|
#################################################
|
|
|
|
progpod2man = find_program('pod2man', native: true, required: false)
|
|
|
|
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set_quoted('PACKAGE', 'jami')
|
|
|
|
conf.set_quoted('PACKAGE_NAME', 'Jami Daemon')
|
|
|
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
|
|
conf.set_quoted('PACKAGE_STRING', 'Jami Daemon ' + meson.project_version())
|
2022-01-19 12:12:08 -05:00
|
|
|
conf.set_quoted('JAMI_DATADIR', get_option('datadir') / 'jami')
|
2019-01-18 19:21:41 +03:00
|
|
|
|
|
|
|
depopensl = meson.get_compiler('cpp').find_library('OpenSLES', has_headers: 'SLES/OpenSLES.h', required: get_option('opensl'))
|
|
|
|
conf.set10('HAVE_OPENSL', depopensl.found())
|
|
|
|
|
|
|
|
depalsa = dependency('alsa', version: '>= 1.0', required: get_option('alsa'))
|
|
|
|
conf.set10('HAVE_ALSA', depalsa.found())
|
|
|
|
|
|
|
|
deplibpulse = dependency('libpulse', version: '>= 0.9.15', required: get_option('pulseaudio'))
|
|
|
|
conf.set10('HAVE_PULSE', deplibpulse.found())
|
|
|
|
|
|
|
|
depjack = dependency('jack', required: get_option('jack'))
|
|
|
|
conf.set10('HAVE_JACK', depjack.found())
|
|
|
|
|
|
|
|
depportaudio = dependency('portaudio-2.0', required: get_option('portaudio'))
|
|
|
|
conf.set10('HAVE_PORTAUDIO', depportaudio.found())
|
|
|
|
|
|
|
|
depopenssl = dependency('openssl', required: get_option('name_service'))
|
|
|
|
conf.set10('HAVE_RINGNS', depopenssl.found())
|
|
|
|
|
2022-08-11 11:34:34 +03:00
|
|
|
depwebrtcap = dependency('webrtc-audio-processing', required: get_option('webrtc_ap'))
|
2021-03-24 11:14:41 +03:00
|
|
|
conf.set10('HAVE_WEBRTC_AP', depwebrtcap.found())
|
|
|
|
|
2022-08-11 11:34:34 +03:00
|
|
|
depspeexdsp = dependency('speexdsp', required: get_option('speex_ap'))
|
2022-07-27 15:10:17 -04:00
|
|
|
conf.set10('HAVE_SPEEXDSP', depspeexdsp.found())
|
|
|
|
|
2019-01-18 19:21:41 +03:00
|
|
|
if get_option('video')
|
|
|
|
conf.set('ENABLE_VIDEO', true)
|
|
|
|
if host_machine.system() == 'linux' and meson.get_compiler('cpp').get_define('__ANDROID__') != '1'
|
|
|
|
deplibudev = dependency('libudev')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('hw_acceleration')
|
|
|
|
conf.set('RING_ACCEL', true)
|
|
|
|
conf.set('ENABLE_VIDEOTOOLBOX', host_machine.system() == 'darwin')
|
2020-06-24 18:34:28 +03:00
|
|
|
else
|
|
|
|
conf.set('RING_ACCEL', false)
|
|
|
|
conf.set('ENABLE_VIDEOTOOLBOX', false)
|
2019-01-18 19:21:41 +03:00
|
|
|
endif
|
2020-06-24 18:34:28 +03:00
|
|
|
else
|
|
|
|
conf.set('ENABLE_VIDEO', false)
|
|
|
|
conf.set('RING_ACCEL', false)
|
|
|
|
conf.set('ENABLE_VIDEOTOOLBOX', false)
|
2019-01-18 19:21:41 +03:00
|
|
|
endif
|
|
|
|
|
2020-06-23 13:08:17 +03:00
|
|
|
if get_option('plugins')
|
|
|
|
conf.set('ENABLE_PLUGIN', true)
|
2021-11-04 13:49:57 +03:00
|
|
|
if host_machine.system() == 'darwin'
|
|
|
|
depminizip = dependency('minizip', version: '>= 3.0.0')
|
|
|
|
else
|
2022-09-06 11:15:21 +03:00
|
|
|
deplibarchive = dependency('libarchive', version: '>= 3.4.0')
|
2020-06-23 13:08:17 +03:00
|
|
|
endif
|
2020-07-02 15:39:47 +03:00
|
|
|
depdl = meson.get_compiler('cpp').find_library('dl', required: false)
|
2020-06-23 13:08:17 +03:00
|
|
|
else
|
|
|
|
conf.set('ENABLE_PLUGIN', false)
|
|
|
|
endif
|
|
|
|
|
2022-07-16 01:03:07 +03:00
|
|
|
if get_option('tracepoints')
|
|
|
|
conf.set('ENABLE_TRACEPOINTS', true)
|
|
|
|
deplttngust = dependency('lttng-ust', version: '>= 2.13')
|
|
|
|
else
|
|
|
|
conf.set('ENABLE_TRACEPOINTS', false)
|
|
|
|
endif
|
|
|
|
|
2019-01-18 19:21:41 +03:00
|
|
|
conf.set10('HAVE_COREAUDIO', host_machine.system() == 'darwin')
|
2022-06-22 16:27:06 -04:00
|
|
|
conf.set('ENABLE_SHM', get_option('interfaces').contains('dbus'))
|
2022-09-06 11:15:21 +03:00
|
|
|
|
2019-01-18 19:21:41 +03:00
|
|
|
configure_file(
|
|
|
|
output: 'config.h',
|
|
|
|
configuration: conf
|
|
|
|
)
|
2023-01-22 01:45:19 +03:00
|
|
|
add_project_arguments('-DHAVE_CONFIG_H', language: ['c', 'cpp'])
|
2019-01-18 19:21:41 +03:00
|
|
|
|
|
|
|
#################################################
|
|
|
|
# Build targets
|
|
|
|
#################################################
|
2023-05-31 12:07:13 +03:00
|
|
|
add_project_arguments('-DLIBJAMI_BUILD', language: ['c', 'cpp'])
|
2019-01-18 19:21:41 +03:00
|
|
|
if get_option('default_library') != 'static'
|
2021-12-20 15:28:56 +03:00
|
|
|
add_project_arguments('-Djami_EXPORTS', language: ['c', 'cpp'])
|
2019-01-18 19:21:41 +03:00
|
|
|
endif
|
|
|
|
|
2021-12-20 15:28:56 +03:00
|
|
|
add_project_arguments('-DASIO_STANDALONE', language: ['c', 'cpp'])
|
2023-04-20 11:19:58 -04:00
|
|
|
add_project_arguments('-DMSGPACK_NO_BOOST', language: ['c', 'cpp'])
|
2019-01-18 19:21:41 +03:00
|
|
|
|
|
|
|
subdir('src')
|
|
|
|
|
|
|
|
if get_option('interfaces').contains('dbus')
|
|
|
|
subdir('bin' / 'dbus')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('interfaces').contains('nodejs')
|
|
|
|
subdir('bin' / 'nodejs')
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('tests')
|
|
|
|
subdir('test')
|
|
|
|
endif
|
|
|
|
|
|
|
|
#################################################
|
|
|
|
# Resources and metafiles
|
|
|
|
#################################################
|
|
|
|
subdir('ringtones')
|
|
|
|
|
|
|
|
if host_machine.system() == 'linux' and meson.get_compiler('cpp').get_define('__ANDROID__') != '1'
|
|
|
|
provides_content = ''
|
|
|
|
if get_option('interfaces').contains('dbus')
|
|
|
|
provides_content += ' <dbus type="user">cx.ring.Ring</dbus>'
|
|
|
|
endif
|
|
|
|
if get_option('interfaces').contains('library')
|
|
|
|
provides_content += (provides_content == '')? '' : '\n'
|
|
|
|
if get_option('default_library') == 'static'
|
|
|
|
provides_content += ' <library>libjami.a</library>'
|
|
|
|
elif get_option('default_library') == 'shared'
|
|
|
|
provides_content += ' <library>libjami.so</library>'
|
|
|
|
else
|
|
|
|
provides_content += ' <library>libjami.so</library>\n'
|
|
|
|
provides_content += ' <library>libjami.a</library>'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
if provides_content != ''
|
|
|
|
configure_file(
|
|
|
|
configuration: {'PROVIDES_CONTENT': provides_content},
|
|
|
|
input: 'net.jami.daemon.metainfo.xml.in',
|
|
|
|
output: 'net.jami.daemon.metainfo.xml',
|
|
|
|
install: true,
|
|
|
|
install_dir: get_option('datadir') / 'metainfo'
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
endif
|