This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CMUX component add more buffer

I am using SDK 05_00_00_11.

I need to add more CMUX buffer as the original setting for CMUX buffer is only 4, See file:  omx/comp/cmux/src/omx_cmux_utils.c,

pCMUXComPvt->pPortdefs[OMX_CMUX_INPUT_PORT_START_INDEX +
                           i]->nBufferCountActual =
        OMX_CMUX_DEFAULT_INPUT_BUFFER_COUNT;
    pCMUXComPvt->pPortdefs[OMX_CMUX_INPUT_PORT_START_INDEX +
                           i]->nBufferCountMin =
        OMX_CMUX_DEFAULT_INPUT_BUFFER_COUNT;
    pCMUXComPvt->pPortdefs[OMX_CMUX_INPUT_PORT_START_INDEX + i]->nBufferSize =
        OMX_CMUX_DEFAULT_INPUT_BUFFER_SIZE;


I have tried to modification the definition of OMX_CMUX_DEFAULT_INPUT_BUFFER_COUNT from 4 to 6/8, however, it cannot work after modification. I wonder why I cannot modify that, is it related with the frameQ?

Another question: I can see the code in omx_cmux_priv.h

#define CMUX_FRAME_QUE_LEN_PER_CH     (2)

 /** default input buffer count */
#define OMX_CMUX_DEFAULT_INPUT_BUFFER_COUNT (CMUX_FRAME_QUE_LEN_PER_CH*2)

 /** Minimum input buffer count */
#define OMX_CMUX_MIN_INPUT_BUFFER_COUNT (CMUX_FRAME_QUE_LEN_PER_CH*2)

......

/** Maximum number of frame buffers */
#define OMX_CMUX_MAX_FRAME_BUF_COUNT      (CMUX_FRAME_QUE_LEN_PER_CH * \
                                             OMX_CMUX_NUM_INPUT_PORTS)

I wonder why the input buffer count is 2 times o f frame queue length. And also why the max frame buffer count is equal to frame queue length* PORT_NUM.

Jeff