Commit graph

44 commits

Author SHA1 Message Date
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
minyue-webrtc
bf94fda1e4 Renaming probing_interval to bwe_period globally.
This is a follow up of https://codereview.webrtc.org/2888893002/.

Bug: None
Change-Id: Ia76903858c0a6f2801f14878980e18ae6d3b85e6
Reviewed-on: https://chromium-review.googlesource.com/646020
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Minyue Li (BackIn2018March) <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19644}
2017-09-02 05:00:01 +00:00
elad.alon
dadb4dc3c9 Allow ANA to receive RPLR (recoverable packet loss rate) indications
This is part of a series of CLs. Next CLs:
1. CL for RPLR-based FecController
2. CL for allowing experiment-driven configuration of the above (through both field-trials and protobuf)

BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2661043003
Cr-Commit-Position: refs/heads/master@{#17368}
2017-03-23 22:29:50 +00:00
michaelt
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
minyue
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
minyue
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
minyue
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
kwiberg
352444fcac RTC_[D]CHECK_op: Remove superfluous casts
There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.

It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
2016-11-28 23:59:03 +00:00
kwiberg
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
kwiberg
3f81fcd2e8 Don't recreate the speech encoder if we don't have to
If the specification for the speech encoder hasn't changed, we should
reuse it instead of recreating it. Otherwise, we lose its state. (This
problem was originally discovered because AudioEncoderOpus instances
would forget that they were supposed to be using DTX.)

BUG=webrtc:6020, chromium:622647

Review-Url: https://codereview.webrtc.org/2089183002
Cr-Commit-Position: refs/heads/master@{#13273}
2016-06-23 10:58:45 +00:00
ossu
97ba30eedf Convert CNG into C++ and remove it from AudioDecoder
Broke out CNG from AudioDecoder as they didn't really share an interface.

Converted the CNG code to C++, to make initialization and resource handling easier. This includes several changes to the behavior, favoring RTC_CHECKs over returning error codes.

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

Cr-Commit-Position: refs/heads/master@{#12491}
2016-04-25 14:56:05 +00:00
ossu
2903ba5ff3 Reland Remove the deprecated EncodeInternal interface from AudioEncoder
Remove the deprecated EncodeInternal interface from AudioEncoder

Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.

BUG=webrtc:5591

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

Cr-Commit-Position: refs/heads/master@{#12409}
2016-04-18 13:14:42 +00:00
kwiberg
6ca0a31708 We no longer use compilers that can't =default move construction and assignment
Review URL: https://codereview.webrtc.org/1891483006

Cr-Commit-Position: refs/heads/master@{#12376}
2016-04-15 12:25:03 +00:00
ossu
164bc4bbd3 Revert of Remove the deprecated EncodeInternal interface from AudioEncoder (patchset #4 id:60001 of https://codereview.webrtc.org/1864993002/ )
Reason for revert:
Broke import. Implementations of the old interface still exists somewhere.

Original issue's description:
> Remove the deprecated EncodeInternal interface from AudioEncoder
>
> Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.
>
> BUG=webrtc:5591
>
> Committed: https://crrev.com/5222d315dbea8f3563c100cc9f2451907f70b05f
> Cr-Commit-Position: refs/heads/master@{#12329}

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

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

Cr-Commit-Position: refs/heads/master@{#12330}
2016-04-12 10:58:10 +00:00
ossu
5222d315db Remove the deprecated EncodeInternal interface from AudioEncoder
Also hid MaxEncodedBytes by making it private. It will get removed as soon as subclasses have had time to remove their overrides.

BUG=webrtc:5591

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

Cr-Commit-Position: refs/heads/master@{#12329}
2016-04-12 10:31:03 +00:00
kwiberg
6030a129c0 Pass ownership of external encoders to the ACM
We want this because otherwise the ACM uses its mutex to protect an
encoder that's owned by someone else. That someone else may easily
slip up and delete or otherwise touch the encoder before making sure
that the ACM has stopped using it, bypassing the lock.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#11909}
2016-03-08 14:01:37 +00:00
ossu
4f43fcfd49 Renamed new EncodeInternal to EncodeImpl to ensure proper backwards compatibility.
Renamed the new variant of EncodeInternal to EncodeImpl, so that
subclasses implementing one of the EncodeInternal don't need to
explicitly contain 'using AudioEncoder::EncodeInternal' to avoid their
implementation hiding the other variant of EncodeInternal. This causes
a warning (treated as an error) when building using GCC.

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

Cr-Commit-Position: refs/heads/master@{#11868}
2016-03-04 08:54:38 +00:00
ossu
10a029e952 Changed AudioEncoder::Encode to take an rtc::Buffer* instead of uint8_t* and a maximum size.
For backwards compatibility, I've added kept the old interface to
Encode() and EncodeInternal and created default implementations of both
variants of EncodeInternal(), each calling the other. At least one of
the variants must be implemented in a subclass or we'll run out of stack
and explode. Would be nice if we could catch that before runtime. :/

The new interface to EncodeInternal() is protected, since it should
never be called from the outside.

Was unable to mark the old EncodeInternal() as RTC_DEPRECATED, since the
default implementaion of the new variant needs to call it to work around
old implementations. The old Encode() variant is deprecated, at least.

Added a test for backwards compatibility in audio_encoder_unittest.cc.
For the added test I broke out MockEncodeHelper from
audio_encoder_copy_red_unittest.cc and renamed it MockAudioEncoderHelper.

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

Cr-Commit-Position: refs/heads/master@{#11823}
2016-03-01 08:41:39 +00:00
kwiberg
91d9756bc6 Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/codecs/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11613}
2016-02-14 09:10:08 +00:00
Peter Kasting
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
kjellander@webrtc.org
3c652b6746 modules/audio_coding: Remove some codec include dirs
Also clean up some include_dir entries and update the few
references to them with absolute include paths instead.
Finally fixed a few lint errors and invalid header guards.

None of these are used downstream.

BUG=webrtc:5095
TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_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
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10700}
2015-11-18 22:08:46 +00:00
kwiberg
288886b2ec Pass audio to AudioEncoder::Encode() in an ArrayView
Instead of in separate pointer and size arguments.

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

Cr-Commit-Position: refs/heads/master@{#10535}
2015-11-06 09:21:39 +00:00
henrikg
91d6edef35 Add RTC_ prefix to (D)CHECKs and related macros.
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#9964}
2015-09-17 07:24:51 +00:00
kwiberg
c99ebc1490 Remove AudioEncoder methods SetMaxBitrate and SetMaxPayloadSize
And the corresponding ACM methods SetISACMaxRate and
SetISACMaxPayloadSize. They were only used in tests.

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

Cr-Commit-Position: refs/heads/master@{#9903}
2015-09-09 07:54:10 +00:00
kwiberg
3f5f1c2ad3 Change return type of AudioEncoder::SetMaxPlaybackRate to void
There's no point in returning a status code, since the max playback rate
is only a suggestion that the encoder is free to disregard.

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

Cr-Commit-Position: refs/heads/master@{#9900}
2015-09-09 06:15:41 +00:00
kwiberg
e9e7896293 Turn webrtc::Vad into a pure virtual interface
Review URL: https://codereview.webrtc.org/1317243005

Cr-Commit-Position: refs/heads/master@{#9899}
2015-09-09 06:04:57 +00:00
kwiberg
12cfc9b4da Fold AudioEncoderMutable into AudioEncoder
It makes more sense to combine the two interfaces, since there wasn't
a clear line separating them. The result is a combined interface with
just over a dozen methods, half of which need to be implemented by
every subclass, while the other half have sensible (and trivial)
default implementations and are implemented only by the few subclasses
that need non-default behavior.

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

Cr-Commit-Position: refs/heads/master@{#9894}
2015-09-08 12:57:59 +00:00
Peter Kasting
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
Henrik Lundin
3e89dbf458 Add AudioEncoder::GetTargetBitrate
The GetTargetBitrate implementation will return the
target bitrate of the codec. This may differ from the
desired target bitrate, as set by SetTargetBitrate, depending on implementation.

Tests are updated to exercise the new functionality.

R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9461}
2015-06-18 12:58:46 +00:00
Peter Kasting
f045e4da43 Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that
currently only works correctly with signed types work safely regardless of the
signedness of the types in question.  This is preparation for a future change
that will convert a variety of types to size_t.

There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants.

BUG=none
R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=ajm

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

Cr-Commit-Position: refs/heads/master@{#9413}
2015-06-11 04:15:51 +00:00
Henrik Lundin
367c868c99 AudioEncoderCng: Handle case where speech encoder is reset
Previously, AudioEncoderCng required the speech encoder to not change
its mind regarding the number of 10 ms frames in the next packet
between calls to AudioEncoderCng::EncodeInternal()---specifically, it
could handle an upward but not a downward adjustment. With this patch,
it can handle a downward adjustment too, by simply saving the
overshoot data for the next call to EncodeInternal().

It will still not handle the case where the encoder's reported number
of 10 ms frames in the next packet is inconsistent with the behavior
of its Encode() function when called with no intervening changes to
the encoder.

R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53469005

Cr-Commit-Position: refs/heads/master@{#9261}
2015-05-22 13:13:24 +00:00
jmarusic@webrtc.org
9afaee74ab Reland 8749: AudioEncoder: return EncodedInfo from Encode() and EncodeInternal()
Old review at:
https://webrtc-codereview.appspot.com/43839004/

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45769004

Cr-Commit-Position: refs/heads/master@{#8788}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8788 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-19 08:51:20 +00:00
tommi@webrtc.org
019955d770 Revert 8749 "We changed Encode() and EncodeInternal() return typ..."
The reason is that this cl adds a static initializer so we can't roll webrtc into Chromium.
See audio_encoder.cc and 'sizes' regression here:
http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/186

> We changed Encode() and EncodeInternal() return type from bool to void in this issue:
> https://webrtc-codereview.appspot.com/38279004/
> Now we don't have to pass EncodedInfo as output parameter, but can return it instead. This also adds the benefit of making clear that EncodeInternal() needs to fill in this info.
> 
> R=kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/43839004

TBR=jmarusic@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49449004

Cr-Commit-Position: refs/heads/master@{#8772}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8772 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-18 06:38:40 +00:00
jmarusic@webrtc.org
0cb612b43b We changed Encode() and EncodeInternal() return type from bool to void in this issue:
https://webrtc-codereview.appspot.com/38279004/
Now we don't have to pass EncodedInfo as output parameter, but can return it instead. This also adds the benefit of making clear that EncodeInternal() needs to fill in this info.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43839004

Cr-Commit-Position: refs/heads/master@{#8749}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8749 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-17 12:13:13 +00:00
jmarusic@webrtc.org
51ccf37638 AudioEncoder: add method MaxEncodedBytes
Added method AudioEncoder::MaxEncodedBytes() and provided implementations in derived encoders. This method returns the number of bytes that can be produced by the encoder at each Encode() call.
Unit tests were updated to use the new method.
Buffer allocation was not changed in AudioCodingModuleImpl::Encode(). It will be done after additional investigation.
Other refactoring work that was done, that may not be obvious why:
1. Moved some code into AudioEncoderCng::EncodePassive() to make it more consistent with EncodeActive().
2. Changed the order of NumChannels() and  RtpTimestampRateHz() declarations in AudioEncoderG722 and AudioEncoderCopyRed classes. It just bothered me that the order was not the same as in AudioEncoder class and its other derived classes.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40259005

Cr-Commit-Position: refs/heads/master@{#8671}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8671 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-10 15:42:21 +00:00
henrik.lundin@webrtc.org
c86bbbaa93 Add speech flag to EncodedInfo
The flag indicates if the encoded bitstream is speech or comfort noise.

COAUTHOR=kwiberg@webrtc.org
R=jmarusic@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42629004

Cr-Commit-Position: refs/heads/master@{#8598}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8598 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 16:03:19 +00:00
jmarusic@webrtc.org
b1f0de30be AudioEncoder: change Encode and EncodeInternal return type to void
After code cleanup done on issues:
https://webrtc-codereview.appspot.com/34259004/
https://webrtc-codereview.appspot.com/43409004/
https://webrtc-codereview.appspot.com/34309004/
https://webrtc-codereview.appspot.com/34309004/
https://webrtc-codereview.appspot.com/36209004/
https://webrtc-codereview.appspot.com/40899004/
https://webrtc-codereview.appspot.com/39279004/
https://webrtc-codereview.appspot.com/42099005/
and the similar work done for AudioEncoderDecoderIsacT,  methods AudioEncoder::Encode and AudioEncoder::EncodeInternal will always succeed. Therefore, there is no need for them to return bool value that represents success or failure.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38279004

Cr-Commit-Position: refs/heads/master@{#8518}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8518 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 15:38:46 +00:00
jmarusic@webrtc.org
f88791d783 AudioEncoderCng: CHECK that encode calls don't fail
Calls to WebRtcCng_Encode, AudioEncoder::Encode and Vad::VoiceActivity fail only if fed bad input, so instead of handling failure, we can just CHECK. This also makes it unnecessary for methods AudioEncoderCng::EncodePassive and AudioEncoderCng::EncodeActive to return a value, so we can make them void.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39279004

Cr-Commit-Position: refs/heads/master@{#8475}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8475 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-24 14:59:19 +00:00
kwiberg@webrtc.org
0521127779 AudioEncoder: Rename virtual accessors to CamelCase
Although sample_rate_hz(), num_channels(), and rtp_timestamp_rate_hz()
are simple accessors for almost all implementations of AudioEncoder,
they are virtual and not guaranteed to be just simple accessors. Thus,
it makes more sense to use the normal CamelCase naming scheme.

BUG=4235
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34239004

Cr-Commit-Position: refs/heads/master@{#8407}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8407 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-18 12:01:13 +00:00
henrik.lundin@webrtc.org
bb1219eca3 Add a unit test for callbacks with empty frames and fix bug in code
This change adds a couple of new tests that verify that callbacks
with frame type kFrameEmpty are sent in between comfort noise packets.
This used to be the case until r8268, and with the fix included in
this CL is once again so.

COAUTHOR=kwiberg@webrtc.org
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37229004

Cr-Commit-Position: refs/heads/master@{#8353}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8353 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-12 15:53:55 +00:00
henrik.lundin@webrtc.org
8bb32d600b Minor updates to AudioEncoderCng
Removing sample_rate_hz_ from AudioEncoderCng and from the config
struct. The sample rate will now be read from the underlying speech
codec.

BUG=3926
COAUTHOR:kwiberg@webrtc.org

R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40559004

Cr-Commit-Position: refs/heads/master@{#8173}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8173 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-27 20:54:22 +00:00
henrik.lundin@webrtc.org
478cedc055 Add new methods to AudioEncoder interface
The following three methods are added:
rtp_timestamp_rate_hz()
SetTargetBitrate()
SetProjectedPacketLossRate()

Default implementations are provided, and a few overrides are
implemented. AudioEncoderCopyRed and AudioEncoderCng propagate the new
methods to the underlying speech codec.

BUG=3926
COAUTHOR:kwiberg@webrtc.org

R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34049004

Cr-Commit-Position: refs/heads/master@{#8171}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8171 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-27 18:25:40 +00:00
henrik.lundin@webrtc.org
3b79daff14 Moving encoded_bytes into EncodedInfo
BUG=3926
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7883 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-12 13:31:24 +00:00
henrik.lundin@webrtc.org
ff1a3e36bd Make an AudioEncoder subclass for comfort noise
BUG=3926
R=bjornv@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31129004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7857 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-10 07:29:08 +00:00