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

Side by Side Diff: media/cast/sender/h264_vt_encoder_unittest.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 VideoEncoder::FrameEncodedCallback cb = 313 VideoEncoder::FrameEncodedCallback cb =
314 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get()); 314 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get());
315 for (FrameId frame_id = FrameId::first(); frame_id < FrameId::first() + 6; 315 for (FrameId frame_id = FrameId::first(); frame_id < FrameId::first() + 6;
316 ++frame_id) { 316 ++frame_id) {
317 checker->PushExpectation(frame_); 317 checker->PushExpectation(frame_);
318 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb)); 318 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb));
319 AdvanceClockAndVideoFrameTimestamp(); 319 AdvanceClockAndVideoFrameTimestamp();
320 } 320 }
321 321
322 encoder_.reset(); 322 encoder_.reset();
323 message_loop_.RunUntilIdle(); 323 base::RunLoop().RunUntilIdle();
324 324
325 EXPECT_EQ(5, checker->count_frames_checked()); 325 EXPECT_EQ(5, checker->count_frames_checked());
326 } 326 }
327 #endif 327 #endif
328 328
329 TEST_F(H264VideoToolboxEncoderTest, CheckVideoFrameFactory) { 329 TEST_F(H264VideoToolboxEncoderTest, CheckVideoFrameFactory) {
330 auto video_frame_factory = encoder_->CreateVideoFrameFactory(); 330 auto video_frame_factory = encoder_->CreateVideoFrameFactory();
331 ASSERT_TRUE(video_frame_factory.get()); 331 ASSERT_TRUE(video_frame_factory.get());
332 // The first call to |MaybeCreateFrame| will return null but post a task to 332 // The first call to |MaybeCreateFrame| will return null but post a task to
333 // the encoder to initialize for the specified frame size. We then drain the 333 // the encoder to initialize for the specified frame size. We then drain the
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 405 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
406 406
407 // After a power resume event, the factory should produce frames right away 407 // After a power resume event, the factory should produce frames right away
408 // because the encoder re-initializes on its own. 408 // because the encoder re-initializes on its own.
409 power_source_->GenerateResumeEvent(); 409 power_source_->GenerateResumeEvent();
410 CreateFrameAndMemsetPlane(video_frame_factory.get()); 410 CreateFrameAndMemsetPlane(video_frame_factory.get());
411 } 411 }
412 412
413 } // namespace cast 413 } // namespace cast
414 } // namespace media 414 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac_unittest.cc ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698