#include <value.h>
Public Member Functions | |
IntRange () | |
Constructs a zero Gst::IntRange (0 - 0). | |
IntRange (int min, int max) | |
Constructs an Gst::IntRange (min - max). | |
IntRange (const IntRange& src) | |
Constructs an Gst::IntRange from another. | |
IntRange (const Glib::ValueBase& gst_int_range_value) | |
Constructs an Gst::IntRange from a GST_TYPE_INT_RANGE. | |
IntRange& | operator= (const IntRange& src) |
Public Attributes | |
int | min |
int | max |
Gst::IntRange is used to store an integer 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::IntRange> value; value.init(Glib::Value<Gst::IntRange>::value_type()); value.set(Gst::IntRange(8000, 50000)); Gst::Structure structure("my-structure"); structure.set_field("rate", value); ... Glib::ValueBase gst_value; structure.get_field("rate", gst_value); Gst::IntRange range(gst_value); int max = range.max; ...
Gst::IntRange::IntRange | ( | ) |
Constructs a zero Gst::IntRange (0 - 0).
Gst::IntRange::IntRange | ( | int | min, | |
int | max | |||
) |
Constructs an Gst::IntRange (min - max).
Gst::IntRange::IntRange | ( | const IntRange& | src | ) |
Constructs an Gst::IntRange from another.
Gst::IntRange::IntRange | ( | const Glib::ValueBase & | gst_int_range_value | ) | [explicit] |
Constructs an Gst::IntRange from a GST_TYPE_INT_RANGE.