title: GStreamer reading camera resolution
body: <p>I'm trying to read resolutions supported by camera using GStreamer and plugin camerabin2. The problem is that I'm getting NULL. </p>
  
  <pre><code>#include &lt;gst/gst.h&gt;
  #include &lt;stdio.h&gt;
  
  #define gstRef(element) { gst_object_ref(GST_OBJECT(element)); gst_object_sink(GST_OBJECT(element)); }
  
  int main(int argc, char *argv[]) {
  
    gst_init (&amp;argc, &amp;argv);
  
    GstElement *m_camerabin = gst_element_factory_make("camerabin2", "camerabin2");  
    gstRef(m_camerabin);
  
    GstCaps *supportedCaps = 0;
     g_object_get(G_OBJECT(m_camerabin), "image-capture-supported-caps",
                   &amp;supportedCaps, NULL);
    char *c = gst_caps_to_string(supportedCaps); 
    printf("%s\n",c); 
  
    return 0;
  }
  </code></pre>
  
  <p>Is there a better way to get supported resolutions? Should I use different plugin?</p>
  
  <p>Thanks.</p>