121 Commits

Author SHA1 Message Date
Alex Glaznev
7fbe2ee224 Make EGL10 class public.
To allow accessing its function for 3rd party apps.

BUG=b/30502777
R=jiayl@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#13595}
2016-08-01 20:31:42 +00:00
Honghai Zhang
c980062242 Use a new method (android_setsocknetwork) to bind socket to network in Android M and later.
The old method (setNetworkForSocket) is not supported in Android-N.

BUG=
R=glaznev@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13591}
2016-08-01 16:27:43 +00:00
magjed
43e15bb9f0 Android Camera2Enumerator: Remove CameraAccessException to avoid VerifyError
Apparently, a class will fail with VerifyError if it contains catch
statements with an Exception from a newer API, even if the code is never
executed. This happens only on Android versions before 4.4.2 and is a
bug. See https://code.google.com/p/android/issues/detail?id=209129 for
more info.

BUG=b/30376736

Review-Url: https://codereview.webrtc.org/2185833003
Cr-Commit-Position: refs/heads/master@{#13542}
2016-07-27 15:25:13 +00:00
sakal
81031d6dca Cleanup code in Camera2.
BUG=b/30423446
NOTRY=True

Review-Url: https://codereview.webrtc.org/2189473003
Cr-Commit-Position: refs/heads/master@{#13540}
2016-07-27 12:25:49 +00:00
sakal
f22d3c48fa Filter to formats that match device sensor array aspect ratio on pre-LMR1 devices offering only legacy camera2 support.
There is a bug on pre LMR1 devices that only support legacy
implementation of camera2 API where aspect ratio of the camera is
incorrect if the output format doesn't match the aspect ratio of the
sensor array. On these devices, we want to disable the output formats that
have different aspect ratio.

Review-Url: https://codereview.webrtc.org/2181803003
Cr-Commit-Position: refs/heads/master@{#13538}
2016-07-27 08:28:51 +00:00
deadbeef
5f5504f218 Don't crash if createDataChannel fails.
It can fail in some real circumstances, such as when IDs are exhausted
or you explicitly try to create one with an already-used ID.

Review-Url: https://codereview.webrtc.org/2181933002
Cr-Commit-Position: refs/heads/master@{#13535}
2016-07-26 17:31:14 +00:00
sakal
63d3f8390e Fix a bug where Camera2 tried to start on FPS ranges multiplied by 1000.
This bug caused Camera2Capturer to not work on Samsung Galaxy S7.

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

Review-Url: https://codereview.webrtc.org/2174343002
Cr-Commit-Position: refs/heads/master@{#13529}
2016-07-26 12:43:39 +00:00
sakal
2fa14623cc Convert Android camera tests to use the new createVideoSource API.
Review-Url: https://codereview.webrtc.org/2171023003
Cr-Commit-Position: refs/heads/master@{#13528}
2016-07-26 12:41:43 +00:00
Sami Kalliomaki
ff0a96d502 Fix a bug where SourceState on AndroidVideoTrackSource is set to live even on failure.
This affects only Android applications using the new createVideoSource API.

R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13511}
2016-07-23 12:45:25 +00:00
Sami Kalliomaki
16032126ed This implementation greatly simplifies Android video capturing stack. The old
stack will be removed soon in a separate CL. Constraints will not be supported
in the new implementation. Apps can request a format directly and the closest
supported format will be selected.

Changes needed from the apps:
1. Use the new createVideoSource without constraints.
2. Call startCapture manually.
3. Don't call videoSource.stop/restart, use startCapture/stopCapture instead.

R=magjed@webrtc.org
TBR=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13504}
2016-07-20 14:13:20 +00:00
hbos
3d70fef3f3 Remove DtlsIdentityStoreInterface, it is no longer used.
This interface and its implementations have been replaced by
rtc::RTCCertificateGeneratorInterface.

Removes dtlsidentitystore.h, updates .gyp/gn and removes old #includes.

BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2034013003
Cr-Commit-Position: refs/heads/master@{#13432}
2016-07-11 11:10:14 +00:00
Magnus Jedvert
27dcacdbc1 Android: Add initialize() function to VideoCapturer interface
This CL moves some arguments, e.g. the camera thread, from the startCapture() function to a new initialize() function. These arguments are constant during the lifetime of the VideoCapturer, and are not changed for different startCapture() calls. Setting them once allows for simplifications in the code.

This CL also fixes a bug for camera2 where pendingCameraSwitchSemaphore might not be released when switchEventsHandler is null.

In camera1, the handler lock and 'cameraThreadHandler == null' check is replaced with an atomic boolean to check if the camera is stopped.

BUG=webrtc:5519
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13404}
2016-07-07 08:00:35 +00:00
Magnus Jedvert
44abcb5e41 Android SurfaceViewRenderer: Fix eglBase null pointer exception
Add null checks for eglBase, and detach the egl context in
SurfaceViewRenderer.surfaceDestroyed().

BUG=webrtc:6032
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13396}
2016-07-06 14:16:23 +00:00
ivoc
0c6f0f6d96 Fix for the JNI interface of RtcEventLog functions.
BUG=webrtc:4741

Review-Url: https://codereview.webrtc.org/2128483002
Cr-Commit-Position: refs/heads/master@{#13393}
2016-07-06 11:34:34 +00:00
ivoc
14d5dbe5b3 Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop functions for the Rtc Eventlog non-virtual." and "Fix for RtcEventLog ObjC interface"
The breaking tests in Chromium have been temporarily disabled, they will be fixed and reenabled soon.

Original CLs: https://codereview.webrtc.org/1748403002/, https://codereview.webrtc.org/2107253002/ and https://codereview.webrtc.org/2106103003/.

TBR=solenberg@webrtc.org,tommi@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,tkchin@webrtc.org
BUG=webrtc:4741, webrtc:5603, chromium:609749

Review-Url: https://codereview.webrtc.org/2110113003
Cr-Commit-Position: refs/heads/master@{#13379}
2016-07-04 14:07:03 +00:00
Honghai Zhang
d78ecf78c9 Add pruneTurnPorts to the java RTCConfiguration.
And adds a log about the flag.

BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13369}
2016-07-01 21:40:53 +00:00
Taylor Brandstetter
e9851116e2 Adding API for "presume writable when fully relayed" ICE option.
For explanation of what this is, see:
https://codereview.webrtc.org/2063823008/

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

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

Cr-Commit-Position: refs/heads/master@{#13366}
2016-07-01 18:11:22 +00:00
Magnus Jedvert
897d932e0b Android SurfaceViewRenderer: Fix deadlock
Deadlock caused by two methods grabbing two locks in the opposite order:
renderFrame():
  handlerLock
    layoutLock
onMeasure():
  layoutLock
    handlerLock

This CL removs the nested locking to fix the deadlock and make it less
error prone for the future.

BUG=webrtc:6003
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13364}
2016-07-01 13:52:25 +00:00
sakal
d34a711f22 Reland of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2106333005/ )
Reason for revert:
Issues fixed

Original issue's description:
> Revert of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2111823002/ )
>
> Reason for revert:
> Breaks downstream dependencies
>
> Original issue's description:
> > Combine webrtc/api/java/android and webrtc/api/java/src.
> >
> > It used to be that there was a Java api for devices not running Android
> > but that is no longer the case. I combined the directories and made
> > the folder structure chromium style.
> >
> > BUG=webrtc:6067
> > R=magjed@webrtc.org, tommi@webrtc.org
> >
> > Committed: ceefe20dd6
>
> TBR=magjed@webrtc.org,tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6067
>
> Committed: 9b0dc622d4

TBR=magjed@webrtc.org,tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6067

Review-Url: https://codereview.webrtc.org/2111923003
Cr-Commit-Position: refs/heads/master@{#13363}
2016-07-01 12:10:59 +00:00
Sami Kalliomaki
9b0dc622d4 Revert of Combine webrtc/api/java/android and webrtc/api/java/src. (patchset #1 id:1 of https://codereview.webrtc.org/2111823002/ )
Reason for revert:
Breaks downstream dependencies

Original issue's description:
> Combine webrtc/api/java/android and webrtc/api/java/src.
>
> It used to be that there was a Java api for devices not running Android
> but that is no longer the case. I combined the directories and made
> the folder structure chromium style.
>
> BUG=webrtc:6067
> R=magjed@webrtc.org, tommi@webrtc.org
>
> Committed: ceefe20dd6

TBR=magjed@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6067

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

Cr-Commit-Position: refs/heads/master@{#13357}
2016-07-01 07:37:49 +00:00
Sami Kalliomaki
ceefe20dd6 Combine webrtc/api/java/android and webrtc/api/java/src.
It used to be that there was a Java api for devices not running Android
but that is no longer the case. I combined the directories and made
the folder structure chromium style.

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

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

Cr-Commit-Position: refs/heads/master@{#13356}
2016-07-01 07:09:09 +00:00