Commit Graph

12102 Commits

Author SHA1 Message Date
abe05dbdd7 manager: catch exceptions in mainloop
This patch prevents exceptions to crash application
if happen during pollEvents() processing.
Exception are just catch and displayed.
In case of exception caused by a task, this one
is removed from pending list.
Handlers are not removed, take care of that!

Change-Id: I266539585baf68f329d53f3d20361c4cb08211f3
Tuleap: #200
2015-12-15 18:01:18 -05:00
2def10156d build: fix --disable-video compilation
Change-Id: Ib0306f783a597e5cd1d6abfd6bfd75f5f636e73d
Tuleap: #198
2015-12-14 17:11:46 -05:00
606fbd3538 Revert "contrib: bump opendht on latest changes"
This reverts commit fa77bda458.
and commit 5a9d104312

We got a sever regression on OpenDHT since storage feature introduction.
We revert to a known good state.

Change-Id: Id2af93e68b3ec943db34f223b1391cfe6fc9deb5
2015-12-10 18:09:57 -05:00
5a9d104312 contrib: bump opendht to latest changes
This bump tries to import opendht changes to fix an network overloading
situation.

Tuleap: #104
Change-Id: Ic567fbee927e7acd22c71075c3546dab52722819
2015-12-10 18:09:40 -04:00
fa77bda458 contrib: bump opendht on latest changes
Tuleap: #104
Change-Id: I03bdfaeae256e47c49adf5800c85ee6ad7c9e7f9
2015-12-09 15:20:41 -05:00
135cfe7dd5 call: emit signal on removal
The "OVER" event is the point in time from which the daemon won't know
about this call ID anymore.
There is always exactly one OVER event when a call is removed.

Tuleap: #102
Change-Id: Id11b9047b27c33258b731f7843fd7241e4c7c07f
2015-12-09 15:01:02 -04:00
70c84b352b video: verify AVDevice type
This commit adds type verification when an AVCaptureDevice is added.
The notification that a new device got connected, is received for both
video and audio devices.

Change-Id: Id48fb4182589234df164ab6337fb5d4863987a15
Tuleap: #149
2015-12-08 15:52:24 -04:00
e0676bf07c video osx: bump libav patch
New developments in libav allow size selection.
This patch adds this ability in our OSX video device implementation.

Tuleap: #166
Change-Id: Ibe9c38e85b5ce2a0bee4b0528390aae716a1aee7
2015-12-08 11:29:23 -05:00
2756585347 im: normalize call/account instant-messaging API's
WARNING: API changes

This patch makes code common for IM send/receive message API's
between call and account classes.

Multi-part messages is supported for :
- SIPAccount
- SIPCall (any SIP like account)

RingAccount supports only Single-part messages yet.

Change-Id: Ic65425cd95f02f89f03dd6ea2a9c4a10bb233859
Tuleap: #157
2015-12-04 11:04:56 -04:00
87f3f337e0 media/video: reuse default quality parameters
When several calls were performed, quality and bitrates of previous
call were used. When stopping VideoRtpSession, we make sure to reset default
values.

Change-Id: Ibe7b58f33979fae734dbbe3f7c31bd4d57c5a13f
Tuleap: #156
2015-12-03 18:43:01 -04:00
a6fc06b6d5 media/video: disable key frame SIP-INFO request
If a keyframe request is never answered, a timeout is reached
and the call failed.
As keyframe requests are transmit over UDP, they are too easily dropped,
on connection like wifi.

This feature is not mandatory for communication and until we found
a better solution this patch disables the request.

Change-Id: I3d5e8d0e3d0119db52fbfc0f37ce2949224b1806
Tuleap: #167
2015-12-03 18:16:26 -04:00
517c25f33f dbus: Add video source in dbus getDetails call
Ring daemon clients need to know what data is streamed to a client
during a call. This patch creates an VIDEO_SOURCE field within getDetails
that contains a string with thei video source used by the daemon.
In case there is no video the string will be empty

Change-Id: I4e5c8a1dcdbd375c327bd20c6674e9b2c2d62bf5
Tuleap: #99
2015-11-25 16:27:22 -04:00
bb145c591e media/video: remove workaround for h263p
This commit adds a patch from libav resolving issues with h263p encoder.
see https://bugzilla.libav.org/show_bug.cgi?id=912

Change-Id: I95f5e81063af01a57be47b70fadaf54c3393eb52
Tuleap: #138
2015-11-25 09:07:20 -05:00
f4ea286041 sip: fix corruption in transfer
Corruption was seen on transfert. Hangup of a call was done while
the call was destroyed. Use of shared_ptr resolved it.

Change-Id: I11b2b91e07bc1da77f05302fa08926193923af60
Tuleap: #122
2015-11-24 16:13:52 -05:00
d3c86f61c2 sip: fix username truncated on win32
- TCHAR conversion to std::string wasn't working

Change-Id: I8fa9a634f50a58515a0ba49be99dd166a0a537b3
Tuleap: #133
2015-11-24 15:28:09 -05:00
fa04627a04 sip: fix attended transfers
Attended transfers led to an assertion in pjsip. According to high-level
librairie pjsua, unused in Ring, and specially function pjsua_call_on_incoming,
it looks like we should not call pjsip_inv_answer when replace header is
present. This function actually leads to the pjsip assertion.
pjsip_inv_initial_answer should be rather used.

NOTIFY is still missing.

Change-Id: I2e4a09533bd33dd32b2cc61a7d9737dc1fe79738
Tuleap: #122
2015-11-24 13:43:11 -04:00
ffdbc957a7 audio: reduce default ring buffer size
Current size was defined before the LibAV jitter buffer
was introduced. The buffer size defined was already very
conservative: 32000 samples means 2/3 of a second (an eternity).

* reduce buffer size to 16000 samples (333 ms at 48kHz)
* reduces audio latency of up to 333 ms
* should slightly improve echo cancelling

Tuleap: #120
Change-Id: I0c3d4f83d18f4fdede7e89cd9a36327af716c1ca
2015-11-23 16:07:44 -05:00
d3a1c36db2 contrib: bump pcre
8.36 is not hosted anymore. Bump to latest 8.38.

Tuleap: #124
Change-Id: Ib40e60979d2ac1909cf8810a45a7dc9a0bf013cc
2015-11-23 16:07:44 -05:00
f43da18f46 media/video: bad writting access in video scaling
Padding needs sometimes to be done for scaling purpose when a change of video
source is performed. Padding calcul is wrong and leads to memory bad writting
access.

Tuleap: #87
Change-Id: Ied282941077c1e268529457d39cdcc403a741aaf
2015-11-19 15:32:04 -04:00
8c56fd7952 daemon: enable H263 encoder
H263 version 1 allows a limited range of resolutions outdated compared
to recent camera capabilities. It was thus nearly impossible
to use it on Ring.

This patchset forces encoding of H263+ which supports all resolutions
multiple of 4 from 4x4 to 2048x1152.
On Libav we see video artifacts if multithread is enabled
on encoder side. A workaround deals with forcing h263 encoder
to monothread.

See https://bugzilla.libav.org/show_bug.cgi?id=912

Tuleap: #138
Change-Id: I7121e182fa13139d28db010e2ed0de573c616de7
2015-11-18 12:45:11 -04:00
2074c7fbda Ice: fix implementation
IceTransport::isXXX() API are not thread-safe, not clear in which
state the transport is and not easy to manipulate (order of state).

This patch tries to solve that by:
- Procted API by a mutex
- Remove uneeded isComplete() API
- Ensure that each API are ordered (one at true implies true
  on all lower states: INITIALIZED -> STARTED -> RUNNING).
  All return false on Fail state.
- Change usage accordingly

Tuleap: #107
Change-Id: I17211e54322d70bbfe18c28f06cf9967b9ef93d2
2015-11-18 12:08:13 -04:00
ef44e3dccf contrib tools: bump ant
Ant 1.9.5 is not hosted anymore, which prevents Android to compile.
Bump to 1.9.6.

Tuleap: #62
Change-Id: Ib20a0b6ea40d229ddfd09e7850b4606d9f28f508
2015-11-16 17:15:38 -04:00
82fb0dae37 media/video: use crf rather than bitrate
Dynamic quality change was done by increase/decreasing encoder bitrate.
It led to video artefact issues, specialy at low bitrates.
In addition, it does not make sence to use same bitrate with different
resolutions and fps. With high resolutions and fps, maximal bitrate
need to be higher.

It is possible for H264 and VP8 to set video quality using CRF.
This parameter solves video artefact issues and choose a different
output bitrate depending on input resolution and fps.

Tuleap: #80
Change-Id: I07d37175dfc335b5fc70cf54798f82eafe921ea9
2015-11-13 12:14:42 -04:00
1474bf0a40 call: fix build warnings
This patch removes annoying build warnings on non casted unions.

Tuleap: #13
Change-Id: I9ec70dc559dea5973539b655b4d7a24ab22351ef
2015-11-12 15:23:37 -04:00
b495c406e8 contrib/pjsip: add missing patch for 2.4.5
Make sure to not include OpenSSL when GnuTLS is used.

Tuleap: #77
Change-Id: I6f3ee4b80471d2562c6c5ef1ebb17cdc0002760a
2015-11-12 10:05:42 -05:00
7de79eb719 encoder: don't try to provide framerate to ffmpeg on win32
- dshow provide min/max value that don't always work. No pattern
have been observed as to why...
- ffmpeg chooses the highest value it can when we don't provide it.

Change-Id: I8d8b0993ded6d474f3ad9c741df7fd14fb61021b
Tuleap: #132
2015-11-12 10:44:48 -04:00
de1d070abe contrib: bump pjsip to 2.4.5
See http://trac.pjsip.org/repos/milestone/release-2.4.5 and similar for
detailed changelog.

* Bump from 2.4 to 2.4.5
* Mostly bug fixes
* Should fix #77
* Removes the need for patch "mainstream_fix_1844"

Tuleap: #77
Change-Id: Ib457203082fd7326d05bc8910a2aa2567974a4b8
2015-11-11 14:32:42 -05:00
002320e0e1 call: remove dead code
Tuleap: #13
Change-Id: Ic948160e96a0f5e232871863407fa920292318ac
2015-11-11 15:23:29 -04:00
7f56822b7b build: permit user to overload revision number
Let user choose the RING_REVISION and RING_DIRTY_REPO values.
This also permit packaging to build from non-git sources tree
with a fancy and valid revision string.

Just set previous environment variable before to run
the make command.

Change-Id: I24d71f985decc2187f09ab21eb72e588ede7fb7a
Tuleap: #71
2015-11-10 18:16:22 -05:00
d1928b0e59 media: fix memory leak in audio decoder
AVPacket are not freed after use. The solution deals with
allocating AVPacket on the stack and ensuring to free it
calling av_packet_unref.
This fix has also widly deployed on Video for having a unique
method other the code.

Change-Id: I049b29effb4e6748ee2dd12b4c52536c99fef498
Tuleap: #91
2015-11-06 18:37:48 -04:00
4c93660e66 gnutls: downgrade gettext requirements
* use previous gettext version 0.18.3
* should fix build on Ubuntu Trusty 14.04
* keep gettext 0.19 on windows for mingw compilation

Tuleap: #62
Change-Id: I39f3d5b4938f7b2926f730a3b7822c19e05d9d1e
2015-11-04 16:27:16 -05:00
92982d4467 contrib: bump gnutls
* bump from 3.4.2 to 3.4.6
* mostly fixes (including security)

Tuleap: #62
Change-Id: Ibe0e44e91f5cc7d9bb102aa9af9fed03c65f5754
2015-11-03 13:52:24 -04:00
4302c6bd7b sips: fix memory leak
This patch fixes a memory leak in SipsIceTransport class.
gnutls_priority_init() allocates memory, no gnutls_priority_deinit()
is called to free it.
This last has been added in SipsIceTransport destructor.
This patch also fixes code rules error on priority_cache_ naming
(this is the variable initialized by gnutls_priority_init).

Change-Id: I32a8a7347d4af96886a0def2d9a6d77fe0fad7c7
Tuleap: #92
2015-11-03 11:55:36 -04:00
8f9db001d7 security: allow to define global certificates
Issue: #77219
Change-Id: I5bf71251212343e71f5e04081615a5890f7aa345
2015-11-03 01:41:39 -05:00
88a8f46773 contrib tools: bump versions
bump:
* cmake to 3.2.2
* libtool to 2.4.6
* automake to 1.15
* m4 to 1.4.17
* tar to 1.28
* xz to 5.2.2
* gettext to 0.19.6

Tuleap: #62
Change-Id: I7fa1f021ab1c8425d05416dc652aad060b2c2536
2015-11-02 11:36:08 -05:00
6d7d073779 accounts: add API-controlable "active" property
* add "active" runtime property to accounts
* accounts can only be used when active
* "active" state is not persistans
* add "active" state to volatile properties map
* add setAccountActive API
* "active" is the default state (backward compatibility)

The active state can be used to manage runtime states
defining if an account should be used (e.g. on Wifi/3G etc.)

Tuleap: #9
Tuleap: #42
Change-Id: Ie3b3aaadea6e43237fc22f6a1f96de8cbfe2bd95
2015-10-28 13:24:30 -04:00
ff570fc9dc ringaccount: fix warnings
missing override keyword to tag overridden virtual methods.

Tuleap: #69
Change-Id: I27d10cc49835e0e42858912cdfa11ef3e8761c04
2015-10-27 16:30:05 -04:00
a63d97262b ringdht: bump opendht, msgpack, remember fetched messages
* bump MsgPack to stable release 1.2.0
* bump OpenDHT to latest master supporting MsgPack 1.2.0
* adapt RingAccount to latest OpenDHT API

Issue: #81946
Change-Id: I331626120ca5e1c4c0d6f9a2dcf69e8d2934a636
2015-10-24 02:04:54 -04:00
a646cde336 ring: parse ring:// uri for calls and text messages
Tuleap: #3
Change-Id: If43ac48729f4f55ba7fa02faa548b69d7f41dc78
2015-10-23 12:28:19 -04:00
65ab34ef1d manager: fix typo and minor constness
Tuleap: #13
Change-Id: I8bc2d5e5b73bfb9461aeaea13ec1923567c64e7d
2015-10-22 14:44:14 -04:00
761d38e61f rtp: fix RtpSession::restartSender()
Calling this API causes a race condition with RtpSession::start().
The former needs the latter to be run first, this was not enforced,
causing a crash by nullptr access on socketPair_ member.
This patch checks for a non-nullptr socketPair_ to procceed the restart.

Issue: #81987
Change-Id: I20886fe70398f018621aade1c7bac3ff15ef9055
2015-10-20 10:21:02 -04:00
fe932995e1 manager: fix nullptr access in Manager::sendCallTextMessage
Call::getCallId() method is accessed in a nullptr pointer context.
This patch fix it by using the user given callId.

Issue: #82045
Change-Id: I8700aeaa173706909cf303be6d1efff5a4d1fc44
2015-10-20 09:55:03 -04:00
82edcbbfd0 video: remove blink fx during conference
During a conference, video display blink on a full black image
at each video restart (due to adaptative bitrate algorithm).
This patch fixes this effect due to an unvoluntary mixer's sink
start/stop.

Issue: #82044
Change-Id: I181051de7230189d0a951f65f02b5673f202ffb5
2015-10-20 09:29:03 -04:00
7f7bc0e7fb video: change pixfmt used by VideoMixer
YUV420P was allocating one large buffer on Linux and 3 on OSX.
This was causing read overflows. We use YUYV422 which is packed (always one buf)

Issue: #81116
Change-Id: I76456f72c6f155d181aa533aa62cb70b92f6eff1
2015-10-19 16:25:02 -04:00
b0a4abc8d7 video_scaler: fix VideoScaler::scale_and_pad
This method doesn't shift correctly in case of YUYV422 output format.
This patch simplify the code and force the x-shift to be correct.

Issue: #81116
Change-Id: I049d61f51a944476f5a1c3743ecb905308becc83
2015-10-19 16:24:58 -04:00
485da039f1 video: fix VideoFrame::yuv422_clear_to_black()
This method wasn't able to treat some non-planar YUV pixel formats,
like YUYV422, giving a green background.
This patchset fixes that by giving a true black background when format
is non-planar YUV.

Note: this method continue to not working for non-YUV format,
as before, but it's not checked.

Issue: #81116
Change-Id: I55ec947d1474fc55dee861510623b8e91ef7f467
2015-10-19 16:23:11 -04:00
58863eca8b video mixer: fix bad frame re-use
Some of internal stats of a frame could be re-used by ffmpeg,
but the frame doesn't have been reset for that.
This endings into potential multiple crashes.

This patch forces frame reset before re-use.

Issue: #81689
Change-Id: I9fa1c7e0d7a19d4abc8e44cb8978fa9379d51abf
2015-10-19 12:58:00 -04:00
2493ad1cb5 video: reuse scaler
Video scaler now follows sink lifecycle

Issue: #81116
Change-Id: Ibb053991b265131e1f63e1b2a169821e1d0f3bae
2015-10-19 10:18:37 -04:00
ba49e66dc7 ringdht: report username with ring: prefix
Prefixing ring IDs allows to recognize them easily
and to link them to Ring from external tools.

Tuleap: #14
Change-Id: I4ef64fbd2973dec5a8c1151da3ab3370d5330370
2015-10-16 23:48:12 -04:00
7dfb47df99 conference: attach mixer sink if source restarted
If video_rtp_session is restarted due to bitrate changement
we need to setup again conferencepipeline. Otherwise videomixer sink
would be never attached and video never send.

Issue: #81547
Change-Id: I6de180afab5a7dd320fe3b31a1d61735106d76d1
2015-10-15 09:39:51 -04:00