ValueGst

GValue implementations specific to GStreamer.

Note that operations on the same GValue from multiple threads may lead to undefined behaviour.

Last reviewed on 2008-03-11 (0.10.18)

class ValueGst {}

Members

Static functions

arrayAppendValue
void arrayAppendValue(Value value, Value appendValue)

Appends append_value to the GstValueArray in value.

arrayGetSize
uint arrayGetSize(Value value)

Gets the number of values contained in value.

arrayGetValue
Value arrayGetValue(Value value, uint index)

Gets the value that is a member of the array contained in value and has the index index.

arrayPrependValue
void arrayPrependValue(Value value, Value prependValue)

Prepends prepend_value to the GstValueArray in value.

canCompare
int canCompare(Value value1, Value value2)

Determines if value1 and value2 can be compared.

canIntersect
int canIntersect(Value value1, Value value2)

Determines if intersecting two values will produce a valid result. Two values will produce a valid intersection if they have the same type, or if there is a method (registered by gst_value_register_intersect_func()) to calculate the intersection.

canSubtract
int canSubtract(Value minuend, Value subtrahend)

Checks if it's possible to subtract subtrahend from minuend.

canUnion
int canUnion(Value value1, Value value2)

Determines if value1 and value2 can be non-trivially unioned. Any two values can be trivially unioned by adding both of them to a GstValueList. However, certain types have the possibility to be unioned in a simpler way. For example, an integer range and an integer can be unioned if the integer is a subset of the integer range. If there is the possibility that two values can be unioned, this function returns TRUE.

compare
int compare(Value value1, Value value2)

Compares value1 and value2. If value1 and value2 cannot be compared, the function returns GST_VALUE_UNORDERED. Otherwise, if value1 is greater than value2, GST_VALUE_GREATER_THAN is returned. If value1 is less than value2, GST_VALUE_LESS_THAN is returned. If the values are equal, GST_VALUE_EQUAL is returned.

deserialize
int deserialize(Value dest, string src)

Tries to deserialize a string into the type specified by the given GValue. If the operation succeeds, TRUE is returned, FALSE otherwise.

fixate
int fixate(Value dest, Value src)

Fixate src into a new value dest. For ranges, the first element is taken. For lists and arrays, the first item is fixated and returned. If src is already fixed, this function returns FALSE.

fractionMultiply
int fractionMultiply(Value product, Value factor1, Value factor2)

Multiplies the two GValue items containing a GST_TYPE_FRACTION and sets product to the product of the two fractions.

fractionSubtract
int fractionSubtract(Value dest, Value minuend, Value subtrahend)

Subtracts the subtrahend from the minuend and sets dest to the result.

getBitmask
ulong getBitmask(Value value)

Gets the bitmask specified by value.

getCaps
Caps getCaps(Value value)

Gets the contents of value. The reference count of the returned GstCaps will not be modified, therefore the caller must take one before getting rid of the value.

getCapsFeatures
CapsFeatures getCapsFeatures(Value value)

Gets the contents of value.

getDoubleRangeMax
double getDoubleRangeMax(Value value)

Gets the maximum of the range specified by value.

getDoubleRangeMin
double getDoubleRangeMin(Value value)

Gets the minimum of the range specified by value.

getFractionDenominator
int getFractionDenominator(Value value)

Gets the denominator of the fraction specified by value.

getFractionNumerator
int getFractionNumerator(Value value)

Gets the numerator of the fraction specified by value.

getFractionRangeMax
Value getFractionRangeMax(Value value)

Gets the maximum of the range specified by value.

getFractionRangeMin
Value getFractionRangeMin(Value value)

Gets the minimum of the range specified by value.

getInt64_RangeMax
long getInt64_RangeMax(Value value)

Gets the maximum of the range specified by value.

getInt64_RangeMin
long getInt64_RangeMin(Value value)

Gets the minimum of the range specified by value.

getInt64_RangeStep
long getInt64_RangeStep(Value value)

Gets the step of the range specified by value.

getIntRangeMax
int getIntRangeMax(Value value)

Gets the maximum of the range specified by value.

getIntRangeMin
int getIntRangeMin(Value value)

Gets the minimum of the range specified by value.

getIntRangeStep
int getIntRangeStep(Value value)

Gets the step of the range specified by value.

getStructure
Structure getStructure(Value value)

Gets the contents of value.

initAndCopy
void initAndCopy(Value dest, Value src)

Initialises the target value to be of the same type as source and then copies the contents from source to target.

intersect
int intersect(Value dest, Value value1, Value value2)

Calculates the intersection of two values. If the values have a non-empty intersection, the value representing the intersection is placed in dest, unless NULL. If the intersection is non-empty, dest is not modified.

isFixed
int isFixed(Value value)

Tests if the given GValue, if available in a GstStructure (or any other container) contains a "fixed" (which means: one value) or an "unfixed" (which means: multiple possible values, such as data lists or data ranges) value.

isSubset
int isSubset(Value value1, Value value2)

Check that value1 is a subset of value2. Return: TRUE is value1 is a subset of value2

listAppendValue
void listAppendValue(Value value, Value appendValue)

Appends append_value to the GstValueList in value.

listConcat
void listConcat(Value dest, Value value1, Value value2)

Concatenates copies of value1 and value2 into a list. Values that are not of type GST_TYPE_LIST are treated as if they were lists of length 1. dest will be initialized to the type GST_TYPE_LIST.

listGetSize
uint listGetSize(Value value)

Gets the number of values contained in value.

listGetValue
Value listGetValue(Value value, uint index)

Gets the value that is a member of the list contained in value and has the index index.

listMerge
void listMerge(Value dest, Value value1, Value value2)

Merges copies of value1 and value2. Values that are not of type GST_TYPE_LIST are treated as if they were lists of length 1. The result will be put into dest and will either be a list that will not contain any duplicates, or a non-list type (if value1 and value2 were equal).

listPrependValue
void listPrependValue(Value value, Value prependValue)

Prepends prepend_value to the GstValueList in value.

register
void register(GstValueTable table)

Registers functions to perform calculations on GValue items of a given type. Each type can only be added once.

serialize
string serialize(Value value)

tries to transform the given value into a string representation that allows getting back this string later on using gst_value_deserialize(). Free-function: g_free

setBitmask
void setBitmask(Value value, ulong bitmask)

Sets value to the bitmask specified by bitmask.

setCaps
void setCaps(Value value, Caps caps)

Sets the contents of value to caps. A reference to the provided caps will be taken by the value.

setCapsFeatures
void setCapsFeatures(Value value, CapsFeatures features)

Sets the contents of value to features.

setDoubleRange
void setDoubleRange(Value value, double start, double end)

Sets value to the range specified by start and end.

setFraction
void setFraction(Value value, int numerator, int denominator)

Sets value to the fraction specified by numerator over denominator. The fraction gets reduced to the smallest numerator and denominator, and if necessary the sign is moved to the numerator.

setFractionRange
void setFractionRange(Value value, Value start, Value end)

Sets value to the range specified by start and end.

setFractionRangeFull
void setFractionRangeFull(Value value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd)

Sets value to the range specified by numerator_start/denominator_start and numerator_end/denominator_end.

setInt64_Range
void setInt64_Range(Value value, long start, long end)

Sets value to the range specified by start and end.

setInt64_RangeStep
void setInt64_RangeStep(Value value, long start, long end, long step)

Sets value to the range specified by start, end and step.

setIntRange
void setIntRange(Value value, int start, int end)

Sets value to the range specified by start and end.

setIntRangeStep
void setIntRangeStep(Value value, int start, int end, int step)

Sets value to the range specified by start, end and step.

setStructure
void setStructure(Value value, Structure structure)

Sets the contents of value to structure. The actual

subtract
int subtract(Value dest, Value minuend, Value subtrahend)

Subtracts subtrahend from minuend and stores the result in dest. Note that this means subtraction as in sets, not as in mathematics.

unio
int unio(Value dest, Value value1, Value value2)

Creates a GValue corresponding to the union of value1 and value2.

Meta