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

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

Issue 2398883002: Add support for multiple V4L2 video devices of the same type. (Closed)
Patch Set: comments addressed Created 4 years, 2 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 <inttypes.h> 5 #include <inttypes.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 encoder.reset(new FakeVideoEncodeAccelerator( 1124 encoder.reset(new FakeVideoEncodeAccelerator(
1125 scoped_refptr<base::SingleThreadTaskRunner>( 1125 scoped_refptr<base::SingleThreadTaskRunner>(
1126 base::ThreadTaskRunnerHandle::Get()))); 1126 base::ThreadTaskRunnerHandle::Get())));
1127 } 1127 }
1128 return encoder; 1128 return encoder;
1129 } 1129 }
1130 1130
1131 std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { 1131 std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() {
1132 std::unique_ptr<VideoEncodeAccelerator> encoder; 1132 std::unique_ptr<VideoEncodeAccelerator> encoder;
1133 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 1133 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
1134 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); 1134 scoped_refptr<V4L2Device> device = V4L2Device::Create();
1135 if (device) 1135 if (device)
1136 encoder.reset(new V4L2VideoEncodeAccelerator(device)); 1136 encoder.reset(new V4L2VideoEncodeAccelerator(device));
1137 #endif 1137 #endif
1138 return encoder; 1138 return encoder;
1139 } 1139 }
1140 1140
1141 std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() { 1141 std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() {
1142 std::unique_ptr<VideoEncodeAccelerator> encoder; 1142 std::unique_ptr<VideoEncodeAccelerator> encoder;
1143 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 1143 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
1144 encoder.reset(new VaapiVideoEncodeAccelerator()); 1144 encoder.reset(new VaapiVideoEncodeAccelerator());
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 1941
1942 media::g_env = 1942 media::g_env =
1943 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( 1943 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>(
1944 testing::AddGlobalTestEnvironment( 1944 testing::AddGlobalTestEnvironment(
1945 new media::VideoEncodeAcceleratorTestEnvironment( 1945 new media::VideoEncodeAcceleratorTestEnvironment(
1946 std::move(test_stream_data), log_path, run_at_fps, 1946 std::move(test_stream_data), log_path, run_at_fps,
1947 needs_encode_latency, verify_all_output))); 1947 needs_encode_latency, verify_all_output)));
1948 1948
1949 return RUN_ALL_TESTS(); 1949 return RUN_ALL_TESTS();
1950 } 1950 }
OLDNEW
« media/gpu/v4l2_device.h ('K') | « media/gpu/v4l2_video_encode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698