Gstreamer v4l2: Device does support non-contiguous planes error with NV16

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Gstreamer v4l2: Device does support non-contiguous planes error with NV16

Andrea
Hi,
I'm modifing a v4l2 driver to make it working with multi-plane format
(NV16), I've implemented the mplane ioctl, but when the gstreamer pipeline
starts I get this error:

/DEBUG                   v4l2
gstv4l2object.c:3223:gst_v4l2_object_set_format_full:<v4l2src0> progressive
video
DEBUG                   v4l2
gstv4l2object.c:3355:gst_v4l2_object_set_format_full:<v4l2src0> Desired
format 4096x2160, format NV16 stride: 4096
DEBUG                   v4l2
gstv4l2object.c:3406:gst_v4l2_object_set_format_full:<v4l2src0> Desired
format is 4096x2160, format NV16, nb planes 1
DEBUG                   v4l2
gstv4l2object.c:3412:gst_v4l2_object_set_format_full:<v4l2src0>   stride
4096
DEBUG                   v4l2
gstv4l2object.c:3449:gst_v4l2_object_set_format_full:<v4l2src0> Got format
of 4096x2160, format NV16, nb planes 2, colorspace 8
DEBUG                   v4l2
gstv4l2object.c:3456:gst_v4l2_object_set_format_full:<v4l2src0>   stride
4096, sizeimage 8847360
DEBUG                   v4l2
gstv4l2object.c:3456:gst_v4l2_object_set_format_full:<v4l2src0>   stride
4096, sizeimage 8847360
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
'/dev/video0' does support non-contiguous planes
Additional debug info:
../../../git/sys/v4l2/gstv4l2object.c(3678): gst_v4l2_object_set_format_full
(): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device wants 2 planes/

NV16 is made up of two planes so in the driver I put
v4l2_format.fmt.pix_mp.num_planes to 2. I don't understand why gstreamer
request only one plane for the format NV16.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer v4l2: Device does support non-contiguous planes error with NV16

Nicolas Dufresne-5
Le vendredi 07 juin 2019 à 07:30 -0500, Andrea a écrit :

> Hi,
> I'm modifing a v4l2 driver to make it working with multi-plane format
> (NV16), I've implemented the mplane ioctl, but when the gstreamer pipeline
> starts I get this error:
>
> /DEBUG                   v4l2
> gstv4l2object.c:3223:gst_v4l2_object_set_format_full:<v4l2src0> progressive
> video
> DEBUG                   v4l2
> gstv4l2object.c:3355:gst_v4l2_object_set_format_full:<v4l2src0> Desired
> format 4096x2160, format NV16 stride: 4096
> DEBUG                   v4l2
> gstv4l2object.c:3406:gst_v4l2_object_set_format_full:<v4l2src0> Desired
> format is 4096x2160, format NV16, nb planes 1
> DEBUG                   v4l2
> gstv4l2object.c:3412:gst_v4l2_object_set_format_full:<v4l2src0>   stride
> 4096
> DEBUG                   v4l2
> gstv4l2object.c:3449:gst_v4l2_object_set_format_full:<v4l2src0> Got format
> of 4096x2160, format NV16, nb planes 2, colorspace 8
> DEBUG                   v4l2
> gstv4l2object.c:3456:gst_v4l2_object_set_format_full:<v4l2src0>   stride
> 4096, sizeimage 8847360
> DEBUG                   v4l2
> gstv4l2object.c:3456:gst_v4l2_object_set_format_full:<v4l2src0>   stride
> 4096, sizeimage 8847360
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> '/dev/video0' does support non-contiguous planes
> Additional debug info:
> ../../../git/sys/v4l2/gstv4l2object.c(3678): gst_v4l2_object_set_format_full
> (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Device wants 2 planes/
>
> NV16 is made up of two planes so in the driver I put
> v4l2_format.fmt.pix_mp.num_planes to 2. I don't understand why gstreamer
> request only one plane for the format NV16.

V4L2 is weird, so there is two pixel formats for NV16, one with
num_planes == 1 (single allocation) and one with num_planes == 2.
Though, regardless which one you picked, GStreamer will always report 1
if your driver advertise the capabilities V4L2_CAP_VIDEO_CAPTURE
instead of V4L2_CAP_VIDEO_CAPTURE_MPLANE. My guess is that you forgot
to change your device capabilities. If you still can't figure-out what
you are doing wrong, you can always pastebin and link a full debug with
GST_DEBUG="v4l2*:7".

>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer v4l2: Device does support non-contiguous planes error with NV16

Andrea
In a first moment I left V4L2_CAP_VIDEO_CAPTURE and added the
V4L2_CAP_VIDEO_CAPTURE_MPLANE. After your reply I've tried only with the
V4L2_CAP_VIDEO_CAPTURE_MPLANE, but I get the same problem. Below I put the
full gstreamer debug

https://pastebin.com/cPVBV30J




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer v4l2: Device does support non-contiguous planes error with NV16

Nicolas Dufresne-5
Le lundi 10 juin 2019 à 05:36 -0500, Andrea a écrit :
> In a first moment I left V4L2_CAP_VIDEO_CAPTURE and added the
> V4L2_CAP_VIDEO_CAPTURE_MPLANE. After your reply I've tried only with the
> V4L2_CAP_VIDEO_CAPTURE_MPLANE, but I get the same problem. Below I put the
> full gstreamer debug
>
> https://pastebin.com/cPVBV30J

0:00:01.064457938  2577     0x3c4a88a0 LOG                     v4l2 gstv4l2object.c:1138:gst_v4l2_object_fill_format_list:<v4l2src0> pixelformat: NV16

So you driver enumerate 'NV16' witch is single allocation. The variant
you described is 'NM16' aka V4L2_PIX_FMT_NV16M which has two
allocations.

https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/pixfmt-nv16m.html

>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment