Please provide complete information as applicable to your setup.
• platform: orin
**• deepstream 6.1.1
**error :
VMAP_IOC_GET_FD failed: Bad address
NVMAP_IOC_GET_FD failed: Bad address
NVMAP_IOC_GET_FD failed: Bad address
NVMAP_IOC_GET_FD failed: Bad address
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
gst_nvvconv_transform: NvBufSurfTransform Failed
ERROR from element source2: Internal data stream error.
Error details: gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:wtf-pipeline/GstBin:new-bin2/GstV4l2Src:source2:
streaming stopped, reason error (-5)
my code:
GstBuffer *buf = (GstBuffer *) info->data;
GstMapInfo in_map_info =GST_MAP_INFO_INIT;
//if(!gst_buffer_map(buf,&in_map_info,GST_MAP_READ))
//{
// g_print("error map buf\n ");
//gst_buffer_unmap(buf,&in_map_info);
// return GST_PAD_PROBE_OK;
// }
gst_buffer_map(buf,&in_map_info,GST_MAP_READ);
NvBufSurface * surface=(NvBufSurface *)in_map_info.data;
NvBufSurface *dst_surface=NULL;
NvBufSurfTransformRect src_rect, dst_rect;
NvBufSurfTransformParams nvbufsurface_params;
NvBufSurfaceCreateParams nvbufsurface_create_params;
cudaError_t cuda_err;
cudaStream_t cuda_stream;
gint create_result;
NvBufSurfTransformConfigParams transform_config_params;
NvBufSurfTransform_Error err;
src_rect.top = 0;
src_rect.left = 0;
src_rect.width = (guint) surface->surfaceList[batch_id].width;
src_rect.height = (guint) surface->surfaceList[batch_id].height;
dst_rect.top = 0;
dst_rect.left = 0;
dst_rect.width = (guint) surface->surfaceList[batch_id].width;
dst_rect.height = (guint) surface->surfaceList[batch_id].height;
nvbufsurface_params.src_rect = &src_rect;
nvbufsurface_params.dst_rect = &dst_rect;
nvbufsurface_params.transform_flag = NVBUFSURF_TRANSFORM_CROP_SRC | NVBUFSURF_TRANSFORM_CROP_DST;
nvbufsurface_params.transform_filter = NvBufSurfTransformInter_Default;
nvbufsurface_create_params.gpuId = surface->gpuId;
nvbufsurface_create_params.width = (guint) surface->surfaceList[batch_id].width;
nvbufsurface_create_params.height = (guint) surface->surfaceList[batch_id].height;
nvbufsurface_create_params.size = 2;
nvbufsurface_create_params.isContiguous = true;
nvbufsurface_create_params.colorFormat = NVBUF_COLOR_FORMAT_RGBA;
nvbufsurface_create_params.layout = NVBUF_LAYOUT_PITCH;
nvbufsurface_create_params.memType = 0;
create_result = NvBufSurfaceCreate(&dst_surface, batch_size, &nvbufsurface_create_params);
transform_config_params.compute_mode = NvBufSurfTransformCompute_Default;
transform_config_params.gpu_id = surface->gpuId;
transform_config_params.cuda_stream = cuda_stream;
err = NvBufSurfTransformSetSessionParams (&transform_config_params);
NvBufSurfaceMemSet (dst_surface, -1, -1, 0);
err = NvBufSurfTransform (surface, dst_surface, &nvbufsurface_params);
NvBufSurfaceMap (dst_surface, -1, -1, NVBUF_MAP_READ);
NvBufSurfaceSyncForCpu (dst_surface, -1, -1);
cv::Mat img= cv::Mat(1080,1920,CV_8UC4,dst_surface->surfaceList[0].mappedAddr.addr[0],dst_surface->surfaceList[0].pitch);
NvBufSurfaceUnMap(dst_surface,-1,-1);
NvBufSurfaceUnMap(surface,-1,-1);
g_print("---start-22---\n");
gst_buffer_unmap(buf,&in_map_info);