A Object that implements MetaContainer can have
metadata set on it, that is data that is unimportant to its function within GES, but may hold some useful information.
In particular, set_meta can be used to store any
Value under any generic field (specified by a string key). The same method can also be
used to remove the field by passing null. A number of convenience methods are also provided to make it easier
to set common value types. The metadata can then be read with
get_meta and similar convenience methods.
Registered Fields
By default, any Value can be set for a metadata field. However, you can register some
fields as static, that is they only allow values of a specific type to be set under them, using
register_meta or
register_static_meta. The set
MetaFlag will determine whether the value can be changed, but even if it
can be changed, it must be changed to a value of the same type.
Internally, some GES objects will be initialized with static metadata fields. These will correspond to some standard keys, such as
META_VOLUME.
- public void @foreach (MetaForeachFunc func)
Calls the given function on each of the meta container's set metadata
fields.
- public bool add_metas_from_string (string str)
Deserializes the given string, and adds and sets the found fields and their
values on the container.
- public bool check_meta_registered (string meta_item, out MetaFlag flags, out Type type)
Checks whether the specified field has been registered as static, and gets
the registered type and flags of the field, as used in
register_meta and
register_static_meta.
- public bool get_boolean (string meta_item, out bool dest)
Gets the current boolean value of the specified field of the meta container.
- public bool get_date (string meta_item, out Date dest)
Gets the current date value of the specified field of the meta container.
- public bool get_date_time (string meta_item, out DateTime dest)
Gets the current date time value of the specified field of the meta
container.
- public bool get_double (string meta_item, out double dest)
Gets the current double value of the specified field of the meta container.
- public bool get_float (string meta_item, out float dest)
Gets the current float value of the specified field of the meta container.
- public bool get_int (string meta_item, out int dest)
Gets the current int value of the specified field of the meta container.
- public bool get_int64 (string meta_item, out int64 dest)
Gets the current int64 value of the specified field of the meta container.
- public MarkerList? get_marker_list (string key)
Gets the current marker list value of the specified field of the meta
container.
- public unowned Value? get_meta (string key)
Gets the current value of the specified field of the meta container.
- public unowned string? get_string (string meta_item)
Gets the current string value of the specified field of the meta container.
- public bool get_uint (string meta_item, out uint dest)
Gets the current uint value of the specified field of the meta container.
- public bool get_uint64 (string meta_item, out uint64 dest)
Gets the current uint64 value of the specified field of the meta container.
- public string metas_to_string ()
Serializes the set metadata fields of the meta container to a string.
- public bool register_meta (MetaFlag flags, string meta_item, Value value)
Sets the value of the specified field of the meta container to the given
value, and registers the field to only hold a value of the same type.
- public bool register_meta_boolean (MetaFlag flags, string meta_item, bool value)
Sets the value of the specified field of the meta container to the given
boolean value, and registers the field to only hold a boolean typed value.
- public bool register_meta_date (MetaFlag flags, string meta_item, Date value)
Sets the value of the specified field of the meta container to the given
date value, and registers the field to only hold a date typed value.
- public bool register_meta_date_time (MetaFlag flags, string meta_item, DateTime value)
Sets the value of the specified field of the meta container to the given
date time value, and registers the field to only hold a date time typed value.
- public bool register_meta_double (MetaFlag flags, string meta_item, double value)
Sets the value of the specified field of the meta container to the given
double value, and registers the field to only hold a double typed value.
- public bool register_meta_float (MetaFlag flags, string meta_item, float value)
Sets the value of the specified field of the meta container to the given
float value, and registers the field to only hold a float typed value.
- public bool register_meta_int (MetaFlag flags, string meta_item, int value)
Sets the value of the specified field of the meta container to the given int
value, and registers the field to only hold an int typed value.
- public bool register_meta_int64 (MetaFlag flags, string meta_item, int64 value)
Sets the value of the specified field of the meta container to the given
int64 value, and registers the field to only hold an int64 typed value.
- public bool register_meta_string (MetaFlag flags, string meta_item, string value)
Sets the value of the specified field of the meta container to the given
string value, and registers the field to only hold a string typed value.
- public bool register_meta_uint (MetaFlag flags, string meta_item, uint value)
Sets the value of the specified field of the meta container to the given
uint value, and registers the field to only hold a uint typed value.
- public bool register_meta_uint64 (MetaFlag flags, string meta_item, uint64 value)
Sets the value of the specified field of the meta container to the given
uint64 value, and registers the field to only hold a uint64 typed value.
- public bool register_static_meta (MetaFlag flags, string meta_item, Type type)
Registers a static metadata field on the container to only hold the
specified type.
- public bool set_boolean (string meta_item, bool value)
Sets the value of the specified field of the meta container to the given
boolean value.
- public bool set_date (string meta_item, Date value)
Sets the value of the specified field of the meta container to the given
date value.
- public bool set_date_time (string meta_item, DateTime value)
Sets the value of the specified field of the meta container to the given
date time value.
- public bool set_double (string meta_item, double value)
Sets the value of the specified field of the meta container to the given
double value.
- public bool set_float (string meta_item, float value)
Sets the value of the specified field of the meta container to the given
float value.
- public bool set_int (string meta_item, int value)
Sets the value of the specified field of the meta container to the given int
value.
- public bool set_int64 (string meta_item, int64 value)
Sets the value of the specified field of the meta container to the given
int64 value.
- public bool set_marker_list (string meta_item, MarkerList list)
Sets the value of the specified field of the meta container to the given
marker list value.
- public bool set_meta (string meta_item, Value? value)
Sets the value of the specified field of the meta container to a copy of the
given value.
- public bool set_string (string meta_item, string value)
Sets the value of the specified field of the meta container to the given
string value.
- public bool set_uint (string meta_item, uint value)
Sets the value of the specified field of the meta container to the given
uint value.
- public bool set_uint64 (string meta_item, uint64 value)
Sets the value of the specified field of the meta container to the given
uint64 value.