| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void Paint(SkCanvas* canvas, const gfx::Rect& dest_rect, uint8_t alpha); | 68 void Paint(SkCanvas* canvas, const gfx::Rect& dest_rect, uint8_t alpha); |
| 69 void Detach(); | 69 void Detach(); |
| 70 void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out); | 70 void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out); |
| 71 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); | 71 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); |
| 72 bool HasSingleOrigin(); | 72 bool HasSingleOrigin(); |
| 73 bool DidPassCORSAccessCheck() const; | 73 bool DidPassCORSAccessCheck() const; |
| 74 | 74 |
| 75 void AbortDataSource(); | 75 void AbortDataSource(); |
| 76 | 76 |
| 77 // Methods for Pipeline -> WebMediaPlayerImpl communication. | 77 // Methods for Pipeline -> WebMediaPlayerImpl communication. |
| 78 void PipelineInitializationCallback(media::PipelineStatus status); | |
| 79 void PipelineSeekCallback(media::PipelineStatus status); | 78 void PipelineSeekCallback(media::PipelineStatus status); |
| 80 void PipelineEndedCallback(media::PipelineStatus status); | 79 void PipelineEndedCallback(media::PipelineStatus status); |
| 81 void PipelineErrorCallback(media::PipelineStatus error); | 80 void PipelineErrorCallback(media::PipelineStatus error); |
| 81 void PipelineBufferingStateCallback( |
| 82 media::Pipeline::BufferingState buffering_state); |
| 82 | 83 |
| 83 // ChunkDemuxerClient implementation. | 84 // ChunkDemuxerClient implementation. |
| 84 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; | 85 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; |
| 85 virtual void DemuxerClosed() OVERRIDE; | 86 virtual void DemuxerClosed() OVERRIDE; |
| 86 virtual void DemuxerNeedKey(scoped_array<uint8> init_data, | 87 virtual void DemuxerNeedKey(scoped_array<uint8> init_data, |
| 87 int init_data_size) OVERRIDE; | 88 int init_data_size) OVERRIDE; |
| 88 | 89 |
| 89 // Methods for Demuxer communication. | 90 // Methods for Demuxer communication. |
| 90 void DemuxerStartWaitingForSeek(); | 91 void DemuxerStartWaitingForSeek(); |
| 91 void DemuxerCancelPendingSeek(); | 92 void DemuxerCancelPendingSeek(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 117 scoped_array<uint8> init_data, | 118 scoped_array<uint8> init_data, |
| 118 int init_data_size) OVERRIDE; | 119 int init_data_size) OVERRIDE; |
| 119 | 120 |
| 120 private: | 121 private: |
| 121 friend class base::RefCountedThreadSafe<WebMediaPlayerProxy>; | 122 friend class base::RefCountedThreadSafe<WebMediaPlayerProxy>; |
| 122 virtual ~WebMediaPlayerProxy(); | 123 virtual ~WebMediaPlayerProxy(); |
| 123 | 124 |
| 124 // Invoke |webmediaplayer_| to perform a repaint. | 125 // Invoke |webmediaplayer_| to perform a repaint. |
| 125 void RepaintTask(); | 126 void RepaintTask(); |
| 126 | 127 |
| 127 // Notify |webmediaplayer_| that initialization has finished. | |
| 128 void PipelineInitializationTask(media::PipelineStatus status); | |
| 129 | |
| 130 // Notify |webmediaplayer_| that a seek has finished. | 128 // Notify |webmediaplayer_| that a seek has finished. |
| 131 void PipelineSeekTask(media::PipelineStatus status); | 129 void PipelineSeekTask(media::PipelineStatus status); |
| 132 | 130 |
| 133 // Notify |webmediaplayer_| that the media has ended. | 131 // Notify |webmediaplayer_| that the media has ended. |
| 134 void PipelineEndedTask(media::PipelineStatus status); | 132 void PipelineEndedTask(media::PipelineStatus status); |
| 135 | 133 |
| 136 // Notify |webmediaplayer_| that a pipeline error has occurred during | 134 // Notify |webmediaplayer_| that a pipeline error has occurred during |
| 137 // playback. | 135 // playback. |
| 138 void PipelineErrorTask(media::PipelineStatus error); | 136 void PipelineErrorTask(media::PipelineStatus error); |
| 139 | 137 |
| 138 // Notify |webmediaplayer_| of buffering state changes. |
| 139 void PipelineBufferingStateTask( |
| 140 media::Pipeline::BufferingState buffering_state); |
| 141 |
| 140 // Inform |webmediaplayer_| whether the video content is opaque. | 142 // Inform |webmediaplayer_| whether the video content is opaque. |
| 141 void SetOpaqueTask(bool opaque); | 143 void SetOpaqueTask(bool opaque); |
| 142 | 144 |
| 143 void DemuxerOpenedTask(const scoped_refptr<media::ChunkDemuxer>& demuxer); | 145 void DemuxerOpenedTask(const scoped_refptr<media::ChunkDemuxer>& demuxer); |
| 144 void DemuxerClosedTask(); | 146 void DemuxerClosedTask(); |
| 145 | 147 |
| 146 // Notify |webmediaplayer_| that a key has been added. | 148 // Notify |webmediaplayer_| that a key has been added. |
| 147 void KeyAddedTask(const std::string& key_system, | 149 void KeyAddedTask(const std::string& key_system, |
| 148 const std::string& session_id); | 150 const std::string& session_id); |
| 149 | 151 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 178 int outstanding_repaints_; | 180 int outstanding_repaints_; |
| 179 | 181 |
| 180 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; | 182 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; |
| 181 | 183 |
| 182 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); | 184 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); |
| 183 }; | 185 }; |
| 184 | 186 |
| 185 } // namespace webkit_media | 187 } // namespace webkit_media |
| 186 | 188 |
| 187 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 189 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
| OLD | NEW |