OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/cast_sender_impl.h" | 5 #include "media/cast/cast_sender_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 VLOG(1) << "CastSenderImpl@" << this << "::InitializeVideo()"; | 127 VLOG(1) << "CastSenderImpl@" << this << "::InitializeVideo()"; |
128 | 128 |
129 video_sender_.reset(new VideoSender( | 129 video_sender_.reset(new VideoSender( |
130 cast_environment_, | 130 cast_environment_, |
131 video_config, | 131 video_config, |
132 base::Bind(&CastSenderImpl::OnVideoInitialized, | 132 base::Bind(&CastSenderImpl::OnVideoInitialized, |
133 weak_factory_.GetWeakPtr(), cast_initialization_cb), | 133 weak_factory_.GetWeakPtr(), cast_initialization_cb), |
134 create_vea_cb, | 134 create_vea_cb, |
135 create_video_encode_mem_cb, | 135 create_video_encode_mem_cb, |
136 transport_sender_)); | 136 transport_sender_, |
| 137 base::Bind(&CastSenderImpl::SetTargetPlayoutDelay, |
| 138 weak_factory_.GetWeakPtr()))); |
137 if (audio_sender_) { | 139 if (audio_sender_) { |
138 DCHECK(audio_sender_->GetTargetPlayoutDelay() == | 140 DCHECK(audio_sender_->GetTargetPlayoutDelay() == |
139 video_sender_->GetTargetPlayoutDelay()); | 141 video_sender_->GetTargetPlayoutDelay()); |
140 } | 142 } |
141 } | 143 } |
142 | 144 |
143 CastSenderImpl::~CastSenderImpl() { | 145 CastSenderImpl::~CastSenderImpl() { |
144 VLOG(1) << "CastSenderImpl@" << this << "::~CastSenderImpl()"; | 146 VLOG(1) << "CastSenderImpl@" << this << "::~CastSenderImpl()"; |
145 } | 147 } |
146 | 148 |
(...skipping 21 matching lines...) Expand all Loading... |
168 const CastInitializationCallback& initialization_cb, | 170 const CastInitializationCallback& initialization_cb, |
169 media::cast::CastInitializationStatus result) { | 171 media::cast::CastInitializationStatus result) { |
170 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 172 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
171 video_frame_input_ = | 173 video_frame_input_ = |
172 new LocalVideoFrameInput(cast_environment_, video_sender_->AsWeakPtr()); | 174 new LocalVideoFrameInput(cast_environment_, video_sender_->AsWeakPtr()); |
173 initialization_cb.Run(result); | 175 initialization_cb.Run(result); |
174 } | 176 } |
175 | 177 |
176 } // namespace cast | 178 } // namespace cast |
177 } // namespace media | 179 } // namespace media |
OLD | NEW |