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

Side by Side Diff: media/blink/webmediaplayer_params.cc

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments, rebase to ToT Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/blink/webmediaplayer_params.h" 5 #include "media/blink/webmediaplayer_params.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "media/base/audio_renderer_sink.h" 8 #include "media/base/audio_renderer_sink.h"
9 #include "media/base/media_log.h" 9 #include "media/base/media_log.h"
10 #include "media/filters/gpu_video_accelerator_factories.h" 10 #include "media/filters/gpu_video_accelerator_factories.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 WebMediaPlayerParams::WebMediaPlayerParams( 14 WebMediaPlayerParams::WebMediaPlayerParams(
15 const base::Callback<void(const base::Closure&)>& defer_load_cb, 15 const DeferLoadCB& defer_load_cb,
16 const scoped_refptr<AudioRendererSink>& audio_renderer_sink, 16 const scoped_refptr<AudioRendererSink>& audio_renderer_sink,
17 const AudioHardwareConfig& audio_hardware_config, 17 const AudioHardwareConfig& audio_hardware_config,
18 const scoped_refptr<MediaLog>& media_log, 18 const scoped_refptr<MediaLog>& media_log,
19 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, 19 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories,
20 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 20 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
21 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 21 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
22 const EncryptedMediaPlayerSupportCreateCB& 22 const EncryptedMediaPlayerSupportCreateCB&
23 encrypted_media_player_support_cb, 23 encrypted_media_player_support_cb,
24 const Context3DProviderCB& shared_main_thread_context_3d_provider_cb,
24 blink::WebContentDecryptionModule* initial_cdm) 25 blink::WebContentDecryptionModule* initial_cdm)
25 : defer_load_cb_(defer_load_cb), 26 : defer_load_cb_(defer_load_cb),
26 audio_renderer_sink_(audio_renderer_sink), 27 audio_renderer_sink_(audio_renderer_sink),
27 audio_hardware_config_(audio_hardware_config), 28 audio_hardware_config_(audio_hardware_config),
28 media_log_(media_log), 29 media_log_(media_log),
29 gpu_factories_(gpu_factories), 30 gpu_factories_(gpu_factories),
30 media_task_runner_(media_task_runner), 31 media_task_runner_(media_task_runner),
31 compositor_task_runner_(compositor_task_runner), 32 compositor_task_runner_(compositor_task_runner),
32 encrypted_media_player_support_cb_(encrypted_media_player_support_cb), 33 encrypted_media_player_support_cb_(encrypted_media_player_support_cb),
34 shared_main_thread_context_3d_provider_cb_(
35 shared_main_thread_context_3d_provider_cb),
33 initial_cdm_(initial_cdm) { 36 initial_cdm_(initial_cdm) {
34 } 37 }
35 38
36 WebMediaPlayerParams::~WebMediaPlayerParams() {} 39 WebMediaPlayerParams::~WebMediaPlayerParams() {}
37 40
38 scoped_ptr<EncryptedMediaPlayerSupport> 41 scoped_ptr<EncryptedMediaPlayerSupport>
39 WebMediaPlayerParams::CreateEncryptedMediaPlayerSupport( 42 WebMediaPlayerParams::CreateEncryptedMediaPlayerSupport(
40 blink::WebMediaPlayerClient* client) const { 43 blink::WebMediaPlayerClient* client) const {
41 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support = 44 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support =
42 encrypted_media_player_support_cb_.Run(client); 45 encrypted_media_player_support_cb_.Run(client);
43 if (encrypted_media_support) 46 if (encrypted_media_support)
44 encrypted_media_support->SetInitialContentDecryptionModule(initial_cdm_); 47 encrypted_media_support->SetInitialContentDecryptionModule(initial_cdm_);
45 return encrypted_media_support.Pass(); 48 return encrypted_media_support.Pass();
46 } 49 }
47 50
48 } // namespace media 51 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698