Commit graph

269 commits

Author SHA1 Message Date
Magnus Jedvert
31f18e164e Android SurfaceTextureHelper: Avoid crashing if size hasn't been set
SurfaceTextureHelper currently crashes if an OES texture is produced
before setTextureSize() has been called. This is annoying if the texture
size is not easily known beforehand. A real world example is MediaPlayer
that provides the video size with an asynchronous call to
setOnVideoSizeChangedListener(), but that might happen after the first
texture is produced on some devices.

This CL waits with delivering frames until the size has been sent,
rather than crashing.

Bug: webrtc:10709
Change-Id: I5d9ce542e0edaafe1153fd5fe7d64dba86d7e33c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140080
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28151}
2019-06-04 10:40:39 +00:00
Qingsi Wang
1fe119f12f Change the gating of surfacing candidates on ICE transport type change
from a field trial to RTCConfiguration.

The test coverage is also expanded for the underlying feature.

Bug: None
Change-Id: Ic9c1362867e4a956c5453be7a9355083b6a442f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138980
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28143}
2019-06-03 18:41:13 +00:00
Qingsi Wang
36e3147b21 Surface the standardized ICE connection state to mobile clients.
This CL adds the callback on changes of the ICE connection state
following the standardized transitions
(https://www.w3.org/TR/webrtc/#dom-rtciceconnectionstate) to the
Android and the iOS SDKs.

Bug: None
Change-Id: I6133391fa54dd4e09016f29dddb85e4a0e270878
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138181
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28127}
2019-05-31 22:40:33 +00:00
Magnus Jedvert
94079f8452 Android: Add support for OpenGL ES 3
Bug: webrtc:10642
Change-Id: I736e9e2520b364a817228a6599f4008d58165622
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137424
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27990}
2019-05-20 16:39:56 +00:00
Sebastian Jansson
ad60afbd0f Allow injection of network controller factory in Java.
Bug: webrtc:9155
Change-Id: I3303a5a9d13a2b7028c24ceede4565b0f4350d7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133570
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27686}
2019-04-18 12:08:46 +00:00
Ying Wang
deb0854e68 Minor fix, rename method name to setNetworkStatePredictorFactoryFactory().
Bug: webrtc:10492
Change-Id: I1ce365c05cfef0c86938a398840e0c4f8b0800ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132343
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27564}
2019-04-11 12:30:27 +00:00
Ying Wang
0810a7c25a Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.

Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
2019-04-10 12:38:58 +00:00
Sami Kalliomäki
c21cf04618 Move frame adaptation inside video processor.
Bug: webrtc:10530
Change-Id: Iba6a91bf3e1ec4b2821b554e9e28fd2ead662723
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131947
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27542}
2019-04-10 12:31:16 +00:00
Amit Hilbuch
ae4b62318d Reland "Add bindings for simulcast and RIDs in Android SDK."
This is a reland of 177670afd6
Fixing failing tests.

TBR=magjed@webrtc.org
Original change's description:
> Add bindings for simulcast and RIDs in Android SDK.
>
> This adds the bindings for rid in RtpParameters.Encoding and bindings
> for send_encodings in RtpTransceiverInit to allow creating a transceiver
> with multiple send encodings.
>
> Bug: webrtc:10464
> Change-Id: I4c205dc0f466768c63b7efcb3c68e93277236da0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128960
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27323}

Bug: webrtc:10464
Change-Id: I95fac3967217c20a9fdddb490aea30eca2061ef0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130362
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27402}
2019-04-01 17:45:46 +00:00
Oleh Prypin
e8bc3a0a5a Revert "Add bindings for simulcast and RIDs in Android SDK."
This reverts commit 177670afd6.

Reason for revert: Fails android_instrumentation_test_apk:
https://ci.chromium.org/p/webrtc/builders/ci/Android64%20(M%20Nexus5X)/11553

Original change's description:
> Add bindings for simulcast and RIDs in Android SDK.
>
> This adds the bindings for rid in RtpParameters.Encoding and bindings
> for send_encodings in RtpTransceiverInit to allow creating a transceiver
> with multiple send encodings.
>
> Bug: webrtc:10464
> Change-Id: I4c205dc0f466768c63b7efcb3c68e93277236da0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128960
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27323}

TBR=magjed@webrtc.org,shampson@webrtc.org,amithi@webrtc.org

Change-Id: Id6c4e2d41c3c2fbfad31baed907cfa73d82ef14a
No-Tree-Checks: True
No-Try: True
Bug: webrtc:10464
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130466
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27354}
2019-03-29 15:51:07 +00:00
Amit Hilbuch
177670afd6 Add bindings for simulcast and RIDs in Android SDK.
This adds the bindings for rid in RtpParameters.Encoding and bindings
for send_encodings in RtpTransceiverInit to allow creating a transceiver
with multiple send encodings.

Bug: webrtc:10464
Change-Id: I4c205dc0f466768c63b7efcb3c68e93277236da0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128960
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27323}
2019-03-27 18:06:00 +00:00
Paulina Hensman
8f22a28e30 Check render size instead of frame size.
Even if neither frame height nor frame width is <=0 we can end up
with <=0 dimensions in renderHeight or renderWidth. With this change,
we perform the check on the latter.

Bug: webrtc:10367
Change-Id: I9672672659ad7d12cf1e7ccab5b5cde583ae7e8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129760
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27307}
2019-03-27 10:17:21 +00:00
Paulina Hensman
1ca30a7e41 Decouple input and output sample rate overrides.
We may sometimes want to override only input or only output, or
override them with different values. This change allows setting the
overrides separately.


Change-Id: Ib0c44cb7a3cfa834f997fb6cd54f7cad68705f41
Bug: webrtc:10441
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128763
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27236}
2019-03-22 11:56:01 +00:00
Magnus Jedvert
98d85fe9a4 Android: Expose underlying EGL context in API
This CL adds a way to extract the underlying android.opengl.EGLContext
and javax.microedition.khronos.egl.EGLContext for EglBase14 and
EglBase10 respectively. The reason is that clients can't be expected to
use only WebRTC's OpenGL code and might need to integrate with their
own GL code.

Bug: None
Change-Id: Ie00a564de45a090683542a52005da7e43c586ced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127888
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27205}
2019-03-20 11:26:19 +00:00
Karl Wiberg
ab03638eb6 Let threads opt in to having their stack traces printed
The video decoder thread is the pilot user.

For now this is an Android-only feature, since that's the only
platform we can print stack traces on.

Bug: webrtc:9987
Change-Id: Ie638c619673b5f159d91a32683fd787baf46479a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126222
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27127}
2019-03-14 11:46:28 +00:00
Paulina Hensman
0a16916ac8 Use JavaAudioDeviceModule as default
Previously, we have created a Legacy ADM when no ADM is supplied.
With this change we will start creating a Java ADM instead.

The end goal is to make injection mandatory, and never creating ADMs.
This is one step on the way, and will allow us to clean up the Legacy
ADM code.

Bug: webrtc:7452
Change-Id: Ib99adc50346fe6b748f9435d2fc6321a50c3ee4e
Reviewed-on: https://webrtc-review.googlesource.com/c/123887
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26949}
2019-03-04 13:44:33 +00:00
Paulina Hensman
cf7c58458e Only draw frames with height and width >0
There has been some crashes due to frames having illegal sizes, most
likely 0x0. Probably these frames are created as a workaround for
something.

It would be best to stop 0x0 frames from being created in the first
place, but a reasonable quick fix is to just not draw those frames.

Bug: webrtc:10367
Change-Id: Ib93057c4de7285773c99614b4e7d9bd4b099c4dc
Reviewed-on: https://webrtc-review.googlesource.com/c/124988
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26897}
2019-02-28 14:08:38 +00:00
Åsa Persson
f2889bbaf4 Add option to inject YuvConverter to SurfaceTextureHelper.
Add option to inject VideoFrameDrawer to YuvConverter and EglRenderer.

Bug: none
Change-Id: I0aab0026c30b41d72f70fb00b251aed5e4a4a774
Reviewed-on: https://webrtc-review.googlesource.com/c/123443
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26848}
2019-02-26 07:47:52 +00:00
Alvaro Martinez
ce27875b83 [AndroidAudioRecord] Added audio format parameter to configure AudioRecord - JavaAudioDeviceModule
Added audio format field and set method to Builder. - WebRTCAudioRecord. Added audio format field, added to constructor. Default audio format value AudioFormat.ENCODING_PCM_16BIT. initRecord(), added how to calculate bytesPerFrame, depends on audioFormat.

First commit and contribution, updated AUTHORS file

Bug: None
Change-Id: I16f660d42350ec9ce2e329b239bd7f6324e76dfe
Reviewed-on: https://webrtc-review.googlesource.com/c/122302
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26775}
2019-02-20 15:08:53 +00:00
Magnus Jedvert
e9652ca6ec Android: Add video processing interface
This CL adds an API for injecting video processing after the WebRTC
CPU and QP scaling step.

Bug: webrtc:10247
Change-Id: I776498e1e9113f50e953ee411bbb31f181863312
Reviewed-on: https://webrtc-review.googlesource.com/c/119953
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26740}
2019-02-18 15:46:42 +00:00
Magnus Jedvert
9025bd5142 Separate AndroidVideoTrackSource::OnFrameCaptured from adaptation
AndroidVideoTrackSource::OnFrameCaptured currently does adaptation
before passing frames on. We want to add video processing between
adaptation and delivering the frame to the rest WebRTC C++. This
CL prepares for that by splitting OnFrameCaptured() into a separate
adaptation step and delivery step.

Bug: webrtc:10247
Change-Id: Iab759bac7f3072d4552ece80d0b81fc3e634c64c
Reviewed-on: https://webrtc-review.googlesource.com/c/119952
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26571}
2019-02-06 14:33:59 +00:00
Magnus Jedvert
99b275d126 Introduce class that handles native wrapping of AndroidVideoTrackSource
This CL attempts to do separation of concerns by introducing a simple
class that only handles JNI wrapping of a C++ AndroidVideoTrackSource.
This layer can be easiliy mocked out in Java unit tests.

Bug: webrtc:10247
Change-Id: Idbdbfde6d3e00b64f3f310f76505801fa496580d
Reviewed-on: https://webrtc-review.googlesource.com/c/121562
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26556}
2019-02-05 16:36:26 +00:00
Magnus Jedvert
167316b833 Remove proxy layer from AndroidVideoTrackSource
This layer is not needed since the methods are thread safe, and the
classes those method touches (VideoBroadcaster, cricket::VideoAdapter)
are thread safe.

Bug: webrtc:10247
Change-Id: Id4e309de4ac1b9669052aaa60d3bd1ed965aaa29
Reviewed-on: https://webrtc-review.googlesource.com/c/120801
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26543}
2019-02-05 10:50:40 +00:00
Mirta Dvornicic
d8b980464c Add scaleResolutionDownBy to RtpParameters.Encoding in Android SDK.
Bug: webrtc:10069
Change-Id: I8130836c495d5584ca3e11e9e3155916b871ab21
Reviewed-on: https://webrtc-review.googlesource.com/c/120926
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26535}
2019-02-04 16:50:24 +00:00
Magnus Jedvert
443760d4ba Android: Add option to print native stack traces in PeerConnectionFactory API
This CL hooks up the recently added native stack trace functionality to
the existing PeerConnectionFactory API.

Bug: webrtc:10168
Change-Id: I16189d2988b1359fc53f9a4d0b3d06f34e2a8fd5
Reviewed-on: https://webrtc-review.googlesource.com/c/118600
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26344}
2019-01-21 16:07:26 +00:00
Magnus Jedvert
fad0893688 Android: Remove static thread references from PeerconnectionFactory
This CL prepares for adding stack trace capability to the native part of
the Android PeerConnectionFactory code. The main blocker this CL removes
is the static printStackTrace() function. We need this function to be
non-static since the C++ counterpart of PCF is non-static. This Cl also
performs various other cleanups in surrounding code.

This CL:
 * Removes static thread references from PeerconnectionFactory and turns
   them into non-static member variables.
 * Adds a non-static alternative to
   PeerconnectionFactory.printStackTraces().
 * Removes the rtc::Thread::Invoke() calls, and turns them into
   asynchronous posts.
 * Consolidates the two different Java PCF ctors into one, so that there
   is one shared path used by both native API and Java API.

Bug: webrtc:10168
Change-Id: I05dbf5b17069d4a115d9adafc25faa121f23b945
Reviewed-on: https://webrtc-review.googlesource.com/c/115961
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26329}
2019-01-20 12:14:05 +00:00
Qingsi Wang
a0d4580936 Add the equals method to IceServer.
Bug: None
Change-Id: I4bac54489a44a4577cc221ba51351e4a3a92e69b
Reviewed-on: https://webrtc-review.googlesource.com/c/116081
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Honghai Zhang <honghaiz@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26271}
2019-01-16 01:06:17 +00:00
Magnus Jedvert
3ff71de9da Android: Add option to mirror vertically in EglRenderer
Bug: None
Change-Id: I4f46f9f0e1fa3805880335ebb6a767b8cb33f8c6
Reviewed-on: https://webrtc-review.googlesource.com/c/114540
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26028}
2018-12-17 14:23:55 +00:00
Henrik Grunell
e1301a8b3a Revert "Implement read-only codecPayloadType in RtpParameters"
This reverts commit 806e06d136.

Reason for revert: Breaks WebRTC roll to Chromium. https://chromium-review.googlesource.com/c/chromium/src/+/1375538

02:52:35.346 7748   [6936:11248:1213/025234.206:ERROR:mediaengine.cc(80)] Attempted to set RtpParameters with modified codecPayloadType (INVALID_MODIFICATION)

Original change's description:
> Implement read-only codecPayloadType in RtpParameters
> 
> Bug: webrtc:7580
> Change-Id: I6d901afa97262b6c6d9fe6c7366df465ec77bfb3
> Reviewed-on: https://webrtc-review.googlesource.com/c/113944
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25993}

TBR=steveanton@webrtc.org,sakal@webrtc.org,andersc@webrtc.org,shampson@webrtc.org,orphis@webrtc.org

Change-Id: I157f9a79ae7133395431891e15e2c053559d359b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7580
Reviewed-on: https://webrtc-review.googlesource.com/c/114300
Reviewed-by: Henrik Grunell <henrikg@webrtc.org>
Commit-Queue: Henrik Grunell <henrikg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26000}
2018-12-13 12:13:30 +00:00
Magnus Jedvert
94c0f2645e Android: One weird trick for avoiding graphics deadlocks
eglDestroyContext has been observed to deadlock with other GL threads
unless the GL program is detached beforehand.

TBR=sakal
NO_TRY=TRUE

Bug: b/120481228
Change-Id: Ie256e745828997b6fee0d62e681f5ef953aa0fe7
Reviewed-on: https://webrtc-review.googlesource.com/c/114164
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25999}
2018-12-13 09:31:41 +00:00
Florent Castelli
806e06d136 Implement read-only codecPayloadType in RtpParameters
Bug: webrtc:7580
Change-Id: I6d901afa97262b6c6d9fe6c7366df465ec77bfb3
Reviewed-on: https://webrtc-review.googlesource.com/c/113944
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25993}
2018-12-12 16:24:29 +00:00
Artem Titarenko
69540f4419 Use android Nullable instead of javax Nullable
This is a propagation of upstream chromium change needed to
resume DEPS autorolls into WebRTC.

Original comment from upstream change:

> This change is made in preparation for an ErrorProne
> check to catch this at compile time. See bug for details.

Bug: chromium:771683
Change-Id: I56aed15f73a633dcadae7ece6c645cd3596f9257
Reviewed-on: https://webrtc-review.googlesource.com/c/113505
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25951}
2018-12-10 15:03:58 +00:00
Magnus Jedvert
7c6fbf2c9a Android: Add constant for native EGL NO_CONTEXT
TBR=sakal

Bug: None
Change-Id: I3123648c8745954f5a90a0e18422379daffe6195
Reviewed-on: https://webrtc-review.googlesource.com/c/112591
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25863}
2018-11-30 21:26:18 +00:00
Magnus Jedvert
0cc11b4b94 Android: Bump stack trace logging severity from debug to warning
Stack traces usually get printed when an error occur and we want this
to be included in release versions.

Bug: None
Change-Id: I17fdbc58393f5b4d597b14e95240bdb04473b4ad
Reviewed-on: https://webrtc-review.googlesource.com/c/112133
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25821}
2018-11-28 13:11:42 +00:00
Yura Yaroshevich
68478b8287 Added user-defined predicate to filter video codec implementations.
Ability to provide user defined predicate to disable particular
codec in particular circumstances was added. This could help
addressing mysterious crashes on specific Android devices.

Bug: webrtc:10029
Change-Id: I7ad81f4b1351aa68f036c0ee3b6d32fbf0f697ed
Reviewed-on: https://webrtc-review.googlesource.com/c/111781
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25820}
2018-11-28 13:10:36 +00:00
philipel
5486bcd0d0 Remove SetChannelParameters function from API classes.
Followup to https://webrtc-review.googlesource.com/c/src/+/108861

Bug: webrtc:9946
Change-Id: Ia6e7fa3942c21aefeadb7b214c85cff93fbc2ef6
Reviewed-on: https://webrtc-review.googlesource.com/c/109860
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25747}
2018-11-22 11:12:10 +00:00
Benjamin Wright
e4cccae299 Removed ability to set CryptoOptions through PeerConnectionFactory from bindings.
This change removes the ability to set CryptoOptions through the PeerConnection
Factory in both Java and IOS. Native will be removed after the Chromium change
lands. The semantics have been changed such that these options should only be
set on individual PeerConnections and not directly on the Factory itself. This
allows for more flexibility in setting CryptoOptions for PeerConnections which
are created as part of a factory.

Bug: webrtc:10020
Change-Id: I9ef3d431e728927b9ced5de6188cedeb2671254b
Reviewed-on: https://webrtc-review.googlesource.com/c/111560
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25736}
2018-11-21 18:52:45 +00:00
Patrik Höglund
bd6ffaf73b Fix small issues that stops the Chromium DEPS roll.
Some imports of classes in the same package are a bit silly.

Removing = false for booleans is safe because Java guarantees that
an uninitialized bool will always be false.

Tbr: sakal@chromium.org
Bug: None
Change-Id: I04baa78a6e21b1c4fc74c5e46665e66481da2495
Reviewed-on: https://webrtc-review.googlesource.com/c/111243
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25678}
2018-11-19 08:14:38 +00:00
Magnus Jedvert
9514071500 Android: Support externally aligned timestamps
This support is needed if there is a big delay between the creation of
frames and the time they are delivered to the WebRTC C++ layer in
AndroidVideoTrackSource. This is the case if e.g. some heavy video
processing is applied to the frames that takes a couple of hundred
milliseconds. Currently, timestamps coming from Android video sources
are aligned to rtc::TimeMicros() once they reach the WebRTC C++ layer in
AndroidVideoTrackSource. At this point, we "forget" any latency that
might occur before this point, and audio/video sync consequently
suffers.

Bug: webrtc:9991
Change-Id: I7b1aaca9a60a978b9195dd5e5eed4779a0055607
Reviewed-on: https://webrtc-review.googlesource.com/c/110783
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25654}
2018-11-15 11:41:06 +00:00
Jonas Olsson
f01d8c8d92 Add android bindings for PeerConnectionState.
This change makes it possible for android apps to use the new standards-compliant PeerConnectionState.

Bug: webrtc:9977
Change-Id: Iad19c38e664a59e86879715ec7a04a59a9894bee
Reviewed-on: https://webrtc-review.googlesource.com/c/109883
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25652}
2018-11-15 10:57:26 +00:00
Magnus Jedvert
3bc696fe48 Android EglRenderer: Replace unicoce character with ascii character
We are currently trying to print a nice "μs" to the log, but this often
ends up as a weird character. This CL replaces the unicode 'μ' to a
simple ascii 'u'.

TBR=sakal

Bug: None
Change-Id: Ibe90e0d2f12004676fc531aec0a2b33d59a8cb3f
Reviewed-on: https://webrtc-review.googlesource.com/c/110608
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25636}
2018-11-14 13:32:06 +00:00
Jonathan Yu
50f60cb4b3 Rename software codec classes and move them into api/
We want clients to be able to build their own factories around these
codecs.

Bug: webrtc:7925
Change-Id: Ia8f62d5d85e63ac6e3eb402c5996d8b986625615
Reviewed-on: https://webrtc-review.googlesource.com/c/109529
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Jonathan Yu <yujo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#25543}
2018-11-07 12:24:14 +00:00
Magnus Jedvert
361dbc1973 Android: Add option to set presentation timestamp in EglRenderer
Bug: b/119004693
Change-Id: I78b676a4417ac313e7fbbea009c8dd586707b1af
Reviewed-on: https://webrtc-review.googlesource.com/c/109503
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25517}
2018-11-06 12:11:20 +00:00
Bjorn Mellem
a9bbd86849 Add a configuration parameter for using the media transport for data channels.
Adds a field |use_media_transport_for_data_channels| to RTCConfiguration.
PeerConnection requires a media transport factory to be set if this bit
is set.  As with |use_media_transport|, the value may not be modified
after setting the local or remote description.

If either |use_media_transport| or |use_media_transport_for_data_channel| is
set, PeerConnection uses its media transport factory when creating a JSEP
transport controller.

PeerConnection stops unconditionally using media transport in
CreateVoiceChannel, as it may be present only for use in data channels.  It uses
the media transport if it is present and |use_media_transport| is set.

Bug: webrtc:9719
Change-Id: I59d4ce8f7531fd19d9c17eefe033f063f663ebcc
Reviewed-on: https://webrtc-review.googlesource.com/c/109041
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25507}
2018-11-05 21:05:22 +00:00
philipel
ee49f7087f Remove VideoEncoder::SetChannelParameters.
The SetChannelParameters function was used when WebRTC supported decoding
with errors, which we no longer do.

This cleanup CL is related to the work tracked by 9946.

Bug: webrtc:9946
Change-Id: Id2d5ed23031388f890c42651bfbe5f79eda701e5
Reviewed-on: https://webrtc-review.googlesource.com/c/108861
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25505}
2018-11-05 17:37:07 +00:00
Lennart Kolmodin
d4a68bd932 Implement Injectable Audio Codecs for the Java SDK.
Support Injectable Audio Codecs from the Java SDK.
The PeerConnectionFactory.Builder defaults to
BuiltinAudio(Encoder|Decoder)Factory, but other implementations are
permitted via the Audio(Encoder|Decoder)FactoryFactory interface.

Bug: webrtc:9916
Change-Id: I61ad4a6e57666bc1be79daf5f40b129e0eacad84
Reviewed-on: https://webrtc-review.googlesource.com/c/107711
Commit-Queue: Lennart Kolmodin <kolmodin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25478}
2018-11-02 08:25:39 +00:00
Magnus Jedvert
06aa209645 Add support to adapt video without preserving aspect ratio
This is implemented by allowing users to set two different aspect
ratios, one for landscape input and one for portrait input. This extra
control might be useful in other scenarios as well.

Bug: webrtc:9903
Change-Id: I91676737f4aa1f5d94cfe79ac51d5f866779945b
Reviewed-on: https://webrtc-review.googlesource.com/c/108086
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25387}
2018-10-26 12:30:32 +00:00
Benjamin Wright
8c27ccac75 Promotoing webrtc::CryptoOptions to RTCConfiguration.
With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.

To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.

Got LGTM offline from Sami, adding him to TBR if he has any further comments.

TBR=sakal@webrtc.org

Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
2018-10-25 17:59:48 +00:00
Qingsi Wang
51cc30c124 Fix a null reference bug in NetworkMonitorAutoDetect.getNetworkState.
Bug: webrtc:9168
Change-Id: Ib3e41db9ff347adfca3b12df6c0fd3293c8ea483
Reviewed-on: https://webrtc-review.googlesource.com/c/107220
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#25279}
2018-10-19 21:18:35 +00:00
Sami Kalliomäki
0d26c9944c Set renderThreadHandler to null on uncaught exception in EglRenderer.
This should prevent us from posting and deadlocking if EglRenderer
thread crashes.

Bug: b/117400268
Change-Id: I978738249917cb5194917b0b2b12f67bb2a8642e
Reviewed-on: https://webrtc-review.googlesource.com/c/107043
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25271}
2018-10-19 13:16:41 +00:00