[gst-devel] GstController and live updates from user interaction

Stefan Kost ensonic at hora-obscura.de
Mon Apr 18 00:54:13 CEST 2005


hi hi,

I've hacked a bit on GstController (gst-sandbox/gst-controller). Interpolation 
basically works now. Its all not yet very optimized (planning to do that when it 
works and has a test-suite ;)).

For one thing I'd ask for input - user interaction. In the current 
implementation, the app sets GValues at timestamped locations and picks an 
interpolation mode. The simpliest mode 'none', just fetches the last value 
before the requested timestamp. Mode 'linear' creates smoothed transitions and 
so on ...

Now one scenarion ist to run the pipeline and along play back the param changes.
Another scenario is that a part of the pipeline runs in a loop and the user 
controlls the parameters via GUI. There are two sub-scenarios - just finding the 
right setting and recording param changes. The latter is easy, whenever the 
widget changes insert a new timstamped control value change. The first is not so 
easy. I see two possibillities:
* have an 'gboolean active' flag in a controlled property. Whenever the GUI 
changes set active to false (temporaily detaching the control-envelope) and 
directly setting the gobject-property. Problem here is , when to reattach the 
envelope (active=true)?
* have a 'GstTimedValue live_value' inside the property structure. Whenever a 
widget changes, set this value with timestamp=NOW. The controller will 
additionally check this value. For mode 'none' this will work as expected. For 
'linear' this will cause a fade towards the next timed value.
So its probably better to always return the live_value.value until a new 
timestamped value in the envelope has been reached. Then invalidate the 
live_value and continue with regular envelope.

What you think?

Stefan




More information about the gstreamer-devel mailing list