Commit graph

1004 commits

Author SHA1 Message Date
Joe Downing
59020bd88b Add AV1 profile-1 video decode support to WebRTC
The Chrome Remote Desktop team is looking to support AV1 profile-1
w/ I444 for screen sharing however only I420 is currently supported.

This CL adds I444 support for the Dav1dDecoder, which appears to be
the preferred decoder and adds profile-1 to the
InternalDecoderFactory when the Dav1dDecoder is being used.

I've tested this CL using a CRD host w/ I444 enabled and it seems to
work as expected, though I've only tested on a debug build so I plan
to do some perf testing once this is available in a release build.

Bug: chromium:1329660
Change-Id: I2b8b7b7fd530727456ac5c46e694e7dbad6deff2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273986
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#38022}
2022-09-06 16:31:40 +00:00
Tommi
bd02e70629 Move decoder instance ownership to VideoReceiver2
This moves the ownership away from VideoReceiveStream2 and closer to
VCMDecoderDataBase. That facilitates unregistration (upcoming change)
without recreating receive streams.

Bug: none
Change-Id: I812175134730a0ffbf7077fd149c8489481c73d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272481
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37866}
2022-08-22 13:42:47 +00:00
Markus Handell
2cfc1af78a Update rtc::Event::Wait call sites to use TimeDelta.
Bug: webrtc:14366
Change-Id: I949c1d26f030696b18153afef977633c9a5bd4cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272003
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37835}
2022-08-19 10:07:28 +00:00
Erik Språng
7aaeb5a270 Create pre-allocated decoders on the decoder thread.
This way we're sure instantiation, configuration and decode calls all
happen on the decoder queue - making thread checking easier in the
actual decoder classes.

Bug: None
Change-Id: Ia98f47009f26b34eb8dad2ee0b4ddcde082d1994
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272022
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37825}
2022-08-18 13:14:26 +00:00
Tommi
13b9f81b23 Updated associated payload types without recreating receive streams.
Bug: webrtc:11993
Change-Id: I49c61653b296b1b3ca6a12fa75ac699ee58f096c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271543
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37799}
2022-08-16 13:38:24 +00:00
Tommi
e1bd833f9d Combine setters for protection payload types (red and ulpfec)
Bug: webrtc:11993
Change-Id: Ibd1402ac1b77d0484c3a97e9a758ed9e588615eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271640
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37787}
2022-08-15 19:53:06 +00:00
Tommi
1c5f317e17 Update the red_payload_type without recreating video receive streams.
A follow-up change will combine the setters for ulpfec and red payload
types, since they're entwined.

Bug: webrtc:11993
Change-Id: Ifea7fe9f4ebc7ac88a62db6cd6748f4d3c20db4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271482
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37785}
2022-08-15 17:23:56 +00:00
Tommi
2e809365d7 Add SetRtcpXr - set extended RTCP attributes without recreate.
Bug: webrtc:11993
Change-Id: Ie64b37c1e8a3f5b6fbcf671fce4ed642c74521cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271300
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37776}
2022-08-13 08:15:45 +00:00
Tommi
66d20c487d Allow ulpfec payload type reconfig without recreating receive streams.
Bug: none
Change-Id: I1c5dad7811dd93552c185145e5a1488a8e9bb863
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271000
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37771}
2022-08-12 20:03:14 +00:00
Tommi
3900f21702 Make nack history configurable.
This allows for `config_.rtp.nack.rtp_history_ms` to be modified
without deleting and recreating video receive streams.

Bug: webrtc:11993
Change-Id: I8ba132b22fe0e6de03d1c42fc38a570cbe138817
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269301
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37701}
2022-08-05 22:58:43 +00:00
Sam Zackrisson
da6291e85d WebRTC voice engine: Remove duplicate and confusing logs
The line "No audio processing module present [...]" has mislead people several times (see linked bug for one example) and does not add any information that cannot already relatively easily be inferred from platform configuration.

Other removed lines are duplicate (already logged via AudioOptions::ToString()) or never runs (ApplyOptions always returns true + empty #elif).

Bug: b/238780321#comment34
Change-Id: Ie0fbd6675ec963c1180a7f614ec74bba5e850777
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270483
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37697}
2022-08-05 10:10:47 +00:00
Erik Språng
e94b175c42 Attach video sink only after VideoSendStream is started.
By attaching the sink when all is set up, we make it possible for an
application to listen for that event - and only then start producing
frames. Otherwise frames risk being dropped during the setup phase.

Bug: webrtc:14276
Change-Id: I0a906681fc526b0ee88c60a842afb0d68e21de14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270660
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37696}
2022-08-05 08:52:47 +00:00
Tommi
e644a4bde0 [WebRtcVideoReceiveStream] Add SetLossNotificationEnabled
...to allow for turning on/off loss notifications for video receive
streams without tearing down and recreating the whole stream.

Bug: webrtc:11993
Change-Id: Ia961bd343ce816ffe3414f11e3a58bb3c235307c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269252
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37688}
2022-08-04 11:59:57 +00:00
Tommi
9582f7548c [WebRtcVideoReceiveStream] Split initial config and reconfiguration.
This is a step towards getting rid of reconfiguration via tearing down
and reconstructing receive streams when parts of the configuration
change at runtime.

Bug: webrtc:11993
Change-Id: I337e523f17805b75826ddbd75bd3d0eb6e910bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269250
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37680}
2022-08-03 14:05:24 +00:00
Erik Språng
47be1493b6 Remove unused field trial WebRTC-VP8ScreenshareTemporalLayers.
Bug: webrtc:9477
Change-Id: I5419653fea369ad253c4815f2b961db7e92b332b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269203
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37668}
2022-08-02 20:15:54 +00:00
Tommi
dfc4d81fd3 [WebRtcVideoReceiveStream] Construct flexfec stream on demand.
...for payload type changes and avoid recreating the main video stream.

Bug: webrtc:11993
Change-Id: I03e44ff25d88caeb082a2e44b2e802d3b9392feb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269244
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37666}
2022-08-02 16:33:04 +00:00
Tommi
185f10c082 [WebRtcVideoReceiveStream] Add ability to config flexfec post init.
Bug: webrtc:11993
Change-Id: I35d7e645e18b7cb4a86645ea52c8958063f13d3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269243
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37661}
2022-08-02 11:37:26 +00:00
Philipp Hancke
147cff0ad5 stats: handle outbound-rtp.active for single-stream streams
previously it was only working for simulcast

BUG=webrtc:14291

Change-Id: Ibb92c4108c6a1661c7348908dad09d2990249c3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269941
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#37651}
2022-08-01 16:39:23 +00:00
Tommi
43b15c3fc0 Add SetPayloadType to FlexfecReceiveStream.
This reduces the number of times we recreate video receive streams
and prepares for not having to do that for flexfec streams and avoid
having to recreate a video receive stream when flexfec config changes.

Bug: webrtc:11993
Change-Id: I11134b6a72eb162623ebbc12521d409da8616107
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261941
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37641}
2022-07-28 21:24:50 +00:00
Philipp Hancke
684e241323 stats: implement outbound-rtp.active
implementing
  https://github.com/w3c/webrtc-stats/pull/649

BUG=webrtc:14291

Change-Id: Ib8453d4d7c335834cd8dd2aa29111aef26211dff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269520
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#37639}
2022-07-28 13:35:40 +00:00
Danil Chapovalov
6e7c2685e3 Allow recursive check for RTC_DCHECK_RUN_ON macro
instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.

Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue

Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
2022-07-26 09:27:23 +00:00
Erik Språng
a3f2e72008 Fix potential UAF in unit test.
In WebRtcVideoChannelBaseTest.EncoderSelectorSwitchCodec a mock encoder
selecter or stack allocated and then registered with the channel.
Since this test uses real-time clocks/threads, there is a chance that
the selector callback will be called after the mock goes out of scope,
but before the test had time to be torn down.

This CL fixes that by simply de-registering the callback before the
end of the test.

Bug: b/239855550
Change-Id: Ibb38a914933494fd04c963b9a13f2cc4aee160d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269402
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37618}
2022-07-26 09:19:34 +00:00
Erik Språng
5793ed8ff9 Remove unused field trial WebRTC-SendBufferSizeBytes
Bug: webrtc:9637
Change-Id: Ie4bf5caa3977f1824f6dc1014b1feacf6ebfe670
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269386
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37617}
2022-07-26 07:26:14 +00:00
Erik Språng
d460c31309 Make sure VideoStream target bitrate is not higher than max.
Bug: webrtc:14017
Change-Id: Ic59811f4ec84e429839440cea8a70c05d7795cc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269388
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37614}
2022-07-25 20:34:48 +00:00
Tommi
6b9302eb59 Remove handling in SetRecvParameters that's dead code.
`stream_` will always be non-null when SetRecvParameters is called.

For the flexfec stream, the condition won't happen since `IsCompleteAndEnabled` doesn't consider `rtp.extension` state.

As is, this code just adds apparent complexity to SetRecvParameters.

Bug: none
Change-Id: Ie2386905bd8a338669629c7bc5f0abb39bd36d22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269245
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37597}
2022-07-22 13:43:35 +00:00
Ali Tofigh
714e3cbb48 Adopt absl::string_view in modules/audio_coding/
Bug: webrtc:13579
Change-Id: Ifec66fb6ba9724d18539de7245a358c2d13c7939
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268547
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37573}
2022-07-20 13:34:23 +00:00
Ivo Creusen
1a84b565ac Implement RTCInboundRTPStreamStats.JitterBufferMinimumDelay
This metric was recently added to the standard (see https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-jitterbufferminimumdelay). This CL implements it for audio streams.

Bug: webrtc:14141
Change-Id: I79d918639cd12361ebbc28c2be41549e33fa7e2a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262770
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37567}
2022-07-20 09:14:03 +00:00
Danil Chapovalov
c05a1be5b4 Migrate remaining webrtc usage of TaskQueueBase to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: I8de2c23da5fbdfc0b1efbbe07fb6e8de744424a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268191
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37565}
2022-07-20 08:15:08 +00:00
Tommi
aeb4412e09 Video and flexfec receive stream config changes without recreate.
SetFeedbackParameters no longer recreates the embedded streams for:
- transport cc flag
- rtcp status

Bug: none
Change-Id: If6117a1ae760ca9a02f06bbfa2b46c6e0f448cfc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268281
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37526}
2022-07-14 20:51:08 +00:00
philipel
26910ffe22 Make dav1d the default AV1 decoder.
Bug: chromium:1330308, b/234414450
Change-Id: Idc35c9e3612843001f8d7d9361f3769b45350e63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268183
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37483}
2022-07-07 14:04:46 +00:00
Erik Språng
b6ff84b516 Reland "When VP9 SVC is used, use SvcConfig to set max bitrate for the stream."
This is a reland of commit 3afb8e2431

Patchset 1 is the original CL. Patchset 2 contains a fix:
Depending on call site, the number of spatial layers for VP9 might be
signalled in three different ways. One of them was afaict only used in
out perf tests, and resulted in the max bitrate being incorrectly
capped.
The fix now checks that field too.

Original change's description:
> When VP9 SVC is used, use SvcConfig to set max bitrate for the stream.
>
> Currently, a default max bitrate is determined within WebRtcVideoEngine,
> which maxes out at 2.5Mbps - and that limits the max bitrate deteremined
> by SvcConfig for resolutions above 720p.
>
> This does not affect simulcast, as WebRtcVideoEngine already knows to
> trust the rate allocation in simulcast.cc instead.
>
> Bug: webrtc:14017
> Change-Id: I0c310a6fd496e9e5a10eae45838900068aa1ae2d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267160
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37370}

Bug: webrtc:14017, webrtc:14234
Change-Id: Idcaf4321a20c917e4049522c577336ddcfc7ffbb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267860
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37446}
2022-07-05 14:19:33 +00:00
Niels Möller
39b1b42487 Use designated initializers for webrtc::SimulcastStream
Style change extracted from
https://webrtc-review.googlesource.com/c/src/+/264800

Bug: webrtc:11607
Change-Id: I3dd5ca1eef8d70a61023af37d90032225e40b55d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267841
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37442}
2022-07-05 12:23:44 +00:00
Erik Språng
4f1af1156f Revert "When VP9 SVC is used, use SvcConfig to set max bitrate for the stream."
This reverts commit 3afb8e2431.

Reason for revert: Causes some unexpected perf regressions.

Original change's description:
> When VP9 SVC is used, use SvcConfig to set max bitrate for the stream.
>
> Currently, a default max bitrate is determined within WebRtcVideoEngine,
> which maxes out at 2.5Mbps - and that limits the max bitrate deteremined
> by SvcConfig for resolutions above 720p.
>
> This does not affect simulcast, as WebRtcVideoEngine already knows to
> trust the rate allocation in simulcast.cc instead.
>
> Bug: webrtc:14017
> Change-Id: I0c310a6fd496e9e5a10eae45838900068aa1ae2d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267160
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37370}

Bug: webrtc:14017
Change-Id: I1e45ee3f78deb50a9057d648146b1a6360782aa3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267800
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37438}
2022-07-05 10:25:23 +00:00
Niels Möller
c8152fe4a8 Update/delete old TODOs
Bug: webrtc:10198
Change-Id: I226768c2a6bd97ffcd0638e5bc6a1c286b71815f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267704
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37435}
2022-07-05 09:44:53 +00:00
Erik Språng
3afb8e2431 When VP9 SVC is used, use SvcConfig to set max bitrate for the stream.
Currently, a default max bitrate is determined within WebRtcVideoEngine,
which maxes out at 2.5Mbps - and that limits the max bitrate deteremined
by SvcConfig for resolutions above 720p.

This does not affect simulcast, as WebRtcVideoEngine already knows to
trust the rate allocation in simulcast.cc instead.

Bug: webrtc:14017
Change-Id: I0c310a6fd496e9e5a10eae45838900068aa1ae2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267160
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37370}
2022-06-29 14:23:08 +00:00
Niels Möller
7a66900683 Delete rtc_base/atomic_ops.h
Bug: webrtc:9305
Change-Id: I3e8b0db03b84b5361d63db31ee23e6db3deabfe4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266497
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37348}
2022-06-28 08:32:13 +00:00
Henrik Boström
73ee252245 Remove excessive log spam from receiver.getParameters().
It's normal for a receiver to not be configured to receive, such as when
currentDirection is not (or not yet) "sendrecv" or "recvonly".
getParameters() returning an empty set of encodings is valid and these
logs are not very useful. It's also inconsistent that we only log after
SLD has happened due to different code paths inside getParameters(),
repro: https://jsfiddle.net/henbos/xqksj3wd/.

Most notably we're calling getParameters() internally from inside of
getStats() which can cause excessive log spam. I prefer that we remove
these logs rather than avoid calling getParameters() from inside of
getStats() on non-receiving receivers since it's valid to check how many
encodings exist on a receiver using getParameters(), and whether or not
the SSRC has been signaled could in theory affect the number of
encodings even if we do want to receive. Also an app calling
getParameters() on an inactive receiver is valid and should not cause
logs.

Bug: webrtc:14225
Change-Id: I4290781d6aed92aa03fe0c662762aa97c99a045c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266960
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37335}
2022-06-27 09:37:31 +00:00
Sergio Garcia Murillo
179f40e81a add 422 8 and 10 bit decoding support
Bug: webrtc:14195
Change-Id: I2048d567850ae669d76d9e593752683f3c76499f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266180
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37306}
2022-06-22 15:08:44 +00:00
Philipp Hancke
d970b0901b measure decode time in TimeDelta instead of ms
increasing precision since summing up rounded values leads to
a rounding error, in particular for small frames which take very
little time to decode.

BUG=webrtc:12526,webrtc:13756

Change-Id: I647c702808856a002c746ed9f115aa9bcaddc1f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262810
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37249}
2022-06-17 09:57:27 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Jonas Oreland
6545516a14 RtpSenderInterface::SetEncoderSelector
This cl/ adds a way of setting an EncoderSelector on a specific
RtpSenderInterface. This makes it possible to easily use different
EncoderSelector on different streams within the same or different PeerConnections.

The cl/ is almost identical to the impl. of RtpSenderInterface::SetFrameEncryptor.

Iff a EncoderSelector is set on the RtpSender, it will take precedence
over the VideoEncoderFactory::GetEncoderSelector.

Bug: webrtc:14122
Change-Id: Ief4f7c06df7f1ef4ce3245de304a48e9de0ad587
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264542
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37150}
2022-06-08 11:06:52 +00:00
Tommi
a136ed4085 Add SetTransportCc to ReceiveStreamInterface.
Setting the transport cc flag was only possible post creation for
audio receive streams, while video receive streams need to be recreated.

This CL moves the setter for transport_cc() to where the getter is and
adds boiler plate implementations for the video streams. For audio
streams this splits "SetUseTransportCcAndNackHistory" into two methods,
SetTransportCc and SetNackHistory.

Bug: none
Change-Id: Idbec8217aef10ee77907cebaecdc27b4b0fb18e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264443
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37038}
2022-05-30 14:07:04 +00:00
Rasmus Brandt
cfc79174f2 Remove unused FlexfecReceiveStream::Stats struct
Bug: webrtc:14109
Change-Id: Ie06c267c15b21eff15803ead11b6deb661d17523
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262944
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36996}
2022-05-25 07:02:39 +00:00
philipel
2a2f3ece15 Reland "Replace InternalVideoEncoderFactory implementation with VideoEncoderFactoryTemplate."
This reverts commit f8c81ca469.

Reason for revert: <Prepare to reland>

Original change's description:
> Revert "Replace InternalVideoEncoderFactory implementation with VideoEncoderFactoryTemplate."
>
> This reverts commit 256733c78a.
>
> Reason for revert: <breaks downstream>
>
> Original change's description:
> > Replace InternalVideoEncoderFactory implementation with VideoEncoderFactoryTemplate.
> >
> > Bug: webrtc:13573
> > Change-Id: Iae649e7922a67f70c53d33f3b87ea62bb6a3490c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262812
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36940}
>
> Bug: webrtc:13573
> Change-Id: I3341b6b96a56de63058c38943611b8c1629294ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262941
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36942}

Bug: webrtc:13573
Change-Id: Iaf1222c58a18f378df20e4f83262b9a9da491712
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262943
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36985}
2022-05-24 12:40:57 +00:00
Harald Alvestrand
485457f050 Delete ChannelManager class
Bug: webrtc:13931
Change-Id: I331aed0e304f89a0c53d8db20ab2c9733ebbb34c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263120
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36970}
2022-05-23 10:06:26 +00:00
Tommi
3176ef79e9 Rename AudioReceiveStream to AudioReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I22eaa7a9e082fc575cf7471d7a2f4f706564d54f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262805
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36965}
2022-05-23 08:44:26 +00:00
Harald Alvestrand
c3fa7c38b2 Remove remaining trampoline functions from channel_manager
This is part of the project to delete the class entirely.
The CL also adds an "use_rtx" parameter to the function for listing
video codecs, rather than filtering those away afterwards.

Bug: webrtc:13931
Change-Id: I96b9b18c694a1c0986ccf22face76ef4c704d372
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262666
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36963}
2022-05-23 08:09:06 +00:00
Tommi
f6f4543304 Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36958}
2022-05-22 10:54:38 +00:00
Tommi
1def899931 Remove legacy (unused) config param: jitter_buffer_enable_rtx_handling
Bug: none
Change-Id: I14164546950cc63c37e54544cdc80bfd4eddf211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262962
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36955}
2022-05-21 23:06:21 +00:00
Niels Möller
83830f316e Delete TestListener and top-level thread wrapping.
Instead use rtc::AutoThread in tests that need that.

Bug: webrtc:9714
Change-Id: I1f33b1b2d321770d062504dd9ef86d66a345dd42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36950}
2022-05-20 15:21:21 +00:00