Commit graph

2599 commits

Author SHA1 Message Date
Artem Titov
17d7eb4d52 Do not compile some test targets with chromium
Move copy_to_file_audio_capturer, copy_to_file_audio_capturer_unittest
and test_common under "!build_with_chromium"

Bug: b/272350185, webrtc:15081
Change-Id: Ie3f08e4ce5bec91647e802cc34040df2e01103d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39954}
2023-04-26 10:07:49 +00:00
Jeremy Leconte
4730201454 [DVQA] Add a GetSenderPeerName method.
Change-Id: I2b30510911865150881c116abc2f86be7821f34a
Bug: b/277851637
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301280
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39875}
2023-04-17 13:05:33 +00:00
Florent Castelli
0a4a9846fc Extract common codec fields into RtpCodec
This creates the RtpCodec structure for the common fields
used in RtpCodecParameters and RtpCodecCapability.
Remove the unused fields from both that were defined from ORTC
and never implemented as well.

Bug: webrtc:15064
Change-Id: I37b4c83e2051a888fc99cc0d9f7aeb8d74f0421d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301182
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39862}
2023-04-14 12:15:24 +00:00
Tony Herre
c381c33767 Make TransformableVideoFrameInterface::SetMetadata pure virtual
Bug: webrtc:14709
Change-Id: I9e131a041e80c1774b982f61197a0499b97c6ae7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301162
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Stefan Holmer <holmer@google.com>
Cr-Commit-Position: refs/heads/main@{#39845}
2023-04-13 11:23:16 +00:00
Sergey Silkin
26d1b26277 Log metrics even if test failed
Set of codecs for testing is hardcoded to AV1, VP8, VP9, H264, H265. Some codecs may not be available due to lack of support on the platform or due to some issue in our code which would be a regression. Reporting zero metrics for failed tests would allow the perf tool to detect such a regression.

This also enables codec tests by default. The tests should not run on bots since video_codec_perf_tests binary is not included in any test suits yet.

Bug: webrtc:14852
Change-Id: I967160069055036f93e595d328c4d5f1ca483be9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300868
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39840}
2023-04-13 08:49:37 +00:00
Sergey Silkin
b4a45546b7 Dedicated build target for video codec perf tests
Bug: webrtc:14852
Change-Id: Ib56ef931b58058a7d09b97b7013ba39ee1767629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300740
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39823}
2023-04-12 11:24:48 +00:00
Tommi
a50a81a150 [DataChannelInterface] Introduce DataChannelInterface::SendAsync()
One problem with the existing Send() method is that it has a return
value that is problematic for a fully async implementation.

A second problem with Send() is that the return value is bool and not
RTCError (webrtc:13289), which is why OnSendComplete() uses RTCError.

Also, start deprecating `bool Send()` in favor of `void SendAsync()` and
adding `network_safety_` flag for posting async operations to the
network thread. This flag also takes over from the
`connected_to_transport_` which can now be removed.

Bug: webrtc:11547, webrtc:13289
Change-Id: I87bbc7e9b964a52684bdfe0e6ebc5230be254e8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299760
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39817}
2023-04-11 19:46:36 +00:00
Tommi
a13b4d1d30 Partial reland: DataChannelObserver interface change.
This is a partial reland of:
https://webrtc-review.googlesource.com/c/src/+/299142

This CL includes the interface change in DataChannelObserver but
not the code behind it. The point of landing this change first is
to be able to override this method in downstream implementations in
preparation for relanding the rest of the changes.

Bug: webrtc:11547
Change-Id: Ic3fe4fb8084908ef12bd4916b763df5a75604113
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300362
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39776}
2023-04-06 08:47:53 +00:00
Daniel Cheng
0e1d3c5675 Add reference, pointer, and co type aliases for rtc::ArrayView.
Many STL containers define these type aliases, and they are easier to
work with than add_const_t<add_lvalue_reference_t<value_type>>.

In a followup, `WTF::Vector` in Blink's conversion constructor from
other containers will be SFINAE-guarded using these type aliases.

Bug: chromium:1408442
Change-Id: I7790e6f462a32e7e49bc6468afeda6b2e6d4b631
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300180
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39771}
2023-04-05 20:18:57 +00:00
philipel
7ceb49c7b8 Fuzzy match the SdpVideoFormat in VideoEncoderFactoryTemplate::CreateVideoEncoder.
Bug: webrtc:13573
Change-Id: I1223f5f989d5298d3a6f7f6d06fd752e650adfd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300342
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39766}
2023-04-05 11:48:26 +00:00
Andrey Logvin
7f16fcda0f Revert "[DataChannel] Send and receive packets on the network thread."
This reverts commit fe53fec24e.

Reason for revert: Speculative revert, may be breaking downstream project

Original change's description:
> [DataChannel] Send and receive packets on the network thread.
>
> This updates sctp channels, including work that happens between the
> data channel controller and the transport, to run on the network
> thread. Previously all network traffic related to data channels was
> routed through the signaling thread before going to either the network
> thread or the caller's thread (e.g. js thread in chrome). Now the
> calls can go straight from the network thread to the JS thread with
> enabling a special flag on the observer (see below) and similarly
> calls to send data, involve 2 threads instead of 3.
>
> * Custom data channel observer adapter implementation that
>   maintains compatibility with existing observer implementations in
>   that notifications are delivered on the signaling thread.
>   The adapter can be explicitly disabled for implementations that
>   want to optimize the callback path and promise to not block the
>   network thread.
> * Remove the signaling thread copy of data channels in the controller.
> * Remove several PostTask operations that were needed to keep things
>   in sync (but the need has gone away).
> * Update tests for the controller to consistently call
>   TeardownDataChannelTransport_n to match with production.
> * Update stats collectors (current and legacy) to fetch the data
>   channel stats on the network thread where they're maintained.
> * Remove the AsyncChannelCloseTeardown test since the async teardown
>   step has gone away.
> * Remove `sid_s` in the channel code since we only need the network
>   state now.
> * For the custom observer support (with and without data adapter) and
>   maintain compatibility with existing implementations, added a new
>   proxy macro that allows an implementation to selectively provide
>   its own implementation without being proxied. This is used for
>   registering/unregistering a data channel observer.
> * Update the data channel proxy to map most methods to the network
>   thread, avoiding the interim jump to the signaling thread.
> * Update a plethora of thread checkers from signaling to network.
>
> Bug: webrtc:11547
> Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39760}

Bug: webrtc:11547
Change-Id: Id0d65594bf727ccea5c49093c942b09714d101ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300341
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39764}
2023-04-05 09:34:23 +00:00
Tommi
fe53fec24e [DataChannel] Send and receive packets on the network thread.
This updates sctp channels, including work that happens between the
data channel controller and the transport, to run on the network
thread. Previously all network traffic related to data channels was
routed through the signaling thread before going to either the network
thread or the caller's thread (e.g. js thread in chrome). Now the
calls can go straight from the network thread to the JS thread with
enabling a special flag on the observer (see below) and similarly
calls to send data, involve 2 threads instead of 3.

* Custom data channel observer adapter implementation that
  maintains compatibility with existing observer implementations in
  that notifications are delivered on the signaling thread.
  The adapter can be explicitly disabled for implementations that
  want to optimize the callback path and promise to not block the
  network thread.
* Remove the signaling thread copy of data channels in the controller.
* Remove several PostTask operations that were needed to keep things
  in sync (but the need has gone away).
* Update tests for the controller to consistently call
  TeardownDataChannelTransport_n to match with production.
* Update stats collectors (current and legacy) to fetch the data
  channel stats on the network thread where they're maintained.
* Remove the AsyncChannelCloseTeardown test since the async teardown
  step has gone away.
* Remove `sid_s` in the channel code since we only need the network
  state now.
* For the custom observer support (with and without data adapter) and
  maintain compatibility with existing implementations, added a new
  proxy macro that allows an implementation to selectively provide
  its own implementation without being proxied. This is used for
  registering/unregistering a data channel observer.
* Update the data channel proxy to map most methods to the network
  thread, avoiding the interim jump to the signaling thread.
* Update a plethora of thread checkers from signaling to network.

Bug: webrtc:11547
Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39760}
2023-04-04 16:49:17 +00:00
Henrik Boström
8481f6358e Remove IsSinglecastOrAllNonFirstLayersInactive() helper.
As of recent changes, we can simply look at numberOfSimulcastStreams
because in the {active,inactive,inactive} case we get a single
webrtc::VideoStream here[1] which results in numberOfSimulcastStreams
being 1 here[2].

Looking at numberOfSimulcastStreams instead of using a helper is
preferred because it is more descriptive and in the future, when
{inactive,active,inactive} or {inactive,inactive,active} cases of VP9
simulcast is also supported (webrtc:15046) then this gating will work
even when the first layer is not the active one.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/encoder_stream_factory.cc;l=146;drc=c99753ac8f051e379ae68e281aaef04b0a5ca8f2

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=77;drc=4baea5b07f2fd309892845cf2d1c0f4ca77862d3

# No need to wait for win chrome bot, everything else green
NOTRY=True

Bug: webrtc:15046
Change-Id: I8aaea2e8cc350bd01fb00cc7fd85032b7fdfe24d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299942
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39759}
2023-04-04 13:59:07 +00:00
philipel
31af34ba8c Update Dav1dDecoderTemplateAdapater to include AV1 profile1 support.
Bug: webrtc:13573
Change-Id: Ibc81b6400eb8e22ce28ae434c83a22013ef96c79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299946
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39757}
2023-04-04 12:40:17 +00:00
Jeremy Leconte
40a0e3191a Remove AudioConfig::Mode.
The Mode is currently redundant with the optional input_file_name.

Change-Id: Ib4f0a363e86d925107d61867a7f743d6663e7071
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298743
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39754}
2023-04-04 08:44:23 +00:00
Tommi
0fe65102cc Add support for detaching and merging of StatsCollection contents.
This is needed in order to be able to update the legacy stats
collector to fetch data channel stats from the network thread, which
is part of an upcoming change to data channels.

Bug: webrtc:11547
Change-Id: Ic205b0314b9f11a024d36d714c223cbddd0f3df3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299462
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39732}
2023-03-31 15:46:07 +00:00
Tony Herre
e7482b403d Remove deprecated TransformableVideoFrameInterface::GetMetadata
Bug: chromium:1420245
Change-Id: I4cc008bf8a4af2404f33589aededa8a16b774764
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299263
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39712}
2023-03-29 08:33:46 +00:00
Artem Titov
089758dbc5 Allow creation of TestVideoTrackSource not on the signaling thread
Bug: b/272350185
Change-Id: I1bc18f35e2d0b36791966a5954eb28886c569a9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299261
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39704}
2023-03-28 13:33:35 +00:00
Harald Alvestrand
d32e5b3078 Deprecate non-refcount CreateVideoTrack
Bug: webrtc:15017
Change-Id: I978a14dcb2fac7777a12c3f89b1a7207dd896b37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299075
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39700}
2023-03-28 11:58:36 +00:00
Danil Chapovalov
e14abcb20b Cleanup FieldTrialView
Delete alias WebRtcKeyValueConfig as unused
Replace .find() == 0 with absl::StartsWith per clang-tidy recommendation
https://clang.llvm.org/extra/clang-tidy/checks/abseil/string-find-startswith.html

Bug: webrtc:10335
Change-Id: I1f09c262844c0678a8d8c0d0d3274df3d947737c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299181
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39690}
2023-03-27 17:06:33 +00:00
Jeremy Leconte
a3f7b54518 [DVQA] Don't check if peer exists on Pause/Resume.
Change-Id: I0f26444c6a420017caaa4c27520e75e4146ecfd4
Bug: webrtc:14995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299077
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39689}
2023-03-27 16:23:52 +00:00
Artem Titov
6fd5f33d45 Extend TestVideoTrackSource API
Bug: b/272350185
Change-Id: Ibc53e7a9ee8f572475d86fc78de1c1ed71078910
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299140
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39678}
2023-03-25 21:35:23 +00:00
Jakob Ivarsson
94b51210f8 Include packet waiting time in concealment decision.
This is to be more robust to packet loss during DTX and paused streams.

Without it, we can wait to decode an available packet when in CNG or
PLC mode until more packets arrive, which for DTX and paused streams
can take a long time.

We already include the waiting time if the last packet in the buffer
is a DTX packet.

Bug: webrtc:13322
Change-Id: Iaf5b3894500140d6f83377ba2cd65b44e0cdac05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299009
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39667}
2023-03-24 13:18:58 +00:00
Tommi
c848268ab1 Use SequenceChecker(SequenceChecker::kDetached) in a few places.
This CL is partly a test to see if there's an impact on binary size:
- Not a big difference for binaries (decrease): -776b to -4Kb
- For libraries (libwebrtc.a) it actually increases the size: +40Kb

Secondarily this CL is basically to introduce this pattern to the
code base. In terms of LOC, this makes things slightly more compact.

From:

  class Foo {
   public:
     Foo() {
       checker_.Detach();
     }
   private:
    SequenceChecker checker_;
  };

To:

  class Foo {
   public:
     Foo() = default;
   private:
    SequenceChecker checker_{SequenceChecker::kDetached};
  };

Bug: none
Change-Id: I59fc34ccea10847e13455a349851ce9a0af458e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299020
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39664}
2023-03-24 07:44:18 +00:00
Henrik Boström
4baea5b07f Make VP9 simulcast behave like singlecast for single active layer cases.
Various "if streams == 1" cases are updated to "if
IsSinglecastOrAllNonFirstLayersInactive()" in order not to cause subtle
differences between VP9 {active} and VP9 {active,inactive,inactive}.

This CL also affects a line that conditionally sets
`simulcastStream[0].active = codec_active` so it seemed fitting to
improve the test coverage of "if all streams are inactive, don't send".

Bug: webrtc:15028
Change-Id: I8872dc8be0f2dfc1d8914bdba5e6433f9ba8cbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298881
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39656}
2023-03-23 14:49:22 +00:00
Per K
7effd7657b Change visibility on target mock_network_control
This is to allow external tests to depend on it.

Bug: none
Change-Id: Ic8e2f864041d959f673e7f2c18eb563a13274dcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298745
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39646}
2023-03-22 19:53:04 +00:00
Per K
452d94047b Add mock for NetworkControllerInterface
Bug: none
Change-Id: Ibdd72011932a36348a4382caa5d0bf0ab2c02dd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298742
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39641}
2023-03-22 15:49:32 +00:00
Harald Alvestrand
041ecb87f5 New PeerConnectionFactory::CreateVideoTrack with refcounted source
Bug: webrtc:15017
Change-Id: I04c794d8959583bb4cc5c3898f4175783ec49f16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249363
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39635}
2023-03-22 09:10:27 +00:00
Philipp Hancke
f0f435e983 Remove deprecated RTCStatsReport(int64) and timestamp_us
BUG=webrtc:14813

Change-Id: I80c2ba8f57354ef63cf2cc7b767d1f64dd0dd766
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298444
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39633}
2023-03-22 08:00:53 +00:00
Sergey Silkin
ebb5383fd8 Dump codec input
Add functionality for dumping encoder and decoder input to file in video codec test.

Bug: b/261160916, webrtc:14852
Change-Id: I49a84a886d87903c601cf5c35bd723b6393c2a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298051
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39626}
2023-03-21 16:54:19 +00:00
Henrik Boström
62dc65b537 Add test that attempting HW is still possible after SW fallback.
Based on previous discussions I would have thought that this test would
fail, but it turns out that it passes. See referenced bug for context.

Bug: webrtc:15021
Change-Id: I845b48f688fb25942e3b770d50cafbf8a0bafe94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298562
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39625}
2023-03-21 15:02:34 +00:00
Artem Titov
6a78e93346 [PCLF] Introduce test video source and make it more controllable
Bug: b/272350185
Change-Id: I15572b7e4d0cb0ce41da676a4eedbc1e138510fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298047
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39621}
2023-03-21 14:15:24 +00:00
Jeremy Leconte
2148f8ed71 [DVQA] Change API to pause and resume all streams from a sender.
Also make it possible to pause an already paused stream by making it a no-op.

Change-Id: Id10f74a4c6464067ae63208162194f020c6470eb
Bug: b/271542055
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298202
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39620}
2023-03-21 14:05:03 +00:00
Jonas Oreland
122d777943 Add new stun attribute GOOG_DELTA_SYNC_REQ
Assigned by IANA: https://www.iana.org/assignments/stun-parameters/stun-parameters.xhtml

Bug: webrtc:0
Change-Id: Ie910e112afe33f3dbf7f2a221edc96af5ac7b139
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298560
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39617}
2023-03-21 13:28:43 +00:00
Tommi
3da04a93cd Allow SequenceChecker to be initialized detached.
The motivation for this is to not have to implement this pattern:

foo.h:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_;
};

foo.cc:

Foo::Foo() {
  checker_.Detach();
}

And instead be able to do this inline in the .h file:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_{SequenceChecker::kDetached};
};

Bug: none
Change-Id: Idd7ca82d15c2f77f3aaccf26f1943a49f4b40661
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298445
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39616}
2023-03-21 12:34:15 +00:00
Sergey Silkin
aa17f2f0a9 Add Initialize() to Encoder/Decoder API in video codec tester
Initialization of Android HW codecs takes hundreds milliseconds. Exclude this time from frame processing time of first frame by initializing codecs before starting encoding/decoding.

Bug: b/261160916, webrtc:14852
Change-Id: I9ec84c6b12c1d9821b59965cf521170224066563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39613}
2023-03-21 08:04:48 +00:00
Danil Chapovalov
a2d85e4565 Use absl::string_view type as parameter for RTCError message
Bug: webrtc:13579
Change-Id: Ia9f90e6c3b008fc614d378cae4c407becfc597c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298447
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39610}
2023-03-20 18:16:10 +00:00
Jakob Ivarsson
63643357b4 Remove CNG state tracking from NetEq decision logic.
It seems like this is legacy and not useful. A comment mentions
transitioning between CNG and DTMF modes, but there is no way this can
happen currently.

Bug: webrtc:13322
Change-Id: I9e4706cb6ee145ee37a9e11e7cab6ea4ff697dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297980
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39590}
2023-03-17 15:00:17 +00:00
Henrik Boström
f6eae959bf Delete EncoderSimulcastProxy in favor of SimulcastEncoderAdapter.
Because the adapter has a passthrough mode, it can already handle both
singlecast and simulcast cases, meaning the proxy is no longer providing
value. Let's delete.

Bug: webrtc:15001
Change-Id: I480eaba599448e9b82b8cf7f829dc35ad6ce0434
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297740
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39579}
2023-03-16 13:25:44 +00:00
Philipp Hancke
b3e5969658 stats: use uint64_t for RTCSentRtpStreamStats.packetsSent
spec update from https://github.com/w3c/webrtc-stats/pull/744

BUG=webrtc:14989

Change-Id: I9d0adcf951501bc281054c77bb6bc03e47192523
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295505
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39575}
2023-03-16 06:46:19 +00:00
Artem Titov
ebce84a502 [DVQA] Add support for DVQA to pause/resume receiving of stream by peer
Bug: b/271542055, webrtc:14995
Change-Id: Ic02451347160f512588b6fef5d6ac4ad904b5e18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297440
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39568}
2023-03-15 18:16:49 +00:00
Henrik Boström
9a5de95af9 Add a flag to control legacy vs spec-compliant scalability mode.
The goal of the VP9 simulcast project is that when `scalability_mode`
is set, multiple encodings are always interpreted as simulcast, even
if VP9 or AV1 is used. This CL makes this so, but only if the flag
"WebRTC-AllowDisablingLegacyScalability" is "/Enabled/". This allows us
to make "SendingThreeEncodings_VP9_Simulcast" EXPECT VP9 simulcast.

When we are ready to ship we will remove the need to use the field
trial, but before we ship this we'll want to revisit if
SvcRateAllocator can be updated to support simulcast. (Today if we use
SvcRateAllocator when VP9 simulcast is used, all encodings except the
first one get bitrate=0, causing the test to fail because media is not
flowing on all layers.) For now, a TODO is added.

Bug: webrtc:14884
Change-Id: Ie20ae748b0c0405162f3a1b015ab94956ef83dae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297340
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39552}
2023-03-14 12:05:24 +00:00
Philipp Hancke
22005ab39b Remove obsolete header extension API names
and update spec link.

BUG=chromium:1051821

Change-Id: I42dbe36b2299f01cb4eb8010c893623fde7472fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296702
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39548}
2023-03-13 14:49:05 +00:00
Philipp Hancke
d3289d2ec0 Reland "stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases"
This is a reland of commit 9671d60925
after fixing more downstream dependencies

Original change's description:
> stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
>
> after upgrading downstream projects
>
> BUG=webrtc:14973
>
> Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
> Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#39526}

No-Try: True
Bug: webrtc:14973
Change-Id: I33bd99ca211a82ed77e3e8676e00256915fde168
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296881
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39533}
2023-03-10 15:22:01 +00:00
Henrik Boström
4463ff0296 Revert "stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases"
This reverts commit 9671d60925.

Reason for revert: Breaks dependencies, will re-land after fixes

Original change's description:
> stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
>
> after upgrading downstream projects
>
> BUG=webrtc:14973
>
> Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
> Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#39526}

Bug: webrtc:14973
Change-Id: I50878526566660d9772f7c8664970eec8bd86341
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296940
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39530}
2023-03-10 13:24:32 +00:00
Philipp Hancke
9671d60925 stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
after upgrading downstream projects

BUG=webrtc:14973

Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39526}
2023-03-10 12:12:41 +00:00
Artem Titov
d877589e16 Make frame_generator_api not testonly
Bug: None
Change-Id: Id51f819df350f24b12ead698e4f75dcb760d18f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296821
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39519}
2023-03-09 21:54:34 +00:00
Danil Chapovalov
b40aedf911 Delete RTPHeader::payload_type_frequency as unused
payload type frequency is not communicated inside an RTP packet and
thus do not belong to the RTPHeader

Bug: None
Change-Id: Ic3e48f1b0507a96ddc697503145f7c8785962926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296763
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39515}
2023-03-09 16:32:22 +00:00
Philipp Hancke
1f98b466b8 stats: rename RTCInboundRTPStreamStats and RTCOutboundRTPStreamStats
to RTCInboundRtpStreamStats and RTCOutboundRtpStreamStats respectively
which follows the camel-casing convention used elsewhere.

The old name is kept around as an alias for a limited amount of time
to allow upgrading dependencies.

BUG=webrtc:14973

Change-Id: Ibf4e65933fd6cc2e7e89955042f6f8fb0f6c7853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296261
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39497}
2023-03-07 14:27:47 +00:00
Philipp Hancke
9f6ae375e3 Rename header extension API methods
following spec updates from
  https://github.com/w3c/webrtc-extensions/pull/142

BUG=chromium:1051821

Change-Id: I1fd991a5024d38ac59ebe510ea1a48fd6f42d23b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296321
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39491}
2023-03-07 10:55:58 +00:00