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 <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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 << " [--streaming]" << std::endl | 242 << " [--streaming]" << std::endl |
243 << " Press [ESC] to stop" << std::endl | 243 << " Press [ESC] to stop" << std::endl |
244 << " Press [SPACE] to toggle pause/play" << std::endl | 244 << " Press [SPACE] to toggle pause/play" << std::endl |
245 << " Press mouse left button to seek" << std::endl; | 245 << " Press mouse left button to seek" << std::endl; |
246 return 1; | 246 return 1; |
247 } | 247 } |
248 | 248 |
249 scoped_ptr<media::AudioManager> audio_manager(media::AudioManager::Create()); | 249 scoped_ptr<media::AudioManager> audio_manager(media::AudioManager::Create()); |
250 g_audio_manager = audio_manager.get(); | 250 g_audio_manager = audio_manager.get(); |
251 | 251 |
252 logging::InitLogging( | 252 logging::LoggingSettings settings; |
253 NULL, | 253 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
254 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 254 logging::InitLogging(settings); |
255 logging::LOCK_LOG_FILE, // Ignored. | |
256 logging::DELETE_OLD_LOG_FILE, // Ignored. | |
257 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
258 | 255 |
259 // Install the signal handler. | 256 // Install the signal handler. |
260 signal(SIGTERM, &TerminateHandler); | 257 signal(SIGTERM, &TerminateHandler); |
261 signal(SIGINT, &TerminateHandler); | 258 signal(SIGINT, &TerminateHandler); |
262 | 259 |
263 // Initialize X11. | 260 // Initialize X11. |
264 if (!InitX11()) | 261 if (!InitX11()) |
265 return 1; | 262 return 1; |
266 | 263 |
267 // Initialize the pipeline thread and the pipeline. | 264 // Initialize the pipeline thread and the pipeline. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // Release callback which releases video renderer. Do this before cleaning up | 300 // Release callback which releases video renderer. Do this before cleaning up |
304 // X below since the video renderer has some X cleanup duties as well. | 301 // X below since the video renderer has some X cleanup duties as well. |
305 paint_cb.Reset(); | 302 paint_cb.Reset(); |
306 | 303 |
307 XDestroyWindow(g_display, g_window); | 304 XDestroyWindow(g_display, g_window); |
308 XCloseDisplay(g_display); | 305 XCloseDisplay(g_display); |
309 g_audio_manager = NULL; | 306 g_audio_manager = NULL; |
310 | 307 |
311 return 0; | 308 return 0; |
312 } | 309 } |
OLD | NEW |