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

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

Issue 10704241: Add PpapiDecryptor which wraps a CDM plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add webkit bug in comments. Created 8 years, 5 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 | « webkit/media/webkit_media.gypi ('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 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
33 #include "v8/include/v8.h" 33 #include "v8/include/v8.h"
34 #include "webkit/media/buffered_data_source.h" 34 #include "webkit/media/buffered_data_source.h"
35 #include "webkit/media/filter_helpers.h" 35 #include "webkit/media/filter_helpers.h"
36 #include "webkit/media/webmediaplayer_delegate.h" 36 #include "webkit/media/webmediaplayer_delegate.h"
37 #include "webkit/media/webmediaplayer_proxy.h" 37 #include "webkit/media/webmediaplayer_proxy.h"
38 #include "webkit/media/webmediaplayer_util.h" 38 #include "webkit/media/webmediaplayer_util.h"
39 #include "webkit/media/webvideoframe_impl.h" 39 #include "webkit/media/webvideoframe_impl.h"
40 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
40 41
41 using WebKit::WebCanvas; 42 using WebKit::WebCanvas;
42 using WebKit::WebMediaPlayer; 43 using WebKit::WebMediaPlayer;
43 using WebKit::WebRect; 44 using WebKit::WebRect;
44 using WebKit::WebSize; 45 using WebKit::WebSize;
45 using WebKit::WebString; 46 using WebKit::WebString;
46 using media::PipelineStatus; 47 using media::PipelineStatus;
47 48
48 namespace { 49 namespace {
49 50
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 client_(client), 125 client_(client),
125 proxy_(new WebMediaPlayerProxy(main_loop_->message_loop_proxy(), this)), 126 proxy_(new WebMediaPlayerProxy(main_loop_->message_loop_proxy(), this)),
126 delegate_(delegate), 127 delegate_(delegate),
127 media_stream_client_(media_stream_client), 128 media_stream_client_(media_stream_client),
128 media_log_(media_log), 129 media_log_(media_log),
129 accelerated_compositing_reported_(false), 130 accelerated_compositing_reported_(false),
130 incremented_externally_allocated_memory_(false), 131 incremented_externally_allocated_memory_(false),
131 audio_source_provider_(audio_source_provider), 132 audio_source_provider_(audio_source_provider),
132 audio_renderer_sink_(audio_renderer_sink), 133 audio_renderer_sink_(audio_renderer_sink),
133 is_local_source_(false), 134 is_local_source_(false),
134 decryptor_(proxy_.get()) { 135 decryptor_(proxy_.get(), client, frame) {
135 media_log_->AddEvent( 136 media_log_->AddEvent(
136 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED)); 137 media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED));
137 138
138 MessageLoop* pipeline_message_loop = 139 MessageLoop* pipeline_message_loop =
139 message_loop_factory_->GetMessageLoop("PipelineThread"); 140 message_loop_factory_->GetMessageLoop("PipelineThread");
140 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_); 141 pipeline_ = new media::Pipeline(pipeline_message_loop, media_log_);
141 142
142 // Let V8 know we started new thread if we did not did it yet. 143 // Let V8 know we started new thread if we did not did it yet.
143 // Made separate task to avoid deletion of player currently being created. 144 // Made separate task to avoid deletion of player currently being created.
144 // Also, delaying GC until after player starts gets rid of starting lag -- 145 // Also, delaying GC until after player starts gets rid of starting lag --
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 return audio_source_provider_; 1050 return audio_source_provider_;
1050 } 1051 }
1051 1052
1052 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 1053 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
1053 DCHECK_EQ(main_loop_, MessageLoop::current()); 1054 DCHECK_EQ(main_loop_, MessageLoop::current());
1054 incremented_externally_allocated_memory_ = true; 1055 incremented_externally_allocated_memory_ = true;
1055 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 1056 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
1056 } 1057 }
1057 1058
1058 } // namespace webkit_media 1059 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/webkit_media.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698