| OLD | NEW |
| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 pipeline->SetPlaybackRate(0.0f); | 200 pipeline->SetPlaybackRate(0.0f); |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 break; | 203 break; |
| 204 default: | 204 default: |
| 205 break; | 205 break; |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 message_loop->PostDelayedTask(FROM_HERE, | 209 message_loop->PostDelayedTask(FROM_HERE, |
| 210 NewRunnableFunction(PeriodicalUpdate, pipeline, | 210 NewRunnableFunction(PeriodicalUpdate, make_scoped_refptr(pipeline), |
| 211 message_loop, audio_only), 10); | 211 message_loop, audio_only), 10); |
| 212 } | 212 } |
| 213 | 213 |
| 214 int main(int argc, char** argv) { | 214 int main(int argc, char** argv) { |
| 215 // Read arguments. | 215 // Read arguments. |
| 216 if (argc == 1) { | 216 if (argc == 1) { |
| 217 std::cout << "Usage: " << argv[0] << " --file=FILE" << std::endl | 217 std::cout << "Usage: " << argv[0] << " --file=FILE" << std::endl |
| 218 << std::endl | 218 << std::endl |
| 219 << "Optional arguments:" << std::endl | 219 << "Optional arguments:" << std::endl |
| 220 << " [--enable-openmax]" | 220 << " [--enable-openmax]" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |