GNOME Bugzilla – Bug 706621
GstControlSources should be able to guess values when they are not contained in the current range of values.
Last modified: 2017-10-12 18:53:47 UTC
Example : you have a control source with {time values} : { 10, 0.5 }, {20, 0.6} In the case of a linear interpolation, gst_control_source_get_value() should be able to guess that {0, 0.4} exists. For now it just returns FALSE because 0 is before the first TimedValue.
When I originally wrote this it was using the default value of the property for 0 (or was it the same as the first value?). Anyway, why should it assume that the interpolation of the first segment also applies for the part before the first segment? Assuming {0, default} or {0, 0.5} is as valid as assuming that it continues, or just letting it return FALSE. I think the application should strictly tell the control source its intent, especially for higher order interpolation that is useful.
That is useful for us when we have a clip with inpoint 10 and we set it to inpoint < 10. For the while I do the guessing in GES under the assumption that the control source is linear, but that will not be always the case.
What does that mean? "have a clip with inpoint 10 and we set it to inpoint < 10"? Depending on your UI, why can't you yet the control value for 0 in any case? Either by requiring the user to set it always, or by having it default to the first value or the default value or whatever. Only pitivi or the user knows what should actually be the control value at 0.
Yeah I don't really know, depends if we want to consider linear interpolation for instance as dealing with segments or lines I suppose, I mean given two points on a line it's possible to infer other points, be they comprised between them or not. I can screencast something to illustrate what I mean if needed :)
Well, the interpolation is only defined between the control points. Everything outside could not exist, be completely weird or exactly what you would expect :) If you look at what is there for cubic interpolation for example it is definitely not what you would expect intuitively (unless you know how it internally works). What exactly is the problem in pitivi to just set the first control point value to something that is sensible according to the UI?
+1 for not 'extrapolating' by default. If we want to do it I would do it conditionally (property on the cs). Mathieu, could you replies to Sebastians question?
There is no real problem, what we have in pitivi works for all intents and purposes, closing :)