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

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

Issue 2808833005: Seek for video track changes on FFmpegDemuxer.
Patch Set: 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
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.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 #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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 DCHECK(main_task_runner_->BelongsToCurrentThread()); 2301 DCHECK(main_task_runner_->BelongsToCurrentThread());
2302 2302
2303 return pipeline_media_duration_for_test_.value_or( 2303 return pipeline_media_duration_for_test_.value_or(
2304 pipeline_controller_.GetMediaDuration()); 2304 pipeline_controller_.GetMediaDuration());
2305 } 2305 }
2306 2306
2307 void WebMediaPlayerImpl::ReportTimeFromForegroundToFirstFrame( 2307 void WebMediaPlayerImpl::ReportTimeFromForegroundToFirstFrame(
2308 base::TimeTicks foreground_time, 2308 base::TimeTicks foreground_time,
2309 base::TimeTicks new_frame_time) { 2309 base::TimeTicks new_frame_time) {
2310 base::TimeDelta time_to_first_frame = new_frame_time - foreground_time; 2310 base::TimeDelta time_to_first_frame = new_frame_time - foreground_time;
2311 LOG(ERROR) << __func__ << " : " << time_to_first_frame.InMillisecondsF()
2312 << "ms";
2311 if (HasAudio()) { 2313 if (HasAudio()) {
2312 UMA_HISTOGRAM_TIMES( 2314 UMA_HISTOGRAM_TIMES(
2313 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack", 2315 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack",
2314 time_to_first_frame); 2316 time_to_first_frame);
2315 } else { 2317 } else {
2316 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused", 2318 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused",
2317 time_to_first_frame); 2319 time_to_first_frame);
2318 } 2320 }
2319 } 2321 }
2320 void WebMediaPlayerImpl::SwitchRenderer(bool disable_pipeline_auto_suspend) { 2322 void WebMediaPlayerImpl::SwitchRenderer(bool disable_pipeline_auto_suspend) {
2321 DCHECK(main_task_runner_->BelongsToCurrentThread()); 2323 DCHECK(main_task_runner_->BelongsToCurrentThread());
2322 disable_pipeline_auto_suspend_ = disable_pipeline_auto_suspend; 2324 disable_pipeline_auto_suspend_ = disable_pipeline_auto_suspend;
2323 ScheduleRestart(); 2325 ScheduleRestart();
2324 } 2326 }
2325 2327
2326 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { 2328 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) {
2327 DCHECK(data_source_ || chunk_demuxer_); 2329 DCHECK(data_source_ || chunk_demuxer_);
2328 if (data_source_) 2330 if (data_source_)
2329 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); 2331 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration);
2330 else 2332 else
2331 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); 2333 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration);
2332 } 2334 }
2333 2335
2334 } // namespace media 2336 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698