Commit Graph

1474 Commits

Author SHA1 Message Date
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
3e113438b1 Fix circular dependencies in webrtc_common.
One reason for the circular deps is that common_types.h is a
historical dumping ground for various structs and defines that
are believed to be generally useful. I tried moving things out
that did not appear to be used downstream (StreamCounters,
RtpCounters etc) and moved the things that seemed used
(RtpHeader + supporting structs) to a new file api/rtp_headers.h.
This makes their place in the api more clear while moving out
the things that don't belong in the API in the first place.

I had to extract out typedefs.h from webrtc_common to resolve
another circular dependency. I believe checks includes typedefs,
but common depends on checks.

Bug: webrtc:7745
Change-Id: I725d49616b1ec0cdc8b74be7c078f7a4d46f084b
Reviewed-on: https://webrtc-review.googlesource.com/33001
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21295}
2017-12-15 14:33:26 +00:00
00f934abc4 Add gcc-style annotations for printf-like functions.
Bug: None
Change-Id: I37a553d254cb61a882b98b14274c0fdfba039992
Reviewed-on: https://webrtc-review.googlesource.com/33002
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21281}
2017-12-14 13:22:33 +00:00
401d056891 Removing $rtc_libyuv_dir and removing useless dependencies on libyuv.
This CL removes the following GN variables: rtc_build_libyuv,
rtc_libyuv_dir (as requested in webrtc:7906).
It also removes some unneeded dependencies on //third_party/libyuv.

WebRTC targets were using public_deps to depend on //third_party/libyuv
and this created a build graph where targets that were depending on
//third_party/libyuv were not declaring the dependency to GN because
they were somehow getting it from another target that was exposing
//third_party/libyuv header files even if it wasn't directly depending
on it.

Bug: webrtc:8605, webrtc:7906
Change-Id: If71f7988fd80421dc2ad887cf94c2ac66366c3fb
Reviewed-on: https://webrtc-review.googlesource.com/32201
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21275}
2017-12-14 11:18:33 +00:00
a8005cfd8b Fix circular dependencies between optional, array_view, and rtc_base.
This splits things out of rtc_base and makes dependencies explicit.

Bug: webrtc:6828
Change-Id: Id521896c3c43595349021c857bec216e429a0c8d
Reviewed-on: https://webrtc-review.googlesource.com/32780
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21264}
2017-12-14 06:49:11 +00:00
fa266efb27 Fix the crash when GetSources is called with non-existing ssrc.
When GetSources is called with non-existing ssrc, it will log the
error and return an empty RtpSource list instead of hitting the DCHECK.

Bug: chromium:793699
Change-Id: I30bebb657de32f87f9c82920fa0b19403893791f
Reviewed-on: https://webrtc-review.googlesource.com/32860
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21258}
2017-12-13 22:46:01 +00:00
e26456a4ed Removes usage of AGC APIs in the ADM.
Bug: webrtc:8598
Change-Id: I5ebc2e3549eba039797e40d2f8aea48341f3fe46
Reviewed-on: https://webrtc-review.googlesource.com/31520
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21254}
2017-12-13 16:32:21 +00:00
d37709b659 Revert "Fix circular dependencies between optional, array_view, and rtc_base."
This reverts commit a9e0924fa7688c4e4558e179c6608ce1093e15f8.

Reason for revert: Breaks because of RTC_LAST_SYSTEM_ERROR

Original change's description:
> Fix circular dependencies between optional, array_view, and rtc_base.
> 
> This splits things out of rtc_base and makes dependencies explicit.
> 
> Bug: webrtc:6828
> Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
> Reviewed-on: https://webrtc-review.googlesource.com/31940
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21245}

TBR=phoglund@webrtc.org,kwiberg@webrtc.org

Change-Id: I1a5dcf2223f00ae7c46f9f2a12b990ab3a84397d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6828
Reviewed-on: https://webrtc-review.googlesource.com/32760
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21251}
2017-12-13 14:56:33 +00:00
a9e0924fa7 Fix circular dependencies between optional, array_view, and rtc_base.
This splits things out of rtc_base and makes dependencies explicit.

Bug: webrtc:6828
Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
Reviewed-on: https://webrtc-review.googlesource.com/31940
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21245}
2017-12-13 13:44:21 +00:00
6c8e6666ce Fixing package boundary violation.
TBR=solenberg@webrtc.org

Bug: None
Change-Id: I8ea08b97a4251fa9904e90c5c1f3095ea1c90a07
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/32361
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21237}
2017-12-13 11:04:00 +00:00
0a37547033 Add optional stereo codec to SDP negotiation
- Defines stereo codec case, similar to RTX, that adds stereo codec to the SDP
negotiation. The underlying codec's payload type is similarly defined by "apt".
- If this negotiation is successful, codec name is included in sdp line via
"acn".
- Adds codec setting initializers for these specific stereo cases.
- Introduces new Stereo*Factory classes as optional convenience wrappers that
inserts stereo codec to the existing set of supported codecs on demand.

This CL is the step 5 for adding alpha channel support over the wire in webrtc.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: Ie12c56c8fcf7934e216135d73af33adec5248f76
Reviewed-on: https://webrtc-review.googlesource.com/22901
Commit-Queue: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21210}
2017-12-11 16:30:06 +00:00
654320666d Including libyuv headers using fully qualified paths.
Using fully qualified paths to include libyuv headers allows WebRTC to
avoid to rely on the //third_party/libyuv:libyuv_config target to
set the -I compiler flag.

Today some WebRTC targets depend on //third_party/libyuv only to
include //third_party/libyuv:libyuv_config but with fully qualified
paths this should not be needed anymore.

A follow-up CL will remove //third_party/libyuv from some targets that
don't need it because they are not including libyuv headers.

Bug: webrtc:8605
Change-Id: Icec707ca761aaf2ea8088e7f7a05ddde0de2619a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21209}
2017-12-11 15:51:26 +00:00
3a233744eb Reland "Remove the aec_quality_min metric."
This is a reland of 99b1bd1553d442ef7d27755567594ac7e65c53b7
Original change's description:
> Remove the aec_quality_min metric.
> 
> Removing this unused metric.
> 
> Bug: webrtc:8563
> Change-Id: I47446d6aaf5dcc3a8ea57f9248576d68bbe2a304
> Reviewed-on: https://webrtc-review.googlesource.com/30720
> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21158}

Bug: webrtc:8563
Change-Id: I622df96528cd6e54e252b22a315840e12d521c7f
Reviewed-on: https://webrtc-review.googlesource.com/31780
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21201}
2017-12-11 10:36:55 +00:00
9a44f96ea7 Delete rtc_base/window.h.
Bug: webrtc:6424
Change-Id: Iaed83b07dd469a9990f48fe41fcdff5e7493eb31
Reviewed-on: https://webrtc-review.googlesource.com/31480
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21194}
2017-12-11 07:59:35 +00:00
a3fad93d87 Revert "Remove the aec_quality_min metric."
This reverts commit 99b1bd1553d442ef7d27755567594ac7e65c53b7.

Reason for revert: breaks downstream projects.

Original change's description:
> Remove the aec_quality_min metric.
> 
> Removing this unused metric.
> 
> Bug: webrtc:8563
> Change-Id: I47446d6aaf5dcc3a8ea57f9248576d68bbe2a304
> Reviewed-on: https://webrtc-review.googlesource.com/30720
> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21158}

TBR=solenberg@webrtc.org,gustaf@webrtc.org

Change-Id: I90f16915d517123e4bfba39db64424cdcc4ef03f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8563
Reviewed-on: https://webrtc-review.googlesource.com/31360
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21160}
2017-12-08 11:45:50 +00:00
99b1bd1553 Remove the aec_quality_min metric.
Removing this unused metric.

Bug: webrtc:8563
Change-Id: I47446d6aaf5dcc3a8ea57f9248576d68bbe2a304
Reviewed-on: https://webrtc-review.googlesource.com/30720
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21158}
2017-12-08 10:48:49 +00:00
606a5971e3 Remove adjust_agc_delta from WebRtcVoiceEngine
The setting is no longer used anywhere.

Bug: None
Change-Id: Id4143ca0a565472a4f08905c06f5d3f7d5dfb756
Reviewed-on: https://webrtc-review.googlesource.com/31100
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21151}
2017-12-07 23:06:19 +00:00
292a73eeea Deliver packet to Call as rtc::CopyOnWriteBuffer
instead of pair of pointer + size.

it removes hidden memcpy in RtpPacketReceived::Parse:
RtpPacketReceived keeps a reference to a CopyOnWriteBuffer. By
passing it the same CopyOnWriteBuffer that was created by
BaseChannel, one allocation and memcpy is avoided.

Bug: None
Change-Id: I5f89f478b380fc9aece3762d3a04f228d48598f5
Reviewed-on: https://webrtc-review.googlesource.com/23761
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21143}
2017-12-07 17:09:07 +00:00
e51f785043 Stop using public_deps in pc/.
TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: If18e5a4d212392bbd9b4e1f9c2f00ee79a2ab348
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/29864
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21139}
2017-12-07 13:57:57 +00:00
a498ae83ac Stop using public_deps in system_wrappers.
TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: I5e515f0e4dc955a01460d69ba4e21bdfdf152d20
Reviewed-on: https://webrtc-review.googlesource.com/29104
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21112}
2017-12-06 08:56:52 +00:00
b5728d9b0f Stop using public_deps in modules/rtp_rtcp.
TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: I86830df23db3f33a1a26098e639596bd3b86485a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/29780
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21108}
2017-12-06 07:37:52 +00:00
4d3e24a359 Allow building without sctp on mac/ios.
Bug: webrtc:8590
Change-Id: I4388a2292d3d5dcdb5fdcc11a1807e4790261565
Reviewed-on: https://webrtc-review.googlesource.com/27985
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21077}
2017-12-05 11:17:02 +00:00
a0e1a55dc9 Stop using public_deps in the call module.
Bug: webrtc:8603
Change-Id: I048127bc86f213e638e6814ac8a86761cb8a64db
Reviewed-on: https://webrtc-review.googlesource.com/28624
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21072}
2017-12-05 08:29:41 +00:00
0250be51be Stop using public_deps to depend on libyuv.
A lot of WebRTC targets were depending on //third_party/libyuv using
public_deps instead of deps. This causes issues because a the
inclusion of libyuv headers is not declared to the build system and
this creates hidden dependencies that put the modularity of the project
at risk.

Bug: webrtc:8603
Change-Id: Ide0ceb84eb5640ae664dc782f3a722b55c3b601a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28120
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21039}
2017-12-04 14:16:08 +00:00
4e76ebb372 Rename FOURCC -> CRICKET_FOURCC.
This macro collides with a libjingle macro with the same name.

Bug: webrtc:8589
Change-Id: Icdae45c3550d09a591ee02eaf37e11a44d4230d5
Reviewed-on: https://webrtc-review.googlesource.com/27982
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21029}
2017-12-04 10:31:28 +00:00
ad62792c5d Fixing hidden dependencies.
Header files base/videosinkinterface.h and base/videosourceinterface.h
were not part of any target (because they cause 2 dependency cycles).

This CL uncomment them so GN can keep dependencies under control, the
2 dependency cycles will be removed as part of webrtc:6828.

Bug: webrtc:6828
Change-Id: I5c5580facc010ba619e105a9b8a572ac70169a01
Reviewed-on: https://webrtc-review.googlesource.com/27621
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20970}
2017-12-01 09:30:11 +00:00
aba85d1f53 Resolve circular dependency in rtc_media_base.
This one was pretty straightforward fortunately.

Bug: webrtc:6828
Change-Id: Ie7b5e71f1298c409dbca2c74eaa09c0986e41d8f
Reviewed-on: https://webrtc-review.googlesource.com/25821
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20914}
2017-11-28 15:28:58 +00:00
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
55900fd416 Move APM initialization into WebRtcVoiceEngine
TBR=kwiberg@webrtc.org

Bug: webrtc:4690
Change-Id: Icd8590d3f7476c1a841c7e2425d1134d224b1a53
Reviewed-on: https://webrtc-review.googlesource.com/23480
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20855}
2017-11-23 21:20:18 +00:00
523589dbd8 Create common helper method for comparing video formats
Unfortunately, H264 makes it non-trivial to compare video formats for
equality. For every video format besides H264 it's enough to look at the
name, but for H264, we need to dig into the parameters. This logic is
currently in several places, and this CL unifies it to one place.

Bug: webrtc:7925
Change-Id: I83a516b108d6b4d6792fd0bf1d24296916d9f7fa
Reviewed-on: https://webrtc-review.googlesource.com/25120
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20853}
2017-11-23 15:41:38 +00:00
01f2ec35a6 Add a new function to BitrateAllocation: HasBitrate.
This can be used to determine whether the bitrate of a given spatial and temporal layer has been set in the allocation, even if the value it's set to is zero.
GetBitrate still returns 0 if the queried layer does not have the bitrate set.

Bug: webrtc:8479
Change-Id: I1d982e211da9b052fcccdbf588b67da1a4550c60
Reviewed-on: https://webrtc-review.googlesource.com/17440
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Varga <erikvarga@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20852}
2017-11-23 15:00:08 +00:00
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
9deda4828d Move const variables initialization to constants.cc
Bug: None
Change-Id: I73f0d343e242e959879c5396852270c78c17fc87
Reviewed-on: https://webrtc-review.googlesource.com/22420
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20828}
2017-11-22 11:14:37 +00:00
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
09d584457a Fix some uninitialized variables in convert_legacy_video_factory
This is causing compilation failure on Chrome on Windows using MSVC
64bits.

TBR=andersc@webrtc.org

Bug: chromium:787192
Change-Id: If82290a9d7373385de4820b34f2c7dc9225c3d95
Reviewed-on: https://webrtc-review.googlesource.com/24981
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20821}
2017-11-21 19:09:58 +00:00
c61ce0d0cd Fixing some clang-tidy findings.
Bug: None
Change-Id: I949c1ff35284ce79c99e8f76148f63b8bba965a9
Reviewed-on: https://webrtc-review.googlesource.com/24041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20818}
2017-11-21 16:43:07 +00:00
7880758b90 Optional: Use nullopt and implicit construction in /media
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.

TBR=pthatcher@webrtc.org

Bug: None
Change-Id: I6dd8677a65f897877fc848aefa7ab37d844e70ed
Reviewed-on: https://webrtc-review.googlesource.com/23573
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20816}
2017-11-21 14:46:37 +00:00
f2d7beb1d4 Created the DtlsSrtpTransport.
The DtlsSrtpTransport is designed to take DTLS responsibilities from BaseChannel.
DtlsSrtpTransport is responsible for exporting keys from DtlsTransport
and setting up the wrapped SrtpTransport.

The DtlsSrtpTransport is not hooked up to BaseChannel yet in this CL.

Bug: webrtc:7013
Change-Id: I318c00dadf9b1e033ec842de6e1536e9227ab713
Reviewed-on: https://webrtc-review.googlesource.com/6700
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20804}
2017-11-20 23:18:22 +00:00
9b16e2d354 Reland "Move ulpfec, red, and flexfec codec to video engine"
This is a reland of 154ee1fd8547768a49b7d67ce586ef5d3c5d9ebc
Original change's description:
> Move ulpfec, red, and flexfec codec to video engine
>
> These codecs are currently being added in the internal encoder factory.
> This means that the new injectable video codec factories will miss them.
> This CL moves adding them into the video engine so that both factory
> types will get them.
>
> This CL makes a functional change in that RED, ULPFEC, and FlexFec will
> be placed after both the internal and external codecs. Previously,
> it was placed between the internal and external codecs.
>
> Bug: webrtc:8527
> Change-Id: I5aa7a3ca674f621b17cf3aa095a225c753488e09
> Reviewed-on: https://webrtc-review.googlesource.com/22964
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20700}
TBR=brandt@webrtc.org

Bug: webrtc:8527
Change-Id: I79ced9a909fd424f1308d62e449268dcc9289538
Reviewed-on: https://webrtc-review.googlesource.com/24060
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20749}
2017-11-18 11:39:48 +00:00
df4883dbf0 Reland "Update internal encoder factory to new interface"
This is a reland of 2c8c8e26fc58a0f2789b7a5cd2646a8319c14d3e
Original change's description:
> Update internal encoder factory to new interface
>
> TBR=stefan@webrtc.org
>
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=andersc@webrtc.org,brandt@webrtc.org,stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0d269b3edb029e372a36c3b461a577bca2b6d0cb
Reviewed-on: https://webrtc-review.googlesource.com/24000
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20747}
2017-11-18 10:48:28 +00:00
c3ed630560 Add stats googHasEnteredLowResolution.
Indicates if the forced sw fallback has had an effect (or would have had an effect if it had been
enabled).


Bug: webrtc:6634
Change-Id: I574b9001a2fae650fb894a1caa0d0f84257658e3
Reviewed-on: https://webrtc-review.googlesource.com/23300
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20729}
2017-11-17 13:02:07 +00:00
aea84f5519 Revert "Update internal encoder factory to new interface"
This reverts commit 2c8c8e26fc58a0f2789b7a5cd2646a8319c14d3e.

Reason for revert: Broke the internal projects.

Original change's description:
> Update internal encoder factory to new interface
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org,stefan@webrtc.org

Change-Id: I989070277885ee70fe6b38272d0001cff890f3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/23780
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20720}
2017-11-16 18:46:35 +00:00
2c8c8e26fc Update internal encoder factory to new interface
TBR=stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
Reviewed-on: https://webrtc-review.googlesource.com/21162
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20717}
2017-11-16 17:55:24 +00:00
da850ef88b Revert "Move ulpfec, red, and flexfec codec to video engine"
This reverts commit 154ee1fd8547768a49b7d67ce586ef5d3c5d9ebc.

Reason for revert: Breaks AppRTCMobileTest on Android64 (M Nexus5X) at https://build.chromium.org/p/client.webrtc/console

Original change's description:
> Move ulpfec, red, and flexfec codec to video engine
> 
> These codecs are currently being added in the internal encoder factory.
> This means that the new injectable video codec factories will miss them.
> This CL moves adding them into the video engine so that both factory
> types will get them.
> 
> This CL makes a functional change in that RED, ULPFEC, and FlexFec will
> be placed after both the internal and external codecs. Previously,
> it was placed between the internal and external codecs.
> 
> Bug: webrtc:8527
> Change-Id: I5aa7a3ca674f621b17cf3aa095a225c753488e09
> Reviewed-on: https://webrtc-review.googlesource.com/22964
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20700}

TBR=brandtr@webrtc.org,magjed@webrtc.org

Change-Id: I20569ae5aa4e5d794c8f7605ff5d2dd708442ae1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8527
Reviewed-on: https://webrtc-review.googlesource.com/23640
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20707}
2017-11-16 11:59:46 +00:00
c97cf03ede Removes unused sample-rate APIs from the ADM.
The following four methods are removed:

SetRecordingSampleRate(const uint32_t samplesPerSec)
RecordingSampleRate(uint32_t* samplesPerSec) const
SetPlayoutSampleRate(const uint32_t samplesPerSec)
PlayoutSampleRate(uint32_t* samplesPerSec) const

Bug: webrtc:7306
Change-Id: I2c3c2e7bd3fb1264da197699fd5de15ab6c35c1b
Reviewed-on: https://webrtc-review.googlesource.com/22001
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20703}
2017-11-16 08:59:53 +00:00
154ee1fd85 Move ulpfec, red, and flexfec codec to video engine
These codecs are currently being added in the internal encoder factory.
This means that the new injectable video codec factories will miss them.
This CL moves adding them into the video engine so that both factory
types will get them.

This CL makes a functional change in that RED, ULPFEC, and FlexFec will
be placed after both the internal and external codecs. Previously,
it was placed between the internal and external codecs.

Bug: webrtc:8527
Change-Id: I5aa7a3ca674f621b17cf3aa095a225c753488e09
Reviewed-on: https://webrtc-review.googlesource.com/22964
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20700}
2017-11-16 08:49:43 +00:00
7aee3d538c Fix ortc_api circular deps.
This will help keep ortc dependencies clean in the future, since
gn --check forces us to depend on components from which we include
headers.

cryptoparams.h moves into api/, but ortc appears to think it
should be there anyway. We could consider moving it into the ortc/ api,
but it doesn't appear to be specific to ortc.

Bug: webrtc:6828
Change-Id: Iddae438d10b5e84b2fbc52565364319e20f90613
Reviewed-on: https://webrtc-review.googlesource.com/22660
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20686}
2017-11-15 13:31:51 +00:00
5f5918f4ef Merge MediaChannel's OnTransportOverheadChanged and OnNetworkRouteChanged callbacks.
OnTransportOverChanged is merged into OnNetworkRouteChanged in MediaChannel
because the transport overhead will be added to rtc::NetworkRoute structure.

This CL depends on https://webrtc-review.googlesource.com/c/src/+/13520

Bug: None
Change-Id: I6ed6583f6c91db4ce61a89406de39774239f3a04
Reviewed-on: https://webrtc-review.googlesource.com/15200
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20678}
2017-11-14 20:42:36 +00:00
ee92d626bd Update VideoEncoderSoftwareFallbackWrapper to take VideoEncoder as arg
VideoEncoderSoftwareFallbackWrapper is updated to take a VideoEncoder as
argument instead relying on built-in SW codecs. The purpose is to make
VideoEncoderSoftwareFallbackWrapper more modular and not depend on
built-in SW encoders.

Bug: webrtc:7925
Change-Id: I99896f0751cfb77e01efd29c97d3bd07bdb2c7c0
Reviewed-on: https://webrtc-review.googlesource.com/22320
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20671}
2017-11-14 10:47:46 +00:00
8962b54a43 Removes Set/GetRecordingChannel() from the ADM
These two unused APIs are removed:

SetRecordingChannel(const ChannelType channel)
RecordingChannel(ChannelType* channel) const

Bug: webrtc:7306
Change-Id: I3289c4b9a5eebb64cc0aa3a1c1144e9c4d6a661d
Reviewed-on: https://webrtc-review.googlesource.com/22681
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20667}
2017-11-14 08:30:16 +00:00