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

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

Issue 8399023: Fire canplaythrough event at the proper time for audio/video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move canplaythrough logic into pipeline; fix other stuff Created 9 years, 1 month 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) 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains PipelineImpl which is the actual media player pipeline, it glues 6 // It contains PipelineImpl 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 // PipelineImpl would creates multiple threads and access some public methods 8 // PipelineImpl 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // |main_loop_| is being destroyed and we can stop posting repaint task 189 // |main_loop_| is being destroyed and we can stop posting repaint task
190 // to it. 190 // to it.
191 virtual void WillDestroyCurrentMessageLoop(); 191 virtual void WillDestroyCurrentMessageLoop();
192 192
193 void Repaint(); 193 void Repaint();
194 194
195 void OnPipelineInitialize(media::PipelineStatus status); 195 void OnPipelineInitialize(media::PipelineStatus status);
196 void OnPipelineSeek(media::PipelineStatus status); 196 void OnPipelineSeek(media::PipelineStatus status);
197 void OnPipelineEnded(media::PipelineStatus status); 197 void OnPipelineEnded(media::PipelineStatus status);
198 void OnPipelineError(media::PipelineStatus error); 198 void OnPipelineError(media::PipelineStatus error);
199 void OnNetworkEvent(bool is_downloading_data); 199 void OnNetworkEvent(media::NetworkEvent type);
200 void OnDemuxerOpened(); 200 void OnDemuxerOpened();
201 201
202 private: 202 private:
203 // Helpers that set the network/ready state and notifies the client if 203 // Helpers that set the network/ready state and notifies the client if
204 // they've changed. 204 // they've changed.
205 void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state); 205 void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state);
206 void SetReadyState(WebKit::WebMediaPlayer::ReadyState state); 206 void SetReadyState(WebKit::WebMediaPlayer::ReadyState state);
207 207
208 // Destroy resources held. 208 // Destroy resources held.
209 void Destroy(); 209 void Destroy();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 MediaStreamClient* media_stream_client_; 264 MediaStreamClient* media_stream_client_;
265 265
266 #if WEBKIT_USING_CG 266 #if WEBKIT_USING_CG
267 scoped_ptr<skia::PlatformCanvas> skia_canvas_; 267 scoped_ptr<skia::PlatformCanvas> skia_canvas_;
268 #endif 268 #endif
269 269
270 scoped_refptr<media::MediaLog> media_log_; 270 scoped_refptr<media::MediaLog> media_log_;
271 271
272 bool incremented_externally_allocated_memory_; 272 bool incremented_externally_allocated_memory_;
273 273
274 bool can_play_through_;
275
274 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 276 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
275 }; 277 };
276 278
277 } // namespace webkit_glue 279 } // namespace webkit_glue
278 280
279 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 281 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698