Commit Graph

28 Commits

Author SHA1 Message Date
02ed201182 AcmReceiver: Make a member variable const
This is a minor clean-up made possible by simplifications done in the
past.

Bug: none
Change-Id: Id0ea167572f8da36db5de949441f67a2a18555be
Reviewed-on: https://chromium-review.googlesource.com/528073
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18490}
2017-06-08 09:18:14 +00:00
1c07c70d88 Reland "WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType"
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2774833003
Cr-Commit-Position: refs/heads/master@{#17391}
2017-03-27 14:15:49 +00:00
670a7f3611 Revert of WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (patchset #13 id:260001 of https://codereview.webrtc.org/2686043006/ )
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: 1724cfbdba

TBR=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}
2017-03-24 12:56:21 +00:00
1724cfbdba 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}
2017-03-24 10:16:04 +00:00
a9a6d4bc2c Delete voice_engine_configurations.h
The file was aldready pruned down to the point where it only included
webrtc/typedefs.h. Therefore, all includes of
voice_engine_configurations.h are replaced with typedefs.h, except on
two occasions where it was obvously not needed.

BUG=webrtc:6506

Review-Url: https://codereview.webrtc.org/2553583002
Cr-Commit-Position: refs/heads/master@{#15547}
2016-12-12 13:03:08 +00:00
e280cdeb74 Voe::Channel: Turned GetPlayoutFrequency into GetRtpTimestampRateHz.
This gets rid of a bit of codec-specific code in VoE.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2355483003
Cr-Commit-Position: refs/heads/master@{#14614}
2016-10-12 18:04:16 +00:00
7056be937f Delete old video defines in engine config.
This CL deletes the old and not used video defines in
engine_configurations.h and pre-pends voice_ to indicate there are only
voice/audio defines left in the file.

BUG=none
R=solenberg@webrtc.org

Review URL: https://codereview.webrtc.org/2401673002 .

Cr-Commit-Position: refs/heads/master@{#14558}
2016-10-07 05:07:36 +00:00
5adaf735dc AudioCodingModule: Specify decoders using SdpAudioFormat
NetEq already uses SdpAudioFormat internally; this CL adds an
AudioCodingModule::RegisterReceiveCodec overload that accepts
SdpAudioFormat, and propagates it through AcmReceiver into NetEq.

The intention is to get rid of the other ways to specify decoders and
always use SdpAudioFormat. (And eventually to do the same for encoders
too.)

NOTRY=true
BUG=5801

Review-Url: https://codereview.webrtc.org/2365653004
Cr-Commit-Position: refs/heads/master@{#14506}
2016-10-04 16:33:33 +00:00
46a8d18efa ACM: Removed the code for InitialDelayManager
It looks to have been unused since the landing of
https://codereview.webrtc.org/1419573013

BUG=webrtc:3520

Review-Url: https://codereview.webrtc.org/2363993002
Cr-Commit-Position: refs/heads/master@{#14397}
2016-09-27 12:43:37 +00:00
c4ccd4d61c AcmReceiver: Eliminate AcmReceiver::decoders_
BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2351183002
Cr-Commit-Position: refs/heads/master@{#14335}
2016-09-21 17:55:21 +00:00
6b19b560ac AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one
It requires a new NetEq method, but it can no longer fail. And we no
longer need to use AcmReceiver::decoders_, which we're trying to
eliminate.

(This is a re-land of https://codereview.webrtc.org/2342313002.)

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2348233002
Cr-Commit-Position: refs/heads/master@{#14304}
2016-09-20 11:02:38 +00:00
6f0f616b53 AcmReceiver: Look up last decoder in NetEq's table of decoders
AcmReceiver::decoders_ is now one step closer to being unused.

(This is a re-land of https://codereview.webrtc.org/2339953002.)

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2354453003
Cr-Commit-Position: refs/heads/master@{#14303}
2016-09-20 10:07:49 +00:00
7a0f2c55f5 Revert of AcmReceiver: Look up last decoder in NetEq's table of decoders (patchset #1 id:100001 of https://codereview.webrtc.org/2339953002/ )
Reason for revert:
Seems to have broken Chromium tests.

Original issue's description:
> AcmReceiver: Look up last decoder in NetEq's table of decoders
>
> AcmReceiver::decoders_ is now one step closer to being unused.
>
> BUG=webrtc:5801
>
> Committed: https://crrev.com/1e4d8b574cde64d93b98d89c7b817fb93185a307
> Cr-Commit-Position: refs/heads/master@{#14274}

TBR=ossu@webrtc.org,henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2348123002
Cr-Commit-Position: refs/heads/master@{#14279}
2016-09-18 12:35:59 +00:00
bfb78d1293 Revert of AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one (patchset #2 id:20001 of https://codereview.webrtc.org/2342313002/ )
Reason for revert:
Seems to have broken Chromium tests.

Original issue's description:
> AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one
>
> It requires a new NetEq method, but it can no longer fail. And we no
> longer need to use AcmReceiver::decoders_, which we're trying to
> eliminate.
>
> BUG=webrtc:5801
>
> Committed: https://crrev.com/f6232b43a176e1717354b671a0a52b887d70de59
> Cr-Commit-Position: refs/heads/master@{#14275}

TBR=ossu@webrtc.org,henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2349973002
Cr-Commit-Position: refs/heads/master@{#14278}
2016-09-18 12:33:48 +00:00
f6232b43a1 AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one
It requires a new NetEq method, but it can no longer fail. And we no
longer need to use AcmReceiver::decoders_, which we're trying to
eliminate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2342313002
Cr-Commit-Position: refs/heads/master@{#14275}
2016-09-17 17:45:24 +00:00
1e4d8b574c AcmReceiver: Look up last decoder in NetEq's table of decoders
AcmReceiver::decoders_ is now one step closer to being unused.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2339953002
Cr-Commit-Position: refs/heads/master@{#14274}
2016-09-17 15:40:17 +00:00
b3f1c5d2fe Add NetEq::FilteredCurrentDelayMs() and use it in VoiceEngine
The new method returns the current total delay (packet buffer and sync
buffer) in ms, with smoothing applied to even out short-time
fluctuations due to jitter. The packet buffer part of the delay is not
updated during DTX/CNG periods.

This CL also pipes the new metric through ACM and uses it in
VoiceEngine. It replaces the previous method of estimating the buffer
delay (where an inserted packet's RTP timestamp was compared with the
last played timestamp from NetEq). The new method works better under
periods of DTX/CNG.

Review-Url: https://codereview.webrtc.org/2262203002
Cr-Commit-Position: refs/heads/master@{#13855}
2016-08-22 22:40:00 +00:00
834a6ea12b Add muted_output parameter to ACM
The new parameter indicates if the output in the AudioFrame is muted. If
so, the output samples are not written, but should be interpreted as all
zero.

A version of AudioCodingModule::PlayoutData10Ms() without the new
parameter is maintained while waiting for downstream dependencies to
conform.

BUG=webrtc:5609

Review-Url: https://codereview.webrtc.org/1976913002
Cr-Commit-Position: refs/heads/master@{#12719}
2016-05-13 10:45:31 +00:00
9a410dd082 Change NetEq::GetPlayoutTimestamp to return an rtc::Optional<uint32_t>
This is in preparation for changes to when the playout timestamp is
valid.

BUG=webrtc:5669

Review URL: https://codereview.webrtc.org/1853183002

Cr-Commit-Position: refs/heads/master@{#12256}
2016-04-06 08:39:30 +00:00
500c04bc86 Delete VAD methods from AcmReceiver and move functionality inside NetEq
This change essentially does two things:

1. Remove the VAD-related methods from AcmReceiver. These are
EnableVad(), DisableVad(), and vad_enabled(). None of them were used
outside of unit tests.

2. Move the functionality to set AudioFrame::speech_type_ and
AudioFrame::vad_activity_ inside NetEq. This was previously done in
AcmReceiver, but based on information inherently owned by NetEq.

With the change in 2, NetEq's GetAudio interface can be simplified by
removing the output type parameter. This will be done in a follow-up
CL.

BUG=webrtc:5607

Review URL: https://codereview.webrtc.org/1772583002

Cr-Commit-Position: refs/heads/master@{#11902}
2016-03-08 10:36:07 +00:00
6d8e011b64 Change NetEq::GetAudio to use AudioFrame
With this change, NetEq now uses AudioFrame as output type, like the
surrounding functions in ACM and VoiceEngine already do.

The computational savings is probably slim, since one memcpy is
removed while another one is added (both in AcmReceiver::GetAudio).

More simplifications and clean-up will be done in
AcmReceiver::GetAudio in future CLs.

BUG=webrtc:5607

Review URL: https://codereview.webrtc.org/1750353002

Cr-Commit-Position: refs/heads/master@{#11874}
2016-03-04 18:34:26 +00:00
0023fdffd0 Remove the ID from AcmReceiver
This is an artifact from the past, and is no longer used.

R=ivoc@webrtc.org

Review URL: https://codereview.webrtc.org/1764623002

Cr-Commit-Position: refs/heads/master@{#11866}
2016-03-04 07:05:45 +00:00
16c5a96630 Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/
BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1694073002

Cr-Commit-Position: refs/heads/master@{#11622}
2016-02-15 10:27:34 +00:00
5ad935cb56 Remove mutable from rtc::CriticalSection members.
rtc::CriticalSection is now lockable from const methods and no longer
need to remain mutable.

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1613643004

Cr-Commit-Position: refs/heads/master@{#11367}
2016-01-25 11:52:53 +00:00
9090e0b147 Switch CriticalSectionWrapper->rtc::CriticalSection in modules/audio_coding.
This is a part of cleaning up CriticalSectionWrapper in general.

BUG=
R=henrik.lundin@webrtc.org

Review URL: https://codereview.webrtc.org/1610073003 .

Cr-Commit-Position: refs/heads/master@{#11319}
2016-01-20 12:39:45 +00:00
6955870806 Convert channel counts to size_t.
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
2016-01-13 00:26:55 +00:00
4cf61dd116 NetEq: Add codec name and RTP timestamp rate to DecoderInfo
The new fields are default-populated for built-in decoders, but for
external decoders, the name can now be given when registering the
decoder.

BUG=webrtc:3520

Review URL: https://codereview.webrtc.org/1484343003

Cr-Commit-Position: refs/heads/master@{#10952}
2015-12-09 14:21:02 +00:00
3e6db2321c audio_coding: remove "main" directory
This is the last piece of the old directory layout of the modules.

Duplicated header files are left in audio_coding/main/include until
downstream code is updated to the new location. They have pragma
warnings added to them and identical header guards as the new headers to avoid breaking things.

BUG=webrtc:5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
NOTRY=True
NOPRESUBMIT=True

Review URL: https://codereview.webrtc.org/1481493004

Cr-Commit-Position: refs/heads/master@{#10803}
2015-11-26 12:45:01 +00:00