This thread discusses Chaos sample splitter, and presents a modified version using also Chaos sample decoder.
The modified version doesnt use fwRender, yet, it still outputs a YUV file.
Many thanks to Chao for providing such helpful examples.
Code file attached: modifiedSplitter.cpp
This is an extension to thread:
If this is the case, you do not need any rendering process, all you need is to decode your frames and use your existing calls to out.GetPlanePointer or call out.GetBufferPointer() once per frame;
The decoder outputs YUV frames already!
I guessUlisses87 may worry about thecYUVData buffer is overflowing
when keeprun thedecoder wherecYUVData willkeep increase.
status = videoDecoder->GetFrame(&in,&out);
//// imported code
if(status == UMC::UMC_OK)
cYUVData += frameSize;
Actually, the buffer can be overwrited. (you don't need move the pointer)
umcSts = out.Init((Ipp32s) videoInfo->clip_info.width, (Ipp32s) videoInfo->clip_info.height, UMC::ColorFormat::YUV420, 8);//, Ipp32s iBitDepth = 0);
umcSts = out.Alloc();
ret =videoDecoder-> GetFrame((NoFramesForDecoder) ? (NULL) : &in, &out);
if (ret != UMC::UMC_ERR_NOT_ENOUGH_DATA && ret != UMC::UMC_OK)
return false; // error
if (ret == UMC::UMC_OK)
printf(" decoder frame %d \n", numDecFrames);
// if you'd like to see the frame,you can store frame
WriteFrame(outDecoderfp, out, imgWidth, imgHeight);
Here is one stream (or pipeline)encoder/splitter/decoder sample code
No sureif i had attachedit somewhere,attached it again.it is for VC1codec, but the loop and processing is same for H.264 or MP4.
Seems wemay add the streaming sample to the get start sample.
Many thanks Ying Hfor such useful example of code. Now, my code is working (almost) perfectly, what's mean that it does not save output yuv file :). I simply throw away fwRender object and added out.Init() and out.Alloc() referneces. Off course I have to change other parts of code. I'm really happy :).
This is a FAQ I can find on the brown belt:
This may provide some help on your problem.