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

Unified Diff: media/player/movie.cc

Issue 155338: Implemented injected message loops for PipelineImpl. (Closed)
Patch Set: Merged with git-svn Created 11 years, 5 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/player/movie.h ('k') | webkit/glue/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/player/movie.cc
diff --git a/media/player/movie.cc b/media/player/movie.cc
index e37a497a5d62ba896bb971ff6c9d23ca91d0c8c4..2bb4001423a773dabe10e0727a3fcb699a1a3c9d 100644
--- a/media/player/movie.cc
+++ b/media/player/movie.cc
@@ -79,7 +79,9 @@ bool Movie::Open(const wchar_t* url, WtlVideoRenderer* video_renderer) {
factories->AddFactory(
new media::InstanceFilterFactory<WtlVideoRenderer>(video_renderer));
- pipeline_.reset(new PipelineImpl());
+ thread_.reset(new base::Thread("PipelineThread"));
+ thread_->Start();
+ pipeline_.reset(new PipelineImpl(thread_->message_loop()));
// Create and start our pipeline.
pipeline_->Start(factories.get(), WideToUTF8(std::wstring(url)), NULL);
@@ -194,8 +196,10 @@ bool Movie::GetOpenMpEnable() {
// Teardown.
void Movie::Close() {
if (pipeline_.get()) {
- pipeline_->Stop();
+ pipeline_->Stop(NULL);
+ thread_->Stop();
pipeline_.reset();
+ thread_.reset();
}
}
« no previous file with comments | « media/player/movie.h ('k') | webkit/glue/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698