Reason for revert:
Makes perf and Chromium FYI bots unhappy.
Original issue's description:
> WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType
>
> This removes one more place where we were unable to handle codecs not
> in the built-in set.
>
> BUG=webrtc:5805
>
> Review-Url: https://codereview.webrtc.org/2686043006
> Cr-Commit-Position: refs/heads/master@{#17370}
> Committed: 1724cfbdbaTBR=ossu@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5805
Review-Url: https://codereview.webrtc.org/2772043002
Cr-Commit-Position: refs/heads/master@{#17374}
This removes one more place where we were unable to handle codecs not
in the built-in set.
BUG=webrtc:5805
Review-Url: https://codereview.webrtc.org/2686043006
Cr-Commit-Position: refs/heads/master@{#17370}
Reason to go back is that we may end up with a bunch of streams that are never cleaned up and consume resources.
BUG=webrtc:7175, b/35863246
Review-Url: https://codereview.webrtc.org/2746763002
Cr-Commit-Position: refs/heads/master@{#17210}
It seems to me that we're currently just picking the first CN codec, rather than the one that matches the clock rate of the voice codec. The only test I've gotten to fail by changing this behavior is the one that's also changed in this CL, which explicitly expects a CN codec to be chosen even though there's none matching.
BUG=webrtc:7282
Review-Url: https://codereview.webrtc.org/2707133007
Cr-Commit-Position: refs/heads/master@{#16979}
These methods relate to typing detection but are not used anymore. Typing detection is enabled through the VoiceDetection module on the APM.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2684933008
Cr-Commit-Position: refs/heads/master@{#16527}
It's currently only used to ensure transport-cc is enabled for the format in question. It might be used to toggle more things in future.
BUG=webrtc:5806
Review-Url: https://codereview.webrtc.org/2669583002
Cr-Commit-Position: refs/heads/master@{#16514}
These structs will be used for ORTC objects (and their WebRTC
equivalents).
This CL also introduces some minor changes to the existing implemented
structs:
- max_bitrate_bps uses rtc::Optional instead of "-1 means unset"
- "mime_type" turned into "name"/"kind" (which can be used to form the
MIME type string, if needed).
- clock_rate and channels changed to rtc::Optional, since they will
need to be for RtpSender.send().
- Renamed "channels" to "num_channels" (the ORTC name, which I prefer).
BUG=webrtc:7013, webrtc:7112
Review-Url: https://codereview.webrtc.org/2651883010
Cr-Commit-Position: refs/heads/master@{#16437}
BUG=webrtc:7097
TEST=Set "ptime=120", try WebRTC calls over custom build Chromium with and without Opus 120ms. Try both Chromium w <-> Chromium w and Chromium w <-> Chromium w/o
Review-Url: https://codereview.webrtc.org/2668633004
Cr-Commit-Position: refs/heads/master@{#16408}
Bulk of the changes were done using
git grep -l '#include "webrtc/base/common.h"' | \
xargs sed -i '\,^#include.*webrtc/base/common\.h,d'
followed by adding back the include in the few places where it is
still needed, and in one case (pseudotcp.cc) instead deleting its use
of RTC_UNUSED.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2644103002
Cr-Commit-Position: refs/heads/master@{#16263}
webrtcvoiceengine.cc ensured that if the bitrate set for ISAC was 0,
it was changed to -1 so that the codec could manage the bitrate
itself.
webrtcsdp.cc ensured that if the bitrate set for ISAC was 0, it was
explicitly set to default values to avoid the codec's built in bitrate
management.
Eventually, there'll be no codec specific code like this in these
layers. This is one step towards that goal.
BUG=webrtc:5806
Review-Url: https://codereview.webrtc.org/2642923003
Cr-Commit-Position: refs/heads/master@{#16220}
With this, RtpSender and RtpReceiver will always return an SSRC if one
is available. Also, attempts to change the SSRC with SetParameters will
fail, rather than silently doing nothing.
BUG=webrtc:6888
Review-Url: https://codereview.webrtc.org/2567333004
Cr-Commit-Position: refs/heads/master@{#15939}
An external audio mixer will be passed from PeerConnectionFactory to
AudioTransportProxy.
This CL has rewritten based on reverted CL
https://codereview.chromium.org/2539213003/
The only difference is that
static MediaEngineInterface* Create(
webrtc::AudioDeviceModule* adm,
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
audio_decoder_factory,
WebRtcVideoEncoderFactory* video_encoder_factory,
WebRtcVideoDecoderFactory* video_decoder_factory);
in media/engine/webrtcmediaengine.h is kept in this CL instead of
replaced for backward compatibility.
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2570993002
Cr-Commit-Position: refs/heads/master@{#15580}
Reason for revert:
A interface change broke some downstream code in google3.
Original issue's description:
> Support external audio mixer in webrtc.
>
> An external audio mixer will be passed from PeerConnectionFactory to
> AudioTransportProxy.
>
> BUG=webrtc:6457
>
> Committed: https://crrev.com/f6bcac59e88c3be5ffd73bbb1098f2d82ee316a1
> Cr-Commit-Position: refs/heads/master@{#15556}
TBR=solenberg@webrtc.org,aleloi@webrtc.org,deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2562333003
Cr-Commit-Position: refs/heads/master@{#15557}
An external audio mixer will be passed from PeerConnectionFactory to
AudioTransportProxy.
BUG=webrtc:6457
Review-Url: https://codereview.webrtc.org/2539213003
Cr-Commit-Position: refs/heads/master@{#15556}
Was added for video initially, but not for audio.
BUG=webrtc:6862
Review-Url: https://codereview.webrtc.org/2568553002
Cr-Commit-Position: refs/heads/master@{#15552}
the APM parameters to the high-pass filter.
The introduction will be done in three steps:
1) This CL which introduces the new scheme and
changes the code in webrtcvoiceengine.cc to use it.
2) Introduce the scheme into upstream code.
3) Remove the HighPassFilter interface in APM.
BUG=webrtc::6220, webrtc::6296, webrtc::6297, webrtc::6181, webrtc::5298
Review-Url: https://codereview.webrtc.org/2415403002
Cr-Commit-Position: refs/heads/master@{#15197}
the previously specified setting is changed if it is specified to be changed,
and otherwise the previously specified setting is kept as it is.
This CL replicates this functionality for the way that the new APM
parameter scheme is used.
BUG=webrtc::6220, webrtc::6296, webrtc::6297, webrtc::6181, webrtc::5298
Review-Url: https://codereview.webrtc.org/2489343002
Cr-Commit-Position: refs/heads/master@{#15167}
Payload type -> RtpCodecParameters maps added for sender and receiver.
This is a follow-up to https://codereview.webrtc.org/2484193002/ which
did the same thing for VideoMediaInfo. This information will be used to
produce RTCCodecStats[1].
Voice[Sender/Receiver]Info is updated with current codec payload type
for every stream which can be used to look up the codec in
VoiceMediaInfo.
[1] https://w3c.github.io/webrtc-stats/#codec-dict*
BUG=chromium:659117
Review-Url: https://codereview.webrtc.org/2503383002
Cr-Commit-Position: refs/heads/master@{#15144}
This is a refactoring change in preparation for enabling AudioMixer
with the goal to have a small CL as possible for passing audio through
the new audio mixer in WebRTC. The dependent CL https://codereview.webrtc.org/2436033002/
enables the mixer.
An object of class AudioState is shared across different webrtc audio
connections. It is created in tests and in
WebRTCVoiceEngine. AudioState is constructed by passing a Config
struct, where one argument is scoped_refptr<AudioMixer>.
Populating this field has now been mandatory. Tests and
WebRTCVoiceEngine create and pass either a AudioMixerImpl.
WebRTCVoiceEngine passes a real AudioMixer, which is
currently unused.
An alternative would have tests pass a mocked audio mixer. We
chose not to do that, because we believe that tests should use
the real thing unless there are reasons against it. Construction
time is not an issue, because the real mixer is relatively
lightweight.
We couldn't find a way to test any mixer-related changes in AudioState
before the mixes is connected. The next dependent CL
https://codereview.webrtc.org/2436033002/ contains unit tests for
mixer usage.
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2469743002
Cr-Commit-Position: refs/heads/master@{#15134}
We support multiple payload types, and one which matches the audio codec the closest, is picked (or the one with lowest clock rate, if no perfect match is found).
The exact clock rate is then ignored and DTMF packets are time stamped with the rate of the current audio codec. This is exactly the way the code has worked up to this point, but until now we have been under the impression that we were in fact sending 8k DTMF.
In other words, this is an improvement over the current situation, since we will most likely find a payload type which matches the codec clock rate.
This CL also does a little cleaning of the DTMFQueue and RTPSenderAudio classes.
BUG=webrtc:2795
Review-Url: https://codereview.webrtc.org/2392883002
Cr-Commit-Position: refs/heads/master@{#15129}
- Functionality now implemented in AudioReceiveStream and Call.
- Added some missing function to MockChannelProxy.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2461523002
Cr-Commit-Position: refs/heads/master@{#15072}
The unit was kbps but the one default use of it is in bps. The inconsistency should be fixed.
BUG=webrtc:6670
Review-Url: https://codereview.webrtc.org/2247213005
Cr-Commit-Position: refs/heads/master@{#14955}
Reason for revert:
Reverting because of the reasons given in comment #16:
"This change breaks a scenario that is unfortunately not covered by unit tests,
but can easily happen in a real call.
The scenario that is broken by the change is this:
1. A sends an offer to B, with a set of codecs C_a (which is a subset of C_b,
the codecs supported by B)
2. B responds with an answer, and sets the receive codecs to C_a.
3. At a later time, B generates a new offer which by default includes all codecs
in C_b.
4. B calls SetLocalDescription() with this offer, that adds new receive codecs.
5. Adding the new codecs fails, because of the check at
https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/channel.....
This causes SetLocalDescription() itself to fail. The net effect is that B
cannot set a local description it just generated.
Before the CL mentioned above, we'd stop playout before changing the codecs, and
the operation would succeed."
Original issue's description:
> Removed the legacy behavior of stopping playout when setting new receive codecs.
>
> BUG=webrtc:4690
>
> Committed: https://crrev.com/917d4e1e7131f35764cff932a8793151585e8179
> Cr-Commit-Position: refs/heads/master@{#14610}
TBR=solenberg@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2478433003
Cr-Commit-Position: refs/heads/master@{#14905}
- Update MockAudioProcessing to current APM interface.
- Replace calls to VoEAudioProcessing::Start/StopAecDump with direct calls on APM.
- Add AudioProcessing* in WVoE, get it from VoE, so we can call directly on APM.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2446143002
Cr-Commit-Position: refs/heads/master@{#14786}
The stat is currently always set to zero until the residual echo detector has landed.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2431443003
Cr-Commit-Position: refs/heads/master@{#14721}
An audio track with a level controller with the correct initialization
value can be created by a combination of
PeerConnectionFactory::CreateAudioTrack(..., audio_source) and
either
audio_source = PeerConnectionFactory::CreateAudioSource(constraints) or
audio_source = PeerConnectionFactory::CreateAudioSource(audio_options).
NOTRY=True
BUG=webrtc:6386
Review-Url: https://codereview.webrtc.org/2408143003
Cr-Commit-Position: refs/heads/master@{#14693}