Commit Graph

125 Commits

Author SHA1 Message Date
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
a613eb6bff Fixing a few tests for the upcoming Opus 1.2-alpha.
BUG=b/35415318

NOTRY=True

Review-Url: https://codereview.webrtc.org/2746763005
Cr-Commit-Position: refs/heads/master@{#17234}
2017-03-14 21:33:30 +00:00
e851a9a763 Fixed problems in neteq when RTP and decoder timestamps increment with
different sample rate frequency.

BUG=webrtc:7327

Problems before the fix:
1. NetEqImpl::timestamp_ is inconsistent. Initially it is set to
the original RTP timestamp, but later gets updated with the
scaled timestamp.
2. NetEqImpl::InsertPacketInternal::main_timestamp is set with
the original RTP timestamp, but later gets compared with the
NetEqImpl::timestamp_ which may or may not be with the same
sample rate frequency and this results in major problems.
3. IncreaseEndTimestamp(main_timestamp - timestamp_) will be
incorrect when SSRC is changed and not the first packet.
4. delay_manager_->Update() may not be always invoked, since
the (main_timestamp - timestamp_) >= 0 will not be true when
the previous scaled timestamp_ is bigger than the main_timestamp
(current RTP timestamp) even if the current RTP timestamp is
bigger than the previous RTP timestamp.
5. delay_manager_->Update() parameters are main_timestamp
which increments with the RTP sample rate frequency and the
fs_hz_ which is the decoder sample rate frequency. When these
two frequencies are different as is the case with g.722, the
DelayManager::Update() will misfire and calculate incorrect
packet_len_ms and inter-arrival time (IAT) as a result. This
in effect will cause neteq to enter kPreemptiveExpand operation
and will keep expanding the jitter buffer even if the RTP packets
arrive with no jitter at all.

The fix corrects all these problems by making sure the
main_timestamp and the timestamp_ are always set with the scaled
timestamp and increment with the decoder sample rate frequency.

Review-Url: https://codereview.webrtc.org/2743063005
Cr-Commit-Position: refs/heads/master@{#17232}
2017-03-14 17:00:27 +00:00
65cb70d939 Fix cyclic deps: rent_a_codec<->audio_coding and rent_a_codec<->neteq
In short, what I did was to

  * Remove acm_common_defs.h (the stuff in it was used only by
    acm_codec_database.cc).

  * Move audio_coding_module_typedefs.h to a new build target.

  * Move the NetEqDecoder enum (and the associated
    NetEqDecoderToSdpAudioFormat function) to a new file in a new
    build target.

BUG=webrtc:7243, webrtc:7244

Review-Url: https://codereview.webrtc.org/2723253005
Cr-Commit-Position: refs/heads/master@{#17005}
2017-03-03 14:16:28 +00:00
d3edd770ad Introduce dchecked_cast, and start using it
It's the faster, less strict cousin of checked_cast.

BUG=none

Review-Url: https://codereview.webrtc.org/2714063002
Cr-Commit-Position: refs/heads/master@{#16958}
2017-03-02 02:52:48 +00:00
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
2e03c66119 Adding build switch for Opus that supports 120ms ptime.
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}
2017-02-02 01:31:11 +00:00
d32bf75721 Pass SdpAudioFormat through Channel, without converting to CodecInst
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2516993002
Cr-Commit-Position: refs/heads/master@{#16165}
2017-01-19 15:03:59 +00:00
566d820e00 Update smoothed bitrate.
BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2546493002
Cr-Commit-Position: refs/heads/master@{#16036}
2017-01-12 18:17:38 +00:00
ffecbbf5d0 Fix for integer overflow in NetEq.
BUG=chromium:668736

Review-Url: https://codereview.webrtc.org/2571483002
Cr-Commit-Position: refs/heads/master@{#15654}
2016-12-16 13:51:49 +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
4b9a2cb0d8 Reland "Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate."
The earlier attempt of this was in
https://codereview.webrtc.org/2411613002/

It was reverted due to failures on internal bots, showing that we cannot deprecate one method.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2538493006
Cr-Commit-Position: refs/heads/master@{#15333}
2016-11-30 14:50:08 +00:00
26bddb92f0 Replace test_support_main by test_main and get rid of test_support_main_threaded_mac
test_support_main_threaded_mac doesn't seem to be used. It looks like it was
last used about a year and a half ago, and was removed in
https://webrtc-codereview.appspot.com/55379004

BUG=webrtc:6424
R=kjellander@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2540693002
Cr-Commit-Position: refs/heads/master@{#15332}
2016-11-30 14:12:10 +00:00
e69b46863a Revert of Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. (patchset #5 id:240001 of https://codereview.webrtc.org/2411613002/ )
Reason for revert:
internal bot failure

Original issue's description:
> Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate.
>
> BUG=webrtc:6303
>
> Committed: https://crrev.com/84e56d576806635c966093d5421c5d04c9b90746
> Cr-Commit-Position: refs/heads/master@{#15310}

TBR=kwiberg@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:6303

Review-Url: https://codereview.webrtc.org/2537243004
Cr-Commit-Position: refs/heads/master@{#15312}
2016-11-30 09:19:06 +00:00
84e56d5768 Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2411613002
Cr-Commit-Position: refs/heads/master@{#15310}
2016-11-30 08:28:07 +00:00
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
2779bab02a Support receiving DTMF for multiple RTP clock rates.
BUG=webrtc:2795

Review-Url: https://codereview.webrtc.org/2337473002
Cr-Commit-Position: refs/heads/master@{#15128}
2016-11-17 12:45:25 +00:00
da2bf4e150 Stop using old AudioCodingModule::RegisterReceiveCodec overloads
BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2388153004
Cr-Commit-Position: refs/heads/master@{#14753}
2016-10-24 20:47:16 +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
bf7c620280 Fix lint errors in audio_coding_module_unittest.cc
BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2389263003
Cr-Commit-Position: refs/heads/master@{#14544}
2016-10-06 08:53:39 +00:00
2504c0a91c Drop _oldapi from ACM test file names
Updating GN files, include paths, and include guards

BUG=None
NOTRY=True
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2387113005
Cr-Commit-Position: refs/heads/master@{#14542}
2016-10-06 08:31:38 +00:00
5377bc77cc Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
2016-10-04 20:47:02 +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
8f9010631c Revert of Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (patchset #2 id:20001 of https://codereview.webrtc.org/2384693002/ )
Reason for revert:
This CL breaks FYI bots with a compile error.

Sample error:
jingle/glue/thread_wrapper.cc -o obj/jingle/jingle_glue/thread_wrapper.o
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:46:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<rtc::Thread *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(rtc::Thread::Current(), current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:102:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:81:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(this, JingleThreadWrapper::current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:5:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:82:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, rtc::Thread *>' requested here
  DCHECK_EQ(this, rtc::Thread::Current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:12:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
3 errors generated.

Original issue's description:
> Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
>
> The former is always defined (by webrtc/base/checks.h) to either 0 or
> 1, whereas the latter isn't necessarily defined.
>
> NOTRY=true
> BUG=webrtc:6451
>
> Committed: https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b
> Cr-Commit-Position: refs/heads/master@{#14474}

TBR=ossu@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:6451

Review-Url: https://codereview.webrtc.org/2384083004
Cr-Commit-Position: refs/heads/master@{#14480}
2016-10-03 15:32:36 +00:00
ab0b929321 Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

NOTRY=true
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2384693002
Cr-Commit-Position: refs/heads/master@{#14474}
2016-10-03 12:04:25 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +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
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
f1b08da5b4 Stopped using the NetEqDecoder enum internally in NetEq.
NetEqDecoder is still used in the external interfaces, but this change
opens up the ability to use SdpAudioFormats directly, once appropriate
interfaces have been added.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2355503002
Cr-Commit-Position: refs/heads/master@{#14368}
2016-09-23 09:19:49 +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
d120192f32 AcmReceiver::DecoderByPayloadType: Ask NetEq for decoder
Instead of looking in AcmReceiver::decoders_, which we're trying to
get rid of.

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

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2352623002
Cr-Commit-Position: refs/heads/master@{#14312}
2016-09-20 22:18:24 +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
63489787a0 Add new decoding statistics for muted output
This change adds a new statistic for logging how many calls to
NetEq::GetAudio resulted in a "muted output". A muted output happens
if the packet stream has been dead for some time (and the last decoded
packet was not comfort noise).

BUG=webrtc:5606
BUG=b/31256483

Review-Url: https://codereview.webrtc.org/2341293002
Cr-Commit-Position: refs/heads/master@{#14302}
2016-09-20 08:47:19 +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
f62b82e95f Revert of AcmReceiver::DecoderByPayloadType: Ask NetEq for decoder (patchset #1 id:1 of https://codereview.webrtc.org/2341283002/ )
Reason for revert:
Seems to have broken Chromium tests.

Original issue's description:
> AcmReceiver::DecoderByPayloadType: Ask NetEq for decoder
>
> Instead of looking in AcmReceiver::decoders_, which we're trying to
> get rid of.
>
> BUG=webrtc:5801
>
> Committed: https://crrev.com/07772e4738ef8007280f97a0245eef34b9ca9391
> Cr-Commit-Position: refs/heads/master@{#14276}

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/2346173002
Cr-Commit-Position: refs/heads/master@{#14277}
2016-09-18 12:32:19 +00:00
07772e4738 AcmReceiver::DecoderByPayloadType: Ask NetEq for decoder
Instead of looking in AcmReceiver::decoders_, which we're trying to
get rid of.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2341283002
Cr-Commit-Position: refs/heads/master@{#14276}
2016-09-17 18:30:31 +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
65fc8b9138 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2291503002
Cr-Commit-Position: refs/heads/master@{#13959}
2016-08-29 17:05:34 +00:00
b8e56ee320 Fix Chromium clang plugin warnings
This adds a new file, webrtc/modules/audio_coding/neteq/tools/packet_source.cc, so that I'll have somewhere to put the new non-inlined methods.

NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2290593002
Cr-Commit-Position: refs/heads/master@{#13956}
2016-08-29 13:37:42 +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
c76680419e NetEq: Update CNG code to accommodate 48 kHz sample rate
Checksums were updated for NetEq and ACM bitexactness tests (after
verifying the audio quality).

BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2266293005
Cr-Commit-Position: refs/heads/master@{#13928}
2016-08-26 06:53:43 +00:00
fcada90485 Fixing timestamp comparison assert.
Wasn't handling wrap-around properly. Noticed this because a test
failed.

TBR=henrik.lundin@webrtc.org

Review-Url: https://codereview.webrtc.org/2271203003
Cr-Commit-Position: refs/heads/master@{#13905}
2016-08-24 19:45:18 +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