Gst.Structure

A Gst.Structure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType.

In addition to the key/value pairs, a Gst.Structure also has a name. The name starts with a letter and can be filled by letters, numbers and any of "/-_.:".

Gst.Structure is used by various GStreamer subsystems to store information in a flexible and extensible way. A Gst.Structure does not have a refcount because it usually is part of a higher level object such as Gst.Caps, Gst.Message, Gst.Event, Gst.Query. It provides a means to enforce mutability using the refcount of the parent with the Gst.set_parent_refcount method.

A Gst.Structure can be created with Gst.new_empty or Gst.new, which both take a name and an optional set of key/value pairs along with the types of the values.

Field values can be changed with Gst.set_value or Gst.set.

Field values can be retrieved with Gst.get_value or the more convenient gst_structure_get_*() functions.

Fields can be removed with Gst.remove_field or Gst.remove_fields.

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings must not be empty either, but may be NULL.

Last reviewed on 2012-03-29 (0.11.3)