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

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

Issue 9150023: Add a cros autotest runner for omx_video_decode_accelerator_unittest (on ARM). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 | « chrome/test/chromeos/autotest/files/client/site_tests/desktopui_OMXTest/desktopui_OMXTest.py ('k') | no next file » | 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 // The bulk of this file is support code; sorry about that. Here's an overview 5 // The bulk of this file is support code; sorry about that. Here's an overview
6 // to hopefully help readers of this code: 6 // to hopefully help readers of this code:
7 // - RenderingHelper is charged with interacting with X11, EGL, and GLES2. 7 // - RenderingHelper is charged with interacting with X11, EGL, and GLES2.
8 // - ClientState is an enum for the state of the decode client used by the test. 8 // - ClientState is an enum for the state of the decode client used by the test.
9 // - ClientStateNotification is a barrier abstraction that allows the test code 9 // - ClientStateNotification is a barrier abstraction that allows the test code
10 // to be written sequentially and wait for the decode client to see certain 10 // to be written sequentially and wait for the decode client to see certain
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 938
939 // Suppress EGL surface swapping in all but a few tests, to cut down overall 939 // Suppress EGL surface swapping in all but a few tests, to cut down overall
940 // test runtime. 940 // test runtime.
941 const bool suppress_swap_to_display = num_NALUs_per_decode > 1; 941 const bool suppress_swap_to_display = num_NALUs_per_decode > 1;
942 942
943 std::vector<ClientStateNotification*> notes(num_concurrent_decoders, NULL); 943 std::vector<ClientStateNotification*> notes(num_concurrent_decoders, NULL);
944 std::vector<EglRenderingVDAClient*> clients(num_concurrent_decoders, NULL); 944 std::vector<EglRenderingVDAClient*> clients(num_concurrent_decoders, NULL);
945 945
946 // Read in the video data. 946 // Read in the video data.
947 std::string data_str; 947 std::string data_str;
948 CHECK(file_util::ReadFileToString(FilePath(test_video_file), &data_str)); 948 CHECK(file_util::ReadFileToString(FilePath(test_video_file), &data_str))
949 << "test_video_file: " << test_video_file;
949 950
950 // Initialize the rendering helper. 951 // Initialize the rendering helper.
951 base::Thread rendering_thread("EglRenderingVDAClientThread"); 952 base::Thread rendering_thread("EglRenderingVDAClientThread");
952 base::Thread::Options options; 953 base::Thread::Options options;
953 options.message_loop_type = MessageLoop::TYPE_DEFAULT; 954 options.message_loop_type = MessageLoop::TYPE_DEFAULT;
954 #if defined(OS_WIN) 955 #if defined(OS_WIN)
955 // For windows the decoding thread initializes the media foundation decoder 956 // For windows the decoding thread initializes the media foundation decoder
956 // which uses COM. We need the thread to be a UI thread. 957 // which uses COM. We need the thread to be a UI thread.
957 options.message_loop_type = MessageLoop::TYPE_UI; 958 options.message_loop_type = MessageLoop::TYPE_UI;
958 #endif // OS_WIN 959 #endif // OS_WIN
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 CommandLine::Init(argc, argv); 1141 CommandLine::Init(argc, argv);
1141 1142
1142 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 1143 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
1143 DCHECK(cmd_line); 1144 DCHECK(cmd_line);
1144 1145
1145 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); 1146 CommandLine::SwitchMap switches = cmd_line->GetSwitches();
1146 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); 1147 for (CommandLine::SwitchMap::const_iterator it = switches.begin();
1147 it != switches.end(); ++it) { 1148 it != switches.end(); ++it) {
1148 if (it->first == "test_video_data") { 1149 if (it->first == "test_video_data") {
1149 test_video_data = it->second.c_str(); 1150 test_video_data = it->second.c_str();
1151 continue;
1150 } 1152 }
1151 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 1153 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
1152 } 1154 }
1153 #if defined(OS_WIN) 1155 #if defined(OS_WIN)
1154 base::ShadowingAtExitManager at_exit_manager; 1156 base::ShadowingAtExitManager at_exit_manager;
1155 gfx::InitializeGLBindings(gfx::kGLImplementationEGLGLES2); 1157 gfx::InitializeGLBindings(gfx::kGLImplementationEGLGLES2);
1156 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 1158 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
1157 #endif // OS_WIN 1159 #endif // OS_WIN
1158 return RUN_ALL_TESTS(); 1160 return RUN_ALL_TESTS();
1159 } 1161 }
OLDNEW
« no previous file with comments | « chrome/test/chromeos/autotest/files/client/site_tests/desktopui_OMXTest/desktopui_OMXTest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698