Commit Graph

264 Commits

Author SHA1 Message Date
2100815f51 namedirectory: replace restbed by restinio
Depends-On: If43bab09e0d209aef1e92217d145a22f0cdab466
Change-Id: Ic8f55919f82c2e2ab088d4bc38814c99e1006062
2019-09-10 11:16:07 -04:00
fd970d5e2f Revert "manager: add shared asio::io_context"
This reverts commit 36dfd11f52.

Reason for revert: temporary win32 incompatibility

Change-Id: Ib6718b2427cf4e0f3d2f456c4722830232b850cd
2019-09-06 16:27:03 -04:00
36dfd11f52 manager: add shared asio::io_context
Change-Id: Iebd54e75d9f7baaa61547dd1e18100a7d88cc807
2019-09-05 17:20:37 -04:00
431cee5d12 recorder: add preferences
Adds whether or not the local video feed should be overlaid on the
remote video feed. Adds a quality setting for the recorder.

Change-Id: I60bd80c6441c7d516120680bebb1acdeb3824c49
2019-08-07 15:05:27 -04:00
60515d893a upnp: support libupnp and libnatnatpmp simultaneously
Update libupnp to version 1.8.4.

For windows, the IPV6 preprocessor must be undefined. Or else
libupnp won't initialize. Added visual studio 2017 support
via one patch for windows that also combines previous windows
patches.

UPnPController: Class that the jami classes use to control the
opening and closing of ports. Every  service has it's own upnp
controller. The controller does it's actions by using the upnp
context class. Also refactored the functions used to add
mappings. Instead of using two different functions with
different types of parameters, we now use one function with
parameters that have default values. The logic stays the same
but the function call is more clear.

UPnPContext: Class that holds a (linked) list of discovered IGDs
and their corresponding protocols (which discovered them).
Whenever the controller wants to add or remove a mapping, the
context picks a valid IGD in it's list and uses the correct
protocol to complete the required action. This class also has
the ability to swap protocols for an IGD that was discovered
by more then one protocol.

UPnPProtocol: Virtual base class that defines the functions
needed by the context to use the corresponding protocol.

PUPnP: UPnPProtocol derived class that represents a upnp client
that uses the portable upnp library (libupnp). Every time the
client discovers a new IGD it uses a callback to add it to the
context's main IGD linked list. It also has an internal list of
IGDs that it discovered. Added features to this class include:
	- IGD event subscription.
	- Use UpnpInit2 function instead of deprecated UpnpInit
	  function. It's also supposed to support IPv6.

NatPmp: UPnPProtocol derived class that represents a upnp client
that uses the NAT-PMP library (libnatpmp). Unlike libupnp,
libnatpmp only supports discovering one IGD. Also uses callbacks
to add the IGD it finds to the context's main IGD class.

Also inclided debug warning prints whenever a controller opens
and closes the ports. That way we can keep track of whenever
the application opens and closes ports on the internet
gateway device.

Gitlab: #96

Change-Id: I199271edac2c6d93dc60c24e2e2aefe36de7950c
2019-08-02 17:29:10 -04:00
486709d4fd gnutls: use version 3.6.7
Change-Id: I4d6c06d8bda6a2bba817108b1f323afaf27766ba
2019-07-23 16:59:48 -04:00
780a9d5762 build: cleanup
Remove unused build options, flags and defines

Change-Id: I0c25511ade66025427ca0411cf34cfdd73a4bd1f
2019-07-19 14:12:20 -04:00
093537a6ff peerdiscovery: add getNearbyPeers() function
Change-Id: Ifcf2c2b3676a1903f16818e889dac6ca85a5aa0a
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2019-06-11 16:21:45 -04:00
6af72289f8 rename ringdht to jamidht
Change-Id: Id5673ba9f2ec519070cc112685dea5ced94c3b38
2019-04-17 10:15:15 -04:00
2130f067b6 sources: rename to jami
* rename namespace from ring to jami
* rename logs methods from RING_* to JAMI_*
* rename RING_VIDEO to ENABLE_VIDEO

Change-Id: Ic98498652d7059fafe58a96220d565bcdfa53658
2019-04-02 17:11:40 -04:00
a89cf39255 dring: add cancelMessage API
Change-Id: Id99a8d8a3af3ef59d52a3267e0f44262c6df17f3
2019-04-02 13:33:18 -04:00
3d4724cdc1 project: rename package to "jami", migrate config files
Change-Id: I5c7d429bd32aa22bd4c7ad0914a7581176c2ccdd
2019-03-25 01:22:54 -04:00
36bee9bb72 build, contrib: remove pcre
Change-Id: Ifc2c224afe9d3de9d52ecc1d66d7d81ccec524ac
2019-03-11 13:08:00 -04:00
dda1f61d22 video: add rotation
Change-Id: I0b760e4ae32ab372cef49ef9c2120e722e041ef1
2019-03-07 16:27:29 -05:00
c52e332b0b audio: add audio meter
Adds a signal that sends the linear RMS level for a given ring buffer.
The signal must be turned on via the API and can be turned off when
needed.

Adds an audio preview so the mic can be read. Call startAudioDevice and
stopAudioDevice to initialize and stop the audio layer.

Change-Id: I6a71ef87ee805a6d4bfa824fa901dd638e8cbd65
2019-02-01 10:10:02 -05:00
94c8f4b616 accel: add signals when toggled
Preemptively adds signal for hardware encoding so version won't have to
be bumped again.

Change-Id: Ie3b828671fab3628853b85a2a8259200e9a809c0
Gitlab: #55
2019-01-16 13:26:09 -05:00
ed6995370b Build with _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 on Linux.
Add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to CFLAGS and CXXFLAGS
on Linux platforms, except on Android.

Makes the build not fail in 32-bit linux.

Change-Id: I31358b69b2bf0a99b03d148fbc9f0a3a235d9741
2019-01-14 21:18:19 -05:00
ffbd2a0f56 Fix 'configure --enable-restbed-old-api'.
(It would probably be enough to just include config.h, but now the
intention is clearer)

Change-Id: Ia427d940b5b9e94b6ba174fc38e9d638d507ae45
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2019-01-11 09:10:14 -05:00
e22acb9f34 ringaccount: update account's archive before exporting
If the archive is not updated before exporting it, contacts can be
missing (because the file is only updated when a new device is
added for now).

Change-Id: Ie1068af26826b2a9acd1aa2c76123cff43eb6836
Gitlab: #65
2019-01-10 13:22:09 -05:00
8b9940eb26 rename Ring to Jami
Removes refrences to project name in logs and comments where it doesn't
matter whether or not the name is specified.

Change-Id: I17f99390226929ee620bc479b203825389bb3d4d
2019-01-04 16:26:12 -05:00
9e3f21605d api: add way to get renderer info
Adds ability to retrieve the shm renderer info from a call id, in case
the client is launched mid call (else it can't show the call).

SinkClient now keeps track of its width and height.

Change-Id: Ie43c196c60de5e22825fc71ff404e99bbfbe9402
Gitlab: #59
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-11-19 09:43:23 -05:00
a031c92dc9 call management: add PEER_BUSY status
There is currently no distinction between the "peer busy" and "we
replied busy after timeout" states, since both end in the BUSY state.

Add a new PEER_BUSY state allowing such a distinction:
* PEER_BUSY is set when peer replied busy
* BUSY is set when we replied busy to an incoming call

Bump daemon API number to major 7.0.0 since this is breaking the
current API. In fact, these changes should not break anything in
any well implemented client because unknown states should be properly
handled, but better check.

Change-Id: Id83f6db3d4524a91951b9945797f5fd2c019ff2f
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-10-30 10:47:54 -04:00
b64c2570d7 dring: expose frame wrappers in abi
Makes use of AVFrame's reference counting if possible instead of copying
the data.

Only bumps minor version because MediaFrame et al weren't in the ABI
until now.

Change-Id: I692e76230ed057c1ad4e46ab59ea5cfd163fb98d
2018-10-13 16:44:49 -04:00
43dcfd168e build: add symbol visibility support
Changes default visibility of symbols to hidden and makes only the API
public. This patch aims to provide not only a stable API, but a stable
ABI as well to any users of libring.

This decreases the number of exported symbols significantly, benefitting
dynamic linking time. Also decreases the chances of a symbol collision,
and enables compiler optimizations.

Bumps version to 6.0.0; clients must be recompiled.

Change-Id: I5b639a6c0933af3021e40369b2e80d9a0b825e89
2018-09-17 11:51:13 -04:00
3f90a3b26a build: set default flags before AC_PROG_CXX
Change-Id: Idaa6532471d24ebd01613d01843fc3e0758d0025
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2018-08-21 13:35:53 -04:00
ffc6d6d178 dring: unify register signal handlers functions
- provides registerSignalHandlers to replace registerCallHandlers,
  registerConfHandlers, registerDataXferHandlers,
  registerPresHandlers, and registerVideoHandlers which are now
  deprecated and forward to registerSignalHandlers

- this patch bumps the daemon API to 5.2.0 and is backwards
  compatible

Change-Id: Ie9479610114a474b4748614988c3ea0156dce6a9
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-08-16 14:30:35 -04:00
30af80e81c daemon, contrib: build with -O3 in release mode
Change-Id: I1c724c6652e001bc92b36d60e163f29331c6cd74
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-08-16 11:26:04 -04:00
20b631fb78 audio: refactor resampler class
Using MediaFilter would make the resampling time longer and more
unpredictable than directly using libswresample.

Adds libswresample as a dependency.
Simplifies Resampler class.
Resampler detects changes in input and output formats automatically.
Changes Audiofile to use Resampler instead of MediaFilter.

Change-Id: I24919e8fa514dbb4a38408e338016976e7424136
2018-08-08 13:36:45 -04:00
e3022741bd audio: remove libsamplerate dependency
Rewrites the Resampler class to use MediaFilter.
Adds a unit test for the new Resampler.

Change-Id: I8ed78d2e1d82df81bbaf46a9719c682c825ee245
2018-08-03 14:13:41 -04:00
834e835dee audio: remove sndfile dependency
Removes unused/deprecated audiorecord/audiorecorder
Allows any file to be used as a ringtone (mp3, ogg, etc)

Change-Id: I9ce33ec3d5f083caf098266befa597e78a95d7d6
2018-08-02 17:20:50 -04:00
2cbbaf7983 configure: remove ilbc and gsm
FFmpeg's RTP muxer does not support GSM, while Ubuntu does not package
iLBC. Removes the old configure switches.

Removes package detection from contrib. Keeps contrib rules in case GSM
is later readded.

Change-Id: I705a521e2baf34c757c22a72e04cdf27233b5a7b
2018-07-30 13:15:51 -04:00
b59f5cb6ec autoconf: fix typo
Change-Id: I35eaa5a339d5b4b6cb25fb7b12d6006cbf3202a5
2018-07-04 12:50:42 -04:00
d22bed2591 Revert "Revert "media: add filters""
Filters were reverted for the release so the binaries wouldn't include
libavfilter (which wasn't yet used).

This reverts commit 1e6a471687.

Change-Id: Ib9790a544b442066265b3fe1ea96313be35eff62
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-28 13:07:57 -04:00
1e6a471687 Revert "media: add filters"
This reverts commit ea2933d4ac.

Change-Id: I624c07255f60186a0d1e6610a58956775f91b342
2018-05-09 14:38:14 -04:00
ea2933d4ac media: add filters
Adds dependency to libavfilter, which provides many useful utilities
such as hardware encoding, mixing audio or rotating video.

Access to libavfilter is done through the MediaFilter class, which takes
a filter graph string and AVFrames as input and outputs filtered
AVFrames.

Adds unit tests for MediaFilter.

Change-Id: I0bf3869a9f19ad9cbbe1fc5e2d37eb83ece66ccc
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-08 14:55:03 -05:00
0eae0449fd namedirectory: use https instead of plain http requests
Add libressl dependency to compile restbed with ssl support. Also,
this patch removes a unused file.
Bump asio to works with libressl instead of openssl.

Change-Id: I5a90dba97693ccda58899f69080e545bdea926d9
Signed-off-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2018-03-29 10:54:00 -04:00
73ef02ac2b build: don't link argon2
Linking Argon2 shouldn't be needed as Argon2
is a private OpenDHT dependency.

Change-Id: Id46aee27cb09a8af36912b59f74d62dbec0839aa
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2018-03-19 17:26:34 -04:00
7f14e58c53 ringaccount: add the ability to copy the account archive
Add a method for exporting the account's archive in a
file.

This patch updates configurationmanager interfaces and
fix an error with exportOnDHT for nodejs.

Change-Id: I9fdfcd20b66854ca768166e5198b8ae428192305
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2018-02-28 12:16:46 -05:00
19dbc12486 datatransfer: API changes to not throw
GTK client uses D-Bus, so is unable to forward exceptions.
This causes crashes of daemon (unhandled exception).

This patch changes DataTransfer API to not throw (noexcept).
This is an important changes, not backware compatible,
so the API version has been modified consequently.

Change-Id: I9f2a2fe1732b2622ace16225b6e792dc15383ba1
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2018-02-19 15:24:40 -05:00
6261e2db06 dring: add AccountDetailsChanged signal
Change-Id: I538d3a777380d8c8c55c0999705a957a522a4a86
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2018-02-12 11:42:58 -05:00
14f5475015 build in non-debug mode by default
* declare NDEBUG for library and contrib
* activate pjsip extra checks as all PJ_ASSERT's are deactivated

Side effect: pjsip does not call abort() due to disabled assertions.

If debug is required:
* contrib: call bootstrap with --enable-debug
* libring: call configure with --enable-debug

Change-Id: I47b104c0f32352f0503457a9d419c4ed5db4e126
2018-02-05 14:17:25 -05:00
5627621796 opendht: bump to 1.6.0rc1
OpenDHT 1.6.0 unifies its API so users don't need to use
extra build flags.

Change-Id: Iea965def553a1a059cc9c41d3ff15ab96b2a8f31
2018-02-01 12:12:09 -05:00
c5e74abe53 Ringaccount: add support for DHT proxy and push notifications
* Bump restbed for OpenDHT, update patch and add patch to react
  to timeout and socket closed in restbed.
* Bump OpenDHT to support push notifications
* Add DRing APIs to support setting a client push notification token
  and to retransmit push notifications to dring
* Implement proxy support in RingAccount

Change-Id: I8d3a02cf54a9666a94ab992ee3fa2958e82aa7ad
2018-01-31 11:20:53 -05:00
1aa7759f8f 2018 copyright date update
Change-Id: I1ef88bc640f79790aad2b5285ea2c776aa8cd366
2018-01-23 17:26:34 -05:00
cbff7d98f0 ios: add video implementation
- adds a slightly altered version of the android video implementation,
  as a swift AVFoundation implementation will be used in the ios client
  to enumerate the video input devices.

Change-Id: I7c16fc39c5d22e54fb146881150b6cbcfddb7806
2018-01-12 17:37:58 -05:00
755347dd6b data transfer: first implementation
First implementation of Reliable Data Transfer feature in Ring.

This implementation is a draft, comes with a Python script
tools/dringctrl/sendfile.py to play with and doesn't
implement all the API as described into "datatransfer: API proposal"
commit.
This version uses TLS over TCP-TURN sockets to encrypt data.

Transfers require a TURN server with TCP peer connections
as described by the RFC-6062.

Testing: Currently only sendFile API is implemented and data are
saved into a temporary file saved in "/tmp/ring_XXXXXX",
where XXXXXX are replace by mkstemp() command.

Change-Id: I5b8f48432edd58df5046e368a99f58ea44046dcd
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2018-01-05 11:18:35 -04:00
94a48eb994 fix build on debian testing
Debian Testing doesn't use the contribs, so bump down the FFmpeg
requirements in the configure.ac as well as making RING_ACCEL dependant
on a certain version of libavutil.

Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: I1f9d0de44e5f9d0bbb69b20d73a396de7e5d64b4
2017-12-30 21:22:42 -04:00
64322318dc osx: bump ffmpeg
Bumps FFmpeg to match the other platforms. Modifies the acceleration
code to work under the new API.

Enables bitstream filters, as some of libavcodec's components, such as
VideoToolbox, use them.

Change-Id: I3a6cee2cf06881bba4602c0ed635ff45908e7b85
Reviewed-by: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
2017-12-21 18:18:00 -04:00
c8c0c7e2a7 new placeCall API, bump daemon API to 4.1.0
Add a new placeCall API with possibility to gives call details.
This permits to give information like media preferences before
to start the call.

This changes force a daemon API bump to 4.1.0

Change-Id: I95d3b5480e194ece4a3cdb03436b2e1625eae016
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2017-12-04 11:21:21 -05:00
5066a44f95 contrib: bump ffmpeg
A non exhautive list of what this bump brings:
- Direct 3D 11 hardware decoding (UWP)
- Uniform API for vaapi, vdpau, videotoolbox, dxva2 and d3d11va
- 32 bit MediaCodec fix (Android hardware decoding)
- Non X screen capture on Linux (Wayland support)
- Better VP9 support
- Various bug fixes and optimizations

Due to problems with the VideoToolbox acceleration, the bump for MacOS
is postponed.

Change-Id: Id05a1d789c90ea1321f10e801a036c47b6f76d88
2017-10-19 06:29:41 -04:00