PDA

View Full Version : non-tunnel decode component failed to output decoded data



Solpoiuy
09-07-2010, 03:06 AM
Hi:
I'm a freshman to Openmax.Now I'm using a single decoder component to decode H.264 file.Here is my steps:
first,call OMX_GetHandle to init the component;
second,call OMX_GetParameter and OMX_SetParameter to set the component's parameters;
third,call OMX_SendCommand to set the component from load to idle;
fourth,allocate enough buffers myself,then call OMX_UseBuffer to attach the buffers to the component's ports;
fifth;set the component from idle to executing;
sixth,read the H.264 file ,write the compressed data to input buffer,call OMX_FillThisBuffer and OMX_EmptyThisBuffer to begin decode and wanna get the decoded data in the OMX_FillBufferDone function.
The test file is generated by JM86,only contain one frame,that means it doesn't need circulation.
When I run the program,the print information tells me
component gethandle success,
set_parameter success,
allocate_buffer success,
load_to_idle success,
VPU_DEC_INIT OK,
TCC_VPU_DEC VPU_DEC_REG_FRAME_BUFFER OK!
VDEC_DEC_SEQ_HEADER - Success,
VDEC_DECODE Success,
Last Key Frame Detect!

gsVpuDecOutput.m_DecOutInfo.m_iDecodingStatus=1; // means Decode success
gsVpuDecOutput.m_DecOutInfo.m_iOutputStatus=0; // means Output failed

I don't know why the program can decode but no output,have I missed something ?Anyone please help me out!
Thank you for your kindness!

Solpoiuy
09-14-2010, 07:59 PM
Now,I know what happened here,it's because the FrameBufferDelay,Only after the decoded frame number is up to FrameBufferDelay,there will be output.But I've got another question,how to make the value of FrameBufferDelay be 0 , what parameters is relate to FrameBufferDelay?

rnixon
12-13-2010, 03:44 PM
I would typically run a video decoder with the output port disabled until receiving a PortSettingsChanged event. This occurs when the (sub-)format of the input stream is detected, setting parameters such as the output frame dimensions.

Are your receiving a PortSettingsChanged event after having supplied data to the input port? If so, this could prevent the frame(s) from being output (see IL 1.1.2, section 3.1.1.4.4).

I've no idea what "FrameBufferDelay" is. A standard video decoder doesn't delay outputting frames.

Thanks,

Roger