Commit graph

1534 commits

Author SHA1 Message Date
Sergey Silkin
0af2bc639a Add H265 to VideoCodecMimeType
This enables testing HW H265 codecs on devices where the support is available.

Bug: b/261160916, webrtc:14852
Change-Id: I32d102fcf483ea4ba46d6f5161342dbb584e7cc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298040
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39591}
2023-03-17 15:28:11 +00:00
Sergey Silkin
a02f90691e Remove resolution alignment requirement (part 2)
https://webrtc-review.googlesource.com/c/src/+/296340 removed hard resolution alignment requirement from HardwareVideoEncoder.initEncode(). This CL removes the hard resolution alignment requirement from HardwareVideoEncoder.resetCodec().

Bug: webrtc:13089
Change-Id: Ia9fcd4d6a7ea16509ec3f12c3c78a76d1eb6c6f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296520
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39498}
2023-03-07 17:18:55 +00:00
Sergey Silkin
5c978cb262 Remove resolution alignment requirement
This partially reverts https://webrtc-review.googlesource.com/c/src/+/229460. HW encoder wrapper still requires 16x16 alignment but InitEncode() doesn't fail if input resolution doesn't satisfy this requirement.

If encoder can't handle 16x16 then it should return error from MediaCodec.configure(). Many HW encoder can handle resolutions not multiple of 16. Having strict requirement for resolution alignment in InitEncode() blocks usage and testing of these encoders.

This change doesn't affect WebRTC in Chrome Android since RTC encoder wrapper requires 16x16 alignment: https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/android/android_video_encode_accelerator.cc;drc=4abbb981443d7403566ef8aff05fdaca1e837da3;l=494

Bug: webrtc:13089
Change-Id: I0c39908bbcd7d0740a9ee8afa022ba443ffdb4de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296340
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39487}
2023-03-06 16:51:03 +00:00
Sergey Silkin
c494846bdf Set is_hardware_accelerated=true in JNI decoder wrapper
Assume that all Java decoders are hardware-accelerated.

Bug: b/261160916, webrtc:14852
Change-Id: I4c61839258c86ec9322b82d291542e2df6fd2ff1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295863
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39457}
2023-03-02 15:12:20 +00:00
Alessio Bazzica
db1fae46d8 Reland "Remove ISAC media constant and payload type mapping"
This reverts commit b79b74e08b.

Reason for revert: downstream fixed

Original change's description:
> Revert "Remove ISAC media constant and payload type mapping"
>
> This reverts commit 4c7271aafe.
>
> Reason for revert: Breaks downstream test
>
> Original change's description:
> > Remove ISAC media constant and payload type mapping
> >
> > following the removal of ISAC from the code base.
> >
> > BUG=webrtc:14450
> >
> > Change-Id: I6faab5391bf0ef563c5dcce0bd5d8a653a87d9c8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294523
> > Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> > Cr-Commit-Position: refs/heads/main@{#39378}
>
> Bug: webrtc:14450
> Change-Id: Idccd0ad7a05828f1be6db2071878c64d9bd37f33
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294742
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39380}

Bug: webrtc:14450
Change-Id: I31a9b1873d0197a44d1a3da1d8c40a3a0fa15986
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295502
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39419}
2023-02-28 15:45:23 +00:00
Björn Terelius
b79b74e08b Revert "Remove ISAC media constant and payload type mapping"
This reverts commit 4c7271aafe.

Reason for revert: Breaks downstream test

Original change's description:
> Remove ISAC media constant and payload type mapping
>
> following the removal of ISAC from the code base.
>
> BUG=webrtc:14450
>
> Change-Id: I6faab5391bf0ef563c5dcce0bd5d8a653a87d9c8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294523
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#39378}

Bug: webrtc:14450
Change-Id: Idccd0ad7a05828f1be6db2071878c64d9bd37f33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294742
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39380}
2023-02-23 15:00:38 +00:00
Philipp Hancke
4c7271aafe Remove ISAC media constant and payload type mapping
following the removal of ISAC from the code base.

BUG=webrtc:14450

Change-Id: I6faab5391bf0ef563c5dcce0bd5d8a653a87d9c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294523
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39378}
2023-02-23 10:23:48 +00:00
Sergey Silkin
2bdf79ac91 Handle frame_types=null in VideoEncoderWrapper::Encode()
frame_types=null is a valid input for Encoder(). VP8/VP9/H264 software encoder wrappers can handle frame_types=null.

Bug: b/261160916, webrtc:14852
Change-Id: I96ed98d553546ecbe70ff0356f314496f838c535
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39325}
2023-02-16 11:09:51 +00:00
Byoungchan Lee
2e631f5c38 Always build all iOS unittests, even on the simulator.
Also, make the iOS audio unittests not run on the simulator by default,
and if someone wants to run the tests one can do
by using the WEBRTC_IOS_RUN_AUDIO_TESTS environment variable.

Bug: webrtc:7812
Change-Id: Ie9fc70872c6617516e2f2c21039489df309b85fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39306}
2023-02-13 20:30:24 +00:00
Sergey Silkin
831664294c Allow getScalingSettings to be called from any thread
Scaling settings is a static property of the encoder wrapper. It has no any dependencies on underlaying HW codec and can be fetched from any thread.

getScalingSettings is called from VideoEncoderWrapper ctor [1]. Presence of checkIsOnValidThread() in getScalingSettings caused capturing of thread [2]. That required all following codec calls to be done from the thread that created the codec.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=41

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/rtc_base/java/src/org/webrtc/ThreadUtils.java;l=30

Bug: b/261160916, webrtc:14852
Change-Id: I7bb18bc8e3b371d83ccd44d4a5a096f716c0a0e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291807
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39303}
2023-02-13 15:14:42 +00:00
Andreas Pehrson
97d1c34769 Enable rotation tests marked as expected failures
Bug: webrtc:8382
Change-Id: I70ba0cdbdc9bd1e3014a379deb9ae39795e60d1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290899
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39247}
2023-02-02 10:48:32 +00:00
Jeremy Leconte
e351560d5f Disable RTCCameraVideoCapturerTestsWithMockedCaptureSession.
The test is already disabled on iOS < 16 and fails on iOS 16 with this error:
/../../sdk/objc/unittests/RTCCameraVideoCapturerTests.mm:556: error: -[RTCCameraVideoCapturerTestsWithMockedCaptureSession testStartCaptureSetsOutputDimensionsInvalidPixelFormat] : ((width) equal to ([output.videoSettings[(id)kCVPixelBufferWidthKey] intValue])) failed: ("110") is not equal to ("0")
https://chromium-swarm.appspot.com/task?id=5fc0ac239b2dd110

Change-Id: Ia0a5c4290261b204d5e369dfc62113268ef48127
Bug: webrtc:14829, b/264630045
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290895
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39130}
2023-01-18 09:45:06 +00:00
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Andreas Pehrson
d100a589c8 Add dimensions to video settings in objc sdk camera backend.
This is required by some virtual cameras, like Snap Camera from
Snapchat.

Bug: webrtc:14783
Change-Id: I3d841936c17f3f227af9a94a4c3b0f37940d43b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288361
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39073}
2023-01-11 13:59:37 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Philipp Hancke
b81823a5f0 stats: use Timestamp instead of uint64_t
making it clear what unit is being used.

BUG=webrtc:13756

Change-Id: I6354d35a8e02bb93a905ccf32cb0b294b4813e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39008}
2023-01-05 08:37:31 +00:00
Andreas Pehrson
8bec181bfc Finish converting RTCCameraVideoCapturerTests to XCTest
Failed gunit assertions in these XCTestCase classes cannot result in
failed tests.

Bug: webrtc:8382
Change-Id: I47b50b74f60029fafeff4ca885775482a85dfdd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288603
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38995}
2023-01-04 10:16:43 +00:00
Andreas Pehrson
8ce2fc1448 Add back lost RotationCamera tests
Lost in
https://webrtc.googlesource.com/src/+/c8a6fb2bb8762de17008dee97c5fb6e762f7e056

Bug: webrtc:8382
Change-Id: Ic9abd5d2b5d2593354e759c328b423ba272c8b9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288700
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38991}
2023-01-04 05:38:46 +00:00
Andreas Pehrson
7e176c41b9 Get RTCCameraVideoCapturerTests working again
See commit
https://webrtc.googlesource.com/src/+/c8a6fb2bb8762de17008dee97c5fb6e762f7e056
where the setup methods for RTCCameraVideoCaptureTests' test cases were
lost. Both "setup" where XCTest instead looks for "setUp", and
"setupWithMockedCaptureSession" which isn't called explicitly anywhere.

This commit splits the old RTCCameraVideoCaptureTests into two;
RTCCameraVideoCaptureTests for tests using "setup", and
RTCCameraVideoCaptureTestsWithMockedCaptureSession for tests using
"setupWithMockedCaptureSession".

Bug: webrtc:8382
Change-Id: I64cefff744e12f62d65e04133512de1e10d17d95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288601
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38931}
2022-12-20 15:02:33 +00:00
Mike Woodworth
cca2c0e6bb fixes crash caused by race derefing pixelbufferpool ivar while being destroyed and replaced by format change
removes cached pixelbufferpool and instead retrieves current pool from the compressionSession each time (as recommended by apple docs)

Bug: webrtc:14688
Change-Id: I2244e69e7f32b912021db0905b9d5867d0bf6357
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284240
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38920}
2022-12-20 10:22:52 +00:00
Harald Alvestrand
794d599741 Split media_channel and its dependencies from the rtc_media_base target
This helps in figuring out which dependencies exist, and gets closer
to obeying the "one target per .cc file" rule.

Test failures seem unrelated, so using No-Try.

No-Try: true
Bug: webrtc:14775
Change-Id: Id25466c8b8fe628d05c819cf7c69ae6d8421c6cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288020
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38910}
2022-12-16 12:15:22 +00:00
Byoungchan Lee
4a680f11ae Removed outdated comment of Notifier
Notifier is thread-hostile, and we have added a SequenceChecker
on https://webrtc-review.googlesource.com/c/src/+/252520 ,
so this comment is no longer needed.

Bug: None
Change-Id: I39f7f75a786dd27d2f6299d85676e7182d9032eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38899}
2022-12-15 13:17:41 +00:00
Jonas Oreland
c0c65387ae AndroidNetworkMonitor - loosen assumptions even more
This cl/ attempts to fix (rather) rare crashes in
OnNetworkConnected_n by loosening the assumptions
that a network handle will keep it's network name.

With this cl/ it is possible that a NetworkHandle
can call OnNetworkConnected_n with one interface name
and then directly afterwards call it with another (
w/o an OnNetworkDisconnected_n inbetween).

This is the only scenario in which I could see the previous
crash occurring.

i.e
OnNetworkConnected(handle, "some-if-name")
OnNetworkConnected(handle, "some-other-name")

- previously this caused crash,
- now this is treated as if there was an OnNetworkDisconnected(handle) in between.

---

Also 1: shamelessly copy TYPE_MOBILE_DUN & TYPE_MOBILE_HIPRI from chromium: 87987f0e76

Also 2: Modify testcase not to use real interface names, so I can ran them on personal test phone w/o the real networks interfering.

Bug: webrtc:13741
Change-Id: I5480d5ce7031c2b5c09b958064076d02b3db1248
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285980
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38808}
2022-12-05 10:01:01 +00:00
Byoungchan Lee
a639528a43 Fix AndroidNetworkMonitorTests crash due to DCHECK failure
AndroidNetworkMonitor::SetNetworkInfos assumes this method is called
only once, but unittests calls it twice.
One is called by the startMonitoring Java method, and the other is
called by each test.
Because of this, these tests will not succeed if dcheck_always_on is true.

To solve this problem, use OnNetworkConnected_n
instead of SetNetworkInfos in each test.

Bug: None
Change-Id: I027706ad5ccd597a91e3a66f15e181ee22d4aaa9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38798}
2022-12-02 13:37:27 +00:00
Per Kjellander
e0b4cab69c Remove default enabled field trial WebRTC-SendSideBwe-WithOverhead
Bug: webrtc:6762
Change-Id: I520188a13ee5f50c441226574ccb3df54f842835
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285300
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38783}
2022-11-30 20:19:36 +00:00
Per Kjellander
d6b330ea77 Remove unused field trial string kRTCFieldTrialAudioForceNoTWCCKey
Bug: webrtc:8243
Change-Id: I9c24999e44a749669208e19574d1251dcbd22d77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284941
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38727}
2022-11-24 15:11:55 +00:00
Roberto Perez
b05968e5ec Do not create DtmfSender for video sender.
On Android bindings, do not build a DtmfSender instance in a
RtpSender if its video kind is Video.
This will prevent showing an error when trying to access
that DtmfSender instance that has no native reference

Bug: webrtc:14680
Change-Id: Iba67a12cae8604c032915156b581af269f6ed265
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283742
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38724}
2022-11-24 10:58:17 +00:00
Florent Castelli
acabb3641b pc: Add asynchronous RtpSender::SetParameters() call
As the synchronous version only posts a task to recreate the encoder
later, it is not possible to catch errors and state changes that
could appear then.
The asynchronous version of SetParameters() aims to solve this by
providing a callback to wait for the completion of the encoder
reconfiguration, allowing any error to be propagate and subsequent
getParameters() call to have up to date information.

Bug: webrtc:11607
Change-Id: I5548e75aa14a97f8d9c0c94df1e72e9cd40887b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38627}
2022-11-15 15:31:40 +00:00
Henrik Boström
1bef09708a Delete api/stats_types.h in favor of api/legacy_stats_types.h
The file was renamed, see
https://groups.google.com/u/1/g/discuss-webrtc/c/ZQiP4f_bpw4

Bug: webrtc:14180
Change-Id: Ia76c85ba7d9da6b3a93d0a67a4b6a5187e07e230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283084
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38616}
2022-11-14 12:10:06 +00:00
Sergey Silkin
c97651cbb4 Reland "Call native codec factories from Android ones."
This is a reland of commit 937a59268e

Check if codec requested in createEncoder/Decoder is supported and return null if not.

Original change's description:
> Call native codec factories from Android ones.
>
> Android video codec factories are expected to be synchronised with the native ones in terms on supported codecs. But before this change there were differences:
>
> 1. Native decoder factory keeps AV1 support behind RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY while Android decoder factory advertises AV1 unconditionally;
>
> 2. Native encoder factory advertises AV1 if RTC_USE_LIBAOM_AV1_ENCODER is enabled while Android encoder factory never advertises AV1.
>
> This CL synchronises the codecs set in Android factories with that of native factories by calling native factories from Android ones.
>
> Bug: webrtc:13573, b/257272020
> Change-Id: I99d801eda0c5f3400bac222b9b08d719f1a6ed72
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282240
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38583}

Bug: webrtc:13573, b/257272020
Change-Id: Ida7bb9a2954b836a07ad560de29c1f8088264b77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282802
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38607}
2022-11-10 16:29:49 +00:00
Andrey Logvin
7dbd77c8b9 Revert "Call native codec factories from Android ones."
This reverts commit 937a59268e.

Reason for revert: Breaks downstream project

Original change's description:
> Call native codec factories from Android ones.
>
> Android video codec factories are expected to be synchronised with the native ones in terms on supported codecs. But before this change there were differences:
>
> 1. Native decoder factory keeps AV1 support behind RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY while Android decoder factory advertises AV1 unconditionally;
>
> 2. Native encoder factory advertises AV1 if RTC_USE_LIBAOM_AV1_ENCODER is enabled while Android encoder factory never advertises AV1.
>
> This CL synchronises the codecs set in Android factories with that of native factories by calling native factories from Android ones.
>
> Bug: webrtc:13573, b/257272020
> Change-Id: I99d801eda0c5f3400bac222b9b08d719f1a6ed72
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282240
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38583}

Bug: webrtc:13573, b/257272020
Change-Id: I8128f5fc5d86902e35ab2812c984169c4b106118
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282800
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Andrey Logvin <landrey@google.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38586}
2022-11-09 08:08:17 +00:00
Sergey Silkin
937a59268e Call native codec factories from Android ones.
Android video codec factories are expected to be synchronised with the native ones in terms on supported codecs. But before this change there were differences:

1. Native decoder factory keeps AV1 support behind RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY while Android decoder factory advertises AV1 unconditionally;

2. Native encoder factory advertises AV1 if RTC_USE_LIBAOM_AV1_ENCODER is enabled while Android encoder factory never advertises AV1.

This CL synchronises the codecs set in Android factories with that of native factories by calling native factories from Android ones.

Bug: webrtc:13573, b/257272020
Change-Id: I99d801eda0c5f3400bac222b9b08d719f1a6ed72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282240
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38583}
2022-11-08 12:40:56 +00:00
Henrik Boström
f36d607c4a Remove the possibility to disable IPv6 in Java and ObjC.
It's deprecated and has been removed from Chrome. Let's follow suite.

// Passing all but unrelated bots
NOTRY=True

Bug: webrtc:14608
Change-Id: I6f2601af5b1dc08164230ebf15db2d2f1754f9e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280740
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38488}
2022-10-27 19:45:58 +00:00
Saúl Ibarra Corretgé
4a1c9ecc5c Cleanup old Android check for pre 4.4 versions
The minSdk is 21.

Bug: webrtc:13780
Change-Id: If21ffab16b21d957c1d1a9b6912d09cd2bc309ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279902
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38456}
2022-10-24 10:50:29 +00:00
philipel
aafcc43440 Remove libaom av1 encoder from SoftwareVideoEncoderFactory.
Bug: webrtc:13573
Change-Id: If2948cf144e0b670f4fa6fabb06e2a14b4a8e281
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279561
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38430}
2022-10-18 12:10:42 +00:00
Roberto Perez
4dc6e05ac9 Expose peer connection's getStats by RtpSender/Receiver in Android SDK
Currently if you want to obtain the stats for a specific sender/receiver
in Android, you need to call peerConnection.getStats() and filter
manually the result by sender.

pc.getStats(receiver/sender) exists in c++ and ios but was not exposed
in Android

Bug: webrtc:14547
Change-Id: I9954434880f0f93821fcd2e2de24a875e8d136ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275880
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38428}
2022-10-18 09:41:26 +00:00
Mirko Bonadei
5d17b7e05e Include jni.h in jni_int_wrapper.h.
This is needed in order to use jint and make the header self contained.

Bug: b/251890128
Change-Id: Ie6c323113370a1d49f68c783137292e1c0be07d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278780
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38351}
2022-10-11 12:30:32 +00:00
Mirko Bonadei
4e013482fc Add missing dependency and remove nogncheck.
Bug: b/251890128
Change-Id: Ie511aa9de38601914948c2583778fa4b6c891f98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278681
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38350}
2022-10-11 12:29:29 +00:00
Mirko Bonadei
a97dc0579c Remove jni_generator_helper.h from video_jni.
This is already part of native_api_jni.

Bug: b/251890128
Change-Id: Iae11fb676df788d992d3cb8ed21c68f7fe2552a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278630
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38346}
2022-10-11 09:47:27 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
philipel
0c4563c0c4 Remove the libaom av1 decoder.
Bug: webrtc:14267
Change-Id: I95a416b25fa20d4dea6896e05beb59789621f1fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268305
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38253}
2022-09-30 08:42:25 +00:00
Peter Hanspers
1a59cb6108 Renamed methods.
Renaming inputSampleRate, outputSampleRate, terminate to avoid triggering Apple's private API check.

Change-Id: I9857fb374bf30c4a6ef937fb183ef4858af7e0c1
Bug: webrtc:14193
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275641
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38094}
2022-09-15 14:08:22 +00:00
Magnus Jedvert
c7d1f11646 Android: Expose VideoFrame.TextureBuffer.applyTransformMatrix
Bug: None
Change-Id: Id1c35dd1aa231ea25831d0354b8125d6c29d3834
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274708
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/main@{#38061}
2022-09-12 13:50:17 +00:00
Sergey Silkin
ceb71cd557 Switch encoder on any critical frame encode error (returncode < 0)
Before this change encoder switch was triggered only if encode() returns WEBRTC_VIDEO_CODEC_ENCODER_FAILURE. Android HW encoder wrapper never return this error code. It returns WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE [1, 2] or WEBRTC_VIDEO_CODEC_ERROR [3].

Change value of WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT from -14 to 5 to avoid it to be interpreted as a critical error.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=324

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=335

[3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/src/jni/video_encoder_wrapper.cc;drc=c05a1be5b49f5c03b6955b05bcbf47609e1b0381;l=331

Bug: b/243402636
Change-Id: Iaf0129f3f9d71c07bb06804fe1f92a1f84f6da26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274402
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38060}
2022-09-12 12:43:17 +00:00
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed

Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
2022-09-09 10:44:17 +00:00
Danil Chapovalov
2acdda84ca Update android peer connection factory wrapper away from rtc::MessageHandler
Bug: webrtc:9702
Change-Id: Iab87e8e31a52d91b127ed03f5c356d4ccb4619cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274140
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38033}
2022-09-08 08:07:06 +00:00
Danil Chapovalov
4a29edca7d Update ios AudioDevice away from rtc::MessageHandler
Align thread checkers with the class comment,
i.e. ensure AudioDevice is used and destroyed on the same thread it was constructed on, not just the same thread AudioDevice::Init was called.

Bug: webrtc:9702
Change-Id: Ib905978cc8173266151adf26e1b7317f1d3852bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274164
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38018}
2022-09-06 11:35:18 +00:00
Danil Chapovalov
fbfd81f61a In android aaudio wrappers use threads through TaskQueue interface
Bug: webrtc:9702
Change-Id: I4686b8312a5e6705050ec89381938ea5da379d9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274160
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38010}
2022-09-05 11:10:21 +00:00
Yury Yaroshevich
5027c1a482 Reland "Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]""
This is a reland of commit 9a0a6a198e

Original change's description:
> Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
>
> This is a reland of commit 2b9aaad58f
>
> Original change's description:
> > ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
> >
> > # Overview
> > This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> > means to play and record audio. The goal of CLs is achieved by having
> > additional implementation of `webrtc::AudioDeviceModule`
> > called `ObjCAudioDeviceModule`. The feature
> > of `ObjCAudioDeviceModule` is that it does not directly use any
> > of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> > AVCaptureSession etc. Instead it delegates communication with specific
> > system audio API to user-injectable audio device instance which
> > implements `RTCAudioDevice` protocol.
> > `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
> >
> > # AudioDeviceBuffer
> > `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> > interface providing stubs for unrelated methods. It also implements
> > common low-level management of audio device buffer, which glues audio
> > PCM flow to/from WebRTC.
> > `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> > with the help of two `FineAudioBuffer` (one for recording and one for
> > playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> > instance.
> > `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> > it has to know sample rate and channels count of audio being played and
> > recorded. These formats could be different between playout and
> > recording. `ObjCAudioDeviceModule` stores current audio  parameters
> > applied  to `webrtc::AudioDeviceBuffer` as fields of
> > type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> > audio parameters like sample rate, channels  count and IO buffer
> > duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> > with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> > audio playout and recording will be corrupted: audio is sent only
> > partially over the wire and/or audio is played with artifacts.
> > `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> > when playout or recording is initialized. Whenever `RTCAudioDevice`
> > audio parameters parameters are changed, there must be a notification to
> > `ObjCAudioDeviceModule` to allow it to reconfigure
> > it's `webrtc::AudioDeviceBuffer`. The notification is performed
> > via `RTCAudioDeviceDelegate` object, which is provided
> > by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
> >
> > # Threading
> > `ObjCAudioDeviceModule` is stick to same thread between initialization
> > and termination. The only exception is two IO functions invoked by SDK
> > user code presumably from real-time audio IO thread.
> > Implementation of `RTCAudioDevice` may rely on the fact that all the
> > methods of `RTCAudioDevice` are called on the same thread between
> > initialization and termination. `ObjCAudioDeviceModule` is also expect
> > that the implementation of `RTCAudioDevice` will call methods related
> > to notification of audio parameters changes and audio interruption are
> > invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> > requirement `RTCAudioDeviceDelegate` provides two functions to execute
> > sync and async block on `ObjCAudioDeviceModule` thread.
> > Async block could be useful when handling audio session notifications to
> > dispatch whole block re-configuring audio objects used
> > by `RTCAudioDevice` implementation.
> > Sync block could be used to make sure changes to audio parameters
> > of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> > playout/recording restarted.
> >
> > Bug: webrtc:14193
> > Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> > Reviewed-by: Henrik Andreasson <henrika@google.com>
> > Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> > Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37928}
>
> Bug: webrtc:14193
> Change-Id: Iaf950d24bb2394a20e50421d5122f72ce46ae840
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273380
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37946}

Bug: webrtc:14193
Change-Id: I84a6462c233daae7f662224513809b13e7218029
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273662
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37977}
2022-09-01 08:18:38 +00:00
Andrey Logvin
bcc31826ab Revert "Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]""
This reverts commit 9a0a6a198e.

Reason for revert: Breaks upstream project

Original change's description:
> Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
>
> This is a reland of commit 2b9aaad58f
>
> Original change's description:
> > ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
> >
> > # Overview
> > This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> > means to play and record audio. The goal of CLs is achieved by having
> > additional implementation of `webrtc::AudioDeviceModule`
> > called `ObjCAudioDeviceModule`. The feature
> > of `ObjCAudioDeviceModule` is that it does not directly use any
> > of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> > AVCaptureSession etc. Instead it delegates communication with specific
> > system audio API to user-injectable audio device instance which
> > implements `RTCAudioDevice` protocol.
> > `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
> >
> > # AudioDeviceBuffer
> > `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> > interface providing stubs for unrelated methods. It also implements
> > common low-level management of audio device buffer, which glues audio
> > PCM flow to/from WebRTC.
> > `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> > with the help of two `FineAudioBuffer` (one for recording and one for
> > playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> > instance.
> > `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> > it has to know sample rate and channels count of audio being played and
> > recorded. These formats could be different between playout and
> > recording. `ObjCAudioDeviceModule` stores current audio  parameters
> > applied  to `webrtc::AudioDeviceBuffer` as fields of
> > type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> > audio parameters like sample rate, channels  count and IO buffer
> > duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> > with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> > audio playout and recording will be corrupted: audio is sent only
> > partially over the wire and/or audio is played with artifacts.
> > `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> > when playout or recording is initialized. Whenever `RTCAudioDevice`
> > audio parameters parameters are changed, there must be a notification to
> > `ObjCAudioDeviceModule` to allow it to reconfigure
> > it's `webrtc::AudioDeviceBuffer`. The notification is performed
> > via `RTCAudioDeviceDelegate` object, which is provided
> > by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
> >
> > # Threading
> > `ObjCAudioDeviceModule` is stick to same thread between initialization
> > and termination. The only exception is two IO functions invoked by SDK
> > user code presumably from real-time audio IO thread.
> > Implementation of `RTCAudioDevice` may rely on the fact that all the
> > methods of `RTCAudioDevice` are called on the same thread between
> > initialization and termination. `ObjCAudioDeviceModule` is also expect
> > that the implementation of `RTCAudioDevice` will call methods related
> > to notification of audio parameters changes and audio interruption are
> > invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> > requirement `RTCAudioDeviceDelegate` provides two functions to execute
> > sync and async block on `ObjCAudioDeviceModule` thread.
> > Async block could be useful when handling audio session notifications to
> > dispatch whole block re-configuring audio objects used
> > by `RTCAudioDevice` implementation.
> > Sync block could be used to make sure changes to audio parameters
> > of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> > playout/recording restarted.
> >
> > Bug: webrtc:14193
> > Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> > Reviewed-by: Henrik Andreasson <henrika@google.com>
> > Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> > Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37928}
>
> Bug: webrtc:14193
> Change-Id: Iaf950d24bb2394a20e50421d5122f72ce46ae840
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273380
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37946}

Bug: webrtc:14193
Change-Id: I5e18cc919ca4bb1cef7d5a11489451a0907f0d66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273486
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Andrey Logvin <landrey@google.com>
Commit-Queue: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#37950}
2022-08-30 11:58:34 +00:00