[gst-devel] How to get the real capabilities of a v4l2src element
Dave Tarkowski
Dave.Tarkowski at mathworks.com
Tue Jan 5 20:21:11 CET 2010
Hi all,
I'm trying to write a program to interface with webcams via gstreamer and I'm having a bit of a problem understanding how to get the real capabilities of the webcam.
What I'm doing is basically the following:
GstElement* source = gst_element_factory_make("v4l2src", "v4l2source");
GstPad* pad = gst_element_get_pad(source, "src");
GstCaps* padCaps = gst_pad_get_caps(pad);
g_print("The caps for the first source pad are:\n%s\n", gst_caps_to_string(padCaps));
This prints the various generic capabilities of the pad, basically what I get when I run "gst-inspect-0.10 v4l2src", but not the actual capabilities of the currently connected camera.
If I run "gst-launch-0.10 --gst-debug=v4l2src:3 v4l2src num_buffers=0 ! fakesink" I can see that the information that I want is obtained internally:
v4l2src gstv4l2src.c:710:gst_v4l2src_get_caps:<v4l2src0> probed caps:
Is there any way to get at this information without going directly to the v4l2 apis?
BTW, I'm building on Debian 5.0 and the version of GStreamer installed is 0.10.19.
Thanks,
Dave
More information about the gstreamer-devel
mailing list