History

add usagetype setting for screen content

unknown committed 12 years ago

Commit a128d7f1 parent 881298e8 files · +23 −3Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 8 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+8−0
@@ -81,6 +81,10 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 80 unmodified lines
8181
8282 assert (pCfg != NULL);
8383
84+ if((pCfg->iUsageType != CAMERA_VIDEO_REAL_TIME)&&(pCfg->iUsageType != SCREEN_CONTENT_REAL_TIME)){
85+ WelsLog (NULL, WELS_LOG_ERROR, "ParamValidation(),Invalid usage type = %d",pCfg->iUsageType);
86+ return ENC_RETURN_UNSUPPORTED_PARA;
87+ }
8488 for (i = 0; i < pCfg->iSpatialLayerNum; ++ i) {
8589 SDLayerParam* fDlp = &pCfg->sDependencyLayers[i];
8690 if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn
@@ -125,6 +129,10 @@ int32_t ParamValidationExt (sWelsEncCtx*pCtx,SWelsSvcCodingParam* pCodingParam) · 38 unmodified lines
125129 if (NULL == pCodingParam)
126130 return ENC_RETURN_INVALIDINPUT;
127131
132+ if((pCodingParam->iUsageType != CAMERA_VIDEO_REAL_TIME)&&(pCodingParam->iUsageType != SCREEN_CONTENT_REAL_TIME)){
133+ WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d",pCodingParam->iUsageType);
134+ return ENC_RETURN_UNSUPPORTED_PARA;
135+ }
128136 if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {
129137 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!\n",
130138 pCodingParam->iSpatialLayerNum);

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