Commit Graph

19 Commits

Author SHA1 Message Date
087bd34d23 Move AudioDecoder and related stuff to the api/ directory
BUG=webrtc:5805, webrtc:6725

Review-Url: https://codereview.webrtc.org/2668523004
Cr-Commit-Position: refs/heads/master@{#16534}
2017-02-10 16:15:44 +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
7e30432b36 Hooking up audio network adaptor to VoE.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2390883004
Cr-Commit-Position: refs/heads/master@{#14611}
2016-10-12 12:01:01 +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
24c7c1238d Move FunctionView from AudioCodingModule to the rtc namespace
It's a very general type, and we're about to start needing it in other
places besides AudioCodingModule.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2380463003
Cr-Commit-Position: refs/heads/master@{#14423}
2016-09-28 18:57:17 +00:00
36a43887f3 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2286063005
Cr-Commit-Position: refs/heads/master@{#13955}
2016-08-29 12:33:36 +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
85228d6af6 Regression test for issue where Opus DTX status was being forgotten.
BUG=webrtc:6020

Review-Url: https://codereview.webrtc.org/2177263002
Cr-Commit-Position: refs/heads/master@{#13539}
2016-07-27 11:53:52 +00:00
e352578bc8 Moved injection of AudioDecoderFactory into voe::Channel.
Channel's API remains unchanged, but the creation of a BuiltinAudioDecoderFactory is now in Channel. The next step would be to amend Channel's API (through CreateChannel, I believe) to allow an AudioDecoderFactory to be sent along.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/1992763002
Cr-Commit-Position: refs/heads/master@{#12893}
2016-05-25 14:37:47 +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
84be511ac0 Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
(This is a re-land of https://codereview.webrtc.org/1921233002, which
got reverted for breaking Chromium.)

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12522}
2016-04-27 08:20:08 +00:00
52d4e6bf5e Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (patchset #1 id:40001 of https://codereview.webrtc.org/1921233002/ )
Reason for revert:
Fails on Chromium FYI bots.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/5392/

Original issue's description:
> Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
>
> BUG=webrtc:5520
>
> Committed: https://crrev.com/2c27a062ee46258abe9facc2cceee74f09bf6a99
> Cr-Commit-Position: refs/heads/master@{#12511}

TBR=tommi@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12513}
2016-04-26 16:32:09 +00:00
2c27a062ee Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12511}
2016-04-26 15:38:03 +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
4cdbd57fe3 AudioCodingModule: Add methods for injecting external encoder stacks
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#12158}
2016-03-30 10:10:15 +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
25702cb162 Misc. small cleanups.
* Better param names
* Avoid using negative values for (bogus) placeholder channel counts (mostly in tests).  Since channels will be changing to size_t, negative values will be illegal; it's sufficient to use 0 in these cases.
* Use arraysize()
* Use size_t for counting frames, samples, blocks, buffers, and bytes -- most of these are already size_t in most places, this just fixes some stragglers
* reinterpret_cast<int64_t>(void*) is not necessarily safe; use uintptr_t instead
* Remove unnecessary code, e.g. dead code, needlessly long/repetitive code, or function overrides that exactly match the base definition
* Fix indenting
* Use uint32_t for timestamps (matching how it's already a uint32_t in most places)
* Spelling
* RTC_CHECK_EQ(expected, actual)
* Rewrap
* Use .empty()
* Be more pedantic about matching int/int32_t/
* Remove pointless consts on input parameters to functions
* Add missing sanity checks

All this was found in the course of constructing https://codereview.webrtc.org/1316523002/ , and is being landed separately first.

BUG=none
TEST=none

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

Cr-Commit-Position: refs/heads/master@{#11191}
2016-01-08 21:50:32 +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