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

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

Issue 2749653003: Prototype HTMLVideoElement properties for WebGL texImage2D (Closed)
Patch Set: update Created 3 years, 9 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
« no previous file with comments | « no previous file | media/blink/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 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // True if the loaded media has a playable video/audio track. 133 // True if the loaded media has a playable video/audio track.
134 bool hasVideo() const override; 134 bool hasVideo() const override;
135 bool hasAudio() const override; 135 bool hasAudio() const override;
136 136
137 void enabledAudioTracksChanged( 137 void enabledAudioTracksChanged(
138 const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) 138 const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds)
139 override; 139 override;
140 void selectedVideoTrackChanged( 140 void selectedVideoTrackChanged(
141 blink::WebMediaPlayer::TrackId* selectedTrackId) override; 141 blink::WebMediaPlayer::TrackId* selectedTrackId) override;
142 142
143 bool getLastUploadedFrameInfo(unsigned* width,
144 unsigned* height,
145 double* timestamp) override;
146
143 // Dimensions of the video. 147 // Dimensions of the video.
144 blink::WebSize naturalSize() const override; 148 blink::WebSize naturalSize() const override;
145 149
146 // Getters of playback state. 150 // Getters of playback state.
147 bool paused() const override; 151 bool paused() const override;
148 bool seeking() const override; 152 bool seeking() const override;
149 double duration() const override; 153 double duration() const override;
150 virtual double timelineOffset() const; 154 virtual double timelineOffset() const;
151 double currentTime() const override; 155 double currentTime() const override;
152 156
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Return the pipeline media duration or the value overridden by tests. 449 // Return the pipeline media duration or the value overridden by tests.
446 base::TimeDelta GetPipelineMediaDuration() const; 450 base::TimeDelta GetPipelineMediaDuration() const;
447 451
448 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, 452 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time,
449 base::TimeTicks new_frame_time); 453 base::TimeTicks new_frame_time);
450 454
451 // Records |duration| to the appropriate metric based on whether we're 455 // Records |duration| to the appropriate metric based on whether we're
452 // handling a src= or MSE based playback. 456 // handling a src= or MSE based playback.
453 void RecordUnderflowDuration(base::TimeDelta duration); 457 void RecordUnderflowDuration(base::TimeDelta duration);
454 458
459 // Updates the cached video frame info for getLastUploadedFrameInfo.
DaleCurtis 2017/03/15 22:53:50 No need for method, just update at call site for g
Ken Russell (switch to Gerrit) 2017/03/16 00:57:43 Thanks. The idea was to minimize the number of pla
Kai Ninomiya 2017/03/16 22:28:25 dalecurtis: Are you suggesting updating the (now 2
DaleCurtis 2017/03/16 22:30:02 Inside.
Kai Ninomiya 2017/03/17 21:40:15 Done.
460 void UpdateLastUploadedFrameInfo(VideoFrame*);
461
455 blink::WebLocalFrame* frame_; 462 blink::WebLocalFrame* frame_;
456 463
457 // The playback state last reported to |delegate_|, to avoid setting duplicate 464 // The playback state last reported to |delegate_|, to avoid setting duplicate
458 // states. 465 // states.
459 // TODO(sandersd): The delegate should be implementing deduplication. 466 // TODO(sandersd): The delegate should be implementing deduplication.
460 DelegateState delegate_state_; 467 DelegateState delegate_state_;
461 bool delegate_has_audio_; 468 bool delegate_has_audio_;
462 469
463 blink::WebMediaPlayer::NetworkState network_state_; 470 blink::WebMediaPlayer::NetworkState network_state_;
464 blink::WebMediaPlayer::ReadyState ready_state_; 471 blink::WebMediaPlayer::ReadyState ready_state_;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // Pipeline media duration overridden by tests. 710 // Pipeline media duration overridden by tests.
704 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; 711 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_;
705 712
706 // Whether the video requires a user gesture to resume after it was paused in 713 // Whether the video requires a user gesture to resume after it was paused in
707 // the background. Affects the value of ShouldPauseVideoWhenHidden(). 714 // the background. Affects the value of ShouldPauseVideoWhenHidden().
708 bool video_locked_when_paused_when_hidden_ = false; 715 bool video_locked_when_paused_when_hidden_ = false;
709 716
710 // Whether embedded media experience is currently enabled. 717 // Whether embedded media experience is currently enabled.
711 bool embedded_media_experience_enabled_ = false; 718 bool embedded_media_experience_enabled_ = false;
712 719
720 unsigned last_uploaded_frame_width_ = 0;
DaleCurtis 2017/03/15 22:53:50 gfx::Size and TimeDelta
Kai Ninomiya 2017/03/16 22:28:25 Acknowledged.
Kai Ninomiya 2017/03/17 21:40:15 Done.
721 unsigned last_uploaded_frame_height_ = 0;
722 double last_uploaded_frame_timestamp_ = 0.0;
723
713 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 724 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
714 }; 725 };
715 726
716 } // namespace media 727 } // namespace media
717 728
718 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 729 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698