652 Commits

Author SHA1 Message Date
deadbeef
ee8c6d3273 In PeerConnectionTestWrapper, put audio input on a separate thread.
This will prevent it from blocking network input when it falls behind,
which is happening when running with ThreadSanitizer.

BUG=webrtc:4663

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

Cr-Commit-Position: refs/heads/master@{#9707}
2015-08-13 21:27:23 +00:00
hbos
c558af854f Removing DtlsIdentityService[Interface] which has been replaced by DtlsIdentityStore[Interface/Impl].
This is CL is part of an effort to land https://codereview.webrtc.org/1176383004 without breaking Chromium.
See bug for more information.

BUG=webrtc:4899

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

Cr-Commit-Position: refs/heads/master@{#9705}
2015-08-13 15:29:03 +00:00
magjed
e2a8be1244 Revert of AppRTCDemo: Render each video in a separate SurfaceView (patchset #4 id:120001 of https://codereview.webrtc.org/1257043004/ )
Reason for revert:
AppRTCDemo often crashes in loopback mode and incorrect layout when connection is established

BUG=webrtc:4909,webrtc:4910

Original issue's description:
> AppRTCDemo: Render each video in a separate SurfaceView
>
> This CL introduces a new org.webrtc.VideoRenderer.Callbacks implementation called SurfaceViewRenderer that renders each video stream in its own SurfaceView. AppRTCDemo is updated to use this new rendering.
>
> This CL also does the following changes:
> * Make the VideoRenderer.Callbacks interface asynchronous and require that renderFrameDone() is called for every renderFrame(). In JNI, this is implemented with cricket::VideoFrame::Copy()/delete.
> * Make public static helper functions: convertScalingTypeToVisibleFraction(), getDisplaySize(), and getTextureMatrix().
> * Introduces new helper functions surfaceWidth()/surfaceHeight() in EGlBase that allows to query the surface size.
> * Introduce PercentFrameLayout that implements the percentage layout that is used by AppRTCDemo.
>
> BUG=webrtc:4742
>
> Committed: https://crrev.com/05bfbe47ef6bcc9ca731c0fa0d5cd15a4f21e93f
> Cr-Commit-Position: refs/heads/master@{#9699}

TBR=glaznev@webrtc.org,wzh@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4742

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

Cr-Commit-Position: refs/heads/master@{#9703}
2015-08-12 06:55:04 +00:00
budnyjj
d941b7609c Fix distortions of remote stream with odd size dimensions
BUG=webrtc:4482

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

Cr-Commit-Position: refs/heads/master@{#9702}
2015-08-12 03:29:03 +00:00
Alex Glaznev
8a2cd3d57d Revert H.264 HW encoder setting to CBR mode.
VBR mode does not work well on KK devices - bitrate
deviations from target are too large,

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9701}
2015-08-11 18:33:03 +00:00
magjed
05bfbe47ef AppRTCDemo: Render each video in a separate SurfaceView
This CL introduces a new org.webrtc.VideoRenderer.Callbacks implementation called SurfaceViewRenderer that renders each video stream in its own SurfaceView. AppRTCDemo is updated to use this new rendering.

This CL also does the following changes:
* Make the VideoRenderer.Callbacks interface asynchronous and require that renderFrameDone() is called for every renderFrame(). In JNI, this is implemented with cricket::VideoFrame::Copy()/delete.
* Make public static helper functions: convertScalingTypeToVisibleFraction(), getDisplaySize(), and getTextureMatrix().
* Introduces new helper functions surfaceWidth()/surfaceHeight() in EGlBase that allows to query the surface size.
* Introduce PercentFrameLayout that implements the percentage layout that is used by AppRTCDemo.

BUG=webrtc:4742

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

Cr-Commit-Position: refs/heads/master@{#9699}
2015-08-11 13:50:27 +00:00
pthatcher
fa301809b6 Revert "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 3449faa553ec94c52ef2d0949867befb60992c88.

TBR=deadbeef@webrtc.org, juberti@webrtc.org
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#9698}
2015-08-11 11:13:00 +00:00
Henrik Boström
cc4ebadf0b Empty dtlsidentityservice.h/cc files added, to be removed once chromium gyp files don't reference it.
This is CL is part of an effort to land https://codereview.webrtc.org/1176383004 without breaking Chromium.
See bug for more information.

BUG=webrtc:4899

TBR=tommi@webrtc.org,magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9697}
2015-08-11 09:44:58 +00:00
Henrik Boström
5e56c5927e DtlsIdentityStoreInterface added and the implementation is called DtlsIdentityStoreImpl (previously named without the -Impl bit and without an interface).
DtlsIdentityStoreImpl is updated to take KeyType into account, something which will be relevant after this CL lands:
https://codereview.webrtc.org/1189583002

The DtlsIdentityService[Interface] classes are about to be removed (to be removed when Chromium no longer implements and uses the interface). This was an unnecessary layer of complexity. The FakeIdentityService is now instead a FakeDtlsIdentityStore.
Where a service was previously passed around, a store is now passed around.

Identity generation is now commonly performed using DtlsIdentityStoreInterface. Previously, if a service was not specified, WebRtcSessionDescriptionFactory could fall back on its own generation code. Now, a store has to be provided for generation to occur.

For more information about the steps being taken to land this without breaking Chromium, see referenced bug.

BUG=webrtc:4899
R=magjed@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9696}
2015-08-11 08:33:27 +00:00
Peter Thatcher
3449faa553 Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever).
R=deadbeef@webrtc.org, juberti@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9692}
2015-08-10 19:22:59 +00:00
jbauch
25c96d02cd Add thread checker to StatsCollection.
This CL makes sure the methods are always called on the correct thread.

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

Cr-Commit-Position: refs/heads/master@{#9688}
2015-08-07 16:48:22 +00:00
Alex Glaznev
0482dcc873 Enable HW H.264 decoding on Intel platforms.
R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9686}
2015-08-06 22:17:03 +00:00
magjed
fcf8ece6ba AndroidVideoCapturer: Return frames that have been dropped
Currently, we only return frames if CreateAliasedFrame() is called, which is not the case for dropped frames.

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

Cr-Commit-Position: refs/heads/master@{#9683}
2015-08-06 11:00:20 +00:00
Henrik Boström
5b4ce3391d DtlsIdentityStoreInterface added.
New PeerConnectionFactoryInterface::CreatePeerConnection taking both service and store added (old CreatePC signature still exists).

This is CL is part of an effort to land https://codereview.webrtc.org/1176383004 without breaking Chromium.
See bug for more information.

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

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

Cr-Commit-Position: refs/heads/master@{#9680}
2015-08-05 14:55:35 +00:00
Fredrik Solenberg
0c0226408d Get rid of media_engine_ from BaseChannel; only VoiceChannel needs it.
BUG=webrtc:4690
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9679}
2015-08-05 10:26:01 +00:00
magjed
37ec7330b4 VideoCapturerAndroid: Check if data is null in onPreviewFrame()
onPreviewFrame() might be called with a null data pointer, which is allowed according to the documentation.

BUG=webrtc:4877

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

Cr-Commit-Position: refs/heads/master@{#9674}
2015-08-05 07:34:55 +00:00
Alex Glaznev
0c850202fe Add list of devices with HW H.264 encoder non suitable for WebRTC.
For now add only Galaxy S4 to the list, since its H.264 HW encoder
generates two times lower bitrate comparing to target.
Also use VBR mode for H.264 encoder configuration.

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9673}
2015-08-04 17:27:06 +00:00
honghaiz
503726c349 Fix the generation mismatch assertion error.
BUG=4860

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

Cr-Commit-Position: refs/heads/master@{#9667}
2015-07-31 19:37:43 +00:00
magjed
b28678ce70 Add unittest to GlRectDrawer
Review URL: https://codereview.webrtc.org/1250093003

Cr-Commit-Position: refs/heads/master@{#9638}
2015-07-26 12:17:25 +00:00
magjed
013a580064 VideoCapturerAndroid: Revert elapsedRealtimeNanos to elapsedRealtime
Review URL: https://codereview.webrtc.org/1254143002

Cr-Commit-Position: refs/heads/master@{#9637}
2015-07-26 11:25:14 +00:00
jackychen
e2b34b7b4b Bug fix: camera frames are dropped before wideo encoder.
https://code.google.com/p/webrtc/issues/detail?id=4871

R=glaznev@webrtc.org
TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9634}
2015-07-24 21:12:31 +00:00
tkchin
c3f46a9f7f iOS: Move AppRTC logging methods to public headers.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#9629}
2015-07-23 19:50:59 +00:00
tkchin
28bae02bd3 Remove CircularFileStream / replace it with CallSessionFileRotatingStream.
BUG=4838, 4839

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

Cr-Commit-Position: refs/heads/master@{#9628}
2015-07-23 19:27:06 +00:00
magjed
66f438f8c3 Revert of Fixing scenario where track is rejected and later un-rejected. (patchset #5 id:80001 of https://codereview.webrtc.org/1231613002/)
Reason for revert:
I think this causes WebRtcBrowserTest.CallAndModifyStream to fail on Android. See https://code.google.com/p/webrtc/issues/detail?id=4857 for more info.

Original issue's description:
> Fixing scenario where track is rejected and later un-rejected.
>
> Added `RestartLocalTracks` and `RestartRemoteTracks` methods to
> `MediaStreamHandlerContainer` which will redo the track handlers'
> initial setup; most importantly, this will re-connect the
> renderer/capturer/etc. to a channel which was destroyed and then
> re-created.
>
> Also added `AcceptRemoteTracks` method to MediaStreamSignaling, which
> does the inverse of `RejectRemoteTracks`. Effectively this will notify
> sinks that the track is live again, after previously being set to
> `kEnded` when it was rejected.
>
> BUG=webrtc:2136
>
> Committed: https://crrev.com/be37888b6d5d269dbd5385569dba15c0d70594f2
> Cr-Commit-Position: refs/heads/master@{#9600}

TBR=pthatcher@webrtc.org,juberti@webrtc.org,deadbeef@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:2136

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

Cr-Commit-Position: refs/heads/master@{#9622}
2015-07-23 13:02:45 +00:00
magjed
b69ab79338 VideoCapturerAndroid: Add function to change capture format while camera is running
Review URL: https://codereview.webrtc.org/1178703009

Cr-Commit-Position: refs/heads/master@{#9608}
2015-07-22 09:32:04 +00:00
deadbeef
be37888b6d Fixing scenario where track is rejected and later un-rejected.
Added `RestartLocalTracks` and `RestartRemoteTracks` methods to
`MediaStreamHandlerContainer` which will redo the track handlers'
initial setup; most importantly, this will re-connect the
renderer/capturer/etc. to a channel which was destroyed and then
re-created.

Also added `AcceptRemoteTracks` method to MediaStreamSignaling, which
does the inverse of `RejectRemoteTracks`. Effectively this will notify
sinks that the track is live again, after previously being set to
`kEnded` when it was rejected.

BUG=webrtc:2136

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

Cr-Commit-Position: refs/heads/master@{#9600}
2015-07-17 17:30:53 +00:00
jbauch
fabe2c961f Remove deprecated functions.
This CL removes some functions that are marked as deprecated. Chromium
has been updated in https://crrev.com/7dee3f68b7699ad72c7fc4d75332f72703313849
to call the new functions.

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

Cr-Commit-Position: refs/heads/master@{#9598}
2015-07-16 20:43:27 +00:00
Peter Thatcher
a9b4c32052 Nuke buffered latency mode. It's not actually working, and it's not used. It's just dead code complexity.
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9593}
2015-07-16 10:47:39 +00:00
jbauch
083b73fb95 Use std::string references instead of copying contents.
This CL improves the memory footprint a bit by using string references
instead of creating a copy.

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

Cr-Commit-Position: refs/heads/master@{#9592}
2015-07-16 09:46:43 +00:00
deadbeef
f393829434 Use "UDP/TLS/RTP/SAVPF" profile in offer when DTLS-SRTP is used.
Tested that this doesn't break compatibility with Firefox or older
versions of Chrome, no matter which side generates the initial offer.

BUG=webrtc:2796

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

Cr-Commit-Position: refs/heads/master@{#9589}
2015-07-15 19:20:56 +00:00
Zeke Chin
2d3b7e2173 AppRTCDemo file logging.
Adds logging macros to log logs to a file. Undeletes CircularFileStream
for that purpose.

BUG=
R=jiayl@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9582}
2015-07-14 19:55:56 +00:00
honghaiz
a03cd3fdef 1. Override and virtual has to be consistent.
2. provide an implementation for SetIceConnectionReceivingTimeout so that Chrome does not complain.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9574}
2015-07-14 00:08:11 +00:00
jackychen
6e2ce6e1ae Allow for framerate reduction for HW encoder.
R=pbos@webrtc.org, stefan@webrtc.org
TBR=glaznev@google.com

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

Cr-Commit-Position: refs/heads/master@{#9573}
2015-07-13 23:26:40 +00:00
honghaiz
900996290c Add methods to set the ICE connection receiving_timeout values.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#9572}
2015-07-13 19:19:42 +00:00
Peter Thatcher
a6d2444c84 Remove BaseSession::SignalNewDescription. It was only used by GTP and now just clutters the code.
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9564}
2015-07-10 04:26:45 +00:00
pbos
bb36fdf95f Remove empty-string comparisons.
Use .empty() and !.empty() in favor of == "" or != "".

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9559}
2015-07-09 14:48:27 +00:00
tommi
0f620f4e31 Make sure we process all pending offer/answer requests before terminating.
This fixes a bug in the WebRtcSessionDescriptionFactory where messages would be dropped or worse yet processed after the factory was deleted.

BUG=chromium:507307

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

Cr-Commit-Position: refs/heads/master@{#9557}
2015-07-09 10:25:04 +00:00
Jiayang Liu
61093868b4 Expose the disable encryption option to JNI.
BUG=
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9554}
2015-07-08 22:25:56 +00:00
Peter Thatcher
54360510ff Add flakyness check based on the recently received packets.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9553}
2015-07-08 18:08:39 +00:00
jbauch
ac8869ec5a Report metrics about negotiated ciphers.
This CL adds an API to the metrics observer interface to report negotiated
ciphers for WebRTC sessions. This can be used from Chromium for UMA metrics
later to get an idea which cipher suites are used by clients (e.g. compare
the use of DTLS 1.0 / 1.2).

BUG=428343

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

Cr-Commit-Position: refs/heads/master@{#9537}
2015-07-03 08:36:22 +00:00
bemasc
0edd50ccb3 Support for onbufferedamountlow
Original review at https://webrtc-codereview.appspot.com/54679004/

BUG=https://code.google.com/p/chromium/issues/detail?id=496700

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

Cr-Commit-Position: refs/heads/master@{#9527}
2015-07-01 20:34:42 +00:00
Zeke Chin
71f6f4405c iOS HW H264 support.
First step towards supporting H264 on iOS. More tuning/experimentation
required in future CLs. Tested using AppRTCDemo on iPhone6 + iPad Mini.
Future work to get it working on OS/X, simulator (renders black screen
currently) and with the Android AppRTCDemo. Currently protected with a
compile time guard.

BUG=4081
R=andrew@webrtc.org, haysc@webrtc.org, holmer@google.com, jiayl@webrtc.org, kjellander@webrtc.org, pbos@webrtc.org, phoglund@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9515}
2015-06-29 21:35:08 +00:00
Peter Thatcher
c0c3a865f4 Prevent JS from bypassing RTP data channel bandwidth limitation.
Normally the RTP data channel is capped at 30kbps, but by mangling the
SDP string, one could get around this limitation. With this fix,
SdpDeserialize will return an error if it detects this condition.

BUG=280726
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9499}
2015-06-24 22:31:35 +00:00
magjed
59a677ada2 Android VideoRendererGui: Refactor GLES rendering
This CL should not change any visible behaviour. It does the following:
 * Extract GLES rendering into separate class GlRectDrawer. This class is also needed for future video encode with OES texture input.
 * Clean up current ScalingType -> display size calculation and introduce new SCALE_ASPECT_BALANCED (b/21735609) and remove unused SCALE_FILL.
 * Replace current mirror/rotation index juggling with android.opengl.Matrix operations instead.

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

Cr-Commit-Position: refs/heads/master@{#9496}
2015-06-24 10:59:43 +00:00
phoglund
7ab5f801dd Adding an equals method for KeyValuePair for easier testing.
With this we can write stuff like

assertThat(result.mandatory,
    hasItem(new KeyValuePair("minWidth", "1280")));

The above will currently fail because the object falls back to ==.

BUG=None

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

Cr-Commit-Position: refs/heads/master@{#9494}
2015-06-24 08:11:51 +00:00
Joachim Bauch
66f920ea57 Remove definition of non-existent method.
The private method "CreateDefaultLocalDescription" is defined in the
class, but not implemented or used anywhere.

R=juberti@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9493}
2015-06-24 07:34:41 +00:00
tommi
39b31001d2 Change kEchoCancellation to be 'echoCancellation'.
This is the second cl in WebRTC for this change and will be landed after Chromium has been updated to use kGooglEchoCancellation where that variant is required. See also the first part: https://codereview.webrtc.org/1179233003

BUG=webrtc:4747
R=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9490}
2015-06-23 16:50:50 +00:00
jbauch
be24c94c95 Set / verify stats report timestamps.
This CL updates the track report timestamps which were fixed at "0" before
and updates the timestamps in reports for local audio tracks.

Also the timestamps are checked in various tests to make sure no "0" is
returned.

Original CL is at https://webrtc-codereview.appspot.com/51829004/

BUG=webrtc:4316
TBR=hta@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9485}
2015-06-22 22:06:50 +00:00
henrika
1d34fe979c Adds support for webrtc::test::ResourcePath on iOS
BUG=webrtc:4752
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9445}
2015-06-16 08:04:24 +00:00
Henrik Lundin
b02af18c5c Follow-up: Remove old DelayCorrection AEC config
This is a follow-up to r9401, where the configuration DelayCorrection
was replaced by ExtendedFilter.

This change also removes the media constraint
kExperimentalEchoCancellation which was replaced by
kExtendedFilterEchoCancellation in the same CL.

Both settings that are now being removed were kept in the code to avoid
API breakages. In https://codereview.chromium.org/1167343004,
depending code has been updated to avoid breakages.

BUG=webrtc:4696
R=bjornv@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9444}
2015-06-16 07:53:32 +00:00