History

Merge pull request #1613 from sijchen/fix_ut2

[UT] encoder log level adjustment

ruil2 committed 11 years ago

Commit 3be8ae72 parents 5ff55a6 f1a7a1a3 files · +14 −4Browse files

Unified · Split

3 files
  1. test/api/BaseEncoderTest.cpp +3 −0
  2. test/api/encode_decode_api_test.cpp +8 −4
  3. test/encoder/EncUT_EncoderExt.cpp +3 −0
test/api/BaseEncoderTest.cpp+3−0
@@ -63,6 +63,9 @@ void BaseEncoderTest::SetUp() { · 62 unmodified lines
63 int rv = WelsCreateSVCEncoder (&encoder_);63 int rv = WelsCreateSVCEncoder (&encoder_);
64 ASSERT_EQ (0, rv);64 ASSERT_EQ (0, rv);
65 ASSERT_TRUE (encoder_ != NULL);65 ASSERT_TRUE (encoder_ != NULL);
66
67 unsigned int uiTraceLevel = WELS_LOG_ERROR;
68 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
66}69}
67 70
68void BaseEncoderTest::TearDown() {71void BaseEncoderTest::TearDown() {
test/api/encode_decode_api_test.cpp+8−4
@@ -1071,7 +1071,7 @@ TEST_P (EncodeDecodeTestAPI, InOutTimeStamp) { · 1070 unmodified lines
1071 memset (&dstBufInfo_, 0, sizeof (SBufferInfo));1071 memset (&dstBufInfo_, 0, sizeof (SBufferInfo));
1072 dstBufInfo_.uiInBsTimeStamp = uiEncTimeStamp;1072 dstBufInfo_.uiInBsTimeStamp = uiEncTimeStamp;
1073 rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction1073 rv = decoder_->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_); //reconstruction
1074 if(dstBufInfo_.iBufferStatus == 1) {1074 if (dstBufInfo_.iBufferStatus == 1) {
1075 EXPECT_EQ (uiEncTimeStamp, dstBufInfo_.uiOutYuvTimeStamp);1075 EXPECT_EQ (uiEncTimeStamp, dstBufInfo_.uiOutYuvTimeStamp);
1076 }1076 }
1077 iIdx++;1077 iIdx++;
@@ -2064,11 +2064,14 @@ TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) { · 986 unmodified lines
2064 int iSliceNum = 1;2064 int iSliceNum = 1;
2065 encoder_->GetDefaultParams (&param_);2065 encoder_->GetDefaultParams (&param_);
2066 prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate);2066 prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate);
2067
2067 int rv = encoder_->InitializeExt (&param_);2068 int rv = encoder_->InitializeExt (&param_);
2068 ASSERT_TRUE (rv == cmResultSuccess);2069 ASSERT_TRUE (rv == cmResultSuccess);
2069 2070
2070 int32_t iTraceLevel = WELS_LOG_QUIET;2071 int iTraceLevel = WELS_LOG_QUIET;
2071 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);2072 rv = encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
2073 ASSERT_TRUE (rv == cmResultSuccess);
2074
2072 for (int i = 0; i < iEncFrameNum; i++) {2075 for (int i = 0; i < iEncFrameNum; i++) {
2073 int iResult;2076 int iResult;
2074 int len = 0;2077 int len = 0;
@@ -2304,7 +2307,8 @@ TEST_F (DecodeCrashTestAPI, DecoderCrashTest) { · 229 unmodified lines
2304 } while (1); //while (iLoopRound<100);2307 } while (1); //while (iLoopRound<100);
2305 fclose (f);2308 fclose (f);
2306#else2309#else
2307 } while (uiLoopRound < 10);2310 }
2311 while (uiLoopRound < 10);
2308#endif2312#endif
2309 2313
2310}2314}
test/encoder/EncUT_EncoderExt.cpp+3−0
@@ -29,6 +29,9 @@ class EncoderInterfaceTest : public ::testing::Test { · 28 unmodified lines
29 ASSERT_EQ (0, rv);29 ASSERT_EQ (0, rv);
30 ASSERT_TRUE (pPtrEnc != NULL);30 ASSERT_TRUE (pPtrEnc != NULL);
31 31
32 unsigned int uiTraceLevel = WELS_LOG_ERROR;
33 pPtrEnc->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
34
32 pParamExt = new SEncParamExt();35 pParamExt = new SEncParamExt();
33 ASSERT_TRUE (pParamExt != NULL);36 ASSERT_TRUE (pParamExt != NULL);
34 37

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