• Jetson Nano
• DeepStream 5.0
• JetPack 4.4
I trying to get frame from GstBuffer with C++. I found Api and sample code for Python. Can anyone help me?
• Jetson Nano
• DeepStream 5.0
• JetPack 4.4
I trying to get frame from GstBuffer with C++. I found Api and sample code for Python. Can anyone help me?
DeepStream SDK can be downloaded here https://developer.nvidia.com/deepstream-getting-started
The C/C++ sample codes are in the SDK package.
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream_Development_Guide/deepstream_quick_start.html#
NVIDIA DeepStream SDK Developer Guide — DeepStream 6.1.1 Release documentation
I can’t find analog of function for C++ get_nvds_buf_surface in Python.
File: /opt/nvidia/deepstream/deepstream-5.0/sources/gst-plugins/gst-dsexample/gstdsexample.cpp
static GstFlowReturn
gst_dsexample_transform_ip (GstBaseTransform * btrans, GstBuffer * inbuf)
{
NvBufSurface *surface = NULL;
...
memset (&in_map_info, 0, sizeof (in_map_info));
if (!gst_buffer_map (inbuf, &in_map_info, GST_MAP_READ)) {
g_print ("Error: Failed to map gst buffer\n");
goto error;
}
surface = (NvBufSurface *) in_map_info.data;
// refer to [NvBufSurface Struct Reference](https://docs.nvidia.com/metropolis/deepstream/dev-guide/DeepStream_Development_Guide/baggage/structNvBufSurface.html) to operate NvBufSurface
...
}