Chromium Code Reviews| Index: media/cast/video_receiver/video_receiver.cc |
| diff --git a/media/cast/video_receiver/video_receiver.cc b/media/cast/video_receiver/video_receiver.cc |
| index c637d7a97c6d23fb1eac4f971f1c9de55610cee5..30c7cb13f085c76b48b02b8035b98569afa16a99 100644 |
| --- a/media/cast/video_receiver/video_receiver.cc |
| +++ b/media/cast/video_receiver/video_receiver.cc |
| @@ -124,6 +124,9 @@ VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, |
| max_unacked_frames)); |
| if (!video_config.use_external_decoder) { |
| video_decoder_.reset(new VideoDecoder(video_config, cast_environment)); |
| + cast_environment_->PostTask(CastEnvironment::VIDEO_DECODER, FROM_HERE, |
|
pwestin
2013/11/21 21:45:38
we can move it all the way into the video_decoder;
mikhal
2013/11/22 22:02:42
Done.
|
| + base::Bind(&VideoReceiver::InitDecoderThread, |
| + weak_factory_.GetWeakPtr())); |
| } |
| rtcp_.reset( |
| @@ -147,6 +150,11 @@ void VideoReceiver::InitializeTimers() { |
| ScheduleNextCastMessage(); |
| } |
| +void VideoReceiver::InitDecoderThread() { |
| + DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::VIDEO_DECODER)); |
| + video_decoder_->InitDecoder(); |
| +} |
| + |
| void VideoReceiver::GetRawVideoFrame( |
| const VideoFrameDecodedCallback& callback) { |
| DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |