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

Side by Side Diff: media/base/video_frame_pool.cc

Issue 229453004: Rename VideoFrame::{Get,Set}Timestamp() to {set_}timestamp(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile failure Created 6 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 | Annotate | Revision Log
« no previous file with comments | « media/base/video_frame.cc ('k') | media/base/video_frame_pool_unittest.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/base/video_frame_pool.h" 5 #include "media/base/video_frame_pool.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 while (!frame && !frames_.empty()) { 69 while (!frame && !frames_.empty()) {
70 scoped_refptr<VideoFrame> pool_frame = frames_.front(); 70 scoped_refptr<VideoFrame> pool_frame = frames_.front();
71 frames_.pop_front(); 71 frames_.pop_front();
72 72
73 if (pool_frame->format() == format && 73 if (pool_frame->format() == format &&
74 pool_frame->coded_size() == coded_size && 74 pool_frame->coded_size() == coded_size &&
75 pool_frame->visible_rect() == visible_rect && 75 pool_frame->visible_rect() == visible_rect &&
76 pool_frame->natural_size() == natural_size) { 76 pool_frame->natural_size() == natural_size) {
77 frame = pool_frame; 77 frame = pool_frame;
78 frame->SetTimestamp(timestamp); 78 frame->set_timestamp(timestamp);
79 break; 79 break;
80 } 80 }
81 } 81 }
82 82
83 if (!frame) { 83 if (!frame) {
84 frame = VideoFrame::CreateFrame( 84 frame = VideoFrame::CreateFrame(
85 format, coded_size, visible_rect, natural_size, timestamp); 85 format, coded_size, visible_rect, natural_size, timestamp);
86 } 86 }
87 87
88 return VideoFrame::WrapVideoFrame( 88 return VideoFrame::WrapVideoFrame(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::TimeDelta timestamp) { 120 base::TimeDelta timestamp) {
121 return pool_->CreateFrame(format, coded_size, visible_rect, natural_size, 121 return pool_->CreateFrame(format, coded_size, visible_rect, natural_size,
122 timestamp); 122 timestamp);
123 } 123 }
124 124
125 size_t VideoFramePool::GetPoolSizeForTesting() const { 125 size_t VideoFramePool::GetPoolSizeForTesting() const {
126 return pool_->GetPoolSizeForTesting(); 126 return pool_->GetPoolSizeForTesting();
127 } 127 }
128 128
129 } // namespace media 129 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/base/video_frame_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698