- public void* array_binary_search (void* array, uint num_elements, size_t element_size, CompareDataFunc<void*> search_func, SearchMode mode, void* search_data)
Searches inside array
for search_data
by using the
comparison function search_func
.
- public void double_to_fraction (double src, out int dest_n, out int dest_d)
Transforms a double to a
fraction and simplifies the result.
- public void dump_buffer (Buffer buf)
Dumps the buffer memory into a hex representation.
- public void dump_mem (uint8[] mem)
Dumps the memory block into a hex representation.
- public bool fraction_add (int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d)
Adds the fractions a_n
/a_d
and b_n
/
b_d
and stores the result in res_n
and res_d
.
- public int fraction_compare (int a_n, int a_d, int b_n, int b_d)
Compares the fractions a_n
/a_d
and b_n
/b_d
and returns -1 if a < b, 0 if a = b and 1 if a > b.
- public bool fraction_multiply (int a_n, int a_d, int b_n, int b_d, out int res_n, out int res_d)
Multiplies the fractions a_n
/a_d
and b_n
/b_d
and stores the result in res_n
and res_d
.
- public void fraction_to_double (int src_n, int src_d, out double dest)
Transforms a fraction to a
double.
- public uint64 gdouble_to_guint64 (double value)
- public bool get_object_array (Object object, string name, out ValueArray array)
Get a property of type GST_TYPE_ARRAY
and transform it into a
ValueArray.
- public ClockTime get_timestamp ()
Get a timestamp as GstClockTime to be used for interval measurements.
- public int greatest_common_divisor (int a, int b)
Calculates the greatest common divisor of a
and b
.
- public int64 greatest_common_divisor_int64 (int64 a, int64 b)
Calculates the greatest common divisor of a
and b
.
- public uint group_id_next ()
Return a constantly incrementing group id.
- public double guint64_to_gdouble (uint64 value)
- public int32 seqnum_compare (uint32 s1, uint32 s2)
Compare two sequence numbers, handling wraparound.
- public uint32 seqnum_next ()
Return a constantly incrementing sequence number.
- public void set_object_arg (Object object, string name, string value)
Converts the string value to the type of the objects argument and sets the
argument with it.
- public bool set_object_array (Object object, string name, ValueArray array)
Transfer a
ValueArray to GST_TYPE_ARRAY
and set this value on the specified property name.
- public void set_value_from_string (ref Value value, string value_str)
Converts the string to the type of the value and sets the value with it.
- public void simplify_fraction (int numerator, int denominator, uint n_terms, uint threshold)
Calculates the simpler representation of numerator
and
denominator
and update both values with the resulting simplified fraction.
- public uint64 uint64_scale (uint64 val, uint64 num, uint64 denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.
- public uint64 uint64_scale_ceil (uint64 val, uint64 num, uint64 denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.
- public uint64 uint64_scale_int (uint64 val, int num, int denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.
- public uint64 uint64_scale_int_ceil (uint64 val, int num, int denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.
- public uint64 uint64_scale_int_round (uint64 val, int num, int denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.
- public uint64 uint64_scale_round (uint64 val, uint64 num, uint64 denom)
Scale val
by the rational number num
/ denom
, avoiding overflows and underflows and without loss of precision.