Commit 7e0c7d49 ("Add support for external encoders in ACM") changed
things around so that we no longer recreate the speech encoder when
adding CNG or RED to an existing encoder. This isn't correct, since
those two expect to be in sync with the speech encoder they work with.
Solve the problem by resetting the speech encoder before hooking in
RED or CNG.
BUG=crbug/490368
R=jmarusic@webrtc.orgTBR=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53589004
Cr-Commit-Position: refs/heads/master@{#9307}
The purpose of the tool is to analyze the output from the command line
tool rtp_analyze. That is, starting with an rtpdump or pcap file, it
is processed through rtp_analyze to produce a text output, which is
then used as input to this new Matlab function.
BUG=2692
TBR=tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47339004
Cr-Commit-Position: refs/heads/master@{#9306}
If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.
The CL also adds locking for libsrtp initialization / shutdown.
BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47319004
Cr-Commit-Position: refs/heads/master@{#9300}
This change instroduces a mode where the Accelerate operation will be
more aggressive. When enabled, it will allow acceleration at lower
correlation levels, and possibly remove multiple pitch periods at
once.
The feature is enabled through NetEq::Config, and is off by
default. This means that bit-exactness tests are currently not
affected.
A unit test was added for the Accelerate class, with and without fast
mode enabled.
BUG=4691
R=minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50039004
Cr-Commit-Position: refs/heads/master@{#9295}
This avoids a deadlock in WebRtcVideoCapturer.
The deadlock could occur because OnIncomingFrame() has the |critical_section_stopping_| lock, which could block a Stop() on the |start_thread_|. When OnIncomingFrame() then tries to do synchronous invoke on |start_thread_| (before releasing said lock) we have a deadlock.
BUG=4670
R=magjed@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47259004
Cr-Commit-Position: refs/heads/master@{#9294}
Changed the WebRtcVad_Create() function to the more conventional format of returning the handle directly instead of an error code to take care of.
In addition NULL was changed to nullptr in the files where it applied.
Affected components:
* AGC
* VAD
* NetEQ
BUG=441, 3347
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51919004
Cr-Commit-Position: refs/heads/master@{#9291}
uint32_t parameters don't need to be passed by reference. The
VCMJitterBuffer destructor doesn't need to be virtual because the
class has no virtual methods.
R=stefan@webrtc.org
BUG=none
Review URL: https://webrtc-codereview.appspot.com/55499004
Cr-Commit-Position: refs/heads/master@{#9288}
The previous script only looked up the LKGR and generated a
commit message. This CL renames the script and makes it update
the DEPS file, commit locally, upload CL and send tryjobs.
BUG=4688
R=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50079004
Cr-Commit-Position: refs/heads/master@{#9284}
In my previous cl, https://webrtc-codereview.appspot.com/52479004/, there is 'UnLock()' left when we switched to scoped lock, which will cause TSan warning sometimes.
===========================================================
WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (pid=9981)
#0 pthread_mutex_unlock <null> (libjingle_peerconnection_unittest+0x00000046836f)
#1 webrtc::CriticalSectionPosix::Leave() webrtc/system_wrappers/source/critical_section_posix.cc:39:10 (libjingle_peerconnection_unittest+0x000000bc368d)
#2 ~CriticalSectionScoped webrtc/system_wrappers/interface/critical_section_wrapper.h:46:48 (libjingle_peerconnection_unittest+0x000000a61fcb)
#3 webrtc::AudioDeviceLinuxPulse::RecThreadProcess() webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc:3003 (libjingle_peerconnection_unittest+0x000000a61fcb)
===========================================================
BUG=3056
TEST=bots
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/56439004
Cr-Commit-Position: refs/heads/master@{#9282}
BUG=4690
I have removed methods in VoE interfaces that were marked to be removed. I have removed them also in fake and mock implementations. I have also updated the callers in various ways:
1. Project win_test had some calls to the removed methods, but it turned out that the project is not used anymore, so I removed it entirely.
2. There were some calls to removed methods in jni methods. I have removed couple of jni methods as now they seem to do nothing.
3. With the remaining callers I just removed the calls to removed methods.
R=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53519004
Cr-Commit-Position: refs/heads/master@{#9281}
It looks like our basictypes.h file in the overrides folder is including the file it is overriding due to include path precedence (Chrome's is lower than WebRTCs).
TBR=henrika@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51909004
Cr-Commit-Position: refs/heads/master@{#9280}
Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).
Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.
Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py
TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.
R=henrika@webrtc.org, phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50069004
Cr-Commit-Position: refs/heads/master@{#9274}
Having nice CL descriptions that explains what a roll of
chromium_revision in WebRTC's DEPS file actually changes is
useful to save time tracing down breakages.
This script can be used to generate such CL descriptions.
In the future it might be used for a complete auto-rolling
solution for this.
BUG=4688
R=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/27889004
Cr-Commit-Position: refs/heads/master@{#9270}
This is being done in preparation of moving base/logging.* to rtc_base_approved. base/stream.* has libjingle dependencies that webrtc can't use, so logging.* can't depend on streams. It does look like stream.* isn't used much, so cleaning that up as well as cleaning up usage of the actual stream support (now LogStream) in the logging code, is in order, but I'll leave that to another cl.
BUG=
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/54529004
Cr-Commit-Position: refs/heads/master@{#9269}
I wanted to use Config::Get in Chromium code, but it triggered the following
warning:
../../third_party/webrtc/common.h:89:20: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
static const T def;
^
../../third_party/webrtc/common.h:110:10: note: in instantiation of function template specialization requested here
return default_value<T>();
^
I assume we don't hit this in webrtc because the warning is disabled.
This also switches to the RTC_ prefix from the deprecated LIBJINGLE_.
Needed due to this Chromium CL:
https://codereview.chromium.org/1148843004/R=andresp@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53459004
Cr-Commit-Position: refs/heads/master@{#9268}
tl;dr - non-continuous frames (due to padding) would get stuck as incomplete if the previous complete frame arrived and was decoded before the padding arrived.This fix re-checks the incomplete frame list for continuous frames after old packets arrive.
When padding is enabled and RTX is not, padding is sent as empty RTP packets tacked onto the end of completed frames (meaning: same timestamp, but after a packet with the marker bit set). Given the following set of circumstances, codified in the new unit test method, a frame can get permanently stuck in the incomplete frames list:
- Frame A decoded (packets 94-95). Next expected sequence number is 96.
- Frame C arrives (packets 100-101) and is marked complete. It isn't continuous, since it starts at 100, so it's placed in the incomplete frame list.
- Frame B arrives (packets 96-97) and is complete, since 97 has a marker bit. Turns out that packets 98-99 are padding, but the receiver doesn't know that.
- Frame B is decoded, removed from the decodable frames list, and last decoded state is updated.
- Packets 98-99 arrive. They hit the IsOldPacket check and update the last decoded state, but they don't trigger FindAndInsertContinuousFrames.
- Further packets/frames arrive and complete, but FindAndInsertContinuousFrames only runs on frames that are newer than the newly completed frame.
In this state, Frame C is permanently stuck as incomplete, so the jitter buffer overall is stuck until max NACK age (default: 450 packets), the max NACK list size (default: 200 packets), or a keyframe arrives and IsContinuous returns true for the keyframe.
(Before the November refactoring, Frame B wouldn't have to have been decoded for the bug to trigger; just having a complete continuous frame at any time before the padding arrived would cause this state, as FindAndInsertContinuousFrames was only called when the frame originally became continuous and was inserted into the decodable frames list. Post refactoring, the frame is removed/re-added to the decodable list on every padding packet that arrives)
BUG=
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50959004
Cr-Commit-Position: refs/heads/master@{#9264}
Because of the Finch experiment, this will not affect Chrome's behaviour at all.
The SNRs in AudioProcessingTest.Formats were only increased to the next multiple of 5.
BUG=webrtc:3146
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/43359004
Cr-Commit-Position: refs/heads/master@{#9263}
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}
1. move channel number of input file to the base class
2. limit channel number to be 1, since the resampler support only mono at the moment
3. adding a logging function
4. adding more switch to neteq_opus_quality_test
BUG=2692
R=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47239004
Cr-Commit-Position: refs/heads/master@{#9260}
This fixes a bug where, if the VideoCapturer failed to start under certain circumstances, the capture manager would cause a callback saying that the capturer stopped even though it never started in the first place. A VERIFY check in VideoSource::SetState would then cause a crash since the state was set to kEnded when it was already in state kEnded (SetState only allows being called when the state changes).
I only noticed this bug while doing a mistake in a separate CL. Not sure how to reliably reproduce said bug on a working build, but I have previously had camera hardware issues where it couldn't start the camera which resulted in the SetState kEnded -> kEnded crash. Hopefully this will fix that.
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51039004
Cr-Commit-Position: refs/heads/master@{#9259}