mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
value: Add a FIXME 2.0 for a fraction ranges optimization
Currently we leak the internal representation of them as two GValues that contain a fraction. Without this we could store fraction ranges as data[0] = (min_n << 32) | (min_d) data[1] = (max_n << 32) | (max_d) and wouldn't require an additional allocation per range.
This commit is contained in:
parent
9b7da39b68
commit
8f4b479c98
1 changed files with 9 additions and 0 deletions
|
@ -1694,6 +1694,15 @@ gst_value_set_fraction_range_full (GValue * value,
|
||||||
/* g_value_unset (&end); */
|
/* g_value_unset (&end); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME 2.0: Don't leak the internal representation of fraction
|
||||||
|
* ranges but instead return the numerator and denominator
|
||||||
|
* separately.
|
||||||
|
* This would allow to store fraction ranges as
|
||||||
|
* data[0] = (min_n << 32) | (min_d)
|
||||||
|
* data[1] = (max_n << 32) | (max_d)
|
||||||
|
* without requiring an additional allocation for each value.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_value_get_fraction_range_min:
|
* gst_value_get_fraction_range_min:
|
||||||
* @value: a GValue initialized to GST_TYPE_FRACTION_RANGE
|
* @value: a GValue initialized to GST_TYPE_FRACTION_RANGE
|
||||||
|
|
Loading…
Reference in a new issue