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

Side by Side Diff: webkit/media/android/webmediaplayer_android.h

Issue 13866046: Change original WebMediaPlayer signatures from float to double. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 virtual void load(const WebKit::WebURL& url, CORSMode cors_mode); 37 virtual void load(const WebKit::WebURL& url, CORSMode cors_mode);
38 virtual void load(const WebKit::WebURL& url, 38 virtual void load(const WebKit::WebURL& url,
39 WebKit::WebMediaSource* media_source, 39 WebKit::WebMediaSource* media_source,
40 CORSMode cors_mode); 40 CORSMode cors_mode);
41 virtual void cancelLoad(); 41 virtual void cancelLoad();
42 42
43 // Playback controls. 43 // Playback controls.
44 virtual void play(); 44 virtual void play();
45 virtual void pause(); 45 virtual void pause();
46 virtual void seekFloat(float seconds); 46 virtual void seekFloat(float seconds);
47 virtual void seek(float seconds); 47 virtual void seek(double seconds);
48 virtual bool supportsFullscreen() const; 48 virtual bool supportsFullscreen() const;
49 virtual bool supportsSave() const; 49 virtual bool supportsSave() const;
50 virtual void setEndTimeFloat(float seconds); 50 virtual void setEndTimeFloat(float seconds);
51 virtual void setEndTime(float seconds); 51 virtual void setEndTime(double seconds);
52 virtual void setRateFloat(float rate); 52 virtual void setRateFloat(float rate);
53 virtual void setRate(float rate); 53 virtual void setRate(double rate);
54 virtual void setVolumeFloat(float volume); 54 virtual void setVolumeFloat(float volume);
55 virtual void setVolume(float volume); 55 virtual void setVolume(double volume);
56 virtual void setVisible(bool visible); 56 virtual void setVisible(bool visible);
57 virtual bool totalBytesKnown(); 57 virtual bool totalBytesKnown();
58 virtual const WebKit::WebTimeRanges& buffered(); 58 virtual const WebKit::WebTimeRanges& buffered();
59 virtual float maxTimeSeekableFloat() const; 59 virtual float maxTimeSeekableFloat() const;
60 virtual float maxTimeSeekable() const; 60 virtual double maxTimeSeekable() const;
61 61
62 // Methods for painting. 62 // Methods for painting.
63 virtual void setSize(const WebKit::WebSize& size); 63 virtual void setSize(const WebKit::WebSize& size);
64 virtual void paint(WebKit::WebCanvas* canvas, 64 virtual void paint(WebKit::WebCanvas* canvas,
65 const WebKit::WebRect& rect, 65 const WebKit::WebRect& rect,
66 uint8_t alpha); 66 uint8_t alpha);
67 67
68 // True if the loaded media has a playable video/audio track. 68 // True if the loaded media has a playable video/audio track.
69 virtual bool hasVideo() const; 69 virtual bool hasVideo() const;
70 virtual bool hasAudio() const; 70 virtual bool hasAudio() const;
71 71
72 // Dimensions of the video. 72 // Dimensions of the video.
73 virtual WebKit::WebSize naturalSize() const; 73 virtual WebKit::WebSize naturalSize() const;
74 74
75 // Getters of playback state. 75 // Getters of playback state.
76 virtual bool paused() const; 76 virtual bool paused() const;
77 virtual bool seeking() const; 77 virtual bool seeking() const;
78 virtual float durationFloat() const; 78 virtual float durationFloat() const;
79 virtual float duration() const; 79 virtual double duration() const;
80 virtual float currentTimeFloat() const; 80 virtual float currentTimeFloat() const;
81 virtual float currentTime() const; 81 virtual double currentTime() const;
82 82
83 // Get rate of loading the resource. 83 // Get rate of loading the resource.
84 virtual int32 dataRate() const; 84 virtual int32 dataRate() const;
85 85
86 virtual bool didLoadingProgress() const; 86 virtual bool didLoadingProgress() const;
87 virtual unsigned long long totalBytes() const; 87 virtual unsigned long long totalBytes() const;
88 88
89 // Internal states of loading and network. 89 // Internal states of loading and network.
90 virtual WebKit::WebMediaPlayer::NetworkState networkState() const; 90 virtual WebKit::WebMediaPlayer::NetworkState networkState() const;
91 virtual WebKit::WebMediaPlayer::ReadyState readyState() const; 91 virtual WebKit::WebMediaPlayer::ReadyState readyState() const;
92 92
93 virtual bool hasSingleSecurityOrigin() const; 93 virtual bool hasSingleSecurityOrigin() const;
94 virtual bool didPassCORSAccessCheck() const; 94 virtual bool didPassCORSAccessCheck() const;
95 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const; 95 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const;
96 96
97 virtual float mediaTimeForTimeValueFloat(float timeValue) const; 97 virtual float mediaTimeForTimeValueFloat(float timeValue) const;
98 virtual float mediaTimeForTimeValue(float timeValue) const; 98 virtual double mediaTimeForTimeValue(double timeValue) const;
99 99
100 // Provide statistics. 100 // Provide statistics.
101 virtual unsigned decodedFrameCount() const; 101 virtual unsigned decodedFrameCount() const;
102 virtual unsigned droppedFrameCount() const; 102 virtual unsigned droppedFrameCount() const;
103 virtual unsigned audioDecodedByteCount() const; 103 virtual unsigned audioDecodedByteCount() const;
104 virtual unsigned videoDecodedByteCount() const; 104 virtual unsigned videoDecodedByteCount() const;
105 105
106 // cc::VideoFrameProvider implementation. These methods are running on the 106 // cc::VideoFrameProvider implementation. These methods are running on the
107 // compositor thread. 107 // compositor thread.
108 virtual void SetVideoFrameProviderClient( 108 virtual void SetVideoFrameProviderClient(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Inform the media player to start playing. 169 // Inform the media player to start playing.
170 virtual void PlayInternal() = 0; 170 virtual void PlayInternal() = 0;
171 171
172 // Inform the media player to pause. 172 // Inform the media player to pause.
173 virtual void PauseInternal() = 0; 173 virtual void PauseInternal() = 0;
174 174
175 // Inform the media player to seek to a particular position. 175 // Inform the media player to seek to a particular position.
176 virtual void SeekInternal(base::TimeDelta time) = 0; 176 virtual void SeekInternal(base::TimeDelta time) = 0;
177 177
178 // Get the current time from the media player. 178 // Get the current time from the media player.
179 virtual float GetCurrentTimeInternal() const = 0; 179 virtual double GetCurrentTimeInternal() const = 0;
180 180
181 // Release the Android Media player. 181 // Release the Android Media player.
182 virtual void ReleaseResourcesInternal() = 0; 182 virtual void ReleaseResourcesInternal() = 0;
183 183
184 // Cleaning up all remaining resources as this object is about to get deleted. 184 // Cleaning up all remaining resources as this object is about to get deleted.
185 virtual void Destroy() = 0; 185 virtual void Destroy() = 0;
186 186
187 WebKit::WebMediaPlayerClient* client() { return client_; } 187 WebKit::WebMediaPlayerClient* client() { return client_; }
188 188
189 int player_id() const { return player_id_; } 189 int player_id() const { return player_id_; }
(...skipping 20 matching lines...) Expand all
210 // Message loop for main renderer thread. 210 // Message loop for main renderer thread.
211 MessageLoop* main_loop_; 211 MessageLoop* main_loop_;
212 212
213 // URL of the media file to be fetched. 213 // URL of the media file to be fetched.
214 GURL url_; 214 GURL url_;
215 215
216 // Media duration. 216 // Media duration.
217 base::TimeDelta duration_; 217 base::TimeDelta duration_;
218 218
219 // The time android media player is trying to seek. 219 // The time android media player is trying to seek.
220 float pending_seek_; 220 double pending_seek_;
221 221
222 // Internal seek state. 222 // Internal seek state.
223 bool seeking_; 223 bool seeking_;
224 224
225 // Whether loading has progressed since the last call to didLoadingProgress. 225 // Whether loading has progressed since the last call to didLoadingProgress.
226 mutable bool did_loading_progress_; 226 mutable bool did_loading_progress_;
227 227
228 // Manager for managing this object. 228 // Manager for managing this object.
229 WebMediaPlayerManagerAndroid* manager_; 229 WebMediaPlayerManagerAndroid* manager_;
230 230
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 cc::VideoFrameProvider::Client* video_frame_provider_client_; 265 cc::VideoFrameProvider::Client* video_frame_provider_client_;
266 266
267 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 267 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
268 268
269 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 269 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
270 }; 270 };
271 271
272 } // namespace webkit_media 272 } // namespace webkit_media
273 273
274 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 274 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/android/webmediaplayer_android.cc » ('j') | webkit/media/android/webmediaplayer_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698