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

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

Issue 843863002: Revert current time clamp on ended; clamp paused time instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 years, 11 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 | « media/base/pipeline_unittest.cc ('k') | 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Called when the demuxer encounters encrypted streams. 211 // Called when the demuxer encounters encrypted streams.
212 void OnEncryptedMediaInitData(const std::string& init_data_type, 212 void OnEncryptedMediaInitData(const std::string& init_data_type,
213 const std::vector<uint8>& init_data); 213 const std::vector<uint8>& init_data);
214 214
215 void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb); 215 void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb);
216 216
217 // Called when a CDM has been attached to the |pipeline_|. 217 // Called when a CDM has been attached to the |pipeline_|.
218 void OnCdmAttached(blink::WebContentDecryptionModuleResult result, 218 void OnCdmAttached(blink::WebContentDecryptionModuleResult result,
219 bool success); 219 bool success);
220 220
221 // Updates |paused_time_| to the current media time with consideration for the
222 // |ended_| state by clamping current time to duration upon |ended_|.
223 void UpdatePausedTime();
224
221 blink::WebLocalFrame* frame_; 225 blink::WebLocalFrame* frame_;
222 226
223 // TODO(hclam): get rid of these members and read from the pipeline directly. 227 // TODO(hclam): get rid of these members and read from the pipeline directly.
224 blink::WebMediaPlayer::NetworkState network_state_; 228 blink::WebMediaPlayer::NetworkState network_state_;
225 blink::WebMediaPlayer::ReadyState ready_state_; 229 blink::WebMediaPlayer::ReadyState ready_state_;
226 230
227 // Preload state for when |data_source_| is created after setPreload(). 231 // Preload state for when |data_source_| is created after setPreload().
228 BufferedDataSource::Preload preload_; 232 BufferedDataSource::Preload preload_;
229 233
230 // Task runner for posting tasks on Chrome's main thread. Also used 234 // Task runner for posting tasks on Chrome's main thread. Also used
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 EncryptedMediaPlayerSupport encrypted_media_support_; 314 EncryptedMediaPlayerSupport encrypted_media_support_;
311 315
312 scoped_ptr<RendererFactory> renderer_factory_; 316 scoped_ptr<RendererFactory> renderer_factory_;
313 317
314 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 318 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
315 }; 319 };
316 320
317 } // namespace media 321 } // namespace media
318 322
319 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 323 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698