Glad to know you make progress. and thank you very much to share your experience here.
You are exact right, the GetFrame() is not always produce a frame. There is some data remain in buffer.I guessthismay be the most importantpointwhendevelop H.264 decoderwith stream data.We may need take care of the loop and condition in the loop very carefully.
See the explanation in the UMC docu
Syntax virtual UMC::Status GetFrame(UMC::MediaData* pSrc, UMC::MediaData* pDst)
The method processes data.
Ifthe user allocates input and output buffers. If GetFrame does
not use all data from the input buffer, the method updates data pointer, value of the actual
data in the buffer and start time.
If the codec uses internal frame buffering it can return UMC::UMC_ERR_NOT_ENOUGH_DATA
at the beginning of the processing. This error code means that the input data is buffered
but the output data is not ready to be delivered. The application has to continue to call
GetFrame with the next input data.
To retrieve buffered data at the end of the processing, the application should call GetFrame
with NULL input pointer while output is not empty.
(and ifwe did search, there aremany discussion about the h.264 decoder's delay or get UMC_ERR_NOT _ENOUGH_DATA in the forum.Unfortunately whentheapplication become large and complex, the basic problem weresubmerged)
With comment if (/*(3 > in->GetDataSize()) &&*/ andif (UMC_ERR_NOT_ENOUGH_DATA == ret)
//if (UMC_OK != ret)
printf("Frame decoder %d\n", numDecodedFrames);
I can't reproduce the crash, butI believedyou will getwrong result if discard someremain data by some condition clause.
For example, with above comment,iwill get 27 frame and thereal frame with thestream is 24 frame. some frame is actually black.
Sorry for the slow response as summur vacation season :)
The simple_player doesn't recoginze the fileof h264_1280x720.mkv. Could any one of you please provide another test stream or tell how to feed the video stream to decoder?
odecs\_bin\ia32_icl120>simple_player.exe -vdx C:\Users\yhu5\Desktop\UMC\h264_128
Stream Type : AVI
[yhu5@NHM02 linuxem64t_gcc4]$ ./simple_player -t3 /tmp/h264_1280x720.avi
Stream Type : AVI
[yhu5@NHM02 linuxem64t_gcc4]$ pwd
The docoder doesn't recognize the format of h264_1280x720.avi, it quits right away aftershow the error"Video Decoder creation failed". so i can't decode theh264_1280x720.avi.
the "1280x960"is fromthestream inforum U81357.Just verify that the decoder can decodewith the HD streamat my sides.