Commit Graph

854 Commits

Author SHA1 Message Date
bd7de0c6ef Delete full-band mode from the iSAC codec
This mode is no longer used.

BUG=4210

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

Cr-Commit-Position: refs/heads/master@{#10275}
2015-10-14 13:06:00 +00:00
06b869f11a Delete iSAC-fb from NetEq
This is no longer used. Related code in the iSAC codec itself will be
deleted a follow-up CL.

BUG=4210

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

Cr-Commit-Position: refs/heads/master@{#10272}
2015-10-14 10:44:59 +00:00
9ea2147e5c Delete iSAC-fb from AudioCodingModule
This is no longer used. Related code in NetEq and the iSAC codec itself
will be deleted in follow-up CLs.

BUG=4210

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

Cr-Commit-Position: refs/heads/master@{#10264}
2015-10-13 13:28:04 +00:00
301aaed813 Update to the RtcEventLog protobuf to remove the DebugEvent message.
This CL restructures the RtcEventLog protobuf format, by removing the DebugEvent message. This is done by moving the LOG_START and LOG_END events to the EventType enum and making a seperate message for audio playout events. In addition to these changes, some fields were added to the AudioReceiveConfig and AudioSendConfig messages, but these are for future use and are not currently logged yet.

This is a follow-up to CL 1340283002 which adds a SSRC to AudioPlayout events in the RtcEventLog.

BUG=webrtc:4741
R=henrik.lundin@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10221}
2015-10-08 16:07:53 +00:00
98ab3a46d6 Don't link with audio codecs that we don't use
We used to link with all audio codecs unconditionally (except Opus);
this patch makes gyp and gn only link to the ones that are used.

This unfortunately fails to have a measurable impact on Chromium
binary size, at least on x86_64 Linux; it turns out that iLBC and iSAC
fix were already being excluded from Chromium by some other means,
likely just the linker omitting compilation units with no incoming
references.

(This was previously landed as revisions 10046 and 10060, and got
reverted because it broke several of the Chromium FYI bots.)

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#10127}
2015-10-01 04:54:29 +00:00
6ba8e4a4f2 ACM: Remove a few local enums that were no longer used
BUG=webrtc:3520
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10114}
2015-09-30 08:59:36 +00:00
fb9e76369d Remove last use of ACMAMRPackingFormat
It was no-op used in FileRecorder.

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10102}
2015-09-29 06:30:31 +00:00
4b808eee85 ACM: Remove unused and deprecated types
None of these were used.

BUG=webrtc:3520
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10090}
2015-09-28 13:52:56 +00:00
1bd0e03ce5 ACM: Removing runtime APIs related to playout mode
The playout mode in NetEq can still be set through the constructor
configuration.

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10089}
2015-09-28 13:12:21 +00:00
82d6f2a3f7 ACM: Remove ACMVQMonCallback object
It was never used, and the underlying functionality was removed long
ago.

BUG=3520
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10083}
2015-09-28 08:25:33 +00:00
d6d27e7340 Update isolate.gypi to support Swarming + move .isolate files
This updates the isolate.gypi copies we have to maintain in our
code repo to Chromium's revision 310ea93.
The changes about generating .isolated.gen.json files are needed
to support running with Swarming (https://www.chromium.org/developers/testing/isolated-testing)

Since isolated testing is now using a new launch script
in tools: isolate_driver.py, that's added to our links
script.

In order to use isolate_driver.py, the .isolate files must be in the
same directory as the test_name_run target is defined, which meant
I had to move around some of the isolate files and targets below
webrtc/modules.

BUG=497757
R=maruel@chromium.org
TBR=henrik.lundin@webrtc.org, mflodman@webrtc.org, niklas.enbom@webrtc.org
TESTED=Clobbered trybots:
git cl try -c --bot=linux_compile_rel --bot=mac_compile_rel --bot=win_compile_rel --bot=android_compile_rel --bot=ios_rel -m tryserver.webrtc

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

Cr-Commit-Position: refs/heads/master@{#10081}
2015-09-25 20:19:21 +00:00
702f39726b GN: Do not use forward_dependent_configs_from variable.
It is deprecated and public_deps should be used instead, which will have
the
same effect.

BUG=None
R=brettw@chromium.org,kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10074}
2015-09-25 12:57:47 +00:00
5c389d3e09 Split webrtc/video into webrtc/{audio,call,video}.
Moves audio_receive_stream.{h,cc} into webrtc/audio, and common parts
into webrtc/call, splitting out audio/shared components with separate
OWNERS files.

BUG=webrtc:4690
R=solenberg@webrtc.org, tina.legrand@webrtc.org
TBR=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10073}
2015-09-25 11:58:39 +00:00
3fd7be4cb1 Revert of Don't link with audio codecs that we don't use (patchset #4 id:60001 of https://codereview.webrtc.org/1349393003/ )
Reason for revert:
Breaking Chromium FYI bots.

Original issue's description:
> Don't link with audio codecs that we don't use
>
> We used to link with all audio codecs unconditionally (except Opus);
> this patch makes gyp and gn only link to the ones that are used.
>
> (This unfortunately fails to have a measurable impact on Chromium
> binary size, at least on x86_64 Linux; it turns out that iLBC and iSAC
> fix were already being excluded from Chromium by some other means
> (likely just the linker omitting compilation units with no incoming
> references).)
>
> BUG=webrtc:4557
>
> Committed: https://crrev.com/f66a9251424351ea6d631c54dd1feb64cc13d809
> Cr-Commit-Position: refs/heads/master@{#10046}

TBR=henrik.lundin@webrtc.org,tina.legrand@webrtc.org,kjellander@webrtc.org,kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#10069}
2015-09-25 08:36:11 +00:00
a53e383d7d Revert of CodecOwner: Don't look at definitions for classes we don't link with (patchset #1 id:1 of https://codereview.webrtc.org/1364233002/ )
Reason for revert:
Breaking Chromium FYI bots.

Original issue's description:
> CodecOwner: Don't look at definitions for classes we don't link with
>
> It's good hygiene and just generally the right thing to do. And
> apparently at least sometimes required by Microsoft's compiler.
>
> Committed: https://crrev.com/f4d38ea57aa739b525066b095468cb4af1d2799b
> Cr-Commit-Position: refs/heads/master@{#10060}

TBR=henrik.lundin@webrtc.org,tommi@webrtc.org,kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#10068}
2015-09-25 08:31:01 +00:00
574d5daa6d CodecOwner::SetEncoders: Return error code when given bad arguments
Instead of FATAL on a bad codec specification, log and return an error
code. This is a band-aid until callers are taught to only give it good
specifications.

BUG=webrtc:5033, chromium:526478

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

Cr-Commit-Position: refs/heads/master@{#10066}
2015-09-25 05:54:00 +00:00
f4d38ea57a CodecOwner: Don't look at definitions for classes we don't link with
It's good hygiene and just generally the right thing to do. And
apparently at least sometimes required by Microsoft's compiler.

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

Cr-Commit-Position: refs/heads/master@{#10060}
2015-09-24 17:21:02 +00:00
ec249d4eae ACMCodecDB: Remove unused stuff, and move private stuff to anonymous namespace
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10048}
2015-09-24 11:32:11 +00:00
f66a925142 Don't link with audio codecs that we don't use
We used to link with all audio codecs unconditionally (except Opus);
this patch makes gyp and gn only link to the ones that are used.

(This unfortunately fails to have a measurable impact on Chromium
binary size, at least on x86_64 Linux; it turns out that iLBC and iSAC
fix were already being excluded from Chromium by some other means
(likely just the linker omitting compilation units with no incoming
references).)

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#10046}
2015-09-24 10:18:48 +00:00
6d92bf59f3 Returning correct duration estimate on Opus DTX packets.
Bug 4985 revealed two flaws
1. Opus duration estimate did not return correct length for DTX packets,

2. NetEq DoCodecInternalCng did not assign enough buffer.

P.S.
Generalizing problem 1, current NetEq decode function checks memory size by calling the duration estimate function. This is not ideal. A better way is to let codec's decode function to receive buffer size and return failure if it is not enough. This can be made in a separate CL.

BUG=webrtc:4985
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10031}
2015-09-23 13:20:56 +00:00
8967183bf7 Simple cleanups of AudioDecoder and AudioEncoder classes
* Make sure they're all final and don't allow copying or assignment.

  * Get rid of the single-channel PCM decoder classes.

  * Move some includes from .h to .cc files where possible.

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#10021}
2015-09-22 21:06:34 +00:00
7404368998 Move AudioDecoderIsac* to its own files
Currently, it's sitting in AudioEncoderIsac*'s files, which is less
than obvious. This CL puts the encoder and decoder in separate files
together with the C implementation; CLs are afoot to make it so for
the other built-in codecs as well.

BUG=webrtc:4557
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10018}
2015-09-22 17:31:52 +00:00
6faf5bebba Move AudioDecoderPcm* next to AudioEncoderPcm*
All AudioDecoder subclasses have historically lived in NetEq, but they
fit better with the codec they wrap.

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#10015}
2015-09-22 13:16:56 +00:00
2803a40fe3 Fix ChromeOS build (C99 break)
BUG=5016
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9992}
2015-09-18 14:50:50 +00:00
e510d7f100 Remove ACM AudioCodingFeedback callback object and derived classes
The callback object was not used anymore. Also removing the deprecated
WEBRTC_DTMF_DETECTION macro from engine_configurations.h.

BUG=3520

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

Cr-Commit-Position: refs/heads/master@{#9988}
2015-09-18 10:56:15 +00:00
061b79af60 ACM: Remove functions related to DTMF
The functions were essentially no-op. Also removing forward declaration
of ACMDTMFDetection, which was not used.

BUG=3520

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

Cr-Commit-Position: refs/heads/master@{#9982}
2015-09-18 08:29:17 +00:00
11d583f414 Fix a bug in RtpFileSource related to RTCP packets in rtpdump files
According to http://www.cs.columbia.edu/irt/software/rtptools/#rtpdump,
RTCP packets are marked with plen==0. In this class, plen is mapped to
original_length, not length.

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

Cr-Commit-Position: refs/heads/master@{#9981}
2015-09-18 08:28:14 +00:00
ae856f2c9f Added support for logging the SSRC corresponding to AudioPlayout events.
To do this, the logging of this event was moved from the ACM to
VoiceEngine Channel. A new LogAudioPlayoutEvent function was added on
the RtcEventLog interface, and the LogDebugEvent function was removed
since it is no longer being used.

BUG=webrtc:4741
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, kwiberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9972}
2015-09-17 14:34:15 +00:00
ada4c130ab Move AudioDecoderG722 next to AudioEncoderG722
All AudioDecoder subclasses have historically lived in NetEq, but they
fit better with the codec they wrap.

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#9966}
2015-09-17 10:12:38 +00:00
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
c0ac6cad00 Move AudioDecoderPcm16B next to AudioEncoderPcm16B
All AudioDecoder subclasses have historically lived in NetEq, but they
fit better with the codec they wrap.

BUG=webrtc:4557
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9963}
2015-09-17 05:47:55 +00:00
fff9f176f5 Move AudioDecoderIlbc next to AudioEncoderIlbc
All AudioDecoder subclasses have historically lived in NetEq, but they
fit better with the codec they wrap.

BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#9961}
2015-09-17 04:26:39 +00:00
1f9baab753 Remove the preprocessor symbol WEBRTC_CODEC_AVT (it was always defined)
BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#9960}
2015-09-17 02:29:51 +00:00
844a91081e Remove the preprocessor symbol WEBRTC_CODEC_PCM16 (it was always defined)
BUG=webrtc:4557

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

Cr-Commit-Position: refs/heads/master@{#9955}
2015-09-16 16:42:26 +00:00
3c089d751e Add RTC_ prefix to contructormagic 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.

* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS

Related CL: https://codereview.webrtc.org/1335923002/

BUG=chromium:468375
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#9953}
2015-09-16 12:37:52 +00:00
0b05879cd7 Move AudioDecoderOpus next to AudioEncoderOpus
All AudioDecoder subclasses have historically lived in NetEq, but they
fit better with the codec they wrap.

BUG=webrtc:4557
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9944}
2015-09-15 15:28:29 +00:00
7bff85c2bc Android: Enable C99 mode instead of C89 (default).
BUG=webrtc:4960
TESTED=Built locally using GYP and GN for Android.
R=andrew@webrtc.org, brettw@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#9937}
2015-09-15 06:16:11 +00:00
39720f2669 ACM CodecOwner: Test that we reset speech encoder when enabling CNG or RED
If we don't, we'll end up crashing if they're enabled when the speech
encoder is in the middle of encoding a packet, since CNG and RED
assume that the speech encoder starts out with an empty buffer
(because they need to be in sync with it).

BUG=chromium:490368

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

Cr-Commit-Position: refs/heads/master@{#9917}
2015-09-10 12:44:52 +00:00
9b66d3ba60 MockAudioEncoder: Use a dedicated marker method for test expectations
This makes the sequence of expected calls easier to read. Also, we can
save one line and get rid of a gmock warning by expecting the
MockAudioEncoder object to be destroyed at the end of the test instead
of making a final marker call.

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

Cr-Commit-Position: refs/heads/master@{#9916}
2015-09-10 12:09:49 +00:00
942a699f14 AudioEncoderOpusTest.PacketLossRateOptimized: Fix bug and make prettier
Fix bug 4981, which caused the second half (decreasing loss rates) to
not test anything. In the process, the test is changed slightly to
make it less dependent on the exact rounding behavior of doubles (by
not testing exactly at the the points where the effective loss rate
goes through a step---just very very close). A bunch of symbolic
constants are also replaced with easy-to-read literal numbers.

BUG=4981

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

Cr-Commit-Position: refs/heads/master@{#9908}
2015-09-09 13:43:04 +00:00
77d22fa014 Merge two files with AudioEncoderOpus tests
Merge the contents of audio_encoder_mutable_opus_test.cc into
audio_encoder_opus_unittest.cc, since they're now both testing
AudioEncoderOpus.

(While preparing this CL, I noted a bug in the PacketLossRateOptimized
test. This CL leaves that test essentially unchanged; I've posted bug
4981 about the problem.)

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

Cr-Commit-Position: refs/heads/master@{#9906}
2015-09-09 11:38:37 +00:00
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
b04965ccf8 Hooked up RtcEventLog. It lives in Voice Engine and pointers are propagated to ACM and Call.
An option was added to voe_cmd_test to make a RtcEventLog dump.

BUG=webrtc:4741

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

Cr-Commit-Position: refs/heads/master@{#9901}
2015-09-09 07:09:49 +00:00
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
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
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
caa5f4b3d2 Update to the neteq_rtpplay utility to support RtcEventLog input files.
This CL adds support for simulating neteq using stored RTP packets as well as calls to GetAudio from an RtcEventLog, using the stored timestamps.
The type of the input file is detected automatically.
BUG=webrtc:4741

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

Cr-Commit-Position: refs/heads/master@{#9886}
2015-09-08 10:28:53 +00:00
81db11aa50 copy-red: Fill an rtc::Buffer with bytes the easy way
The easy way also happens to be more efficient if we have to
reallocate, but that's a minor concern here.

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

Cr-Commit-Position: refs/heads/master@{#9876}
2015-09-08 03:14:40 +00:00
6aae75728a On FATAL, log which unsupported encoder the caller wanted us to create
Hopefully, this will make it easier to figure out what's wrong the
next time this happens.

BUG=526478

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

Cr-Commit-Position: refs/heads/master@{#9844}
2015-09-02 12:05:06 +00:00
05f71fcb61 NetEq: Fixing a corner case with depleted sync buffer
In some cases, the number of samples (per channel) in NetEq's sync
buffer could fall below the allowed minimum (5 samples for narrowband,
scaling for other rates). If the number of samples extracted from the
buffer was smaller than the desired number, an error is
returned. However, if the decoder returns fewer samples than expected,
it could happen that the sync buffer level falls under the minimum,
but enough samples are extracted. This triggered an assert. With this
change, the minimum level of the sync buffer is always enforced.

A test is implemented to trigger the problem. It made the assert fire
without this fix, but it now passes.

BUG=webrtc:4840
R=minyue@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9828}
2015-09-01 09:52:06 +00:00