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

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

Issue 2796193002: fix canplaythrough (Closed)
Patch Set: comments addressed Created 3 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
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // Return the pipeline media duration or the value overridden by tests. 448 // Return the pipeline media duration or the value overridden by tests.
449 base::TimeDelta GetPipelineMediaDuration() const; 449 base::TimeDelta GetPipelineMediaDuration() const;
450 450
451 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, 451 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time,
452 base::TimeTicks new_frame_time); 452 base::TimeTicks new_frame_time);
453 453
454 // Records |duration| to the appropriate metric based on whether we're 454 // Records |duration| to the appropriate metric based on whether we're
455 // handling a src= or MSE based playback. 455 // handling a src= or MSE based playback.
456 void RecordUnderflowDuration(base::TimeDelta duration); 456 void RecordUnderflowDuration(base::TimeDelta duration);
457 457
458 // Called when loading progresses.
DaleCurtis 2017/04/06 22:51:40 Needs comment differentiating it from didLoadingPr
hubbe 2017/04/07 19:35:51 Done.
459 void OnProgress();
460
461 // Returns true when we estimate that we can play the rest of the media
462 // without buffering.
463 bool CanPlayThrough();
464
458 blink::WebLocalFrame* frame_; 465 blink::WebLocalFrame* frame_;
459 466
460 // The playback state last reported to |delegate_|, to avoid setting duplicate 467 // The playback state last reported to |delegate_|, to avoid setting duplicate
461 // states. 468 // states.
462 // TODO(sandersd): The delegate should be implementing deduplication. 469 // TODO(sandersd): The delegate should be implementing deduplication.
463 DelegateState delegate_state_; 470 DelegateState delegate_state_;
464 bool delegate_has_audio_; 471 bool delegate_has_audio_;
465 472
466 blink::WebMediaPlayer::NetworkState network_state_; 473 blink::WebMediaPlayer::NetworkState network_state_;
467 blink::WebMediaPlayer::ReadyState ready_state_; 474 blink::WebMediaPlayer::ReadyState ready_state_;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 718
712 gfx::Size last_uploaded_frame_size_; 719 gfx::Size last_uploaded_frame_size_;
713 base::TimeDelta last_uploaded_frame_timestamp_; 720 base::TimeDelta last_uploaded_frame_timestamp_;
714 721
715 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 722 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
716 }; 723 };
717 724
718 } // namespace media 725 } // namespace media
719 726
720 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 727 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698