578 Commits

Author SHA1 Message Date
zstein
8b476173d8 Improve the style of the objc wrapper for PeerConnectionInterface::SetBitrate.
BUG=webrtc:7395

Review-Url: https://codereview.webrtc.org/3011013002
Cr-Commit-Position: refs/heads/master@{#19697}
2017-09-05 21:43:03 +00:00
kwiberg
84f6a3fc6b Move optional.h to webrtc/api/
We use Optional in our public API, so its header should be in
webrtc/api/.

BUG=webrtc:8205

Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
2017-09-05 15:43:13 +00:00
mbonadei
6ff8f96baf Tightening visibility of video_toolbox_cc.
This CL aligns the visibility to the standard decided in:
https://codereview.webrtc.org/3001623003.

BUG=webrtc:7743
NOTRY=True

Review-Url: https://codereview.webrtc.org/3010123002
Cr-Commit-Position: refs/heads/master@{#19659}
2017-09-04 12:51:34 +00:00
kthelgason
ebd4f7988e Let CreateVideoDecoder take a cricket::VideoCodec.
This makes it possible for decoder factories to actually provide any
video codec, not just the ones WebRTC knows about. It also brings
the decoder factory interface more in line with that of the encoder
factory.

BUG=webrtc:8140

Review-Url: https://codereview.webrtc.org/3007433002
Cr-Commit-Position: refs/heads/master@{#19654}
2017-09-04 11:36:21 +00:00
sakal
07a3bd7c4b Bindings for injectable Java video encoders.
BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/3003873002
Cr-Commit-Position: refs/heads/master@{#19651}
2017-09-04 10:57:21 +00:00
magjed
85d18d43ad ObjC: Add null checks to HW encoder compressionOutputCallback
This will help debugging.

BUG=b/65254613

Review-Url: https://codereview.webrtc.org/3012693002
Cr-Commit-Position: refs/heads/master@{#19640}
2017-09-01 13:32:57 +00:00
sakal
e172d89f73 Change capture time format to nanoseconds in EncodedImage.
The millisecond field is deprecated and will be removed once the
dependencies have been updated.

BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/3010623002
Cr-Commit-Position: refs/heads/master@{#19622}
2017-08-31 09:37:28 +00:00
Diogo Real
05ea2b39e0 Deprecate IceServer constructors and update dependencies
Bug: webrtc:8176
Change-Id: I2ebc0edf1776c49c202a181d7597099e9242c0e7
Reviewed-on: https://chromium-review.googlesource.com/642710
Commit-Queue: Diogo Real <diogor@google.com>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19621}
2017-08-31 07:40:55 +00:00
kthelgason
f8084d485b Fix memory leak in VideoToolbox encoder.
We were leaking a fragmentation header object on each frame.

BUG=webrtc:8132

Review-Url: https://codereview.webrtc.org/3004013002
Cr-Commit-Position: refs/heads/master@{#19602}
2017-08-30 11:47:10 +00:00
Diogo Real
1dca9d513a Support a user-provided string for the TLS ALPN extension.
Fix source formatting
Add TLS ALPN extension.

Bug: webrtc:8086
Change-Id: I1f28ccd78760d3415e465f734744d2c2f93845e2
Reviewed-on: https://chromium-review.googlesource.com/611150
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Diogo Real <diogor@google.com>
Cr-Commit-Position: refs/heads/master@{#19588}
2017-08-29 20:11:16 +00:00
andersc
cfab6c7c04 Increase timeout in RTCUIApplicationStatusObserver
Increase timeout since the wait function timed out in certain debugging
circumstances. Also change the check to a DCHECK since it is not really
a critical error if it would time out.

BUG=None

Review-Url: https://codereview.webrtc.org/3007773002
Cr-Commit-Position: refs/heads/master@{#19582}
2017-08-29 13:52:04 +00:00
magjed
b8853ca8d3 ObjC: Add support for injectable native audio and video codecs
The native interface is added in the private file
webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h.

BUG=webrtc:8093

Review-Url: https://codereview.webrtc.org/3012443002
Cr-Commit-Position: refs/heads/master@{#19576}
2017-08-29 10:57:22 +00:00
Magnus Jedvert
f83dc8bbe5 Revert "Adding injectable audio decoder and encoder factory support to the RTCPeerConnection obj-c layer."
This reverts commit 96de428fd1f301c3ad1355183b45e44db5ef3f7f.

Reason for revert: Gives compile errors because the new ObjC++ headers are included in some targets that use ObjC.

Original change's description:
> Adding injectable audio decoder and encoder factory support to the RTCPeerConnection obj-c layer.
> 
> Bug: webrtc:8093
> Change-Id: I868ce5f75a72c6deb065dec60784289d045ae22a
> Reviewed-on: https://chromium-review.googlesource.com/608981
> Commit-Queue: Jeremy Newton-Smith <jeremyns@webrtc.org>
> Reviewed-by: Zeke Chin <tkchin@webrtc.org>
> Reviewed-by: Kári Tristan Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19477}

TBR=kjellander@webrtc.org,tkchin@webrtc.org,kthelgason@webrtc.org,jeremyns@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:8093
Change-Id: I3ade9dd979c9f13990a2972b15b786b8e78e1cd4
Reviewed-on: https://chromium-review.googlesource.com/640810
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19573}
2017-08-29 10:16:31 +00:00
magjed
a3d4f68fb4 Android: Replace webrtc_jni namespace with nested jni namespace
This CL replaces:
namespace webrtc_jni {
with:
namespace webrtc {
namespace jni {

The main benefit is that we don't have to use the webrtc:: qualifier
inside the jni namespace so we can reduce some clutter.

BUG=None

Review-Url: https://codereview.webrtc.org/3009613002
Cr-Commit-Position: refs/heads/master@{#19569}
2017-08-28 23:24:06 +00:00
sakal
160e32c34f Add support for RGB frames in MediaCodecVideoEncoder.
BUG=webrtc:7749

Review-Url: https://codereview.webrtc.org/3002263002
Cr-Commit-Position: refs/heads/master@{#19554}
2017-08-28 09:41:38 +00:00
magjed
b1c7453bfa Android: Add common function for adding/releasing native reference
This CL introduces common functions for adding and releasing
native references to reduce the number of JNI functions.

BUG=webrtc:8043

Review-Url: https://codereview.webrtc.org/3003213002
Cr-Commit-Position: refs/heads/master@{#19547}
2017-08-27 20:47:20 +00:00
magjed
7eb4082a66 Android: Don't check ref count when releasing PeerConnectionInterface
BUG=webrtc:8043

Review-Url: https://codereview.webrtc.org/3010433002
Cr-Commit-Position: refs/heads/master@{#19539}
2017-08-26 12:57:20 +00:00
magjed
09f3f6eb26 Android: Update convenience macro defining JNI-accessible methods
Update the name of the macro to something more descriptive and use
variable length arguments to make it work better with autoformatting
tools.

BUG=None

Review-Url: https://codereview.webrtc.org/2998403002
Cr-Commit-Position: refs/heads/master@{#19538}
2017-08-26 10:25:43 +00:00
magjed
4781552f60 Android: Expose EglBase.swapBuffers with presentation time
This function is currently only available in EglBase14, which is not in
the api. This CL adds the swapBuffer method to the public EglBase
interface. For EglBase10, the presentation time is just ignored.

BUG=webrtc:8155

Review-Url: https://codereview.webrtc.org/3003843002
Cr-Commit-Position: refs/heads/master@{#19518}
2017-08-25 13:28:00 +00:00
charujain
474accebdb Roll chromium_revision d323a482ee..7114a66134 (494468:497367) manually
* Enable workaround for building Android with C++14.
* Disable build hooks for WebRTC on Android.

Change log: d323a482ee..7114a66134
Full diff: d323a482ee..7114a66134

Changed dependencies:
* src/base: 66d3c08e82..0b41aca75a
* src/build: 2a5e6515a5..a2a451d3c0
* src/buildtools: ceb050498e..5af0a3a8b8
* src/ios: 2085f316c1..0a0ac63bd3
* src/testing: 3127a16731..8a25f55d8b
* src/third_party: b4122f732f..8c0e65fa05
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/f4ecc84644..ae9f0616c5
* src/third_party/catapult: d27175a044..f8acf3b642
* src/third_party/depot_tools: 6d0d04458d..e081cbe5aa
* src/third_party/icu: 98218d1e92..08cb956852
* src/third_party/libvpx/source/libvpx: cbb83ba4aa..6b9c691daf
* src/tools: 5730fb2d3f..3e167a7bd3
DEPS diff: d323a482ee..7114a66134/DEPS

No update to Clang.

TBR=marpan@webrtc.org,
BUG=webrtc:8148
CQ_INCLUDE_TRYBOTS=master.internal.tryserver.corp.webrtc:linux_internal

Review-Url: https://codereview.webrtc.org/3003393002
Cr-Commit-Position: refs/heads/master@{#19517}
2017-08-25 13:21:52 +00:00
andersc
151aa6b3f7 Adjust for initial cropping when adapting frame.
When adapting a frame, any initial cropping coordinate was replaced
by the coordinate calculated for adapting. Offset initial coordinate
instead.

BUG=webrtc:7880

Review-Url: https://codereview.webrtc.org/2975613002
Cr-Commit-Position: refs/heads/master@{#19509}
2017-08-25 08:33:18 +00:00
mbonadei
c0af5ac3d0 The goal of this CL is to separate Obj-C/Obj-C++ code from targets which have
also C++ code (see https://bugs.chromium.org/p/webrtc/issues/detail?id=7743
for more information).

BUG=webrtc:7743

Review-Url: https://codereview.webrtc.org/2995753002
Cr-Commit-Position: refs/heads/master@{#19501}
2017-08-24 19:26:05 +00:00
jtteh
837adc0871 Fix video slow to appear on first launch.
BUG=webrtc:7777

Review-Url: https://codereview.webrtc.org/3006453002
Cr-Commit-Position: refs/heads/master@{#19497}
2017-08-24 14:14:35 +00:00
sakal
6c36dcb324 Fix bugs in HardwareVideoDecoder reinitialization.
Fixes bug where callback is set to null on reinitialization. Also fixes
a race condition where callback can be null in onTextureFrameAvailable.

BUG=webrtc:8124

Review-Url: https://codereview.webrtc.org/3002093002
Cr-Commit-Position: refs/heads/master@{#19493}
2017-08-24 13:03:59 +00:00
kthelgason
36d658d085 Rename all objc targets to be suffixed for consistency
BUG=webrtc:6412

Review-Url: https://codereview.webrtc.org/3001023003
Cr-Commit-Position: refs/heads/master@{#19489}
2017-08-24 12:43:45 +00:00
kthelgason
a4955b4d9a Enable the HW VideoToolbox encoder on mac.
This CL was originally submitted by an external contributor in
https://chromium-review.googlesource.com/c/external/webrtc/+/582051.

I have rebased it to the new ObjC encoder class.

BUG=webrtc:8022

Review-Url: https://codereview.webrtc.org/3003653002
Cr-Commit-Position: refs/heads/master@{#19486}
2017-08-24 11:22:58 +00:00
kthelgason
1cdddc96fa Make CodecType conversion functions non-optional.
We can't handle no value here anyway and end up setting a default
at each call site. The defaults aren't even the same in each place.

BUG=None

Review-Url: https://codereview.webrtc.org/2998293002
Cr-Commit-Position: refs/heads/master@{#19485}
2017-08-24 10:52:48 +00:00
Jeremy Newton-Smith
96de428fd1 Adding injectable audio decoder and encoder factory support to the RTCPeerConnection obj-c layer.
Bug: webrtc:8093
Change-Id: I868ce5f75a72c6deb065dec60784289d045ae22a
Reviewed-on: https://chromium-review.googlesource.com/608981
Commit-Queue: Jeremy Newton-Smith <jeremyns@webrtc.org>
Reviewed-by: Zeke Chin <tkchin@webrtc.org>
Reviewed-by: Kári Tristan Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19477}
2017-08-23 22:46:44 +00:00
sakal
91073ae78f Add a field trial to produce VideoFrames in camera capturers.
The field trials enables producing new VideoFrames in camera classes.
This field trial should be enabled if VideoSinks are used.

BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/2984633002
Cr-Commit-Position: refs/heads/master@{#19467}
2017-08-23 15:50:23 +00:00
andersc
cca0006e33 ObjC: Always dispatch async in UIApplication status observer.
Fixes a possible deadlock.

BUG=webrtc:8130

Review-Url: https://codereview.webrtc.org/3003633002
Cr-Commit-Position: refs/heads/master@{#19464}
2017-08-23 13:04:17 +00:00
sakal
c614823fa3 Remove unnecessary release call in EglRenderer.
VideoSink is not assumed to take ownership of the frame, so it is not
necessary to release it unless it is retained for future use.

BUG=webrtc:7749

Review-Url: https://codereview.webrtc.org/3003563002
Cr-Commit-Position: refs/heads/master@{#19440}
2017-08-22 07:21:48 +00:00
sakal
2fe9dfae20 Android: Fix synchronization problems in VideoFrame release.
Also fixes a small bug in EglRenderer where if it was passed a custom
frame, it would leak a reference.

BUG=b/64887218

Review-Url: https://codereview.webrtc.org/3003533002
Cr-Commit-Position: refs/heads/master@{#19432}
2017-08-21 15:02:58 +00:00
magjed
139cf38223 ObjC: Remove RTCVideoFrame I420 functions
Access to I420 data should be done on an RTCI420Buffer that can be
accessed through the toI420 method, and not on an RTCVideoFrame
directly.

BUG=webrtc:7785

Review-Url: https://codereview.webrtc.org/2997453002
Cr-Commit-Position: refs/heads/master@{#19431}
2017-08-21 14:31:26 +00:00
magjed
b0215daeb5 ObjC: Remove RTCVideoFrame.nativeHandle
Access to a native buffer should be through RTCVideoFrame.buffer
instead.

BUG=webrtc:7785

Review-Url: https://codereview.webrtc.org/2990253002
Cr-Commit-Position: refs/heads/master@{#19430}
2017-08-21 14:12:08 +00:00
sakal
257baf139a Fix a bug where listener custom drawer was ignored in EglRenderer.
BUG=b/64808682

Review-Url: https://codereview.webrtc.org/2995223002
Cr-Commit-Position: refs/heads/master@{#19416}
2017-08-18 18:38:32 +00:00
andersc
81bc523f5d Make a friendlier RTCVideoCodecInfo initializer for when only name and
parameters are interesting.

Since this is used by users when implementing injectable Obj-C video
codecs, the API where the unused payload is required is unnecessarily
confusing. Also make the codec parameters optional.

BUG=None

Review-Url: https://codereview.webrtc.org/3001183002
Cr-Commit-Position: refs/heads/master@{#19411}
2017-08-18 13:34:09 +00:00
sakal
84778c74a0 Optimize HardwareVideoDecoder by doing all frame conversions in C++.
BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/3000153002
Cr-Commit-Position: refs/heads/master@{#19406}
2017-08-18 10:03:29 +00:00
sprang
ba050a6d6d Reland of Add a flags field to video timing extension. (patchset #1 id:1 of https://codereview.webrtc.org/2995953002/ )
Reason for revert:
Create reland CL to add fix to.

Original issue's description:
> Revert of Add a flags field to video timing extension. (patchset #15 id:280001 of https://codereview.webrtc.org/3000753002/ )
>
> Reason for revert:
> Speculative revet for breaking remoting_unittests in fyi bots.
> https://build.chromium.org/p/chromium.webrtc.fyi/waterfall?builder=Win7%20Tester
>
> Original issue's description:
> > Add a flags field to video timing extension.
> >
> > The rtp header extension for video timing shuold have an additional
> > field for signaling metadata, such as what triggered the extension for
> > this particular frame. This will allow separating frames select because
> > of outlier sizes from regular frames, for more accurate stats.
> >
> > This implementation is backwards compatible in that it can read video
> > timing extensions without the new flag field, but it always sends with
> > it included.
> >
> > BUG=webrtc:7594
> >
> > Review-Url: https://codereview.webrtc.org/3000753002
> > Cr-Commit-Position: refs/heads/master@{#19353}
> > Committed: cf5d485e14
>
> TBR=danilchap@webrtc.org,kthelgason@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7594
>
> Review-Url: https://codereview.webrtc.org/2995953002
> Cr-Commit-Position: refs/heads/master@{#19360}
> Committed: f0f7378b05

TBR=danilchap@webrtc.org,kthelgason@webrtc.org,stefan@webrtc.org,emircan@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7594

Review-Url: https://codereview.webrtc.org/2996153002
Cr-Commit-Position: refs/heads/master@{#19405}
2017-08-18 09:51:12 +00:00
Jonathan Yu
2238441654 Explicitly specify the onFrameAvailable() thread.
We are already asserting in tryDeliverTextureFrame() that we are on the
SurfaceTextureHelper handler thread, but this behavior isn't guaranteed
by Android.

Also updated docs for OnTextureFrameAvailableListener, since other
classes (e.g. capturers) were also asserting that they were called on
the SurfaceTextureHelper thread.

Bug: webrtc:8087, b/64609528
Change-Id: I47148c452f66f24477e438b06ef124a96965853d
Reviewed-on: https://chromium-review.googlesource.com/610495
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Jonathan Yu <yujo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19398}
2017-08-18 00:37:11 +00:00
sakal
7c206b5b6c Fix a reference leak when converting I420 VideoFrame to I420Frame.
BUG=webrtc:7760
NOTRY=True

Review-Url: https://codereview.webrtc.org/2999143002
Cr-Commit-Position: refs/heads/master@{#19380}
2017-08-17 10:56:58 +00:00
andersc
f9f448b32d ObjC: Include additional files in umbrella header.
RTCAudioSession and RTCAudioSessionConfiguration allow users to handle
audio manually and is used by the AppRTCMobile example.

RTCVideoFrameBuffer exposes a protocol that users can implement to
create their own frame buffer formats, as long as they can be converted
into i420.

RTCVideoCapturer and RTCVideoViewShading are imported by other headers
already included by the umbrella header, so they were always accessible
to users. Added them to the umbrella header to make it explicit.

BUG=webrtc:7351, webrtc:8027

Review-Url: https://codereview.webrtc.org/2994253002
Cr-Commit-Position: refs/heads/master@{#19379}
2017-08-17 09:31:55 +00:00
sakal
4dee344493 Implement QP parsing in VideoDecoderWrapper.
BUG=webrtc:7760
NOTRY=True

Review-Url: https://codereview.webrtc.org/3000993002
Cr-Commit-Position: refs/heads/master@{#19378}
2017-08-17 09:18:04 +00:00
emircan
f0f7378b05 Revert of Add a flags field to video timing extension. (patchset #15 id:280001 of https://codereview.webrtc.org/3000753002/ )
Reason for revert:
Speculative revet for breaking remoting_unittests in fyi bots.
https://build.chromium.org/p/chromium.webrtc.fyi/waterfall?builder=Win7%20Tester

Original issue's description:
> Add a flags field to video timing extension.
>
> The rtp header extension for video timing shuold have an additional
> field for signaling metadata, such as what triggered the extension for
> this particular frame. This will allow separating frames select because
> of outlier sizes from regular frames, for more accurate stats.
>
> This implementation is backwards compatible in that it can read video
> timing extensions without the new flag field, but it always sends with
> it included.
>
> BUG=webrtc:7594
>
> Review-Url: https://codereview.webrtc.org/3000753002
> Cr-Commit-Position: refs/heads/master@{#19353}
> Committed: cf5d485e14

TBR=danilchap@webrtc.org,kthelgason@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7594

Review-Url: https://codereview.webrtc.org/2995953002
Cr-Commit-Position: refs/heads/master@{#19360}
2017-08-15 19:31:23 +00:00
sprang
cf5d485e14 Add a flags field to video timing extension.
The rtp header extension for video timing shuold have an additional
field for signaling metadata, such as what triggered the extension for
this particular frame. This will allow separating frames select because
of outlier sizes from regular frames, for more accurate stats.

This implementation is backwards compatible in that it can read video
timing extensions without the new flag field, but it always sends with
it included.

BUG=webrtc:7594

Review-Url: https://codereview.webrtc.org/3000753002
Cr-Commit-Position: refs/heads/master@{#19353}
2017-08-15 12:33:27 +00:00
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