<div dir="ltr">Hi Michael,<div><br></div><div>Thank you so much! This is exactly what i'm looking for.</div><div><br></div><div>Ilya</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 17, 2019 at 8:17 PM Michael Gruner <<a href="mailto:michael.gruner@ridgerun.com">michael.gruner@ridgerun.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi Iiya<div><br></div><div>You can try <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstValue.html#gst-value-get-fraction-range-min" target="_blank">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" target="_blank">gst_value_get_fraction_range_max</a>, where the GValue returned is of type GST_TYPE_FRACTION_RANGE.</div><div><br></div><div>Michael</div><div>RidgeRun<br><div><br><blockquote type="cite"><div>On Jan 17, 2019, at 10:59 AM, Ilya Aleshkov <<a href="mailto:ilya.aleshkov@gmail.com" target="_blank">ilya.aleshkov@gmail.com</a>> wrote:</div><br class="gmail-m_3524400132918021985Apple-interchange-newline"><div><div dir="ltr">Hi,<br><br>I'd like to parse GstCaps. It's pretty trivial:<br><br>GstDevice *device = ... // Get "Video/Source" devices from GstDeviceMonitor<br><br>GstCaps *devCaps = gst_device_get_caps(device);<br>uint size = gst_caps_get_size(devCaps);<br><br>for (uint i = 0; i < size; ++i) {<br>    GstStructure *s = gst_caps_get_structure(devCaps, i);<br>    GType framerate = gst_structure_get_field_type(s, "framerate");<br>    qDebug() << g_type_name(framerate);<br>      ...<br>}<br><br>Output: GstFraction or GstFractionRange<br><br>I can easily get a fraction with:<br><br>gst_structure_get_fraction(s, "framerate", &numerator, &denominator)<br><br>But there is no such method for a fraction range.<br><br>I can get a GValue for a fraction range:<br><br>GValue *fractionRange = gst_structure_get_value(s, "framerate");<br><br>But I don't know how to extract a range from it.<br><br>What did I miss?<br><br>Thanks,<br>Ilya</div>
_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></div></blockquote></div><br></div></div></blockquote></div>