A class that represents a fraction.
Gst::Fraction is used to store a fraction in Gst::Structures of Gst::Caps as a value representing a property (see GStreamer Application Development Manual section 8.2.2 and GstValue docs). When the value is set, it is transformed to a GStreamer GType so retrieving the value is a bit different. The class can be used in setting and getting a Gst::Structure field like so:
Glib::Value<Gst::Fraction> value;
value.init(Glib::Value<Gst::Fraction>::value_type());
structure.set_field("framerate", value);
...
Glib::ValueBase gst_value;
structure.get_field("framerate", gst_value);
int numerator = fract.num;
...
A class that represents a fraction.
Definition: value.h:135
Generic class containing fields of names and values.
Definition: structure.h:75
Last reviewed on 2016-08-27 (1.8.0)