Hi All,
 I am trying to write one MPEG4 OMX compliant encoder component.In the
process i am able to do all the buffer allocations for both the i/p
and o/p port using OMX_UseBuffer.After that i am setting the state to
OMX_StateExecuting.even that is also successful.After this i am
calling EmptyThisBuffer and FillThisBuffer.
I am getting the callback of EmptyBufferDone but not getting the
callback for FillBufferDone.
Its simpley stuck.Below i am giving some code snippets: I am reading
from a YUV file for data i/p.For trial i am just trying to encode the
first frame which i think should be able to encode being I-Frame.If
FBD is not called then how can i debug it ??

SetState(OMX_StateExecuting);

        for (i = 0; i < 2; i++)
        {
                result = OMX_FillThisBuffer(m_hHandle, m_pOutBuffers[i]);
                if (result != OMX_ErrorNone)
                {
                        LOGE("Error in OMX_FillThisBuffer()");
                        return ;
                }
        }

        FILE *fp =fopen("/sdcard/yuv420video.yuv","r+");

        uint8* pBuff = (uint8*) malloc(38016);

        uint32 n = fread(pBuff,1,38016,fp);

        LOGI("value of n after fread is %d",n);

        memcpy(m_pInBuffers[0]->pBuffer, pBuff, 38016);

        m_bInFrameFree[0] = OMX_FALSE;

        m_pInBuffers[0]->nTimeStamp = m_nTimeStamp;

        result = OMX_EmptyThisBuffer(m_hHandle,m_pInBuffers[0]);
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to