Commit graph

535 commits

Author SHA1 Message Date
Yura Yaroshevich
ef43aafcf5 Fixed crash when PCF is destroyed before RTCRtpSender in ObjC
Bug: webrtc:9231
Change-Id: I3b90400bf619938817d7a04a7a1130ba86ad65df
Reviewed-on: https://webrtc-review.googlesource.com/87623
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23896}
2018-07-10 07:35:35 +00:00
Mirko Bonadei
4d131e4eec Switch from int64 to int64_t.
The usage of int64 seems unintentional but it works because int64 is
defined here:
https://cs.chromium.org/chromium/src/third_party/libyuv/include/libyuv/basic_types.h?l=33&rcl=e1f6c1c0b57a9210bb95e88080fa171296210296

This CL switches to int64_t and aligns with the rest of the codebase.

Bug: None
Change-Id: I2292974dbca3692b570214d8bc790336219b151e
Reviewed-on: https://webrtc-review.googlesource.com/87700
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23894}
2018-07-10 06:20:01 +00:00
Benjamin Wright
728b9b564d Adds PeerConnectionDependencies to Java API.
This change adds the base PeerConnectionDependencies structure available in the
native API to the Java API. This changelist only adds the API for the
PeerConnection.Observer which is currently the only mandatory parameter. In
a following CL this will be extended to include the SSLCertificateVerifier
allowing java code to provide an implementation of this.

Bug: webrtc:7913
Change-Id: I74c2e46988ed5cb0685ed907c1bff43867f2c48c
Reviewed-on: https://webrtc-review.googlesource.com/86180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23892}
2018-07-09 23:57:05 +00:00
Rasmus Brandt
5e4ef774de Add unit test for JavaToNativeVideoCodecInfo.
Bug: webrtc:9495
Change-Id: I8f667f81754ed299a99ddc85af8ee73b148a2335
Reviewed-on: https://webrtc-review.googlesource.com/87580
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23885}
2018-07-09 13:26:34 +00:00
Yura Yaroshevich
08f14dd388 Fixed crash when PCF is destroyed before RTCRtpTranceiver in ObjC
Bug: webrtc:9231
Change-Id: Icecc319eaf6edd2c4b7b05fda984660412cb0d40
Reviewed-on: https://webrtc-review.googlesource.com/87439
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23884}
2018-07-09 12:14:50 +00:00
Rasmus Brandt
42a2fc9cba Support injecting custom native codecs from Java.
This CL extends our support for injecting native codecs such that
downstream users can create Java codecs that are backed by custom
native codecs.

After this CL, the Java codec interfaces expose
createNativeVideo{En,Decoder}() methods that may return a value
representing a pointer to the backing native codec. Previously,
a similar mechanism was used for the special case of non-public
Java codecs extending from the internal
WrappedNativeVideo{En,De}coder classes.

Tested: AppRTCMobile on Pixel XL and Pixel 2.
Bug: webrtc:9495
Change-Id: I079ff744afc7bf9873ff983e775c136a6667266d
Reviewed-on: https://webrtc-review.googlesource.com/87264
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23883}
2018-07-09 12:07:11 +00:00
Magnus Jedvert
bf7463b88f Android: Update tests to use new SurfaceTextureHelper interface
Bug: webrtc:9412
Change-Id: I17d2f2cb4e1271d07958c6b7f2db47960e4b39ee
Reviewed-on: https://webrtc-review.googlesource.com/87260
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23877}
2018-07-06 15:18:18 +00:00
Sami Kalliomäki
b2daaaacbd Update capturer/test code to use the new interface VideoCapturer.
Bug: webrtc:9496
Change-Id: I9adf2c341b831820bbe71f2511616b629c9e1acc
Reviewed-on: https://webrtc-review.googlesource.com/87306
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23869}
2018-07-06 10:42:11 +00:00
Sami Kalliomäki
05b552f76a Deprecate PeerConnectionFactory#createVideoSource(VideoCapturer).
This is done in preparation of moving VideoCapturer out of
video_api_java. Clients should update to using
createVideoSource(boolean).

CapturerObserver is moved to a separate file because it needs to stay
in video_api_java to allow VideoSource to depend on it.

Bug: webrtc:9496
Change-Id: I3c93f6bc4df553919dcbe05b00ef4c68f2c9ab60
Reviewed-on: https://webrtc-review.googlesource.com/87305
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23868}
2018-07-06 10:35:46 +00:00
Magnus Jedvert
80e7a7fd1a Android: Output VideoFrames from SurfaceTextureHelper
Bug: webrtc:9412
Change-Id: Iffc8dae2fdfb8d7e5c730b433614b7aa30ceb55b
Reviewed-on: https://webrtc-review.googlesource.com/83943
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23867}
2018-07-06 10:34:41 +00:00
Rasmus Brandt
bfd44e0837 Add JavaToNativeVideoCodecInfo to native API.
This conversion function is useful for downstream native codecs
which want to take a VideoCodecInfo in the Java wrapper and use it
as a SdpVideoFormat in the C++ object.

Bug: webrtc:9495
Change-Id: Id2ece708eafd4be648fafff9e94aa13ace504bdf
Reviewed-on: https://webrtc-review.googlesource.com/87381
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23865}
2018-07-06 09:32:51 +00:00
Magnus Jedvert
b4918dad6a Android: Deprecated custom matrix helper functions in RendererCommon
All usage of these functions should be migrated to use
android.opengl.Matrix instead.

Bug: webrtc:9487
Change-Id: I023761b31cae7e7af9b537928b849657baa5bb8b
Reviewed-on: https://webrtc-review.googlesource.com/87263
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23853}
2018-07-05 12:16:34 +00:00
Magnus Jedvert
783c6e3a72 Android camera: Replace custom matrix operations with android.opengl.Matrix
Bug: webrtc:9412, webrtc:9487
Change-Id: I68e5a03026b1ab8236a05ece79690d4a8755c093
Reviewed-on: https://webrtc-review.googlesource.com/86947
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23851}
2018-07-05 12:02:24 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Magnus Jedvert
431f14ef69 Android: Remove deprecated VideoRenderer and I420Frame
Bug: webrtc:9181
Change-Id: I9a38a35ae33ed385a9a5add0a5f51ec035019d91
Reviewed-on: https://webrtc-review.googlesource.com/71661
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23849}
2018-07-05 10:37:59 +00:00
Magnus Jedvert
f4aeb891b7 Android: Handle StartRecording() failure gracefully
This CL also adds a test to test the behavior when StartRecording()
fails, which is the case when e.g. the microphone is already in use.

Bug: webrtc:9491
Change-Id: Ifce60ce5e9b7fa7521ca5c9fe20794233456b9ce
Reviewed-on: https://webrtc-review.googlesource.com/87105
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23842}
2018-07-04 14:08:54 +00:00
Mirko Bonadei
23f71a8144 Remove usage of //build/config/clang:extra_warnings.
Bug: webrtc:9251
Change-Id: I13522eafff1a4d6a9fe909c305efa0e4581a56c7
Reviewed-on: https://webrtc-review.googlesource.com/86880
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23819}
2018-07-03 12:35:49 +00:00
Emircan Uysaler
98badbcd9f Add VP9 profile negotiation to SDP
This CL adds VP9 profile information in SDP. It adds the necessary fields and
enums to codec containers.

Additional profiles will be followed.

Bug: webrtc:9376
Change-Id: I78574714f06f8087262a71dd64c01f31a229dd54
Reviewed-on: https://webrtc-review.googlesource.com/81960
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23810}
2018-07-02 23:38:41 +00:00
Qingsi Wang
9f1de69008 Add ADAPTER_TYPE_ANY in AdapterType.
ADAPTER_TYPE_ANY can be used to set the network ignore mask if an
application does not want candidates from the any address ports, the
underlying network interface types of which are not determined in
gathering. The ADAPTER_TYPE_ANY is also given the maximum network cost
so that when there are candidates from explicit network interfaces,
these candidates from the any address ports as backups, if they ever
surface, are not preferred if the other candidates have at least the
same network condition.

Bug: webrtc:9468
Change-Id: I20c3a40e9a75b8fb34fad741ba5f835ecc3b0d92
Reviewed-on: https://webrtc-review.googlesource.com/85880
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23807}
2018-07-02 17:59:11 +00:00
Taylor Brandstetter
dc99e244ca Removing deadbeef@ from OWNERS files.
Since I'm leaving Google.

Bug: None
Notry: True
Change-Id: Ibb5c3e09fce007d149200dcb6cac74be53084764
Reviewed-on: https://webrtc-review.googlesource.com/86461
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23795}
2018-07-02 00:40:38 +00:00
Paulina Hensman
7a29426142 Detach audio devices from thread on terminate.
To allow the AudioDeviceModule to be reinitialized on a different thread
after termination, detach AudioDeviceModule and the input/output devices
when Terminate is called. Also destroy the AudioDeviceBuffer.

Bug: webrtc:7452
Change-Id: I50ef77c531f33d4efa0567d0475dd8280337bed9
Reviewed-on: https://webrtc-review.googlesource.com/86127
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23784}
2018-06-29 12:00:17 +00:00
Yura Yaroshevich
c75b35ab40 Fixed crash when PCF is destroyed before DataChannel in ObjC
Bug: webrtc:9231
Change-Id: Ifad698b366be61d33ffca81cf4f8ca8aba2988a2
Reviewed-on: https://webrtc-review.googlesource.com/86040
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23771}
2018-06-28 12:54:22 +00:00
Alex Narest
0bd7bf0de3 Adding ABWENoTWCC field trial
Bug: webrtc:8243
Change-Id: I80c598f6cf42c831e73ca98f68e726cf892549ce
Reviewed-on: https://webrtc-review.googlesource.com/85980
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23764}
2018-06-28 09:51:00 +00:00
Paulina Hensman
1ec04f19c6 Reland "Reland "Injectable logging""
This is a reland of 21219a0e43

The default implementation of OnLogMessage(msg, sev, tag) discarded
the tag, resulting in FileRotatingLogSink not receiving tags.

Since the revert the default implementation of
OnLogMessage(msg, sev, tag) has been updated to add the tag to the log
message. A more efficient implementation of it has also been added for
FileRotatingLogSink.

Unit tests are added for the default implementation and for Loggable
injection.

Original change's description:
> Reland "Injectable logging"
>
> Any injected loggable or NativeLogger would be deleted if PCFactory
> was reinitialized without calling setInjectableLogger. Now native
> logging is not implemented as a Loggable, so it will remain active
> unless a Loggable is injected.
>
> This is a reland of 59216ec4a4
>
> Original change's description:
> > Injectable logging
> >
> > Allows passing a Loggable to PCFactory.initializationOptions, which
> > is then injected to Logging.java and logging.h. Future log messages
> > in both Java and native will then be passed to this Loggable.
> >
> > Bug: webrtc:9225
> > Change-Id: I2ff693380639448301a78a93dc11d3a0106f0967
> > Reviewed-on: https://webrtc-review.googlesource.com/73243
> > Commit-Queue: Paulina Hensman <phensman@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23241}
>
> Bug: webrtc:9225
> Change-Id: I2fe3fbc8c323814284bb62e43fe1870bdab581ee
> TBR: kwiberg
> Reviewed-on: https://webrtc-review.googlesource.com/77140
> Commit-Queue: Paulina Hensman <phensman@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23310}

Bug: webrtc:9225
Change-Id: I67a5728fe772f0bedc9509713ed8b8ffdc31af81
TBR: kwiberg
Reviewed-on: https://webrtc-review.googlesource.com/80860
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23711}
2018-06-21 13:44:53 +00:00
Yura Yaroshevich
c806c1d337 Fixed crash when PCF is destroyed before MediaStream in ObjC
Bug: webrtc:9231
Change-Id: I04e76172dd0d5ee5e9040e773e63fd4df0c797ce
Reviewed-on: https://webrtc-review.googlesource.com/84580
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23699}
2018-06-21 11:12:30 +00:00
Danil Chapovalov
196100efa6 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script passing top level directories except rtc_base and api

find $@ -type f \( -name \*.h -o -name \*.cc -o -name \*.mm \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I9465c172e65ba6e6ed4e4fdc35b0b265038d6f71
Reviewed-on: https://webrtc-review.googlesource.com/84584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23697}
2018-06-21 09:32:56 +00:00
Jiawei Ou
ae810c10b4 Create a peer connection factory builder
Similar to the builder on android: https://cs.chromium.org/chromium/src/third_party/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java?rcl=b90e63c620877712e45ee320cfa25cb825bf5373&l=134

1. A builder will allow us to choose what module factories to provide and use default for the others.
2. A helper category is added to provide helpers functions for creating common builders.

Bug: None
Change-Id: I5889bdd7dc2a2aeded62ef5f2c2381edd07089b3
Reviewed-on: https://webrtc-review.googlesource.com/83280
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23696}
2018-06-21 09:22:50 +00:00
Mirko Bonadei
beb2d9813c Removing usage of //build/config/compiler:no_size_t_to_int_warning.
Bug: webrtc:9251, webrtc:1348
Change-Id: I76e52abbfab5666cad73044b49172a9799539108
Reviewed-on: https://webrtc-review.googlesource.com/84144
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23686}
2018-06-20 13:44:26 +00:00
Mirko Bonadei
de212ca039 Removing some MSVC warning suppression flags.
Bug: webrtc:9251
Change-Id: Idf13b49648459a37fe0a3cac12ff993ce27439d9
Reviewed-on: https://webrtc-review.googlesource.com/84281
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23685}
2018-06-20 12:41:46 +00:00
Yura Yaroshevich
5297bd21b1 Fixed crash when PCF is destroyed before PC in ObjC
Bug: webrtc:9231
Change-Id: Iaf18257b8f38fa786d462bca5f860f9a7b1cc2d0
Reviewed-on: https://webrtc-review.googlesource.com/78800
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23674}
2018-06-20 06:45:17 +00:00
Paulina Hensman
fa2b8d7456 Add separate native library for instrumentationtests
Also adds api in PCF for specifying which library to load.

This is in preparation for a CL adding a native function
to be used only in tests.

Bug: webrtc:9225
Change-Id: I72eff272350404729424176758bfa81f7da81836
Reviewed-on: https://webrtc-review.googlesource.com/84125
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23663}
2018-06-19 14:59:06 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Niels Möller
5d848f3ad6 Delete picture id and tl0 index from CodecSpecificInfo.
This is a followup to https://webrtc-review.googlesource.com/61640,
moving the responsibility for setting these values to the
PayloadRouter.

Bug: webrtc:8830
Change-Id: I8e5a02cf7bb7417166f04d5511aab7a778799bc1
Reviewed-on: https://webrtc-review.googlesource.com/83164
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23654}
2018-06-19 11:14:16 +00:00
Magnus Jedvert
c66613daf7 Android: Simlify createOesTextureBuffer() in VideoFrameBufferTest
There is no need to hold on to the render thread after the OES texture
buffer has been created. toI420() is handled by the thread in the
SurfaceTextureHelper.

Bug: webrtc:9391
Change-Id: Ide081bc083db72bb991f1deba74d3cecf3e1fee6
Reviewed-on: https://webrtc-review.googlesource.com/84121
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23652}
2018-06-19 10:26:46 +00:00
Jonas Olsson
f8e5c110ee Refactor checks to use a copy of the new logging backend.
As a bonus, this shrinks the android release version of libjingle_peerconnection_so.so by ~25k in local tests.

We could try to unify the backend with the logging one, but that turns out to be surprisingly tricky due to dependency loops and chromium overrides.

Bug: webrtc:8982
Change-Id: I66854dd333f568d9b2a5f46bbead14b2e31179be
Reviewed-on: https://webrtc-review.googlesource.com/79623
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23634}
2018-06-15 13:48:25 +00:00
Magnus Jedvert
65c61dcfce Android: Add helper class for generating OpenGL shaders
This CL adds a helper class GlShaderBuilder to build an instances of
RendererCommon.GlDrawer that can accept multiple input sources
(OES, RGB, or YUV) using a generic fragment shader as input.

Bug: webrtc:9355
Change-Id: I14a0a280d2b6f838984f7b60897cc0c58e2a948a
Reviewed-on: https://webrtc-review.googlesource.com/80940
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23622}
2018-06-15 09:06:45 +00:00
Peter Hanspers
7c32c866c0 Metal view: Update drawable size when rotating.
Bug: webrtc:9407
Change-Id: I8d6651eb4cd22c83a2dddbdbd890f34a61002f97
Reviewed-on: https://webrtc-review.googlesource.com/83586
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23614}
2018-06-14 13:46:06 +00:00
Magnus Jedvert
6507054db1 Android: Add tests for VideoFrame.Buffer.toI420() and cropAndScale()
This CL adds tests that are primarily targeting
VideoFrame.Buffer.toI420() and cropAndScale(), but includes the whole
chain for YuvConverter, GlRectDrawer, and VideoFrameDrawer.

It also includes a couple of fixes to bugs that were exposed by the new
tests.

Bug: webrtc:9186, webrtc:9391
Change-Id: I5eb62979a8fd8def28c3cb2e82dcede57c42216f
Reviewed-on: https://webrtc-review.googlesource.com/83163
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23611}
2018-06-14 11:06:37 +00:00
Magnus Jedvert
b7700d370d Android: Fix VideoTrack behavior for adding/removing VideoSinks
In particular:
 * Trying to remove a VideoSink that was not attached should be a no-op.
 * Trying to remove a null VideoSink should be a no-op.
 * Adding the same VideoSink multiple times should a no-op, and should
   not create duplicate native VideoSinks.
 * Trying to add a null VideoSink should throw an exception in the Java
   layer instead of crashing in native code.

This CL also adds tests that verify these behaviors.

Bug: webrtc:9403
Change-Id: I928b7bb7f683634e287d7fec9e26f4179f73c150
Reviewed-on: https://webrtc-review.googlesource.com/83322
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23602}
2018-06-13 15:51:17 +00:00
Alex Narest
789221f110 Adding WebRTC-Audio-ForceNoTWCC field trial
Bug: webrtc:8243
Change-Id: I74864b8e67cd9c62c5fe26a03efdcdca01d2a93f
Reviewed-on: https://webrtc-review.googlesource.com/83323
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23596}
2018-06-13 12:30:59 +00:00
Niels Möller
e3cf3d0496 Use enum class for VideoCodecMode and VideoCodecComplexity.
Bug: webrtc:7660
Change-Id: I6a8ef01f8abcc25c8efaf0af387408343a7c8ba3
Reviewed-on: https://webrtc-review.googlesource.com/81240
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23595}
2018-06-13 12:26:09 +00:00
Zhi Huang
b57e169f3c Add a flag to actively reset the SRTP parameters
Add a new flag to RtcConfiguration. By setting that flag to true, the
SRTP parameters will be reset whenever the DTLS transports are reset
after every offer/answer negotiation.

The flag is added to Android and Objc wrapper as well.

This should only be used as a workaround for the linked bug, if the
application knows that the other party is affected (for instance,
using a version number).

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

Bug: chromium:835958
Change-Id: I6db025e1c69bf83e1b1908f7df4627430db9920c
Reviewed-on: https://webrtc-review.googlesource.com/83101
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23587}
2018-06-12 20:32:00 +00:00
Florent Castelli
abe301fe6c Add HeaderExtensions to RtpParameters
Bug: webrtc:7580
Change-Id: I4fcf3e8bc4975a6b2baa6f24a17c254d2bf521d9
Reviewed-on: https://webrtc-review.googlesource.com/78288
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23584}
2018-06-12 17:01:40 +00:00
Peter Hanspers
7af087a918 Metal renderer does not handle i420 frames correctly.
Bug: webrtc:9389
Change-Id: If036f3f6208f5ce8aea1cabd1d7ccff1dfcc0808
Reviewed-on: https://webrtc-review.googlesource.com/83160
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23581}
2018-06-12 12:56:24 +00:00
Anders Carlsson
dd3e0ab2bf Make rtc_software_fallback_wrappers target visible.
Need to depend on them from Chromium.

Bug: webrtc:7925
Change-Id: Iea1bb3b937c602920bfd87f885c87c790ac7bc17
Reviewed-on: https://webrtc-review.googlesource.com/82061
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23580}
2018-06-12 12:51:34 +00:00
Anders Carlsson
80a0a4c482 Remove software fallback in Android hardware codec factories.
Remove backwards compatiblity. Users who need software codecs should
migrate to the DefaultVideoCodecFactories.

Bug: webrtc:7925
Change-Id: Ifb41c9511d53c17c83222422c221b595bc056cb2
Reviewed-on: https://webrtc-review.googlesource.com/82920
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23563}
2018-06-11 15:59:09 +00:00
Magnus Jedvert
fe89271bee Android: Use JavaToNativeString in PeerConnectionFactory_InitializeFieldTrials
Bug: b/109736242
Change-Id: I56a404c2e6c8c842b23465249f72897cee0878b5
Reviewed-on: https://webrtc-review.googlesource.com/81742
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23558}
2018-06-09 17:38:06 +00:00
henrika
ec9c745228 Adds support for new Windows ADM with limited API support.
Summary of what this CL does:

Existing users can keep using the old ADM for Windows as before.

A new ADM for Windows is created and a dedicated factory method is used
to create it. The old way (using AudioDeviceImpl) is not utilized.

The new ADM is based on a structure where most of the "action" takes
place in new AudioInput/AudioOutput implementations. This is inline
with our mobile platforms and also makes it easier to break out common
parts into a base class.

The AudioDevice unittest has always mainly focused on the "Start/Stop"-
parts of the ADM and not the complete ADM interface. This new ADM supports
all tests in AudioDeviceTest and is therefore tested in combination with
the old version. A value-parametrized test us added for Windows builds.

Improved readability, threading model and makes the code easier to maintain.

Uses the previously landed methods in webrtc::webrtc_win::core_audio_utility.

Bug: webrtc:9265
Change-Id: If2894b44528e74a181cf7ad1216f57386ee3a24d
Reviewed-on: https://webrtc-review.googlesource.com/78060
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23554}
2018-06-08 14:44:38 +00:00
Peter Hanspers
488eb98616 Setting resolution alignment to 4 on iOS.
Bug: webrtc:9381
Change-Id: I6fb6cc6ffa197ca581462e308a857ac38e10b9a1
Reviewed-on: https://webrtc-review.googlesource.com/82162
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23553}
2018-06-08 14:17:07 +00:00
Danil Chapovalov
350531e2a3 Revert "Move class VideoCodec from common_types.h to its own api header file."
This reverts commit efc71e565e.

Reason for revert: probably breaks downstream test

Original change's description:
> Move class VideoCodec from common_types.h to its own api header file.
> 
> Bug: webrtc:7660
> Change-Id: I91f19bfc2565461328f30081f8383e136419aefb
> Reviewed-on: https://webrtc-review.googlesource.com/79881
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23544}

TBR=danilchap@webrtc.org,brandtr@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: Id8bd37c79c2f8d09a4d88368765230103f1db2c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7660
Reviewed-on: https://webrtc-review.googlesource.com/82101
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23547}
2018-06-08 11:04:23 +00:00