Commit graph

62 commits

Author SHA1 Message Date
Piotr (Peter) Slatala
179a3923b9 Implement TargetBitrate, NetworkRoute and overhead features of media transport interface.
So far ANA was not available for media transport interface. With recent changes to media transport, we can now account for packet overhead, network route (ip/tcp/udp/turn overheads) and we can also use bandwidth estimate from the media transport.


Bug: webrtc:9719
Change-Id: I98c9a09dd418b763c339ee2ee05592e164cf9199
Reviewed-on: https://webrtc-review.googlesource.com/c/110367
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25677}
2018-11-16 19:31:11 +00:00
Niels Möller
349ade3a4b Delete class ChannelReceiveProxy.
Replaced by an interface ChannelReceiveInterface, implemented
by ChannelReceive and the corresponding mock class.

Moved thread checkers to ChannelReceive. That class is moved to the
anonymous namespace in the .cc file, and exposed only via a function
CreateChannelReceive.

Bug: webrtc:9801
Change-Id: Iecacbb1858885bf86da9484f2422e53323dbe87a
Reviewed-on: https://webrtc-review.googlesource.com/c/110610
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25665}
2018-11-16 09:56:54 +00:00
Niels Möller
80c6762a37 Tweak ChannelReceive interface, to make it closer to ChannelReceiveProxy
This is a preparation for deleting ChannelReceiveProxy, Changes
signature of some methods, and demotes methods OnData and
OnReceivedPayloadData to private.

Bug: webrtc:9801
Change-Id: Ib00a80c6482ed5238f3cc8233860c70f11484df9
Reviewed-on: https://webrtc-review.googlesource.com/c/110606
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25599}
2018-11-12 13:25:32 +00:00
Jonas Oreland
967f7d5497 Add audio level to CSRC class
This patch adds (optional) csrc to ContributingSources.
This will be used if using virtual audio ssrc, since
the audio level is otherwise unaccessible in that configuration.

BUG=webrtc:3333

Change-Id: Ied263b8f0850553cd637fd6bead373ed4252fd1e
Reviewed-on: https://webrtc-review.googlesource.com/c/109281
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25516}
2018-11-06 12:10:05 +00:00
Niels Möller
fd1a2fb8e4 Set RtpRtcp config receive_only in voe::ChannelReceive
Followup to https://webrtc-review.googlesource.com/c/103803

Bug: webrtc:9801
Change-Id: I8467aea241f0470aa116639ddcf5f7ef9a3cc711
Reviewed-on: https://webrtc-review.googlesource.com/c/106860
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25501}
2018-11-05 15:11:00 +00:00
Niels Möller
7d76a31f3d Use MediaTransportInterface, for audio streams.
Bug: webrtc:9719
Change-Id: I6d3db66b781173b207de51d84193fbd34a7f3239
Reviewed-on: https://webrtc-review.googlesource.com/c/104642
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25385}
2018-10-26 11:40:57 +00:00
Benjamin Wright
78410ad413 Fixes use after free error when setting a new FrameEncryptor on ChannelSend.
This change corrects a potential race condition when updating a FrameEncryptor
for the audio send channel. If a FrameEncryptor is set on an active audio
stream it is possible for the current FrameEncryptor attached to the audio channel to be  deallocated due to
the FrameEncryptors reference count reaching zero before the new FrameEncryptor is set on the
channel.

To address this issue the ChannelSend is now holds a scoped_reftptr<FrameEncryptor>
to only allow deallocation when it is actually set on the encoder queue.

ChannelSend is unique in this respect as the Audio Receiver a long with the
Video Sender and Video Receiver streams all recreate themselves when they have
a configuration change. ChannelSend instead reconfigures itself using the
existing channel object.

Added Seth as TBR as this only introduces mocks.

TBR=shampson@webrtc.org

Bug: webrtc:9907
Change-Id: Ibf391dc9cecdbed1874e0252ff5c2cb92a5c64f4
Reviewed-on: https://webrtc-review.googlesource.com/c/107664
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25374}
2018-10-25 17:36:57 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Benjamin Wright
bfb444ce2c Adds new CryptoOption crypto_options.frame.require_frame_encryption.
This change adds a new subcategory to the public native webrtc::CryptoOptions
structure: webrtc::CryptoOptions::Frame.

This new structure has a single off by default property:
crypto_options.frame.require_frame_encryption.

This new flag if set prevents RtpSenders from sending outgoing payloads unless
a frame_encryptor_ is attached and prevents RtpReceivers from receiving
incoming payloads unless a frame_decryptor_ is attached.

This option is important to enforce no unencrypted data can ever leave the
device or be received.

I have also attached bindings for Java and Objective-C.

I have implemented this functionality for E2EE audio but not E2EE video
since the changes are still in review.

Bug: webrtc:9681
Change-Id: Ie184711190e0cdf5ac781f69e9489ceec904736f
Reviewed-on: https://webrtc-review.googlesource.com/c/105540
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25238}
2018-10-17 17:44:19 +00:00
Niels Möller
ae4237e5db Set ChannelReceive transport at construction time.
Followup to cl https://webrtc-review.googlesource.com/c/src/+/103640.
Set the rtcp_send_transport at construction time, delete
RegisterTransport, and the proxying of transport methods.

In addition, delete the unused RtcpRtpStats argument from the
constructor.

Bug: webrtc:9801
Change-Id: I80f25bc08dc2130386053568ddce4ef91654caeb
Reviewed-on: https://webrtc-review.googlesource.com/c/103803
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25010}
2018-10-05 10:56:40 +00:00
Benjamin Wright
84583f6183 Enable End-to-End Encrypted Audio Payloads.
This change integrates the FrameDecryptorInterface and the FrameEncryptorInterface into
the audio media path. If a FrameEncryptorInterface is set on an outgoing audio RTPSender
then each outgoing audio payload will first pass through the provided FrameEncryptor which
will have a chance to modify the payload contents for the purposes of encryption.

If a FrameDecryptorInterface is set on an incoming audio RtpReceiver then each incoming
audio payload will first pass through the provided FrameDecryptor which have a chance to
modify the payload contents for the purpose of decryption.

While AEAD is supported by the FrameDecryptor/FrameEncryptor interfaces this CL does not
use it and so it is left as null.

Bug: webrtc:9681
Change-Id: Ic383a9dce280528739f9d271357c2220e0a0dccf
Reviewed-on: https://webrtc-review.googlesource.com/c/101702
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25001}
2018-10-04 22:08:34 +00:00
Niels Möller
530ead4974 Split voe::Channel into ChannelSend and ChannelReceive
Bug: webrtc:9801
Change-Id: Ia15af1e53c8d384ad6e5fbddcb25311fce4befae
Reviewed-on: https://webrtc-review.googlesource.com/c/103640
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24992}
2018-10-04 13:33:38 +00:00