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

Unified Diff: media/cast/cast_sender_impl.cc

Issue 493823002: Implement adaptive target delay extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicit masking Created 6 years, 4 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/cast_sender_impl.h ('k') | media/cast/net/cast_transport_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_sender_impl.cc
diff --git a/media/cast/cast_sender_impl.cc b/media/cast/cast_sender_impl.cc
index 9a4ef3105a5a1f3314f4a4671836aaf59a52acfe..19a054f513f99cfe4639aa7d8e1ebd8e07057cb1 100644
--- a/media/cast/cast_sender_impl.cc
+++ b/media/cast/cast_sender_impl.cc
@@ -110,6 +110,10 @@ void CastSenderImpl::InitializeAudio(
new LocalAudioFrameInput(cast_environment_, audio_sender_->AsWeakPtr());
}
cast_initialization_cb.Run(status);
+ if (video_sender_) {
+ DCHECK(audio_sender_->GetTargetPlayoutDelay() ==
+ video_sender_->GetTargetPlayoutDelay());
+ }
}
void CastSenderImpl::InitializeVideo(
@@ -136,6 +140,10 @@ void CastSenderImpl::InitializeVideo(
new LocalVideoFrameInput(cast_environment_, video_sender_->AsWeakPtr());
}
cast_initialization_cb.Run(status);
+ if (audio_sender_) {
+ DCHECK(audio_sender_->GetTargetPlayoutDelay() ==
+ video_sender_->GetTargetPlayoutDelay());
+ }
}
CastSenderImpl::~CastSenderImpl() {
@@ -150,5 +158,17 @@ scoped_refptr<VideoFrameInput> CastSenderImpl::video_frame_input() {
return video_frame_input_;
}
+void CastSenderImpl::SetTargetPlayoutDelay(
+ base::TimeDelta new_target_playout_delay) {
+ VLOG(1) << "CastSenderImpl@" << this << "::SetTargetPlayoutDelay("
+ << new_target_playout_delay.InMilliseconds() << " ms)";
+ if (audio_sender_) {
+ audio_sender_->SetTargetPlayoutDelay(new_target_playout_delay);
+ }
+ if (video_sender_) {
+ video_sender_->SetTargetPlayoutDelay(new_target_playout_delay);
+ }
+}
+
} // namespace cast
} // namespace media
« no previous file with comments | « media/cast/cast_sender_impl.h ('k') | media/cast/net/cast_transport_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698