Я пишу драйвер v4l2, но у меня есть некоторые проблемы, когда он используется конвейером gstreamer. Я реализовал эти операции ioctl:
- vidioc_querycap
- vidioc_s_fmt_vid_cap
- vidioc_try_fmt_vid_cap
- vidioc_enum_frameintervals
- vidioc_enum_framesizes
- vidioc_enum_input
- vidioc_enum_fmt_vid_cap
Когда я запускаю конвейер gstreamer (gst-launch-1.0 v4l2src! Video / x-raw, формат = RGB, ширина = 4096, высота = 2160, частота кадров = 60/1! Fakesink) я получаю эту ошибку:
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(555): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Это часть отладочного вывода из gstreamer:
DEBUG v4l2 gstv4l2object.c:2858:gst_v4l2_object_setup_pool:<v4l2src0> initializing the capture system
INFO v4l2 gstv4l2object.c:2882:gst_v4l2_object_setup_pool:<v4l2src0> accessing buffers via mode 1
LOG v4l2 gstv4l2object.c:2891:gst_v4l2_object_setup_pool:<v4l2src0> initiating buffer pool
DEBUG v4l2 gstv4l2object.c:4035:gst_v4l2_object_decide_allocation:<v4l2src0> decide allocation
DEBUG v4l2 gstv4l2object.c:4061:gst_v4l2_object_decide_allocation:<v4l2src0> allocation: size:0 min:0 max:0 pool:(NULL)
DEBUG v4l2 gstv4l2object.c:4088:gst_v4l2_object_decide_allocation:<v4l2src0> read/write mode: no downstream pool, using our own
DEBUG v4l2 gstv4l2object.c:4195:gst_v4l2_object_decide_allocation:<v4l2src0> setting own pool config to GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)RGB\,\ width\=\(int\)4096\,\ height\=\(int\)2160\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive", size=(uint)26542080, min-buffers=(uint)4, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(555): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.410428919
Setting pipeline to PAUSED ...
LOG v4l2 gstv4l2object.c:3913:gst_v4l2_object_unlock:<v4l2src0> start flushing
Setting pipeline to READY ...
LOG v4l2 gstv4l2object.c:3913:gst_v4l2_object_unlock:<v4l2src0> start flushing
LOG v4l2 gstv4l2object.c:3926:gst_v4l2_object_unlock_stop:<v4l2src0> stop flushing
DEBUG v4l2 gstv4l2object.c:3937:gst_v4l2_object_stop:<v4l2src0> stopping
DEBUG v4l2 gstv4l2object.c:3945:gst_v4l2_object_stop:<v4l2src0> deactivating pool
Setting pipeline to NULL ...
DEBUG v4l2 v4l2_calls.c:719:gst_v4l2_close:<v4l2src0> Trying to close /dev/video0
DEBUG v4l2 v4l2_calls.c:464:gst_v4l2_empty_lists:<v4l2src0> deleting enumerations
Freeing pipeline ...
Я не могу найти причину ошибки, может быть, я забыл операцию ioctl?
Спасибо