Commit Graph

9329 Commits

Author SHA1 Message Date
1c3dd38cb8 Android: Fix memory leak for remote MediaStream
BUG=webrtc:4892
R=glaznev@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9797}
2015-08-27 11:40:09 +00:00
7391881f97 Revert of Added send-thresholding and fixed text packet dumping. (patchset #4 id:160001 of https://codereview.webrtc.org/1266033005/ )
Reason for revert:
The CL adds a global variable.

Original issue's description:
> Added send-thresholding and fixed text packet dumping.  Also a little squelch for the over-max-MTU log spam we see in there.
>
> BUG=https://code.google.com/p/webrtc/issues/detail?id=4468
> R=pthatcher@chromium.org, pthatcher@webrtc.org
>
> Committed: d838d27919

TBR=pthatcher@webrtc.org,bemasc@webrtc.org,pthatcher@chromium.org,thakis@chromium.org,lally@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/webrtc/issues/detail?id=4468

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

Cr-Commit-Position: refs/heads/master@{#9796}
2015-08-27 11:30:04 +00:00
fdac516510 Disallow simulcast for H.264.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#9795}
2015-08-27 08:59:32 +00:00
d82819892a Replaces SSLIdentity* with scoped_refptr<RTCCertificate> in the cricket::Transport layer.
Why the replacements? Mainly two reasons:
1) RTCCertificate owns the identity and as long as things are referencing the identity there should be a scoped_refptr reference to the RTCCertificate. Handing out raw pointers is less memory safe.
2) With the latest RFC, an RTCCertificate should be sufficient for specifying a crypto cert and the code should be updated to use RTCCertificate instead of SSLIdentity directly.

This replace work is split up into multiple CLs. In this CL...
- WebRtcSessionDescriptionFactory is updated to use RTCCertificate over SSLIdentity.
- WebRtcSessionDescriptionFactory::SignalCertificateReady is connected to WebRtcSession::OnCertificateReady and WebRtcSession is updated to use RTCCertificate.
- The cricket::Transport and related classes are updated to use RTCCertificate. These are called from WebRtcSession::OnCertificateReady.

BUG=webrtc:4927
R=tommi@webrtc.org, torbjorng@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9794}
2015-08-27 08:12:37 +00:00
d83df50e95 Use RtcpPacket to send TMMBN in RtcpSender
BUG=webrtc:2450

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

Cr-Commit-Position: refs/heads/master@{#9793}
2015-08-27 08:05:12 +00:00
c47a01d647 Fix AppRTCDemo crash when room is connected after PC is destroyed.
Also move VideoRendererGui.dispose() to the section with public API.

BUG=4909
R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9792}
2015-08-26 23:02:29 +00:00
13d35f6ffc Add check to prevent TURN usage if the protocol is not allowed.
There are 2 ways to design this.

1. TCP Only mode: this means that we disable all UDP protocols across board.
2. disallow TURN over UDP. Along with DISABLE_UDP, DISABLE_STUN, we should achieve the same result.

I'm going with #2.

BUG=webrtc:4784
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9791}
2015-08-26 22:33:03 +00:00
2f20fbec1d Fix MIPS compile.
BUG=chromium:524885
TEST=none
TBR=turaj

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

Cr-Commit-Position: refs/heads/master@{#9790}
2015-08-26 21:38:55 +00:00
0163fb2ad7 AudioCodingModuleImpl::Encode: Use a Buffer instead of a stack-allocated array
The Buffer is saved between calls, so after the initial allocation
it'll already be allocated and of the right size. The stack-allocated
array had the advantage of requiring no heap allocation at all, but
for most popular encoders it ended up allocating about 15 kB too much,
and now that we allow user-defined encoders there was also the
(remote) possibility that the buffer would actually be too small.

R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9789}
2015-08-26 18:24:31 +00:00
d838d27919 Added send-thresholding and fixed text packet dumping. Also a little squelch for the over-max-MTU log spam we see in there.
BUG=https://code.google.com/p/webrtc/issues/detail?id=4468
R=pthatcher@chromium.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9788}
2015-08-26 17:15:29 +00:00
3318f984cd VideoFrameBuffer: Make non-const data access explicit
VideoFrameBuffer currently has two overloaded data() functions for pixel access, one for const and one for non-const. Unfortunately, it will default to the non-const version, even when 'const scoped_refptr<VideoFrameBuffer>&' is used. This is a problem, because many subclasses use RTC_NOTREACHED() in the non-const version.

This CL makes the non-const version of data() explicit with a different, longer function name MutableData().

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9787}
2015-08-26 14:06:30 +00:00
85ad62b877 Remove per-frame captured frame logging.
It's a little too verbose :)

BUG=
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9786}
2015-08-26 13:22:47 +00:00
af9fb21886 - Use C++11 loops in WebRtcVoiceMediaEngine/Channel.
- Pull out part of WebRtcVoiceMediaChannel::SetRecvCodecs() into WebRtcVoiceMediaChannel::SetRecvCodecsInternal().

BUG=webrtc:4690
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9785}
2015-08-26 08:46:05 +00:00
c464f504dc AndroidVideoCapturerJni: Fix threading issues
The primary fix in this CL is to remove the dangling |thread_| pointer in AndroidVideoCapturerJni. That thread is not safe to use after Stop() has been called. Even after Stop() has been called, we must still be able to return late frames to Java in order to not leak them, so that path has been made thread safe instead. To make sure that we always return frames, the Java frame should be wrapped in a scoped_refptr as quickly as possible, so this CL moves the wrapping from AndroidVideoCapturer to AndroidVideoCapturerJni. This also removes the need for the interface function AndroidVideoCapturerDelegate::ReturnBuffer().

Some other minor changes are:
 * Remove |valid_global_refs_| and all logic related to that. Now that rtc::Bind() captures method objects as scoped_refptr, the destructor of AndroidVideoCapturerJni will not be called before all frames are returned.
 * Remove global ref |j_frame_observer_|. No need for this, we don’t call it and it is kept alive with standard Java memory management.
 * Add helper function ShallowCenterCrop() for VideoFrameBuffers. This functionality already exists in the constructor of WrappedI420Buffer, but it’s more convenient to have it as a separate function.

BUG=webrtc:4742,webrtc:4909
R=glaznev@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9784}
2015-08-25 21:22:24 +00:00
c464b409be Android RendererCommon: Add unittests for getTextureMatrix()
BUG=webrtc:4742
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9783}
2015-08-25 18:05:20 +00:00
1eb87c7d94 TCPConnection can never be deteted if they fail to connect.
Since the TCPConnection has never been connected, they are not scheduled for ping hence will never be detected.

Also fix the case when reconnect fails, as it has become READABLE before, it also will not be deleted.

BUG=webrtc:4936
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9782}
2015-08-25 18:03:02 +00:00
9b351151f9 Move mock_nonlinear_beamformer to only be a header
R=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9781}
2015-08-25 17:24:51 +00:00
b274547ebd rtc::Bind: Capture scoped_refptr reference arguments by value
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9780}
2015-08-25 15:56:37 +00:00
f4772ee436 Get rid of unused types and constants in acm_common_defs.h
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9779}
2015-08-25 15:31:57 +00:00
1bb8cf846d NetEq/ACM: Refactor how packet waiting times are calculated
With this change, the aggregates for packet waiting times are
calculated in NetEq's StatisticsCalculator insead of in
AcmReceiver. This simplifies things somewhat, and avoids having to
copy the raw data on polling.

R=ivoc@webrtc.org, minyue@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9778}
2015-08-25 11:08:17 +00:00
7230a21d66 Android RendererCommon: Add unittests for getDisplaySize()
BUG=webrtc:4742
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9777}
2015-08-25 10:31:30 +00:00
b6cac8f5ef Get rid of the manual destructor in AudioCodingModuleImpl
By converting three raw pointers to scoped_ptrs, we can eliminate the
need for a manually-defined destructor, and generally sleep better at
night.

R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9776}
2015-08-25 09:48:33 +00:00
87a8fbbf37 Fixing Pylint errors for plot_dynamics.py
R=pbos@webrtc.org
TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9775}
2015-08-25 09:01:43 +00:00
87713d0fe6 RTCCertificates added to RTCConfiguration, used by WebRtcSession/-DescriptionFactory.
This CL allows you to, having generated one or more RTCCertificates, supply them to RTCConfiguration for CreatePeerConnection use. This means an SSLIdentity does not have to be generated with a DtlsIdentityStore[Interface/Impl] as part of the CreatePeerConnection steps because the certificate contains all the necessary information.

To create an RTCCertificate you have to do the identity generation yourself though. But you could reuse the same RTCCertificate for multiple connections.

BUG=webrtc:4927
R=tommi@webrtc.org, torbjorng@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9774}
2015-08-25 07:53:36 +00:00
dd00f113a9 Remove no-op and unused methods from AudioCodingModule
This CL removes the following no-op and/or unused methods from
AudioCodingModule and AudioCodingModuleImpl:

ConfigISACBandwidthEstimator
DecoderEstimatedBandwidth
IsInternalDTXReplacedWithWebRtc
REDPayloadISAC
ReplaceInternalDTXWithWebRtc
ResetDecoder
ResetEncoder
SendBitrate
SetReceivedEstimatedBandwidth

R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9773}
2015-08-25 07:37:18 +00:00
7ef9d9104d Android: Remove VideoRenderer.Callbacks.canApplyRotation()
The only real implementation of VideoRenderer.Callbacks, VideoRendererGui, can always apply rotation. We don't need this in the interface.

BUG=webrtc:4145
R=glaznev@webrtc.org, guoweis@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9772}
2015-08-25 07:32:16 +00:00
bc2296de9e Add a base class to Wav{Reader,Writer} to access shared parameters.
Use it to clean up some code in audioproc_float.cc.

R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9771}
2015-08-25 00:29:34 +00:00
41eeff49fa More iOS compile fixes.
BUG=chromium:81439
TEST=none
TBR=niklas.enbom

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

Cr-Commit-Position: refs/heads/master@{#9770}
2015-08-24 23:24:22 +00:00
deb4875b74 Fix typos in https://codereview.webrtc.org/1230503003/ not caught by trybots.
BUG=chromium:81439
TEST=none
TBR=niklas.enbom

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

Cr-Commit-Position: refs/heads/master@{#9769}
2015-08-24 22:32:03 +00:00
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
b594041ec8 TcpPort Reconnect should inform upper layer to start sending again.
During the reconnection phase, EWOULDBLOCK has been returned to upper layer which stops the sending of video stream.

BUG=webrtc:4930
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9767}
2015-08-24 18:58:07 +00:00
39b8eb3ab0 Fix Chromium GN build problem introduced in 608c3cfe
R=henrikg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9766}
2015-08-24 17:50:48 +00:00
4e14f0961b Add support for external decoders in ACM
Test added too.

COAUTHOR=henrik.lundin@webrtc.org
BUG=4474
TBR=minyue@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9765}
2015-08-24 12:27:28 +00:00
e7cdc7f5a0 No-op CL to test if video engine core problem solved.
BUG=webrtc:4935
TBR=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9764}
2015-08-24 11:06:10 +00:00
d8ee4f9915 Use RtcpPacket to send BYE in RtcpSender
BUG=webrtc:2450

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

Cr-Commit-Position: refs/heads/master@{#9763}
2015-08-24 10:25:27 +00:00
608c3cfe77 iSAC: Make separate AudioEncoder and AudioDecoder objects
The only shared state is now the bandwidth estimation info.
This reduces the amount and complexity of the locking
substantially.

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

Cr-Commit-Position: refs/heads/master@{#9762}
2015-08-24 09:03:28 +00:00
2159b89fa2 Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)." becauese remoting code is using dead constants and breaks the FYI bots.
This reverts commit 5bdafd44c86ee46bd7e040f19828324583418b33.

Original CL: https://codereview.webrtc.org/1263663002/

R=guoweis@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9761}
2015-08-22 03:46:18 +00:00
9deaa86136 Fix initialization/termination of AudioDeviceTemplate
AudioDeviceTemplate doesn't initialize `output_` and `input_` if the
initialization of `audio_manager_` succeeds. Similarly, it doesn't
terminate `input_` and `audio_manager_` if the termination of `output_`
succeeds. This CL fixes this.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9760}
2015-08-22 01:38:55 +00:00
7612f1711c Fix accidental redeclaration.
Introduced here:
https://codereview.webrtc.org/1306863003/

and caught by the Android bots.

TBR=turaj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9759}
2015-08-21 17:31:49 +00:00
c0775c0291 Fix accessing uninitialized variables when not processing a reverse stream.
TBR=turaj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9758}
2015-08-21 16:32:53 +00:00
ea1012b2a4 address comments from https://codereview.webrtc.org/1277263002/
TBR=juberti@webrtc.org,pthather@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9757}
2015-08-21 16:06:37 +00:00
5bdafd44c8 Revert "Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)." becauese remoting code is using dead constants and breaks the FYI bots.""
This reverts commit 081f34b564e1a26ffbbe9515eba1fef7c736fdde.

Original code review see
https://codereview.webrtc.org/1291363005

The revert is due to a suspicion of "Reland "Remove GICE..." being the cause of failure on Linux memcheck, see
https://build.chromium.org/p/client.webrtc/builders/Linux%20Memcheck/builds/4137

TBR=pthatcher@webrtc.org,

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9756}
2015-08-21 13:52:58 +00:00
81a3e60c63 Use RtcpPacket to send TMMBR in RtcpSender
BUG=webrtc:2450

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

Cr-Commit-Position: refs/heads/master@{#9755}
2015-08-21 12:30:17 +00:00
dd4edc5813 Reland of Use RtcpPacket to send REMB in RtcpSender (patchset #1 id:1 of https://codereview.webrtc.org/1300863002/ )
Reason for revert:
This wasn't the cause of the breakage. Re-reverting.
https://code.google.com/p/webrtc/issues/detail?id=4923

Original issue's description:
> Revert of Use RtcpPacket to send REMB in RtcpSender (patchset #1 id:1 of https://codereview.webrtc.org/1290573004/ )
>
> Reason for revert:
> A few bots started failing rtc_unittests after this was commited. Ex https://build.chromium.org/p/client.webrtc/builders/Linux64%20Debug/builds/5048
>
> Original issue's description:
> > Use RtcpPacket to send REMB in RtcpSender
> >
> > BUG=webrtc:2450
> > R=asapersson@webrtc.org
> >
> > Committed: 35ab4baa20
>
> TBR=asapersson@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:2450
>
> Committed: https://crrev.com/141c5951f4beda868797c2746002a4b1b267ab2a
> Cr-Commit-Position: refs/heads/master@{#9723}

TBR=asapersson@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:2450

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

Cr-Commit-Position: refs/heads/master@{#9754}
2015-08-21 11:21:56 +00:00
c232096eba Remove cricket::VideoProcessor and AddVideoProcessor() functionality
This functionality is not used internally in WebRTC. Also, it's not safe, because the frame is supposed to be read-only, and it will likely not work for texture frames.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9753}
2015-08-21 09:40:42 +00:00
9d15c66830 Include webrtc/base/json.h rather than from jsoncpp directly.
This makes us use the clever code that adapts the path depending on where we build, so it works in google3 too.

BUG=None

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

Cr-Commit-Position: refs/heads/master@{#9752}
2015-08-21 08:00:43 +00:00
22ff75a163 Add unit tests for more packet types in rtcp_sender_unittest.
BUG=webrtc:2450

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

Cr-Commit-Position: refs/heads/master@{#9751}
2015-08-21 07:02:53 +00:00
bfab5cbc33 Fix some minor errors with the voice engine caused by the refactor CL https://codereview.webrtc.org/1229283003/.
R=deadbeef@webrtc.org, solenberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9750}
2015-08-21 00:40:28 +00:00
a5b273a635 Fixing problems with RTP extension ID conflict resolution
If the same extension URI is used for both audio and video (such as
abs-send-time), we should be able to re-use the same ID. A conflict
only exists if two different URIs are attempting to use the same ID.

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

Cr-Commit-Position: refs/heads/master@{#9749}
2015-08-21 00:30:18 +00:00
874ca3af5b Don't do reconfiguration if recv codec order/preference changes
Adding 'ReceiveCodecsHaveChanged' method that will determine if codecs
HAVE changed, irrespective of order and preference.

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

Cr-Commit-Position: refs/heads/master@{#9748}
2015-08-21 00:19:27 +00:00