| 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 "webkit/media/webmediaplayer_proxy.h" | 5 #include "webkit/media/webmediaplayer_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "media/base/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 DCHECK(render_loop_->BelongsToCurrentThread()); | 80 DCHECK(render_loop_->BelongsToCurrentThread()); |
| 81 if (data_source_) | 81 if (data_source_) |
| 82 data_source_->Abort(); | 82 data_source_->Abort(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void WebMediaPlayerProxy::Detach() { | 85 void WebMediaPlayerProxy::Detach() { |
| 86 DCHECK(render_loop_->BelongsToCurrentThread()); | 86 DCHECK(render_loop_->BelongsToCurrentThread()); |
| 87 webmediaplayer_ = NULL; | 87 webmediaplayer_ = NULL; |
| 88 data_source_ = NULL; | 88 data_source_ = NULL; |
| 89 frame_provider_ = NULL; | 89 frame_provider_ = NULL; |
| 90 video_decoder_ = NULL; | |
| 91 } | 90 } |
| 92 | 91 |
| 93 void WebMediaPlayerProxy::PipelineInitializationCallback( | 92 void WebMediaPlayerProxy::PipelineInitializationCallback( |
| 94 PipelineStatus status) { | 93 PipelineStatus status) { |
| 95 render_loop_->PostTask(FROM_HERE, base::Bind( | 94 render_loop_->PostTask(FROM_HERE, base::Bind( |
| 96 &WebMediaPlayerProxy::PipelineInitializationTask, this, status)); | 95 &WebMediaPlayerProxy::PipelineInitializationTask, this, status)); |
| 97 } | 96 } |
| 98 | 97 |
| 99 void WebMediaPlayerProxy::PipelineSeekCallback(PipelineStatus status) { | 98 void WebMediaPlayerProxy::PipelineSeekCallback(PipelineStatus status) { |
| 100 render_loop_->PostTask(FROM_HERE, base::Bind( | 99 render_loop_->PostTask(FROM_HERE, base::Bind( |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 const std::string& session_id, | 306 const std::string& session_id, |
| 308 scoped_array<uint8> init_data, | 307 scoped_array<uint8> init_data, |
| 309 int init_data_size) { | 308 int init_data_size) { |
| 310 DCHECK(render_loop_->BelongsToCurrentThread()); | 309 DCHECK(render_loop_->BelongsToCurrentThread()); |
| 311 if (webmediaplayer_) | 310 if (webmediaplayer_) |
| 312 webmediaplayer_->OnNeedKey(key_system, session_id, | 311 webmediaplayer_->OnNeedKey(key_system, session_id, |
| 313 init_data.Pass(), init_data_size); | 312 init_data.Pass(), init_data_size); |
| 314 } | 313 } |
| 315 | 314 |
| 316 } // namespace webkit_media | 315 } // namespace webkit_media |
| OLD | NEW |