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

Unified Diff: media/cast/video_receiver/video_receiver.cc

Issue 80383006: Cast: Forcing codec initialization on a designated thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review Created 7 years, 1 month 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/video_receiver/video_receiver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « media/cast/video_receiver/video_receiver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698