7145 Commits

Author SHA1 Message Date
Shunbo Li
521b09bfb7 Fix regression caused by default action changed for h264:Nalu:kFiller
This commit fixes the issue of discontinuous RTP sequence numbers
caused by improper discarding of these nalu types:
kFiller/kEndofSequence/kEndOfStream.

Bug: webrtc:368335257
Change-Id: Id7a2d34b22ee1c6e1523d8279d9838c57fdeb97f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366501
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43299}
2024-10-24 10:59:29 +00:00
Diep Bui
d81421370f Cleanup: compute AverageReportedPacketLossRatio only once when a new observation is added.
Prior to this change, we unnecessarily re-compute AverageReportedPacketLossRatio a few times for the same observation.

Bug: webrtc:12707
Change-Id: I5de3d06bf3a32a39638a6f72baf7ec12144c6399
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366583
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43298}
2024-10-24 10:26:58 +00:00
Ilya Nikolaevskiy
ce45238398 Dont use SimulcastToSvcConverter if the middle stream is inactive
Bug: chromium:375048794
Change-Id: I0acc3b0096c81e00d60c9339b86f30fbe8f92212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366523
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43296}
2024-10-24 08:26:08 +00:00
Olov Brändström
05666b4db7 Function that Converts NtpTime to a Timestamp with UTC epoch in Clock.
danilchap@webrtc.org suggested to add a converter for NtpTime <-> UTC Timestamp for in https://webrtc-review.googlesource.com/c/src/+/365641.

This CL add a NtpTime -> UTC Timestamp in Clock, and change code to start to use the new function.

Bug: None
Change-Id: If4af6cb8e31c1731692edfb8358e67b7a43226a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366001
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43293}
2024-10-23 14:19:08 +00:00
Per K
b7cac14fd4 Cleanup TransportFeedbackAdapter unittests
In preparation for adding RFC8888 support.

Bug: webrtc:42225697
Change-Id: I15ab535d36c70b982243b84d76da25f1b613a766
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366421
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43287}
2024-10-23 05:55:04 +00:00
Per K
639494be57 Add method CompactNtpIntervalToTimeDelta
Similar to CompactNtpRttToTimeDelta but can return negative values.

Bug: webrtc:42225697
Change-Id: Iea97502ea73eb6240f42c2040cdc576e51298704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366422
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43284}
2024-10-22 16:46:10 +00:00
Dor Hen
3f1a04acf9 Comment unused variables in implemented functions 5\n
Bug: webrtc:370878648
Change-Id: I8ac032b5621fd0a75bce11541133579d22f63af3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364684
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43280}
2024-10-22 12:00:53 +00:00
Per K
079a8b4691 Refactor CongestionControllerFeedback logic
CongestrionControllerGenerator tracks received packets per SSRC.
Lost packets are included in rtcp:CongestionControlFeedback::Packets()

This is done in order to be able to track lost packets between
feedback packets.

Bug: webrtc:42225697
Change-Id: Ib47d9b55c3d150cb98a44a4f3997cfcfe6c5fbb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366002
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43274}
2024-10-21 12:42:26 +00:00
Sun Shin
6d815bdd9b Let the existing TransportFeedback work with RFC8888 congesting control
In the `MaybeProcess` method, a new variable `time_until_cc_rep` is introduced
to track the time until congestion control feedback generation is processed.
The minimum of this value and the times until RBE and transport sequence number
feedback processing are calculated.

Co-authored-by: Shridhar Majali <smajali@nvidia.com>

Bug: webrtc:42225697
Change-Id: I44173062d8f8f84bf7e7791e05578c0ffc4fd017
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365273
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43271}
2024-10-21 10:55:43 +00:00
林恩
c382c84575 fix h264 encoder don't generate template_structure after first keyframe
Bug: webrtc:345993676
Change-Id: Ie71c08d9a29b33c5f5d74d3e0779084ead9b5505
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365962
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43265}
2024-10-18 11:33:55 +00:00
Per K
93e177862c Prepare TransportFeedbackAdapter for RFC8888
Directly use RtpPacketToSend instead of RtpPacketSendInfo

For RFC8888 we will need to match SSRC and RTP sequence number with the transport sequence number that only exist on the sending side.
For retransmitted packets, RTX, RtpPacketSendInfo contain original SSRC and original sequence number.

Bug: webrtc:42225697
Change-Id: Iafa5d851ca5c51c85e4607ed4c1919d96da6084a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366000
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43264}
2024-10-18 11:24:47 +00:00
Takuto Ikuta
337f6f2f93 remove proto_data_sources usages
Indirect input deps for imported proto is now handled by deps in
proto_library template, so we don't need to use proto_data_sources
anymore after https://crrev.com/c/5919027.

To remove proto_data_sources from proto_library template, let me clean
up proto_data_sources usages from this repository.

Bug: chromium:366137880
Change-Id: I288a30004f7d622be502477a0567b00d19432e89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366060
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43261}
2024-10-18 08:50:11 +00:00
Bjorn Terelius
a5c5ff4611 Disable WindowFinderTest.FindConsoleWindow due to flakiness
Bug: webrtc:373792116
Change-Id: I5b5ec2a090934248d1ce5e243d53aceb463e6db2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366003
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43259}
2024-10-18 06:10:21 +00:00
Björn Terelius
27d3d74300 Check return values in WindowFinderTest.FindConsoleWindow on win
Bug: webrtc:373792116
Change-Id: I2213f12e11e469aa5b94eca82deaceff5785ce6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43256}
2024-10-17 14:11:35 +00:00
Dor Hen
049b43bd02 [reland] Comment unused variables in implemented functions
Compiling webrtc with `-Werror=unused-parameters` is failling duo to
those parameters.
Also, it shouldn't harm us to put those in comment for code readability as
well.

NOTE: This time I made sure to iterate over the C files in the
audio_processing folder and compile them using gcc.
On the original CL that was reverted - that failed with the same error
Danil mentioned. This time it seems fine.
I'll make sure to run the same script on the rest of my CLs for sanity

Bug: webrtc:370878648
Change-Id: I83cea3a08777e21d26a95bcad503a2d1b74566eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364537
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43249}
2024-10-16 11:40:33 +00:00
Danil Chapovalov
9c21f6386f Replace AudioProcessingBuilderForTesting with the BuiltinAudioProcessingFactory
Bug: webrtc:369904700
Change-Id: Ie96dc1a9c052cb5340b10bf834d95f88f0a96a14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365801
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43247}
2024-10-16 10:55:38 +00:00
Danil Chapovalov
2dc95ba299 Add BuiltinAudioProcessingFactory
Its implementation is a copy of the AudioProcessingBuilder with intention to replace all usage of AudioProcessingBuilder with the BuiltingAudioProcessingFactory and thus get Environment with propagated field trials available for AudioProcessingImpl at construction.

Bug: webrtc:369904700
Change-Id: Iee0eb112dd579402fcd5be56bf1054946179d1fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365582
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43242}
2024-10-15 20:10:24 +00:00
Per K
2ee43d6daa Callback to NetworkStateEstimateObserver before NetworkLinkRtcpObserver
If RTCP compound message is received with both these messages,
NetworkStateEstimator should be invoked before NetworkLinkRtcpObserver
since remote network state estimate may set limits on the BWE
calculated from the transport feedback.

Bug: webrtc:42220808
Change-Id: Ieac9c1d7d9c28e690351bcf1d8125c9e0099f962
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365583
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43239}
2024-10-15 10:55:31 +00:00
Fanny Linderborg
41d9a01f6a Prepare function for deprecation
The `FrameToRender` function is considered a part of WebRTC's API so it cannot just be removed all at once. Since it is a pure virtual function it needs some preparation for the deprecation. This CL implements a default implementation. It will now be possible to not implement the function, but it will kill the process in that case.

Bug: webrtc:358039777
Change-Id: Ia83c63ab035abda76beb30ba98b23f9cc835a6a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365500
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43235}
2024-10-14 12:40:56 +00:00
Alessio Bazzica
01a9264959 Remove the iLBC audio codec
Bug: webrtc:372395680
Change-Id: I228777281a26ada5336aefc9168b2537e029aca3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365101
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43234}
2024-10-14 12:13:31 +00:00
Danil Chapovalov
ad49112cd0 Introduce AudioProcessingFactory interface
This interface allows to delegate construction of AudioProcessing to
the PeerConnectionFactory where it can provide propagated field trials

Bug: webrtc:369904700
Change-Id: Ie05cd771e4a869fa5f43173e127256800ae0727f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365320
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43233}
2024-10-14 10:56:07 +00:00
Harald Alvestrand
d8bddfef88 Split up the call/video_stream_api target
The split shows that some places don't need it at all. Most other
places will depend on both send and receive stream targets.

Bug: webrtc:373151158
Change-Id: I788136a2ee84180c16345a7929b7f7bf3f97507b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43230}
2024-10-14 08:26:16 +00:00
qwu16
60c3fea7eb Fix header length and set layer_id/temporal_id with lowest value of aggregated NALU for AP packet in H265 RTP packetizer
Bug: webrtc:41480904
Change-Id: I56047b20933ba1f251ef88dc73a40c4967e8f89e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362560
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Qiujiao Wu <qiujiao.wu@intel.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43220}
2024-10-11 02:58:02 +00:00
Olov Brändström
b74268e0cf Update TODOs to the correct format.
Some TODOs that where added in https://webrtc-review.googlesource.com/c/src/+/365001 do not follow the correct format
https://webrtc.googlesource.com/src/+/refs/heads/main/g3doc/style-guide.md#comments. This CL updates the incorrect TODOs.

Also updated some comments as they referred to ntp timestamps, when the timestamp is utc.

Bug: None
Change-Id: I1661f6f57c9fa5f66e5b92f154007c34854923c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365162
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#43214}
2024-10-10 11:21:44 +00:00
Fanny Linderborg
518bd61cec Forward the corruption score from the decoder to ReceiveStatisticsProxy
Bug: webrtc:358039777
Change-Id: Iace01daa53d08b5d0c484b5f55da73ba230317da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365095
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43213}
2024-10-10 10:45:35 +00:00
Olov Brändström
fea3280c13 update format of recently added TODOs.
Some TODOs with an old from where added in https://webrtc-review.googlesource.com/c/src/+/363946.

This CL updates the TODO comments to the current form.

Bug: None
Change-Id: Id61dca5a0f4d705f4dfe74f6523dae3e357d49ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365140
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#43209}
2024-10-09 18:34:03 +00:00
Olov Brändström
51b682648e Add an environment clock timestamp to SenderReportStats.
Add an environment clock timestamp to SenderReportStats and make it visible in rtc_stats_collector.cc. This make it possible to use the pc->GetConfiguration().stats_timestamp_with_environment_clock() flag to decide which timestamp to use when creating a RTCRemoteOutboundRtpStreamStats object.

This CL is the third (and possible the last) of a series of CLs that aim to replace the UTC timestamps in RTCStats objects to Environment clock timestamps. The other CLs where https://webrtc-review.googlesource.com/c/src/+/363946 and https://webrtc-review.googlesource.com/c/src/+/364782.

When Chromium and Google internal uses of RTCStats are updated to set the stats_timestamp_with_environment_clock configuration, the flag can be deleted.

Bug: chromium:369369568
Change-Id: Ic0b07d7b012505267bd6516f19a9ba90df4cafab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365001
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43206}
2024-10-09 12:59:08 +00:00
Fanny Linderborg
e1adfc05ac Rename FrameToRender to OnFrameToRender
This is to make the name consistent with the other methods in the
interface and additionally to in the future not have a function that has
the same name as the `FrameToRender` struct.

Bug: webrtc:358039777
Change-Id: Iac727d93ab9e020a073477bd33d0f67f9983a0aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364961
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43195}
2024-10-08 16:29:01 +00:00
Olov Brändström
b9c4c242d4 rename timestamps to show epoch
I missed one timestamp in https://webrtc-review.googlesource.com/c/src/+/363946, meaning that the config flag that was added do not yet work for all timestamps in RTCStats objects. The RTCRemoteOutboundRtpStreamStats still has UTC timestamps even if the config flag is set.

I will solve this by saving both an UTC (existing) and env (to be added) timestamp, and then let rtc_stats_collector choose timestamp based on the value of the config flag (just like RTCRemoteInboundRtpStreamStats is done in the 363946 commit).

Before adding the new env_ timestamp I want to make this change. I rename the existing timestamp to show what epoch it uses (NTP or UTC). This will later make it clear which timestamp is which.

So this CL will make no logical change, just renaming members.

I only need to rename the last_sender_report_timestamp_ms, but opted to rename the remote timestamp as well, to be consistent with the naming convention I add in this CL.

Bug: chromium:369369568
Change-Id: Icfe7cf274995b39799e1478a1bb8cdf5134f0b16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364782
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43194}
2024-10-08 16:27:58 +00:00
Fanny Linderborg
a507a08904 Calculate corruption score once the frame is decoded
Bug: webrtc:358039777
Change-Id: I291e8e505f2ea7f9f95da4c83cd7679b49f2bc56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43192}
2024-10-08 13:26:00 +00:00
Fanny Linderborg
215401f651 Reland "Add a FrameToRender argument struct as input to FrameToRender"
This is a reland of commit 01f91c81f7660be842fa44e96bf804a8b2402f47

Original change's description:
> Add a FrameToRender argument struct as input to FrameToRender
>
> This is to make it easier to add new arguments to the method in the
> future. We will remove the already existing method accordingly to WebRTCs deprecation rules.
>
> Bug: webrtc:358039777
> Change-Id: Id0706de5216fbd0182cac80ebfccfc4a6a055ee8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364642
> Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43181}

Bug: webrtc:358039777
Change-Id: I404bb9660d9f4436c0658814fd3ac7d74e483f0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364900
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43188}
2024-10-08 06:22:03 +00:00
Jakob Ivarsson
b507daf411 Refactor NetEq delay constraint logic.
This makes the delay manager interface significantly simpler and easier to expose.

Bug: None
Change-Id: Ie3d37c3b869eb17ca421a76e9d1af8f0a1a36ee5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364781
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43186}
2024-10-07 15:23:43 +00:00
Henrik Boström
1accaf91b5 Improve tests for reconfiguring encoder from 4:2:1 to non-power of two.
More test coverage for previously fixed bug
https://crbug.com/webrtc/369654168.

Two tests are added:
1. LibvpxVp9Encoder unit test that 4:2:1 720p can be reconfigured to
   singlecast (which is what happens for encodings[0] in the bug).
2. Integration test that 4:2:1 720p can change to 180p,360p,540p.
   This is the exact same test as was added in [1] but using
   requested_resolution instead of scale_resolution_down_by.

[1] https://webrtc-review.googlesource.com/c/src/+/363941

Bug: webrtc:369654168
Change-Id: I83456b9254c1c6f647586d340d0fe5864b5515c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364200
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43185}
2024-10-07 13:55:36 +00:00
Jeremy Leconte
5680d8199a Revert "Add a FrameToRender argument struct as input to FrameToRender"
This reverts commit 01f91c81f7660be842fa44e96bf804a8b2402f47.

Reason for revert: break downstream projects.

Original change's description:
> Add a FrameToRender argument struct as input to FrameToRender
>
> This is to make it easier to add new arguments to the method in the
> future. We will remove the already existing method accordingly to WebRTCs deprecation rules.
>
> Bug: webrtc:358039777
> Change-Id: Id0706de5216fbd0182cac80ebfccfc4a6a055ee8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364642
> Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43181}

Bug: webrtc:358039777
Change-Id: Id59633023a428fb63aadeb266421b09040e590bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364841
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43184}
2024-10-07 12:46:24 +00:00
Fanny Linderborg
01f91c81f7 Add a FrameToRender argument struct as input to FrameToRender
This is to make it easier to add new arguments to the method in the
future. We will remove the already existing method accordingly to WebRTCs deprecation rules.

Bug: webrtc:358039777
Change-Id: Id0706de5216fbd0182cac80ebfccfc4a6a055ee8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364642
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43181}
2024-10-07 11:47:17 +00:00
Sergio Garcia Murillo
6976a1e4ee Use rtc::Buffer and rtc::ByteBufferReader instead of raw data pointers in H264SpsPpsTracker
Bug: webrtc:42225170
Change-Id: I07ec0e8a1aba8eec04ed1dd5c6f7a4bbbdb7a43a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364641
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43180}
2024-10-07 11:19:29 +00:00
Danil Chapovalov
d9b04adbdb Cleanup static constants in modules/rtp_rtcp/
Change static const to static constexpr where applicable
In .cc files ensure static constants are in unnamed namespace
Remove obsolete declaration for class level constexpr values

Bug: None
Change-Id: I23759974b5042c8c9d9ec2816ee7df283a8872d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364483
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43171}
2024-10-04 13:05:46 +00:00
Sergio Garcia Murillo
ca3ac5fe64 Use ArrayView for byte stream parsing in VideoRtpDepacketizerH264
Bug: webrtc:42223344, webrtc:42225170
Change-Id: I4894961d31baf09880ada600516b75799cba6ac0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364640
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43170}
2024-10-04 13:01:44 +00:00
Sergio Garcia Murillo
fb803de683 Fix is_first_packet_in_frame for SEI and PPS NALUs
PacketBuffer will ignore any non-idr frame which is firs packet has not
is_first_packet_in_frame set to true if there was a packet loss in the
previous frame even if the cseqs are continous:

https://issues.webrtc.org/issues/368335257#comment14

This CL sets this flag to true to SEI and PPS nal units that would have
caused the delta frames after an idr frame to be dropped in case of loss.

Bug: webrtc:368335257
Change-Id: Ic7150297d7fb4ed274c7d99175ff367100b5cf75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364241
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43168}
2024-10-03 18:29:19 +00:00
Danil Chapovalov
f75ab82b46 Support RTC_LOG for types that implement both AbslStringify and ToLogString
To support libraries and dependencies compatible with absl way of debug printing custom types.
In particular gtest can use AbslStringify to produce nice output when unit types are compared with EXPECT macros.

Bug: None
Change-Id: Ie78293a225f61977f256f0234e07d166b1977e2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364162
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43164}
2024-10-03 13:54:40 +00:00
Danil Chapovalov
678607501c Revert "Comment unused variables in implemented functions"
This reverts commit 05043e1cef47f33e81bc7ba83b4cc2c407111397.

Reason for revert: breaks compilation of .c files

Original change's description:
> Comment unused variables in implemented functions
>
> Compiling webrtc with `-Werror=unused-parameters` is failling duo to
> those parameters.
> Also, it shouldn't harm us to put those in comment for code readability as
> well.
>
> Bug: webrtc:370878648
> Change-Id: I0ab2eafd26e46312e4595f302b92006c9e23d5d2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364340
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43157}

Bug: webrtc:370878648
Change-Id: I4ea50baa2c3d0d162759c8255171e95c6199ed26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364580
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Owners-Override: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43162}
2024-10-03 11:51:29 +00:00
Dor Hen
f653f476f0 Remove unused parameters from "WebRtcSpl_FilterAR"
Bug: webrtc:370878648
Change-Id: Ia7c9046a7c0f415e1f28df9610f818af402e055f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364503
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43158}
2024-10-03 10:37:49 +00:00
Dor Hen
05043e1cef Comment unused variables in implemented functions
Compiling webrtc with `-Werror=unused-parameters` is failling duo to
those parameters.
Also, it shouldn't harm us to put those in comment for code readability as
well.

Bug: webrtc:370878648
Change-Id: I0ab2eafd26e46312e4595f302b92006c9e23d5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364340
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43157}
2024-10-03 10:36:46 +00:00
Olov Brändström
4baeed3b97 Use environment monotonic timestamps (i.e. not UTC) in RTCStats.
Add media config for using environment monotonic timestamps (i.e. not UTC) in RTCStats constructor, and implemented the usage of the flag.

Bug: chromium:369369568
Change-Id: Ia93d048742c28af201164fe7b2152b791bb6d0b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363946
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#43156}
2024-10-03 09:07:17 +00:00
Danil Chapovalov
208491c8b9 Revert "Use ArrayView for byte stream parsing in VideoRtpDepacketizerH264"
This reverts commit 4b53e9af6126028497239b39321ec6740f8e2bc2.

Reason for revert: Bug: chromium:371054866

Original change's description:
> Use ArrayView for byte stream parsing in VideoRtpDepacketizerH264
>
>
> Bug: webrtc:42223344, webrtc:42225170
> Change-Id: Ia2025ab225499702c0abe47690742a9c0d6109b7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364380
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43147}

Bug: webrtc:42223344, webrtc:42225170, chromium:371054866
Change-Id: I5c0222add560622a6ce34622d80a4bf7f1fc3fae
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364560
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@{#43155}
2024-10-03 08:52:33 +00:00
Sergio Garcia Murillo
4b53e9af61 Use ArrayView for byte stream parsing in VideoRtpDepacketizerH264
Bug: webrtc:42223344, webrtc:42225170
Change-Id: Ia2025ab225499702c0abe47690742a9c0d6109b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364380
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43147}
2024-10-02 14:12:50 +00:00
Fanny Linderborg
4c675e3850 Use absl::get_if instead of absl::holds_alternative and absl::get
Bug: webrtc:358039777
Change-Id: I47efb3efe43cacee39d5d103915e49bdd6e20775
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364420
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43145}
2024-10-02 13:38:32 +00:00
Henrik Lundin
7dd164df7f Reland "Delete AcmReceiver"
This is a reland of commit 0d3dcc499767166b32a941abc9563e259ce1770f.

Downstream problems were resolved.

Original change's description:
> Delete AcmReceiver
>
> The code now uses NetEq directly instead of AcmReceiver.
>
> Bug: webrtc:14867
> Change-Id: I11c7e2ca00060ab15bba5ec67dfd92ec413196f6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364140
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43108}

Bug: webrtc:14867
Change-Id: Ic8d5c5ca62692fbc7caeaa76bf2e8c9c860b3ac5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364480
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43143}
2024-10-02 13:35:03 +00:00
Jakob Ivarsson
09c043a4bb Start counting NetEq stats after first packet is decoded.
A slight behavior change is that we only increment total samples received when GetAudio is successful.

Bug: webrtc:370424996
Change-Id: I8607418c179ca3bc22963b98792a9e8b9af2d451
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364220
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43139}
2024-10-02 10:50:30 +00:00
Fanny Linderborg
a49ab28fca Set CodecSpecific.FrameInstrumentationData in RtpFrameObject ctor
Bug: webrtc:358039777
Change-Id: Ib0a663f06b293c62a4eb0689b82b3bf919cff25f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364282
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43136}
2024-10-02 07:09:11 +00:00