Chromium Code Reviews| 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() { |