diff --git a/api/call/transport.h b/api/call/transport.h index 18d22705cd..32e5ddf874 100644 --- a/api/call/transport.h +++ b/api/call/transport.h @@ -32,6 +32,8 @@ struct PacketOptions { std::vector application_data; // Whether this is a retransmission of an earlier packet. bool is_retransmit = false; + bool included_in_feedback = false; + bool included_in_allocation = false; }; class Transport { diff --git a/call/degraded_call.cc b/call/degraded_call.cc index 353fe4c716..e02a7f9c8d 100644 --- a/call/degraded_call.cc +++ b/call/degraded_call.cc @@ -183,6 +183,8 @@ bool DegradedCall::SendRtp(const uint8_t* packet, rtc::SentPacket sent_packet; sent_packet.packet_id = options.packet_id; sent_packet.send_time_ms = clock_->TimeInMilliseconds(); + sent_packet.info.included_in_feedback = options.included_in_feedback; + sent_packet.info.included_in_allocation = options.included_in_allocation; sent_packet.info.packet_size_bytes = length; sent_packet.info.packet_type = rtc::PacketType::kData; call_->OnSentPacket(sent_packet); diff --git a/media/engine/webrtcvideoengine.cc b/media/engine/webrtcvideoengine.cc index d9596152c2..70468a8c86 100644 --- a/media/engine/webrtcvideoengine.cc +++ b/media/engine/webrtcvideoengine.cc @@ -1479,6 +1479,10 @@ bool WebRtcVideoChannel::SendRtp(const uint8_t* data, if (DscpEnabled()) { rtc_options.dscp = PreferredDscp(); } + rtc_options.info_signaled_after_sent.included_in_feedback = + options.included_in_feedback; + rtc_options.info_signaled_after_sent.included_in_allocation = + options.included_in_allocation; return MediaChannel::SendPacket(&packet, rtc_options); } diff --git a/media/engine/webrtcvoiceengine.h b/media/engine/webrtcvoiceengine.h index bedede1248..b39642a1d3 100644 --- a/media/engine/webrtcvoiceengine.h +++ b/media/engine/webrtcvoiceengine.h @@ -218,6 +218,10 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, if (DscpEnabled()) { rtc_options.dscp = PreferredDscp(); } + rtc_options.info_signaled_after_sent.included_in_feedback = + options.included_in_feedback; + rtc_options.info_signaled_after_sent.included_in_allocation = + options.included_in_allocation; return VoiceMediaChannel::SendPacket(&packet, rtc_options); } diff --git a/rtc_base/socket.h b/rtc_base/socket.h index b8290bb139..2a3d61d573 100644 --- a/rtc_base/socket.h +++ b/rtc_base/socket.h @@ -145,6 +145,8 @@ struct PacketInfo { PacketInfo(const PacketInfo& info); ~PacketInfo(); + bool included_in_feedback; + bool included_in_allocation; PacketType packet_type = PacketType::kUnknown; PacketInfoProtocolType protocol = PacketInfoProtocolType::kUnknown; // A unique id assigned by the network manager, and absl::nullopt if not set. diff --git a/test/direct_transport.cc b/test/direct_transport.cc index 6aa8c9158f..fd7369171a 100644 --- a/test/direct_transport.cc +++ b/test/direct_transport.cc @@ -72,6 +72,8 @@ bool DirectTransport::SendRtp(const uint8_t* data, if (send_call_) { rtc::SentPacket sent_packet(options.packet_id, clock_->TimeInMilliseconds()); + sent_packet.info.included_in_feedback = options.included_in_feedback; + sent_packet.info.included_in_allocation = options.included_in_allocation; sent_packet.info.packet_size_bytes = length; sent_packet.info.packet_type = rtc::PacketType::kData; send_call_->OnSentPacket(sent_packet); diff --git a/test/scenario/network_node.cc b/test/scenario/network_node.cc index ec841091d9..87fc32a5d5 100644 --- a/test/scenario/network_node.cc +++ b/test/scenario/network_node.cc @@ -187,6 +187,8 @@ bool NetworkNodeTransport::SendRtp(const uint8_t* packet, int64_t send_time_ms = sender_->clock_->TimeInMilliseconds(); rtc::SentPacket sent_packet; sent_packet.packet_id = options.packet_id; + sent_packet.info.included_in_feedback = options.included_in_feedback; + sent_packet.info.included_in_allocation = options.included_in_allocation; sent_packet.send_time_ms = send_time_ms; sent_packet.info.packet_size_bytes = length; sent_packet.info.packet_type = rtc::PacketType::kData;