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_MS_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_MS_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_MS_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_MS_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 WebKit::WebMediaSource* media_source, | 68 WebKit::WebMediaSource* media_source, |
69 CORSMode cors_mode) OVERRIDE; | 69 CORSMode cors_mode) OVERRIDE; |
70 virtual void cancelLoad() OVERRIDE; | 70 virtual void cancelLoad() OVERRIDE; |
71 | 71 |
72 // Playback controls. | 72 // Playback controls. |
73 virtual void play() OVERRIDE; | 73 virtual void play() OVERRIDE; |
74 virtual void pause() OVERRIDE; | 74 virtual void pause() OVERRIDE; |
75 virtual bool supportsFullscreen() const OVERRIDE; | 75 virtual bool supportsFullscreen() const OVERRIDE; |
76 virtual bool supportsSave() const OVERRIDE; | 76 virtual bool supportsSave() const OVERRIDE; |
77 virtual void seekFloat(float seconds); | 77 virtual void seekFloat(float seconds); |
78 virtual void seek(float seconds); | 78 virtual void seek(double seconds); |
79 virtual void setEndTimeFloat(float seconds); | 79 virtual void setEndTimeFloat(float seconds); |
80 virtual void setEndTime(float seconds); | 80 virtual void setEndTime(double seconds); |
81 virtual void setRateFloat(float rate); | 81 virtual void setRateFloat(float rate); |
82 virtual void setRate(float rate); | 82 virtual void setRate(double rate); |
83 virtual void setVolumeFloat(float volume); | 83 virtual void setVolumeFloat(float volume); |
84 virtual void setVolume(float volume); | 84 virtual void setVolume(double volume); |
85 virtual void setVisible(bool visible) OVERRIDE; | 85 virtual void setVisible(bool visible) OVERRIDE; |
86 virtual void setPreload(WebKit::WebMediaPlayer::Preload preload) OVERRIDE; | 86 virtual void setPreload(WebKit::WebMediaPlayer::Preload preload) OVERRIDE; |
87 virtual bool totalBytesKnown() OVERRIDE; | 87 virtual bool totalBytesKnown() OVERRIDE; |
88 virtual const WebKit::WebTimeRanges& buffered() OVERRIDE; | 88 virtual const WebKit::WebTimeRanges& buffered() OVERRIDE; |
89 virtual float maxTimeSeekableFloat() const; | 89 virtual float maxTimeSeekableFloat() const; |
90 virtual float maxTimeSeekable() const; | 90 virtual double maxTimeSeekable() const; |
91 | 91 |
92 // Methods for painting. | 92 // Methods for painting. |
93 virtual void setSize(const WebKit::WebSize& size) OVERRIDE; | 93 virtual void setSize(const WebKit::WebSize& size) OVERRIDE; |
94 | 94 |
95 virtual void paint(WebKit::WebCanvas* canvas, | 95 virtual void paint(WebKit::WebCanvas* canvas, |
96 const WebKit::WebRect& rect, | 96 const WebKit::WebRect& rect, |
97 uint8_t alpha) OVERRIDE; | 97 uint8_t alpha) OVERRIDE; |
98 | 98 |
99 // True if the loaded media has a playable video/audio track. | 99 // True if the loaded media has a playable video/audio track. |
100 virtual bool hasVideo() const OVERRIDE; | 100 virtual bool hasVideo() const OVERRIDE; |
101 virtual bool hasAudio() const OVERRIDE; | 101 virtual bool hasAudio() const OVERRIDE; |
102 | 102 |
103 // Dimensions of the video. | 103 // Dimensions of the video. |
104 virtual WebKit::WebSize naturalSize() const OVERRIDE; | 104 virtual WebKit::WebSize naturalSize() const OVERRIDE; |
105 | 105 |
106 // Getters of playback state. | 106 // Getters of playback state. |
107 virtual bool paused() const OVERRIDE; | 107 virtual bool paused() const OVERRIDE; |
108 virtual bool seeking() const OVERRIDE; | 108 virtual bool seeking() const OVERRIDE; |
109 virtual float durationFloat() const; | 109 virtual float durationFloat() const; |
110 virtual float duration() const; | 110 virtual double duration() const; |
111 virtual float currentTimeFloat() const; | 111 virtual float currentTimeFloat() const; |
112 virtual float currentTime() const; | 112 virtual double currentTime() const; |
113 | 113 |
114 // Get rate of loading the resource. | 114 // Get rate of loading the resource. |
115 virtual int32 dataRate() const OVERRIDE; | 115 virtual int32 dataRate() const OVERRIDE; |
116 | 116 |
117 // Internal states of loading and network. | 117 // Internal states of loading and network. |
118 virtual WebKit::WebMediaPlayer::NetworkState networkState() const OVERRIDE; | 118 virtual WebKit::WebMediaPlayer::NetworkState networkState() const OVERRIDE; |
119 virtual WebKit::WebMediaPlayer::ReadyState readyState() const OVERRIDE; | 119 virtual WebKit::WebMediaPlayer::ReadyState readyState() const OVERRIDE; |
120 | 120 |
121 virtual bool didLoadingProgress() const OVERRIDE; | 121 virtual bool didLoadingProgress() const OVERRIDE; |
122 virtual unsigned long long totalBytes() const OVERRIDE; | 122 virtual unsigned long long totalBytes() const OVERRIDE; |
123 | 123 |
124 virtual bool hasSingleSecurityOrigin() const OVERRIDE; | 124 virtual bool hasSingleSecurityOrigin() const OVERRIDE; |
125 virtual bool didPassCORSAccessCheck() const OVERRIDE; | 125 virtual bool didPassCORSAccessCheck() const OVERRIDE; |
126 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const OVERRIDE; | 126 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const OVERRIDE; |
127 | 127 |
128 virtual float mediaTimeForTimeValueFloat(float timeValue) const; | 128 virtual float mediaTimeForTimeValueFloat(float timeValue) const; |
129 virtual float mediaTimeForTimeValue(float timeValue) const; | 129 virtual double mediaTimeForTimeValue(double timeValue) const; |
130 | 130 |
131 virtual unsigned decodedFrameCount() const OVERRIDE; | 131 virtual unsigned decodedFrameCount() const OVERRIDE; |
132 virtual unsigned droppedFrameCount() const OVERRIDE; | 132 virtual unsigned droppedFrameCount() const OVERRIDE; |
133 virtual unsigned audioDecodedByteCount() const OVERRIDE; | 133 virtual unsigned audioDecodedByteCount() const OVERRIDE; |
134 virtual unsigned videoDecodedByteCount() const OVERRIDE; | 134 virtual unsigned videoDecodedByteCount() const OVERRIDE; |
135 | 135 |
136 // VideoFrameProvider implementation. | 136 // VideoFrameProvider implementation. |
137 virtual void SetVideoFrameProviderClient( | 137 virtual void SetVideoFrameProviderClient( |
138 cc::VideoFrameProvider::Client* client) OVERRIDE; | 138 cc::VideoFrameProvider::Client* client) OVERRIDE; |
139 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE; | 139 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_; | 202 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_; |
203 | 203 |
204 scoped_refptr<media::MediaLog> media_log_; | 204 scoped_refptr<media::MediaLog> media_log_; |
205 | 205 |
206 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); | 206 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); |
207 }; | 207 }; |
208 | 208 |
209 } // namespace webkit_media | 209 } // namespace webkit_media |
210 | 210 |
211 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_MS_H_ | 211 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_MS_H_ |
OLD | NEW |