Mutex deadlock occuring during file transfer creation.
Exchanging some calls to fix the situation.
Change-Id: I2f0108e63e89a13e3f6f2c1b1e096fbf9a6a1290
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
static constexpr in class/struct need to be redeclared in namespace
scope until C++17 (at which point it will be deprecated).
Change-Id: I27f0448edd65f9d7d51ad5eb7263c76d17563072
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
add annotation type to fix Qt usage for the custom-type
added by the DBus dataTransferInfo method.
Change-Id: I62b8d13171d25c73850c6120a1e5fec8fda07e72
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
Doxygen keywords must be backslashed, not slashed.
Change-Id: I625e1241981c46da2d5a17da4daf4b9a571f3a35
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
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>
Or at least independant of underlaying transport...
To make TlsSession able to handle both TLS and DTLS
this patch removes the ICE dependency and replace is
by the generic network ABC class 'GenericTransport'.
As a first step this class is declared in tls_session.h.
Side effects of this change are:
* refactoring of PMTUD procedure: 'MTU' for gnutls has the meaning
on 'payload-for-gnutls' so this information is now drived by
the generic transport and not hardcoded anymore.
The minimal value of probing remains hardcoded, as is a minimum
given by RFC's documentation and it's based on an IPv4 packet
associated with UDP protocol.
* getMtu() is now maxPayload() and represent correctly what
the application must have.
* TlsSession implements itself GenericTransport: we can chain
GenericTransport instances to construct an overlayed transport
protocol.
* TlsSession is now considered as non thread-safe for its public API.
Caller must bring itself this property.
This permit to remove a redundant mutex in send() operation.
Note: and it's the case in the only user (SipsIceTransport),
that why the mutex is redundant in 100% of cases.
Notice the benefit of this genericity refactoring let us
write a unit-test for this TlsSession class without having
an heavy ICE transport to mock-up.
Also ICE transport gained of this by adding a new IceSocketTransport
to replace IceSocket in a near future (need async IO in GenericSocket,
but not required for the moment).
Change-Id: I6f4591ed6c76fa9cb5519c6e9296f8fc3a6798aa
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
Move all JNI file sources to the daemon. Ring Android client will use
this files to generate the final libring.so including the
ring_wrapper.cpp
Change-Id: I4e800bb1d33b5905c715054d1718c0bdb3fc1d55
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
fix for patch:
0f5248018d PJSIP support to std::error_code and std::system_error
pj_strerror crashes on due to wrong given string size.
Change-Id: I8d68b885ce0d587b27e8b361c9ad60019ed355fb
Some practical C++ additions:
* class PjsipErrorCategory as error category for std::error_code.
* class PjsipFailure inheriting from std::system_error exception.
Change-Id: I957cd36d06cf49ae98cb6634f5e4d5dcac666be8
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
fix nullptr access during incoming call on ringaccount
due to a missplaced method call.
Change-Id: Ia226d9d8e53ae8143b42d9b08814b5448c8be95d
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
libavutil now covers the simple cases for creating and managing devices.
As Ring does not need to fine-tune these processes, most of the accel
code can be and has been removed.
Most hardware decoders output NV12, so skip extra conversions by
outputting NV12. Said pixel format is supported by everything that isn't
excessively old.
Change-Id: I10c440026fc3b289dbba7ecbca47e55c57147207
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
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>
When IP2IP account is created only AccountsChanged signal is emited.
But doRegister() method is called and this kind of account must succeed
on such (as there is no registration) and must call
setRegistrationState(RegistrationState::REGISTERED) to make aware the client
on this event.
This was not done. This patch adds this call.
Change-Id: Ic5b8a31d9e2b98dd96ed394247f77bbfa3d8cdde
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Let's say we're building gnutls (since the system version is too new).
gnutls depends on nettle.
Let's say we're using the system nettle (naturally in FOUND_PKGS).
nettle depends on gmp.
With the old (non-recursive) dependency tracking, we would end up building
gmp just for nettle, even though we aren't even building nettle!
Change-Id: I24e6f59416839ea202e0aceafe101432fe9c2646
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Account::getAccountType() returns a raw pointer on char,
but we use it with simple operators like == or != to check
the semantic behind. This results to pointer comparaison
and not "string" comparaison, causing many bugs.
Fixed by changing the comparaison operators by "strcmp" function.
Change-Id: I74baba083af0159d445c1505ddd5df55e6ca4fa7
Tuleap: #1575
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
make dev life easier during debugging steps.
Change-Id: I762763436b4aa0800da6d926230c011649a44e88
Tuleap: #1575
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
Audio encoding is usually mono-threaded and doesn't require
as much CPU as video encoding. Limit to 4 threads since more
would not be useful and might introduce latency and decrease performance.
Video encoding takes significantly more resources, however for live encoding,
using more than 16 threads might introduce unreasonable latency.
Since new customer CPUs (AMD Ryzen and Intel Core i7/i9) now have
more than 16 logical cores, setting a higher bound of 16 threads.
Change-Id: I5dc2d3f51019c563b8cec3fbddffa13cbafdb9a5
make public Call::setEarlyDetails and change its name
for Call::updateDetails().
This permits to change details at creation AND after
as in the case of RingAccount where we don't have
details when the call is created.
Change-Id: I145624f93358990ed36d027bdb47bd4e498b1770
Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
- Adds CFLAGS to make command for secp256k1 build when building for
iPhoneOS(arm64) as the configure script ignores the SDK parameter
Change-Id: Id57933d8776e7c348a0c37bae508fe61161e4151
- Updates the vs2015 project files
- Adds ciso646 header to diffie-hellman.cpp for logical operator
compatibility with the Microsoft compiler
Change-Id: Ie858e054bf26cf839bef6eace79fa546894a7963
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
<thread> std include was missing to build on ios.
Change-Id: I8da9dd25e41d67ca3fa7343e487e2b0a94d93843
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Use latest jsoncpp API to remove deprecation warning.
Change-Id: Id599e1e30cf201f4027ee10fa4229f14b93264e6
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
Continue the compilation firewall work.
Also update code to use C++14 features.
Rationale: prepare the change to a new transport
abstraction over the project.
Change-Id: I4d387bea8447f5dc251a6bd64ecb63b234bd1cdf
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
Remove high dependencies on OpenDHT includes inside Ring internal
header files.
This reduces compile time by not recompiling the whole project
for any changes into opendht.
Change-Id: Iba852e0b889e67ee12b3a9747e6d04de23572c2e
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
Use the new placeCall with details API and add a new AUDIO_ONLY
call details to let the possibility to make an audio-only call.
Change-Id: I6ff0032a2b315b6ef5f32677d72ca8d37ef7077b
Reviewed-by: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
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>
Remove IceTransport::getNextPacketSize() API and IceSocket one.
Unused and on-going to be deprecated API.
Change-Id: I6cdf72e81838411060e3cae636b156f309200e14
Reviewed-by: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
Recent CPUs should be able to encode higher quality h264 in real-time
without any problems.
Allows users to encode h264 with higher quality if they so choose.
Change-Id: Ibbb01cbc55e20f497f99f56c6c0e6616ff0734bc
This attribute was useful with the old decoding API. Refcounted frames
are always used with the avcodec_send_packet/avcodec_receive_frame API.
Change-Id: I0904ed8731c329e0f8f3d59d1872bff6a26543be
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Fixes a regression where keyframe requests were sent by the wrong peer.
Corrects artifacts in a shorter amount of time.
Change-Id: I2b981b46c07422a4289f378e2a5deaaba0047a3b
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
This tool is needed during build when using make-ring.py script from
ring-project repo. It was included as base tool in previous Fedora 25
docker image but not anymore in Fedora 27.
Change-Id: I11833a5eb3cd3b7a0bcb705d4a136f349035dd45
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
Version is changed from 25 to 27 as the former one is entering EOL
soon.
Change-Id: I38eb0c687101a45ecd24531694e41118295c5fd1
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
AV_INPUT_BUFFER_MIN_SIZE is the new name for FF_MIN_BUFFER_SIZE, which is
not available anymore in new releases.
Change-Id: I79abb3a8192d8572323f705eecc44edc974026f8
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
Using too many threads for decoding is not recommended and can
introduce latency.
Also during a call there are 2 live encoding and 2 live decoding,
so using all threads for every decoding is not useful and could
decrease performance and increase latency because of more
CPU context switch.
This is especially visible on machines with many logical cores
like AMD Threadrippers or some Intel CPUs.
Ideally, loads should use in total as many threads as logical cores
to profit from the full machine power while limiting context switches.
In this patch, decoders will use half the number of logical core,
with a maximum of 8 threads.
Change-Id: Ibe6c083c35fba972d930346629de2175625afd8c
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Keyframes will only be sent on request instead of a timely interval.
This may interfere with clients that do not yet have this patch.
Change-Id: Ie786160744257052ef9d103d50fe46cd90138927
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
Fix definition of Channel::operator <<
Was not correctly defined to be perfect-forwarding template.
Change-Id: If6b6a97a1d627ff9908a38bb2958bbb236b1e4f0
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
This is a DRing API proposal (no implementation) to the data transfer
feature.
Change-Id: I3dd270ae910540b5aef1f3c15dc1b7b2966156c0
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>