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

Side by Side Diff: media/filters/video_renderer_algorithm.cc

Issue 1731403002: media: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/filters/video_renderer_algorithm.h ('k') | media/formats/webm/tracks_builder.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/filters/video_renderer_algorithm.h" 5 #include "media/filters/video_renderer_algorithm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 namespace media { 10 namespace media {
11 11
12 // The number of frames to store for moving average calculations. Value picked 12 // The number of frames to store for moving average calculations. Value picked
13 // after experimenting with playback of various local media and YouTube clips. 13 // after experimenting with playback of various local media and YouTube clips.
14 const int kMovingAverageSamples = 32; 14 const int kMovingAverageSamples = 32;
15 15
16 VideoRendererAlgorithm::ReadyFrame::ReadyFrame( 16 VideoRendererAlgorithm::ReadyFrame::ReadyFrame(
17 const scoped_refptr<VideoFrame>& ready_frame) 17 const scoped_refptr<VideoFrame>& ready_frame)
18 : frame(ready_frame), 18 : frame(ready_frame),
19 has_estimated_end_time(true), 19 has_estimated_end_time(true),
20 ideal_render_count(0), 20 ideal_render_count(0),
21 render_count(0), 21 render_count(0),
22 drop_count(0) { 22 drop_count(0) {
23 } 23 }
24 24
25 VideoRendererAlgorithm::ReadyFrame::ReadyFrame(const ReadyFrame& other) =
26 default;
27
25 VideoRendererAlgorithm::ReadyFrame::~ReadyFrame() { 28 VideoRendererAlgorithm::ReadyFrame::~ReadyFrame() {
26 } 29 }
27 30
28 bool VideoRendererAlgorithm::ReadyFrame::operator<( 31 bool VideoRendererAlgorithm::ReadyFrame::operator<(
29 const ReadyFrame& other) const { 32 const ReadyFrame& other) const {
30 return frame->timestamp() < other.frame->timestamp(); 33 return frame->timestamp() < other.frame->timestamp();
31 } 34 }
32 35
33 VideoRendererAlgorithm::VideoRendererAlgorithm( 36 VideoRendererAlgorithm::VideoRendererAlgorithm(
34 const TimeSource::WallClockTimeCB& wall_clock_time_cb) 37 const TimeSource::WallClockTimeCB& wall_clock_time_cb)
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 if (frame.start_time > deadline_min) 686 if (frame.start_time > deadline_min)
684 return frame.start_time - deadline_min; 687 return frame.start_time - deadline_min;
685 688
686 // Drift is zero for frames which overlap the deadline interval. 689 // Drift is zero for frames which overlap the deadline interval.
687 DCHECK_GE(deadline_min, frame.start_time); 690 DCHECK_GE(deadline_min, frame.start_time);
688 DCHECK_GE(frame.end_time, deadline_min); 691 DCHECK_GE(frame.end_time, deadline_min);
689 return base::TimeDelta(); 692 return base::TimeDelta();
690 } 693 }
691 694
692 } // namespace media 695 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_algorithm.h ('k') | media/formats/webm/tracks_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698