1507 Commits

Author SHA1 Message Date
Boris Tsirkin
dadb9f4643 Format /modules folder
Formatting done via:

git ls-files | grep -E '^modules\/.*\.(h|cc|mm)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I5154c8e290591a6a0599b53802eaf152038c5f47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373703
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43677}
2025-01-08 03:46:30 -08:00
Qiu Jianlin
abadbce1fa Update is_first_packet_in_frame flag in H.265 depacketizer
Follow H.265 spec section 7.4.2.4.4 to set is_first_packet_in_frame flag
in rtp header, to make sure we only set it to true when corresponding
NALU can be the first NALU in a frame.

Bug: chromium:384391181
Change-Id: I082c38513d9d213f8d354633539028b57777368f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372742
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@{#43651}
2025-01-03 05:07:21 -08:00
Per Kjellander
fab4992f3d Only notify NetworkLinkObserver if SSRC match known SSRC
There is one RTCP receiver per receive stream. Therefore, only handle a
received CongestionControlFeedback in the RTCP receiver corresponding to
the first SSRC in the report.

Bug: webrtc:42225697
Change-Id: I9bc0009cb6840cddeaca25f39c597bc2c13a3604
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372280
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43613}
2024-12-19 05:32:47 -08:00
Per Kjellander
776866774f Propagate desicion if RTP packet should be ECT(1) marked to socket
With this CL, the decision if an RTP packet should be sent as ect(1) is made in RtpControllerSend depending on if RFC 8888 has been negotiated and if CCFB is received with ECN enabled.
Since webrtc does not yet adapt to ECN feedback, packets are sent as ECT(1) until the first feedback is received.

Change-Id: Iddf63849328afbe54a7c8f921f2e8db134aeff6a
Bug: webrtc:42225697
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367388
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43609}
2024-12-19 01:59:49 -08:00
Takuto Ikuta
5c5bb5b099 add missing includes for the build with use_libcxx_modules
This is to fix build error when we set use_libcxx_modules=true in
chromium build.

Bug: chromium:40440396
Change-Id: Iad165a78a6920ccb858567d31fbe5e48d8a7b629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43574}
2024-12-16 01:47:31 -08:00
Danil Chapovalov
3e98919a6a Reland "Validate frame consistency when writing DependencyDescriptor"
This reverts commit 81aa059b85949001dabbedaaf99574dc6390882f.

Reason for revert: downstream tests fixed

Original change's description:
> Revert "Validate frame consistency when writing DependencyDescriptor"
>
> This reverts commit 200fd82771ae29d23b2be40194be674b3437f0ab.
>
> Reason for revert: breaks downstream
>
> Original change's description:
> > Validate frame consistency when writing DependencyDescriptor
> >
> > To write DependencyDescriptor frame properties should be consistent with
> > the FrameDependencyStructure.
> > Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
> > Thus DependencyDescriptorWriter should be more protective to avoid crashes.
> >
> > Bug: chromium:379282549
> > Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43551}
>
> Bug: chromium:379282549
> Change-Id: I7711756f774648cbb85c51b61424bb950c1d3775
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371420
> Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
> Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#43556}

Bug: chromium:379282549
Change-Id: I71ef363d710b7f28b298d11543e1c8ad6c884f15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371304
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43563}
2024-12-13 10:17:33 -08:00
Jeremy Leconte
81aa059b85 Revert "Validate frame consistency when writing DependencyDescriptor"
This reverts commit 200fd82771ae29d23b2be40194be674b3437f0ab.

Reason for revert: breaks downstream

Original change's description:
> Validate frame consistency when writing DependencyDescriptor
>
> To write DependencyDescriptor frame properties should be consistent with
> the FrameDependencyStructure.
> Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
> Thus DependencyDescriptorWriter should be more protective to avoid crashes.
>
> Bug: chromium:379282549
> Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43551}

Bug: chromium:379282549
Change-Id: I7711756f774648cbb85c51b61424bb950c1d3775
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371420
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43556}
2024-12-13 00:19:47 -08:00
Danil Chapovalov
200fd82771 Validate frame consistency when writing DependencyDescriptor
To write DependencyDescriptor frame properties should be consistent with
the FrameDependencyStructure.
Historically that was ensured by webrtc codec wrappers, but with with frame transform api interface there are now more ways to inject video frame for packetizing.
Thus DependencyDescriptorWriter should be more protective to avoid crashes.

Bug: chromium:379282549
Change-Id: I98f226ff09c32154e18888c8e811e7981567ad45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371301
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43551}
2024-12-12 08:54:04 -08:00
Per K
ae1ad04077 Add support for receiving congestion control messages to rtcp transceiver
Congestion control feedback messages follow RFC 8888.

BUG: webrtc:42225697
Change-Id: If7e55249ac479636c0bab5cbcf96e70c1976a51d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370161
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43486}
2024-12-03 16:55:20 +00:00
Harald Alvestrand
10c7d73688 Fix sign error in UMA for AbsCapture.Delta
Bug: webrtc:380712819
Change-Id: Icfb42f0455718058a54391e5a586f409cd28728d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370000
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43481}
2024-12-03 02:24:53 +00:00
Philipp Hancke
b0be928a50 Cleanup H264 packetization unit tests
improve consistency, formatting and style

BUG=None

Change-Id: Iad382d9a7194b0606c1aa9c7d264dfacf03cde1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369462
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43479}
2024-12-02 17:43:16 +00:00
Harald Alvestrand
56c5507ae3 Fix delta computation in abs-capture statistics
Previous computation assumed that local clock is UTC. It isn't.
Adding integration test for abs-capture stats.

Bug: webrtc:380712819
Change-Id: I054d61984cbd017b7ad04ab13e5a687eab89db69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369421
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43465}
2024-11-27 16:17:21 +00:00
Danil Chapovalov
e0a524b5e0 Add default constructor to relative units types
0 is natural default value for types that can be accumulated
Having default constructor simplify usage of these types in templated code.

Bug: None
Change-Id: If005c69018a2a11011bc789502fdbc600cad3278
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43460}
2024-11-26 17:59:08 +00:00
Harald Alvestrand
e9193d7031 Add histograms for Abs-Capture-Timestamp
Bug: webrtc:380712819
Change-Id: I5f56caffe33a257432551321f7c097c852b134dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368903
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43458}
2024-11-26 13:41:36 +00:00
Philipp Hancke
b7cb8fe75a h264: skip empty NAL units, do not reject them
BUG=webrtc:380291923

Change-Id: If05268bde2ac0c600dcef479c88ca54dce708dcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368893
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43451}
2024-11-26 03:55:09 +00:00
Olov Brändström
1b0371a54e Reduce the moving median window size in Remote ntp time estimator.
Too big median window will cause errors with large clock drifts, since we'll end up using old values for estimated clock drift.

If the window is too small, the remote clock offset estimation could be noisy or we could even end up using outliers as the offset estimation.

I will not claim that I choose the correct value, and I'm not sure how  to measure the quality of the remote clock offset estimations.

Bug: webrtc:379809147
Change-Id: Ib317548d3eec74105d468ef53830e12eb114df7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368580
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#43439}
2024-11-22 07:36:06 +00:00
Dor Hen
69cc695699 Comment unused variables in implemented functions 14\n
Bug: webrtc:370878648
Change-Id: I7c48313e64fafb8f23121e9bae1d50c3d32f7d07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366983
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43414}
2024-11-18 11:32:25 +00:00
Qiu Jianlin
faef5de87c Cleanup H.265 TODOs.
Cleanup some of the TODOs for H.265. They are either invalid or their handling should be merged with other codec types.

Bug: chromium:41480904
Change-Id: I76263354b1b87035e240d77283b21a9a26dcb45b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366044
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43359}
2024-11-05 14:06:18 +00:00
Jakob Ivarsson
7058da6e29 Rename PacketOptions.is_retransmit to is_media.
It is used to distinguish between audio/video packets and everything else (retransmit/padding/fec), so naming it is_media makes more sense.

This is a follow up to https://webrtc-review.googlesource.com/366644

Bug: b/375148360
Change-Id: Ia53f4d707ceb85f059688d86bc5dcc2d57908d88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366424
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43319}
2024-10-28 13:45:23 +00:00
Palak Agarwal
c4f61fbde3 Rename capture_time_identifier to presentation_timestamp
After landing this change, we can change the corresponding usage in
blink to start using presentation_timestamp as well and then delete
the remaining usage of capture_time_identifier.


Bug: webrtc:373365537
Change-Id: I0c4f2b6b3822df42d6e3387df2c243c3684d8a41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365640
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#43317}
2024-10-28 12:11:38 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
Philipp Hancke
949d3c9acf Reland "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
This reverts commit bdc669347c70160cd648f5cab7a417227d41d82a.

Reason for revert: AUDs will be taken into account now.
video_replay with the provided out.pcap and these options:
--codec H264 --input_file out.pcap --media_payload_type 102 --ssrc 40000
plays smoothly.

Original change's description:
> Revert "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
>
> This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.
>
> Reason for revert: Break assembling of hardware encoded h264 P frame on
> weak network condition.
>
> Original change's description:
> > h264: fix first_packet_in_frame logic for multislice in a single rtp packet
> >
> > a frame must be (or should be) first when it contains either SPS (but not just PPS),
> > is an IDR or is a slice with first_mb_in_slice == 0.
> >
> > Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
> > into a single RTP packet which can happen with small 320x196 frames
> >
> > BUG=webrtc:352379280,webrtc:346608838
> >
> > Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
> > 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@{#42652}
>
> Bug: webrtc:368335257
> Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#43062}

Bug: webrtc:368335257
Change-Id: Idfae2efc1ebd7b97a2f7ebbd9d1e8c7bf6fcc348
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363842
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43113}
2024-09-30 18:03:49 +00:00
Danil Chapovalov
8d4638f985 Delete deprecated variant of ReceiveStatistics::SetMaxReorderingThreshold
Fixed: webrtc:42220729
Change-Id: I87c08769d33746e40dcdbf213096fc9732f82a07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363962
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43095}
2024-09-27 14:43:42 +00:00
Danil Chapovalov
0af0c059f2 Delete deprecated RtpPacketHistory constructor
Bug: webrtc:362762208
Change-Id: I72b0f8b12b2282d9466271ae20dad5de44539af2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363863
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43093}
2024-09-27 11:01:56 +00:00
Fanny Linderborg
28d1a9a4de Write corruption detection header extension to last packet
Bug: webrtc:358039777
Change-Id: Iaa69310e361b51cb109a43cc46aed124af69bd97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363302
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@{#43084}
2024-09-26 11:38:22 +00:00
Ho Cheung
a8efbb223b [cleanup] Migrate absl::in_place to std::in_place
Self-explanatory.

Fixed: webrtc:342905193
Change-Id: I3cf1ec99ef6867bb33289977246725badf2bfcfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363360
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Ho Cheung <hocheung@chromium.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43071}
2024-09-23 16:21:45 +00:00
Mirko Bonadei
a8829eb5f3 macro cleanup: "(const override)" -> "(const, override)"
Bug: None
Change-Id: Iffd5db39b1a5ae70b403193b40054df04cf5600b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362800
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43065}
2024-09-22 18:30:29 +00:00
Gao Chun
bdc669347c Revert "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.

Reason for revert: Break assembling of hardware encoded h264 P frame on
weak network condition.

Original change's description:
> h264: fix first_packet_in_frame logic for multislice in a single rtp packet
>
> a frame must be (or should be) first when it contains either SPS (but not just PPS),
> is an IDR or is a slice with first_mb_in_slice == 0.
>
> Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
> into a single RTP packet which can happen with small 320x196 frames
>
> BUG=webrtc:352379280,webrtc:346608838
>
> Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
> 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@{#42652}

Bug: webrtc:368335257
Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43062}
2024-09-20 14:32:01 +00:00