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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 pending_seek_(false), | 134 pending_seek_(false), |
135 pending_seek_seconds_(0.0f), | 135 pending_seek_seconds_(0.0f), |
136 client_(client), | 136 client_(client), |
137 proxy_(new WebMediaPlayerProxy(main_loop_->message_loop_proxy(), this)), | 137 proxy_(new WebMediaPlayerProxy(main_loop_->message_loop_proxy(), this)), |
138 delegate_(delegate), | 138 delegate_(delegate), |
139 media_stream_client_(params.media_stream_client()), | 139 media_stream_client_(params.media_stream_client()), |
140 media_log_(params.media_log()), | 140 media_log_(params.media_log()), |
141 accelerated_compositing_reported_(false), | 141 accelerated_compositing_reported_(false), |
142 incremented_externally_allocated_memory_(false), | 142 incremented_externally_allocated_memory_(false), |
143 audio_source_provider_(params.audio_source_provider()), | 143 audio_source_provider_(params.audio_source_provider()), |
| 144 audio_renderer_sink_(params.audio_renderer_sink()), |
144 is_local_source_(false), | 145 is_local_source_(false), |
145 supports_save_(true), | 146 supports_save_(true), |
146 starting_(false) { | 147 starting_(false) { |
147 media_log_->AddEvent( | 148 media_log_->AddEvent( |
148 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); | 149 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); |
149 | 150 |
150 CHECK(media_thread_.Start()); | 151 CHECK(media_thread_.Start()); |
151 pipeline_ = new media::Pipeline( | 152 pipeline_ = new media::Pipeline( |
152 media_thread_.message_loop_proxy(), media_log_); | 153 media_thread_.message_loop_proxy(), media_log_); |
153 | 154 |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 return audio_source_provider_; | 1211 return audio_source_provider_; |
1211 } | 1212 } |
1212 | 1213 |
1213 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 1214 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
1214 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1215 DCHECK_EQ(main_loop_, MessageLoop::current()); |
1215 incremented_externally_allocated_memory_ = true; | 1216 incremented_externally_allocated_memory_ = true; |
1216 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 1217 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
1217 } | 1218 } |
1218 | 1219 |
1219 } // namespace webkit_media | 1220 } // namespace webkit_media |
OLD | NEW |