Hello,
On tx2 4g, we are developing custom plugin that can process data from nvstreammux.
video0 –
. |
–nvstreammux----crenh—nvstreamdemux–…
. |
video1–
This plugin will handle video streams from two different source elements separately. However, we could not tell which surface was from which upstream sink pad in nvstreammux. i.e.
// Map the buffer so that it can be accessed by CPU
if (NvBufSurfaceMap(temp_buf, param->active_sink, -1, NVBUF_MAP_READ_WRITE) != 0) {
g_assert(false);
}
.........
NvBufSurfaceUnMap (temp_buf, param->active_sink, -1);
we expected to get video source0 when param->active_sink == 0, and video source 1 when param->active_sink==1. But it did not come out that way, the two video sources came in randomly.
So the question is, how can our plugin tell a surface is from video n in nvstreammux?