| OLD | NEW |
| 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 <X11/keysym.h> | 5 #include <X11/keysym.h> |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 | 8 |
| 9 #include <iostream> // NOLINT | 9 #include <iostream> // NOLINT |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 else | 213 else |
| 214 pipeline->SetPlaybackRate(0.0f); | 214 pipeline->SetPlaybackRate(0.0f); |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 break; | 217 break; |
| 218 default: | 218 default: |
| 219 break; | 219 break; |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 message_loop->PostDelayedTask(FROM_HERE, base::Bind( | 223 message_loop->PostDelayedTask( |
| 224 &PeriodicalUpdate, make_scoped_refptr(pipeline), | 224 FROM_HERE, |
| 225 message_loop, audio_only), 10); | 225 base::Bind(&PeriodicalUpdate, |
| 226 make_scoped_refptr(pipeline), |
| 227 message_loop, |
| 228 audio_only), |
| 229 base::TimeDelta::FromMilliseconds(10)); |
| 226 } | 230 } |
| 227 | 231 |
| 228 int main(int argc, char** argv) { | 232 int main(int argc, char** argv) { |
| 229 base::AtExitManager at_exit; | 233 base::AtExitManager at_exit; |
| 230 CommandLine::Init(argc, argv); | 234 CommandLine::Init(argc, argv); |
| 231 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 235 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 232 std::string filename = command_line->GetSwitchValueASCII("file"); | 236 std::string filename = command_line->GetSwitchValueASCII("file"); |
| 233 | 237 |
| 234 if (filename.empty()) { | 238 if (filename.empty()) { |
| 235 std::cout << "Usage: " << argv[0] << " --file=FILE" << std::endl | 239 std::cout << "Usage: " << argv[0] << " --file=FILE" << std::endl |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // Release callback which releases video renderer. Do this before cleaning up | 310 // Release callback which releases video renderer. Do this before cleaning up |
| 307 // X below since the video renderer has some X cleanup duties as well. | 311 // X below since the video renderer has some X cleanup duties as well. |
| 308 paint_cb.Reset(); | 312 paint_cb.Reset(); |
| 309 | 313 |
| 310 XDestroyWindow(g_display, g_window); | 314 XDestroyWindow(g_display, g_window); |
| 311 XCloseDisplay(g_display); | 315 XCloseDisplay(g_display); |
| 312 g_audio_manager = NULL; | 316 g_audio_manager = NULL; |
| 313 | 317 |
| 314 return 0; | 318 return 0; |
| 315 } | 319 } |
| OLD | NEW |