| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 44100, | 132 44100, |
| 133 16, | 133 16, |
| 134 512); | 134 512); |
| 135 media::AudioHardwareConfig hardware_config(out_params, out_params); | 135 media::AudioHardwareConfig hardware_config(out_params, out_params); |
| 136 | 136 |
| 137 scoped_ptr<media::AudioRenderer> audio_renderer( | 137 scoped_ptr<media::AudioRenderer> audio_renderer( |
| 138 new media::AudioRendererImpl(task_runner, | 138 new media::AudioRendererImpl(task_runner, |
| 139 new media::NullAudioSink(task_runner), | 139 new media::NullAudioSink(task_runner), |
| 140 audio_decoders.Pass(), | 140 audio_decoders.Pass(), |
| 141 media::SetDecryptorReadyCB(), | 141 media::SetDecryptorReadyCB(), |
| 142 &hardware_config)); | 142 hardware_config)); |
| 143 | 143 |
| 144 scoped_ptr<media::Renderer> renderer(new media::RendererImpl( | 144 scoped_ptr<media::Renderer> renderer(new media::RendererImpl( |
| 145 task_runner, demuxer, audio_renderer.Pass(), video_renderer.Pass())); | 145 task_runner, demuxer, audio_renderer.Pass(), video_renderer.Pass())); |
| 146 | 146 |
| 147 base::WaitableEvent event(true, false); | 147 base::WaitableEvent event(true, false); |
| 148 media::PipelineStatus status; | 148 media::PipelineStatus status; |
| 149 | 149 |
| 150 pipeline->Start(demuxer, | 150 pipeline->Start(demuxer, |
| 151 renderer.Pass(), | 151 renderer.Pass(), |
| 152 base::Bind(&DoNothing), | 152 base::Bind(&DoNothing), |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // Release callback which releases video renderer. Do this before cleaning up | 307 // Release callback which releases video renderer. Do this before cleaning up |
| 308 // X below since the video renderer has some X cleanup duties as well. | 308 // X below since the video renderer has some X cleanup duties as well. |
| 309 paint_cb.Reset(); | 309 paint_cb.Reset(); |
| 310 | 310 |
| 311 XDestroyWindow(g_display, g_window); | 311 XDestroyWindow(g_display, g_window); |
| 312 XCloseDisplay(g_display); | 312 XCloseDisplay(g_display); |
| 313 g_audio_manager = NULL; | 313 g_audio_manager = NULL; |
| 314 | 314 |
| 315 return 0; | 315 return 0; |
| 316 } | 316 } |
| OLD | NEW |