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

Side by Side Diff: content/common/gpu/media/video_encode_accelerator_unittest.cc

Issue 1135943005: Revert of content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/memory_mapped_file.h" 9 #include "base/files/memory_mapped_file.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 UpdateTestStreamData(mid_stream_bitrate_switch, mid_stream_framerate_switch); 788 UpdateTestStreamData(mid_stream_bitrate_switch, mid_stream_framerate_switch);
789 789
790 thread_checker_.DetachFromThread(); 790 thread_checker_.DetachFromThread();
791 } 791 }
792 792
793 VEAClient::~VEAClient() { CHECK(!has_encoder()); } 793 VEAClient::~VEAClient() { CHECK(!has_encoder()); }
794 794
795 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateFakeVEA() { 795 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateFakeVEA() {
796 scoped_ptr<media::VideoEncodeAccelerator> encoder; 796 scoped_ptr<media::VideoEncodeAccelerator> encoder;
797 if (g_fake_encoder) { 797 if (g_fake_encoder) {
798 encoder.reset(new media::FakeVideoEncodeAccelerator( 798 encoder.reset(
799 scoped_refptr<base::SingleThreadTaskRunner>( 799 new media::FakeVideoEncodeAccelerator(
800 base::ThreadTaskRunnerHandle::Get()))); 800 scoped_refptr<base::SingleThreadTaskRunner>(
801 base::MessageLoopProxy::current())));
801 } 802 }
802 return encoder.Pass(); 803 return encoder.Pass();
803 } 804 }
804 805
805 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { 806 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() {
806 scoped_ptr<media::VideoEncodeAccelerator> encoder; 807 scoped_ptr<media::VideoEncodeAccelerator> encoder;
807 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ 808 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \
808 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) 809 (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
809 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); 810 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
810 if (device) 811 if (device)
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 #endif 1437 #endif
1437 1438
1438 content::g_env = 1439 content::g_env =
1439 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( 1440 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>(
1440 testing::AddGlobalTestEnvironment( 1441 testing::AddGlobalTestEnvironment(
1441 new content::VideoEncodeAcceleratorTestEnvironment( 1442 new content::VideoEncodeAcceleratorTestEnvironment(
1442 test_stream_data.Pass(), log_path, run_at_fps))); 1443 test_stream_data.Pass(), log_path, run_at_fps)));
1443 1444
1444 return RUN_ALL_TESTS(); 1445 return RUN_ALL_TESTS();
1445 } 1446 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_decode_accelerator_unittest.cc ('k') | content/common/gpu/media/vt_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698