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

Side by Side Diff: webkit/media/webmediaplayer_impl.h

Issue 13431009: Add xxxFloat() methods to WebMediaPlayer implementations. (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
« no previous file with comments | « webkit/media/android/webmediaplayer_android.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains Pipeline which is the actual media player pipeline, it glues 6 // It contains Pipeline which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer. 7 // the media player pipeline, data source, audio renderer and renderer.
8 // Pipeline would creates multiple threads and access some public methods 8 // Pipeline would creates multiple threads and access some public methods
9 // of this class, so we need to be extra careful about concurrent access of 9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members. 10 // methods and members.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 virtual void load(const WebKit::WebURL& url, 88 virtual void load(const WebKit::WebURL& url,
89 WebKit::WebMediaSource* media_source, 89 WebKit::WebMediaSource* media_source,
90 CORSMode cors_mode); 90 CORSMode cors_mode);
91 virtual void cancelLoad(); 91 virtual void cancelLoad();
92 92
93 // Playback controls. 93 // Playback controls.
94 virtual void play(); 94 virtual void play();
95 virtual void pause(); 95 virtual void pause();
96 virtual bool supportsFullscreen() const; 96 virtual bool supportsFullscreen() const;
97 virtual bool supportsSave() const; 97 virtual bool supportsSave() const;
98 virtual void seekFloat(float seconds);
98 virtual void seek(float seconds); 99 virtual void seek(float seconds);
100 virtual void setEndTimeFloat(float seconds);
99 virtual void setEndTime(float seconds); 101 virtual void setEndTime(float seconds);
102 virtual void setRateFloat(float rate);
100 virtual void setRate(float rate); 103 virtual void setRate(float rate);
104 virtual void setVolumeFloat(float volume);
101 virtual void setVolume(float volume); 105 virtual void setVolume(float volume);
102 virtual void setVisible(bool visible); 106 virtual void setVisible(bool visible);
103 virtual void setPreload(WebKit::WebMediaPlayer::Preload preload); 107 virtual void setPreload(WebKit::WebMediaPlayer::Preload preload);
104 virtual bool totalBytesKnown(); 108 virtual bool totalBytesKnown();
105 virtual const WebKit::WebTimeRanges& buffered(); 109 virtual const WebKit::WebTimeRanges& buffered();
110 virtual float maxTimeSeekableFloat() const;
106 virtual float maxTimeSeekable() const; 111 virtual float maxTimeSeekable() const;
107 112
108 // Methods for painting. 113 // Methods for painting.
109 virtual void setSize(const WebKit::WebSize& size); 114 virtual void setSize(const WebKit::WebSize& size);
110 115
111 virtual void paint(WebKit::WebCanvas* canvas, 116 virtual void paint(WebKit::WebCanvas* canvas,
112 const WebKit::WebRect& rect, 117 const WebKit::WebRect& rect,
113 uint8_t alpha); 118 uint8_t alpha);
114 119
115 // True if the loaded media has a playable video/audio track. 120 // True if the loaded media has a playable video/audio track.
116 virtual bool hasVideo() const; 121 virtual bool hasVideo() const;
117 virtual bool hasAudio() const; 122 virtual bool hasAudio() const;
118 123
119 // Dimensions of the video. 124 // Dimensions of the video.
120 virtual WebKit::WebSize naturalSize() const; 125 virtual WebKit::WebSize naturalSize() const;
121 126
122 // Getters of playback state. 127 // Getters of playback state.
123 virtual bool paused() const; 128 virtual bool paused() const;
124 virtual bool seeking() const; 129 virtual bool seeking() const;
130 virtual float durationFloat() const;
125 virtual float duration() const; 131 virtual float duration() const;
132 virtual float currentTimeFloat() const;
126 virtual float currentTime() const; 133 virtual float currentTime() const;
127 134
128 // Get rate of loading the resource. 135 // Get rate of loading the resource.
129 virtual int32 dataRate() const; 136 virtual int32 dataRate() const;
130 137
131 // Internal states of loading and network. 138 // Internal states of loading and network.
132 // TODO(hclam): Ask the pipeline about the state rather than having reading 139 // TODO(hclam): Ask the pipeline about the state rather than having reading
133 // them from members which would cause race conditions. 140 // them from members which would cause race conditions.
134 virtual WebKit::WebMediaPlayer::NetworkState networkState() const; 141 virtual WebKit::WebMediaPlayer::NetworkState networkState() const;
135 virtual WebKit::WebMediaPlayer::ReadyState readyState() const; 142 virtual WebKit::WebMediaPlayer::ReadyState readyState() const;
136 143
137 virtual bool didLoadingProgress() const; 144 virtual bool didLoadingProgress() const;
138 virtual unsigned long long totalBytes() const; 145 virtual unsigned long long totalBytes() const;
139 146
140 virtual bool hasSingleSecurityOrigin() const; 147 virtual bool hasSingleSecurityOrigin() const;
141 virtual bool didPassCORSAccessCheck() const; 148 virtual bool didPassCORSAccessCheck() const;
142 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const; 149 virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const;
143 150
151 virtual float mediaTimeForTimeValueFloat(float timeValue) const;
144 virtual float mediaTimeForTimeValue(float timeValue) const; 152 virtual float mediaTimeForTimeValue(float timeValue) const;
145 153
146 virtual unsigned decodedFrameCount() const; 154 virtual unsigned decodedFrameCount() const;
147 virtual unsigned droppedFrameCount() const; 155 virtual unsigned droppedFrameCount() const;
148 virtual unsigned audioDecodedByteCount() const; 156 virtual unsigned audioDecodedByteCount() const;
149 virtual unsigned videoDecodedByteCount() const; 157 virtual unsigned videoDecodedByteCount() const;
150 158
151 // cc::VideoFrameProvider implementation. 159 // cc::VideoFrameProvider implementation.
152 virtual void SetVideoFrameProviderClient( 160 virtual void SetVideoFrameProviderClient(
153 cc::VideoFrameProvider::Client* client) OVERRIDE; 161 cc::VideoFrameProvider::Client* client) OVERRIDE;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 cc::VideoFrameProvider::Client* video_frame_provider_client_; 369 cc::VideoFrameProvider::Client* video_frame_provider_client_;
362 370
363 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; 371 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
364 372
365 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 373 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
366 }; 374 };
367 375
368 } // namespace webkit_media 376 } // namespace webkit_media
369 377
370 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 378 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/media/android/webmediaplayer_android.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698