| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 message_loop->PostTask(FROM_HERE, base::Bind( | 88 message_loop->PostTask(FROM_HERE, base::Bind( |
| 89 &Paint, message_loop, paint_cb, video_frame)); | 89 &Paint, message_loop, paint_cb, video_frame)); |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 | 92 |
| 93 paint_cb.Run(video_frame.get()); | 93 paint_cb.Run(video_frame.get()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {} | 96 static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {} |
| 97 | 97 |
| 98 static void NeedKey(const std::string& type, scoped_ptr<uint8[]> init_data, | 98 static void NeedKey(const std::string& type, |
| 99 int init_data_size) { | 99 const std::vector<uint8>& init_data) { |
| 100 std::cout << "File is encrypted." << std::endl; | 100 std::cout << "File is encrypted." << std::endl; |
| 101 } | 101 } |
| 102 | 102 |
| 103 static void SaveStatusAndSignal(base::WaitableEvent* event, | 103 static void SaveStatusAndSignal(base::WaitableEvent* event, |
| 104 media::PipelineStatus* status_out, | 104 media::PipelineStatus* status_out, |
| 105 media::PipelineStatus status) { | 105 media::PipelineStatus status) { |
| 106 *status_out = status; | 106 *status_out = status; |
| 107 event->Signal(); | 107 event->Signal(); |
| 108 } | 108 } |
| 109 | 109 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // Release callback which releases video renderer. Do this before cleaning up | 300 // Release callback which releases video renderer. Do this before cleaning up |
| 301 // 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. |
| 302 paint_cb.Reset(); | 302 paint_cb.Reset(); |
| 303 | 303 |
| 304 XDestroyWindow(g_display, g_window); | 304 XDestroyWindow(g_display, g_window); |
| 305 XCloseDisplay(g_display); | 305 XCloseDisplay(g_display); |
| 306 g_audio_manager = NULL; | 306 g_audio_manager = NULL; |
| 307 | 307 |
| 308 return 0; | 308 return 0; |
| 309 } | 309 } |
| OLD | NEW |