Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: media/cast/net/rtcp/rtcp_builder.cc

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dcheng's comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/net/rtcp/rtcp_builder.h ('k') | media/cast/net/rtcp/rtcp_builder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/rtcp/rtcp_builder.cc
diff --git a/media/cast/net/rtcp/rtcp_builder.cc b/media/cast/net/rtcp/rtcp_builder.cc
index 03399e058b04db98749a0e4ebeb64936104de710..395d40aac6f39ba142e422eb5c7e0909dd9ffd77 100644
--- a/media/cast/net/rtcp/rtcp_builder.cc
+++ b/media/cast/net/rtcp/rtcp_builder.cc
@@ -207,12 +207,18 @@ void RtcpBuilder::AddRrtr(const RtcpReceiverReferenceTimeReport& rrtr) {
writer_.WriteU32(rrtr.ntp_fraction);
}
+void RtcpBuilder::AddPli(const RtcpPliMessage& pli_message) {
+ AddRtcpHeader(kPacketTypePayloadSpecific, 1);
+ writer_.WriteU32(local_ssrc_);
+ writer_.WriteU32(pli_message.remote_ssrc);
+}
+
void RtcpBuilder::AddCast(const RtcpCastMessage& cast,
base::TimeDelta target_delay) {
// See RTC 4585 Section 6.4 for application specific feedback messages.
AddRtcpHeader(kPacketTypePayloadSpecific, 15);
writer_.WriteU32(local_ssrc_); // Add our own SSRC.
- writer_.WriteU32(cast.media_ssrc); // Remote SSRC.
+ writer_.WriteU32(cast.remote_ssrc); // Remote SSRC.
writer_.WriteU32(kCast);
writer_.WriteU8(static_cast<uint8_t>(cast.ack_frame_id));
uint8_t* cast_loss_field_pos = reinterpret_cast<uint8_t*>(writer_.ptr());
@@ -268,7 +274,7 @@ void RtcpBuilder::AddCast(const RtcpCastMessage& cast,
}
}
VLOG_IF(1, !nack_string_builder.Empty())
- << "SSRC: " << cast.media_ssrc << ", ACK: " << cast.ack_frame_id
+ << "SSRC: " << cast.remote_ssrc << ", ACK: " << cast.ack_frame_id
<< ", NACK: " << nack_string_builder.GetString();
DCHECK_LE(number_of_loss_fields, kRtcpMaxCastLossFields);
*cast_loss_field_pos = static_cast<uint8_t>(number_of_loss_fields);
« no previous file with comments | « media/cast/net/rtcp/rtcp_builder.h ('k') | media/cast/net/rtcp/rtcp_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698