Merge pull request #1601 from dongzha/FixDecodeStatusFps

add a decoder status: float fActualAverageFrameSpeedInMs
This commit is contained in:
dongzha 2014-12-10 10:40:08 +08:00
commit 44017193ed
2 changed files with 3 additions and 1 deletions

View File

@ -613,6 +613,7 @@ typedef struct TagVideoDecoderStatistics {
unsigned int uiWidth; ///< the width of encode/decode frame
unsigned int uiHeight; ///< the height of encode/decode frame
float fAverageFrameSpeedInMs; ///< average_Decoding_Time
float fActualAverageFrameSpeedInMs; ///< actual average_Decoding_Time, including freezing pictures
unsigned int uiDecodedFrameCount; ///< number of frames
unsigned int uiResolutionChangeTimes; ///< uiResolutionChangeTimes
unsigned int uiIDRCorrectNum; ///< number of correct IDR received

View File

@ -373,7 +373,8 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) {
pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
(m_pDecContext->sDecoderStatistics.uiDecodedFrameCount);
pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) /
(m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum + m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum);
return cmResultSuccess;
}