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?
Thank you for the file.But i can't decode the file with simple_player.exe or umc_h264_dec_con, whatever under linux or windows, IPP 6.1 or IPP 7.0.4
What platform are you working on? I'mlooking at thediscussion in forum81357too.
It included a 1280x960 stream. Could you try the stream and see if the crash can be reproduced?
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
But it's quite easy to crash when there areover 4 threads, each
decoding different video stream.
The video stream coming from different IP Cameras(Samsung
Most of the time, I found the crash happened like:
One or twothreads are decoding normally, and then,
there is another thread entering "init" stage, the init thread get crashed.
To me, I have no idea how to send you the data to debug.
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.
Great!. The file you attached can work now.Idecodeit with umc_h264_dec_con.exe and simpledecoder.cpp under debug mode several times. It seems work no problem.
I'm on Window ia32UMC sample7.0.4.054.