Camerabin - how to specify size of image for capture

Ian Davidson id012c3076 at blueyonder.co.uk
Tue Jan 28 08:45:45 PST 2014


Here is a section of my code

   g_print ("Set the picture size\n");
   caps = gst_caps_from_string("width=800,height=600");
/*  caps = gst_caps_from_string("image-width=800,image-height=600");*/
/*  caps = gst_caps_from_string("video/x-raw, width=(int)800, 
height=(int)600");*/
   g_object_set (G_OBJECT (cambin), "image-capture-caps", caps, NULL);
   gst_caps_unref (caps);

If I use the code as shown, I get the message
GStreamer-CRITICAL **: gst_mini_object_unref: assertion `mini_object != 
NULL' failed
and the image size of the captured image is 320x200 (when using a 
camcorder connected via a video capture card) or 640x480 (on a different 
machine using a webcam connected via USB)

If I use the line with "image-width=800,image-height=600" I see a debug 
line which reads
0:00:02.977347248  2366      0x249cec0 WARN               structure 
gststructure.c:2302:gst_structure_from_string: Failed to find delimiter, 
r==800,image-height=600

If I use the line with "video/x-raw, width=(int)800, height=(int)600" I 
get the following lines of debug and the program crashes.
0:00:30.977458927  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for YUYV at 48x32
0:00:30.977515862  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat YUYV
0:00:30.977548658  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for UYVY at 48x32
0:00:30.977609933  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat UYVY
0:00:30.977640572  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for 422P at 48x32
0:00:30.977664194  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat 422P
0:00:30.977705154  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for YU12 at 48x32
0:00:30.977727494  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat YU12
0:00:30.977776921  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for YV12 at 48x32
0:00:30.977799358  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat YV12
0:00:30.977841487  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for 411P at 48x32
0:00:30.977864044  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat 411P
0:00:30.977893595  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for YVU9 at 48x32
0:00:30.977915896  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat YVU9
0:00:30.977945491  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for YUV9 at 48x32
0:00:30.977967889  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat YUV9
0:00:30.977997207  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for RGB4 at 48x32
0:00:30.978019500  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat RGB4
0:00:30.978047946  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for BGR4 at 48x32
0:00:30.978067621  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat BGR4
0:00:30.978105236  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for BGR3 at 48x32
0:00:30.978124920  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat BGR3
0:00:30.978162857  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for RGBP at 48x32
0:00:30.978182517  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat RGBP
0:00:30.978210633  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for RGBO at 48x32
0:00:30.978230058  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat RGBO
0:00:30.978257530  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for GREY at 48x32
0:00:30.978276898  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat GREY
0:00:30.978314197  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:2127:gst_v4l2_object_get_nearest_size:<camerasrc-real-src-actual-src-v4l> 
Unsupported field type for RGB3 at 48x32
0:00:30.978341073  2702       0x7daec0 WARN                    v4l2 
gstv4l2object.c:1976:gst_v4l2_object_probe_caps_for_format:<camerasrc-real-src-actual-src-v4l> 
Could not probe minimum capture size for pixelformat RGB3
0:00:30.995724907  2702       0xbb0b20 FIXME                default 
gstutils.c:3636:gst_pad_create_stream_id_printf_valist:<preview-appsrc:src> 
Creating random stream-id, consider implementing a deterministic way of 
creating a stream-id
0:00:30.996063792  2702       0x7daec0 WARN                     bin 
gstbin.c:2474:gst_bin_do_latency_func:<camera> failed to query latency
0:00:31.097600597  2702       0xbb0720 WARN                GST_PADS 
gstpad.c:3577:gst_pad_peer_query:<src-capsfilter:src> could not send 
sticky events
0:00:31.243561506  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:1348:gst_base_transform_setcaps:<src-videoconvert> 
transform could not transform video/x-raw, format=(string)YUY2, 
framerate=(fraction)25/1, width=(int)320, height=(int)200, 
interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1 in 
anything we support
0:00:31.243634555  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:2090:gst_base_transform_handle_buffer:<src-videoconvert> 
warning: not negotiated
0:00:31.243651535  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:2090:gst_base_transform_handle_buffer:<src-videoconvert> 
warning: not negotiated
0:00:31.243724430  2702       0xbb0720 WARN              bufferpool 
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't 
change config, we are active
0:00:31.243754155  2702       0xbb0720 WARN              bufferpool 
gstbufferpool.c:632:gst_buffer_pool_set_config:<v4l2bufferpool0> can't 
change config, we are active
0:00:31.279181015  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:1348:gst_base_transform_setcaps:<src-capsfilter> 
transform could not transform video/x-raw, format=(string)YUY2, 
framerate=(fraction)25/1, width=(int)320, height=(int)200, 
interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1 in 
anything we support
0:00:31.279243205  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:2090:gst_base_transform_handle_buffer:<src-capsfilter> warning: 
not negotiated
0:00:31.279262486  2702       0xbb0720 WARN           basetransform 
gstbasetransform.c:2090:gst_base_transform_handle_buffer:<src-capsfilter> warning: 
not negotiated
0:00:31.279348313  2702       0xbb0720 WARN                 basesrc 
gstbasesrc.c:2812:gst_base_src_loop:<camerasrc-real-src-actual-src-v4l> 
error: Internal data flow error.
0:00:31.279384520  2702       0xbb0720 WARN                 basesrc 
gstbasesrc.c:2812:gst_base_src_loop:<camerasrc-real-src-actual-src-v4l> 
error: streaming task paused, reason not-negotiated (-4)
Error: Internal data flow error.

Ian

On 28/01/2014 13:19, Thiago Santos wrote:
> On 01/27/2014 05:09 PM, Ian Davidson wrote:
>> How do I specify what size I would like to have camerabin create the 
>> still image?
>>
>> I have attempted to set caps into image-capture-caps but each time I 
>> have tried, it complains.
>
> how are you setting those caps? How exactly does it complain?
>
> -- 
> Thiago
>
>>
>> Ian
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list