Commit Graph

12981 Commits

Author SHA1 Message Date
a922c9f1da video: increase max quality for h264
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
2017-12-01 08:30:58 -05:00
dffa312b2e media: don't set AVCodecContext->refcounted_frames
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>
2017-11-30 14:54:57 -05:00
5e3a394adc video_input: fallback to software decoding
Handles RestartRequired return code on hardware acceleration failure.

Change-Id: I170928e23ed607c2255e20729a71adc1364bbb6a
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2017-11-29 10:43:28 -05:00
664ea5fa51 video: fix keyframe request
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>
2017-11-29 10:01:18 -05:00
53b5469773 win32: add rsync install in Dockerfile
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>
2017-11-29 10:47:06 -04:00
6340983f07 pj_ice_sess.patch: add description
Change-Id: I5c8320077b2697b7e3ed69ef432a5547e8780a1d
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2017-11-28 18:37:28 -05:00
465d368e18 ice_config.patch: add patch description
Change-Id: Iaf40ae5403ec29944e7f82628e0faeb74ef124b9
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2017-11-28 18:36:04 -05:00
1bf8957c36 tls: remove an uneeded and annoying debug line
Change-Id: I0913251c29f7d4a8c020c46f27216ce4a7753040
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2017-11-28 15:57:27 -04:00
f961c32203 win32: update Fedora version for mingw build
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>
2017-11-28 14:30:12 -05:00
38155c0880 encoder: update FF_MIN_BUFFER_SIZE ffmpeg macro
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>
2017-11-28 13:01:29 -05:00
c2c6ddc002 decoder: limit number of threads
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>
2017-11-28 12:55:29 -04:00
e18892fbd9 contrib: bump opendht to 1.5.0
* fix reported address issue
* fix SockAddr endianness issue
* fix memory leak
* minor performance improvements
* InfoHash: add operator bool()

Change-Id: I47ca3dedc1b96aa8082183eaf23fb9efc092b97a
2017-11-28 06:53:29 -05:00
950ce8f142 video: request keyframe on missed packet
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>
2017-11-27 16:18:37 -04:00
d7f61d316f channel: fix stream push operator
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>
2017-11-24 17:26:29 -04:00
a0e3381bc2 datatransfer: API proposal
This is a DRing API proposal (no implementation) to the data transfer
feature.

Change-Id: I3dd270ae910540b5aef1f3c15dc1b7b2966156c0
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-22 14:40:51 -05:00
36c252247a add Channel class
New class serving as inter-thread object queue.
Mimic Python "queue" module and/or Go "Channel" type.

Basic unit-test provided.

Change-Id: Ibd9bcb265ff6fe45aec1917ad152c2cd01935ddf
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-22 12:03:23 -04:00
c6b859dabc ringdht: make public some methods/attributes
To prepare the file transfer this patch add public access
on the DhtRunner attribute and forEachDevice() API.

Change-Id: I111fa7cd3af56b765781fec4ca3ced20f18269d1
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 22:28:23 -05:00
1954e251d2 manager.cpp: minor fixes
* remove "const" to addTask parameter (move-semantic)
* remove manager.h included twice
* include logger.h after manager.h

Change-Id: If546dacbe52aaad05d13c576695676edc7d06b24
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 22:28:03 -05:00
1263cf086c extract TlsSession private members
Use pimpl idiom to extract TlsSession implementation from definition.

Change-Id: I50f79dde8a89d6ec8db33cae2ef2004fc16d4457
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 15:26:12 -05:00
b7959f5b01 security: extract DhParams from TlsSession
TlsSession will be refactored to handle DTLS and TLS.
This patch cleanup TlsSession files to process further.

Change-Id: I76b6ac73d9fe46ee6a18c6c9d725f6fcadb465d9
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 15:25:55 -05:00
bbfcd57451 TurnTransport: better IO api and fixes
* API additions:
  - peerAddresses
  - readlinefrom
  - writelineto
* API changes:
  - recvfrom: char*/length version
  - sendto: per-peer call, not longer a map
* Add more API documentation
* Max TURN buffer size changed to 4096 bytes
* Better IO buffer management with peers
* Fix auth data (was temporary buffer pushing garbage values to server)
* Turn tests modified for API changes

Change-Id: I0bffe114301e8cb1e2f2e37d7a0eb5ba67f38c61
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 13:48:05 -05:00
785694ccae fix EOF of Sdp::printSession() output
This patch fixes garbage characters at end of printSession output.

Change-Id: Icb5e0b739810ddc889d2699e691d7caaebe1e83c
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 11:11:36 -04:00
813e12052e turn: add connection status to rfc6062 api
Add a connection status to turn_session on_peer_connection()
to notify when a peer disconnect.
Stop the peer connection on client side when the peer close the socket.

TurnTransport class changed to considere this new API and
transmit the information to user and closing peer IO.

Change-Id: I4997af9864829270876b6e6faddfa55da8ba7eb7
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-20 17:15:00 -04:00
b5fba93483 ice: log warn when no public IPv4 present in DHT msg
This is a helper to detect cases where the connection cannot
be established due to absence of public addresses.

Change-Id: Ibfdc221624f5edc9e8e0b9bcebc35e2b5335770f
2017-11-19 14:16:38 -05:00
deffff6d34 IpAddr: isLoopback() and isPrivate()
These methods are bugged with IPv4 address on little endian CPU.
Fix it by taking care of the endianness.

Change-Id: If4f0eb1dafc2c4dc6cde7d94ced7a8fec552cd80
2017-11-14 11:20:35 -04:00
56a78bfbe8 accel: don't crash on fallback
If no accel is found in getFormatCb, accel->codecCtx_ is null, and
segfaults.

Change-Id: Ibe3b246aaa0620f2dd5b91d2864fff65b6e8b794
2017-11-10 02:02:37 -05:00
04ee614fba contrib: check shasums for git snapshots tarballs
These tarballs (probably produces by git archive --format=tar) are
'fairly' stable. This means that git tries to not change the output of
this format, but changes happen occasionally due to bugfixes.

It's still a good idea to freeze the hash because we really want to know
when the contents of such a tarball might have changed.
A lot of other projects depend on these also (i.e. homebrew, buildroot,
etc.)

All hashes were locally computed.

Change-Id: Ib0b3fccab70236bd2eb7bbb236e1306af7cc5f36
2017-11-09 23:03:55 +01:00
3b5ee0249d contrib: use https instead of ftp urls
For gnutls, gcrypt, gpgerror and pcre this uses the canonical download
URL from their respective homepage.
For gmp we continue to use the GNU mirror but switch to https.
The tarball hashes are the same as before.

Not using ftp is also more friendly for people behind corporate
firewalls.

Change-Id: Iaf02a03549803a9374b1e35d8aa8234dd0895508
2017-11-09 22:43:52 +01:00
a116e8d083 use https for more downloads
Let's use https instead of http wherever possible.

For speex/speexdsp this is essential because they where using neither
https nor checksums.
For other pages it avoids unnecessary redirects hen they eventually end
up on a https url anyway.`

Change-Id: Ic07d74480b5a3f5adcf4db17b1bacd51b6aa4439
2017-11-08 14:24:08 -05:00
3a2bdef8b9 encoder: drop print_averror
This function hides the location where the error occurred, the daemon's
logs always pointed to print_averror with a failure of av_write_frame.

Change-Id: I25b703fc44969cc6726f11ed09ed67cc3edb6696
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-11-07 17:11:22 -05:00
9f0869cd9a accel: optimize get_format callback
Remove the second loop in the getFormatCb function. Ring will no longer
check the pixel formats twice in case hardware decoding isn't possible.

Change-Id: Ib03deb152394948979249828376bc4280b859424
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-07 16:14:47 -04:00
13d858bed1 media: remove old libav* macros
Change-Id: I6f7477c227e7b846c3399e7beabb90339c1bef90
2017-10-30 16:37:03 -04:00
66a5d04fdf contrib: bump OpenDHT to 1.4.2
* fix issue with reported addresses
* other minor improvements

Change-Id: Ic3a162fec5566c85d88533f5790977ee00eda379
2017-10-30 13:53:23 -04:00
e73f2551fe ringaccount: use base36 PIN for archive export
* Use base36 [0-9A-Z] instead of base16 (hex)
  for PIN generation.
  This increase the number of combinations from
  2^32 to ~2^41.36, an increase of ~9.36 bits.
  This increase should offset the entropy loss
  due to the optional password.
* Use random_device directly instead of the
  account (seeded) pseudo-generator because the PIN
  should have cryptographic-level randomness.

Change-Id: I00169f5d08f6794329a9e9e22b7173a0a6ef9ef4
2017-10-30 13:30:56 -04:00
c0f33babed eth: use dht random_device
Use random_device from OpenDHT to
profit of the fallback on MinGW.

Change-Id: I00d0221d30c298f4342950a404fc2980e702e10b
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-27 14:29:38 -04:00
09c3f2892d ios-build: use the macros in TargetConditionals.h
- Replaces the TARGET_OS_IOS(seems not used) with macros defined
  in TargetConditionals.h to correctly determine platform target.

- This only replaces the macro in urlhook.cpp preventing the use
  of the system function, which is critical to the iOS build.

Change-Id: I4ba40aefe212bf1279a4813d1cdc2d14ddbd4273
Reviewed-by: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
2017-10-26 10:30:43 -04:00
47f598468d contrib: bump msgpack
Bump msgpack to latest stable version 2.1.5
Relevent fixes for Ring:
* fix unpack visitor to treat float32/64 correctly
* fix alignment problem on some platform (includes arm)

Change-Id: I3c3300c02e91435b0e72ae48e2614efad3e3b936
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2017-10-25 11:04:00 -04:00
d8691f9225 contrib: disable building prce executables
* add patch to prevent the build of pcre executables and tests
* update pcre from 8.40 to 8.41

Change-Id: I0cd008e59c905ab44a02c11808a8cf9233063817
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2017-10-25 08:56:59 -04:00
621198dbbc android: activate hardware decoding on 32 bits
Hardware decoding for 32 bit platforms was fixed by FFmpeg commit
dd8ffb191fd24f5b783b9722f63019120d61c48c, which in included in the
latest bump.

Change-Id: I1ec4a91ae85902d225938921dee8eaf236f7ef9e
2017-10-24 11:38:53 -04:00
9031f167c5 fix: don't run system commands on iOS
Change-Id: I12eabe030e084a274e4774ff1314d129323cf8bd
2017-10-23 16:13:20 -04:00
df0a8fe199 contrib: bump OpenDHT to 1.4.1
* bug fixes

Change-Id: Ibb43672a1a0209f109df579dff1a1f9176ed2186
2017-10-20 17:53:18 +02:00
9a85ecd553 contrib: bump OpenDHT to 1.4.0
* fix transaction ID reuse bug
* fix minor issues
* minor performance improvements

Change-Id: I7bc0bfa6d3b0f48a0cec9ab4554d265e415c8a68
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-19 16:19:12 -04: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
205d5be178 vpx: fix if negation typo
Change-Id: I4cbf78b2a8c6e55458ca5d1867daf4adf1696f27
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-10-17 18:56:19 -04:00
5582234943 contrib: fix vp8 encoding on windows 32 bit
Fixes https://bugs.chromium.org/p/webm/issues/detail?id=1363 with the
solution proposed by comment #5.

This fix was used successfully in GStreamer:
https://bugzilla.gnome.org/show_bug.cgi?id=763663

Change-Id: Id45604fff8a4bc7f76ce256684af7d4bace0db6c
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-10-17 16:27:46 -04:00
df706064f6 RingAccount: prevent insertion of empty file content in archive
Rewrite of RingAccount::updateArchive() to prevents
insertion of empty file contents in case of non-existing files.
This may cause later empty-object creation with misleading usage.
Also exposes filtered and base64 decoded keys to easier code
readability and maintainance.

Change-Id: Id2d504ad73caaaad519be0344c3fb424ada35c20
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-16 17:08:37 -04:00
8b5ef96477 ringacount: don't export device id/name to archive
Account archive is meant to be device-independent,
so don't export device-specific configuration to it.

Change-Id: Iebc3fba81a445f0c28da3ca4f9086a72a436e173
2017-10-10 10:25:00 -04:00
212b50e973 contrib(UWP): (fix)bumps pthreads to avoid deadlock during upnp init
After removing the boost dependency, the Ring UWP was unable to load
accounts with upnp enabled, as a deadlock would occur within the
threadpool initialization rountine of libupnp. I think the windows store
build of pthreads was preventing win32 thread management api symbols
from being defined. Something which loading boost must have been doing.

- Bumps pthreads-win32 from 2.9.1-release to 2.10.0-rc
- Builds a win32 static lib without windows store flags and uwp libs
- Modifies the libupnp and threadutils vs project patching

Change-Id: I3f43a066d86d284c614521fdb016810148590e70
2017-10-08 06:33:58 -04:00
942edca546 doxygen: enable autobrief
Enable an usefull option to make easier documentation writting.

Change-Id: I7d0ea254a913dab09548f17167d432d75de901e4
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-05 11:38:49 -04:00
2cc09ccc12 configure: remove accel build options
The --disable-[accel name] switches of the configure script are a
nightmare to maintain. They break with every bump of FFmpeg, and don't
work right half the time.

Keep only global switch --disable-accel.

Change-Id: I6b645f7102abb3903c27d7dac7d70f7f15a5e728
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-05 10:03:14 -04:00