OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/glue/webmediaplayer_impl.h" | 5 #include "webkit/glue/webmediaplayer_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 new media::ChunkDemuxerFactory(source_url, | 203 new media::ChunkDemuxerFactory(source_url, |
204 demuxer_factory.release(), | 204 demuxer_factory.release(), |
205 proxy_)); | 205 proxy_)); |
206 } | 206 } |
207 filter_collection_->SetDemuxerFactory(demuxer_factory.release()); | 207 filter_collection_->SetDemuxerFactory(demuxer_factory.release()); |
208 | 208 |
209 // Add in the default filter factories. | 209 // Add in the default filter factories. |
210 filter_collection_->AddAudioDecoder(new media::FFmpegAudioDecoder( | 210 filter_collection_->AddAudioDecoder(new media::FFmpegAudioDecoder( |
211 message_loop_factory_->GetMessageLoop("AudioDecoderThread"))); | 211 message_loop_factory_->GetMessageLoop("AudioDecoderThread"))); |
212 filter_collection_->AddVideoDecoder(new media::FFmpegVideoDecoder( | 212 filter_collection_->AddVideoDecoder(new media::FFmpegVideoDecoder( |
213 message_loop_factory_->GetMessageLoop("VideoDecoderThread"), NULL)); | 213 message_loop_factory_->GetMessageLoop("VideoDecoderThread"))); |
214 filter_collection_->AddAudioRenderer(new media::NullAudioRenderer()); | 214 filter_collection_->AddAudioRenderer(new media::NullAudioRenderer()); |
215 | 215 |
216 return true; | 216 return true; |
217 } | 217 } |
218 | 218 |
219 WebMediaPlayerImpl::~WebMediaPlayerImpl() { | 219 WebMediaPlayerImpl::~WebMediaPlayerImpl() { |
220 DCHECK_EQ(main_loop_, MessageLoop::current()); | 220 DCHECK_EQ(main_loop_, MessageLoop::current()); |
221 Destroy(); | 221 Destroy(); |
222 media_log_->AddEvent( | 222 media_log_->AddEvent( |
223 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_DESTROYED)); | 223 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_DESTROYED)); |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 return client_; | 863 return client_; |
864 } | 864 } |
865 | 865 |
866 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { | 866 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { |
867 DCHECK_EQ(main_loop_, MessageLoop::current()); | 867 DCHECK_EQ(main_loop_, MessageLoop::current()); |
868 incremented_externally_allocated_memory_ = true; | 868 incremented_externally_allocated_memory_ = true; |
869 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); | 869 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); |
870 } | 870 } |
871 | 871 |
872 } // namespace webkit_glue | 872 } // namespace webkit_glue |
OLD | NEW |