History

change the /sdcard/ and also alignment format

syureyi committed 12 years ago

Commit 43351671 parent b53f8905 files · +40 −122Browse files

Showing the changes to test/api/decode_encode_test.cpp (1 of 5 files). Show all

Unified · Split

test/api/decode_encode_test.cpp+6−9
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 #include "utils/InputStream.h"
66 #include "BaseDecoderTest.h"
77 #include "BaseEncoderTest.h"
8−
8+#include <string>
99 static void UpdateHashFromFrame (const SFrameBSInfo& info, SHA1Context* ctx) {
1010 for (int i = 0; i < info.iLayerNum; ++i) {
1111 const SLayerBSInfo& layerInfo = info.sLayerInfo[i];
@@ -93,8 +93,12 @@ class DecodeEncodeTest : public ::testing::TestWithParam<DecodeEncodeFileParam>, · 81 unmodified lines
9393
9494 TEST_P (DecodeEncodeTest, CompareOutput) {
9595 DecodeEncodeFileParam p = GetParam();
96−
96+#if defined(ANDROID_NDK)
97+ std::string filename = std::string ("/sdcard/") + p.fileName;
98+ ASSERT_TRUE (Open (filename.c_str()));
99+#else
97100 ASSERT_TRUE (Open (p.fileName));
101+#endif
98102 EncodeStream (this, CAMERA_VIDEO_REAL_TIME, p.width, p.height, p.frameRate, SM_SINGLE_SLICE, false, 1, this);
99103 unsigned char digest[SHA_DIGEST_LENGTH];
100104 SHA1Result (&ctx_, digest);
@@ -102,18 +106,11 @@ TEST_P (DecodeEncodeTest, CompareOutput) { · 1 unmodified line
102106 CompareHash (digest, p.hashStr);
103107 }
104108 }
105−#if defined(ANDROID_NDK)
106−static const DecodeEncodeFileParam kFileParamArray[] = {
107− {"/sdcard/res/test_vd_1d.264", "a4c7299ec1a7bacd5819685e221a79ac2b56cdbc", 320, 192, 12.0f},
108− {"/sdcard/res/test_vd_rc.264", "106fd8cc978c1801b0d1f8297e9b7f17d5336e15", 320, 192, 12.0f},
109−};
110−#else
111109 static const DecodeEncodeFileParam kFileParamArray[] = {
112110 {"res/test_vd_1d.264", "a4c7299ec1a7bacd5819685e221a79ac2b56cdbc", 320, 192, 12.0f},
113111 {"res/test_vd_rc.264", "106fd8cc978c1801b0d1f8297e9b7f17d5336e15", 320, 192, 12.0f},
114112 };
115113
116−#endif
117114
118115 INSTANTIATE_TEST_CASE_P (DecodeEncodeFile, DecodeEncodeTest,
119116 ::testing::ValuesIn (kFileParamArray));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t