Skip to content

Commit

Permalink
Cast: Attach NTP to all receiver sent RTCP
Browse files Browse the repository at this point in the history
By attaching the NTP to all RTCP packets sent by the receiver, a smart
sender can seperate out old and new messages and make better decisions.

Review URL: https://codereview.chromium.org/179203006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254863 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
pwestin@chromium.org committed Mar 4, 2014
1 parent 0599b5f commit 866b961
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions media/cast/rtcp/rtcp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ void Rtcp::SendRtcpFromRtpReceiver(
transport::RtcpReportBlock report_block;
RtcpReceiverReferenceTimeReport rrtr;

// Attach our NTP to all RTCP packets; with this information a "smart" sender
// can make decisions based on how old the RTCP message is.
packet_type_flags |= RtcpSender::kRtcpRrtr;
ConvertTimeTicksToNtp(now, &rrtr.ntp_seconds, &rrtr.ntp_fraction);
SaveLastSentNtpTime(now, rrtr.ntp_seconds, rrtr.ntp_fraction);

if (cast_message) {
packet_type_flags |= RtcpSender::kRtcpCast;
}
Expand Down Expand Up @@ -272,10 +278,6 @@ void Rtcp::SendRtcpFromRtpReceiver(
} else {
report_block.delay_since_last_sr = 0;
}

packet_type_flags |= RtcpSender::kRtcpRrtr;
ConvertTimeTicksToNtp(now, &rrtr.ntp_seconds, &rrtr.ntp_fraction);
SaveLastSentNtpTime(now, rrtr.ntp_seconds, rrtr.ntp_fraction);
UpdateNextTimeToSendRtcp();
}
rtcp_sender_->SendRtcpFromRtpReceiver(
Expand Down

0 comments on commit 866b961

Please sign in to comment.