Hi,
I'd like to parse GstCaps. It's pretty trivial: GstDevice *device = ... // Get "Video/Source" devices from GstDeviceMonitor GstCaps *devCaps = gst_device_get_caps(device); uint size = gst_caps_get_size(devCaps); for (uint i = 0; i < size; ++i) { GstStructure *s = gst_caps_get_structure(devCaps, i); GType framerate = gst_structure_get_field_type(s, "framerate"); qDebug() << g_type_name(framerate); ... } Output: GstFraction or GstFractionRange I can easily get a fraction with: gst_structure_get_fraction(s, "framerate", &numerator, &denominator) But there is no such method for a fraction range. I can get a GValue for a fraction range: GValue *fractionRange = gst_structure_get_value(s, "framerate"); But I don't know how to extract a range from it. What did I miss? Thanks, Ilya _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Iiya
You can try gst_value_get_fraction_range_min and gst_value_get_fraction_range_max, where the GValue returned is of type GST_TYPE_FRACTION_RANGE. Michael RidgeRun
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Michael, Thank you so much! This is exactly what i'm looking for. Ilya On Thu, Jan 17, 2019 at 8:17 PM Michael Gruner <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |