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