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

Unified Diff: media/cast/cast_sender_impl.cc

Issue 314593002: [Cast] Cleanup: Remove TransportXXXXXSender, an unnecessary layer of indirection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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.gyp ('k') | media/cast/transport/cast_transport_sender.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 2bcad36ccee0e2f2bcf5738235b4a4e28726b320..53e1298a7748be2769f96a8f591097f54a7a4de6 100644
--- a/media/cast/cast_sender_impl.cc
+++ b/media/cast/cast_sender_impl.cc
@@ -100,8 +100,7 @@ void CastSenderImpl::InitializeAudio(
audio_sender_.reset(
new AudioSender(cast_environment_, audio_config, transport_sender_));
- CastInitializationStatus status = audio_sender_->InitializationResult();
-
+ const CastInitializationStatus status = audio_sender_->InitializationResult();
if (status == STATUS_AUDIO_INITIALIZED) {
ssrc_of_audio_sender_ = audio_config.incoming_feedback_ssrc;
audio_frame_input_ =
@@ -118,18 +117,20 @@ void CastSenderImpl::InitializeVideo(
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
CHECK(video_config.use_external_encoder ||
cast_environment_->HasVideoThread());
- VLOG(1) << "CastSender::ctor";
Alpha Left Google 2014/06/03 18:48:35 Hey please don't remove this. It's useful for debu
miu 2014/06/03 19:57:50 Done. I also "improved" all the VLOGs so that one
video_sender_.reset(new VideoSender(cast_environment_,
video_config,
create_vea_cb,
create_video_encode_mem_cb,
- cast_initialization_cb,
transport_sender_));
- ssrc_of_video_sender_ = video_config.incoming_feedback_ssrc;
- video_frame_input_ =
- new LocalVideoFrameInput(cast_environment_, video_sender_->AsWeakPtr());
+ const CastInitializationStatus status = video_sender_->InitializationResult();
+ if (status == STATUS_VIDEO_INITIALIZED) {
+ ssrc_of_video_sender_ = video_config.incoming_feedback_ssrc;
+ video_frame_input_ =
+ new LocalVideoFrameInput(cast_environment_, video_sender_->AsWeakPtr());
+ }
+ cast_initialization_cb.Run(status);
}
CastSenderImpl::~CastSenderImpl() {
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/transport/cast_transport_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698