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

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

Issue 818853004: Revert of media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/blink/webmediaplayer_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/filters/context_3d.h"
12 11
13 namespace base { 12 namespace base {
14 class SingleThreadTaskRunner; 13 class SingleThreadTaskRunner;
15 } 14 }
16 15
17 namespace blink { 16 namespace blink {
18 class WebContentDecryptionModule; 17 class WebContentDecryptionModule;
19 class WebMediaPlayerClient; 18 class WebMediaPlayerClient;
20 } 19 }
21 20
22 namespace media { 21 namespace media {
23 22
24 class AudioRendererSink; 23 class AudioRendererSink;
25 class MediaLog; 24 class MediaLog;
26 25
27 // Holds parameters for constructing WebMediaPlayerImpl without having 26 // Holds parameters for constructing WebMediaPlayerImpl without having
28 // to plumb arguments through various abstraction layers. 27 // to plumb arguments through various abstraction layers.
29 class MEDIA_EXPORT WebMediaPlayerParams { 28 class MEDIA_EXPORT WebMediaPlayerParams {
30 public: 29 public:
31 typedef base::Callback<void(const base::Closure&)> DeferLoadCB; 30 typedef base::Callback<void(const base::Closure&)> DeferLoadCB;
32 typedef base::Callback<Context3D()> Context3DCB;
33 31
34 // |defer_load_cb|, |audio_renderer_sink|, |compositor_task_runner|, and 32 // |defer_load_cb|, |audio_renderer_sink|, and |compositor_task_runner| may be
35 // |context_3d_cb| may be null. 33 // null.
36 WebMediaPlayerParams( 34 WebMediaPlayerParams(
37 const DeferLoadCB& defer_load_cb, 35 const DeferLoadCB& defer_load_cb,
38 const scoped_refptr<AudioRendererSink>& audio_renderer_sink, 36 const scoped_refptr<AudioRendererSink>& audio_renderer_sink,
39 const scoped_refptr<MediaLog>& media_log, 37 const scoped_refptr<MediaLog>& media_log,
40 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 38 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
41 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 39 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
42 const Context3DCB& context_3d,
43 blink::WebContentDecryptionModule* initial_cdm); 40 blink::WebContentDecryptionModule* initial_cdm);
44 41
45 ~WebMediaPlayerParams(); 42 ~WebMediaPlayerParams();
46 43
47 DeferLoadCB defer_load_cb() const { return defer_load_cb_; } 44 base::Callback<void(const base::Closure&)> defer_load_cb() const {
45 return defer_load_cb_;
46 }
48 47
49 const scoped_refptr<AudioRendererSink>& audio_renderer_sink() const { 48 const scoped_refptr<AudioRendererSink>& audio_renderer_sink() const {
50 return audio_renderer_sink_; 49 return audio_renderer_sink_;
51 } 50 }
52 51
53 const scoped_refptr<MediaLog>& media_log() const { 52 const scoped_refptr<MediaLog>& media_log() const {
54 return media_log_; 53 return media_log_;
55 } 54 }
56 55
57 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner() const { 56 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner() const {
58 return media_task_runner_; 57 return media_task_runner_;
59 } 58 }
60 59
61 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner() 60 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner()
62 const { 61 const {
63 return compositor_task_runner_; 62 return compositor_task_runner_;
64 } 63 }
65 64
66 blink::WebContentDecryptionModule* initial_cdm() const { 65 blink::WebContentDecryptionModule* initial_cdm() const {
67 return initial_cdm_; 66 return initial_cdm_;
68 } 67 }
69 68
70 Context3DCB context_3d_cb() const { return context_3d_cb_; }
71
72 private: 69 private:
73 DeferLoadCB defer_load_cb_; 70 base::Callback<void(const base::Closure&)> defer_load_cb_;
74 scoped_refptr<AudioRendererSink> audio_renderer_sink_; 71 scoped_refptr<AudioRendererSink> audio_renderer_sink_;
75 scoped_refptr<MediaLog> media_log_; 72 scoped_refptr<MediaLog> media_log_;
76 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 73 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
77 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 74 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
78 Context3DCB context_3d_cb_;
79 blink::WebContentDecryptionModule* initial_cdm_; 75 blink::WebContentDecryptionModule* initial_cdm_;
80 76
81 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams);
82 }; 78 };
83 79
84 } // namespace media 80 } // namespace media
85 81
86 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 82 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/blink/webmediaplayer_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698