<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Iiya<div class=""><br class=""></div><div class="">You can try <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstValue.html#gst-value-get-fraction-range-min" class="">gst_value_get_fraction_range_min</a> and <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstValue.html#gst-value-get-fraction-range-max" class="">gst_value_get_fraction_range_max</a>, where the GValue returned is of type GST_TYPE_FRACTION_RANGE.</div><div class=""><br class=""></div><div class="">Michael</div><div class="">RidgeRun<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 17, 2019, at 10:59 AM, Ilya Aleshkov <<a href="mailto:ilya.aleshkov@gmail.com" class="">ilya.aleshkov@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<br class=""><br class="">I'd like to parse GstCaps. It's pretty trivial:<br class=""><br class="">GstDevice *device = ... // Get "Video/Source" devices from GstDeviceMonitor<br class=""><br class="">GstCaps *devCaps = gst_device_get_caps(device);<br class="">uint size = gst_caps_get_size(devCaps);<br class=""><br class="">for (uint i = 0; i < size; ++i) {<br class="">    GstStructure *s = gst_caps_get_structure(devCaps, i);<br class="">    GType framerate = gst_structure_get_field_type(s, "framerate");<br class="">    qDebug() << g_type_name(framerate);<br class="">      ...<br class="">}<br class=""><br class="">Output: GstFraction or GstFractionRange<br class=""><br class="">I can easily get a fraction with:<br class=""><br class="">gst_structure_get_fraction(s, "framerate", &numerator, &denominator)<br class=""><br class="">But there is no such method for a fraction range.<br class=""><br class="">I can get a GValue for a fraction range:<br class=""><br class="">GValue *fractionRange = gst_structure_get_value(s, "framerate");<br class=""><br class="">But I don't know how to extract a range from it.<br class=""><br class="">What did I miss?<br class=""><br class="">Thanks,<br class="">Ilya</div>
_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></blockquote></div><br class=""></div></body></html>