Commit Graph

15516 Commits

Author SHA1 Message Date
2e8b701f0b configure.ac: Add check of cxxabi.h
Change-Id: Ifa8984d43ef51bf0c3432e6f8643107b60d7d372
2022-05-20 14:29:08 -04:00
57a6344727 contrib: Add liburcu 0.13.1
Change-Id: I26379859f39b05a8cd2a8c4b05d6173cea145481
2022-05-20 11:15:12 -04:00
2b2899d7b8 contrib: Add lttng-ust 2.13.0
Change-Id: Ie6d9c48758adbee7c81bf31c3e11ada2428c2e8d
2022-05-20 11:15:12 -04:00
67fa5a3437 configure.ac: Add LTTng tracepoints feature
Change-Id: I192ff24448a6454c8d504febd7ab2df2ccf88272
2022-05-20 11:15:10 -04:00
95ec084263 pjproject: fix crash if all ipv6 addresses are deprecated
cleanup old TODO file

Change-Id: I76a91664f9e40cc866ae2527758815f11d312d69
GitLab: #733
2022-05-20 05:05:00 -04:00
6bb0b6e2d7 extras/tools: update cmake version to 3.22.1
Change-Id: Ibad39331c7fa31e3b8ddc31dd61e3a3bc66fc9f8
2022-05-17 11:55:20 -04:00
fbdc6a1957 video receive thread: fix race condition on displayMatrix_
Instances of std::shared_ptr are not thread-safe, even if the control block is.

Since AVBufer already has a refcounting system, use a unique_ptr instead,
and add a mutex to protect access during copy.

In practice, the mutex should almost never block since it's locked for
the minimum scope.

Change-Id: I5122e76dadb5da6c3738f8dc711698744b52315b
2022-05-13 02:30:35 -04:00
35a0fcdeb8 Video receiver: reduce data race
- do not destroy demux context on receiver thread

Gitlab: #732

Change-Id: I34e9922305073a606467d178f13606eb1d721d2f
2022-05-11 10:35:48 -04:00
657c47c51d video API: return bool from registerSinkTarget
This allows clients to know if sink registration succeeded.

Change-Id: Ic22d4a50b9cf3c071562c6425724008a54e5f3a6
2022-05-09 10:48:16 -04:00
8750049b0c nodejs: fix binding, update to Node 16 LTS
Change-Id: Id4eaaebee19c9739334b0652e7cdf560d8f8a202
2022-04-27 11:49:19 -04:00
222934d9ee contrib: update opendht
Change-Id: I47603f564cfa57ae63f758534231b1755b4f1286
2022-04-26 13:38:04 -04:00
82fb339119 sip/sip_utils: Duplicate contact header
pjsip scans the contact header but keep a string view of it internally instead of
copying it.  Thus, duplicate the contact header and bind its lifetime to the
pool allocator of the tdata structure.

Gitlab: #668

Change-Id: Ief31fcc6033b394dcb43ee0403f9459654d29f1f
2022-04-26 10:54:35 -04:00
5856cf5a8f plugins: add support to preferences per account
bump Plugin api version
bump Jami version

GitLab: #631
Change-Id: I8b8a9bbb05b3dd461bfafc02940441fda92b25c4
2022-04-25 13:19:53 -04:00
91778a298b jamiaccount: do not emit signals during authentification
callbacks from OnChangeCallback are called during account's
initialization. This will triggers signals that the client will
already retrieve via dedicated methods and those signals are emitted
when the account is not usable (accountManager or id_ not initialized).

Change-Id: I8d16c077bbf8b827c91be9047b202cd5e859167a
2022-04-15 16:05:38 -04:00
a6e0119ce7 conference: remove dummy participant if audio only
With video split we don't need dummy rtp session.

GitLab: #729
Change-Id: Ibf6bb303d1860a80549f6cfb2a06e36e51f48b70
2022-04-07 08:30:37 -04:00
dca2eaaa4b contrib: bump opendht to 2.4.0
GitLab: #717
Change-Id: I89009c3d4402b8d04af3586c0360b9bf549b7a11
2022-03-23 15:48:20 -04:00
b499034ba4 swarm: improve vote system and supports unban
This patch fixes several behaviours:

+ Banning a member now stores the previous state of the member
+ This allow to store empty .crt files for invited
+ Unbanning a member is now possible for an admin
+ This re-add the member in its previous state

https://git.jami.net/savoirfairelinux/jami-product-backlog/-/issues/51
Change-Id: I34d5913c023043e07544f1b8bb6211aea5db0065
2022-03-23 12:30:14 -04:00
4af0279fa2 video API: unify SinkTarget and AVSinkTarget
Change-Id: I6cbbdc1ec6953c1c9ec47a57acf8ac4d8995468d
2022-03-21 16:56:54 -04:00
24dd4150c8 video API: remove legacy FrameBuffer fields
Now that every client uses either
FrameBuffer::avframe with SinkTarget,
or VideoFrame with AVSinkTarget,
we can remove the obsolete fields in FrameBuffer
and make it a simple typedef.

Change-Id: Icf88f3d7df4f04f5cfb389f83e67aec94c17b5dc
2022-03-21 16:51:06 -04:00
ab3e52316c conversation_module: return swarm's profile to the client for requests
Conversation's requests also have metadata attached which clients
must be able to access.

https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/670

Change-Id: If02fffb5646074e993c090846ff998e83ab79d78
2022-03-21 14:18:34 -04:00
4b2cc45f96 conversation: pinCertificates must be blocking before reload
In the current code, if pinCertificate is too slow, the following
getCertificate will fail.

https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/340

Change-Id: I0813b5984b4a6952373c7bd0fad3748950139784
2022-03-21 14:18:34 -04:00
0c98f2b1ff sipcall: do not use invalid pointer on videoRtp
Change-Id: Iccd5fa02855fb8dc33529177e2fb14d7588add44
2022-03-19 18:46:10 -04:00
0c57cee538 logger: add console logging code for Windows
Previously, AllocConsole was called from the client. This has been
moved into the ConsoleLog class. When calling Logger::setConsoleLog
an attempt to attach to the console of the parent process will be
made first. This will be the case when Jami is being run from a
command line with the debug option. Otherwise, the logger will use
AllocConsole to instantiate a console window for the logs. The
latter will have it's lifetime bound by Jami.

Change-Id: I7f1728626962a2f702ad564bb16deadc2d92dfb7
2022-03-17 16:20:17 -04:00
f6f8a83754 conference: make single transfer to main memory
While in a conference, the video split added a transfer to
main memory for each of the participants. This makes the sinkClient
a observable and the participants sinks are attached to the main
conference sink. The main sink has its frame transferred and the
subsequent observers do not need to repeat the process.

GitLab: #709
Change-Id: I1f4ea9460c052a100b4809101c35d196cd79acbe
2022-03-17 13:27:45 -05:00
4b5595c398 media: adjust to ffmpeg 5 API changes
Change-Id: I5c5b9935e7ed3a15029d5aa62e0266c77e59f652
2022-03-15 14:36:03 -04:00
2b45e58237 video: prevent exception on macOS
Prevent exception when getting supported frame rates.

Change-Id: I2fe140bb51e0f20510b1c3f6a62df8921030dc7d
2022-03-09 17:32:51 -05:00
5a83c7a260 build: update opendht
Change-Id: Ia26c97dbe487509d3e346d7c95675bd984d2ab77
2022-03-04 12:31:16 -05: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
c3d0e5ebee Mute audio: do not change media direction
Mute/un-mute audio is done only locally, i.e. without requesting
a media change (re-invite) as done for the video, thus the media
direction in the SDP must not change for the audio stream.

Gitlab: #688

Change-Id: I3775a29f6c566a159d5b9269b4d9462ab4e3c36f
2022-02-28 09:55:54 -05:00
0f0bb5d89f globals.mk: Remove dead code.
astyle was removed in favor of clang-format in commit
85510893d5.

* globals.mk (ASTYLERC, indent): Delete variables.
(indent): Delete target.

Change-Id: I138f887a5845ff24e12c5c8ece26e30d4cfc7616
2022-02-25 15:20:00 -05:00
3377a4581e manager: Rename the 'ringchoice' local variable to 'ringtone'.
* src/manager.cpp (Manager::playRingtone)<ringchoice>: Rename local
variable to...
<ringtone> ... this.

Change-Id: Ia94ead6dfa070a5c18d3e267e00d8895f38e5b09
2022-02-25 09:28:17 -05:00
e23a88672d account: Make the default ringtone path portable.
Before this change, the default ringtone path would be for example set
to "/data/data/cx.ring/files/ringtones/default.opus" on Android;
migrating the account to GNU/Linux would cause the ringtone to not be
found.  The change leverages existing code that searches for a base
file name in a JAMI_DATADIR-prefixed location.

* globals.mk: Set JAMI_DATADIR from the environment if it's defined.
* src/account.cpp (DEFAULT_RINGTONE_PATH): Universally set to
"default.opus";
* src/manager.cpp: Add a definition check for the JAMI_DATADIR macro.
(Manager::playRingtone): Go through the ringtone path resolution
scheme on all platforms.  Some platforms will need to define the
JAMI_DATADIR macro correctly for this to work; for example the
libjami build on Android should have the JAMI_DATADIR macro set to
"/data/data/cx.ring/files" for this to work correctly.

Accompanying client-android change:
https://review.jami.net/c/jami-client-android/+/21148

Co-authored-by: Amin Bandali <amin.bandali@savoirfairelinux.com>
Change-Id: Ia408a8db263af91c2734f61aa38c4ed717605359
2022-02-25 09:15:40 -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
8a1052781c swarm: banned members MUST NOT receive new messages
membersUris() didn't remove banned members from the list by default,
causing the daemon to send messages to banned members.

Change-Id: I84a80476d36d27ec33379b6e8be38f317322ec3b
GitLab: #298
2022-02-19 10:54:39 -05:00
4ddf1c6f2e swarm: allow admin to kick invited members
/invited was not checked for kicking member, add this directory
and cleanup the function for resolving votes too.

Documentation is updated:
https://git.jami.net/savoirfairelinux/jami-project/-/wikis/technical/\
2.3.-Swarm#remove-a-device-from-a-conversation

https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/340

Change-Id: I18882066e3e42ced8ed656da3b1d2ed0a19929cf
2022-02-19 10:54:39 -05:00
3db5a90828 video: start device event listener when device list is empty
This patch fix video device detection. Before device event listeners
would not start if a video device list is empty.

Change-Id: I5b320c1ae47b945d6f570e3cd2afcd6bd01dfdae
2022-02-18 11:37:55 -05:00
53cf11bd0c swarm: verify all certificates changes
In some cases, a user in the swarm can update its certificates.
However, the new certificate MUST be checked and MUST be signed
by the account.
So, this patch validates two scenarios:
+ Check that a fetch error is sent to the client whenever an invalid
certificate is detected in the original clone
+ Check that a fetch error is sent to the client whenever a
certificate is replaced during the conversation.

Change-Id: Ieb15fb6444dcf4541f00c511a9f4ba0c64617130
2022-02-15 16:00:44 -05:00
d2d18bdedc swarm: handle device's expiration
If a device expires, a migration will regenerate the device's
certificate. In this case, the device certificate in swarms must
be updated.
So, the idea of this patch is to verify that the current certificate
in the repository for this device is still correct. If the device or
the member got invalidated, it tries to replace the current certificate
(updated via the migration). So that the new commits will still be valid.

Change-Id: I75b19b0edbb5601a758a73a4c4a44678d77295e1
GitLab: #684
2022-02-15 16:00:44 -05:00
6e83fc2a45 build: update libarchive path
Change-Id: I3a54032a774b8edb2b8d51ae1115fa84a0487ac7
2022-02-14 16:46:53 -05:00
2269b76fa8 coreaudio: handle the case when no audio device is connected
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/671

Change-Id: If0f2237042c746214cadb33ef8e56c22fe327a37
2022-02-11 16:21:31 -05:00
7634487e9f libressl: update hash
The hash changed because the libressl team updated their tool,
changing the copyright in the tarball

Change-Id: I0fcf3d65d5058a5fdfdc161aa427758ca20e9a2f
2022-02-09 15:52:29 -05:00
0078370f9e swarm: make sure appdata/contacts is synced with appdata/convInfo
On older versions, removeConversation didn't update appdata/contacts
causing some removed conversations to be announced in contacts details.
On Android, this hide the contact from the smartlist, as it's waiting
for a removed conversation.

Change-Id: I05be12ffcd2e5fe38d84c6f972b97e082c612ac7
GitLab: #714
2022-02-07 15:23:39 -05:00
34af9c4a3a account_archive: re-work migrating process
When a device is expired, the migration will update the certificate
chain with the previous key. So, after a migration, the device's id
must be unchanged.
However, if a device is revoked, this should trigger a re-generation
of the device with a new PrivateKey (so generates a new device).
Add related unit tests.

GitLab: #684 (this is some preparative work)
Change-Id: I7ff0cff97b7285186539cfadc6e33b620ded5b27
2022-02-04 15:59:04 -05:00
57723b8c5a tests: fix ut_conversation
+ testSetMessageDisplayed and testSetMessageDisplayedPreference were
broken because the lastDisplayed behaviour was recently changed to
support syncing across devices. Update the two related tests. Also,
avoid to update the lastDisplayed on merge
+ testSyncWithoutPinnedCert was badly written causing some sporadic
failures.

Change-Id: I364818b4ececb0fa63e87441f55a7da76fe1feb6
2022-02-02 15:45:14 -05:00
afe8b7c307 dbus: add startShmSink
Since the video split, the daemon can manages a lot of Sink clients
which are generally not used by any client. This introduces a lot
of wasted computation.
One of the problems is that every sink client have a SHM memory if
dbus is enabled and any update generates frames for this SHM memory
even if the client is not showing them.
This patch introduces VideoManager::startShmSink, which enable
or disable transfer and works like VideoManager::registerSinkTarget.
Thus, a transfer will only be done if the client is explicitly
asking to transfer frames.

Change-Id: I1d265b7ffcdc37aff9c5f729a146fa26c5d7d4a1
GitLab: https://git.jami.net/savoirfairelinux/jami-product-backlog/-/issues/9
2022-02-02 13:26:19 -05:00
e215d54a7d test/agent/scenarios: Add bulk calls
Gitlab: #687

Change-Id: Ib21093ab520165f02631aab483c1a86efc31aae7
2022-01-28 17:47:06 -05:00
945c4ce971 test/agent/jami/signal: Add syntax rules for signal handlers
Small helpers for signal handling.

`with-signal-handler` is useful for scoping signal handler and
`with-signal-handler-sync` for signal synchronization.

Change-Id: Idc7696fb273003d526f3a4658e7fb5623c2c5827
2022-01-28 17:47:06 -05:00
84c7c9de75 swarm: sync read status across devices
Because swarm is a synched history compatible with multi-devices,
if a message from the swarm is read on one device it should be
synchronized with other devices as much as possible.
The idea of this patch is to add lastDisplayed sent in synched
datas to allow clients to update the read status. However, there
is several scenarios to take into account, because the history
can be partially synched across devices.

5 scenarios are supported:
+ if the last displayed sent by other devices is the same as the
current one, there is nothing to do.
+ if there is no last displayed for the current device, the remote
displayed message is used.
+ if the remote last displayed is not present in the repo, it means
that the commit will be fetched later, so cache the result
+ if the remote is already fetched, we check that the local last
displayed is before in the history to replace it
+ Finally if a message is announced from the same author, it means
that we need to update the last displayed.

If the last displayed message is updated, AccountMessageStatusChanged
is triggered for the client.

Doc: https://git.jami.net/savoirfairelinux/jami-project/-/wikis/technical/2.3.%20Swarm
Change-Id: Iedd29129d72cbeb43499471bdfd492dd4d49dcb6
2022-01-27 21:28:44 -05:00