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

Side by Side Diff: media/tools/player_x11/player_x11.cc

Issue 10855051: Use enum instead of string in MessageLoopFactory::GetMessageLoop* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update player_wtl Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <signal.h> 5 #include <signal.h>
6 6
7 #include <iostream> // NOLINT 7 #include <iostream> // NOLINT
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return false; 111 return false;
112 } 112 }
113 113
114 // Create our filter factories. 114 // Create our filter factories.
115 scoped_ptr<media::FilterCollection> collection( 115 scoped_ptr<media::FilterCollection> collection(
116 new media::FilterCollection()); 116 new media::FilterCollection());
117 collection->SetDemuxer(new media::FFmpegDemuxer(message_loop, data_source)); 117 collection->SetDemuxer(new media::FFmpegDemuxer(message_loop, data_source));
118 collection->AddAudioDecoder(new media::FFmpegAudioDecoder( 118 collection->AddAudioDecoder(new media::FFmpegAudioDecoder(
119 base::Bind(&media::MessageLoopFactory::GetMessageLoop, 119 base::Bind(&media::MessageLoopFactory::GetMessageLoop,
120 base::Unretained(message_loop_factory), 120 base::Unretained(message_loop_factory),
121 "AudioDecoderThread"))); 121 media::MessageLoopFactory::AUDIO_DECODER)));
122 collection->AddVideoDecoder(new media::FFmpegVideoDecoder( 122 collection->AddVideoDecoder(new media::FFmpegVideoDecoder(
123 base::Bind(&media::MessageLoopFactory::GetMessageLoop, 123 base::Bind(&media::MessageLoopFactory::GetMessageLoop,
124 base::Unretained(message_loop_factory), 124 base::Unretained(message_loop_factory),
125 "VideoDecoderThread"), 125 media::MessageLoopFactory::VIDEO_DECODER),
126 NULL)); 126 NULL));
127 127
128 // Create our video renderer and save a reference to it for painting. 128 // Create our video renderer and save a reference to it for painting.
129 g_video_renderer = new media::VideoRendererBase( 129 g_video_renderer = new media::VideoRendererBase(
130 base::Bind(&Paint, paint_message_loop, paint_cb), 130 base::Bind(&Paint, paint_message_loop, paint_cb),
131 base::Bind(&SetOpaque), 131 base::Bind(&SetOpaque),
132 true); 132 true);
133 collection->AddVideoRenderer(g_video_renderer); 133 collection->AddVideoRenderer(g_video_renderer);
134 134
135 collection->AddAudioRenderer( 135 collection->AddAudioRenderer(
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // Release callback which releases video renderer. Do this before cleaning up 304 // Release callback which releases video renderer. Do this before cleaning up
305 // X below since the video renderer has some X cleanup duties as well. 305 // X below since the video renderer has some X cleanup duties as well.
306 paint_cb.Reset(); 306 paint_cb.Reset();
307 307
308 XDestroyWindow(g_display, g_window); 308 XDestroyWindow(g_display, g_window);
309 XCloseDisplay(g_display); 309 XCloseDisplay(g_display);
310 g_audio_manager = NULL; 310 g_audio_manager = NULL;
311 311
312 return 0; 312 return 0;
313 } 313 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698