Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: webkit/media/webmediaplayer_impl.cc

Issue 9826028: Rename AudioRendererBase and AudioRendererAlgorithmBase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit tests were somehow unadded Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/message_loop_proxy.h" 13 #include "base/message_loop_proxy.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "media/audio/null_audio_sink.h" 15 #include "media/audio/null_audio_sink.h"
16 #include "media/base/filter_collection.h" 16 #include "media/base/filter_collection.h"
17 #include "media/base/limits.h" 17 #include "media/base/limits.h"
18 #include "media/base/media_log.h" 18 #include "media/base/media_log.h"
19 #include "media/base/media_switches.h" 19 #include "media/base/media_switches.h"
20 #include "media/base/pipeline.h" 20 #include "media/base/pipeline.h"
21 #include "media/base/video_frame.h" 21 #include "media/base/video_frame.h"
22 #include "media/filters/audio_renderer_base.h" 22 #include "media/filters/audio_renderer_impl.h"
23 #include "media/filters/video_renderer_base.h" 23 #include "media/filters/video_renderer_base.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
29 #include "v8/include/v8.h" 29 #include "v8/include/v8.h"
30 #include "webkit/media/buffered_data_source.h" 30 #include "webkit/media/buffered_data_source.h"
31 #include "webkit/media/filter_helpers.h" 31 #include "webkit/media/filter_helpers.h"
32 #include "webkit/media/webmediaplayer_delegate.h" 32 #include "webkit/media/webmediaplayer_delegate.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 scoped_refptr<media::VideoRendererBase> video_renderer = 147 scoped_refptr<media::VideoRendererBase> video_renderer =
148 new media::VideoRendererBase( 148 new media::VideoRendererBase(
149 base::Bind(&WebMediaPlayerProxy::Repaint, proxy_), 149 base::Bind(&WebMediaPlayerProxy::Repaint, proxy_),
150 base::Bind(&WebMediaPlayerProxy::SetOpaque, proxy_.get()), 150 base::Bind(&WebMediaPlayerProxy::SetOpaque, proxy_.get()),
151 true); 151 true);
152 filter_collection_->AddVideoRenderer(video_renderer); 152 filter_collection_->AddVideoRenderer(video_renderer);
153 proxy_->set_frame_provider(video_renderer); 153 proxy_->set_frame_provider(video_renderer);
154 154
155 // Create default audio renderer. 155 // Create default audio renderer.
156 filter_collection_->AddAudioRenderer( 156 filter_collection_->AddAudioRenderer(
157 new media::AudioRendererBase(new media::NullAudioSink())); 157 new media::AudioRendererImpl(new media::NullAudioSink()));
158 } 158 }
159 159
160 WebMediaPlayerImpl::~WebMediaPlayerImpl() { 160 WebMediaPlayerImpl::~WebMediaPlayerImpl() {
161 DCHECK_EQ(main_loop_, MessageLoop::current()); 161 DCHECK_EQ(main_loop_, MessageLoop::current());
162 Destroy(); 162 Destroy();
163 media_log_->AddEvent( 163 media_log_->AddEvent(
164 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_DESTROYED)); 164 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_DESTROYED));
165 165
166 if (delegate_) 166 if (delegate_)
167 delegate_->PlayerGone(this); 167 delegate_->PlayerGone(this);
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 return audio_source_provider_; 919 return audio_source_provider_;
920 } 920 }
921 921
922 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 922 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
923 DCHECK_EQ(main_loop_, MessageLoop::current()); 923 DCHECK_EQ(main_loop_, MessageLoop::current());
924 incremented_externally_allocated_memory_ = true; 924 incremented_externally_allocated_memory_ = true;
925 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 925 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
926 } 926 }
927 927
928 } // namespace webkit_media 928 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698