OLD | NEW |
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 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool HasSingleOrigin(); | 78 bool HasSingleOrigin(); |
79 bool DidPassCORSAccessCheck() const; | 79 bool DidPassCORSAccessCheck() const; |
80 | 80 |
81 void AbortDataSource(); | 81 void AbortDataSource(); |
82 | 82 |
83 // Methods for Pipeline -> WebMediaPlayerImpl communication. | 83 // Methods for Pipeline -> WebMediaPlayerImpl communication. |
84 void PipelineInitializationCallback(media::PipelineStatus status); | 84 void PipelineInitializationCallback(media::PipelineStatus status); |
85 void PipelineSeekCallback(media::PipelineStatus status); | 85 void PipelineSeekCallback(media::PipelineStatus status); |
86 void PipelineEndedCallback(media::PipelineStatus status); | 86 void PipelineEndedCallback(media::PipelineStatus status); |
87 void PipelineErrorCallback(media::PipelineStatus error); | 87 void PipelineErrorCallback(media::PipelineStatus error); |
88 void NetworkEventCallback(media::NetworkEvent type); | |
89 | 88 |
90 // ChunkDemuxerClient implementation. | 89 // ChunkDemuxerClient implementation. |
91 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; | 90 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; |
92 virtual void DemuxerClosed() OVERRIDE; | 91 virtual void DemuxerClosed() OVERRIDE; |
93 virtual void KeyNeeded(scoped_array<uint8> init_data, | 92 virtual void KeyNeeded(scoped_array<uint8> init_data, |
94 int init_data_size) OVERRIDE; | 93 int init_data_size) OVERRIDE; |
95 | 94 |
96 // Methods for Demuxer communication. | 95 // Methods for Demuxer communication. |
97 void DemuxerStartWaitingForSeek(); | 96 void DemuxerStartWaitingForSeek(); |
98 media::ChunkDemuxer::Status DemuxerAddId(const std::string& id, | 97 media::ChunkDemuxer::Status DemuxerAddId(const std::string& id, |
(...skipping 24 matching lines...) Expand all Loading... |
123 // Notify |webmediaplayer_| that a seek has finished. | 122 // Notify |webmediaplayer_| that a seek has finished. |
124 void PipelineSeekTask(media::PipelineStatus status); | 123 void PipelineSeekTask(media::PipelineStatus status); |
125 | 124 |
126 // Notify |webmediaplayer_| that the media has ended. | 125 // Notify |webmediaplayer_| that the media has ended. |
127 void PipelineEndedTask(media::PipelineStatus status); | 126 void PipelineEndedTask(media::PipelineStatus status); |
128 | 127 |
129 // Notify |webmediaplayer_| that a pipeline error has occurred during | 128 // Notify |webmediaplayer_| that a pipeline error has occurred during |
130 // playback. | 129 // playback. |
131 void PipelineErrorTask(media::PipelineStatus error); | 130 void PipelineErrorTask(media::PipelineStatus error); |
132 | 131 |
133 // Notify |webmediaplayer_| that there's a network event. | |
134 void NetworkEventTask(media::NetworkEvent type); | |
135 | |
136 // Inform |webmediaplayer_| whether the video content is opaque. | 132 // Inform |webmediaplayer_| whether the video content is opaque. |
137 void SetOpaqueTask(bool opaque); | 133 void SetOpaqueTask(bool opaque); |
138 | 134 |
139 // The render message loop where WebKit lives. | 135 // The render message loop where WebKit lives. |
140 scoped_refptr<base::MessageLoopProxy> render_loop_; | 136 scoped_refptr<base::MessageLoopProxy> render_loop_; |
141 WebMediaPlayerImpl* webmediaplayer_; | 137 WebMediaPlayerImpl* webmediaplayer_; |
142 | 138 |
143 scoped_refptr<BufferedDataSource> data_source_; | 139 scoped_refptr<BufferedDataSource> data_source_; |
144 scoped_refptr<media::VideoRendererBase> frame_provider_; | 140 scoped_refptr<media::VideoRendererBase> frame_provider_; |
145 SkCanvasVideoRenderer video_renderer_; | 141 SkCanvasVideoRenderer video_renderer_; |
146 scoped_refptr<media::FFmpegVideoDecoder> video_decoder_; | 142 scoped_refptr<media::FFmpegVideoDecoder> video_decoder_; |
147 | 143 |
148 base::Lock lock_; | 144 base::Lock lock_; |
149 int outstanding_repaints_; | 145 int outstanding_repaints_; |
150 | 146 |
151 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; | 147 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; |
152 | 148 |
153 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); | 149 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); |
154 }; | 150 }; |
155 | 151 |
156 } // namespace webkit_media | 152 } // namespace webkit_media |
157 | 153 |
158 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 154 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
OLD | NEW |