| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 12 #include "media/base/pipeline.h" |
| 12 #include "media/filters/chunk_demuxer_client.h" | 13 #include "media/filters/chunk_demuxer_client.h" |
| 13 #include "webkit/media/web_data_source.h" | 14 #include "webkit/media/web_data_source.h" |
| 14 | 15 |
| 15 class MessageLoop; | 16 class MessageLoop; |
| 16 class SkCanvas; | 17 class SkCanvas; |
| 17 | 18 |
| 18 namespace gfx { | 19 namespace gfx { |
| 19 class Rect; | 20 class Rect; |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 45 void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out); | 46 void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out); |
| 46 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); | 47 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); |
| 47 bool HasSingleOrigin(); | 48 bool HasSingleOrigin(); |
| 48 void AbortDataSources(); | 49 void AbortDataSources(); |
| 49 | 50 |
| 50 // Methods for PipelineImpl -> WebMediaPlayerImpl communication. | 51 // Methods for PipelineImpl -> WebMediaPlayerImpl communication. |
| 51 void PipelineInitializationCallback(media::PipelineStatus status); | 52 void PipelineInitializationCallback(media::PipelineStatus status); |
| 52 void PipelineSeekCallback(media::PipelineStatus status); | 53 void PipelineSeekCallback(media::PipelineStatus status); |
| 53 void PipelineEndedCallback(media::PipelineStatus status); | 54 void PipelineEndedCallback(media::PipelineStatus status); |
| 54 void PipelineErrorCallback(media::PipelineStatus error); | 55 void PipelineErrorCallback(media::PipelineStatus error); |
| 55 void NetworkEventCallback(bool network_activity); | 56 void NetworkEventCallback(media::NetworkEvent type); |
| 56 | 57 |
| 57 // ChunkDemuxerClient implementation. | 58 // ChunkDemuxerClient implementation. |
| 58 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; | 59 virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; |
| 59 virtual void DemuxerClosed() OVERRIDE; | 60 virtual void DemuxerClosed() OVERRIDE; |
| 60 | 61 |
| 61 // Methods for Demuxer communication. | 62 // Methods for Demuxer communication. |
| 62 void DemuxerFlush(); | 63 void DemuxerFlush(); |
| 63 bool DemuxerAppend(const uint8* data, size_t length); | 64 bool DemuxerAppend(const uint8* data, size_t length); |
| 64 void DemuxerEndOfStream(media::PipelineStatus status); | 65 void DemuxerEndOfStream(media::PipelineStatus status); |
| 65 void DemuxerShutdown(); | 66 void DemuxerShutdown(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 87 void PipelineSeekTask(media::PipelineStatus status); | 88 void PipelineSeekTask(media::PipelineStatus status); |
| 88 | 89 |
| 89 // Notify |webmediaplayer_| that the media has ended. | 90 // Notify |webmediaplayer_| that the media has ended. |
| 90 void PipelineEndedTask(media::PipelineStatus status); | 91 void PipelineEndedTask(media::PipelineStatus status); |
| 91 | 92 |
| 92 // Notify |webmediaplayer_| that a pipeline error has occurred during | 93 // Notify |webmediaplayer_| that a pipeline error has occurred during |
| 93 // playback. | 94 // playback. |
| 94 void PipelineErrorTask(media::PipelineStatus error); | 95 void PipelineErrorTask(media::PipelineStatus error); |
| 95 | 96 |
| 96 // Notify |webmediaplayer_| that there's a network event. | 97 // Notify |webmediaplayer_| that there's a network event. |
| 97 void NetworkEventTask(bool network_activity); | 98 void NetworkEventTask(media::NetworkEvent type); |
| 98 | 99 |
| 99 // The render message loop where WebKit lives. | 100 // The render message loop where WebKit lives. |
| 100 MessageLoop* render_loop_; | 101 MessageLoop* render_loop_; |
| 101 WebMediaPlayerImpl* webmediaplayer_; | 102 WebMediaPlayerImpl* webmediaplayer_; |
| 102 | 103 |
| 103 base::Lock data_sources_lock_; | 104 base::Lock data_sources_lock_; |
| 104 typedef std::list<scoped_refptr<WebDataSource> > DataSourceList; | 105 typedef std::list<scoped_refptr<WebDataSource> > DataSourceList; |
| 105 DataSourceList data_sources_; | 106 DataSourceList data_sources_; |
| 106 WebDataSourceBuildObserverHack build_observer_; | 107 WebDataSourceBuildObserverHack build_observer_; |
| 107 | 108 |
| 108 scoped_refptr<WebVideoRenderer> video_renderer_; | 109 scoped_refptr<WebVideoRenderer> video_renderer_; |
| 109 | 110 |
| 110 base::Lock lock_; | 111 base::Lock lock_; |
| 111 int outstanding_repaints_; | 112 int outstanding_repaints_; |
| 112 | 113 |
| 113 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; | 114 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; |
| 114 | 115 |
| 115 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); | 116 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace webkit_media | 119 } // namespace webkit_media |
| 119 | 120 |
| 120 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 121 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
| OLD | NEW |