Commit Graph

8594 Commits

Author SHA1 Message Date
Peter Boström
3548dd2154 Set local SSRCs on receivers added before senders.
Addresses bug where a receiver would report SSRC 1 even though the
endpoint has sending streams.

BUG=4678
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9262}
2015-05-22 16:48:13 +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
Minyue Li
f761d10393 Update NetEq Quality Test.
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}
2015-05-22 09:21:58 +00:00
Henrik Boström
915df4fc30 CaptureManager: Don't stop a capturer at UnregisterVideoCapturer if it did not start in the first place.
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}
2015-05-22 07:43:10 +00:00
Fredrik Solenberg
9a416bd14e Get rid of unnecessary Terminate() method and worker_thread_ from WebRtcVideoEngine2
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9258}
2015-05-22 07:03:48 +00:00
jackychen
5af6d47d26 Code style change for quality_scaler.
TBR=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9257}
2015-05-21 21:11:14 +00:00
jackychen
98d8cf58ee Hardware VP8 encoding: Use QP as metric for resize.
Add vp8 frame header parser to get QP from vp8 bitstream.

BUG= 4273
R=glaznev@webrtc.org, marpan@google.com, pbos@webrtc.org
TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9256}
2015-05-21 18:11:53 +00:00
Joachim Bauch
5fdcdf66d0 Enable ciphers to get ECDHE with NSS.
With this change, DTLS 1.0 uses "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
DTLS 1.2 uses "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256".

BUG=chromium:428343
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9255}
2015-05-21 16:05:58 +00:00
Joachim Bauch
6f2ef74b42 Keep track of DTLS packet sizes to prevent partial reads.
The current use of rtc::FifoBuffer can lead to reading across DTLS packet
boundaries which could cause packets to not being processed correctly.

This CL introduces the new class rtc::BufferQueue and changes the
StreamInterfaceChannel to use it instead of the rtc::FifoBuffer.

BUG=chromium:447431
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9254}
2015-05-21 15:51:41 +00:00
Magnus Jedvert
a3ba0c7f5a RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits
This CL change the function declaration from uint16_t to size_t, and CHECKs that the size fits in uint16_t before proceeding.

BUG=484432
R=tommi@webrtc.org

Committed: https://crrev.com/10022cdeae785187e1d4329042b4ed294c393a16
Cr-Commit-Position: refs/heads/master@{#9246}

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

Cr-Commit-Position: refs/heads/master@{#9253}
2015-05-21 15:39:00 +00:00
Peter Boström
36a1438a66 Remove ViEFrameProviderBase.
BUG=1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9252}
2015-05-21 15:00:05 +00:00
Peter Thatcher
af55ccc054 Add RtcpMuxPolicy support to PeerConnection.
BUG=4611
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9251}
2015-05-21 14:48:19 +00:00
Yuriy Shevchuk
02ff9117b5 Feature merge request:
Add support for iOS http proxy detection

R=pthatcher@webrtc.org, tkchin@webrtc.org

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

Patch from Yuriy Shevchuk <youwrk@gmail.com>.

Cr-Commit-Position: refs/heads/master@{#9250}
2015-05-21 11:50:41 +00:00
henrika
523183b4aa Disables AudioDeviceTest.StartStopPlayout for Nexus 9 only
BUG=4682
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9249}
2015-05-21 11:42:47 +00:00
Peter Boström
280ed11493 Roll gtest-parallel.
Includes modifications by kwiberg@ to reduce line spam by not printing
all passing tests and running previously-failing tests first.

BUG=
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9248}
2015-05-21 11:25:15 +00:00
Magnus Jedvert
848d524879 Revert "RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits" https://webrtc-codereview.appspot.com/47229004/
Reason for revert: Breaks Chromium FYI compilation

This reverts commit 10022cdeae.

BUG=484432
TBR=tommi

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

Cr-Commit-Position: refs/heads/master@{#9247}
2015-05-21 11:25:04 +00:00
Magnus Jedvert
10022cdeae RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits
This CL change the function declaration from uint16_t to size_t, and CHECKs that the size fits in uint16_t before proceeding.

BUG=484432
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9246}
2015-05-21 09:40:35 +00:00
Peter Boström
78ae00eea2 Remove default encoder/decoders.
This path is not used, senders/receivers already disable default coders.

BUG=1695
R=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9245}
2015-05-21 07:56:17 +00:00
Peter Boström
b302ad4eab Remove unused VideoDecoder methods.
Removing VideoDecoder::Copy() and
VideoDecoder::SetCodecConfigParameters().

Also adding override to VP8DecoderImpl.

BUG=
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9244}
2015-05-21 07:42:14 +00:00
Brave Yao
1a07a1e825 Solve data race in Pulse audio implementation.
BUG=3056, 1320
TEST=AutoTest

Mainly add threadchecker and remove unnecessary lock.
And some more styling working.
- audio_device_pulse_linux.cc: wrap lines longer than 80 chars. And add '.' to some comments around. Not do it to all places.
- audio_mixer_manager_pulse_linux.cc: Here I adopt some chromium practice. We use to do many things to the failure of pulse operation, which causes most of the data race issue. In chromium, if we failed to call any pulse function, we just fail it w/o use the previous results. Here I did same. Please check if it's good.

R=bjornv@webrtc.org, henrika@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9243}
2015-05-21 04:42:24 +00:00
mflodman
8602a3db73 Cast to avoid char-interpretation of uint8_t in logs.
The uint8_t in the log string is interpreted as a char, causing a
character to be logged if the loss is non-zero and terminates the string
with a '\0' in the zero case.

R=sprang@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9242}
2015-05-20 22:54:21 +00:00
Alejandro Luebs
05c760533f Add resampling support in AudioBuffer::DeinterleaveFrom
It is necessary for adding 48kHz support to the AudioProcessing::AnalyzeReverseStream int interface (It was not necessary for 32kHz since in that case the splitting filter is more efficient).

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9241}
2015-05-20 21:39:17 +00:00
Tommi
76b62ff1ad Clean up now-unused code that was used for libpeerconnection.[so|dll].
BUG=chromium:463660
R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9240}
2015-05-20 20:36:42 +00:00
Fredrik Solenberg
fce324272d Remove linphonemediaengine.*
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9239}
2015-05-20 18:40:22 +00:00
Sergey Ulanov
8eb76ff32a Make SHA1 computation thread-safe.
Previously SHA1Transform() kept a static buffer. As result SHA1 was not
always computed correctly when running that code in parallel on multiple
threads. That was causing spurious messages about invalid Message
Integrity attribute when running some tests in chromoting.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9238}
2015-05-20 18:25:21 +00:00
Andrew MacDonald
5cdd7024d0 Add tools/vim to .gitignore.
TBR=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9237}
2015-05-20 16:04:22 +00:00
henrika
9b2b40231d Ensures that RECORD_AUDIO permission is required to start recording.
Avoids existing crash and ensures that error message is passed up to Libjingle. Will lead to the following logcat output:

E/libjingle(31404): Error(channel.cc:1514): Failed to SetSend 2 on voice channel

BUG=b/21273153
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9236}
2015-05-20 14:08:44 +00:00
henrika
5779d14321 Avoids crash when StartRecording conflicts with existing recording application
BUG=b/21066709
R=hbos@webrtc.org, magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9235}
2015-05-20 14:06:49 +00:00
Peter Boström
c3f4dbc40b Remove rtp_rtcp/ dump functionality.
Removes RTP dumping from VideoEngine and VoiceEngine.

BUG=1695
R=henrika@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9234}
2015-05-20 12:10:56 +00:00
Peter Boström
ca667dbfdd Remove VCM debug recordings.
BUG=1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9233}
2015-05-20 11:47:26 +00:00
Joachim Bauch
831c5585c7 Allow setting maximum protocol version for SSL stream adapters.
This CL adds an API to SSL stream adapters to set the maximum allowed
protocol version and with that implements support for DTLS 1.2.
With DTLS 1.2 the default cipher changes in the unittests as follows.

BoringSSL
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

NSS
TLS_RSA_WITH_AES_128_CBC_SHA -> TLS_RSA_WITH_AES_128_GCM_SHA256

BUG=chromium:428343
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9232}
2015-05-20 10:48:24 +00:00
André Susano Pinto
664cdafb8a Replace assert() with static_assert() if the condition is evaluatable at
compile time.

The condition of static_assert() is evaluated at compile time which is safer and
more efficient.

Note that static_assert() requires C++11.

The changes were generated by the misc-static-assert ClangTidy check by alexfh@google.com

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9231}
2015-05-20 09:11:02 +00:00
Joachim Bauch
5ca688b3da Enable read-ahead on OpenSSL DTLS stream adapters.
Prevent multiple BIO reads when reading header and body but read from
internal OpenSSL buffer where possible.

BUG=chromium:447431
R=davidben@chromium.org, juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9230}
2015-05-20 08:40:03 +00:00
Tommi
931e6583b2 Remove unnecessary dependencies for voe when building with include_internal_audio_device==0.
In particular and practical terms, this avoids pulling in AudioDeviceModuleImpl and associated classes, in Chrome.

BUG=
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9229}
2015-05-20 07:44:23 +00:00
Andrew MacDonald
cb7f8ce2df Clear ARM NEON flag
Merge WEBRTC_ARCH_ARM64_NEON and WEBRTC_ARCH_ARM_NEON into one
WEBRTC_HAS_NEON.
Replace WEBRTC_DETECT_ARM_NEON by WEBRTC_DETECT_NEON.
Replace WEBRTC_ARCH_ARM by WEBRTC_ARCH_ARM64 for arm64 cpu.

BUG=4002
R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org

Change-Id: I870a4d0682b80633b671c9aab733153f6d95a980

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

Cr-Commit-Position: refs/heads/master@{#9228}
2015-05-20 05:20:04 +00:00
Peter Boström
4d71edef45 Add HW fallback option to software encoding.
Permits falling back to software encoding for unsupported resolutions.

BUG=chromium:475116, chromium:487934
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9227}
2015-05-19 21:09:17 +00:00
Donald E Curtis
97bce58ed9 Disable the EXPECT_DEATH check in bitbuffer on Android
BUG=4364
R=noahric@chromium.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9226}
2015-05-19 20:17:40 +00:00
Donald E Curtis
bf560ddf91 remove filelock which is now unused
R=pthatcher@webrtc.org

Committed: https://crrev.com/5ece00f7fa15407314aa27ae5c262a86f004468a
Cr-Commit-Position: refs/heads/master@{#9222}

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

Cr-Commit-Position: refs/heads/master@{#9225}
2015-05-19 20:14:41 +00:00
Guo-wei Shieh
17b889b899 Issue 4366: Adapted frames have wrong width and height and are cropped.
When a frame being stretched, the original rotation information is lost. This is to ensure it's carried over.

Also removed StretchToBuffer function as it's not called and dangerous.

BUG=4366
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9224}
2015-05-19 19:45:26 +00:00
Andrew MacDonald
65de7d266c Add a link to tools/vim to use the Chromium YCM config with webrtc.
The YCM plugin needs build configuration to enable the Clang-based
completion engine for C++ code. This is provided by the tools/vim
directory, but it expects to be in the same checkout as the file under
edit.

To use, follow the directions here:
https://code.google.com/p/chromium/codesearch#chromium/src/tools/vim/chromium.ycm_extra_conf.py

External YCM plugin:
https://github.com/Valloric/YouCompleteMe

google3 use:
go/ycm

R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9223}
2015-05-19 18:37:22 +00:00
Donald E Curtis
5ece00f7fa remove filelock which is now unused
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9222}
2015-05-19 18:07:02 +00:00
Alex Glaznev
2f5be9ad63 Improve Android camera error handling.
- Set Camera.ErrorCallback callback when opening camera to
receive camera server error notifications.
- Allow user to provide interface for handling camera errors
happening on camera thread.
- Run camera observer on camera thread and monitor camera fps
and amount of callback buffers, print statistics and report error
if camera stops generating frames.
- Query camera formats starting from front camera instead of back
camera to detect camera failures as fast as possible.
- Change all DCHECK to CHECK in androidvideocapturer.cc to detect
camera error on release builds.
- Plus adding some extra logging.

R=hbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9221}
2015-05-19 17:56:22 +00:00
Tommi
68898a2652 Remove AudioDeviceUtility.
The class doesn't do anything in almost all cases except for grabbing and releasing locks + allocate memory.  There are a couple of methods there such as WaitForKey and GetTimeInMs that are used, but those methods aren't specific to audio and we have implementations of these elsewhere.  The third method, StringCompare isn't used anywhere (and also isn't specific to audio).

BUG=
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9220}
2015-05-19 15:27:50 +00:00
Tommi
df0c05b047 Sort source file list for [rtc_]include_internal_audio_device. No code change.
TBR=henrika@webrtc.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#9219}
2015-05-19 13:30:24 +00:00
henrika
c2b63fe1f6 Adding Sony Xperia Z2 D6503 to HW AEC blacklist
BUG=b/21264352
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9218}
2015-05-19 12:07:04 +00:00
henrika
24e56e3ee8 Fixes Chromium FYI build issue on Android.
See https://build.chromium.org/p/chromium.webrtc.fyi/waterfall?builder=Android%20Builder%20(dbg) for details

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9217}
2015-05-19 09:48:36 +00:00
Fredrik Solenberg
ccb49e79fd Remove Soundclip handling from libjingle.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9216}
2015-05-19 09:37:39 +00:00
Guo-wei Shieh
1ab67aef80 Address the corner cases
1. when an IP is reported by DNS but it doesn't serve any traffic, we shouldn't count failure from that.
2. shared socket mode should should only be true for the case where multiple IPs are resolved and successfully pinged.
3. allow multiple STUN servers now.

Fix a bug in symnat detection. SymNAT will provide the same IP but different port.

If we have more than 1 srflx IP, we'll fail the experiment.

BUG=4576
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9215}
2015-05-19 04:36:06 +00:00
Weiyong Yao
b92be45c85 Support 720P in portait as maximum on iOS.
BUG=4643
TEST=Manual Test and trybots
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9214}
2015-05-19 02:53:07 +00:00
Alejandro Luebs
8db8069660 Change high frequency correction range
From 6kHz-6.5kHz to 3kHz-5kHz. Previous range had unreliable mask values, letting high frequencies from all directions through. The new range is wider and lower, which results in better estimates.

R=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9213}
2015-05-19 01:19:39 +00:00