#include <value.h>
Public Member Functions | |
FractionRange () | |
Constructs a zero Gst::FractionRange (0/1 - 0/1). | |
FractionRange (const Fraction&min, const Fraction&max) | |
Constructs a Gst::FractionRange (min - max). | |
FractionRange (const FractionRange& src) | |
Constructs a Gst::FractionRange from another. | |
FractionRange (const Glib::ValueBase& gst_fraction_range_value) | |
Constructs a Gst::FractionRange from a GST_TYPE_FRACTION_RANGE. | |
FractionRange& | operator= (const FractionRange& src) |
Public Attributes | |
Fraction | min |
Fraction | max |
Gst::FractionRange is used to store a fractional range 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::FractionRange> value; value.init(Glib::Value<Gst::Fraction>::value_type()); value.set(Gst::FractionRange(Gst::Fraction(1,2), Gst::Fraction(3,4))); Gst::Structure structure("my-structure"); structure.set_field("range", value); ... Glib::ValueBase gst_value; structure.get_field("rate", gst_value); Gst::FractionRange range(gst_value); int min_numerator = range.min.num; ...
Gst::FractionRange::FractionRange | ( | ) |
Constructs a zero Gst::FractionRange (0/1 - 0/1).
Constructs a Gst::FractionRange (min - max).
Gst::FractionRange::FractionRange | ( | const FractionRange& | src | ) |
Constructs a Gst::FractionRange from another.
Gst::FractionRange::FractionRange | ( | const Glib::ValueBase & | gst_fraction_range_value | ) | [explicit] |
Constructs a Gst::FractionRange from a GST_TYPE_FRACTION_RANGE.
FractionRange& Gst::FractionRange::operator= | ( | const FractionRange& | src | ) |