Commit graph

107 commits

Author SHA1 Message Date
Mirko Bonadei
fbb3b7d004 Reland: "Make javac warnings errors for WebRTC targets."
This reverts commit 2bad72a273.

Reason for revert: Fixing downstream projects (take 2).

Original change's description:
> Reland "Revert "Make javac warnings errors for WebRTC targets.""
> 
> This is a reland of 098d24c3c1
> Original change's description:
> > Revert "Make javac warnings errors for WebRTC targets."
> > 
> > This reverts commit 19b761403c.
> > 
> > Reason for revert: Breaking internal builds
> > 
> > Original change's description:
> > > Make javac warnings errors for WebRTC targets.
> > > 
> > > Adds new rtc_* templates for Android targets to allow specifying
> > > default values that affect WebRTC targets.
> > > 
> > > Bug: webrtc:6597
> > > Change-Id: Ie529bfc8500d1e785b8a59dba7078b5f88ccfcd1
> > > Reviewed-on: https://webrtc-review.googlesource.com/15103
> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#20567}
> > 
> TBR=phoglund@webrtc.org,sakal@webrtc.org
> > 
> > Change-Id: I6d3ff5604b3d4307765d3a65adb783f89fcc974c
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:6597
> > Reviewed-on: https://webrtc-review.googlesource.com/20740
> > Reviewed-by: Lu Liu <lliuu@webrtc.org>
> > Commit-Queue: Lu Liu <lliuu@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20571}
> 
> Bug: webrtc:6597
> Change-Id: Icfb5ded46ce76b674bae67bfa02054b4ec52bb0f
> Reviewed-on: https://webrtc-review.googlesource.com/20800
> Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
> Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20577}

TBR=phoglund@webrtc.org,ehmaldonado@webrtc.org,mbonadei@webrtc.org,sakal@webrtc.org,lliuu@webrtc.org

Change-Id: Id3713c1885318741711987ae642a269a9ca5bb85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6597
Reviewed-on: https://webrtc-review.googlesource.com/18441
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20588}
2017-11-07 15:36:46 +00:00
Magnus Jedvert
0371e10584 Android: Generate all C++ -> Java JNI code for VideoEncoder
The first example CL for generating JNI code
(https://webrtc-review.googlesource.com/c/src/+/4500) seems to stick, so
this CL updates the rest of the VideoEncoder. The JNI code for
Java -> C++ is still done manually.

This CL puts the necessary helper Java methods in a class called
VideoEncoderWrapper.

Bug: webrtc:8278
Change-Id: Ic3a6defe59c094f67ffd8ea86d6c272c676980ae
Reviewed-on: https://webrtc-review.googlesource.com/20871
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20587}
2017-11-07 15:32:15 +00:00
Magnus Jedvert
3111e5fb48 Android: Replacement for JNIEnv::FindClass that works from any thread
This CL adds a replacement for JNIEnv::FindClass that works from any
thread, i.e. from native C++ threads as well. This function will be used
from the generated JNI code. Long term, we should stop using
classreferenceholder that relies on a hardcoded list of WebRTC classes.

Bug: webrtc:8278
Change-Id: I4f40c744325ac02b73bd8fa479ab50b684429dc2
Reviewed-on: https://webrtc-review.googlesource.com/20223
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20583}
2017-11-07 12:14:40 +00:00
Mirko Bonadei
360742078b Removing unused import.
Bug: None
Change-Id: Iaa4c81b84a2c35e31b148f2b382a8f251c23b613
Reviewed-on: https://webrtc-review.googlesource.com/20760
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20580}
2017-11-07 08:57:21 +00:00
Mirko Bonadei
ed929f3679 Removing unused private constant in EglRenderer
Bug: None
Change-Id: I79e14abda9a09a4e153d038751ca0c24f6a3a67e
Reviewed-on: https://webrtc-review.googlesource.com/20762
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20579}
2017-11-07 08:56:16 +00:00
Lu Liu
2bad72a273 Reland "Revert "Make javac warnings errors for WebRTC targets.""
This is a reland of 098d24c3c1
Original change's description:
> Revert "Make javac warnings errors for WebRTC targets."
> 
> This reverts commit 19b761403c.
> 
> Reason for revert: Breaking internal builds
> 
> Original change's description:
> > Make javac warnings errors for WebRTC targets.
> > 
> > Adds new rtc_* templates for Android targets to allow specifying
> > default values that affect WebRTC targets.
> > 
> > Bug: webrtc:6597
> > Change-Id: Ie529bfc8500d1e785b8a59dba7078b5f88ccfcd1
> > Reviewed-on: https://webrtc-review.googlesource.com/15103
> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20567}
> 
TBR=phoglund@webrtc.org,sakal@webrtc.org
> 
> Change-Id: I6d3ff5604b3d4307765d3a65adb783f89fcc974c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:6597
> Reviewed-on: https://webrtc-review.googlesource.com/20740
> Reviewed-by: Lu Liu <lliuu@webrtc.org>
> Commit-Queue: Lu Liu <lliuu@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20571}

Bug: webrtc:6597
Change-Id: Icfb5ded46ce76b674bae67bfa02054b4ec52bb0f
Reviewed-on: https://webrtc-review.googlesource.com/20800
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20577}
2017-11-07 01:31:45 +00:00
Mirko Bonadei
a1a475a5b6 Revert "Revert "Make javac warnings errors for WebRTC targets.""
This reverts commit 098d24c3c1.

Reason for revert: Fixing downstream projects.

Original change's description:
> Revert "Make javac warnings errors for WebRTC targets."
> 
> This reverts commit 19b761403c.
> 
> Reason for revert: Breaking internal builds
> 
> Original change's description:
> > Make javac warnings errors for WebRTC targets.
> > 
> > Adds new rtc_* templates for Android targets to allow specifying
> > default values that affect WebRTC targets.
> > 
> > Bug: webrtc:6597
> > Change-Id: Ie529bfc8500d1e785b8a59dba7078b5f88ccfcd1
> > Reviewed-on: https://webrtc-review.googlesource.com/15103
> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20567}
> 
> TBR=phoglund@webrtc.org,sakal@webrtc.org
> 
> Change-Id: I6d3ff5604b3d4307765d3a65adb783f89fcc974c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:6597
> Reviewed-on: https://webrtc-review.googlesource.com/20740
> Reviewed-by: Lu Liu <lliuu@webrtc.org>
> Commit-Queue: Lu Liu <lliuu@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20571}

TBR=phoglund@webrtc.org,sakal@webrtc.org,lliuu@webrtc.org

Change-Id: I3f0289c6ddc1930b1c92f653a61eff3f6a2bba30
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6597
Reviewed-on: https://webrtc-review.googlesource.com/20741
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20572}
2017-11-06 20:30:58 +00:00
Lu Liu
098d24c3c1 Revert "Make javac warnings errors for WebRTC targets."
This reverts commit 19b761403c.

Reason for revert: Breaking internal builds

Original change's description:
> Make javac warnings errors for WebRTC targets.
> 
> Adds new rtc_* templates for Android targets to allow specifying
> default values that affect WebRTC targets.
> 
> Bug: webrtc:6597
> Change-Id: Ie529bfc8500d1e785b8a59dba7078b5f88ccfcd1
> Reviewed-on: https://webrtc-review.googlesource.com/15103
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20567}

TBR=phoglund@webrtc.org,sakal@webrtc.org

Change-Id: I6d3ff5604b3d4307765d3a65adb783f89fcc974c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6597
Reviewed-on: https://webrtc-review.googlesource.com/20740
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20571}
2017-11-06 19:58:38 +00:00
Mirko Bonadei
12251b6386 Adding @SuppressWarnings(NoSynchronizedMethodCheck).
In https://chromium-review.googlesource.com/c/chromium/src/+/750645
Chromium started to use an ErrorProne plugin to discourage synchronized
public methods (an encourage the usage of synchronized blocks).

In order to unblock the Chromium Roll we can suppress these warnings
and decide if we want to align with Chromium on this check or ask
them to make it optional.

More details in the bug.

TBR=magjed@webrtc.org

Bug: webrtc:8491
Change-Id: Ie77a324e54aab44a4f59853959549f1d21f884a0
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/20060
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20569}
2017-11-06 17:48:38 +00:00
Sami Kalliomäki
19b761403c Make javac warnings errors for WebRTC targets.
Adds new rtc_* templates for Android targets to allow specifying
default values that affect WebRTC targets.

Bug: webrtc:6597
Change-Id: Ie529bfc8500d1e785b8a59dba7078b5f88ccfcd1
Reviewed-on: https://webrtc-review.googlesource.com/15103
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20567}
2017-11-06 15:59:06 +00:00
Xiaolei Yu
149533abd4 Move rendering code in SurfaceViewRenderer to a separate class.
The new SurfaceEglRenderer helper class extends EglRenderer and
implements rendering on a SurfaceView.

Bug: webrtc:8242
Change-Id: Ic532fe487755d3b54c6bd03f239d714e1ecb10ad
Reviewed-on: https://webrtc-review.googlesource.com/2940
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20562}
2017-11-06 13:52:26 +00:00
Anders Carlsson
ed2b1c954c Ignore output callbacks with null parameters in iOS H264 encode.
This can occur if there are callbacks in-flight when the compression
session is destroyed. Has been observed but is rare.

Bug: webrtc:8489
Change-Id: I5d4b35c555f6ff68af48edfcc7acf53395fa86fe
Reviewed-on: https://webrtc-review.googlesource.com/18220
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20561}
2017-11-06 13:40:27 +00:00
Sami Kalliomäki
f6515cd0e3 Fix and optimize input buffer filling in HardwareVideoEncoder.
Previously input buffers would be filled incorrectly for sparsely
packed buffers where stride is not equal to the plane width.

Bug: webrtc:8478
Change-Id: I080fa3c354a27982bb996be8c1e41b103384e4bc
Reviewed-on: https://webrtc-review.googlesource.com/17321
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20550}
2017-11-02 12:22:07 +00:00
Magnus Jedvert
56231d07b3 Reland "Android: Generate JNI code for VideoSink and VideoEncoder"
This is a reland of ba78b5a905
Original change's description:
> Android: Generate JNI code for VideoSink and VideoEncoder
> 
> This is the first CL to start generating JNI code. It has updated two of
> the most recent classes to use JNI code generation.
> 
> Bug: webrtc:8278
> Change-Id: I1b19ee78c273346ceeaa0401dbdf8696803f16c7
> Reviewed-on: https://webrtc-review.googlesource.com/3820
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19994}

Bug: webrtc:8278
Change-Id: Id3e6513736eb87d7c234be3b0d13c5d30435201c
Reviewed-on: https://webrtc-review.googlesource.com/4500
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@{#20548}
2017-11-02 10:27:47 +00:00
Magnus Jedvert
0af86d1c43 Reland ObjC API for BWE allocation strategy
Bug: webrtc:8243
Change-Id: Ib1b8349bffe98490ba5f1d12b18e848e89cdb9ce
Reviewed-on: https://webrtc-review.googlesource.com/16640
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20534}
2017-11-01 15:21:06 +00:00
henrika
5f6bf24506 Add SetAudioPlayout and SetAudioRecording methods to the PeerConnection API (II)
Second attempt to land https://webrtc-review.googlesource.com/c/src/+/16180

Now removes voice_engine dependency from peerconnection and fixes a minor
const issue in NullAudioPoller.

TBR=solenberg

Bug: webrtc:7313
Change-Id: Ibfddbdc76118581e4a4dc64575203f84c1659e5c
Reviewed-on: https://webrtc-review.googlesource.com/17784
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20526}
2017-11-01 11:04:26 +00:00
Daniela
c4a14324e2 Remove autolayout in RTCMTLVideoView.
Using layoutSubviews is a simpler solution to achieveing the desired
effect. Plus this will get rid of warrnings on iOS 11

Bug: webrtc:8467
Change-Id: Idaa041b7a0ed889905d97f645408fb3437154e73
Reviewed-on: https://webrtc-review.googlesource.com/17380
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20523}
2017-11-01 09:56:46 +00:00
Mirko Bonadei
990d6b875e Revert "Add SetAudioPlayout and SetAudioRecording methods to the PeerConnection API"
This reverts commit 90bace0958.

Reason for revert: The original problem of this CL has been fixed in https://webrtc-review.googlesource.com/17540 but sounds like it is also adding voice_engine as a dependency of pc:peerconnection. We should investigate this because probably we can avoid it.

Original change's description:
> Add SetAudioPlayout and SetAudioRecording methods to the PeerConnection API
> 
> (this CL is based on the work by Taylor and Steve in https://webrtc-review.googlesource.com/c/src/+/10201)
> 
> This SetAudioPlayout method lets applications disable audio playout while
> still processing incoming audio data and generating statistics on the
> received audio.
> 
> This may be useful if the application wants to set up media flows as
> soon as possible, but isn't ready to play audio yet. Currently, native
> applications don't have any API point to control this, unless they
> completely implement their own AudioDeviceModule.
> 
> The SetAudioRecording works in a similar fashion but for the recorded
> audio. One difference is that calling SetAudioRecording(false) does not
> keep any audio processing alive.
> 
> TBR=solenberg
> 
> Bug: webrtc:7313
> Change-Id: I0aa075f6bfef9818f1080f85a8ff7842fb0750aa
> Reviewed-on: https://webrtc-review.googlesource.com/16180
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20499}

TBR=solenberg@webrtc.org,henrika@webrtc.org,kwiberg@webrtc.org

Change-Id: I8431227e21dbffcfed3dd0e6bd7ce26c4ce09394
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7313
Reviewed-on: https://webrtc-review.googlesource.com/17701
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20512}
2017-11-01 02:40:48 +00:00
henrika
90bace0958 Add SetAudioPlayout and SetAudioRecording methods to the PeerConnection API
(this CL is based on the work by Taylor and Steve in https://webrtc-review.googlesource.com/c/src/+/10201)

This SetAudioPlayout method lets applications disable audio playout while
still processing incoming audio data and generating statistics on the
received audio.

This may be useful if the application wants to set up media flows as
soon as possible, but isn't ready to play audio yet. Currently, native
applications don't have any API point to control this, unless they
completely implement their own AudioDeviceModule.

The SetAudioRecording works in a similar fashion but for the recorded
audio. One difference is that calling SetAudioRecording(false) does not
keep any audio processing alive.

TBR=solenberg

Bug: webrtc:7313
Change-Id: I0aa075f6bfef9818f1080f85a8ff7842fb0750aa
Reviewed-on: https://webrtc-review.googlesource.com/16180
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20499}
2017-10-31 12:35:42 +00:00
Zeke Chin
ef1140eec0 Expose TurnCustomizer as a native ObjC property.
Bug: webrtc:8471
Change-Id: Ic0d904b0c3742e552f20fbebb26d55d2bdd76c72
Reviewed-on: https://webrtc-review.googlesource.com/16566
Commit-Queue: Zeke Chin <tkchin@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20481}
2017-10-30 17:30:39 +00:00
Sean Rosenbaum
e5c4265619 Allow external audio device module to be passed in to the objc peer connection factory interface.
Bug: webrtc:8466
Change-Id: I87091cb32206f5f3bed310ec23963bcc053c59db
Reviewed-on: https://webrtc-review.googlesource.com/16734
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Sean Rosenbaum <srosenba@google.com>
Cr-Commit-Position: refs/heads/master@{#20479}
2017-10-30 16:46:19 +00:00
Sami Kalliomäki
828cf2443d Android: Change H264 constrained baseline profile from 4200xx to 42e0xx.
This affects the new injectable codecs.

Bug: webrtc:8459
Change-Id: I484a3ae4c29fd8bae8b13308315758b3689bdd4d
Reviewed-on: https://webrtc-review.googlesource.com/16861
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20478}
2017-10-30 16:20:29 +00:00
Sami Kalliomäki
bde473e4fa Fix/suppress new warnings introduced in Chromium roll.
TBR=henrika@webrtc.org

Bug: webrtc:6597
Change-Id: Id26945a7be05250673b58de8220f78bc62886688
Reviewed-on: https://webrtc-review.googlesource.com/16860
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20477}
2017-10-30 16:10:29 +00:00
Anders Carlsson
1d4c152a38 Reland "Simple Default ObjC video codec factories."
This is a reland of 30915a742d
Original change's description:
> Simple Default ObjC video codec factories.
> 
> Move the simple video encoder/decoder factory from AppRTCMobile into the
> public API so users who don't have special requirements for video codecs
> can easily get started.
> 
> Also clean up the API a little.
> 
> This CL replaces the more flexible default factories in
> https://webrtc-review.googlesource.com/c/src/+/7741 and clients that
> want to implement their own codecs will have to supply their own
> encoder/decoder factories as well. The benefits of the approach in
> this CL are a simpler API and less effects on the rest of the code.
> 
> Bug: None
> Change-Id: I4ed94090d778b4fc38b49864de1d4de4ff125d6a
> Reviewed-on: https://webrtc-review.googlesource.com/15141
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20441}

Bug: None
Change-Id: If0910cc540dc835dfec4eeb5bea527d88482d110
Reviewed-on: https://webrtc-review.googlesource.com/16780
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20476}
2017-10-30 14:48:39 +00:00
Magnus Jedvert
293158b707 Revert ObjC API changes for BWE allocation strategy
The ObjC API (the files in sdk/objc/Framework/Headers/WebRTC/) needs to
be pure ObjC. The changes that are reverted here introduced C++ which
turns it into ObjC++.

We don't have a test protectcing this right now, but it's probably
something we should add to catch changes like this in the future.

TBR=alexnarest@webrtc.org,deadbeef@webrtc.org

Bug: webrtc:8243
Change-Id: Idea688f4014cd44c27cf2cb2a5ec8a9ea7da3c00
Reviewed-on: https://webrtc-review.googlesource.com/16429
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20463}
2017-10-27 12:33:24 +00:00
Sami Kalliomäki
9828bebee6 Fix/suppress all javac warnings.
This is done in preparation to make all javac warnings into errors for
WebRTC targets.

Bug: webrtc:6597
Change-Id: I402043157bd75943adf0de52111e5a1bb179c6d1
Reviewed-on: https://webrtc-review.googlesource.com/15104
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20450}
2017-10-26 15:11:36 +00:00
Oskar Sundbom
4556f3c3f4 Revert "Simple Default ObjC video codec factories."
This reverts commit 30915a742d.

Reason for revert: Breaks downstream.

Original change's description:
> Simple Default ObjC video codec factories.
> 
> Move the simple video encoder/decoder factory from AppRTCMobile into the
> public API so users who don't have special requirements for video codecs
> can easily get started.
> 
> Also clean up the API a little.
> 
> This CL replaces the more flexible default factories in
> https://webrtc-review.googlesource.com/c/src/+/7741 and clients that
> want to implement their own codecs will have to supply their own
> encoder/decoder factories as well. The benefits of the approach in
> this CL are a simpler API and less effects on the rest of the code.
> 
> Bug: None
> Change-Id: I4ed94090d778b4fc38b49864de1d4de4ff125d6a
> Reviewed-on: https://webrtc-review.googlesource.com/15141
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20441}

TBR=magjed@webrtc.org,andersc@webrtc.org,kthelgason@webrtc.org

Change-Id: I3d4395cc9667e6c6cdb33a3b0f5c5fb5bfde9028
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/15182
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20446}
2017-10-26 11:55:57 +00:00
Anders Carlsson
30915a742d Simple Default ObjC video codec factories.
Move the simple video encoder/decoder factory from AppRTCMobile into the
public API so users who don't have special requirements for video codecs
can easily get started.

Also clean up the API a little.

This CL replaces the more flexible default factories in
https://webrtc-review.googlesource.com/c/src/+/7741 and clients that
want to implement their own codecs will have to supply their own
encoder/decoder factories as well. The benefits of the approach in
this CL are a simpler API and less effects on the rest of the code.

Bug: None
Change-Id: I4ed94090d778b4fc38b49864de1d4de4ff125d6a
Reviewed-on: https://webrtc-review.googlesource.com/15141
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20441}
2017-10-26 08:31:54 +00:00
Sami Kalliomäki
68e56a5951 Android: Update VideoDecoderFactoryWrapper to implement CreateVideoDecoderWithParams.
Old CreateVideoDecoder interface is deprecated. This allows
VideoDecoderFactoryWrapper to create codecs for types that WebRTC
doesn't know about.

Bug: webrtc:8140
Change-Id: I69aa1a0164642b4e4377daa1abeb9039c04fd884
Reviewed-on: https://webrtc-review.googlesource.com/15401
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20438}
2017-10-26 07:32:34 +00:00
Kári Tristan Helgason
47d3a0197f Reenable some supressed warnings for the objc SDK.
Bug: webrtc:8441
Change-Id: I6b427dfc1fe275e274d042766e0850628cf19994
Reviewed-on: https://webrtc-review.googlesource.com/15000
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20425}
2017-10-25 11:17:36 +00:00
Anders Carlsson
f3ee3b7478 Support RGB frames in RTCCVPixelBuffer
In addition to NV12 frames, also support cropping/scaling RGB frames and
converting RGB frames to i420.

This CL also removes the hardcoding of pixel format in
RTCCameraVideoCapturer. Instead, use the first available format for the
output device that our pipeline supports.

Bug: webrtc:8351
Change-Id: If479b4934c47cd2994936913f55e60fbbee3893b
Reviewed-on: https://webrtc-review.googlesource.com/8920
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20396}
2017-10-23 15:34:28 +00:00
Kári Tristan Helgason
fc313dcda6 Add prefix to codec name constants.
Bug: webrtc:8401
Change-Id: I8cd4685df3609e8b91a79b19789aadef484138d4
Reviewed-on: https://webrtc-review.googlesource.com/14140
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20390}
2017-10-23 12:49:17 +00:00
Peter Hanspers
47217364f5 Adding a KVO context to avoid issues with future super/sub-classing.
Bug: webrtc:8342
Change-Id: I457858056ffc7f33bbfb261153301ea2ccd71a51
Reviewed-on: https://webrtc-review.googlesource.com/6440
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20389}
2017-10-23 12:33:17 +00:00
Alex Narest
78609d5b6b Reland of BWE allocation strategy
TBR=stefan@webrtc.org,alexnarest@webrtc.org

Bug: webrtc:8243
Change-Id: Ie68e4f414b2ac32ba4e64877cb250fabcb089a07
Reviewed-on: https://webrtc-review.googlesource.com/13940
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20369}
2017-10-20 10:16:15 +00:00
Sam Zackrisson
6f38d25f11 Add Java support for AudioProcessing and PostProcessing injection
This allows injection of a user-defined post processing module from
the Android layer.

Bug: webrtc:8163
Change-Id: If3a6b4726c34c5f82d186b8cf95373c283cbd3f6
Reviewed-on: https://webrtc-review.googlesource.com/7610
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20367}
2017-10-20 08:37:23 +00:00
Niels Möller
6f72f56b6c Change return types of refcount methods.
AddRef() now returns void, and Release() returns an enum
RefCountReleaseStatus, to indicate whether or not this Release
call implied deletion.

Bug: webrtc:8270
Change-Id: If2fb77f26118b61751b51c856af187c72112c630
Reviewed-on: https://webrtc-review.googlesource.com/3320
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20366}
2017-10-20 07:46:03 +00:00
Alex Narest
dc9ca9329b Revert "BWE allocation strategy"
This reverts commit a5fbc23379.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> BWE allocation strategy
> 
> This is reland of https://webrtc-review.googlesource.com/c/src/+/4860 with the fixed RampUpTest test
> 
> Bug: webrtc:8243
> Change-Id: I4b90a449b00dd05feee974001e08fb40710b59ac
> Reviewed-on: https://webrtc-review.googlesource.com/13124
> Commit-Queue: Alex Narest <alexnarest@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20345}

TBR=stefan@webrtc.org,alexnarest@webrtc.org

Change-Id: I8ed12cd2115ef63204e384cc93c9f4473daa54d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8243
Reviewed-on: https://webrtc-review.googlesource.com/14020
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20361}
2017-10-19 15:34:52 +00:00
Sami Kalliomäki
5f5fc6845a Relax threading requirements in VideoEncoder.
Previous strict threading requirements we not always followed and this
causes crashes in some scenarios.

Bug: webrtc:7760
Change-Id: I4808edfff19c63a9c4a9585834d46f9c73bb1c4b
Reviewed-on: https://webrtc-review.googlesource.com/13660
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20353}
2017-10-19 12:44:11 +00:00
Alex Narest
a5fbc23379 BWE allocation strategy
This is reland of https://webrtc-review.googlesource.com/c/src/+/4860 with the fixed RampUpTest test

Bug: webrtc:8243
Change-Id: I4b90a449b00dd05feee974001e08fb40710b59ac
Reviewed-on: https://webrtc-review.googlesource.com/13124
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20345}
2017-10-19 09:30:00 +00:00
Kári Tristan Helgason
117c48291c Replace use of codec name strings with constants.
Bug: webrtc:8401
Change-Id: I2aee61e026330ec233eb8b3bfe2d529187562249
Reviewed-on: https://webrtc-review.googlesource.com/10814
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20340}
2017-10-19 07:28:12 +00:00
Sami Kalliomäki
033ea5f771 Fix a typo in YuvConveter RGB shader code.
TBR=magjed@webrtc.org

Bug: None
Change-Id: Ia2594f6191510cb971f435ca9c27418cce929617
Reviewed-on: https://webrtc-review.googlesource.com/12920
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20332}
2017-10-18 07:56:28 +00:00
Taylor Brandstetter
157e76f8a1 Fix issue in AndroidNetworkMonitor for Wi-Fi Direct socket binding.
AndroidNetworkMonitor::BindSocketToNetwork incorrectly checks if the
socket_fd is NETWORK_UNSPECIFIED, when it should instead be checking
if the network_handle is that. This causes the PhysicalSocket to think
that it has succesfully bound to the port, when it really has not.
This stops IceCandidates from being created for these addresses
(although a socket is listening).

The net result of this is that webrtc connections don't work when both
peers are using Wifi-Direct to communicate, although we didn't notice
this previously since we were using Wifi-Direct only on one side.

TBR=pthatcher@webrtc.org

Bug: webrtc:8403
Change-Id: Ibe8f5424654ac9db1f79927ba7ac241fd40d9cba
Reviewed-on: https://webrtc-review.googlesource.com/12442
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20331}
2017-10-17 20:18:31 +00:00
Lu Liu
39260c4a6b Revert "BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic."
This reverts commit 54d1da13a5.

Reason for revert: Breaking tests

Original change's description:
> BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic.
> 
> This CL implements the main logic and IOS appRTC integration.
> 
> Unit tests and Android appRTC will be in separate CL.
> 
> Bug: webrtc:8243
> Change-Id: If8e5195294046a47316e9fade1b0dfec211155e1
> Reviewed-on: https://webrtc-review.googlesource.com/4860
> Commit-Queue: Alex Narest <alexnarest@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20329}

TBR=deadbeef@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,alexnarest@webrtc.org

Change-Id: I5be1da78f360f72be66f9d56dd6b88c1cc13e963
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8243
Reviewed-on: https://webrtc-review.googlesource.com/12560
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20330}
2017-10-17 19:59:04 +00:00
Alex Narest
54d1da13a5 BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic.
This CL implements the main logic and IOS appRTC integration.

Unit tests and Android appRTC will be in separate CL.

Bug: webrtc:8243
Change-Id: If8e5195294046a47316e9fade1b0dfec211155e1
Reviewed-on: https://webrtc-review.googlesource.com/4860
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20329}
2017-10-17 18:22:15 +00:00
Sami Kalliomäki
6bf70d20da Make YuvConverter public.
YuvConverter was left package protected by mistake in the previous
change.

Bug: None
Change-Id: I2235f745c2f36f9b49199a3dad09da78f63c33e3
Reviewed-on: https://webrtc-review.googlesource.com/11980
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20322}
2017-10-17 11:33:30 +00:00
Sami Kalliomäki
cb98b11b71 Expose functionality to convert TextureBuffer to I420.
Bug: webrtc:8392
Change-Id: I79682efbef3aecbba904aa5047b229833fae25e8
Reviewed-on: https://webrtc-review.googlesource.com/8940
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20313}
2017-10-16 14:55:37 +00:00
Anders Carlsson
6bf43d2818 AppRTCMobile iOS: Use video encoder factory to manage codec preference.
List codecs from factory in settings, select by changing order in factory.

Bug: webrtc:7925
Change-Id: If3c45e56713104c88705c67560325d002e6d6700
Reviewed-on: https://webrtc-review.googlesource.com/3720
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20312}
2017-10-16 13:37:37 +00:00
Sami Kalliomäki
cee3e53631 Android: Cache implementation name in VideoDecoderWrapper.
This fixes a crash caused by access to already freed memory returned
by VideoDecoderWrapper::ImplementationName method.

Bug: webrtc:7760
Change-Id: Ia4b020d1dd861e6a45637abde35f12951b7c43ea
Reviewed-on: https://webrtc-review.googlesource.com/9420
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20290}
2017-10-13 14:23:07 +00:00
Daniela
ae012cf8b8 Add xctest target to migrate sdk/objc/Framework to it.
This CL adds all the scaffolding needed to support xctest target
in sdk/objc/Framework and adds the target to the bot configuration.

The benefits of this are two-fold.
1. We'll separate framework unittests from their current target,
`rtc_unittests`, that has many many other tests.
This way framework unit tests will have nice, compact, selfcontained target.
2. We'll harvest the power of XCTest (native testing framework)
that should hopefully make adding and writing objc tests easier.

This CL migrates only one test to prove the setup works.
More tests will be migrated in follow up cls.

Bug: webrtc:8382
Change-Id: I0b5b9596c2a6d91683d13632323441de1aa461e0
Reviewed-on: https://webrtc-review.googlesource.com/8501
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Commit-Queue: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20289}
2017-10-13 14:19:32 +00:00
Mirko Bonadei
2a5e7906a9 Fix errorprone errors.
In order to enable errorprone [1] we have to fix this finding.

third_party/errorprone has been recently enabled in Chromium and in
order to unblock the Chromium Roll we have to fix these errors. 

[1] - https://cs.chromium.org/chromium/src/third_party/errorprone/

Bug: webrtc:8390
Change-Id: Ic737def5ae2a8c6ad1216d9b485af59987fe511c
Tbr: magjed@webrtc.org
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/9161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20273}
2017-10-13 09:33:47 +00:00