ref: a683dae3e94a1b3ca798c94f7fbb6aaf481342ad
parent: dea22e8a9ac03a7e4058f8c3c1d5f0c4f0af2e21
parent: ced6ca5fab2c7195755b2754ff218e46acea5b94
author: huili2 <[email protected]>
date: Fri Dec 23 10:06:05 EST 2016
Merge pull request #2627 from ruil2/dec_profile add getting profile and level info in GetOption
--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -162,7 +162,8 @@
DECODER_OPTION_GET_STATISTICS, ///< feedback decoder statistics
DECODER_OPTION_GET_SAR_INFO, ///< feedback decoder Sample Aspect Ratio info in Vui
-
+ DECODER_OPTION_PROFILE, ///< get current AU profile info, only is used in GetOption
+ DECODER_OPTION_LEVEL ///< get current AU level info,only is used in GetOption
} DECODER_OPTION;
/**
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -425,6 +425,20 @@
pVuiSarInfo->bOverscanAppropriateFlag = m_pDecContext->pSps->sVui.bOverscanAppropriateFlag;
return cmResultSuccess;
}
+ } else if (DECODER_OPTION_PROFILE == eOptID) {
+ if (!m_pDecContext->pSps) {
+ return cmInitExpected;
+ }
+ iVal = (int) m_pDecContext->pSps->uiProfileIdc;
+ * ((int*)pOption) = iVal;
+ return cmResultSuccess;
+ } else if (DECODER_OPTION_LEVEL == eOptID) {
+ if (!m_pDecContext->pSps) {
+ return cmInitExpected;
+ }
+ iVal = (int) m_pDecContext->pSps->uiLevelIdc;
+ * ((int*)pOption) = iVal;
+ return cmResultSuccess;
}
return cmInitParaError;