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

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

Issue 5864002: Ugh, one more scoped_refptr NewRunnableMethod. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 10 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <iostream> 5 #include <iostream>
6 #include <signal.h> 6 #include <signal.h>
7 #include <X11/keysym.h> 7 #include <X11/keysym.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 thread->Start(); 250 thread->Start();
251 if (InitPipeline(thread->message_loop(), filename.c_str(), 251 if (InitPipeline(thread->message_loop(), filename.c_str(),
252 enable_audio, &pipeline, &message_loop)) { 252 enable_audio, &pipeline, &message_loop)) {
253 // Main loop of the application. 253 // Main loop of the application.
254 g_running = true; 254 g_running = true;
255 255
256 // Check if video is present. 256 // Check if video is present.
257 audio_only = !pipeline->IsRendered(media::mime_type::kMajorTypeVideo); 257 audio_only = !pipeline->IsRendered(media::mime_type::kMajorTypeVideo);
258 258
259 message_loop.PostTask(FROM_HERE, 259 message_loop.PostTask(FROM_HERE,
260 NewRunnableFunction(PeriodicalUpdate, pipeline.get(), 260 NewRunnableFunction(PeriodicalUpdate, pipeline,
261 &message_loop, audio_only)); 261 &message_loop, audio_only));
262 message_loop.Run(); 262 message_loop.Run();
263 } else{ 263 } else{
264 std::cout << "Pipeline initialization failed..." << std::endl; 264 std::cout << "Pipeline initialization failed..." << std::endl;
265 } 265 }
266 266
267 // Cleanup tasks. 267 // Cleanup tasks.
268 thread->Stop(); 268 thread->Stop();
269 XDestroyWindow(g_display, g_window); 269 XDestroyWindow(g_display, g_window);
270 XCloseDisplay(g_display); 270 XCloseDisplay(g_display);
271 return 0; 271 return 0;
272 } 272 }
OLDNEW
« 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