DMA buffer import cannot work with msdkvpp on Clearlinux (v4l2 based camera driver use the dma buffer allocated by Intel graphic driver).
We are working on v4l2 based gstreamer camera plugin drivers (icamerasrc), want to run up dma buffer import with msdkvpp on Clearlinux.
gst-launch-1.0 icamerasrc num-vc=1 device-name=ov10640-vc scene-mode=ull io-mode=3 ! video/x-raw(memory:DMABuf), format=NV12,width=1280,height=1080 ! msdkvpp ! glimagesink
But found the dma buffer cannot be mapped successfully, by camera kernel driver, return -EINVAL.
struct dma_buf *dma_buf_get(int fd) { struct file *file;
file = fget(fd);
if (!file)
return ERR_PTR(-EBADF);
if (!is_dma_buf_file(file)) {
fput(file);
return ERR_PTR(-EINVAL);
}
return file->private_data;
}