gstreamermm 1.4.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
Gst::FractionRange Class Reference
gstreamermm Helper Classes

A class that represents a fractional range. More...

Collaboration diagram for Gst::FractionRange:
[legend]

## Public Member Functions
| FractionRange ()
| Constructs a zero Gst::FractionRange (0/1 - 0/1). More...
| FractionRange (const Fraction&min, const Fraction&max)
| Constructs a Gst::FractionRange (min - max). More...
| FractionRange (const FractionRange& src)
| Constructs a Gst::FractionRange from another. More...
| FractionRange (const Glib::ValueBase& gst_fraction_range_value)
| Constructs a Gst::FractionRange from a GST_TYPE_FRACTION_RANGE. More...
| FractionRange (const GValue& gst_fraction_range_value)
| Constructs a Gst::FractionRange from a GST_TYPE_FRACTION_RANGE. More...
FractionRange& | operator= (const FractionRange& src)

## Public Attributes
Fraction | min
Fraction | max

## Detailed Description

A class that represents a fractional range.

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;
...

## Constructor & Destructor Documentation

Gst::FractionRange::FractionRange | ( |  | ) |

Constructs a zero Gst::FractionRange (0/1 - 0/1).

Gst::FractionRange::FractionRange | ( | const Fraction& | min,
|  | const Fraction& | max
| ) |  |

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.

Gst::FractionRange::FractionRange | ( | const GValue & | gst_fraction_range_value | ) |
| explicit

Constructs a Gst::FractionRange from a GST_TYPE_FRACTION_RANGE.

## Member Function Documentation

FractionRange& Gst::FractionRange::operator= | ( | const FractionRange& | src | ) |

## Member Data Documentation

Fraction Gst::FractionRange::max

Fraction Gst::FractionRange::min

The documentation for this class was generated from the following file:

- gstreamermm/value.h