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

Unified Diff: media/cast/video_receiver/video_receiver.cc

Issue 192843002: Cast:Adding signaling and infrastructure for adjustable delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates Created 6 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
Index: media/cast/video_receiver/video_receiver.cc
diff --git a/media/cast/video_receiver/video_receiver.cc b/media/cast/video_receiver/video_receiver.cc
index 7bfd0aa389b31c9f5878cafd85c5beb0d0b7203f..7b1a7002f25ceb2db8bd8ac2fa34bae4ae1594f9 100644
--- a/media/cast/video_receiver/video_receiver.cc
+++ b/media/cast/video_receiver/video_receiver.cc
@@ -90,7 +90,8 @@ class LocalRtpReceiverStatistics : public RtpReceiverStatistics {
VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment,
const VideoReceiverConfig& video_config,
- transport::PacedPacketSender* const packet_sender)
+ transport::PacedPacketSender* const packet_sender,
+ const SetTargetDelayCallback& target_delay_cb)
: cast_environment_(cast_environment),
event_subscriber_(kReceiverRtcpEventHistorySize,
ReceiverRtcpEventSubscriber::kVideoEventSubscriber),
@@ -110,6 +111,7 @@ VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment,
decryptor_(),
time_incoming_packet_updated_(false),
incoming_rtp_timestamp_(0),
+ target_delay_cb_(target_delay_cb),
weak_factory_(this) {
int max_unacked_frames =
video_config.rtp_max_delay_ms * video_config.max_frame_rate / 1000;
@@ -138,6 +140,8 @@ VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment,
video_config.feedback_ssrc,
video_config.incoming_ssrc,
video_config.rtcp_c_name));
+ // Set the target delay that will be conveyed to the sender.
+ rtcp_->SetTargetDelay(target_delay_delta_);
cast_environment_->Logging()->AddRawEventSubscriber(&event_subscriber_);
memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_));
}
@@ -520,5 +524,11 @@ void VideoReceiver::SendNextRtcpReport() {
ScheduleNextRtcpReport();
}
+void VideoReceiver::UpdateTargetDelay() {
+ NOTIMPLEMENTED();
+ rtcp_->SetTargetDelay(target_delay_delta_);
+ target_delay_cb_.Run(target_delay_delta_);
+}
+
} // namespace cast
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698