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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 accelerated_compositing_reported_(false), | 130 accelerated_compositing_reported_(false), |
131 incremented_externally_allocated_memory_(false), | 131 incremented_externally_allocated_memory_(false), |
132 audio_source_provider_(audio_source_provider), | 132 audio_source_provider_(audio_source_provider), |
133 audio_renderer_sink_(audio_renderer_sink), | 133 audio_renderer_sink_(audio_renderer_sink), |
134 is_local_source_(false), | 134 is_local_source_(false), |
135 decryptor_(proxy_.get(), client, frame) { | 135 decryptor_(proxy_.get(), client, frame) { |
136 media_log_->AddEvent( | 136 media_log_->AddEvent( |
137 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); | 137 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); |
138 | 138 |
139 MessageLoop* pipeline_message_loop = | 139 MessageLoop* pipeline_message_loop = |
140 message_loop_factory_->GetMessageLoop("PipelineThread"); | 140 message_loop_factory_->GetMessageLoop( |
| 141 media::MessageLoopFactory::PIPELINE); |
141 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_); | 142 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_); |
142 | 143 |
143 // Let V8 know we started new thread if we did not did it yet. | 144 // Let V8 know we started new thread if we did not did it yet. |
144 // Made separate task to avoid deletion of player currently being created. | 145 // Made separate task to avoid deletion of player currently being created. |
145 // Also, delaying GC until after player starts gets rid of starting lag -- | 146 // Also, delaying GC until after player starts gets rid of starting lag -- |
146 // collection happens in parallel with playing. | 147 // collection happens in parallel with playing. |
147 // | 148 // |
148 // TODO(enal): remove when we get rid of per-audio-stream thread. | 149 // TODO(enal): remove when we get rid of per-audio-stream thread. |
149 MessageLoop::current()->PostTask( | 150 MessageLoop::current()->PostTask( |
150 FROM_HERE, | 151 FROM_HERE, |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 return audio_source_provider_; | 1026 return audio_source_provider_; |
1026 } | 1027 } |
1027 | 1028 |
1028 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 1029 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
1029 DCHECK_EQ(main_loop_, MessageLoop::current()); | 1030 DCHECK_EQ(main_loop_, MessageLoop::current()); |
1030 incremented_externally_allocated_memory_ = true; | 1031 incremented_externally_allocated_memory_ = true; |
1031 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 1032 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
1032 } | 1033 } |
1033 | 1034 |
1034 } // namespace webkit_media | 1035 } // namespace webkit_media |
OLD | NEW |