Commit Graph

332 Commits

Author SHA1 Message Date
67fa5a3437 configure.ac: Add LTTng tracepoints feature
Change-Id: I192ff24448a6454c8d504febd7ab2df2ccf88272
2022-05-20 11:15:10 -04:00
4af0279fa2 video API: unify SinkTarget and AVSinkTarget
Change-Id: I6cbbdc1ec6953c1c9ec47a57acf8ac4d8995468d
2022-03-21 16:56:54 -04:00
4f426634a3 build: hide verbose warning
This warning is caused by ASIO, is harmless, and likely won't be fixed for a while.
Mute it for now.

Change-Id: Ib387aec8138ebed9dc45449ffd19d8ad340044c6
2022-03-04 12:31:01 -05:00
f26f20d567 video interface: homogenize decoding signal names
Change-Id: Ica925c83e44e2326417708768566e33102365ce9
2022-03-03 17:35:14 -05:00
775aa2f803 Build system: No '--disable-shared'
The agent and unit tests can now be compiled without requiring
`--disable-shared' at configuration time.

The agent requires the logger functions to have default visibility instead of
hidden.  Thus, `jami::logger::[v]log' can be considered part of the public API.

The unit tests however require hidden symbols.  Thus, we link the tests against
a static version of libjami instead.

Change-Id: I59d9e67679766e0310a19f9a879c06a31c5124c4
2022-03-03 17:10:21 -05:00
f6bf52ea15 re-invite: bump Daemon version to 11.0.2
Bump Daemon version to 11.0.2 to enable re-invite without ICE
renegotiation.

Gitlab: #671

Change-Id: I287a034b0fb6b6fde77c091ac3543978e533c56a
2022-02-24 13:56:11 -05:00
d1bc939090 jamiaccount: add test for migrations
Accounts can see their certificates expire. When it's the case, a
migration is needed. However, several regressions can happen, because
this behaviour can be tricky to test correctly. In this patch, a
test is added to validate that the migration is done whenever the
certificate expires.

+ OpenDHT needs to be bumped in order to be able to change the validity
period of a certificate.
+ In ArchiveAccountManager, a method is added to change the validity
of a certificate in the chain.
+ This patch also fixes a crash when a migration occurs directly on
the archive (info_ was null causing a segfault).
+ Finally, cleanup some signatures unused in JamiAccount.

GitLab: #684 (this is some preparative work)
Change-Id: I901bc67fd63ce2ab26ded64662f8333d3a0eed50
2022-01-26 15:18:07 -05:00
70a2a65086 SIP call: re-invite without ice re-negotiation
When muting/un-muting the video, a re-invite is performed
leading to a full media renegotiation and restart,  including
ICE session if used.
With these changes, the mute/unmute video will still require
a re-invite (a new SDP to indicate the new media directions), but
the ICE session is re-used and only the video is stopped/started
accordingly.
The behavior improves the UX by avoiding unnecessary audio disruptions
and is more compliant with SIP/ICE specs (see RFC-5245 section 9.1.1.1
for example)

Gitlab: #671

Change-Id: I13caf9a965af1d76e922fe5f6b86d5332b3296d6
2022-01-25 10:09:13 -05:00
5018565239 misc: update copyright date to 2022
Change-Id: I795e3f2f69c07349bf84c87dbcafb502dc8490f8
2022-01-05 16:21:58 -05:00
3466f1a2af build: lower minimum required version for webrtc-audio-processing to 0.3
This allows us to build with webrtc-audio-processing distro packages
currently available across supported Debian releases.

Change-Id: I25584a0564ceb78e8eefec78e5e903356c37ddab
2021-12-06 13:55:04 -05:00
01cb294c44 callmanager: add accountId to identify calls, conferences
This starts the work to move calls and conference per account,
cleaning up the API and start future re-factorization.

Change-Id: I2a3a2c77e9ba78b1a280bdf8dca7eeaabb72f3fd
2021-11-16 15:59:41 -05:00
6ba2ce016a build: disable SHM if DBUS is not used
As libwrap is used by default, HAVE_SHM should only be true
if directrenderer is not used to avoid useless work

Change-Id: I9f819a7c06c667ccf08066f70104dcd3667f8546
2021-11-09 12:34:34 -05:00
b297c89c1b build: Use non-recursive Automake.
Change-Id: I8d5eaf4c90cb425e8f96eaac25e727b6a6aae24f
2021-09-13 09:43:33 -04:00
a6ce32567a contrib: Add Guile 3.0.7
Change-Id: I5340a0215512be416a618c526f8a0962c8401087
2021-07-23 09:39:23 -04:00
9727bd5768 autoconf: Use libtool, not dolt replacement.
Dolt doesn't provide the performance benefits it promises, so drop it
to simplify the moving parts of the Autotools build system.

Also remove unused M4 modules.

* m4/dolt.m4: Delete file.
* m4/ax_boost_base.m4: Likewise.
* configure.ac: Do not call DOLT.

Change-Id: I58d286457005ad82129e089679c52933989c59a8
2021-07-16 16:37:36 -04:00
ba3a411ca3 daemon: Rename dring occurrences in code and file names to jamid.
Automated using the following commands:

  $ mv src/{dring,jami}
  $ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
  $ git grep -l '#include "dring/' | \
    xargs sed -i 's,#include "dring/,#include "jami/,g'
  $ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'

And finally,

  $ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'

  $ files=$(find -name '*dring*' | sort)
  $ for f in $files; do mkdir -p "$(dirname "$f")"; \
      mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done

To resolve a bad renaming favorably:

  $ git grep -l -i AlsaCarjami | \
    xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'

The above renaming command is not perfect, so some hand-tuning was
required to complete it.

* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.

change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
2021-07-15 10:57:26 -04:00
7ed35a6eb6 agent: Initial agent with simple behavior tree
Change-Id: I67825b04f1fead3d4267564e4c366cb54037c593
2021-07-02 11:25:50 -04:00
459ee469fd autotools: make fuzzing optional
Change-Id: Iaa11c6880858316336f5e5b5e1fc6f55597d24d0
2021-06-28 15:21:08 -04:00
1c37197bab autotools: cleanup nodejs
Change-Id: Ie5c67deace0664c2d8d9664ecb0f722fce13a57e
2021-06-28 15:21:05 -04:00
c9757b595d auto-tools: Add fuzzing directory
Change-Id: I189cdf06e74314f6e35b34addafe599d39f2dc42
2021-06-25 11:51:20 -04:00
2afa99fd12 daemon: Install dring to libexec and edit templates at install time.
Executables are typically installed under bin/, sbin/ or libexec,
rather than lib/.  The problem was noticed when trying to use Jami
with a Guix relocatable pack, which only wraps executables found under
the above locations.  Since dring is a daemon and should not be run
directly by users under normal circumstances, the convention is to use
the libexec directory, according to the File Hierchy Standard 3.0.

Also tackled in this change is the substitution of the Autoconf
variables at installation time rather than configuration time, as per
the GNU Coding Standards.  The following solution is taken from
https://github.com/gentoo/eudev/pull/183/commits, which in turn is
adapted from the Autoconf manual (c.f.: info "(autoconf)Installation
Directory Variables").

* bin/Makefile.am (ringlibdir): Delete variable.
* bin/dbus/Makefile.am (do_subst): New variable.
(cx.ring.Ring.service): Derive from the cx.ring.Ring.service.in
template.
[HAVE_WIN32]: (ringlib_PROGRAMS): Rename to ...
(bin_PROGRAMS): ... this.
[HAVE_OSX, RING_DBUS]: Likewise.
* bin/dbus/cx.ring.Ring.service.in (Exec): Adust.
* globals.mk (ringlibdir): Delete variable.
* configure.ac [with_dbus] <AC_CONFIG_FILES>: Remove
bin/dbus/cx.ring.Ring.service.  Also remove the LIBDIR variable, no
longer used.  Fix indentation.

Thanks to Vladimir Stoiakin for providing feedback on this change.

Change-Id: I845bf2bd590a9457e70ca173027217b8f164d713
2021-06-22 15:32:29 -04:00
35d4ffc9c1 autotools: fix dependency declaration
Change-Id: Ib1eb25f11fccd51424012bb11d5e8586fcc8e575
2021-06-15 14:34:34 -04:00
612f7f6b41 data-transfer: re-ask for transfer
add API to ask for a failed transfer. This can be used when the
client detects a transfer they doesn't have yet. It will ask all
members of the conversation to send the transfer back.

GitLab: #136
Change-Id: I1484298c4fa0eabb614132e22d8032612e14b949
2021-06-11 15:26:00 -04:00
53d0ae39d1 multi-stream: check peer's Daemon version
Check peer's Daemon version and ignore media change request
action from the client if the the peer does not support the
feature.
Also bump Daemon version to 10.0.2

Gitlab: #551

Change-Id: Ifd105d2fe2706b4667f5bafabcb3d91e771e7299
2021-06-11 12:33:51 -04:00
3ff1548de6 Revert "configure: use -Og in debug mode"
This reverts commit d6e9bb8423.

Some variables are optimized out with -Og.  -O0 doesn't have this problem.

Change-Id: Ief09d2d3659260aa8151dbfe8951dc11777bb79b
2021-05-28 12:24:27 -04:00
d6e9bb8423 configure: use -Og in debug mode
Change-Id: I29522f23419b2a3bb29265a73e8f2bcfcd2548f8
2021-05-19 10:14:36 -04:00
ffa12c740b multiplexed_socket: add ping/pong logic
Detecting that a socket is down via a keep alive can take time, moreover
if a relay is used, because the keep alive can continue to work even if the
connection is half closed.
In this patch, we add a mechanism where a beacon is sent over the multiplexed
socket to know if the peer can answer. This message can be used to detect
if a socket is usable and is sent whenever the user starts a call or that
a connectivityChanged() occurs.
Moreover, the multiplexedsocket can now sends a version to enable features
and if a bad packet on the control socket comes, the socket is not stopped.

GitLab: #542
Change-Id: Ia66d8d7f9b66bba02927f4ea41c21ef27089bceb
2021-05-13 18:11:02 -04:00
c71db26718 misc: remove unnecessary --build for libgit2 and check recent openDHT version
Change-Id: Ic6f2cd3e0b0cf839dc602231ad4b0a4914968b2e
2021-05-11 16:44:37 -04:00
7dd8826ce9 plugins: use minizip instead of libarchive
GitLab: #525
Change-Id: I7de174626bbb97c40ac58ceea9d99d9fe8b95bd9
2021-05-04 10:26:01 -04:00
9b94f3fd1d configure.ac: Fix typo in help string.
Using '--without-webrtc-ap' would still attempt to build the
webrtc-based echo canceler.  Adjust the help string of the option to
match the actual option name.

* configure.ac (webrtcap): Help text changed from --without-webrtc-ap
to --without-webrtcap.

Change-Id: I46a30dc87963ca67b0b135fed08523f16834f715
2021-04-16 10:56:26 -04:00
4b6a085120 use {fmt} instead of stringstream
Change-Id: I77f0e24c97efc199ab83c517559d5588880b0215
2021-04-14 14:45:07 -04:00
1b779e7dec configure.ac: Clear the implicit default C and C++ flags.
They were being added by Autoconf following our own defaults, leading
to the erroneous -g -O3 -g -O2 options being passed to GCC.  This is
documented in the C Compiler and C++ Compiler sections of the Autoconf
manual.

* configure.ac: Clear the default CFLAGS and CXXFLAGS variables.

Reported-by: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
Change-Id: Id5e24cb2544ac4492b229746ad7ea1dee7cbb963
2021-04-10 00:03:54 -04:00
1527828d79 swarm chat: make API visible and bump daemon version
Change-Id: Ice65f7ded98ef5575732334a9d6c61b81aeaf655
2021-04-09 18:02:39 -04:00
ea84661121 configure: require OpenDHT
Change-Id: Icac429914b1cbda880909a130af1c0934abedbf3
2021-04-07 10:41:05 -04:00
ad5607380f swarmchat: clone distant conversation
Retrieving a conversation is done by cloning the distant repository

Change-Id: Ib68749d0cd37ff708b08187e987cc3fdeaa0fbe6
2021-03-30 13:49:07 -04:00
c4e912dd89 dependencies: add libgit2 as a dependency
Needed by the swarm chat in the future

Change-Id: Ic5802a0de8091c12b6f5ed666ee488c620723149
2021-03-30 13:49:07 -04:00
80e62ef2dd configure: remove obsolete macro
Change-Id: I7a2227aafe585bee1f4ed115f22e987e77fd49ff
2021-03-28 16:05:06 -04:00
286d5f15ec configure.ac: Harmonize indentation.
Bring consistency in the indentation rules used throughout the file.

GitLab: #487
Change-Id: I4d8e4050a0f21df9a380fc25e0d3de04f15fe941
2021-03-28 16:04:36 -04:00
bfe7a84454 configure.ac: Do not set user variables.
The CFLAGS, CXXFLAGS, LDFLAGS and other variables intended to be
overridden by the user should not directly be set by the package.
This change uses one of the approaches recommended by the Autoconf and
Automake manuals, which is to use custom variables to accumulate flags
in the configure script and add them to the make targets they apply
to.  This has the benefit of not cluttering the flags used during the
Autoconf tests, which has proved problematic (see the previous commit
for a demonstration).

* configure.ac: Replace CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS by
DAEMONCFLAGS, DAEMONCXXFLAGS, DAEMONCPPFLAGS and DAEMONLDFLAGS,
respectively.
Use these custom variables as the default values of AM_CFLAGS,
AM_CXXFLAGS, AM_CPPFLAGS and AM_LDFLAGS, respectively.  Remove an
extraneous check on jsoncpp.
* bin/Makefile.am (ringcli_CXXFLAGS): Honor the the AM_CXXFLAGS variable.
globals.mk: Extend rather than override the AM_CPPFLAGS variable.
* src/Makefile.am (libring_la_LDFLAGS): Honor AM_LDFLAGS.
(libring_la_CFLAGS): Honor AM_CFLAGS.
(libring_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/client/Makefile.am (libclient_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/im/Makefile.am (libim_la_CXXFLAGS): Remove variable.
* src/jamidht/Makefile.am (libringacc_la_CXXFLAGS): Likewise.
* src/media/audio/Makefile.am (libaudio_la_CXXFLAGS): Honor
AM_CXXFLAGS.
(libaudio_la_LDFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/audio/coreaudio/Makefile.am (libcoreaudiolayer_la_CXXFLAGS):
Likewise.
* src/media/video/Makefile.am (libvideo_la_CFLAGS): Honor the
AM_CFLAGS variable.
(libvideo_la_CXXFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/video/v4l2/Makefile.am (AM_CXXFLAGS): Extend rather than
override.
* src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Honor the
AM_CXXFLAGS variable.
* src/security/Makefile.am (libsecurity_la_CXXFLAGS): Likewise.
* src/sip/Makefile.am (libsiplink_la_CXXFLAGS): Likewise.
* src/upnp/Makefile.am (libupnpcontrol_la_CXXFLAGS): Remove variable.
* src/upnp/protocol/Makefile.am (libupnpprotocol_la_CXXFLAGS): Likewise.
* src/upnp/protocol/natpmp/Makefile.am (libnat_pmp_la_CXXFLAGS): Likewise.
* src/upnp/protocol/pupnp/Makefile.am (libpupnp_la_CXXFLAGS): Likewise.
* test/sip/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Extend rather than override.
* test/unitTest/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Likewise.

GitLab: #487
Change-Id: I18be9d812159f8156efb9f7849e7eac6d4c6b3ca

squash! configure.ac: Do not set user variables.

Change-Id: I1146ea15d6fb75fe53d3cbdd782e981c933e82a6
2021-03-28 16:04:36 -04:00
5cca262551 configure.ac: Resolve libnatpmp conftest issue.
Do not unnecessarily clutter CPPFLAGS; the variable is honored by
Autoconf while running its conftests and can cause issues such as
symbol clashes between the libnatpmp and webrtc-audio-processing
library observed below:

configure:20851: checking for initnatpmp in -lnatpmp
configure:20873: g++ -std=gnu++17 -o conftest  -DNDEBUG=1 -O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPJ_AUTOCONF=1  -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include  -fvisibility=hidden -DDRING_BUILD  -Ddring_EXPORTS  -DASIO_STANDALONE -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include -I/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/include -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DWEBRTC_POSIX -I/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/include/webrtc_audio_processing  -Wl,-Bsymbolic -ldl -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -L/gnu/store/zimpk6gqmjrwxc7fnam212kv3a6dwpzz-jsoncpp-1.9.2/lib -ljsoncpp -L/home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib -lwebrtc_audio_processing conftest.cpp -lnatpmp -lpthread  -lssl -lcrypto >&5
ld: /tmp/cc5prP4w.o: in function `main':
conftest.cpp:(.text.startup+0x0): multiple definition of `main'; /home/maxim/src/ring-project/daemon/contrib/x86_64-unknown-linux-gnu/lib/libwebrtc_audio_processing.a(libwebrtc_audio_processing_la-click_annotate.o):click_annotate.cc:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status
configure:20873: $? = 1

This was causing the link test of the libnatpmp library to fail,
which in turned caused the natpmp support to be disabled entirely.

* src/Makefile.am (libring_la_LDFLAGS): Add @WEBRTC_LIBS@.
(libring_la_CFLAGS): Add @WEBRTC_CFLAGS@.
* src/media/audio/Makefile.am (libaudio_la_CXXFLAGS)
[HAVE_WEBRTC_AP]: Add @WEBRTC_CFLAGS@.
* src/media/audio/echo-cancel/Makefile.am
(libecho_cancel_la_CXXFLAGS): Add @WEBRTC_CFLAGS@ and honor AM_CXXFLAGS.

GitLab: #487
Change-Id: I064d6a563318b34b2f3f516ca2aa8c2831205b09
2021-03-28 16:04:36 -04:00
cc6024ccba configure.ac: Remove uses of obsolete macros.
* configure.ac: Bump required autoconf version to 2.69 and remove the
uses of the obsoleted AC_HEADER_STDC and AC_HEADER_TIME macros.

GitLab: #487
Change-Id: Idb210870c298b83ddabe189e341d0846f04a1bb9
2021-03-26 14:48:19 -05:00
ad8909f0cb build: Enable the use of the dbusxx-xml2cpp tool built from contrib.
Previously, the build machine would need to provide dbusxx-xml2cpp
itself, while the library would be used from the contribs (always
forced, as dbusxx-xml2cpp is unmaintained and slightly broken on newer
GCCs).  This change removes the requirement to have the dbus-c++
package installed on the build machine.

Change-Id: I25ad2ee3e80afc33b320de9256b724a3c254f4fb
2021-03-26 14:27:03 -04:00
e787de4ea5 aec: move aec implementations into EchoCanceller
Hide speexdsp's echo cancellation implementation details behind an
EchoCanceller derived class. An AudioLayer may now instantiate
implementations of the EchoCanceller. This may be platform specific
compile-time or swapped out at runtime.

Introduces a null echo canceller for testing. As the speexdsp aec
is not currently functional, the null echo canceller is replaced
as the default implementation.

GitLab: #454
Change-Id: I169f1e9758afbed884fc42d9d78a69ce28d12fe2
2021-03-15 16:58:58 -04:00
5d0247d275 contrib: add webrtc-audio-processing @ v0.3.1
Change-Id: Ib7396b12f98947b25bc96605381cbc29594aa1b7
2021-03-15 16:58:37 -04:00
924cd61091 conference: add account preference to enable moderation for all
Gitlab: #453

Change-Id: I9a870b2f930c69fe26432f1f15169d13365e702d
2021-03-09 16:16:59 -05:00
67d85f86cc account: add default moderator preference
Change-Id: I4c30fe6c8c99bdc518c0e81a89eaf5eb3ce2b726
2021-01-15 13:39:06 -05:00
6927411cf4 conference: add kick participant for moderator
Change-Id: Ieb4be786a286ce52501b270e473308ad1fd5ba23
2020-12-10 19:44:50 -05:00
4e5c4c7908 conference: add mute participant for moderator
Change-Id: I371809b140fb1587635131d3a1e6c75ad67d2966
2020-12-10 19:44:50 -05:00
75ec461623 conference: host can add or remove moderator
Change-Id: Idc4c6db249de7247d02c7cabb897d638c69674f3
2020-11-12 09:51:22 -05:00
de7a0a6726 cleanup: remove turn transport
Change-Id: I13245dc4c38090e75450d6cb0f47956e6444ce93
2020-10-27 11:08:47 -04:00