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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}