Adds flags indicating presence in allocation and feedback per packet.

This CL adds flags to the PacketOptions and PacktInfo struct that are
intended to be used to indicate if the packet belongs to a media stream
that is part of bitrate allocation as well as if it is included in
transport wide packet feedback.

This is part of a series of CLs that allows GoogCC to track sent bitrate
that is included in bitrate allocation but without transport feedback.

Bug: webrtc:9796
Change-Id: Icdf3e1e13d3f119574ee1b2c574f2d3329a7e303
Reviewed-on: https://webrtc-review.googlesource.com/c/104920
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25069}
This commit is contained in:
Sebastian Jansson 2018-10-09 18:27:57 +02:00 committed by Commit Bot
parent 30e2d6ee00
commit 0378997db3
7 changed files with 18 additions and 0 deletions

View File

@ -32,6 +32,8 @@ struct PacketOptions {
std::vector<uint8_t> 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 {

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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.

View File

@ -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);

View File

@ -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;