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.

TDA4VM: How do I understand the "queue" created in the "app_multi_cam_codec" application?

Part Number: TDA4VM

Hi,

How do I understand the "queue" created in the "app_multi_cam_codec" application, and whether a large number of memory copies are executed in this queue? Can you help me point out the specific implementation location of this queue in the code?

Here:

"   i += snprintf(&params->m_cmdString[i], CODEC_MAX_LEN_CMD_STR-i,"appsrc format=GST_FORMAT_TIME is-live=true do-timestamp=true block=false name=%s ! queue \n",params->m_AppSrcNameArr[ch]);"

sdk:08.06.00.12 vision_apps

Regards,

Yueqian

  • Hello Yueqian, 

    I will look into this implementation to understand this at the OpenVX level. I will let you know when I have more information.

    Thanks,
    Sarabesh S.

  • Hi Yueqian, 

    The way the "queue" element is being used by the pipeline is to act as a buffer in between upstream (appSrc) and downstream elements. Because appSrc is used as a source to inject custom data, the following "queue" element buffers this data before passing it downstream to be consumed by other parts of the pipeline. Since no limit is specified for the queue it is unbounded, which can buffer and unlimited amount of data but can cause increased memory usage if data production rate exceeds the consumption rate downstream.

    Therefore in the OpenVX use-case with a camera-capture->encode pipeline it is useful for managing the input camera data. The queue should just smooth out data flow while the number of mem-copies depend on whether downstream elements are exchanging buffers with the camera or not.

    To reduce mem-copies you can try adding capture-io-mode=5 to the appSrc (camera element) and adding output-io-mode=4 to the encoder element to share encoder raw frames buffers with the camera so there is no significant memory copies happening.

    Thank You,
    Sarabesh S.

  • Hi,

    I'm sorry for not responding to your message in a timely manner due to our annual leave recently.

    I will adopt your relevant suggestions. If there are any related issues, I will give you feedback.

    Regards,

    Yueqian

  • Hi Yueqian, 

    Sounds good. Let me know if there is anything else.

    Regards,
    Sarabesh S.