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

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

Issue 821453003: Update legacy Tuple-using code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media Created 6 years 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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 // instantiated. 1133 // instantiated.
1134 // - If true, save output to file (provided an output filename was supplied). 1134 // - If true, save output to file (provided an output filename was supplied).
1135 // - Force a keyframe every n frames. 1135 // - Force a keyframe every n frames.
1136 // - Force bitrate; the actual required value is provided as a property 1136 // - Force bitrate; the actual required value is provided as a property
1137 // of the input stream, because it depends on stream type/resolution/etc. 1137 // of the input stream, because it depends on stream type/resolution/etc.
1138 // - If true, measure performance. 1138 // - If true, measure performance.
1139 // - If true, switch bitrate mid-stream. 1139 // - If true, switch bitrate mid-stream.
1140 // - If true, switch framerate mid-stream. 1140 // - If true, switch framerate mid-stream.
1141 class VideoEncodeAcceleratorTest 1141 class VideoEncodeAcceleratorTest
1142 : public ::testing::TestWithParam< 1142 : public ::testing::TestWithParam<
1143 Tuple7<int, bool, int, bool, bool, bool, bool> > {}; 1143 Tuple<int, bool, int, bool, bool, bool, bool>> {};
1144 1144
1145 TEST_P(VideoEncodeAcceleratorTest, TestSimpleEncode) { 1145 TEST_P(VideoEncodeAcceleratorTest, TestSimpleEncode) {
1146 size_t num_concurrent_encoders = GetParam().a; 1146 size_t num_concurrent_encoders = get<0>(GetParam());
1147 const bool save_to_file = GetParam().b; 1147 const bool save_to_file = get<1>(GetParam());
1148 const unsigned int keyframe_period = GetParam().c; 1148 const unsigned int keyframe_period = get<2>(GetParam());
1149 const bool force_bitrate = GetParam().d; 1149 const bool force_bitrate = get<3>(GetParam());
1150 const bool test_perf = GetParam().e; 1150 const bool test_perf = get<4>(GetParam());
1151 const bool mid_stream_bitrate_switch = GetParam().f; 1151 const bool mid_stream_bitrate_switch = get<5>(GetParam());
1152 const bool mid_stream_framerate_switch = GetParam().g; 1152 const bool mid_stream_framerate_switch = get<6>(GetParam());
1153 1153
1154 ScopedVector<ClientStateNotification<ClientState> > notes; 1154 ScopedVector<ClientStateNotification<ClientState> > notes;
1155 ScopedVector<VEAClient> clients; 1155 ScopedVector<VEAClient> clients;
1156 base::Thread encoder_thread("EncoderThread"); 1156 base::Thread encoder_thread("EncoderThread");
1157 ASSERT_TRUE(encoder_thread.Start()); 1157 ASSERT_TRUE(encoder_thread.Start());
1158 1158
1159 if (g_env->test_streams_.size() > 1) 1159 if (g_env->test_streams_.size() > 1)
1160 num_concurrent_encoders = g_env->test_streams_.size(); 1160 num_concurrent_encoders = g_env->test_streams_.size();
1161 1161
1162 // Create all encoders. 1162 // Create all encoders.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 } 1291 }
1292 1292
1293 content::g_env = 1293 content::g_env =
1294 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( 1294 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>(
1295 testing::AddGlobalTestEnvironment( 1295 testing::AddGlobalTestEnvironment(
1296 new content::VideoEncodeAcceleratorTestEnvironment( 1296 new content::VideoEncodeAcceleratorTestEnvironment(
1297 test_stream_data.Pass()))); 1297 test_stream_data.Pass())));
1298 1298
1299 return RUN_ALL_TESTS(); 1299 return RUN_ALL_TESTS();
1300 } 1300 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698