Commit Graph

1987 Commits

Author SHA1 Message Date
2377226851 Start moving timing helper classes into timing/ sub-folder.
Putting these classes in a sub folder increases
structure and clarifies that they are used as
helper classes. Affected classes in this change:
  * CodecTimer
  * InterFrameDelay
  * RttFilter
VCMTiming will be moved in a separate CL.

Additional changes:
  * Remove VCM prefix from class names.
  * Introduce granular BUILD.gn targets.
  * Update some includes.

Bug: webrtc:14111
Change-Id: Ia75128aa955a819033b97d4784cb61904de7230b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262960
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36975}
2022-05-23 13:43:40 +00:00
fbf66ddddf Move UniqueTimestampCounter to video/
This helper class currently lives in `modules/video_coding`,
but it's only users are in `video/`. Thus, it makes sense to
move the class to `video/`.

Bug: webrtc:14116
Change-Id: I0d3f8961bc8f5fe80f3100dbbd309b206020e6d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262963
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36973}
2022-05-23 13:21:32 +00:00
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
4d6dd17153 Change VideoStreamEncoder::Stop() to handle stopped TQ
In case the encoder TQ has been stopped and doesn't accept more tasks,
we could end up in a hung state during Stop(). This is a hypothetical
situation, but can be simulated in a test and avoided.

Bug: webrtc:14063
Change-Id: I20f48b11b6266f6875ed5e69de3529212505e439
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258125
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36964}
2022-05-23 08:34:36 +00:00
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
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
2ee3e4db22 Use resolution bitrate limits if one spatial layer is configured via scalability mode.
Bug: webrtc:13960
Change-Id: Ie9238f3352b0d9d92fda97a250de0792e6bbfc9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261721
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36948}
2022-05-20 13:25:51 +00:00
c0a9f35248 Define SimulcastStream as an alias for SpatialLayer
Step one in making it a separate type, that will be done as a
followup, after downstream code is updated to use the new name.

Bug: webrtc:11607
Change-Id: I6fa664a0729b1cfd71b7f02b6441880beee0e741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262806
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36946}
2022-05-20 13:12:21 +00:00
ae2f39ca3b Refactor ResolutionBitrateLimitsTest
Use the DataRate type, and designated initializers to construct expectations.

Bug: None
Change-Id: I9f3a64faf7afffb1c2efebeda84f3ef6d4e71dee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262940
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36941}
2022-05-20 11:26:37 +00:00
65b2d8ad21 Move RunLoop test class to its own build target
To make it usable in tests without depending on all of CallTest.

Bug: None
Change-Id: Ie3102ab71bcfe3862dd6c35d3285098e961e54df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262807
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36932}
2022-05-19 15:51:39 +00:00
8139cda2ec Enable encoder frame drop for call tests and video quality tests
It was accidentally disabled by
https://webrtc-review.googlesource.com/c/src/+/262244, resulting in
lots of unintended changes in performance tests.

Bug: webrtc:6883, webrtc:14075
Change-Id: Ie414f729ec2248f0eef99922e9704f4c4a0b1aa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262813
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36931}
2022-05-19 14:55:46 +00:00
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
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
cde992ddad Add support for VP9 configuration through scalability mode.
Bug: webrtc:13960
Change-Id: Ia930647b15f624a4d10d8d335519b69ffdae6636
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260983
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36919}
2022-05-18 08:21:00 +00:00
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 16a8b25d809e4d4982f9fc4b4e973acd506b8bca
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
c92ee5f3c3 Revert "Update local_ssrc without needing to recreate video streams."
This reverts commit 16a8b25d809e4d4982f9fc4b4e973acd506b8bca.

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
f3f3a61167 Remove legacy PacedSender.
The new TaskQueuePacedSender has been default-on in code since M97, and
there are no further usages of it that I can find. Let's clean this up!

The PacingController and associated tests will be cleaned up in a
follow-up cl.

Bug: webrtc:10809
Change-Id: I0cb888602939add953415977ee79ff0b3878fea5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258025
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36890}
2022-05-13 20:31:06 +00:00
059548919b Enable VP8 configuration via scalability mode
Bug: webrtc:13959
Change-Id: I16054506ca4086767323443fb9b1e623224e234d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258791
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36884}
2022-05-13 13:53:44 +00:00
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
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
9d04a78f73 ZeroHertz: expose time to first frame statistic.
Bug: chromium:1324120
Change-Id: Ie609da309427ca5d2ff8585a8dc730586553c725
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262247
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36867}
2022-05-12 17:35:13 +00:00
cf4ed1516e Add GetRtpExtensionMap to ReceiveStream and remove GetRtpExtensions.
GetRtpExtensions() is still used in one corner case for audio receive
streams, so GetRtpExtensions has migrated to AudioReceiveStream.

Updated FlexfecReceiveStream config management (incl. pass by value) and
now store an RtpHeaderExtensionMap in FlexfecReceiveStreamImpl.

Call GetRtpExtensionMap() from call.cc instead of constructing one on
the fly for each rtp packet (for video packets at least).

Bug: webrtc:11993
Change-Id: Id90ec5d43ea368f58edd6f17cb39d8c54aec641f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36839}
2022-05-10 13:50:31 +00:00
edcb25b623 Migrate RemoteNtpTimeEstimator to more precise time representations
Reland of https://webrtc-review.googlesource.com/c/src/+/261311

Bug: webrtc:13757
Change-Id: I34a58100b8fadfe3dbea9ffce71829b7670daad8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261726
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36838}
2022-05-10 13:38:31 +00:00
363e812f2d Remove the VideoReceiveStream2::rtp() accessor.
Instead offer accessors for the specific config values from the struct
that are needed at different times. The remote_ssrc and rtx_ssrc
properties maybe accessed from any thread, other properties have
stricter requiremets.

Bug: webrtc:11993
Change-Id: I3ff8527b13452c773fae1b2574f1e3fd2583b481
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261319
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36823}
2022-05-09 20:25:29 +00:00
7a15ff3f14 Add a transport_cc() getter and remove rtp_config().
Bug: webrtc:11993
Change-Id: Ie435a702c91b4d3827e528083f474e378fc75cc5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261318
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36822}
2022-05-09 20:21:14 +00:00
6be3e788f5 Add getter for rtp header extensions for receiver classes.
This is to avoid accessing the array via the config struct.
Moving forward we might want to consider using the RtpHeaderExtensionMap
instead of a std::vector of RtpExtension.

Bug: webrtc:11993
Change-Id: I8469dbbd9bb95a69f87b5912bfc4bf8b8f603beb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261317
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36820}
2022-05-09 16:59:19 +00:00
853a407273 Revert "Migrate RemoteNtpTimeEstimator to more precise time representations"
This reverts commit a154a15c978a0eae133d957dcad3581fd5f98c7b.

Reason for revert: breaks downstream tests

Original change's description:
> Migrate RemoteNtpTimeEstimator to more precise time representations
>
> Bug: webrtc:13757
> Change-Id: I880ab3cc6e4f72da587ae42ddca051332907c07f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261311
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36817}

Bug: webrtc:13757
Change-Id: Id21edb1378e6e944b24955396250ddc33fa70663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261722
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36819}
2022-05-09 15:48:29 +00:00
a154a15c97 Migrate RemoteNtpTimeEstimator to more precise time representations
Bug: webrtc:13757
Change-Id: I880ab3cc6e4f72da587ae42ddca051332907c07f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261311
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36817}
2022-05-09 14:32:19 +00:00
ea1e6f44f8 Delete rtc_base/format_macros.h
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.

Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36814}
2022-05-09 12:03:21 +00:00
a406272bc4 Migrate critical tests from FrameBufferProxy to VideoReceiveStream2Test
* Paramaterize VideoReceiveStream2Test to have variations that run with
  and without a metronome.
* Migrate over tests to ensure frame timing is used.

Bug: webrtc:14003
Change-Id: Icccc2f0d548aaa64c50e010056e1e651174e02fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260942
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36812}
2022-05-09 10:33:47 +00:00
8615bf0582 Move FrameBuffer3 to api/
The webrtc::VideoStreamDecoderInterface was basically created as a public version of FrameBuffer2, but to hide the complexity of FrameBuffer2 it was also combined with decoding so that the public API could be reasonably simple to use. FrameBuffer3 has a simple API with a clear purpose, so its API can be exposed directly.

Bug: webrtc:14026
Change-Id: I81dc84b869e4d16c5e02feb5c876fbcede3d4a25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261181
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36781}
2022-05-05 14:34:48 +00:00
3c2359c663 Revert "RTP video stream receivers: By default consider frames decryptable."
This reverts commit 658dfb74e563295b7ed4961d06c68afbd566ef8d.

Reason for revert: Breaks downstream tests.

Original change's description:
> RTP video stream receivers: By default consider frames decryptable.
>
> Looks like the original code [0] that should limit the amount of keyframe requests behaves a bit strange in a situation when the first keyframe is missed. Effectively in the encrypted session the receiver can't enforce getting the keyframe until it receives at least one frame which is decryptable [1]. And with dependency descriptors it can't do that until it receives a keyframe which contains proper DD header [2]. This leads to unnecessary delays until the sender sends a keyframe itself.
>
> In this CL we "trust" that the stream is decryptable from the beginning unless proven the opposite [3].
>
> [0]: https://webrtc-review.googlesource.com/c/src/+/123414/
> [1]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/video_receive_stream2.cc#950
> [2]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#415
> [3]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#882
>
> Bug: webrtc:10330
> Change-Id: I167d728ddc7cde74a5c5e3327bce7364ed97b7ea
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260326
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Artem Titarenko <artit@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36775}

Bug: webrtc:10330
Change-Id: I1e390c938502048a678a9c3a9a88a44f08dc058f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261261
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Auto-Submit: Artem Titarenko <artit@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36777}
2022-05-05 10:41:13 +00:00
658dfb74e5 RTP video stream receivers: By default consider frames decryptable.
Looks like the original code [0] that should limit the amount of keyframe requests behaves a bit strange in a situation when the first keyframe is missed. Effectively in the encrypted session the receiver can't enforce getting the keyframe until it receives at least one frame which is decryptable [1]. And with dependency descriptors it can't do that until it receives a keyframe which contains proper DD header [2]. This leads to unnecessary delays until the sender sends a keyframe itself.

In this CL we "trust" that the stream is decryptable from the beginning unless proven the opposite [3].

[0]: https://webrtc-review.googlesource.com/c/src/+/123414/
[1]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/video_receive_stream2.cc#950
[2]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#415
[3]: https://webrtc.googlesource.com/src/+/9432768024b0397f2dccfec0cab30f33dde87b93/video/rtp_video_stream_receiver2.cc#882

Bug: webrtc:10330
Change-Id: I167d728ddc7cde74a5c5e3327bce7364ed97b7ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260326
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36775}
2022-05-05 09:58:28 +00:00
26d12fcc71 Remove rtc_base:rtc_base_approved
It's now empty, let's remove it!

Bug: webrtc:9838
Change-Id: I4b3310e882ea95fdf47903f9ad31e2efb35703f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261242
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36774}
2022-05-05 09:43:31 +00:00
15a3c3fdca Split Windows code from rtc_base_approved to smaller targets
Bug: webrtc:9838
Change-Id: Ic463284fd68715fd9b8eadd50e1d25841cb60020
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261241
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36768}
2022-05-05 06:47:49 +00:00
e487e440a7 Enable FrameBuffer3 by default
The field trial will remain as a kill-switch for a few weeks while
decisions about sync decoding are being made.

Change-Id: I6034d25a129404e94ab8830f51e83667e285c785
Bug: webrtc:14003
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260327
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36760}
2022-05-04 13:40:37 +00:00
1bcd827e9b Merged FrameBuffer3 {Next,Last}DecodableTemporalUnitRtpTimestamp() function.
Bug: webrtc:13343
Change-Id: Ic21eddd38466e6b5fd8b912b3ee2d9dc47a0ba35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260981
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36756}
2022-05-04 11:29:57 +00:00
44be579b4a Make all VideoReceiveStream2Test use simulated time
Adds matchers to webrtc::VideoFrame to help with the tests.

Bug: webrtc:14003
Change-Id: I62fc1c577bb76b21a96741ba829f6dcd53a308c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260184
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36755}
2022-05-04 11:27:16 +00:00
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
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
db0d586172 Enable variable_start_scale_factor_ by default.
Bug: webrtc:14007
Change-Id: I1c803b4a530209ae9b47a9bd91379621f17fe685
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260186
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36697}
2022-04-28 18:46:41 +00:00
3801604bc7 Delete unused video_stream_decoder
video_stream_decoder2 is the only one used.

Change-Id: Iabee3521b2946f097296cf2b02025aa6e41e87a4
Bug: webrtc:11489
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260282
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36692}
2022-04-28 12:57:54 +00:00
14ee8037b0 Combine VideoReceiveStream2TestWithFakeDecoder into the main test suite
This is achieved by wrapping a fake decoder inside the mock decoder, in
a sort of spy pattern.

This is preperation for moving the FrameBufferProxy tests into the main
VideoReceiveStream2 suite.

Bug: webrtc:14003
Change-Id: I7b9691cc5a1a8a3fadfb7aa6981752b647d5c73f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260113
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36691}
2022-04-28 12:43:14 +00:00
1c18477070 Merge VideoReceiveStream2TestWithLazyDecoderCreation into main suite.
Bug: webrtc:13997
Change-Id: I74078c07ac4a5def231a0b3339715466ea4fe542
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260112
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Johannes Kron <kron@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36690}
2022-04-28 12:28:24 +00:00
d425f506ad Switch VideoReceiveStream2 internals to Time units
Change-Id: Ifcee6372120e968499acbdf3bf2c0d002d1c4724
Bug: webrtc:13756
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259777
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Johannes Kron <kron@google.com>
Cr-Commit-Position: refs/heads/main@{#36685}
2022-04-28 09:38:54 +00:00
f6adc647ba Remove WebRTC-LowLatencyRenderer field trial
There is no active use of it, and the fields are enabled by default in
the uses of it.

Change-Id: Ibfdb3f1befca886cb4b2f4b2ae4d6235aafafe3d
Fixed: webrtc:13998
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256262
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36655}
2022-04-26 10:05:15 +00:00
a0ee64c57e Add test::FakeEncodedFrame for testing
Change-Id: I1c8fabe5caf2c723487ec1cd71a379e922026a9d
Bug: webrtc:13996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260001
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36654}
2022-04-26 09:26:35 +00:00
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +00:00
a30aef3dea Move event_tracer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic3c424729b5edd3e378c4195afe33ae5c88ad491
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259312
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36637}
2022-04-24 14:47:40 +00:00
ceb7b36d3a Move byte_buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic7e912cba1218f1eed794cb8c393ac148106b16c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259310
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36634}
2022-04-23 22:47:39 +00:00