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

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

Issue 1273943002: media: Make GpuMemoryBuffers VideoFrame copies asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on master. Created 5 years, 4 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
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" 11 #include "media/filters/context_3d.h"
12 12
13 namespace base { 13 namespace base {
14 class SequencedTaskRunner;
reveman 2015/08/17 16:38:29 needed?
Daniele Castagna 2015/08/19 21:31:25 No.
14 class SingleThreadTaskRunner; 15 class SingleThreadTaskRunner;
16 class TaskRunner;
15 } 17 }
16 18
17 namespace blink { 19 namespace blink {
18 class WebContentDecryptionModule; 20 class WebContentDecryptionModule;
19 class WebMediaPlayerClient; 21 class WebMediaPlayerClient;
20 } 22 }
21 23
22 namespace media { 24 namespace media {
23 25
24 class AudioRendererSink; 26 class AudioRendererSink;
25 class MediaLog; 27 class MediaLog;
26 class MediaPermission; 28 class MediaPermission;
27 29
28 // Holds parameters for constructing WebMediaPlayerImpl without having 30 // Holds parameters for constructing WebMediaPlayerImpl without having
29 // to plumb arguments through various abstraction layers. 31 // to plumb arguments through various abstraction layers.
30 class MEDIA_EXPORT WebMediaPlayerParams { 32 class MEDIA_EXPORT WebMediaPlayerParams {
31 public: 33 public:
32 typedef base::Callback<void(const base::Closure&)> DeferLoadCB; 34 typedef base::Callback<void(const base::Closure&)> DeferLoadCB;
33 typedef base::Callback<Context3D()> Context3DCB; 35 typedef base::Callback<Context3D()> Context3DCB;
34 36
35 // |defer_load_cb|, |audio_renderer_sink|, |compositor_task_runner|, and 37 // |defer_load_cb|, |audio_renderer_sink|, |compositor_task_runner|, and
36 // |context_3d_cb| may be null. 38 // |context_3d_cb| may be null.
37 WebMediaPlayerParams( 39 WebMediaPlayerParams(
38 const DeferLoadCB& defer_load_cb, 40 const DeferLoadCB& defer_load_cb,
39 const scoped_refptr<AudioRendererSink>& audio_renderer_sink, 41 const scoped_refptr<AudioRendererSink>& audio_renderer_sink,
40 const scoped_refptr<MediaLog>& media_log, 42 const scoped_refptr<MediaLog>& media_log,
41 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 43 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
44 const scoped_refptr<base::TaskRunner>& worker_task_runner,
42 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 45 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
43 const Context3DCB& context_3d, 46 const Context3DCB& context_3d,
44 MediaPermission* media_permission, 47 MediaPermission* media_permission,
45 blink::WebContentDecryptionModule* initial_cdm); 48 blink::WebContentDecryptionModule* initial_cdm);
46 49
47 ~WebMediaPlayerParams(); 50 ~WebMediaPlayerParams();
48 51
49 DeferLoadCB defer_load_cb() const { return defer_load_cb_; } 52 DeferLoadCB defer_load_cb() const { return defer_load_cb_; }
50 53
51 const scoped_refptr<AudioRendererSink>& audio_renderer_sink() const { 54 const scoped_refptr<AudioRendererSink>& audio_renderer_sink() const {
52 return audio_renderer_sink_; 55 return audio_renderer_sink_;
53 } 56 }
54 57
55 const scoped_refptr<MediaLog>& media_log() const { 58 const scoped_refptr<MediaLog>& media_log() const {
56 return media_log_; 59 return media_log_;
57 } 60 }
58 61
59 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner() const { 62 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner() const {
60 return media_task_runner_; 63 return media_task_runner_;
61 } 64 }
62 65
66 const scoped_refptr<base::TaskRunner> worker_task_runner() const {
67 return worker_task_runner_;
68 }
69
63 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner() 70 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner()
64 const { 71 const {
65 return compositor_task_runner_; 72 return compositor_task_runner_;
66 } 73 }
67 74
68 Context3DCB context_3d_cb() const { return context_3d_cb_; } 75 Context3DCB context_3d_cb() const { return context_3d_cb_; }
69 76
70 MediaPermission* media_permission() const { return media_permission_; } 77 MediaPermission* media_permission() const { return media_permission_; }
71 78
72 blink::WebContentDecryptionModule* initial_cdm() const { 79 blink::WebContentDecryptionModule* initial_cdm() const {
73 return initial_cdm_; 80 return initial_cdm_;
74 } 81 }
75 82
76 83
77 private: 84 private:
78 DeferLoadCB defer_load_cb_; 85 DeferLoadCB defer_load_cb_;
79 scoped_refptr<AudioRendererSink> audio_renderer_sink_; 86 scoped_refptr<AudioRendererSink> audio_renderer_sink_;
80 scoped_refptr<MediaLog> media_log_; 87 scoped_refptr<MediaLog> media_log_;
81 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 88 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
89 scoped_refptr<base::TaskRunner> worker_task_runner_;
82 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 90 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
83 Context3DCB context_3d_cb_; 91 Context3DCB context_3d_cb_;
84 92
85 // TODO(xhwang): Remove after prefixed EME API support is removed. 93 // TODO(xhwang): Remove after prefixed EME API support is removed.
86 MediaPermission* media_permission_; 94 MediaPermission* media_permission_;
87 blink::WebContentDecryptionModule* initial_cdm_; 95 blink::WebContentDecryptionModule* initial_cdm_;
88 96
89 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); 97 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams);
90 }; 98 };
91 99
92 } // namespace media 100 } // namespace media
93 101
94 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 102 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698