After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706621 - GstControlSources should be able to guess values when they are not contained in the current range of values.
GstControlSources should be able to guess values when they are not contained ...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-22 22:06 UTC by Mathieu Duponchelle
Modified: 2017-10-12 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mathieu Duponchelle 2013-08-22 22:06:05 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.
Comment 1 Sebastian Dröge (slomo) 2013-08-23 07:53:52 UTC
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.
Comment 2 Mathieu Duponchelle 2013-08-23 19:10:17 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2013-08-26 07:32:42 UTC
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.
Comment 4 Mathieu Duponchelle 2013-08-26 14:39:46 UTC
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 :)
Comment 5 Sebastian Dröge (slomo) 2013-08-27 08:17:09 UTC
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?
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-09 20:55:33 UTC
+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?
Comment 7 Mathieu Duponchelle 2017-10-12 18:53:47 UTC
There is no real problem, what we have in pitivi works for all intents and purposes, closing :)