History

add new API as DecodeFrameNoDelay for immediate decoding, which will be recommended decoding method for h.264 bitstream

huili2 committed 11 years ago

Commit e3e52081 parent d2d4ab86 files · +97 −66Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 6 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+16−0
@@ -383,6 +383,22 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 382 unmodified lines
383 return cmInitParaError;383 return cmInitParaError;
384}384}
385 385
386DECODING_STATE CWelsDecoder::DecodeFrameNoDelay (const unsigned char* kpSrc,
387 const int kiSrcLen,
388 unsigned char** ppDst,
389 SBufferInfo* pDstInfo) {
390 int iRet;
391 SBufferInfo sTmpBufferInfo;
392 iRet = (int) DecodeFrame2 (kpSrc, kiSrcLen, ppDst, pDstInfo);
393 memcpy (&sTmpBufferInfo, pDstInfo, sizeof (SBufferInfo));
394 iRet |= DecodeFrame2 (NULL, 0, ppDst, pDstInfo);
395 if ((pDstInfo->iBufferStatus == 0) && (sTmpBufferInfo.iBufferStatus == 1)) {
396 memcpy (pDstInfo, &sTmpBufferInfo, sizeof (SBufferInfo));
397 }
398
399 return (DECODING_STATE) iRet;
400}
401
386DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc,402DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc,
387 const int kiSrcLen,403 const int kiSrcLen,
388 unsigned char** ppDst,404 unsigned char** ppDst,

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