534 Commits

Author SHA1 Message Date
sakal
6bdcefce80 Add VideoSink interface to SurfaceViewRenderer.
BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/3002563002
Cr-Commit-Position: refs/heads/master@{#19347}
2017-08-15 08:56:02 +00:00
andersc
c288dab6e2 Ensure UIView.layer is accessed on main thread.
BUG=webrtc:7829

Review-Url: https://codereview.webrtc.org/3002583002
Cr-Commit-Position: refs/heads/master@{#19345}
2017-08-15 07:36:00 +00:00
sakal
0ba43b5a20 Add support for adding VideoSinks to VideoTracks.
VideoSinks receive the new kind of VideoFrames and will replace
VideoRenderers. Converting from old texture frames to VideoFrames will
involve conversion to I420 so it is not recommended to use VideoSinks
before all sources produce VideoFrames.

BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/3002553002
Cr-Commit-Position: refs/heads/master@{#19335}
2017-08-14 12:17:49 +00:00
sakal
bf08060971 Update EglRenderer to use lambdas.
BUG=webrtc:8084

Review-Url: https://codereview.webrtc.org/3002433002
Cr-Commit-Position: refs/heads/master@{#19321}
2017-08-11 08:42:43 +00:00
sakal
be910460e0 Add support for capturers to capture VideoFrames.
BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/2982213002
Cr-Commit-Position: refs/heads/master@{#19318}
2017-08-11 07:26:05 +00:00
sakal
b5f5bdc5cb Support Java VideoFrames in MediaCodecVideoEncoder.
BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/2997663002
Cr-Commit-Position: refs/heads/master@{#19304}
2017-08-10 11:15:42 +00:00
sakal
71a62b9a19 Fix a crash in I420Frame.toString for texture frames.
BUG=webrtc:8073
R=kthelgason

Review-Url: https://codereview.webrtc.org/2997693002
Cr-Commit-Position: refs/heads/master@{#19302}
2017-08-10 09:12:24 +00:00
zstein
03adb7c6dc objc wrapper for PeerConnection::SetBitrate
BUG=webrtc:7395

Review-Url: https://codereview.webrtc.org/2877933004
Cr-Commit-Position: refs/heads/master@{#19294}
2017-08-09 21:29:42 +00:00
deadbeef
7a24688f6f Adding comments explaining Java createSender and setTrack methods.
This has been a frequent source of confusion, especially since the
method names don't match anything in the standard exactly.

BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2994733002
Cr-Commit-Position: refs/heads/master@{#19290}
2017-08-09 15:40:10 +00:00
sakal
5ca60cc91c Implement AndroidVideoBuffer::ToI420.
BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/2991633002
Cr-Commit-Position: refs/heads/master@{#19284}
2017-08-09 12:25:49 +00:00
sakal
5a2c2b3c35 Remove maximum frametime to allow the camera to adjust based on the lighting conditions.
BUG=webrtc:7777

Review-Url: https://codereview.webrtc.org/2998683002
Cr-Commit-Position: refs/heads/master@{#19281}
2017-08-09 11:10:59 +00:00
deadbeef
6327b6491e Adding deadbeef@ as owner of Objc-C PeerConnection-related headers.
deadbeef@'s team in Kirkland works on the C++ PeerConnection
implementation, and often makes changes to the Java/Obj-C binding code
as new features are added. But the general Obj-C/Android owners are in
Stockholm. So adding deadbeef@ as an owner of this code should help
expedite code reviews for simple API changes.

BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2998443002
Cr-Commit-Position: refs/heads/master@{#19259}
2017-08-07 17:00:42 +00:00
magjed
73c0eb5014 ObjC: Implement HW codecs in ObjC instead of C++
The current ObjC HW encoder is implemented as a C++
webrtc::VideoEncoder. We then wrap it two times in the following way:
webrtc::VideoEncoder -> RTCVideoEncoder -> webrtc::VideoEncoder.
This was originally done to minimize the code diff when landing the
injectable encoder.

This CL removes the first wrapping and implements the ObjC HW encoder
as a RTCVideoEncoder directly. Similarly, the decoder is implemented
as a RTCVideoDecoder directly.

Based on andersc@ CL: https://codereview.webrtc.org/2978623002/.

BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2987413002
Cr-Commit-Position: refs/heads/master@{#19255}
2017-08-07 13:55:28 +00:00
kthelgason
d48f56de1f Destroy compression session instead of reset it on release.
This will prevent one extra initialization of the encoder each time
it's recreated.

BUG=None

Review-Url: https://codereview.webrtc.org/2992233002
Cr-Commit-Position: refs/heads/master@{#19250}
2017-08-04 17:18:43 +00:00
magjed
512bee3dee ObjC: Support non-native frames in encoder
Frames might be non-native, i.e. normal I420 frames, and we should
handle that in the encoder.

BUG=webrtc:7785,webrtc:7924

Review-Url: https://codereview.webrtc.org/2992943002
Cr-Commit-Position: refs/heads/master@{#19245}
2017-08-04 09:05:32 +00:00
zstein
d89b0bcc8a JNI wrapper for PeerConnection::SetBitrate.
BUG=webrtc:7395

Review-Url: https://codereview.webrtc.org/2868413004
Cr-Commit-Position: refs/heads/master@{#19243}
2017-08-03 18:11:40 +00:00
deadbeef
0d48c69331 Relanding: Break peerconnection_jni.cc into multiple files, in "pc" directory.
Relanding after adding "androidnetworkmonitor_jni.h" header to jni/
directory, since some clients were including it directly.

This CL breaks peerconnection_jni.cc apart, into one file for each
class. It also moves the methods for converting between C++/Java
structs into "java_native_conversion.cc", and uses a consistent naming
scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
"pc" directory, of which deadbeef@ is added as an owner.

It also moves some relevant files to the "pc" directory that belong
there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
rtcstatscollectorcallbackwrapper. This directory is intended to hold
all the files that deal with the PeerConnection API specifically, or
related classes (like DataChannel, RtpSender, MediaStreamTrack) that
are tied to it closely.

BUG=webrtc:8055

Review-Url: https://codereview.webrtc.org/2992103002
Cr-Commit-Position: refs/heads/master@{#19241}
2017-08-03 17:20:17 +00:00
zhihuang
1b1daec013 Revert of Break peerconnection_jni.cc into multiple files, in "pc" directory. (patchset #6 id:100001 of https://codereview.webrtc.org/2992103002/ )
Reason for revert:
Borken in the internal projects.

Original issue's description:
> Break peerconnection_jni.cc into multiple files, in "pc" directory.
>
> This CL breaks peerconnection_jni.cc apart, into one file for each
> class. It also moves the methods for converting between C++/Java
> structs into "java_native_conversion.cc", and uses a consistent naming
> scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
> "pc" directory, of which deadbeef@ is added as an owner.
>
> It also moves some relevant files to the "pc" directory that belong
> there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
> rtcstatscollectorcallbackwrapper. This directory is intended to hold
> all the files that deal with the PeerConnection API specifically, or
> related classes (like DataChannel, RtpSender, MediaStreamTrack) that
> are tied to it closely.
>
> deadbeef@webrtc.org is added as an owner of the new "pc" subdirectory.
>
> BUG=webrtc:8055
>
> Review-Url: https://codereview.webrtc.org/2992103002
> Cr-Commit-Position: refs/heads/master@{#19223}
> Committed: dd7d8f1b60

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

Review-Url: https://codereview.webrtc.org/2989323002
Cr-Commit-Position: refs/heads/master@{#19226}
2017-08-03 01:01:05 +00:00
deadbeef
dd7d8f1b60 Break peerconnection_jni.cc into multiple files, in "pc" directory.
This CL breaks peerconnection_jni.cc apart, into one file for each
class. It also moves the methods for converting between C++/Java
structs into "java_native_conversion.cc", and uses a consistent naming
scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
"pc" directory, of which deadbeef@ is added as an owner.

It also moves some relevant files to the "pc" directory that belong
there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
rtcstatscollectorcallbackwrapper. This directory is intended to hold
all the files that deal with the PeerConnection API specifically, or
related classes (like DataChannel, RtpSender, MediaStreamTrack) that
are tied to it closely.

deadbeef@webrtc.org is added as an owner of the new "pc" subdirectory.

BUG=webrtc:8055

Review-Url: https://codereview.webrtc.org/2992103002
Cr-Commit-Position: refs/heads/master@{#19223}
2017-08-02 22:05:10 +00:00
magjed
a67bd9d641 Add denicija@ and kthelgason@ as owners of webrtc/sdk/objc
It's time.

TBR=denicija@webrtc.org,kthelgason@webrtc.org
NOTRY=TRUE
BUG=NONE

Review-Url: https://codereview.webrtc.org/2994493002
Cr-Commit-Position: refs/heads/master@{#19218}
2017-08-02 14:27:13 +00:00
magjed
5805c9dbda ObjC: Add implementationName for injectable codecs
BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2987253003
Cr-Commit-Position: refs/heads/master@{#19213}
2017-08-02 12:26:28 +00:00
magjed
5dfac33dfd ObjC: Fix quality scaling for injected encoders
We missed to implement quality scaling in the original CL
https://codereview.webrtc.org/2977213002/. This CL implements it.

Note that the ObjC interface for scalingSettings is slightly different from the C++
interface in that we require explicit QP thresholds to turn quality scaling on, i.e.
we don't provide default values. I think this is more modular as we want to move
codec specific knowledge out from the WebRTC core. I would like to update the
C++ webrtc::VideoEncoder interface to do the same in another CL.

BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2991123002
Cr-Commit-Position: refs/heads/master@{#19202}
2017-08-01 15:07:59 +00:00
magjed
1c12b818b3 ObjC RTCEAGLVideoVideo: Check GL context is non-nil in constructor
RTCEAGLVideoVideo ensureGLContext has been observed to fail because the
GL context is nil. This CL checks the GL context is non-nil in the ctor
instead.

BUG=b/62865840

Review-Url: https://codereview.webrtc.org/2991863002
Cr-Commit-Position: refs/heads/master@{#19189}
2017-07-31 16:11:46 +00:00
magjed
8eab09c77b ObjC style fix for injectable video codecs
This CL fixes some ObjC style issues from CL
https://codereview.webrtc.org/2977213002/.

BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2989803002
Cr-Commit-Position: refs/heads/master@{#19186}
2017-07-31 09:56:35 +00:00
sakal
836f60cda1 Move matrix from VideoFrame to TextureBuffer.
Previously, the matrix in VideoFrame was used to crop and scale the
frame. This caused complications because webrtc::VideoFrame doesn't
include a matrix. cropAndScale method is added to VideoBuffer class for
cropping and scaling instead.

BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/2990583002
Cr-Commit-Position: refs/heads/master@{#19179}
2017-07-28 14:12:23 +00:00
deadbeef
28e2919cfd Adding Android binding for RTCConfiguration::max_ipv6_networks.
BUG=webrtc:7703

Review-Url: https://codereview.webrtc.org/2984863002
Cr-Commit-Position: refs/heads/master@{#19172}
2017-07-27 16:14:38 +00:00
sakal
9eb3d19ec0 Fix a crash in PeerConnectionFactory.SetVideoHwAccelerationOptions.
BUG=webrtc:8035

Review-Url: https://codereview.webrtc.org/2992523002
Cr-Commit-Position: refs/heads/master@{#19171}
2017-07-27 15:23:58 +00:00
sakal
2d4040ed0e Add a comment that RTCAVFoundationVideoSource is deprecated.
RTCAVFoundationVideoSource is deprecated and will removed after a few
weeks.

BUG=webrtc:7177
R=magjed@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2992613002
Cr-Commit-Position: refs/heads/master@{#19170}
2017-07-27 14:48:57 +00:00
deadbeef
2059bb3e4b Adding Obj-C binding for RTCConfiguration::max_ipv6_networks.
BUG=webrtc:7703

Review-Url: https://codereview.webrtc.org/2988553004
Cr-Commit-Position: refs/heads/master@{#19162}
2017-07-27 01:25:43 +00:00
deadbeef
54c721541d Fix issues with NetworkMonitor singleton when used by multiple clients.
When you create multiple "PeerConnectionFactory"s, they end up using
the same NetworkMonitor singleton. But the second one's
"AndroidNetworkMonitor" class (in C++) wasn't getting the expected
network list update, and as a result it wasn't binding sockets to
networks successfully, acting as if the networks didn't exist.

The solution is just to move "updateActiveNetworkList" to
"startMonitoring". This CL also does some other minor
cleanup/refactoring, and fixes a more corner-casey issue where, if the
first PeerConnection is destroyed, the second one would stop receiving
network updates.

BUG=webrtc:7946

Review-Url: https://codereview.webrtc.org/2990693002
Cr-Commit-Position: refs/heads/master@{#19156}
2017-07-26 18:56:49 +00:00
jtteh
3b673c66a4 Removed file RTCCameraVideoCapturer.mm that isn't needed
Also added post commit review changes.

BUG=webrtc:7898

Review-Url: https://codereview.webrtc.org/2988783002
Cr-Commit-Position: refs/heads/master@{#19145}
2017-07-25 22:48:39 +00:00
jtteh
61b0ed039d [iOS] Fix incorrectly oriented frames when rapidly switching between cameras.
During a call, with both phones in horizontal or landscape mode, rapidly switching between the front and back camera sometimes causes the remote video to be shown upside down.

There seems to be a race condition when setting the rotation based on the orientation of the device and which camera we're using.

So use the active input's camera to check instead of the client state.

BUG=webrtc:7898

Review-Url: https://codereview.webrtc.org/2964703002
Cr-Commit-Position: refs/heads/master@{#19139}
2017-07-25 16:35:55 +00:00
kthelgason
fb143127d7 Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2980173002/ )
Reason for revert:
Relanding after fixing issues with no video.

Original issue's description:
> Revert of Injectable Obj-C video codecs (patchset #2 id:370001 of https://codereview.webrtc.org/2979983002/ )
>
> Reason for revert:
> Still having problems with no video. Reverting.
> Once no video is visible, no video is available from then on even if the callee app is in the foreground.
>
>
> Original issue's description:
> > Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2979973002/ )
> >
> > Reason for revert:
> > Fix the broken build file
> >
> > Original issue's description:
> > > Revert of Injectable Obj-C video codecs (patchset #3 id:400001 of https://codereview.webrtc.org/2981583002/ )
> > >
> > > Reason for revert:
> > > Breaks bots. Build file incorrect.
> > >
> > > Original issue's description:
> > > > Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2975963002/ )
> > > >
> > > > Reason for revert:
> > > > New CL for fixing the issues
> > > >
> > > > Original issue's description:
> > > > > Revert of Injectable Obj-C video codecs (patchset #8 id:140001 of https://codereview.webrtc.org/2966023002/ )
> > > > >
> > > > > Reason for revert:
> > > > > Causes no video in certain scenarios. Please come up with a test plan or unit test to prevent such problems in the future.
> > > > >
> > > > > Original issue's description:
> > > > > > Injectable Obj-C video codecs
> > > > > >
> > > > > > Initial CL for this effort, with a working RTCVideoEncoder/Decoder for H264
> > > > > > (wrapping the VideoToolbox codec).
> > > > > >
> > > > > > Some notes / things left to do:
> > > > > >   - There are some hard-coded references to codec types that are supported by
> > > > > >     webrtc::VideoCodec, cricket::VideoCodec, webrtc::CodecSpecificInfo etc
> > > > > >     since we need to convert to/from these types in ObjCVideoEncoder/Decoder.
> > > > > >     These types would need to be more codec agnostic to avoid this.
> > > > > >   - Most interfaces are borrowed from the design document for injectable
> > > > > >     codecs in Android. Some data in the corresponding C++ classes is discarded
> > > > > >     when converting to the Obj-C version, since it has fewer fields. I have not
> > > > > >     verified whether all data that we do keep is needed, or whether we might be
> > > > > >     losing anything useful in these conversions.
> > > > > >   - Implement the VideoToolbox codec code directly in the RTCVideoEncoderH264
> > > > > >     classes, instead of wrapping webrtc::H264VideoToolboxEncoder / decoder.
> > > > > >     Eliminates converting between ObjC/C++ types outside the ObjCVideoEncoder/
> > > > > >     Decoder wrapper classes.
> > > > > >   - List the injected codec factory's supported codecs in the list of codecs in
> > > > > >     AppRTCMobile.
> > > > > >
> > > > > > BUG=webrtc:7924
> > > > > > R=magjed@webrtc.org
> > > > > >
> > > > > > Review-Url: https://codereview.webrtc.org/2966023002 .
> > > > > > Cr-Commit-Position: refs/heads/master@{#18928}
> > > > > > Committed: a0349c138d
> > > > >
> > > > > TBR=magjed@webrtc.org,andersc@webrtc.org
> > > > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > > > BUG=webrtc:7924
> > > > > NOTRY=true
> > > > >
> > > > > Review-Url: https://codereview.webrtc.org/2975963002
> > > > > Cr-Commit-Position: refs/heads/master@{#18979}
> > > > > Committed: 1095ada7ad
> > > >
> > > > R=magjed@webrtc.org
> > > > TBR=tkchin@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=webrtc:7924
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2981583002 .
> > > > Cr-Commit-Position: refs/heads/master@{#19002}
> > > > Committed: a5f1de1e65
> > >
> > > TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,andersc@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:7924
> > >
> > > Review-Url: https://codereview.webrtc.org/2979973002
> > > Cr-Commit-Position: refs/heads/master@{#19004}
> > > Committed: 81d40ee149
> >
> > TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,sprang@webrtc.org
> > BUG=webrtc:7924
> >
> > Review-Url: https://codereview.webrtc.org/2979983002
> > Cr-Commit-Position: refs/heads/master@{#19005}
> > Committed: 732a3437da
>
> TBR=magjed@webrtc.org,tkchin@webrtc.org,sprang@webrtc.org,haysc@webrtc.org,andersc@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7924
>
> Review-Url: https://codereview.webrtc.org/2980173002
> Cr-Commit-Position: refs/heads/master@{#19036}
> Committed: 860f729816

TBR=magjed@webrtc.org,tkchin@webrtc.org,sprang@webrtc.org,haysc@webrtc.org,andersc@webrtc.org,jtteh@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2977213002
Cr-Commit-Position: refs/heads/master@{#19135}
2017-07-25 14:55:58 +00:00
oprypin
d0727bfd45 Fix NSInteger formatting warning from clang 6
"error: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead"
Casting to long is already a common practice in the code base.

This has been blocking the Chromium roll which contains an update to clang 6.0.0

BUG=None

Review-Url: https://codereview.webrtc.org/2987693002
Cr-Commit-Position: refs/heads/master@{#19127}
2017-07-25 09:04:58 +00:00
korniltsev.anatoly
f3a48ab6dc Delete unused field from AndroidVideoTrackSource
BUG=None

Review-Url: https://codereview.webrtc.org/2974713002
Cr-Commit-Position: refs/heads/master@{#19117}
2017-07-24 08:06:39 +00:00
sakal
8ac955be2c Set target API to 18 for MediaCodecUtils.
Target API 18 is needed for texture mode encoding.

BUG=None

Review-Url: https://codereview.webrtc.org/2982403002
Cr-Commit-Position: refs/heads/master@{#19107}
2017-07-21 10:30:02 +00:00
ehmaldonado
f6a861ab6c Remove remains of webrtc/base
All downstream code have been updated to the new location.

In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS

Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn

BUG=webrtc:7634
TBR=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
2017-07-19 17:40:47 +00:00
sakal
9c0e0fa687 Fix fromAndroidGraphicsMatrix to use column-major order for output.
BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/2976423002
Cr-Commit-Position: refs/heads/master@{#19089}
2017-07-19 08:24:55 +00:00
Bjorn Mellem
0cf9a4a482 Add texture support to HardwareVideoEncoder.
HardwareVideoEncoderFactory can now take an EglBase.Context on creation.
When it does, it creates video encoders in texture mode.  It uses the
COLOR_FormatSurface colorFormat.  It passes the EglBase.Context to the
HardwareVideoEncoder.

The HardwareVideoEncoder sets up an input surface for its codec and handles
incoming frames by drawing them onto the input surface.

BUG=webrtc:7760
R=pthatcher@webrtc.org, sakal@webrtc.org

Review-Url: https://codereview.webrtc.org/2977153003 .
Cr-Commit-Position: refs/heads/master@{#19083}
2017-07-18 20:19:27 +00:00
Bjorn Mellem
8fb23618d8 Add texture support to HardwareVideoDecoder.
HardwareVideoDecoder is now a listener for SurfaceTextureHelper.  It takes a
SurfaceTextureHelper on construction.  If it is non-null, it operates in texture
mode instead of byte-buffer mode.

When in texture mode, the HardwareVideoDecoder renders output frames to a Surface,
listens for the texture frame to become available, wraps it in a VideoFrame, and
pushes it to the decoder callback.

As in MediaCodecVideoDecoder, it may queue up to three buffers while waiting for
the surface to become available for rendering.  If more buffers are queued, it will
drop the oldest.

This change also implements the VideoFrame.TextureBuffer and reorganizes code
for wrapping an existing ByteBuffer into an I420Buffer.  This makes it easier
to implement the texture buffer's ToI420() method.

BUG=webrtc:7760
R=pthatcher@webrtc.org, sakal@webrtc.org

Review-Url: https://codereview.webrtc.org/2977643002 .
Cr-Commit-Position: refs/heads/master@{#19081}
2017-07-18 18:33:44 +00:00
sakal
fcf97c3b75 Fix fullscreen scaling in AppRTCMobile.
The surface view renderer size was set to match parent so it couldn't
adjust based on the frame size. The size is now set to wrap_content
which allows the renderer to adjust. The root element of the call
activity is changed to FrameLayout to allow the renderer to center.

requestLayout is added to SurfaceView setScalingType so onMeasure gets
called again.

BUG=webrtc:7901

Review-Url: https://codereview.webrtc.org/2978173002
Cr-Commit-Position: refs/heads/master@{#19073}
2017-07-18 12:01:08 +00:00
Steve Anton
d960a0c7d1 Android bindings for ice_regather_interval_range RTCConfiguration option
Bug: webrtc:7969
Change-Id: I3fbb723d35fa6cc4c7b92aa1e155b974e9fb0b55
Reviewed-on: https://chromium-review.googlesource.com/567698
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@chromium.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19062}
2017-07-17 20:09:43 +00:00
jtteh
860f729816 Revert of Injectable Obj-C video codecs (patchset #2 id:370001 of https://codereview.webrtc.org/2979983002/ )
Reason for revert:
Still having problems with no video. Reverting.
Once no video is visible, no video is available from then on even if the callee app is in the foreground.

Original issue's description:
> Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2979973002/ )
>
> Reason for revert:
> Fix the broken build file
>
> Original issue's description:
> > Revert of Injectable Obj-C video codecs (patchset #3 id:400001 of https://codereview.webrtc.org/2981583002/ )
> >
> > Reason for revert:
> > Breaks bots. Build file incorrect.
> >
> > Original issue's description:
> > > Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2975963002/ )
> > >
> > > Reason for revert:
> > > New CL for fixing the issues
> > >
> > > Original issue's description:
> > > > Revert of Injectable Obj-C video codecs (patchset #8 id:140001 of https://codereview.webrtc.org/2966023002/ )
> > > >
> > > > Reason for revert:
> > > > Causes no video in certain scenarios. Please come up with a test plan or unit test to prevent such problems in the future.
> > > >
> > > > Original issue's description:
> > > > > Injectable Obj-C video codecs
> > > > >
> > > > > Initial CL for this effort, with a working RTCVideoEncoder/Decoder for H264
> > > > > (wrapping the VideoToolbox codec).
> > > > >
> > > > > Some notes / things left to do:
> > > > >   - There are some hard-coded references to codec types that are supported by
> > > > >     webrtc::VideoCodec, cricket::VideoCodec, webrtc::CodecSpecificInfo etc
> > > > >     since we need to convert to/from these types in ObjCVideoEncoder/Decoder.
> > > > >     These types would need to be more codec agnostic to avoid this.
> > > > >   - Most interfaces are borrowed from the design document for injectable
> > > > >     codecs in Android. Some data in the corresponding C++ classes is discarded
> > > > >     when converting to the Obj-C version, since it has fewer fields. I have not
> > > > >     verified whether all data that we do keep is needed, or whether we might be
> > > > >     losing anything useful in these conversions.
> > > > >   - Implement the VideoToolbox codec code directly in the RTCVideoEncoderH264
> > > > >     classes, instead of wrapping webrtc::H264VideoToolboxEncoder / decoder.
> > > > >     Eliminates converting between ObjC/C++ types outside the ObjCVideoEncoder/
> > > > >     Decoder wrapper classes.
> > > > >   - List the injected codec factory's supported codecs in the list of codecs in
> > > > >     AppRTCMobile.
> > > > >
> > > > > BUG=webrtc:7924
> > > > > R=magjed@webrtc.org
> > > > >
> > > > > Review-Url: https://codereview.webrtc.org/2966023002 .
> > > > > Cr-Commit-Position: refs/heads/master@{#18928}
> > > > > Committed: a0349c138d
> > > >
> > > > TBR=magjed@webrtc.org,andersc@webrtc.org
> > > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > > BUG=webrtc:7924
> > > > NOTRY=true
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2975963002
> > > > Cr-Commit-Position: refs/heads/master@{#18979}
> > > > Committed: 1095ada7ad
> > >
> > > R=magjed@webrtc.org
> > > TBR=tkchin@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:7924
> > >
> > > Review-Url: https://codereview.webrtc.org/2981583002 .
> > > Cr-Commit-Position: refs/heads/master@{#19002}
> > > Committed: a5f1de1e65
> >
> > TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,andersc@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:7924
> >
> > Review-Url: https://codereview.webrtc.org/2979973002
> > Cr-Commit-Position: refs/heads/master@{#19004}
> > Committed: 81d40ee149
>
> TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,sprang@webrtc.org
> BUG=webrtc:7924
>
> Review-Url: https://codereview.webrtc.org/2979983002
> Cr-Commit-Position: refs/heads/master@{#19005}
> Committed: 732a3437da

TBR=magjed@webrtc.org,tkchin@webrtc.org,sprang@webrtc.org,haysc@webrtc.org,andersc@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2980173002
Cr-Commit-Position: refs/heads/master@{#19036}
2017-07-15 02:49:58 +00:00
Steve Anton
d295e407da Reinstate "iOS - Add iceRegatherIntervalRange."
This reverts commit 93adc3209b5ff10adaba54d5eab6b53bc2780685.

Reverted originally because it depended on a CL which was reverted.
That CL has been reinstated in:

https: //chromium-review.googlesource.com/#/c/572070/
Bug: webrtc:7969
Change-Id: I608bbeaaba02e84908433c8260cf236df0307a97
Reviewed-on: https://chromium-review.googlesource.com/572405
Reviewed-by: Zeke Chin <tkchin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19035}
2017-07-14 23:55:48 +00:00
tommi
e7251599a3 Reland of Make the default ctor of rtc::Thread, protected
This is a partial re-land. The change doesn't make the default Thread ctor protected anymore but it does mark it as deprecated and updates all use of it in WebRTC.

Original issue's description:

Make the default ctor of rtc::Thread, protected.
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.

The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.

BUG=none

Review-Url: https://codereview.webrtc.org/2977953002
Cr-Commit-Position: refs/heads/master@{#19031}
2017-07-14 21:44:46 +00:00
magjed
93adc3209b Revert of iOS - Add iceRegatherIntervalRange. (patchset #1 id:1 of https://codereview.webrtc.org/2976953002/ )
Reason for revert:
Blocks reverting:
https://chromium-review.googlesource.com/c/562505

Original issue's description:
> iOS - Add iceRegatherIntervalRange.
>
> BUG=webrtc:7969
>
> Review-Url: https://codereview.webrtc.org/2976953002
> Cr-Commit-Position: refs/heads/master@{#18997}
> Committed: 5e0ed36d74

TBR=haysc@webrtc.org,steveanton@webrtc.org,tkchin@webrtc.org

NOTRY=TRUE
BUG=webrtc:7969

Review-Url: https://codereview.webrtc.org/2979993003
Cr-Commit-Position: refs/heads/master@{#19023}
2017-07-14 14:59:05 +00:00
tserng
ff7acb19a1 Reset isFirstFrameRendered on init of SurfaceViewRenderer
If a SurfaceViewRenderer is reinitialized, the onFirstFrameRendered
callback is not fired.

Ensure that we reset the flag when the SurfaceViewRenderer is
initialized.

BUG=webrtc:7985

Review-Url: https://codereview.webrtc.org/2981793002
Cr-Commit-Position: refs/heads/master@{#19016}
2017-07-14 09:35:53 +00:00
Zeke Chin
c8f9230667 Remove OWNERS check for webrtc/sdk/BUILD.gn
Bug: 0
Change-Id: I3ae2fe48367bf3cac0ce1fb4b4cc2f096456a68a
Reviewed-on: https://chromium-review.googlesource.com/570822
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19015}
2017-07-14 09:12:42 +00:00
andersc
732a3437da Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2979973002/ )
Reason for revert:
Fix the broken build file

Original issue's description:
> Revert of Injectable Obj-C video codecs (patchset #3 id:400001 of https://codereview.webrtc.org/2981583002/ )
>
> Reason for revert:
> Breaks bots. Build file incorrect.
>
> Original issue's description:
> > Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2975963002/ )
> >
> > Reason for revert:
> > New CL for fixing the issues
> >
> > Original issue's description:
> > > Revert of Injectable Obj-C video codecs (patchset #8 id:140001 of https://codereview.webrtc.org/2966023002/ )
> > >
> > > Reason for revert:
> > > Causes no video in certain scenarios. Please come up with a test plan or unit test to prevent such problems in the future.
> > >
> > > Original issue's description:
> > > > Injectable Obj-C video codecs
> > > >
> > > > Initial CL for this effort, with a working RTCVideoEncoder/Decoder for H264
> > > > (wrapping the VideoToolbox codec).
> > > >
> > > > Some notes / things left to do:
> > > >   - There are some hard-coded references to codec types that are supported by
> > > >     webrtc::VideoCodec, cricket::VideoCodec, webrtc::CodecSpecificInfo etc
> > > >     since we need to convert to/from these types in ObjCVideoEncoder/Decoder.
> > > >     These types would need to be more codec agnostic to avoid this.
> > > >   - Most interfaces are borrowed from the design document for injectable
> > > >     codecs in Android. Some data in the corresponding C++ classes is discarded
> > > >     when converting to the Obj-C version, since it has fewer fields. I have not
> > > >     verified whether all data that we do keep is needed, or whether we might be
> > > >     losing anything useful in these conversions.
> > > >   - Implement the VideoToolbox codec code directly in the RTCVideoEncoderH264
> > > >     classes, instead of wrapping webrtc::H264VideoToolboxEncoder / decoder.
> > > >     Eliminates converting between ObjC/C++ types outside the ObjCVideoEncoder/
> > > >     Decoder wrapper classes.
> > > >   - List the injected codec factory's supported codecs in the list of codecs in
> > > >     AppRTCMobile.
> > > >
> > > > BUG=webrtc:7924
> > > > R=magjed@webrtc.org
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2966023002 .
> > > > Cr-Commit-Position: refs/heads/master@{#18928}
> > > > Committed: a0349c138d
> > >
> > > TBR=magjed@webrtc.org,andersc@webrtc.org
> > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > BUG=webrtc:7924
> > > NOTRY=true
> > >
> > > Review-Url: https://codereview.webrtc.org/2975963002
> > > Cr-Commit-Position: refs/heads/master@{#18979}
> > > Committed: 1095ada7ad
> >
> > R=magjed@webrtc.org
> > TBR=tkchin@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:7924
> >
> > Review-Url: https://codereview.webrtc.org/2981583002 .
> > Cr-Commit-Position: refs/heads/master@{#19002}
> > Committed: a5f1de1e65
>
> TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,andersc@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7924
>
> Review-Url: https://codereview.webrtc.org/2979973002
> Cr-Commit-Position: refs/heads/master@{#19004}
> Committed: 81d40ee149

TBR=magjed@webrtc.org,tkchin@webrtc.org,jtteh@webrtc.org,sprang@webrtc.org
BUG=webrtc:7924

Review-Url: https://codereview.webrtc.org/2979983002
Cr-Commit-Position: refs/heads/master@{#19005}
2017-07-13 15:59:07 +00:00
sprang
81d40ee149 Revert of Injectable Obj-C video codecs (patchset #3 id:400001 of https://codereview.webrtc.org/2981583002/ )
Reason for revert:
Breaks bots. Build file incorrect.

Original issue's description:
> Reland of Injectable Obj-C video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2975963002/ )
>
> Reason for revert:
> New CL for fixing the issues
>
> Original issue's description:
> > Revert of Injectable Obj-C video codecs (patchset #8 id:140001 of https://codereview.webrtc.org/2966023002/ )
> >
> > Reason for revert:
> > Causes no video in certain scenarios. Please come up with a test plan or unit test to prevent such problems in the future.
> >
> > Original issue's description:
> > > Injectable Obj-C video codecs
> > >
> > > Initial CL for this effort, with a working RTCVideoEncoder/Decoder for H264
> > > (wrapping the VideoToolbox codec).
> > >
> > > Some notes / things left to do:
> > >   - There are some hard-coded references to codec types that are supported by
> > >     webrtc::VideoCodec, cricket::VideoCodec, webrtc::CodecSpecificInfo etc
> > >     since we need to convert to/from these types in ObjCVideoEncoder/Decoder.
> > >     These types would need to be more codec agnostic to avoid this.
> > >   - Most interfaces are borrowed from the design document for injectable
> > >     codecs in Android. Some data in the corresponding C++ classes is discarded
> > >     when converting to the Obj-C version, since it has fewer fields. I have not
> > >     verified whether all data that we do keep is needed, or whether we might be
> > >     losing anything useful in these conversions.
> > >   - Implement the VideoToolbox codec code directly in the RTCVideoEncoderH264
> > >     classes, instead of wrapping webrtc::H264VideoToolboxEncoder / decoder.
> > >     Eliminates converting between ObjC/C++ types outside the ObjCVideoEncoder/
> > >     Decoder wrapper classes.
> > >   - List the injected codec factory's supported codecs in the list of codecs in
> > >     AppRTCMobile.
> > >
> > > BUG=webrtc:7924
> > > R=magjed@webrtc.org
> > >
> > > Review-Url: https://codereview.webrtc.org/2966023002 .
> > > Cr-Commit-Position: refs/heads/master@{#18928}
> > > Committed: a0349c138d
> >
> > TBR=magjed@webrtc.org,andersc@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:7924
> > NOTRY=true
> >
> > Review-Url: https://codereview.webrtc.org/2975963002
> > Cr-Commit-Position: refs/heads/master@{#18979}
> > Committed: 1095ada7ad
>
> R=magjed@webrtc.org
> TBR=tkchin@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7924
>
> Review-Url: https://codereview.webrtc.org/2981583002 .
> Cr-Commit-Position: refs/heads/master@{#19002}
> Committed: a5f1de1e65

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

Review-Url: https://codereview.webrtc.org/2979973002
Cr-Commit-Position: refs/heads/master@{#19004}
2017-07-13 14:09:39 +00:00