Commit graph

41 commits

Author SHA1 Message Date
Sebastian Jansson
13e5903626 Using unit classes in BitrateAllocationUpdate struct.
This prepares for moving BitrateAllocationUpdate to API.

Bug: webrtc:9718
Change-Id: Ib2bcedb6b68fde33b6a2466f40829e86438aa973
Reviewed-on: https://webrtc-review.googlesource.com/c/111507
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25737}
2018-11-21 19:56:15 +00:00
Fredrik Solenberg
c69a56ef04 Remove more unneeded things from ChannelSend
- SetNACKStatus() - only affects NetEq and RTP receiver
- GetRtpTimestampRateHz() - never used.
- ResendPackets() - never used.

Bug: webrtc:9801
Change-Id: I280b620723eb6917624f30f503eb8b8c88144e6d
Reviewed-on: https://webrtc-review.googlesource.com/c/111460
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25721}
2018-11-21 09:04:07 +00:00
Niels Möller
dced9f6d2a Delete class ChannelSendProxy
Replaced by interface ChannelSendInterface, implemented by ChannelSend
and mock class.

Thread checkers are moved to ChannelSend, which is also moved into
the anonymous namespace and exposed only via a function CreateChannelSend.

Bug: webrtc:9801
Change-Id: I73b2e2bfb67c1a5077709f2379533bf315babad9
Reviewed-on: https://webrtc-review.googlesource.com/c/111240
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25684}
2018-11-19 10:17:13 +00:00
Fredrik Solenberg
645a3afcea Remove unused/unnecessary things from ChannelSend.
Bug: none
Change-Id: I48e105d39597c3a84402599af7289f2ea9adc0c6
Reviewed-on: https://webrtc-review.googlesource.com/c/111183
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25671}
2018-11-16 12:15:23 +00:00
Jiawei Ou
55718120e6 Adding rtcp report interval into RTCConfiguration.
This is a follow up of https://webrtc-review.googlesource.com/c/src/+/43201.

Issue 43201 didn't do the job properly.
1. The audio rtcp report interval is not properly hooked up.
2. We don't need to propagate audio rtcp interval into video send stream or vice versa.
3. We don't need to propagate rtcp report interval to any receiving streams.

Bug: webrtc:8789
Change-Id: I1f637d6e5173608564ef0702d7eda6fc93b3200f
Reviewed-on: https://webrtc-review.googlesource.com/c/110105
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25610}
2018-11-12 20:00:00 +00:00
Johannes Kron
9190b82660 Propagate SDP negotiation of extmap-allow-mixed to RtpHeaderExtensionMap
Bug: webrtc:7990
Change-Id: I662595f90b9d0be39f7e14752e13b2bb7a1746ee
Reviewed-on: https://webrtc-review.googlesource.com/c/106020
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25421}
2018-10-30 08:06:49 +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
Sebastian Jansson
359d60a594 Adds target rate to audio send stream stats.
Bug: webrtc:9510
Change-Id: I8bd74fc115e3006f477b289edc58fa1f9d7b6bc6
Reviewed-on: https://webrtc-review.googlesource.com/c/107652
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25370}
2018-10-25 15:12:36 +00:00
Sebastian Jansson
c0e4d45ce0 Adds BitrateAllocation struct to OnBitrateUpdated.
This prepares for adding parameters to OnBitrateUpdated. By using a
struct, additional fields doesn't require a change in the signature and
only the obeservers that use the new fields will be affected by the
change.

Bug: webrtc:9718
Change-Id: I7dd6c9577afd77af06da5f56aea312356f80f9c0
Reviewed-on: https://webrtc-review.googlesource.com/c/107727
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25366}
2018-10-25 13:51:11 +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
Niels Möller
b222f495a9 Split ChannelProxy into send and receive classes.
Bug: webrtc:9801
Change-Id: I21573ccc34f6da515d11b58fa6008807395d5dd1
Reviewed-on: https://webrtc-review.googlesource.com/c/103120
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24965}
2018-10-04 06:40:27 +00:00
Sebastian Jansson
35fa280229 Adds allocated rate without feedback to new congestion controller.
When bitrate is allocated to streams that does not have packet feedback,
the allocated bitrate should be included in the estimate. This was
previously only implemented for the old congestion controller and not
for the new task queue based version.

To make the behavior more robust, the responsibility for tracking this
is moved to BitrateAllocator where it's handled consistently for
multiple streams without feedback.

Bug: webrtc:9586, webrtc:8243
Change-Id: I8af7fec23e1bdc08cc61cf1b4ff10461c3711fb0
Reviewed-on: https://webrtc-review.googlesource.com/102681
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24905}
2018-10-01 07:48:02 +00:00
Sebastian Jansson
9701e0ce2f Makes treatment of received reports of packets lost signed.
Bug: webrtc:9598
Change-Id: I0f6ffe348585b8ec69753089652812da516d33d8
Reviewed-on: https://webrtc-review.googlesource.com/93021
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24291}
2018-08-15 14:27:23 +00:00
Niels Möller
fa4e185684 Delete class voe::RtcEventLogProxy
Bug: None
Change-Id: Ic0c380e2f7f844a0e06c8c2a3d8bcb42ecee1eba
Reviewed-on: https://webrtc-review.googlesource.com/94040
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24287}
2018-08-15 09:59:15 +00:00
Niels Möller
848d6d300e Change Channel::GetRtpRtcp to return only RtpRtcp, not RtpReceiver.
For use in AudiReceiveStream, introduce a new method GetSyncInfo. This
change is analogous to https://webrtc-review.googlesource.com/91123,
doing the same for RtpVideoStreamReceiver. It's a preparation for
bypassing the RtpReceiver class.

Bug: webrtc:7135
Change-Id: I87c1c6f0a1f28b0baebe07c4181f6f0427afa314
Reviewed-on: https://webrtc-review.googlesource.com/93022
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24228}
2018-08-08 11:45:21 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
b9b146c9fe Replace rtc::Optional with absl::optional in audio, call and video
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameters 'audio call video':
#!/bin/bash
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I02c5db956846a88a268a300ba086703a02d62e36
Reviewed-on: https://webrtc-review.googlesource.com/83722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23628}
2018-06-15 12:09:49 +00:00
Sebastian Jansson
5f83cf0c6d Replacing rtc::TimeDelta with webrtc::TimeDelta.
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.

Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
2018-05-08 13:22:53 +00:00
Tommi
5f22365dd7 Remove unnecessary proxy+lock code around RtcpRttStats pointer
Change-Id: I9c7fdc695be1e424488fa46962d459c66cf4d1e7
Bug: webrtc:9068
Reviewed-on: https://webrtc-review.googlesource.com/64721
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22603}
2018-03-26 12:49:00 +00:00
Sebastian Jansson
fe617a3af1 Adding has_packet_feedback to LimitObserver callback.
This CL adds a boolean indicating availability of per packet feedback
to the OnAllocationLimitsChanged callback on the
BitrateAllocator::LimitObserver interface.

This is part of a series of CLs tracking the transport feedback status
of the streams known to BitrateAllocator and reporting the status to
the congestion controller.

Bug: webrtc:8415
Change-Id: I5bd6e5796733da312556f2f681ff06d49ea2becc
Reviewed-on: https://webrtc-review.googlesource.com/63201
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22533}
2018-03-21 13:13:08 +00:00
Karl Wiberg
d6fbf2a4b1 Tests: Pass codec ID argument to audio codecs
Bug: webrtc:8941
Change-Id: Ia6d51dcbf7d69b38f3615e01d3f7031b8f5c31d0
Reviewed-on: https://webrtc-review.googlesource.com/58092
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22383}
2018-03-12 13:25:29 +00:00
philipel
f69e768032 Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 1.
Added total_bitrate_bps to LimitObserver::OnAllocationLimitsChanged.

Bug: webrtc:8955
Change-Id: Ied9b2d24ab97cff21518ce70d5d35dfd8230ed08
Reviewed-on: https://webrtc-review.googlesource.com/58801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22233}
2018-02-28 15:38:15 +00:00
Sebastian Jansson
ef9daee934 Using mock transport controller in audio unit tests.
Using a mock of rtp transport controller send in audio send stream unit
tests. This reduces the dependencies and makes the tests more focused
on testing the functionality of audio send stream itself.

Bug: webrtc:8415
Change-Id: Ia8d9cf47d93decc74b10ca75a6771f39df658dc2
Reviewed-on: https://webrtc-review.googlesource.com/56600
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22161}
2018-02-22 17:32:25 +00:00
Sebastian Jansson
41f16bec9f Silencing warnings in audio send stream unit tests.
The unit tests for AudioSendStream was generating a lot of warnings
about "Uninteresting mock function call" on mocked objects. This is due
to the default gmock implementation being NaggyMock and there was no
NiceMock override.

With this change the mocks are replaced with NiceMock implementations
which do not output warnings for unexpected calls. This makes the error
output from the test runner much easier to visually parse to find the
actual errors in failing tests.

Bug: None
Change-Id: Ic40db78159536ddeaa72a468fc2cb3ec17386d44
Reviewed-on: https://webrtc-review.googlesource.com/56220
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22152}
2018-02-22 14:26:59 +00:00
Sebastian Jansson
97f61ea684 Moved bitrate configuration to rtp controller
Since rtp transport controller send owns the congestion controller it
also should own the bitrate configuration logic, this way it can
initialize the send side congestion controller with the bitrate
configuration.

Bug: webrtc:8415
Change-Id: Ifaa16139ca477cb1c80bf4aa24f17652af997553
Reviewed-on: https://webrtc-review.googlesource.com/54303
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22127}
2018-02-21 13:55:16 +00:00
Sebastian Jansson
1896cece01 Removed dependencies from audio send stream unit test
The audio send stream unit tests did not use the mocks injected to the
fake rtp transport controller send. This CL prepares for removing the
fake controller which makes it harder to refactor the rtp transport
controller interface.

Bug: webrt:8415
Change-Id: I73f7d105e66f9beb80aeaa92f3490cd61c80c5b8
Reviewed-on: https://webrtc-review.googlesource.com/54302
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22102}
2018-02-20 15:05:57 +00:00
Sam Zackrisson
06953bac6d Move AudioSendStream lifetime reporting into destructor
This avoids a data race in which the lifetime TimeInterval is accessed
by the owning Call objects concurrently with SendRtp calls on the
underlying Channel object.

Bug: webrtc:8794
Change-Id: If53d5680095c0177656b659162457287cb8e45dd
Reviewed-on: https://webrtc-review.googlesource.com/46525
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21853}
2018-02-01 16:49:39 +00:00
Fredrik Solenberg
a8b7c7f4c6 Move remaining traces of VoiceEngine
- Move files from voice_engine/ to audio/.
- Rename voice_engine/utility.* to remix_resample.* since there are no other
  utilities in those files.
- Move test/mock_voe_channel_proxy.h to audio/.
- Removed voe_channel_id from Audio[Receive|Send]Stream::Config.
- Remove VoiceEngine* from AudioState::Config.
- Fix a few cpplint complaints which showed when moving files.

NOPRESUBMIT=true

Bug: webrtc:4690
Change-Id: Id266c822d956625c358fa5e193e6f4837164aef8
Reviewed-on: https://webrtc-review.googlesource.com/39268
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21657}
2018-01-17 13:27:47 +00:00
Fredrik Solenberg
8f5787a919 Move ownership of voe::Channel into Audio[Receive|Send]Stream.
* VoEBase contains only stub methods (until downstream code is
  updated).

* voe::Channel and ChannelProxy classes remain, but are now created
  internally to the streams. As a result,
  internal::Audio[Receive|Send]Stream can have a ChannelProxy injected
  for testing.

* Stream classes share Call::module_process_thread_ for their RtpRtcp
  modules, rather than using a separate thread shared only among audio
  streams.

* voe::Channel instances use Call::worker_queue_ for encoding packets,
  rather than having a separate queue for audio (send) streams.

Bug: webrtc:4690
Change-Id: I8059ef224ad13aa0a6ded2cafc52599c7f64d68d
Reviewed-on: https://webrtc-review.googlesource.com/34640
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21578}
2018-01-11 12:58:31 +00:00
Oskar Sundbom
f85e31b33c Don't (re-)configure BitrateObserver unless already sending
Bug: b/70793338
Change-Id: I262474386ef424818ad63d9ad9a0fe91266686c7
Reviewed-on: https://webrtc-review.googlesource.com/35340
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21390}
2017-12-20 16:36:46 +00:00
Fredrik Solenberg
2a8779763a Remove voe::TransmitMixer
TransmitMixer's functionality is moved into the AudioTransportProxy
owned by AudioState. This removes the need for an AudioTransport
implementation in VoEBaseImpl, which means that the proxy is no longer
a proxy, hence AudioTransportProxy is renamed to AudioTransportImpl.

In the short term, AudioState needs to know which AudioDeviceModule is
used, so it is added in AudioState::Config. AudioTransportImpl needs
to know which AudioSendStream:s are currently enabled to send, so
AudioState maintains a map of them, which is reduced into a simple
vector for AudioTransportImpl.

To encode and transmit audio,
AudioSendStream::OnAudioData(std::unique_ptr<AudioFrame> audio_frame)
is introduced, which is used in both the Chromium and standalone use
cases. This removes the need for two different instances of
voe::Channel::ProcessAndEncodeAudio(), so there is now only one,
taking an AudioFrame as argument. Callers need to allocate their own
AudioFrame:s, which is wasteful but not a regression since this was
already happening in the voe::Channel functions.

Most of the logic changed resides in
AudioTransportImpl::RecordedDataIsAvailable(), where two strange
things were found:

  1. The clock drift parameter was ineffective since
     apm->echo_cancellation()->enable_drift_compensation(false) is
     called during initialization.

  2. The output parameter 'new_mic_volume' was never set - instead it
     was returned as a result, causing the ADM to never update the
     analog mic gain
     (https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/voe_base_impl.cc?q=voe_base_impl.cc&dr&l=100).

Besides this, tests are updated, and some dead code is removed which
was found in the process.

Bug: webrtc:4690, webrtc:8591
Change-Id: I789d5296bf5efb7299a5ee05a4f3ce6abf9124b2
Reviewed-on: https://webrtc-review.googlesource.com/26681
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21301}
2017-12-15 16:48:57 +00:00
Ivo Creusen
56d460902e Use the new AudioProcessing statistics everywhere.
The new interface uses optionals instead of default values, and only values that are actually used are included. To make it easy to add/remove stats in the future, the struct itself is copied around on all layers, instead of copying the values one by one. This CL also fixes a bug which caused several APM statistics to get stuck at a fixed level when there are no more receive streams (after some period where there were receive streams). Since APM doesn't know this happens, an argument was added to the GetStats call to pass this information down to APM.

Bug: webrtc:8563, b/67926135
Change-Id: I96cc008353355bb520c4523f5c5379860f73ee24
Reviewed-on: https://webrtc-review.googlesource.com/25621
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20877}
2017-11-24 18:17:39 +00:00
Fredrik Solenberg
d319534143 Move ADM initialization into WebRtcVoiceEngine
Bug: webrtc:4690
Change-Id: I3b8950fdb13835964c5bf41162731eff5048bf1a
Reviewed-on: https://webrtc-review.googlesource.com/23820
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20823}
2017-11-21 20:48:07 +00:00
Oskar Sundbom
2707fb2782 Optional: Use nullopt and implicit construction in /audio
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=solenberg@webrtc.org

Bug: None
Change-Id: I03562600978bdedb9dc93a34aeb0561c66f54aae
Reviewed-on: https://webrtc-review.googlesource.com/23617
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20731}
2017-11-17 15:56:17 +00:00
solenberg
1c239d476e Remove voe::Statistics.
BUG=webrtc:4690

Review-Url: https://codereview.webrtc.org/3020473002
Cr-Commit-Position: refs/heads/master@{#20042}
2017-09-29 13:00:28 +00:00
solenberg
fc3a2e3393 Remove the VoiceEngineObserver callback interface.
BUG=webrtc:4690
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/3019513002
Cr-Commit-Position: refs/heads/master@{#19976}
2017-09-26 16:35:01 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/audio/audio_send_stream_unittest.cc (Browse further)