Q on DMABUF: how to get fd info from downstream plugin

Makoto Harada makotouu at gmail.com
Thu May 1 08:42:34 PDT 2014


Hello,

I've tried the codes on your allocator branch [1].

Environment:
     - Linux version 3.2.0-4-686-pae (debian-kernel at lists.debian.org) 
(gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1
     - gstreamer1.0, gst-plugins-base are fetched from master branch on 
official tree (as of 2014/4/30)
     - gst-plugins-good are fetched from [1]

     [1] 
http://cgit.collabora.com/git/user/nicolas/gst-plugins-good.git/log/?h=v4l2-allocator 


I've tried the basic operation before trying DMABUF feature.
However, unfortunately, it does run as expected.

Symptom:
     1. gst-launch-1.0 v4l2src io-mode=2 ! fakesink failed with 
following error message
     ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: 
Failed to configure internal buffer pool.

     (log file with GST_DEBUG=6 is attached(tmp2.log). below is just the 
essense of the error message)

     v4l2 
gstv4l2bufferpool.c:557:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> 
can't allocate, setting maximum to minimum
     bufferpool 
gstbufferpool.c:551:default_set_config:<v4l2src0:pool:src> config 
GstBufferPoolConfig, caps=(GstCaps)"NULL",
    size=(uint)0, min-buffers=(uint)2, max-buffers=(uint)2, 
allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
     v4l2 
gstv4l2object.c:3196:gst_v4l2_object_decide_allocation:<v4l2src0> error: 
Failed to configure internal buffer pool.

My findings:
     1. gst-plaugins-good from master branch on official tree worked as 
expected.

     2. Error happens because can_allocate is 0 as shown below.

         gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, 
GstStructure * config)
             ....
             case GST_V4L2_IO_MMAP:
               can_allocate = GST_V4L2_ALLOCATOR_CAN_ALLOCATE 
(pool->vallocator, MMAP);

        According to the current code, it seems to me that kernel needs 
to support not only
        VIDIOC_REQBUFS but also VIDIOC_CREATE_BUFS ioctl, in order to 
use v4l2allocator.

     3. Do we need to set "flags" to the allocator like below so that
         GST_V4L2_ALLOCATOR_CAN_ALLOCATE () macro can work as expected ?
         Please ignore if this is in your expectation. Maybe I'm 
misunderstanding something....

          gst_v4l2_allocator_create_buf (GstV4l2Allocator * allocator)
         @@ -610,10 +648,20 @@ gst_v4l2_allocator_new (GstObject * 
parent, gint video_fd,
            allocator->type = format->type;
            allocator->format = *format;

            flags |= GST_V4L2_ALLOCATOR_PROBE (allocator, MMAP);
            flags |= GST_V4L2_ALLOCATOR_PROBE (allocator, USERPTR);
            flags |= GST_V4L2_ALLOCATOR_PROBE (allocator, DMABUF);

         +  GST_OBJECT_FLAG_SET (allocator, flags);
            if (flags == 0)
              goto not_supported;

Question:
     1. Is there any special reason why VIDIOC_CREATE_BUFS ioctl is needed ?
         According to the following document, it seems to me that 
VIDIOC_CREATE_BUFS is not mandatory one.
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-create-bufs.html
         Our kernel currently does only support VIDIOC_REQBUS, and doe 
not support VIDIOC_CREATE_BUFS.

        I'm not so familiar with the multimedia portion, so please 
forgive me if I'm asking silly question.
        Any insight would be highly appreciated.
        Looking forward to hearing from you.

KInd Regards,
Makoto Harada


(2014/04/29 8:40), Makoto Harada wrote:
> Thank you so much, Nicolas, for your kind reply.
> This is exactly what I needed. I'll try it.
>
> Kind Regards,
> Makoto
>
> (2014/04/27 2:23), Nicolas Dufresne wrote:
>> Le samedi 26 avril 2014 à 13:22 -0400, Nicolas Dufresne a écrit :
>>> Le jeudi 24 avril 2014 à 10:54 +0900, Makoto Harada a écrit :
>>>> Dear gstreamer expert,
>>>>
>>>> I'm now working to implement DMABUF feature to our custom video encoder plugin,
>>>> which would be directory connected to v4l2src in the gstreamer pipeline. (We
>>>> have already validated the DMABUF functionality of our kernel by using some
>>>> simple V4L2 applications, so now the turn of gstreamer)
>>> This is not needed. I already got it in my branch [1]. Next week I'm 
>>> giving it a last debugging round, need to fix some threading issues 
>>> and seeking/flush. Some patch cleanup and will start merging this 
>>> into master if it's all good with the others. What will be pending 
>>> is transparent activation of it.
>> [1] 
>> http://cgit.collabora.com/git/user/nicolas/gst-plugins-good.git/log/?h=v4l2-allocator 
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140502/ab9884cf/attachment-0001.html>
-------------- next part --------------
....
0:00:03.035738167 18157  0x8662950 DEBUG                v4l2src gstv4l2src.c:256:gst_v4l2src_fixate:<v4l2src0> fixating caps video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 5/1, 1/1 }
0:00:03.035754561 18157  0x8662950 DEBUG              structure gststructure.c:2773:gst_structure_fixate_field_nearest_fraction: target 2.14748e+09, best 1.79769e+308
0:00:03.035768067 18157  0x8662950 DEBUG              structure gststructure.c:2790:gst_structure_fixate_field_nearest_fraction: curr diff 2.14748e+09, list 5
0:00:03.035774570 18157  0x8662950 DEBUG              structure gststructure.c:2796:gst_structure_fixate_field_nearest_fraction: new best 5
0:00:03.035779491 18157  0x8662950 DEBUG              structure gststructure.c:2790:gst_structure_fixate_field_nearest_fraction: curr diff 2.14748e+09, list 1
0:00:03.035788236 18157  0x8662950 DEBUG                v4l2src gstv4l2src.c:279:gst_v4l2src_fixate:<v4l2src0> fixated caps video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.035799309 18157  0x8662950 DEBUG                basesrc gstbasesrc.c:953:gst_base_src_default_fixate:<v4l2src0> using default caps fixate function
0:00:03.035805822 18157  0x8662950 DEBUG                v4l2src gstv4l2src.c:390:gst_v4l2src_negotiate:<v4l2src0> fixated to: video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.035815834 18157  0x8662950 DEBUG                v4l2src gstv4l2src.c:391:gst_v4l2src_negotiate:<v4l2src0> caps: video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.035828256 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2891:gst_v4l2_object_stop:<v4l2src0> stopping
0:00:03.035848538 18157  0x8662950 DEBUG                default video-info.c:170:gst_video_info_from_caps: parsing caps video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.035872800 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2369:gst_v4l2_object_set_format:<v4l2src0> progressive video
0:00:03.035878428 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2375:gst_v4l2_object_set_format:<v4l2src0> Desired format 1600x1200, format YUYV stride: 3200
0:00:03.035887264 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2418:gst_v4l2_object_set_format:<v4l2src0> Current size is 1600x1200, format YUYV stride 3200, colorspace 8
0:00:03.035895247 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2245:gst_v4l2_object_extrapolate_stride:<v4l2src0> Extrapolated stride for plane 0 from 3200 to 3200
0:00:03.035901566 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2282:gst_v4l2_object_save_format:<v4l2src0> Got sizeimage 3840000
0:00:03.035906698 18157  0x8662950 LOG                  default video-info.c:748:gst_video_info_align: padding 0-0x0-0
0:00:03.035912683 18157  0x8662950 LOG                  default video-info.c:757:gst_video_info_align: left padding 0
0:00:03.035917339 18157  0x8662950 LOG                  default video-info.c:767:gst_video_info_align: plane 0, padding 0, alignment 0
0:00:03.035923299 18157  0x8662950 LOG                  default video-info.c:783:gst_video_info_align: padded dimension 1600-1200
0:00:03.035928412 18157  0x8662950 LOG                  default video-info.c:793:gst_video_info_align: plane 0, stride 3200, alignment 0
0:00:03.035936387 18157  0x8662950 DEBUG                default video-info.c:825:gst_video_info_align: plane 0: comp: 0, hedge 0 vedge 0 align 0 stride 3200
0:00:03.035944724 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2157:gst_v4l2_object_setup_pool:<v4l2src0> initializing the capture system
0:00:03.035949919 18157  0x8662950 INFO                    v4l2 gstv4l2object.c:2181:gst_v4l2_object_setup_pool:<v4l2src0> accessing buffers via mode 2
0:00:03.035955065 18157  0x8662950 LOG                     v4l2 gstv4l2object.c:2185:gst_v4l2_object_setup_pool:<v4l2src0> initiating buffer pool
0:00:03.035997800 18157  0x8662950 DEBUG               GST_POLL gstpoll.c:557:gst_poll_new: 0x866a6c0: new controllable : 1
0:00:03.036015996 18157  0x8662950 DEBUG               GST_POLL gstpoll.c:726:gst_poll_add_fd_unlocked: 0x866a6c0: fd (fd:12, idx:0)
0:00:03.036022625 18157  0x8662950 DEBUG               GST_POLL gstpoll.c:893:gst_poll_fd_ctl_read_unlocked: 0x866a6c0: fd (fd:12, idx:0), active : 1
0:00:03.036039262 18157  0x8662950 LOG                 GST_POLL gstpoll.c:186:raise_wakeup: 0x866a6c0: raise
0:00:03.036049542 18157  0x8662950 DEBUG             bufferpool gstbufferpool.c:178:gst_buffer_pool_init:<GstBufferPool at 0xb650a090> created
0:00:03.036098820 18157  0x8662950 DEBUG                   v4l2 gstv4l2bufferpool.c:505:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", size=(uint)3840000, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036140381 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:540:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
0:00:03.036146105 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:546:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:03.036151341 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:557:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> can't allocate, setting maximum to minimum
0:00:03.036158459 18157  0x8662950 DEBUG             bufferpool gstbufferpool.c:551:default_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", size=(uint)3840000, min-buffers=(uint)2, max-buffers=(uint)2, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036177552 18157  0x8662950 INFO               GST_EVENT gstevent.c:677:gst_event_new_caps: creating caps event video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.036192762 18157  0x8662950 DEBUG              GST_EVENT gstevent.c:301:gst_event_new_custom: creating new event 0x866a700 caps 12814
0:00:03.036202679 18157  0x8662950 LOG                 GST_PADS gstpad.c:4634:store_sticky_event:<v4l2src0:src> stored sticky event caps
0:00:03.036209075 18157  0x8662950 DEBUG               GST_PADS gstpad.c:4640:store_sticky_event:<v4l2src0:src> notify caps
0:00:03.036217938 18157  0x8662950 LOG           GST_PROPERTIES gstobject.c:463:gst_object_dispatch_properties_changed:<v4l2src0> deep notification from src (caps)
0:00:03.036226089 18157  0x8662950 LOG           GST_PROPERTIES gstobject.c:463:gst_object_dispatch_properties_changed:<pipeline0> deep notification from src (caps)
0:00:03.036233353 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3482:check_sticky:<v4l2src0:src> pushing all sticky events
0:00:03.036239634 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3415:push_sticky:<v4l2src0:src> event stream-start was already received
0:00:03.036246798 18157  0x8662950 LOG                 GST_PADS gstpad.c:4791:gst_pad_push_event_unchecked:<v4l2src0:src> sending event 0x866a700 (caps) to peerpad <fakesink0:sink>
0:00:03.036255328 18157  0x8662950 DEBUG              GST_EVENT gstpad.c:5051:gst_pad_send_event_unchecked:<fakesink0:sink> have event type caps event: 0x866a700, time 99:99:99.999999999, seq-num 19, GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1";
0:00:03.036273447 18157  0x8662950 DEBUG               GST_CAPS gstutils.c:2849:gst_pad_query_accept_caps:<fakesink0:sink> accept caps of video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.036285120 18157  0x8662950 DEBUG                  query gstquery.c:673:gst_query_new_custom: creating new query 0x8662b50 accept-caps
0:00:03.036291450 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3551:gst_pad_query:<fakesink0:sink> doing query 0x8662b50 (accept-caps)
0:00:03.036300385 18157  0x8662950 DEBUG               basesink gstbasesink.c:4821:gst_base_sink_default_query:<fakesink0> Checking if requested caps video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1 are a subset of pad caps ANY result 1
0:00:03.036313132 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3573:gst_pad_query:<fakesink0:sink> sent query 0x8662b50 (accept-caps), result 1
0:00:03.036320372 18157  0x8662950 DEBUG                default gstutils.c:2854:gst_pad_query_accept_caps:<fakesink0:sink> query returned 1
0:00:03.036327035 18157  0x8662950 DEBUG               basesink gstbasesink.c:3156:gst_base_sink_event:<fakesink0> received event 0x866a700 caps event: 0x866a700, time 99:99:99.999999999, seq-num 19, GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1";
0:00:03.036342937 18157  0x8662950 DEBUG               basesink gstbasesink.c:3069:gst_base_sink_default_event:<fakesink0> caps 0x866a700
0:00:03.036349515 18157  0x8662950 DEBUG               GST_PADS gstpad.c:5109:gst_pad_send_event_unchecked:<fakesink0:sink> sent event, ret ok
0:00:03.036357822 18157  0x8662950 LOG                 GST_PADS gstpad.c:4634:store_sticky_event:<fakesink0:sink> stored sticky event caps
0:00:03.036363509 18157  0x8662950 DEBUG               GST_PADS gstpad.c:4640:store_sticky_event:<fakesink0:sink> notify caps
0:00:03.036370169 18157  0x8662950 LOG           GST_PROPERTIES gstobject.c:463:gst_object_dispatch_properties_changed:<fakesink0> deep notification from sink (caps)
0:00:03.036377281 18157  0x8662950 LOG           GST_PROPERTIES gstobject.c:463:gst_object_dispatch_properties_changed:<pipeline0> deep notification from sink (caps)
0:00:03.036384628 18157  0x8662950 LOG                 GST_PADS gstpad.c:4799:gst_pad_push_event_unchecked:<v4l2src0:src> sent event 0x866a700 to (caps) peerpad <fakesink0:sink>, ret ok
0:00:03.036393322 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3435:push_sticky:<v4l2src0:src> event caps marked received
0:00:03.036400939 18157  0x8662950 DEBUG               GST_CAPS gstpad.c:2516:gst_pad_get_current_caps:<v4l2src0:src> get current pad caps video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)5/1
0:00:03.036412520 18157  0x8662950 DEBUG                  query gstquery.c:673:gst_query_new_custom: creating new query 0x8662b80 allocation
0:00:03.036419067 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3676:gst_pad_peer_query:<v4l2src0:src> peer query 0x8662b80 (allocation)
0:00:03.036425752 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3551:gst_pad_query:<fakesink0:sink> doing query 0x8662b80 (allocation)
0:00:03.036432529 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3573:gst_pad_query:<fakesink0:sink> sent query 0x8662b80 (allocation), result 0
0:00:03.036439003 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3617:gst_pad_query:<fakesink0:sink> query failed
0:00:03.036444454 18157  0x8662950 DEBUG               GST_PADS gstpad.c:3738:gst_pad_peer_query:<v4l2src0:src> query failed
0:00:03.036449950 18157  0x8662950 DEBUG                basesrc gstbasesrc.c:3094:gst_base_src_prepare_allocation:<v4l2src0> peer ALLOCATION query failed
0:00:03.036455455 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2973:gst_v4l2_object_decide_allocation:<v4l2src0> decide allocation
0:00:03.036469406 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:2996:gst_v4l2_object_decide_allocation:<v4l2src0> allocation: size:0 min:0 max:0 pool:(NULL)
0:00:03.036483126 18157  0x8662950 DEBUG               GST_META gstmeta.c:87:gst_meta_api_type_register: register API "GstVideoMetaAPI"
0:00:03.036494509 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "video"
0:00:03.036500375 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "memory"
0:00:03.036505636 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "colorspace"
0:00:03.036510876 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "size"
0:00:03.036519977 18157  0x8662950 DEBUG               GST_META gstmeta.c:87:gst_meta_api_type_register: register API "GstVideoCropMetaAPI"
0:00:03.036526564 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "video"
0:00:03.036531705 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "size"
0:00:03.036536580 18157  0x8662950 DEBUG               GST_META gstmeta.c:94:gst_meta_api_type_register:   adding tag "orientation"
0:00:03.036630342 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:3053:gst_v4l2_object_decide_allocation:<v4l2src0> streaming mode: using our own pool <v4l2src0:pool:src>
0:00:03.036646748 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:3135:gst_v4l2_object_decide_allocation:<v4l2src0> setting own pool config to GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", size=(uint)3840000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036668103 18157  0x8662950 DEBUG                   v4l2 gstv4l2bufferpool.c:505:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", size=(uint)3840000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036684585 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:540:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
0:00:03.036689831 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:546:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:03.036694980 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:557:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> can't allocate, setting maximum to minimum
0:00:03.036701949 18157  0x8662950 DEBUG             bufferpool gstbufferpool.c:551:default_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", size=(uint)3840000, min-buffers=(uint)2, max-buffers=(uint)2, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036721310 18157  0x8662950 DEBUG                   v4l2 gstv4l2object.c:3142:gst_v4l2_object_decide_allocation:<v4l2src0> own pool config changed to GstBufferPoolConfig, caps=(GstCaps)"NULL", size=(uint)0, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036733442 18157  0x8662950 DEBUG                   v4l2 gstv4l2bufferpool.c:505:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"NULL", size=(uint)0, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036744140 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:540:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
0:00:03.036749504 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:546:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:03.036754527 18157  0x8662950 INFO                    v4l2 gstv4l2bufferpool.c:557:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> can't allocate, setting maximum to minimum
0:00:03.036760359 18157  0x8662950 DEBUG             bufferpool gstbufferpool.c:551:default_set_config:<v4l2src0:pool:src> config GstBufferPoolConfig, caps=(GstCaps)"NULL", size=(uint)0, min-buffers=(uint)2, max-buffers=(uint)2, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)NULL;
0:00:03.036839203 18157  0x8662950 WARN                    v4l2 gstv4l2object.c:3196:gst_v4l2_object_decide_allocation:<v4l2src0> error: Failed to configure internal buffer pool.
0:00:03.036850622 18157  0x8662950 DEBUG            GST_MESSAGE gstelement.c:1802:gst_element_message_full:<v4l2src0> start
0:00:03.036864168 18157  0x8662950 INFO        GST_ERROR_SYSTEM gstelement.c:1833:gst_element_message_full:<v4l2src0> posting message: Failed to configure internal buffer pool.
0:00:03.036878124 18157  0x8662950 LOG              GST_MESSAGE gstmessage.c:280:gst_message_new_custom: source v4l2src0: creating new message 0x8669b88 error
0:00:03.036887810 18157  0x8662950 DEBUG                GST_BUS gstbus.c:310:gst_bus_post:<bus0> [msg 0x8669b88] posting on bus error message: 0x8669b88, time 99:99:99.999999999, seq-num 20, element 'v4l2src0', GstMessageError, gerror=(GError)NULL, debug=(string)"gstv4l2object.c\(3196\):\ gst_v4l2_object_decide_allocation\ \(\):\ /GstPipeline:pipeline0/GstV4l2Src:v4l2src0";
0:00:03.036904465 18157  0x8662950 DEBUG                    bin gstbin.c:3391:gst_bin_handle_message_func:<pipeline0> [msg 0x8669b88] handling child v4l2src0 message of type error
0:00:03.036911902 18157  0x8662950 DEBUG                    bin gstbin.c:3398:gst_bin_handle_message_func:<pipeline0> got ERROR message, unlocking state change
0:00:03.036916941 18157  0x8662950 DEBUG                    bin gstbin.c:3726:gst_bin_handle_message_func:<pipeline0> posting message upward
0:00:03.036922246 18157  0x8662950 DEBUG                GST_BUS gstbus.c:310:gst_bus_post:<bus1> [msg 0x8669b88] posting on bus error message: 0x8669b88, time 99:99:99.999999999, seq-num 20, element 'v4l2src0', GstMessageError, gerror=(GError)NULL, debug=(string)"gstv4l2object.c\(3196\):\ gst_v4l2_object_decide_allocation\ \(\):\ /GstPipeline:pipeline0/GstV4l2Src:v4l2src0";
0:00:03.036934368 18157  0x8662950 DEBUG                GST_BUS gstbus.c:345:gst_bus_post:<bus1> [msg 0x8669b88] pushing on async queue
0:00:03.036939705 18157  0x8662950 LOG                 GST_POLL gstpoll.c:186:raise_wakeup: 0x866a260: raise
0:00:03.036949767 18157  0x8662950 DEBUG                GST_BUS gstbus.c:348:gst_bus_post:<bus1> [msg 0x8669b88] pushed on async queue
0:00:03.036956048 18157  0x8662950 DEBUG                GST_BUS gstbus.c:341:gst_bus_post:<bus0> [msg 0x8669b88] dropped
0:00:03.036961512 18157  0x8662950 INFO        GST_ERROR_SYSTEM gstelement.c:1856:gst_element_message_full:<v4l2src0> posted error message: Failed to configure internal buffer pool.
0:00:03.036970747 18157  0x8662950 DEBUG                basesrc gstbasesrc.c:3101:gst_base_src_prepare_allocation:<v4l2src0> ALLOCATION (0) params: allocation query: 0x8662b80, GstQueryAllocation, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)5/1", need-pool=(boolean)true, pool=(GArray)NULL, meta=(GArray)NULL;
0:00:03.037010482 18157  0x8662950 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
0:00:03.037017254 18157  0x8662950 DEBUG                basesrc gstbasesrc.c:2868:gst_base_src_loop:<v4l2src0> Not negotiated
0:00:03.037022373 18157  0x8662950 DEBUG                basesrc gstbasesrc.c:2884:gst_base_src_loop:<v4l2src0> pausing task, reason not-negotiated
0:00:03.037028288 18157  0x8662950 DEBUG               GST_PADS gstpad.c:5520:gst_pad_pause_task:<v4l2src0:src> pause task
0:00:03.037034388 18157  0x8662950 DEBUG                   task gsttask.c:663:gst_task_set_state:<v4l2src0:src> Changing task 0x8747850 to state 2
0:00:03.037040926 18157  0x8662950 DEBUG              GST_EVENT gstevent.c:301:gst_event_new_custom: creating new event 0x866a740 eos 28174
0:00:03.143877670 18157  0x8660e00 LOG                  GST_BUS gstbus.c:496:gst_bus_timed_pop_filtered:<bus1> have 1 messages
0:00:03.143887016 18157  0x8660e00 LOG                 GST_POLL gstpoll.c:201:release_wakeup: 0x866a260: release
0:00:03.143895316 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:504:gst_bus_timed_pop_filtered:<bus1> got message 0x8669b88, error from v4l2src0, type mask is 4294967295
0:00:03.143903682 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:771:gst_bus_source_dispatch:<bus1> source 0x86f4208 calling dispatch with error message: 0x8669b88, time 99:99:99.999999999, seq-num 20, element 'v4l2src0', GstMessageError, gerror=(GError)NULL, debug=(string)"gstv4l2object.c\(3196\):\ gst_v4l2_object_decide_allocation\ \(\):\ /GstPipeline:pipeline0/GstV4l2Src:v4l2src0";
0:00:03.250735906 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:977:poll_func: mainloop 0x870cca0 quit
0:00:03.250747135 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:776:gst_bus_source_dispatch:<bus1> source 0x86f4208 handler returns 1
0:00:03.250754501 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:1089:gst_bus_poll: mainloop stopped 0x870cca0
0:00:03.250764148 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:1334:gst_bus_remove_signal_watch:<bus1> removing signal watch 23
0:00:03.250771332 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:797:gst_bus_source_finalize:<bus1> finalize source 0x86f4208
0:00:03.037055377 18157  0x8662950 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<v4l2src0> error: ???????????
0:00:03.250778538 18157  0x8660e00 DEBUG                GST_BUS gstbus.c:1102:gst_bus_poll:<bus1> finished poll with message 0x8669b88
0:00:03.250797554 18157  0x8662950 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
0:00:03.250828531 18157  0x8662950 DEBUG            GST_MESSAGE gstelement.c:1802:gst_element_message_full:<v4l2src0> start
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to configure internal buffer pool.
....


More information about the gstreamer-devel mailing list