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

Side by Side Diff: media/cast/cast_sender_impl.cc

Issue 562653004: Cast: First stab at implementing adaptive latency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/cast/cast_config.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/cast/cast_config.cc ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698