I want to disable nvdosd plugin for save inference speed, I just rtspsrc->streamux->nvinfer->NULL, but error

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hello I want to disable show for saving compute units,and I want to show with ourself method, so I create the pipeline,
like this : rtspsrc->streammux->pgie->NULL, and add probe for nvinfer, but get an error :
nvinfer gstnvinfer.cpp:2288: gst_nvinfer_output_loop: error: streaming stopped reason not-linked(-1)

streammux works with video caps, not rtp caps, try replace rtspsrc with uridecodebin

Can you try to link one fakesink with pgie?

thanks, i link fakesink now, and it works, but I got a new problem now ,I add probe pgie sink pad, want to convert NV12 to BGR image ,but failed! I cant get the right image .code like this:

GstPad *pgie_sink_pad = NULL;
pgie_sink_pad = gst_element_get_static_pad(pgie, "sink);
gst_pad_probe(pgie_sin_pad, GST_PAD_PROBE_TYPE_BUFFER, pgie_sink_pad_probe, NULL,NULL);

GstPadProbeReturn pgie_sink_pad_probe(GstPad* pad, GstPadProbeInfo* info, gpointer u_data)
{
GstBuffer buf = (GstBuffer) info->data;
NvDsMetaList *l_frame = NULL;
NvDsMetaList * l_obj = NULL;
NvDsObjectMeta *obj_meta = NULL;
GstMapInfo in_map_info;

if( !gst_buffer_map(buf, &in_map_info, GST_MAP_READ))
{
    g_print("Error:Failed to map gst buffer\n");
    gst_buffer_unmap(buf, &in_map_info);
    return GST_PAD_PROBE_OK;
}
NvBufSurface* surface = (NvBufSurface *)in_map_info.data;
NvDsBatchMeta* batch_meta = gst_buffer_get_nvds_batch_meta(buf);
for(l_frame=batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next)
{
     NvDsFrameMeta *frame_meta = (NvDsFrameMeta*)(l_frame->data);
      char* src_data = (char*) malloc(surface->surfaceList[frame_meta->batch_id].dataSize);
     if(src_data == NULL)
     {
        g_print("Error: failed to malloc src_data \n");
        free(src_data);
        continue;
    }
    NvBufSurfaceMap (surface, -1, -1, NVBUF_MAP_READ);
    NvBufSurfacePlaneParams *pParams = &surface->surfaceList[frame_meta->batch_id].planeParams;
    unsigned int offset = 0;
    for(unsigned int num_planes=0; num_planes < pParams->num_planes; num_planes++)
    {
       if(num_planes>0)
          offset += pParams->height[num_planes-1]*(pParams->bytesPerPix[num_planes-1]*pParams->width[num_planes-1]);
        for (unsigned int h = 0; h < pParams->height[num_planes]; h++)
        {
             memcpy((void *)(src_data+offset+h*pParams->bytesPerPix[num_planes]*pParams->width[num_planes]),
                                 (void *)((char *)surface->surfaceList[frame_meta->batch_id].mappedAddr.addr[num_planes]+h*pParams->pitch[num_planes]),
                                 pParams->bytesPerPix[num_planes]*pParams->width[num_planes]
                                 );
         }
    }
    NvBufSurfaceSyncForDevice (surface, -1, -1);
    NvBufSurfaceUnMap (surface, -1, -1);

    cv::Mat src(surface->surfaceList[frame_meta->batch_id].height*3/2,surface->surfaceList[frame_meta->batch_id].width,CV_8UC1,src_data);
    cv::Mat src_bgr ;
    cv::cvtColor(src,src_bgr,CV_YUV2BGR_NV12);

}

Can you open new topic for now problem. Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.