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

Unified Diff: media/tools/player_x11/player_x11.cc

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 12 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/media.gyp ('k') | webkit/media/webkit_media.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/player_x11/player_x11.cc
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index 8c76e17813d0cf0fa8db7cbb83df3bd98cf5e94f..0a7477c445d7788839ae79284a51887965d3b8e8 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -20,7 +20,6 @@
#include "media/base/media.h"
#include "media/base/media_log.h"
#include "media/base/media_switches.h"
-#include "media/base/message_loop_factory.h"
#include "media/base/pipeline.h"
#include "media/base/video_frame.h"
#include "media/filters/audio_renderer_impl.h"
@@ -106,8 +105,7 @@ bool InitPipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop,
const PaintCB& paint_cb,
bool /* enable_audio */,
scoped_refptr<media::Pipeline>* pipeline,
- MessageLoop* paint_message_loop,
- media::MessageLoopFactory* message_loop_factory) {
+ MessageLoop* paint_message_loop) {
// Create our filter factories.
scoped_ptr<media::FilterCollection> collection(
new media::FilterCollection());
@@ -259,13 +257,10 @@ int main(int argc, char** argv) {
return 1;
// Initialize the pipeline thread and the pipeline.
- scoped_ptr<media::MessageLoopFactory> message_loop_factory(
- new media::MessageLoopFactory());
- scoped_ptr<base::Thread> thread;
- scoped_refptr<media::Pipeline> pipeline;
MessageLoop message_loop;
- thread.reset(new base::Thread("PipelineThread"));
- thread->Start();
+ base::Thread media_thread("MediaThread");
+ media_thread.Start();
+ scoped_refptr<media::Pipeline> pipeline;
PaintCB paint_cb;
if (command_line->HasSwitch("use-gl")) {
@@ -280,9 +275,9 @@ int main(int argc, char** argv) {
new DataSourceLogger(CreateFileDataSource(filename),
command_line->HasSwitch("streaming")));
- if (InitPipeline(thread->message_loop_proxy(), data_source,
+ if (InitPipeline(media_thread.message_loop_proxy(), data_source,
paint_cb, command_line->HasSwitch("audio"),
- &pipeline, &message_loop, message_loop_factory.get())) {
+ &pipeline, &message_loop)) {
// Main loop of the application.
g_running = true;
@@ -294,9 +289,7 @@ int main(int argc, char** argv) {
}
// Cleanup tasks.
- message_loop_factory.reset();
-
- thread->Stop();
+ media_thread.Stop();
// Release callback which releases video renderer. Do this before cleaning up
// X below since the video renderer has some X cleanup duties as well.
« no previous file with comments | « media/media.gyp ('k') | webkit/media/webkit_media.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698