Commit graph

287 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Niels Möller
cf2c8915f4 Delete H264EncoderSpecificSettings
Production code always use the default settings.

Bug: webrtc:6883
Change-Id: I213fc6433bb1cd0a6623ad523fee2df1506588e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261903
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36926}
2022-05-18 13:53:20 +00:00
Philipp Hancke
0359ba2225 stats: add frame assembly time stats
implements a total frame assembly time statistic that measures the
cumulative time between the arrival of the first packet of a frame
(the lowest reception time) and the time all packets of the frame have
been received (i.e. the highest reception time)

This is similar to totalProcessingDelay
  https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay
in particular with respect to only being incremented for frames that are being decoded but does not include the amount of time spent decoding the frame.

This statistic is useful for evaluating mechanisms like NACK and FEC
and gives some insight into the behavior of the pacer sending the
packets.
Note that for frames with just a single packet the assembly time will be zero. In order to calculate an average assembly time an additional frames_assembled_from_multiple_packets counter for frames with more than a single packet is added.

Currently this is a nonstandard stat so will only show up in webrtc-internals and not in getStats. Formally it can be defined as

totalAssemblyTime of type double
	Only exists for video. 	The sum of the time, in seconds, each video frame takes from the time the first RTP packet is received (reception timestamp) and to the time the last RTP packet of a frame is received.
    Given the complexities involved, the time of arrival or the reception timestamp is measured as close to the network layer as possible.

    This metric is not incremented for frames that are not decoded, i.e., framesDropped, partialFramesLost or frames that fail decoding for other reasons (if any). Only incremented for frames consisting of more than one RTP packet. The average frame assembly time can be calculated by dividing the totalAssemblyTime with framesAssembledFromMultiplePacket.

framesAssembledFromMultiplePacket of type unsigned long
	Only exists for video. It represents the total number of frames correctly decoded for this RTP stream that consist of more than one RTP packet.
	For such frames the totalAssemblyTime is incremented.

BUG=webrtc:13986

Change-Id: Ie0ae431d72a57a0001c3240daba8eda35955f04e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260920
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36922}
2022-05-18 09:16:10 +00:00
Tommi
1331c1821c Reland: Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

This is a reland of commit 16a8b25d80
with an additional fix in Patchset 2. Another problem turned out to be
in RTCPReceiver, which is fixed in:
https://webrtc-review.googlesource.com/c/src/+/262663

Bug: webrtc:11993
Change-Id: I63c7cf62a6dd50f88b491fea3ba866697552ef5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262665
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36907}
2022-05-17 10:59:54 +00:00
Asa Persson
2698353d43 Disable quality scaling if multiple spatial layers are requested for VP9
VP9 automaticResizeOn is disabled if more than one spatial layer is configured via scalability mode.

Bug: webrtc:13960
Change-Id: I7c6351bca6d2f32bcc7391894e8dcc9e74ca2050
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261315
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36897}
2022-05-16 15:11:24 +00:00
Tomas Gunnarsson
c92ee5f3c3 Revert "Update local_ssrc without needing to recreate video streams."
This reverts commit 16a8b25d80.

Reason for revert: Checking if this is blocking the Chromium autoroller.

Original change's description:
> Update local_ssrc without needing to recreate video streams.
>
> This is comparable to this change done previously for for audio streams:
> https://webrtc-review.googlesource.com/c/src/+/222042
>
> Bug: webrtc:11993
> Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36876}

Bug: webrtc:11993
Change-Id: I3a8d2f6a7e89b6784754d8e891a4e01479807c2d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262422
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36892}
2022-05-13 22:30:44 +00:00
Niels Möller
807328fec7 Move frame drop config to VideoCodec and VideoEncoderConfig.
Intend to delete corresponding codec-specific settings in a followup.

Bug: webrtc:6883
Change-Id: I78ab07729a5aee1055f80d39d8f7289beb6721e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262244
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36882}
2022-05-13 13:40:14 +00:00
philipel
9437529d4b Determine scalability mode if not explicilty set for AV1.
Bug: none
Change-Id: I86298b8a57300ed1d824cf6ba8f5daeec6af7315
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262242
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36879}
2022-05-13 12:06:44 +00:00
Tommi
16a8b25d80 Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

Bug: webrtc:11993
Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36876}
2022-05-13 10:08:54 +00:00
Erik Språng
536f587b98 Revert "Calculate video stream max bitrate using expression."
This reverts commit 45361f78ed.

Reason for revert: Perf alerts galore.

Original change's description:
> Calculate video stream max bitrate using expression.
>
> This replaces the ealier table-based caps.
> Apart from the VGA cap (now 1600kbps instead of 1700kbps), or if using
> "in between" resolutions, the caps are unchanged - but now cover high
> resolutions better.
>
> Bug: webrtc:14017
> Change-Id: I8649b528495d6c917e38ea8cb1a272df6c464c03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260940
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36776}

Bug: webrtc:14017
Change-Id: I18ebc81c6054713c58d49bd227e37090686958c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261309
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36794}
2022-05-06 09:37:32 +00:00
Erik Språng
45361f78ed Calculate video stream max bitrate using expression.
This replaces the ealier table-based caps.
Apart from the VGA cap (now 1600kbps instead of 1700kbps), or if using
"in between" resolutions, the caps are unchanged - but now cover high
resolutions better.

Bug: webrtc:14017
Change-Id: I8649b528495d6c917e38ea8cb1a272df6c464c03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260940
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36776}
2022-05-05 10:10:20 +00:00
Philipp Hancke
a16a6a6341 stats: implement inbound-rtp totalProcessingDelay for video
https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay

BUG=webrtc:13984

Change-Id: Ifd821bd8553add46218f09a11366096d62f5d09f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259768
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36732}
2022-05-02 10:56:22 +00:00
Niels Möller
79d566b0cf New enum ScalabilityMode.
Used instead of string representation in lower-levels of encoder configuration, to avoid string comparisons (with risk of misspelling) in lots of places.

Bug: webrtc:11607
Change-Id: I4d51c2265aac297c29976d2aa601d8ffb33b7326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259870
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36706}
2022-04-29 12:16:42 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Stefan Mitic
3aa9937e48 Fix for payload type id collision
This collision can occur when we have
asymetrical send and receive codecs. This is the case in the current
code base with the VP9 codec familly but is not visible untill more
codecs are added.

Added Nutanix Inc. to AUTHORS.

Bug: chromium:1291956
Change-Id: I09d3f76161d984d2a3edf721639753bffd4947b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250034
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35944}
2022-02-08 09:13:33 +00:00
Sergey Silkin
e1cd3ad4f5 Switch encoder on init failure
Currently if encoder initialization fails WebRTC doesn't send any video.
This CL adds functionality that changes encoder type in such case and
restores the video. If encoder selector is available we switch to
encoder it recommends. Otherwise, VP8 is used as the default fallback
encoder.

Bug: webrtc:13572
Change-Id: Ifcdf707a575711f5ff81f9451caf30140c9171dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246960
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35761}
2022-01-21 12:05:17 +00:00
Sergey Silkin
42bf2c670c Put current send codec to front of codecs list in RTP sender parameters
WebRTC can switch encoder on-fly when encoder fails or by request from
encoder selector. Putting the current send codec to the front of the
codecs list provides a simple way for apps to know what is actually
used without retrieving stats.

Bug: webrtc:13572
Change-Id: Iaaa5f7ad8667f59016dc92bff9e9a57a7425ef44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246500
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35723}
2022-01-18 14:36:33 +00:00
Erik Språng
0a72b412e1 Add field trial flag forcing VP9 flexible mode for testing
Bug: chromium:949536
Change-Id: Idb12a2be18cdec8313a74d35fe79c0235f66e393
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246100
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35672}
2022-01-12 19:11:43 +00:00
Tomas Gunnarsson
94f0194d5a Remove transport_name_ from Channel.
Because of this (seemingly simple) change, I had to change the return
type of transport_name from `const std::string&` to `absl::string_view`
to handle the case when there's no transport assigned.
That in turn caused an avalanche of required updates.

Bug: webrtc:12230, webrtc:11993
Change-Id: I16ec6c6a5fc2f5f7c7de572355a3c6ca924bb9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244084
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35617}
2022-01-03 20:51:42 +00:00
Tomas Gunnarsson
f643aea8ac Updating OnDemuxerCriteria* notifications to be on the same thread.
This makes things slightly simpler for the time being as surrounding
code is being refactored. This also removes a PostTask which has the
effect of shrinking the window between the Pending/Complete
notifications slightly since there's no additional async task
for the 'complete' step.

Bug: webrtc:11993
Change-Id: Ia86779b21c6f87301f37d763f89ace722e06e563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244081
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35609}
2022-01-03 10:37:02 +00:00
Tomas Gunnarsson
4163a3dae8 Simplify construction of MediaChannel classes.
Removes a few constructors where similar ones existed.
Removes MediaConfig dependency from MediaChannel and fixes an iwyu.

Bug: none
Change-Id: I9e34a1da0852c3fb21222161fad315e70598db3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242966
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35608}
2022-01-03 10:03:53 +00:00