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 #include "webrtc/modules/video_coding/test/test_util.h" | 11 #include "webrtc/modules/video_coding/test/test_util.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <math.h> | 14 #include <math.h> |
15 | 15 |
16 #include <iomanip> | 16 #include <iomanip> |
17 #include <sstream> | 17 #include <sstream> |
18 | 18 |
19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
20 #include "webrtc/modules/video_coding/internal_defines.h" | 20 #include "webrtc/modules/video_coding/internal_defines.h" |
21 #include "webrtc/test/testsupport/fileutils.h" | 21 #include "webrtc/test/testsupport/fileutils.h" |
22 | 22 |
23 CmdArgs::CmdArgs() | 23 CmdArgs::CmdArgs() |
24 : codecName("VP8"), | 24 : codecName("VP8"), |
25 codecType(webrtc::kVideoCodecVP8), | 25 codecType(webrtc::kVideoCodecVP8), |
26 width(352), | 26 width(352), |
27 height(288), | 27 height(288), |
28 rtt(0), | 28 rtt(0), |
29 inputFile(webrtc::test::ProjectRootPath() + "/resources/foreman_cif.yuv"), | 29 inputFile(webrtc::test::ResourcePath("foreman_cif", "yuv")), |
30 outputFile(webrtc::test::OutputPath() + | 30 outputFile(webrtc::test::OutputPath() + |
31 "video_coding_test_output_352x288.yuv") {} | 31 "video_coding_test_output_352x288.yuv") {} |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 void SplitFilename(const std::string& filename, | 35 void SplitFilename(const std::string& filename, |
36 std::string* basename, | 36 std::string* basename, |
37 std::string* extension) { | 37 std::string* extension) { |
38 assert(basename); | 38 assert(basename); |
39 assert(extension); | 39 assert(extension); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 webrtc::RtpVideoCodecTypes ConvertCodecType(const char* plname) { | 135 webrtc::RtpVideoCodecTypes ConvertCodecType(const char* plname) { |
136 if (strncmp(plname, "VP8", 3) == 0) { | 136 if (strncmp(plname, "VP8", 3) == 0) { |
137 return webrtc::kRtpVideoVp8; | 137 return webrtc::kRtpVideoVp8; |
138 } else { | 138 } else { |
139 // Default value. | 139 // Default value. |
140 return webrtc::kRtpVideoGeneric; | 140 return webrtc::kRtpVideoGeneric; |
141 } | 141 } |
142 } | 142 } |
OLD | NEW |