OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ |
12 #define WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ | 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ |
13 | 13 |
| 14 #include <string> |
| 15 |
14 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "webrtc/modules/video_processing/include/video_processing.h" | 17 #include "webrtc/modules/video_processing/include/video_processing.h" |
16 #include "webrtc/system_wrappers/include/trace.h" | 18 #include "webrtc/system_wrappers/include/trace.h" |
17 #include "webrtc/test/testsupport/fileutils.h" | 19 #include "webrtc/test/testsupport/fileutils.h" |
18 | 20 |
19 namespace webrtc { | 21 namespace webrtc { |
20 | 22 |
21 class VideoProcessingModuleTest : public ::testing::Test { | 23 class VideoProcessingTest : public ::testing::Test { |
22 protected: | 24 protected: |
23 VideoProcessingModuleTest(); | 25 VideoProcessingTest(); |
24 virtual void SetUp(); | 26 virtual void SetUp(); |
25 virtual void TearDown(); | 27 virtual void TearDown(); |
26 static void SetUpTestCase() { | 28 static void SetUpTestCase() { |
27 Trace::CreateTrace(); | 29 Trace::CreateTrace(); |
28 std::string trace_file = webrtc::test::OutputPath() + "VPMTrace.txt"; | 30 std::string trace_file = webrtc::test::OutputPath() + "VPMTrace.txt"; |
29 ASSERT_EQ(0, Trace::SetTraceFile(trace_file.c_str())); | 31 ASSERT_EQ(0, Trace::SetTraceFile(trace_file.c_str())); |
30 } | 32 } |
31 static void TearDownTestCase() { | 33 static void TearDownTestCase() { |
32 Trace::ReturnTrace(); | 34 Trace::ReturnTrace(); |
33 } | 35 } |
34 VideoProcessingModule* vpm_; | 36 VideoProcessing* vp_; |
35 FILE* source_file_; | 37 FILE* source_file_; |
36 VideoFrame video_frame_; | 38 VideoFrame video_frame_; |
37 const int width_; | 39 const int width_; |
38 const int half_width_; | 40 const int half_width_; |
39 const int height_; | 41 const int height_; |
40 const int size_y_; | 42 const int size_y_; |
41 const int size_uv_; | 43 const int size_uv_; |
42 const size_t frame_length_; | 44 const size_t frame_length_; |
43 }; | 45 }; |
44 | 46 |
45 } // namespace webrtc | 47 } // namespace webrtc |
46 | 48 |
47 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ | 49 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ |
OLD | NEW |