Commit Graph

913 Commits

Author SHA1 Message Date
5b659c0d10 Special-case android-arm64 in codec bitexactness tests
We already had a special case for android, but it only worked for arm32.

BUG=webrtc:4198, webrtc:4199

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

Cr-Commit-Position: refs/heads/master@{#10989}
2015-12-11 15:34:05 +00:00
cb23c0d984 Adding Opus to RTPencode.
As a step toward fixing webrtc:3987, here we update the RTPencode to allow Opus RTP payloads.

BUG=webrtc:3987, webrtc:2692

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

Cr-Commit-Position: refs/heads/master@{#10987}
2015-12-11 09:58:31 +00:00
4d68208a20 Reduce the runtime of some ACM tests in modules_tests
By reducing the length of the audio input, the total runtime of
$ out/Debug/modules_tests --gtest_filter=AudioCodingModuleTest.*
is reduced by more than 10x, when run single-threaded.

The PCMFile helper class is extended with a FastForward method (to
skip initial silence in the test files) and a limiter on how much to
read.

BUG=webrtc:2463
R=ivoc@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10973}
2015-12-10 15:24:50 +00:00
866df6602c Typo fix: Enable a bunch of tests that were accidentally disabled
They were meant to be run if we have either iSAC float or fix, but the
typo made them run for just float.

BUG=webrtc:4198, webrtc:4199

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

Cr-Commit-Position: refs/heads/master@{#10969}
2015-12-10 12:20:06 +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
e10c82dc12 Deletes temporary files that are generated in several ACM unittests.
This applies to AcmSwitchingOutputFrequencyOldApi.*,
AcmReceiverBitExactnessOldApi.* and AcmSenderBitExactnessOldApi.*.

BUG=webrtc:4647
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#10936}
2015-12-08 13:03:32 +00:00
d7b7ae8bda Add encode/decode time tracing to audio_coding.
Also removes virtual from VideoDecoder::Decode and updated mocks and
tests accordingly to use VideoDecoder::DecodeInternal instead.

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

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

Cr-Commit-Position: refs/heads/master@{#10935}
2015-12-08 12:41:44 +00:00
325b34542d There was an old scaling for CNG 48 kHz in the code, from the time where Audio Coding Module didn't have full 48 kHz support. This CL removes the scaling.
The bug hasn't caused us any problems, since we don't run CNG together with Opus (our only real 48 kHz codec), but would cause problems if used with PCB16b @ 48 kHz.

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

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

Cr-Commit-Position: refs/heads/master@{#10929}
2015-12-08 09:13:08 +00:00
d048aa0e64 Make the audio codecs' GN targets self-sufficient
Also running "gn format" on the file.

R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10886}
2015-12-03 16:47:35 +00:00
dfbb3a4bfc Simplify CodecManager::RegisterEncoder()
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10855}
2015-12-01 12:45:09 +00:00
19822d63c1 audio_coding: Cleanup duplicated headers after "main" removal.
In https://codereview.webrtc.org/1481493004/ some duplicated headers
were left to make it possible to update downstream without breakage.
Now that's done and we can remove these to avoid confusion.

BUG=webrtc:5095
TBR=henrik.lundin@webrtc.org, kwiberg@webrtc.org
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

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

Cr-Commit-Position: refs/heads/master@{#10829}
2015-11-27 18:55:49 +00:00
8c38e8b9b9 Clean up PlatformThread.
* Move PlatformThread to rtc::.
* Remove ::CreateThread factory method.
* Make non-scoped_ptr from a lot of invocations.
* Make Start/Stop void.
* Remove rtc::Thread priorities, which were unused and would collide.
* Add ::IsRunning() to PlatformThread.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10812}
2015-11-26 16:45:57 +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
9cd5c8ca79 Move the FEC enabling logic from CodecManager to Rent-A-Codec
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10785}
2015-11-25 09:25:14 +00:00
989b4abcf3 Move the stereo-disables-CNG logic from CodecManager to Rent-A-Codec
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10784}
2015-11-25 09:19:19 +00:00
12411ef40e Move ThreadWrapper to ProcessThread in base.
Also removes all virtual methods. Permits using a thread from
rtc_base_approved (namely event tracing).

BUG=webrtc:5158
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10760}
2015-11-23 22:48:01 +00:00
057fb89f83 Add new method AcmReceiver::last_packet_sample_rate_hz()
This change allows us to delete AcmReceiver::last_audio_codec_id().

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10756}
2015-11-23 16:19:58 +00:00
d89814bfd7 NetEq: Add new method last_output_sample_rate_hz
This change moves the logics for keeping track of the last ouput
sample rate from AcmReceiver to NetEq, where it fits better. The
getter function AcmReceiver::current_sample_rate_hz() is renamed to
last_output_sample_rate_hz().

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10754}
2015-11-23 14:49:31 +00:00
1379f1f1e6 Extract the parameters for the encoder stack from the CodecManager
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10750}
2015-11-23 12:30:56 +00:00
672304a654 NetEq: Remove overly verbose logging
This change removes all LS_VERBOSE logs that will print once every
packet or more often.

TBR=pbos@webrtc.org
BUG=webrtc:5227

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

Cr-Commit-Position: refs/heads/master@{#10733}
2015-11-20 19:57:11 +00:00
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
223692aa85 Remove dead code
Review URL: https://codereview.webrtc.org/1452153003

Cr-Commit-Position: refs/heads/master@{#10692}
2015-11-18 16:27:56 +00:00
e1a27d48ad Move CNG/RED payload type extraction to Rent-A-Codec
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10691}
2015-11-18 15:32:57 +00:00
9a7c838ec4 Adding stddef.h to opus_inst.h.
This is to prevent size_t from undefined. This does not happen in current WebRTC since the sources that opus_inst.h gets used have proper definitions. But it would be good to add the definition in itself.

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

Cr-Commit-Position: refs/heads/master@{#10653}
2015-11-16 16:07:04 +00:00
e155ae671c Move CNG and RED management into the Rent-A-Codec
This leaves CodecOwner without a job, so we eliminate it.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10650}
2015-11-16 12:50:02 +00:00
ee2bac26dd AcmReceiver::InsertPacket and NetEq::InsertPacket: Take ArrayView arguments
Instead of separate pointer and size arguments.

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

Cr-Commit-Position: refs/heads/master@{#10606}
2015-11-11 18:34:07 +00:00
4dc941128f CodecManager::RegisterEncoder: Call SetFec on new encoder, not old
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10604}
2015-11-11 16:34:28 +00:00
be57983f4b Rename Maybe to Optional
And add examples of good and bad usage to the documentation.

R=aluebs@webrtc.org, henrik.lundin@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10588}
2015-11-10 21:34:32 +00:00
ed8275a44f CodecManager: Eliminate the stereo_send_ member
It can be computed from other members, notably the current encoder's
number of channels.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10585}
2015-11-10 17:47:41 +00:00
c95c366f5a Move the Rent-A-Codec™ from CodecOwner to CodecManager
Future CLs will move it even further down the stack.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10580}
2015-11-10 14:35:28 +00:00
805fc710f7 Let Rent-A-Codec™ create and own speech encoders
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10575}
2015-11-10 12:05:23 +00:00
3cea256806 Reland "Prevent Opus DTX from generating intermittent noise during silence"
The original CL is reviewed at
https://codereview.webrtc.org/1415173005/

A silly mistake was made at the last patch set, and the CL was reverted. This CL is to fix and reland it.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#10574}
2015-11-10 11:49:32 +00:00
b4a753fdb5 Revert of Prevent Opus DTX from generating intermittent noise during silence (patchset #10 id:250001 of https://codereview.webrtc.org/1415173005/ )
Reason for revert:
Breaks voe_auto_test on all three "large tests bots".
https://build.chromium.org/p/client.webrtc/builders/Win32%20Release%20%5Blarge%20tests%5D/builds/5630/steps/voe_auto_test/logs/stdio
https://build.chromium.org/p/client.webrtc/builders/Mac32%20Release%20%5Blarge%20tests%5D/builds/5599/steps/voe_auto_test/logs/stdio
https://build.chromium.org/p/client.webrtc/builders/Linux64%20Release%20%5Blarge%20tests%5D/builds/5645/steps/voe_auto_test/logs/stdio

Notice these bots are no longer a part of the default trybot set, so they have to be run manually when working with code that affects their tests (they were removed as they queued up all the time in the CQ, and usually don't catch breakages).

Original issue's description:
> Prevent Opus DTX from generating intermittent noise during silence.
>
> Opus may have an internal error that causes this. Here we make a workaround by adding some small disturbance to the input signals to break a long sequence of zeros.
>
> BUG=webrtc:5127
>
> Committed: https://crrev.com/f475add57eada116bc960fe2935876ec8c077977
> Cr-Commit-Position: refs/heads/master@{#10565}

TBR=tina.legrand@webrtc.org,kwiberg@webrtc.org,solenberg@webrtc.org,minyue@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5127

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

Cr-Commit-Position: refs/heads/master@{#10567}
2015-11-09 21:27:11 +00:00
f475add57e Prevent Opus DTX from generating intermittent noise during silence.
Opus may have an internal error that causes this. Here we make a workaround by adding some small disturbance to the input signals to break a long sequence of zeros.

BUG=webrtc:5127

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

Cr-Commit-Position: refs/heads/master@{#10565}
2015-11-09 18:08:20 +00:00
39d8bee397 Make ACMCodecDB private to RentACodec
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10549}
2015-11-07 00:22:50 +00:00
d6c0f8cac1 Remove ACMCodecDB::Codec, and make the rest of ACMCodecDB private
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10546}
2015-11-06 22:28:08 +00:00
fb3d8b3df2 Remove ACMCodecDB::CodecFreq
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10536}
2015-11-06 09:24:16 +00:00
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
93a2febe73 Move ACMCodecDB::ValidPayloadType to RentACodec
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10525}
2015-11-05 15:39:42 +00:00
98cc88c873 Correctly handle the error case where the CodecId has a negative value
Negative values should be treated the same as too-large positive values: by returning an empty Maybe.

TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10509}
2015-11-04 17:56:22 +00:00
ff761fba82 modules: more interface -> include renames
This changes the following module directories:
* webrtc/modules/audio_conference_mixer/interface
* webrtc/modules/interface
* webrtc/modules/media_file/interface
* webrtc/modules/rtp_rtcp/interface
* webrtc/modules/utility/interface

To avoid breaking downstream, I followed this recipe:
1. Copy the interface dir to a new sibling directory: include
2. Update the header guards in the include directory to match the style guide.
3. Update the header guards in the interface directory to match the ones in include. This is required to avoid getting redefinitions in the not-yet-updated downstream code.
4. Add a pragma warning in the header files in the interface dir. Example:
#pragma message("WARNING: webrtc/modules/interface is DEPRECATED; "
                "use webrtc/modules/include")
5. Search for all source references to webrtc/modules/interface and update them to webrtc/modules/include (*.c*,*.h,*.mm,*.S)
6. Update all GYP+GN files. This required manual inspection since many subdirectories of webrtc/modules referenced the interface dir using ../interface etc(*.gyp*,*.gn*)

BUG=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 -m tryserver.webrtc

R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10500}
2015-11-04 07:32:04 +00:00
4b938e5c69 Hide ACMCodecDB::database_ behind accessors
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10498}
2015-11-03 20:38:31 +00:00
1fd4a4ab35 Let AudioCodingModule::SendCodec return Maybe<CodecInst>
And deal with the consequences thereof...

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

Cr-Commit-Position: refs/heads/master@{#10497}
2015-11-03 19:20:57 +00:00
de94d08d57 Hide ACMCodecDB::codec_settings_ behind an accessor
BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#10494}
2015-11-03 13:46:14 +00:00
5eb9d57883 Re-enable PCAP reading in neteq_rtpplay
Reading of PCAP (Wireshark) files was not possible due to a bug in the
parsing of files. This change fixes that by adding new validator methods
to RtpFileSource that can be used to determine the input file type.

R=ivoc@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10490}
2015-11-03 08:32:12 +00:00
678c903eb2 Delete AcmReceiver::SetInitialDelay
This method is no longer called. With that gone, a number of other
methods and member variables are obsoleted, and removed.

Methods deleted:
AcmReceiver::InsertStreamOfSyncPackets
AcmReceiver::GetNumSyncPacketToInsert()
AcmReceiver::GetSilence, never called

Member variables deleted:
missing_packets_sync_stream_
late_packets_sync_stream_
av_sync_
initial_delay_manager_

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10484}
2015-11-02 16:31:30 +00:00
1d5c9bd800 Remove unused method AcmReceiver:RedPayloadType
BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10481}
2015-11-02 12:46:35 +00:00
9bc2667fa6 ACM/NetEq: Restructure how post-decode VAD is enabled
This change avoids calling neteq_->EnableVad() and DisableVad from the
AcmReceiver constructor. Instead, the new member
enable_post_decode_vad is added to NetEq's config struct. It is
disabled by defualt, but ACM sets it to enabled. This preserves the
behavior both of NetEq stand-alone (i.e., in tests) and of ACM.

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10476}
2015-11-02 11:26:03 +00:00
74f0f3551e Delete a chain of methods in ViE, VoE and ACM
The end goal is to remove AcmReceiver::SetInitialDelay. This change is
in preparation for that goal. It turns out that
AcmReceiver::SetInitialDelay was only invoked through the following
call chain, where each method in the chain is never referenced from
anywhere else (except from tests in some cases):

ViEChannel::SetReceiverBufferingMode
-> ViESyncModule::SetTargetBufferingDelay
-> VoEVideoSync::SetInitialPlayoutDelay
-> Channel::SetInitialPlayoutDelay
-> AudioCodingModule::SetInitialPlayoutDelay
-> AcmReceiver::SetInitialDelay

The start of the chain, ViEChannel::SetReceiverBufferingMode was never
referenced.

This change deletes all the methods above except
AcmReceiver::SetInitialDelay itself, which will be handled in a
follow-up change.

BUG=webrtc:3520

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

Cr-Commit-Position: refs/heads/master@{#10471}
2015-11-01 19:43:38 +00:00
a41ab9326c Switch usage of _DEBUG macro to NDEBUG.
http://stackoverflow.com/a/29253284/5237416

BUG=None
R=tommi@webrtc.org
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#10468}
2015-10-30 23:08:54 +00:00