and now I want to use multimedia_api to improve performence.
My solution is follow:
rtspsrc -> rtph264depay -> appsink ->
and use the multimedia_api to decode video as the sample 00_video_decode → fd to EGLImage. Does this solution feasible ? Or there are any solution to replace gstreamer ?
Hi ClancyLian,
You can use NvBuffer APIs to get fd in appsink.
/**
* This method must be used to extract dmabuf_fd of the hardware buffer.
* @param[in] nvbuf Specifies the `hw_buffer`.
* @param[out] dmabuf_fd Returns DMABUF FD of `hw_buffer`.
*
* @returns 0 for success, -1 for failure.
*/
int ExtractFdFromNvBuffer (void *nvbuf, int *dmabuf_fd);
/**
* This method must be used for releasing dmabuf_fd.
* Obtained using ExtractfdFromNvBuffer API.
* @param[in] dmabuf_fd Specifies the `dmabuf_fd` to release.
*
* @returns 0 for success, -1 for failure.
*/
int NvReleaseFd (int dmabuf_fd);
You may misunderstand my question. The gstreamer is high-level API and the multimedia_api is lower-level API. If I use gstreamer, I used decodebin to decode my video, and you gave me demo also use decodebin. My idea is that I use gstreamer to get encode data, and use NvVideoDecoder to decode my video. Does this is more efficient ?
And your demo is also a solution, But I want to improve my throughput, or let deocde more efficient.
Hi ClancyLian,
The decodebin is equal to ‘qtdemux ! h264parse ! omxh264dec’. omxh264dec is with same HW engine as NvVideoDecoder. Your proposal is also good to go.
I compiled “test3.cpp” with Jetson TX2, and it works well.
but it doesn’t work with Jetson nano.
I get following error message…
========================================================
nvbuf_utils: dmabuf_fd 1125 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD… Exiting…
I think that failed to release buffer, function of “NvReleaseFd(dmabuf_fd)”.
Does anyone know measures for this error?
Edit I tried to download test3.zip using Chromium, Chromium incognito, and Firefox. All three gave me the same error, but with different RequestId and HostId values.