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_impl.h" | 5 #include "webkit/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 media_stream_client_(media_stream_client), | 149 media_stream_client_(media_stream_client), |
150 media_log_(media_log), | 150 media_log_(media_log), |
151 accelerated_compositing_reported_(false), | 151 accelerated_compositing_reported_(false), |
152 incremented_externally_allocated_memory_(false), | 152 incremented_externally_allocated_memory_(false), |
153 audio_source_provider_(audio_source_provider), | 153 audio_source_provider_(audio_source_provider), |
154 audio_renderer_sink_(audio_renderer_sink), | 154 audio_renderer_sink_(audio_renderer_sink), |
155 is_local_source_(false), | 155 is_local_source_(false), |
156 supports_save_(true), | 156 supports_save_(true), |
157 decryptor_(message_loop_factory_->GetMessageLoop( | 157 decryptor_(message_loop_factory_->GetMessageLoop( |
158 media::MessageLoopFactory::kDecoder), | 158 media::MessageLoopFactory::kDecoder), |
159 proxy_.get(), | 159 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded), |
| 160 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError), |
| 161 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyMessage), |
| 162 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey), |
160 client, | 163 client, |
161 frame), | 164 frame), |
162 starting_(false) { | 165 starting_(false) { |
163 media_log_->AddEvent( | 166 media_log_->AddEvent( |
164 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); | 167 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); |
165 | 168 |
166 scoped_refptr<base::MessageLoopProxy> pipeline_message_loop = | 169 scoped_refptr<base::MessageLoopProxy> pipeline_message_loop = |
167 message_loop_factory_->GetMessageLoop( | 170 message_loop_factory_->GetMessageLoop( |
168 media::MessageLoopFactory::kPipeline); | 171 media::MessageLoopFactory::kPipeline); |
169 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_); | 172 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_); |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 return audio_source_provider_; | 1099 return audio_source_provider_; |
1097 } | 1100 } |
1098 | 1101 |
1099 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 1102 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
1100 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1103 DCHECK_EQ(main_loop_, MessageLoop::current()); |
1101 incremented_externally_allocated_memory_ = true; | 1104 incremented_externally_allocated_memory_ = true; |
1102 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 1105 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
1103 } | 1106 } |
1104 | 1107 |
1105 } // namespace webkit_media | 1108 } // namespace webkit_media |
OLD | NEW |