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

Unified Diff: media/tools/player_wtl/movie.cc

Issue 6686061: PipelineError is dead. Long live PipelineStatus! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responses to 2nd CR Created 9 years, 9 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/filters/file_data_source_factory.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/player_wtl/movie.cc
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 042d1f40f5678df938551268b00a3dc0d59c676b..2c705efebdae6a6248fefbdcecf1a6c0eb7530dc 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -84,14 +84,13 @@ bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
collection->AddVideoRenderer(video_renderer);
// Create and start our pipeline.
- pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)), NULL);
- while (true) {
- base::PlatformThread::Sleep(100);
- if (pipeline_->IsInitialized())
- break;
- if (pipeline_->GetError() != media::PIPELINE_OK)
- return false;
- }
+ media::PipelineStatusNotification note;
+ pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)),
+ note.Callback());
+ // Wait until the pipeline is fully initialized.
+ note.Wait();
+ if (note.status() != PIPELINE_OK)
+ return false;
pipeline_->SetPlaybackRate(play_rate_);
return true;
}
« no previous file with comments | « media/filters/file_data_source_factory.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698