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

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

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/filters/video_renderer_base.cc ('k') | media/filters/vpx_video_decoder.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 current_frame_ = NULL; 227 current_frame_ = NULL;
228 } 228 }
229 229
230 scoped_refptr<VideoFrame> GetCurrentFrame() { 230 scoped_refptr<VideoFrame> GetCurrentFrame() {
231 base::AutoLock l(lock_); 231 base::AutoLock l(lock_);
232 return current_frame_; 232 return current_frame_;
233 } 233 }
234 234
235 int GetCurrentTimestampInMs() { 235 int GetCurrentTimestampInMs() {
236 scoped_refptr<VideoFrame> frame = GetCurrentFrame(); 236 scoped_refptr<VideoFrame> frame = GetCurrentFrame();
237 if (!frame) 237 if (!frame.get())
238 return -1; 238 return -1;
239 return frame->GetTimestamp().InMilliseconds(); 239 return frame->GetTimestamp().InMilliseconds();
240 } 240 }
241 241
242 void WaitForError(PipelineStatus expected) { 242 void WaitForError(PipelineStatus expected) {
243 SCOPED_TRACE(base::StringPrintf("WaitForError(%d)", expected)); 243 SCOPED_TRACE(base::StringPrintf("WaitForError(%d)", expected));
244 error_event_.RunAndWaitForStatus(expected); 244 error_event_.RunAndWaitForStatus(expected);
245 } 245 }
246 246
247 void WaitForEnded() { 247 void WaitForEnded() {
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 InSequence s; 642 InSequence s;
643 643
644 EXPECT_CALL(*decoder_, Initialize(_, _, _)) 644 EXPECT_CALL(*decoder_, Initialize(_, _, _))
645 .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED)); 645 .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
646 InitializeRenderer(DECODER_ERROR_NOT_SUPPORTED); 646 InitializeRenderer(DECODER_ERROR_NOT_SUPPORTED);
647 647
648 Stop(); 648 Stop();
649 } 649 }
650 650
651 } // namespace media 651 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_base.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698