OLD | NEW |
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 #include "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <string> | 10 #include <string> |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 } | 504 } |
505 | 505 |
506 bool WebMediaPlayerImpl::supportsSave() const { | 506 bool WebMediaPlayerImpl::supportsSave() const { |
507 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 507 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
508 return supports_save_; | 508 return supports_save_; |
509 } | 509 } |
510 | 510 |
511 void WebMediaPlayerImpl::seek(double seconds) { | 511 void WebMediaPlayerImpl::seek(double seconds) { |
512 DVLOG(1) << __func__ << "(" << seconds << "s)"; | 512 DVLOG(1) << __func__ << "(" << seconds << "s)"; |
513 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 513 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 514 media_log_->AddEvent(media_log_->CreateSeekEvent(seconds)); |
514 DoSeek(base::TimeDelta::FromSecondsD(seconds), true); | 515 DoSeek(base::TimeDelta::FromSecondsD(seconds), true); |
515 } | 516 } |
516 | 517 |
517 void WebMediaPlayerImpl::DoSeek(base::TimeDelta time, bool time_updated) { | 518 void WebMediaPlayerImpl::DoSeek(base::TimeDelta time, bool time_updated) { |
518 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 519 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
519 | 520 |
520 #if defined(OS_ANDROID) // WMPI_CAST | 521 #if defined(OS_ANDROID) // WMPI_CAST |
521 if (isRemote()) { | 522 if (isRemote()) { |
522 cast_impl_.seek(time); | 523 cast_impl_.seek(time); |
523 return; | 524 return; |
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2320 | 2321 |
2321 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { | 2322 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { |
2322 DCHECK(data_source_ || chunk_demuxer_); | 2323 DCHECK(data_source_ || chunk_demuxer_); |
2323 if (data_source_) | 2324 if (data_source_) |
2324 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); | 2325 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); |
2325 else | 2326 else |
2326 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); | 2327 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); |
2327 } | 2328 } |
2328 | 2329 |
2329 } // namespace media | 2330 } // namespace media |
OLD | NEW |