Commit Graph

1071 Commits

Author SHA1 Message Date
f4081ab8d8 Revert "Avoid acquiring VCM::_receiveCritSect during decode callback."
This reverts commit aa3528a9cd65b176b9d6f9d58cecb1068891dca4.

BUG=http://crbug.com/170345
TEST=libjingle_peerconnection_unittest
TBR=stefan,wu

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4510 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-09 04:42:51 +00:00
a717ee9962 Avoid acquiring VCM::_receiveCritSect during decode callback.
When VideoDecoder::Decode, Reset, or Release is called,
VideoCodingModuleImpl::_receiveCritSect may have been
acquired. Decode callback needs to acquire the same lock
in ViEChannel::FrameToRender. It is not a problem for
SW decode because decode callback is run on the same
WebRTC decoding thread and the lock is re-entrant. But
for HW decode, decode callback is run on a thread different
from WebRTC decoding thread. Decode callback gets the locks
in the opposite order. Deadlock can happen.

BUG=http://crbug.com/170345
TEST=Try apprtc.appspot.com/?debug=loopback on ARM Chromebook Daisy.
R=stefan@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4509 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-09 04:08:38 +00:00
64799da6c6 Allowing decoding with errors, when disabling nack.
BUG=1897
R=stefan@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4508 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-08 22:45:33 +00:00
e270331481 Fix duplicate code
R=pwestin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4507 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-08 22:23:48 +00:00
58d76cb635 Delete Channels without ChannelManager lock.
Triggered Helgrind error, as deleting a Channel will also unregister a
module which has called GetChannel(), resulting in a cyclic lock graph.
This change will also allow other threads to access the ChannelManager
instance while Channels are deleted.

R=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4505 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-08 17:32:21 +00:00
bd21fb5f8d Adding call to Opus PLC
NetEq will call the PLC function in Opus only to set the decoder state. The actual PLC data will not be used.

BUG=https://code.google.com/p/webrtc/issues/detail?id=1181
R=tterribe@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4504 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-08 11:01:07 +00:00
d177c10e2d Added logic for kSelectiveErrors to VCMJitterBuffer and corresponding unit tests.
R=marpan@google.com, mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4503 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-08 01:12:33 +00:00
676ff1ed89 Ref-counted rewrite of ChannelManager.
The complexity of the last ChannelManager and potentially usage of it as well caused race conditions and deadlocks in loopback voe_auto_test. This ref-counted solution takes no long-term locks, uses less locks overall and is significantly easier to understand.

ScopedChannel has been split up into a ChannelOwner with a reference to a channel and an Iterator over ChannelManager. Previous code was really used for both things. ChannelOwner is used as a shared pointer to a channel object, while an Iterator should work as expected.

BUG=2081
R=tommi@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4502 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-07 17:57:36 +00:00
a165d9c0a4 Code formatting on files touched in r4447.
BUG=
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4500 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-07 14:17:05 +00:00
401ef361ac Added configuration of max delay to ACM and NetEq
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4499 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 21:01:36 +00:00
c4e1ab515b Added Decoding with errors API to video_coding.h and removed unused DecodeError enum.
R=marpan@google.com, mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4497 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 18:27:41 +00:00
0fc2558503 Add turaj@webrtc.org to NetEq owners.
R=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4496 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 17:07:18 +00:00
94aca5c7de Disabled flaky HardwareTest.BuiltInWasapiAECWorksForAudioWindowsCoreAudioLayer.
TBR=xians@webrtc.org
BUG=2179

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4495 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 08:20:47 +00:00
bd69d1beaf Disabled SsrcPropagatesCorrectly on Linux.
BUG=2178
TBR=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4494 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 08:03:16 +00:00
7bb5436e5d Better error treatment in NetEqImpl::InsertPacketInternal()
BUG=webrtc:1364
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4493 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 05:40:57 +00:00
9721db799c removed NetEq::EnableDtmf()
BUG=webrtc:1373
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4492 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 05:36:26 +00:00
9dba525627 * Update libjingle to 50389769.
* Together with "Add texture support for i420 video frame." from
wuchengli@chromium.org.
https://webrtc-codereview.appspot.com/1413004

RISK=P1
TESTED=try bots
R=fischman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4489 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 20:36:57 +00:00
f696f253b2 Invert dependency between webrtc_utility and media_file targets to reflect reality.
BUG=2166
R=henrike@webrtc.org, niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4488 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 18:45:19 +00:00
9b8861c358 Updated WebRTC version number to 3.38
R=wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4487 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 17:19:16 +00:00
12dc1a38ca Switch C++-style C headers with their C equivalents.
The C++ headers define the C functions within the std:: namespace, but
we mainly don't use the std:: namespace for C functions. Therefore we
should include the C headers.

BUG=1833
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4486 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 16:22:53 +00:00
ccdcbae177 Fix implicit int->bool conversion in VideoSendStream::DeliverRtcp.
BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4484 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 13:25:51 +00:00
4052370e89 Use RtpHeaderParser in VideoCall implementation.
BUG=1827
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4483 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 12:49:22 +00:00
bbb07e69e5 Glue code and tests for NACK in new VideoEngine API.
The test works by randomly dropping small bursts of packets until enough
NACKs have been sent back by the receiver. Retransmitted packets are
never dropped in order to assure that all packets are eventually
delivered. When enough NACK packets have been received and all dropped
packets retransmitted, the test waits for the receiving side to send a
number of RTCP packets without NACK lists to assure that the receiving
side stops sending NACKs once packets have been retransmitted.

BUG=2043
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4482 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 12:01:36 +00:00
7fb9ce0cf5 Fix send times in video_full_stack.
BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4481 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 09:29:50 +00:00
735a7c8b93 Add back is.FrameProvider() call lost in r4194.
BUG=2119
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4480 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 09:03:03 +00:00
2cbb429323 Remove redundant conditions key.
Gives an error when gyp is run with CHROMIUM_GYP_SYNTAX_CHECK=1.

TBR=henrike

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4478 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 20:52:54 +00:00
7df9706a01 Add one API for implementing Initial delay.
R=minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4475 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 18:07:13 +00:00
89c674053e Adds all unittests to android NDK-APK framework.
BUG=N/A
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4474 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 16:53:47 +00:00
51b2459d37 Add some virtual and OVERRIDEs in webrtc/common_audio/
BUG=163
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4473 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 11:44:38 +00:00
9162080527 Fix some chromium-style warnings in webrtc/modules/audio_processing/
BUG=163
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4472 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 11:44:11 +00:00
17758e96c5 Fix crash in DesktopRegion::Intersect().
BUG=crbug.com/266933
R=alexeypa@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4468 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-01 19:51:04 +00:00
a2a2718a6c Fix some chromium-style warnings in webrtc/system_wrappers/
BUG=163
R=henrike@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4464 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-01 17:26:15 +00:00
a7e360e89b Removed lines preventing simultaneous kHardNack and decoding with errors. Also made changes recommended by gcl lint (with the exception of changing non-const references to pointers).
Propagated orthogonal API for decoding with errors from VideoCodingModule to VCMJitterBuffer.
Modified VCMJitterBuffer to allow three error modes: kNoErrors, kSelectiveErrors, kWithErrors.

R=marpan@google.com, mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4463 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-01 03:15:08 +00:00
d3ae3c7b1f Unbreak clang/android build of webrtc.
TESTED=All target builds once more with clang=1.
R=wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4460 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 23:53:07 +00:00
d4412feeb0 Adding possibility to use encoding time when trigger underuse for frame based overuse detection.
BUG=
TEST=Added unittest.
R=asapersson@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4452 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:42:21 +00:00
09e8c47ee5 Merge r4374 from stable to trunk.
r4374 was mistakenly committed to stable, so this is to re-merge back to trunk.

Store the sequence number in StopSend() and resume it in StartSend().

When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().Store the sequence number in StopSend() and resume it in StartSend().

When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().

This patch fixes this problem by storing the sequence number in StopSend(), and
resume it in StartSend(). So that we can remove the workaround in libjingle.

BUG=2102
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4451 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:30:19 +00:00
8fff1f065e Merge r4394 from stable to trunk.
r4326 was mistakenly committed to stable, so this is to re-merge back to trunk.

Fixed the AGC and interface problems on the new path.

In order to make the AGC work properly, we need to cache the volume value passed
by the callback, compare it with the value returned by
shared->transmit_mixer()->CaptureLevel(). If they are the same, we need to
return 0 to indicate no volume needs changing, otherwise return the new volume.
By doing this, we avoid setting the volume all the same, which allows the users
to change the volume manually.

This patch also fixes some minor issues with the interfaces too: make the int
channel[] const, and correct the order of the input params in
channel::Demultiplex.

R=tommi@webrtc.org

BUG=[2134]
TEST=compile && manual AGC test

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4450 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:27:42 +00:00
2f84afad30 Merge r4326 from stable to trunk.
r4326 was mistakenly committed to stable, so this is to re-merge back to trunk.

Add new interface to support multiple sources in webrtc.
CaptureData() will be called by chrome with a flag |need_audio_processing| to
indicate if the data needs to be processed by APM or not. Different from the old
interface that will send the data to all voe channels, the new interface will
specify a list of voe channels that the data is demultiplexing to.

R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4449 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:23:37 +00:00
7126b38d8f Handel zero correlation if at the same time distortion is also zero.
This is the conversation I had with Henrik Lundin regarding this problem.

Me:
In Expand::AnalyseSignal() we compute correlation and distortion, then calculate the ratio of correlation to distortion. There if distortion is zero we expect that correlation to be zero. Although in practice this might be true, I suppose we rarely hit into absolutely periodic signal, but in one of the tests the assertion in line 455 of expand.cc was triggered. The distortion is computed over a shorter length of the signal, while correlation is computed over longer segments. Therefore, I guess, if the signal has just enough zeros at the beginning we can end up in situation that distortion is zero but not the correlation. Do you agree? I didn't have time to attempt to solve this, but if my line of thought is correct, we should not have that assert. Perhaps, if correlation is zero we set the ratio to 0, otherwise, ratio would be the largest value of its own type. Any thoughts?

Henrik:
I agree with you. Go ahead with your solution.

R=minyue@google.com

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4448 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 16:05:09 +00:00
2d1a55caed Add some virtual and OVERRIDEs in webrtc/modules/audio_coding/
BUG=163
TBR=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4447 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:54:00 +00:00
e72428442d Fix some chromium-style warnings in webrtc/modules/desktop_capture/
BUG=163
R=sergeyu@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4446 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:32:43 +00:00
0193158634 Fix some chromium-style warnings in webrtc/modules/pacing/
BUG=163
R=pwestin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4445 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:18:19 +00:00
f3e4ceee47 Fix some chromium-style warnings in webrtc/modules/rtp_rtcp/
BUG=163
R=pwestin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4444 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:17:19 +00:00
8f23df51d4 Fix some chromium-style warnings in webrtc/modules/remote_bitrate_estimator/
BUG=163
R=pwestin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4443 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:16:52 +00:00
4fac8a4699 Fix some chromium-style warnings in webrtc/modules/bitrate_controller/
BUG=163
R=pwestin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4442 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 15:16:20 +00:00
a96d8771f2 Added libjingle_peerconnection_java_unittest to buildbot_tests.py
The test apparently needs a custom LD_PRELOAD, so I made the script capable of handling custom environments.

TBR=kjellander@webrtc.org
BUG=1796

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4441 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 10:50:30 +00:00
0a4ca8f0bb Move internal aec_core defines out of header.
TBR=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4440 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-31 08:13:08 +00:00
fd7e3c52d8 Correcting Turaj's email.
TBR=minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4432 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-30 17:25:07 +00:00
7f7162a003 Fix some chromium-style warnings in webrtc/modules/video_coding/
BUG=163
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4429 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-30 15:18:31 +00:00
e6c3966530 Fix some chromium-style warnings in webrtc/test/
BUG=163
R=phoglund@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4428 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-30 13:08:38 +00:00