ref: cd4a615c43b2f40e594502daa60eb28376f52073
parent: d2896038b8986a04434cde72801d425f97831fe3
parent: 8dd5d483d4fa16872a1ec2d5440c5d0ad753d1a6
author: lyao2 <[email protected]>
date: Tue Jul 29 08:01:19 EDT 2014
Merge pull request #1233 from ruil2/interface_ut_1 add a judgment
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -147,7 +147,7 @@
}
- if ((pCfg->iRCMode != RC_OFF_MODE) && (pCfg->iRCMode != RC_QUALITY_MODE) && (pCfg->iRCMode != RC_BITRATE_MODE)
+ if ((pCfg->iRCMode != RC_OFF_MODE) && (pCfg->iRCMode != RC_QUALITY_MODE) && (pCfg->iRCMode!= RC_BUFFERBASED_MODE)&&(pCfg->iRCMode != RC_BITRATE_MODE)
&& (pCfg->iRCMode != RC_LOW_BW_MODE)) {
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidation(),Invalid iRCMode = %d\n", pCfg->iRCMode);
return ENC_RETURN_UNSUPPORTED_PARA;
@@ -189,7 +189,7 @@
return ENC_RETURN_INVALIDINPUT;
if ((pCodingParam->iUsageType != CAMERA_VIDEO_REAL_TIME) && (pCodingParam->iUsageType != SCREEN_CONTENT_REAL_TIME)) {
- WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType);
+ WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d\n", pCodingParam->iUsageType);
return ENC_RETURN_UNSUPPORTED_PARA;
}
if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {
--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -404,12 +404,6 @@
iResult = pPtrEnc->Initialize (&sEncParamBase);
EXPECT_EQ (iResult, static_cast<int> (cmInitParaError));
- //iUsageType
- GetValidEncParamBase (&sEncParamBase);
- sEncParamBase.iRCMode = static_cast<RC_MODES> (3);
- iResult = pPtrEnc->Initialize (&sEncParamBase);
- EXPECT_EQ (iResult, static_cast<int> (cmInitParaError));
-
uiTraceLevel = WELS_LOG_ERROR;
pPtrEnc->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
}