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

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

Issue 2387293007: Register MediaPlayerRenderer service (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void SetMediaPlayerManager( 197 void SetMediaPlayerManager(
198 RendererMediaPlayerManagerInterface* media_player_manager); 198 RendererMediaPlayerManagerInterface* media_player_manager);
199 void OnRemotePlaybackEnded(); 199 void OnRemotePlaybackEnded();
200 void OnDisconnectedFromRemoteDevice(double t); 200 void OnDisconnectedFromRemoteDevice(double t);
201 void SuspendForRemote(); 201 void SuspendForRemote();
202 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, 202 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame,
203 PipelineStatus status); 203 PipelineStatus status);
204 gfx::Size GetCanvasSize() const; 204 gfx::Size GetCanvasSize() const;
205 void SetDeviceScaleFactor(float scale_factor); 205 void SetDeviceScaleFactor(float scale_factor);
206 void setPoster(const blink::WebURL& poster) override; 206 void setPoster(const blink::WebURL& poster) override;
207 void EnableFallbackMediaPlayer(const GURL& url);
207 #endif 208 #endif
208 209
209 // Called from WebMediaPlayerCast. 210 // Called from WebMediaPlayerCast.
210 // TODO(hubbe): WMPI_CAST make private. 211 // TODO(hubbe): WMPI_CAST make private.
211 void OnPipelineSeeked(bool time_updated); 212 void OnPipelineSeeked(bool time_updated);
212 213
213 // Distinct states that |delegate_| can be in. 214 // Distinct states that |delegate_| can be in.
214 // TODO(sandersd): This should move into WebMediaPlayerDelegate. 215 // TODO(sandersd): This should move into WebMediaPlayerDelegate.
215 // (Public for testing.) 216 // (Public for testing.)
216 enum class DelegateState { 217 enum class DelegateState {
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // unimportant. 530 // unimportant.
530 bool suppress_destruction_errors_; 531 bool suppress_destruction_errors_;
531 532
532 // State indicating if it's okay to suspend or not. Updated on the first time 533 // State indicating if it's okay to suspend or not. Updated on the first time
533 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame 534 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame
534 // from the compositor will be queried to see if suspend is supported; the 535 // from the compositor will be queried to see if suspend is supported; the
535 // state will be set to YES or NO respectively if a frame is available. 536 // state will be set to YES or NO respectively if a frame is available.
536 enum class CanSuspendState { UNKNOWN, YES, NO }; 537 enum class CanSuspendState { UNKNOWN, YES, NO };
537 CanSuspendState can_suspend_state_; 538 CanSuspendState can_suspend_state_;
538 539
540 // Used for HLS playback and in certain fallback paths (e.g. on older devices
541 // that can't support the unified media pipeline).
542 GURL fallback_url_;
543 bool use_fallback_path_;
liberato (no reviews please) 2016/10/06 14:55:46 i don't think that this is initialized during cons
tguilbert 2016/10/11 18:54:33 Done.
544
539 // Called some-time after OnHidden() if the media was suspended in a playing 545 // Called some-time after OnHidden() if the media was suspended in a playing
540 // state as part of the call to OnHidden(). 546 // state as part of the call to OnHidden().
541 base::OneShotTimer background_pause_timer_; 547 base::OneShotTimer background_pause_timer_;
542 548
543 // Monitors the watch time of the played content. 549 // Monitors the watch time of the played content.
544 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; 550 std::unique_ptr<WatchTimeReporter> watch_time_reporter_;
545 bool is_encrypted_; 551 bool is_encrypted_;
546 552
547 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. 553 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback.
548 int underflow_count_; 554 int underflow_count_;
549 std::unique_ptr<base::ElapsedTimer> underflow_timer_; 555 std::unique_ptr<base::ElapsedTimer> underflow_timer_;
550 556
551 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 557 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
552 }; 558 };
553 559
554 } // namespace media 560 } // namespace media
555 561
556 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 562 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698