GNOME Bugzilla – Bug 459717
[Controller] Add GstLFOControlSource that provides values from different waveforms
Last modified: 2007-08-03 15:53:02 UTC
Hi, the attached patch adds a GstLFOControlSource that gives values from several different waveforms. Supported are sine, square, saw, reverse saw and triangle with configurable frequency, timeshift, amplitude and offset. The only thing that IMHO needs discussion is whether one should go with setting the parameters via GObject properties, several (or the one we have) functions or both as it is now. IMHO GObject properties only would be the best, what do other's think? Someone please review :) Bye
Created attachment 92228 [details] [review] lfo.diff
Another change that might be worth doing before the next core release: save the type and base type in GstControlSource instead of calculating it in every bind() implementation. (and locking is missing in GstLFOControlSource, I'll add that tomorrow... apart from that it should be fine)
Created attachment 92249 [details] [review] lfo.diff
Created attachment 92764 [details] [review] lfo.diff Drop the _set_waveform() function as the properties allow the same.
It misses the math.h include and linking against $LIBM in Makefile.am.
That's already fixed locally as I told you on IRC ;) anything else that needs adjustments?
Then it fine from my side.
2007-08-03 Sebastian Dröge <slomo@circular-chaos.org> reviewed by: Stefan Kost <ensonic@users.sf.net> * libs/gst/controller/Makefile.am: * libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos), (gst_lfo_waveform_get_type), (gst_lfo_control_source_reset), (gst_lfo_control_source_new), (gst_lfo_control_source_set_waveform), (gst_lfo_control_source_bind), (gst_lfo_control_source_init), (gst_lfo_control_source_finalize), (gst_lfo_control_source_dispose), (gst_lfo_control_source_set_property), (gst_lfo_control_source_get_property), (gst_lfo_control_source_class_init): * libs/gst/controller/gstlfocontrolsource.h: * libs/gst/controller/gstlfocontrolsourceprivate.h: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based on several periodic waveforms. Fixes #459717. * tests/check/libs/controller.c: (GST_START_TEST), (gst_controller_suite): * docs/libs/gstreamer-libs-docs.sgml: * docs/libs/gstreamer-libs-sections.txt: * docs/libs/gstreamer-libs.types: Add documentation and unit tests for GstLFOControlSource.