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

Unified Diff: chromecast/media/cma/filters/cma_renderer.cc

Issue 1125033003: Chromecast: Cma should has_audio/video after initialization finishes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/filters/cma_renderer.cc
diff --git a/chromecast/media/cma/filters/cma_renderer.cc b/chromecast/media/cma/filters/cma_renderer.cc
index 0de06343e5e2546e97bb77d08a929e10e82e6a09..b8e7b42ba9a025ad69e8b409c5e88a41bdd1c97f 100644
--- a/chromecast/media/cma/filters/cma_renderer.cc
+++ b/chromecast/media/cma/filters/cma_renderer.cc
@@ -263,7 +263,6 @@ void CmaRenderer::InitializeAudioPipeline() {
if (config.codec() == ::media::kCodecAAC)
stream->EnableBitstreamConverter();
- has_audio_ = true;
media_pipeline_->InitializeAudio(
config, frame_provider.Pass(), audio_initialization_done_cb);
}
@@ -279,10 +278,10 @@ void CmaRenderer::OnAudioPipelineInitializeDone(
DCHECK_EQ(state_, kUninitialized) << state_;
DCHECK(!init_cb_.is_null());
if (status != ::media::PIPELINE_OK) {
- has_audio_ = false;
base::ResetAndReturn(&init_cb_).Run(status);
return;
}
+ has_audio_ = true;
InitializeVideoPipeline();
}
@@ -327,7 +326,6 @@ void CmaRenderer::InitializeVideoPipeline() {
initial_natural_size_ = config.natural_size();
- has_video_ = true;
media_pipeline_->InitializeVideo(
config,
frame_provider.Pass(),
@@ -345,10 +343,10 @@ void CmaRenderer::OnVideoPipelineInitializeDone(
DCHECK_EQ(state_, kUninitialized) << state_;
DCHECK(!init_cb_.is_null());
if (status != ::media::PIPELINE_OK) {
- has_video_ = false;
base::ResetAndReturn(&init_cb_).Run(status);
return;
}
+ has_video_ = true;
CompleteStateTransition(kFlushed);
base::ResetAndReturn(&init_cb_).Run(::media::PIPELINE_OK);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698