Commit graph

1444 commits

Author SHA1 Message Date
Jim Gustafson
49c96f3e79 Merge remote-tracking branch 'google/branch-heads/6478' 2024-06-21 16:31:45 -07:00
Jim Gustafson
c43adafcd5 Merge m123/6312 2024-06-12 22:25:35 -07:00
Philipp Hancke
c14a2cb9cc Add nonstandard x-google-per-layer-pli fmtp for enabling per-layer keyFrames in response to PLIs
which needs to be added to the remote codecs a=fmtp:

This also forces SimulcastCastEncoderAdapter to avoid issues with codecs that have native simulcast capability but do require synchronized keyframes.

This parameter allows for large-scale experimentation and A/B testing
whether the new behavior has advantages. It is to be considered
transitional and may be removed again in the future.

BUG=webrtc:10107

Change-Id: I81f496c987b2fed7ff3089efb746e7e89e89c033
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41805}
2024-05-03 10:59:22 -04:00
Danil Chapovalov
8a5f807313 Reland "h264: bail out early when failing to parse SPS/PPS ids"
This reverts commit e1607ed3a6.

Reason for revert: downstream project adjusted

Original change's description:
> Revert "h264: bail out early when failing to parse SPS/PPS ids"
>
> This reverts commit 4344eb713b.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > h264: bail out early when failing to parse SPS/PPS ids
> >
> > This currently gets caught later in the process by the H264 SPS/PPS
> > tracker but can be rejected explicitly here. The network observable
> > behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams
> >
> > BUG=webrtc:337076010
> >
> > Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Philipp Hancke <phancke@meta.com>
> > Cr-Commit-Position: refs/heads/main@{#42211}
>
> Bug: webrtc:337076010
> Change-Id: I15b815c69f1d25e41fb222d46359655242589fba
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349661
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42217}

Bug: webrtc:337076010
Change-Id: Ibe5a960b9b5fdf9a35e5dfffb47b78ade36b0cec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349700
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42223}
2024-05-03 11:33:45 +00:00
Mirko Bonadei
e1607ed3a6 Revert "h264: bail out early when failing to parse SPS/PPS ids"
This reverts commit 4344eb713b.

Reason for revert: Breaks downstream project.

Original change's description:
> h264: bail out early when failing to parse SPS/PPS ids
>
> This currently gets caught later in the process by the H264 SPS/PPS
> tracker but can be rejected explicitly here. The network observable
> behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams
>
> BUG=webrtc:337076010
>
> Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42211}

Bug: webrtc:337076010
Change-Id: I15b815c69f1d25e41fb222d46359655242589fba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42217}
2024-05-03 08:02:31 +00:00
Per K
363917a1dd Add support for receiving CongestionControlFeedback to RTCPReceiver
Support for parsing the packet is gated behind field trial
WebRTC-RFC8888CongestionControlFeedback/Enabled/.

Bug: webrtc:15368
Change-Id: Ib4478e821fe5a43510af5131543e7861cf54d901
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348664
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42215}
2024-05-02 21:01:38 +00:00
Philipp Hancke
4344eb713b h264: bail out early when failing to parse SPS/PPS ids
This currently gets caught later in the process by the H264 SPS/PPS
tracker but can be rejected explicitly here. The network observable
behavior should be similar and request a key frame after a 200ms delay, at least for entities that send such bad bitstreams

BUG=webrtc:337076010

Change-Id: I239c64efa7db631460ef9e9986d283335303df5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349060
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42211}
2024-05-02 16:15:18 +00:00
Philipp Hancke
acfd279a14 av1: make packetization generate more evenly sized packets
Implements a two-pass approach to packetization which creates
packets of an even size similar to RtpPacketizer::SplitAboutEqually.
This improves the bandwidth estimation.

The algorithm does a first pass with the existing packetizer, then
iterates through the resulting packet sizes and sums up the bytes left unused in each packet.
It then calculates a new maximum packet length as
  configured_max_packet_len - ((unused_bytes - packets + 1) / packets)
adjusts for the overhead and re-runs the packetization algorithm.

For example, a list of OBUs with sizes
  {1206, 1476, 1431}
currently gets packetized greedily as payload sizes
  {1200, 1200, 1200, 523}
With this change, it gets packetized as
  {1032, 1032, 1032, 1028}

This change is guarded by the field trial
  WebRTC-Video-AV1EvenPayloadSizes
which is acting as a rollout flag.

BUG=webrtc:15927

Co-authored-by: Shyam Sadhwani <shyamsadhwani@meta.com>
Change-Id: I4f0b3c27de6f06104908dd769c4dd1f34115712c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348100
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42203}
2024-04-30 15:46:06 +00:00
Jesús de Vicente Peña
3703b3500c Using Ntp times for the absolute send time.
Bug: webrtc:15930
Change-Id: Ie460ac6e3561efafeb11bf36735cb6f33bdfd8a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349162
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Lionel Koenig Gélas <lionelk@google.com>
Cr-Commit-Position: refs/heads/main@{#42183}
2024-04-26 12:59:09 +00:00
Jakob Ivarsson
00a8839d47 Allow source tracker to be called synchronously on a single thread.
Bug: None
Change-Id: I699c0c787d28fe79959e93b3e1eda2634c931cef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348840
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42154}
2024-04-23 14:31:46 +00:00
Danil Chapovalov
54dec3f3d7 Delete deprecated variants for parsing/building AudioLevelExtension
Bug: webrtc:15788
Change-Id: I37034b9b1daf7b26dd5e66156e71c63e2fb85b21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345520
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42152}
2024-04-23 12:57:51 +00:00
Per K
86298f7a84 Implementation of RFC 8888 TranportLayerFeedback RTCP packet
This cl adds an implementation of the RTCP feedback packet as specified in https://www.rfc-editor.org/rfc/rfc8888.html

Bug: webrtc:15368
Change-Id: I0b9a7fb15512ff9f9e721efd8e03ebe981a8d9bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347901
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42140}
2024-04-22 14:41:42 +00:00
Hyesung Kim
970b911f76 Fixed warning log generation for IRAP frames in H265 Aggregation Packet.
When an IRAP frame was present in the Aggregation Packet,
the control flow was incorrectly transferred to SPS parsing
due to ABSL_FALLTHROUGH_INTENDED within the IRAP case statement,
resulting in a parsing error and generating a warning log.
A break statement has been introduced to prevent this fallthrough.

Bug: webrtc:13485
Change-Id: I523fbf548f14b31eae7c41f607fe33572f094aac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346381
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#42132}
2024-04-22 01:03:48 +00:00
Per K
c793e46856 Cleanup TransportFeedbackObserver from RtpSenderEgress
TransportFeedbackObserver is thus unused from WebRTC except from
DEPRECATED_RtpSender

Change-Id: Ib308f5331a342a4ec4f7c7cfdf6f76c3c4c1807c
Bug: webrtc:15368
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344721
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42012}
2024-04-08 08:56:35 +00:00
Sergey Silkin
db36884e76 Reland "Mark frames with inter_layer_predicted=true as delta frames"
This is a reland of commit 7ae48c452a with  updated RtpVp9RefFinder

RtpVp9RefFinder relied on the fact that frames with (inter_pic_predicted=true && inter_layer_predicted=true) were marked as keyframes. Since this is not the case anymore, the related code paths in RtpVp9RefFinder have been deleted.

Calculation of gof_info_[] index for non-keyframes has been updated to account for that fact it is now possible to received multiple T0 frames belonging to the same temporal unit (we don't need to do "unwrapped_tl0 - 1" in this case).

Original change's description:
> Mark frames with inter_layer_predicted=true as delta frames
>
> As it is currently implemented, the VP9 depacketizer decides packet's frame type based on p_bit ("Inter-picture predicted layer frame"). p_bit is set to 0 for upper spatial layer frames of keyframe since they do not have temporal refs. This results in marking packets of upper spatial layer frames, and, eventually these frames, of SVC keyframes as "keyframe" while they are in fact delta frames.
>
> Normally spatial layer frames are merged into a superframe and the superframe is passed to decoder. But passing individual layers to a single decoder instance is a valid scenario too and is used in downstream projects. In this case, an upper layer frame marked as keyframe may cause decoder reset [2] and break decoding.
>
> This CL changes frame type decision logic in the VP9 depacketizer such that only packets with both P and D (inter-layer predicted) bits unset are considered as keyframe packets.
>
> When spatial layer frames are merged into a superframe in CombineAndDeleteFrames [1], frame type of the superframe is inferred from the lowest spatial layer frame.
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/frame_helpers.cc;l=53
>
> [2] https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc;l=209
>
> Bug: webrtc:15827
> Change-Id: Idc3445636f0eae0192dac998876fedec48628560
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343342
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41939}

Bug: webrtc:15827
Change-Id: Ic69b94989919cf6d353bceea85d0eba63bc500ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344144
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41985}
2024-04-02 18:59:58 +00:00
Per K
ff7a557f2e Add original SSRC to RtpPacketToSend and implement RtpPacketSendInfo::From method.
The purpose is to be able to create a RtpPacketSendInfo from Pacing and  RtpPacketSendInfo only.
This allow further refactoring where we directly in PacketRouter can notify BWE and early loss detection that a packet will be sent.
RtpPacketSendInfo::From is mostly added to be able to test conversion.


Bug: webrtc:15368
Change-Id: I5ebe2dc91d2eedf2c86e62c3f9738437082a49e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343766
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41961}
2024-03-25 10:20:44 +00:00
Sergey Silkin
426b5e7ea1 Revert "Mark frames with inter_layer_predicted=true as delta frames"
This reverts commit 7ae48c452a.

Reason for revert: breaks RtpVp9RefFinder

Original change's description:
> Mark frames with inter_layer_predicted=true as delta frames
>
> As it is currently implemented, the VP9 depacketizer decides packet's frame type based on p_bit ("Inter-picture predicted layer frame"). p_bit is set to 0 for upper spatial layer frames of keyframe since they do not have temporal refs. This results in marking packets of upper spatial layer frames, and, eventually these frames, of SVC keyframes as "keyframe" while they are in fact delta frames.
>
> Normally spatial layer frames are merged into a superframe and the superframe is passed to decoder. But passing individual layers to a single decoder instance is a valid scenario too and is used in downstream projects. In this case, an upper layer frame marked as keyframe may cause decoder reset [2] and break decoding.
>
> This CL changes frame type decision logic in the VP9 depacketizer such that only packets with both P and D (inter-layer predicted) bits unset are considered as keyframe packets.
>
> When spatial layer frames are merged into a superframe in CombineAndDeleteFrames [1], frame type of the superframe is inferred from the lowest spatial layer frame.
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/frame_helpers.cc;l=53
>
> [2] https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc;l=209
>
> Bug: webrtc:15827
> Change-Id: Idc3445636f0eae0192dac998876fedec48628560
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343342
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41939}

Bug: webrtc:15827
Change-Id: I697a057b8b3e88c07499f77c42f014da43cf1dc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343763
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41953}
2024-03-22 13:42:44 +00:00
Per K
faf398785b Split ModuleRtpRtcpImpl2::TrySendPacket into three subfunctions.
The purpose of these new methods are to allow creating a RTP packet with
sequence numbers that
can be inspected and is ensured to be sent if SendPacket is invoked.

virtual bool CanSendPacket(const RtpPacketToSend& packet) const = 0;
virtual void AssignSequenceNumber(RtpPacketToSend& packet) = 0;
virtual void SendPacket(std::unique_ptr<RtpPacketToSend> packet,
                        const PacedPacketInfo& pacing_info) = 0;

Bug: webrtc:15368
Change-Id: I671e737575e15328e796aa98761a4d540c5812d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343785
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41951}
2024-03-22 12:37:24 +00:00
Per K
ce2b49552e Set webrtc::PacketOptions.packet_id from
RtpPacketToSend::transport_sequence_number

packed_id is set to be 64 bit to align with rtc::PacketOptions.
packet_id is only set to RtpPacketToSend::transport_sequence_number if
TransportSequenceNumber header extension is not used in order to not
change current behaviour.

Bug: webrtc:15368
Change-Id: Ia532714226421422bdb292f8dd34b175560e9dc6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344160
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41950}
2024-03-22 11:56:57 +00:00
Per K
1cb32aa550 Add property RtpPacketToSend::transport_sequence_number()
And move writing of the header extension from PacketRouter to
RtpSenderEgress::SendPacket.

Bug: webrtc:15368
Change-Id: Ieb18af4bc20115bf02d37e1f9a815a5c120975a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343786
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41949}
2024-03-22 10:20:27 +00:00
Joachim Reiersen
5075cb4a60 Expose AudioLevel as an absl::optional struct in api/rtp_headers.h
Start migrating away from `hasAudioLevel`, `voiceActivity`, `audioLevel` fields in RTPHeaderExtension and switch usages to a more modern absl::optional<AudioLevel> accessor instead.

The old fields are preserved for compatibility with downstream projects, but will be removed in the future.

Bug: webrtc:15788
Change-Id: I76599124fd68dd4d449f850df3b9814d6a002f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41947}
2024-03-22 10:07:47 +00:00
Sergey Silkin
7ae48c452a Mark frames with inter_layer_predicted=true as delta frames
As it is currently implemented, the VP9 depacketizer decides packet's frame type based on p_bit ("Inter-picture predicted layer frame"). p_bit is set to 0 for upper spatial layer frames of keyframe since they do not have temporal refs. This results in marking packets of upper spatial layer frames, and, eventually these frames, of SVC keyframes as "keyframe" while they are in fact delta frames.

Normally spatial layer frames are merged into a superframe and the superframe is passed to decoder. But passing individual layers to a single decoder instance is a valid scenario too and is used in downstream projects. In this case, an upper layer frame marked as keyframe may cause decoder reset [2] and break decoding.

This CL changes frame type decision logic in the VP9 depacketizer such that only packets with both P and D (inter-layer predicted) bits unset are considered as keyframe packets.

When spatial layer frames are merged into a superframe in CombineAndDeleteFrames [1], frame type of the superframe is inferred from the lowest spatial layer frame.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/frame_helpers.cc;l=53

[2] https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc;l=209

Bug: webrtc:15827
Change-Id: Idc3445636f0eae0192dac998876fedec48628560
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343342
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41939}
2024-03-21 11:47:36 +00:00
Per K
776c1a1a86 Propagate ECN to RtpPacketReceived
Bug: webrtc:15368
Change-Id: Ie2d982a9172759a65f7f7225eeddd64cfa82490d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41903}
2024-03-15 08:58:28 +00:00
Evan Shrubsole
ed050bf253 Remove TRACE_ASYNC without matching TRACE_BEGIN in rtc_sender_video
This seems to confuse perfetto, and the data ends up on its own track
and the end event is just ignored. As it was invalid, I am assuming it
is not used, and can be simply removed.

#rtc_fixit

Bug: webrtc:15867
Change-Id: I31a814f6c2147c3ce534726bf9046a79369b9eb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342761
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#41896}
2024-03-13 11:59:58 +00:00
Evan Shrubsole
b8abf5199a Remove TRACE_ASYNC without matching TRACE_BEGIN in rtc_sender_audio
This seems to confuse perfetto, and the data ends up on its own track
and the end event is just ignored. As it was invalid, I am assuming it
is not used, and can be simply removed.

#rtc_fixit


Bug: webrtc:15867
Change-Id: I77e59adcd35c51911474446a5f92505bf6b860f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342780
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#41892}
2024-03-13 09:45:57 +00:00
Danil Chapovalov
d055f77276 Delete legacy name AudioLevel in favor of the AudioLevelExtension
AudioLevel name was deprecated two weeks ago.

Bug: webrtc:15788
Change-Id: Idb26ab6ea701bcbceeda51640d521b78fa0d8162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341264
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41868}
2024-03-07 12:49:27 +00:00
philipel
5ace0710bf Remove unused PacketOptions::additional_data.
Bug: none
Change-Id: I642ad5fde070d7c9c708d99ec9a91b28e294d11e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341960
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41863}
2024-03-06 11:17:52 +00:00
Danil Chapovalov
91ebd5fd12 Add missing absl::optional includes
Bug: None
Change-Id: I4abece77b021a866175253cbb2bd212ff618910c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341022
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41813}
2024-02-26 18:21:16 +00:00
Markus Handell
97df932ecc Remove multiplex codec.
The feature isn't in use by Google and has proven to contain security
issues. It's time to remove it.

Bug: b/324864439
Change-Id: I80344eb2f2060469d2d69a54dc4519fdd02ab4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340324
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41808}
2024-02-26 11:26:04 +00:00
Philipp Hancke
7c5f9cf47f Add nonstandard x-google-per-layer-pli fmtp for enabling per-layer keyFrames in response to PLIs
which needs to be added to the remote codecs a=fmtp:

This also forces SimulcastCastEncoderAdapter to avoid issues with codecs that have native simulcast capability but do require synchronized keyframes.

This parameter allows for large-scale experimentation and A/B testing
whether the new behavior has advantages. It is to be considered
transitional and may be removed again in the future.

BUG=webrtc:10107

Change-Id: I81f496c987b2fed7ff3089efb746e7e89e89c033
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41805}
2024-02-26 07:11:45 +00:00
Joachim Reiersen
4a97488714 Rename AudioLevel to AudioLevelExtension in rtp_header_extensions.h
To prepare for a new AudioLevel struct to be added to the public WebRTC API, rename the internal RTP extension reader/writer class to AudioLevelExtension. A temporary alias is provided to avoid breaking downstream projects.

Bug: webrtc:15788
Change-Id: Ie231668f25932fd9b539229114128b1d0b949a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339887
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41787}
2024-02-22 23:12:52 +00:00
Danil Chapovalov
b2f827cb79 Remove extra trait to read only mandatory part of the dependency descriptor
Same can be achieved by having multiple Parse functions in the same
RtpDependencyDescriptorExtension trait

Bug: None
Change-Id: I4eab0001d1ffff631a9d70fafde13e51f5c6ce36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340320
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41786}
2024-02-22 16:35:09 +00:00
Jianjun Zhu
41c44cde41 Add some comments for H265 RTP depacketizer.
This CL helps readers to understand which part of the spec
VideoRtpDepacketizerH265 implements.

Bug: webrtc:13485
Change-Id: Ie78a6ce781e6af559d59b1b07ce2854115368a86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340008
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41768}
2024-02-20 12:22:41 +00:00
Jianjun Zhu
dba3fd6c1b Correctly mark video frame type for FU packets.
Mark FU packets with type between kBlaWLp and kRsvIrapVcl23 as key frames.
This behavior aligns with AP and single NALU.

Bug: webrtc:13485
Change-Id: I51762e89ebb4829b50524d9f5476f2d5d9c093f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338860
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41764}
2024-02-19 16:20:46 +00:00
Jim Gustafson
c37ca3fc86 Merge branch m122 2024-02-14 22:44:28 -08:00
qwu16
f43e8ebab9 Add RTP depacketizer for H265
1. Depacketize single nalu packet/AP/FU

2. Insert start code before each nalu

Bug: webrtc:13485
Change-Id: I8346f9c31e61e5d3c2c7e1bf5fdaae4018a1ff78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325660
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41628}
2024-01-29 12:00:19 +00:00
Tony Herre
9c6874607a Consolidate encoded transform mocks into api/test/
Includes removing the duplicate MockTransformableAudioFrame definition
in test/ in favour of the existing one in api/test/

Bug: webrtc:15802
Change-Id: Ib5f86b8b2095dd4e580cd9ff0038134f8a43cd93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336340
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41622}
2024-01-26 12:46:34 +00:00
Jim Gustafson
6e5158df93 m120 merge fixes
- Use worker_thread TaskQueue for channel operations
- Fix use of deprecated DNS resolver
- Restore quantization of audio levels
- Simplify crypto options change
- Move channel blocking operations to pc
- Sync opus for merge
2024-01-24 09:14:46 -08:00
Erik Språng
6a992129fb Tighten som DCHECKs to CHECKs in VP9 packetization.
Bug: chromium:1518991, chromium:1518994
Change-Id: I47f68ba6aaf4874fd952332bf213e3a1e0389268
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335241
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41580}
2024-01-19 16:58:09 +00:00
philipel
7aff4d1a40 Stash and retry packets that are waiting for the dependency descriptor template structure.
Bug: b/317178411
Change-Id: Idf4d0eb9740753ba587ec81c1071cb25fb42c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334646
Auto-Submit: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41554}
2024-01-18 09:22:10 +00:00
Jim Gustafson
3d44a9e3b5 Merge branch m120 2024-01-17 12:11:58 -08:00
Danil Chapovalov
18d1d0f793 Fix perfect forwarding in RtpPacket::GetExtension
Thus allow to pass output parameter by reference.

Bug: None
Change-Id: I64821caf72875efee62d6cfc90691070dceba775
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334644
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41542}
2024-01-17 11:16:49 +00:00
Philipp Hancke
bb0044eb90 add VP8/VP9 packetization fuzzers
and ensure consistent behavior on empty input.

BUG=webrtc:15755

Change-Id: Id70ab5d55251b4dd10eed8ab67ea8e75545a7a8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332740
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41502}
2024-01-10 14:36:46 +00:00
Philipp Hancke
5d091cec5d Add H264 packetizer fuzzer
BUG=webrtc:15755

Change-Id: I384fbdfa3a2aea8faaf53eb161cecc2c8639401d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41487}
2024-01-09 13:32:42 +00:00
Danil Chapovalov
8a74636d46 In ReceiveStatistics fix a signed integer overflow undefined behavior
Bug: b/318332290
Change-Id: I279dcaf8c9cb801482f0e29343304c854af78792
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333060
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41463}
2024-01-02 12:20:34 +00:00
Per K
b9ba02c025 Prioritize audio resend before video resend and implement TTL.
Adds separate priorities for audio and video retranmission.
Done by adding an original type to RtpPacketToSend.

Add possiblity to set TTL for audio nack, video nack and video packet separately.
Oldest packet for these types are dropped when a new packet of that type is pushed to the pacer, or when the pacer switch current priority type to that priority.

Effect is that:
   -pacer queue does not grow unlimited for these types if a TTL has been set.
   -an old packet is not sent.

Bug: webrtc:15740
Change-Id: I38718bc570aebca54eacbded69824905f3694f41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331823
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41414}
2023-12-19 13:52:11 +00:00
Tony Herre
3e801c3208 Allow RTP retransmission for cloned encoded Video Frames
Fix the unintended disabling of RTP retransmissions for cloned encoded
frames, caused by passing an infinite "expected_retransmission_time".
Instead use a constant 10ms for now. For frames encoded locally, this is
set from an estimate of the RTT, but we currently don't have access to
that here (TODO added to pipe it through)

If an integration is cloning and then sending frames it received, it's
almost certainly resending received media to other peers on a local
network, so 10ms is a fair upperbound.

Tested locally with Chrome on Mac, configuring packet drops & observing
on chrome://webrtc-internals that retransmission packets are now sent.

Bug: chromium:1512631
Change-Id: I2483415dc7e0079f8a7b66f6607f4907698514c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41405}
2023-12-18 17:50:14 +00:00
Danil Chapovalov
ca8353648d Rewrite tmmbr timeout check to avoid using negative Timestamp
Bug: chromium:1511139
Change-Id: I7f65fd07412a6c32c5633f8ef6655ba506fe5407
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331822
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41404}
2023-12-18 16:48:07 +00:00
Tony Herre
5f3ac43551 Ensure cloning and then sending audio encoded frames propagates CSRCs
Bug: chromium:1508337
Change-Id: I9f28fc0958d28bc97f9378a46fbec3e45148736f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330260
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41337}
2023-12-07 15:09:01 +00:00
Per K
f1df16ceea Per default enable WebRTC-PaddingMode-RecentLargePacket
This means that RtpPacketHistory::PaddingMode::kRecentLargePacket is
used per default.

Bug: webrtc:15201, b/284281602
Change-Id: If8feb66105a9b1e13ae4cb28a44a74c8839b72e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41215}
2023-11-22 17:43:43 +00:00