Passing decoded frame to cuda kernel (cuda-python)

New here. Trying pass decoded frame to a cuda Kernel and getting the error. Appreciate any suggestion.

Decoding frame code:

decoder = nvc.SimpleDecoder(enc_file_path=input_video_file,
                      gpu_id=cudaDevice,
                      use_device_memory=True,
                      need_scanned_stream_metadata=True,
                      output_color_type = nvc.OutputColorType.RGBP)

for frame in decoder:
    kernel_args_pre_process = ((frame, inputs['src']['d_mem'], np.int32(frame_height * frame_width)),
                               (None, None, ctypes.c_int))

   # Launch pre-preocessing kernel
   checkCudaErrors(cuda.cuLaunchKernel(cuda_pre_process_kernel,
                                       cuda_grid_dim[0], cuda_grid_dim[1], cuda_grid_dim[2],
                                       cuda_block_dim[0], cuda_block_dim[1], cuda_block_dim[2],
                                       0, 0,
                                       kernel_args_pre_process, 0))

Error:

File "cuda\\bindings\\driver.pyx", line 33809, in cuda.bindings.driver.cuLaunchKernel
  File "cuda\\bindings\\_lib\\utils.pyx", line 89, in cuda.bindings._lib.utils.HelperKernelParams.__cinit__
TypeError: Provided argument is of type <class '_PyNvVideoCodec.DecodedFrame'> but expected Type <class '_ctypes.PyCStructType'>, <class '_ctypes.PyCSimpleType'> or CUDA Binding structure with getPtr() attribute

Hi @mrutuy
Please refer below code snippet to get the base address of underlying surface.
frame_device_ptr = frame.GetPtrToPlane(0) # Extract device pointer
kernel_args_pre_process = ((ctypes.c_void_p(frame_device_ptr), inputs[‘src’][‘d_mem’], np.int32(frame_height * frame_width)),
(None, None, ctypes.c_int))