add a decoder status: float fActualAverageFrameSpeedInMs; ///< actual average_Decoding_Time, includeing freezed picture

This commit is contained in:
dong zhang 2014-12-09 16:25:01 +08:00
parent cc5978b252
commit 354eee3e2b
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;
}