libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
/* GStreamer
|
|
|
|
*
|
2010-02-22 15:25:45 +00:00
|
|
|
* Copyright (C) 2007,2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* gstlfocontrolsource.c: Control source that provides some periodic waveforms
|
|
|
|
* as control values.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION:gstlfocontrolsource
|
2017-01-16 14:26:16 +00:00
|
|
|
* @title: GstLFOControlSource
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
* @short_description: LFO control source
|
|
|
|
*
|
2013-03-06 15:40:27 +00:00
|
|
|
* #GstLFOControlSource is a #GstControlSource, that provides several periodic
|
|
|
|
* waveforms as control values.
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
2013-03-06 15:40:27 +00:00
|
|
|
* To use #GstLFOControlSource get a new instance by calling
|
|
|
|
* gst_lfo_control_source_new(), bind it to a #GParamSpec and set the relevant
|
|
|
|
* properties.
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* All functions are MT-safe.
|
|
|
|
*/
|
|
|
|
|
2013-03-07 08:12:59 +00:00
|
|
|
#include <float.h>
|
|
|
|
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
#include <glib-object.h>
|
|
|
|
#include <gst/gst.h>
|
2011-11-04 10:34:11 +00:00
|
|
|
#include <gst/gstcontrolsource.h>
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
#include "gstlfocontrolsource.h"
|
|
|
|
|
2011-12-04 13:35:38 +00:00
|
|
|
#include "gst/glib-compat-private.h"
|
|
|
|
|
2010-10-05 14:05:43 +00:00
|
|
|
#include <gst/math-compat.h>
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-11-04 10:34:11 +00:00
|
|
|
#define GST_CAT_DEFAULT controller_debug
|
|
|
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
struct _GstLFOControlSourcePrivate
|
|
|
|
{
|
|
|
|
GstLFOWaveform waveform;
|
|
|
|
gdouble frequency;
|
|
|
|
GstClockTime period;
|
|
|
|
GstClockTime timeshift;
|
|
|
|
gdouble amplitude;
|
|
|
|
gdouble offset;
|
|
|
|
};
|
2007-09-13 09:08:23 +00:00
|
|
|
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
/* FIXME: as % in C is not the modulo operator we need here for
|
|
|
|
* negative numbers implement our own. Are there better ways? */
|
|
|
|
static inline GstClockTime
|
|
|
|
_calculate_pos (GstClockTime timestamp, GstClockTime timeshift,
|
|
|
|
GstClockTime period)
|
|
|
|
{
|
|
|
|
while (timestamp < timeshift)
|
|
|
|
timestamp += period;
|
|
|
|
|
|
|
|
timestamp -= timeshift;
|
|
|
|
|
|
|
|
return timestamp % period;
|
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static inline gdouble
|
|
|
|
_sine_get (GstLFOControlSource * self, gdouble amp, gdouble off,
|
|
|
|
GstClockTime timeshift, GstClockTime period, gdouble frequency,
|
|
|
|
GstClockTime timestamp)
|
|
|
|
{
|
2012-01-01 17:43:23 +00:00
|
|
|
gdouble pos =
|
|
|
|
gst_guint64_to_gdouble (_calculate_pos (timestamp, timeshift, period));
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble ret;
|
|
|
|
|
2012-01-01 17:43:23 +00:00
|
|
|
ret = sin (2.0 * M_PI * (frequency / GST_SECOND) * pos);
|
2011-12-22 22:48:30 +00:00
|
|
|
ret *= amp;
|
|
|
|
ret += off;
|
|
|
|
|
|
|
|
return ret;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static gboolean
|
|
|
|
waveform_sine_get (GstLFOControlSource * self, GstClockTime timestamp,
|
|
|
|
gdouble * value)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*value = _sine_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static gboolean
|
|
|
|
waveform_sine_get_value_array (GstLFOControlSource * self,
|
|
|
|
GstClockTime timestamp, GstClockTime interval, guint n_values,
|
|
|
|
gdouble * values)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
guint i;
|
|
|
|
GstClockTime ts = timestamp;
|
|
|
|
|
|
|
|
for (i = 0; i < n_values; i++) {
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*values = _sine_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
ts += interval;
|
|
|
|
values++;
|
|
|
|
}
|
|
|
|
return TRUE;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static inline gdouble
|
|
|
|
_square_get (GstLFOControlSource * self, gdouble amp, gdouble off,
|
|
|
|
GstClockTime timeshift, GstClockTime period, gdouble frequency,
|
|
|
|
GstClockTime timestamp)
|
|
|
|
{
|
|
|
|
GstClockTime pos = _calculate_pos (timestamp, timeshift, period);
|
|
|
|
gdouble ret;
|
|
|
|
|
|
|
|
if (pos >= period / 2)
|
|
|
|
ret = amp;
|
|
|
|
else
|
|
|
|
ret = -amp;
|
|
|
|
ret += off;
|
|
|
|
|
|
|
|
return ret;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static gboolean
|
|
|
|
waveform_square_get (GstLFOControlSource * self, GstClockTime timestamp,
|
|
|
|
gdouble * value)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*value = _square_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static gboolean
|
|
|
|
waveform_square_get_value_array (GstLFOControlSource * self,
|
|
|
|
GstClockTime timestamp, GstClockTime interval, guint n_values,
|
|
|
|
gdouble * values)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
guint i;
|
|
|
|
GstClockTime ts = timestamp;
|
|
|
|
|
|
|
|
for (i = 0; i < n_values; i++) {
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*values = _square_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
ts += interval;
|
|
|
|
values++;
|
|
|
|
}
|
|
|
|
return TRUE;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static inline gdouble
|
|
|
|
_saw_get (GstLFOControlSource * self, gdouble amp, gdouble off,
|
|
|
|
GstClockTime timeshift, GstClockTime period, gdouble frequency,
|
|
|
|
GstClockTime timestamp)
|
|
|
|
{
|
2012-01-01 17:43:23 +00:00
|
|
|
gdouble pos =
|
|
|
|
gst_guint64_to_gdouble (_calculate_pos (timestamp, timeshift, period));
|
|
|
|
gdouble per = gst_guint64_to_gdouble (period);
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble ret;
|
|
|
|
|
2012-01-01 17:43:23 +00:00
|
|
|
ret = -((pos - per / 2.0) * ((2.0 * amp) / per));
|
2011-12-22 22:48:30 +00:00
|
|
|
ret += off;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_saw_get (GstLFOControlSource * self, GstClockTime timestamp,
|
|
|
|
gdouble * value)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*value = _saw_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_saw_get_value_array (GstLFOControlSource * self,
|
|
|
|
GstClockTime timestamp, GstClockTime interval, guint n_values,
|
|
|
|
gdouble * values)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
guint i;
|
|
|
|
GstClockTime ts = timestamp;
|
|
|
|
|
|
|
|
for (i = 0; i < n_values; i++) {
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*values = _saw_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
ts += interval;
|
|
|
|
values++;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline gdouble
|
|
|
|
_rsaw_get (GstLFOControlSource * self, gdouble amp, gdouble off,
|
|
|
|
GstClockTime timeshift, GstClockTime period, gdouble frequency,
|
|
|
|
GstClockTime timestamp)
|
|
|
|
{
|
2012-01-01 17:43:23 +00:00
|
|
|
gdouble pos =
|
|
|
|
gst_guint64_to_gdouble (_calculate_pos (timestamp, timeshift, period));
|
|
|
|
gdouble per = gst_guint64_to_gdouble (period);
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble ret;
|
|
|
|
|
2012-01-01 17:43:23 +00:00
|
|
|
ret = (pos - per / 2.0) * ((2.0 * amp) / per);
|
2011-12-22 22:48:30 +00:00
|
|
|
ret += off;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_rsaw_get (GstLFOControlSource * self, GstClockTime timestamp,
|
|
|
|
gdouble * value)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*value = _rsaw_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_rsaw_get_value_array (GstLFOControlSource * self,
|
|
|
|
GstClockTime timestamp, GstClockTime interval, guint n_values,
|
|
|
|
gdouble * values)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
guint i;
|
|
|
|
GstClockTime ts = timestamp;
|
|
|
|
|
|
|
|
for (i = 0; i < n_values; i++) {
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*values = _rsaw_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
ts += interval;
|
|
|
|
values++;
|
|
|
|
}
|
|
|
|
return TRUE;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
static inline gdouble
|
|
|
|
_triangle_get (GstLFOControlSource * self, gdouble amp, gdouble off,
|
|
|
|
GstClockTime timeshift, GstClockTime period, gdouble frequency,
|
|
|
|
GstClockTime timestamp)
|
|
|
|
{
|
2012-01-01 17:43:23 +00:00
|
|
|
gdouble pos =
|
|
|
|
gst_guint64_to_gdouble (_calculate_pos (timestamp, timeshift, period));
|
|
|
|
gdouble per = gst_guint64_to_gdouble (period);
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble ret;
|
|
|
|
|
2012-01-01 17:43:23 +00:00
|
|
|
if (pos <= 0.25 * per)
|
|
|
|
/* 1st quarter */
|
|
|
|
ret = pos * ((4.0 * amp) / per);
|
|
|
|
else if (pos <= 0.75 * per)
|
|
|
|
/* 2nd & 3rd quarter */
|
|
|
|
ret = -(pos - per / 2.0) * ((4.0 * amp) / per);
|
2011-12-22 22:48:30 +00:00
|
|
|
else
|
2012-01-01 17:43:23 +00:00
|
|
|
/* 4th quarter */
|
|
|
|
ret = -(per - pos) * ((4.0 * amp) / per);
|
2011-12-22 22:48:30 +00:00
|
|
|
|
|
|
|
ret += off;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_triangle_get (GstLFOControlSource * self, GstClockTime timestamp,
|
|
|
|
gdouble * value)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*value = _triangle_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, timestamp);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
waveform_triangle_get_value_array (GstLFOControlSource * self,
|
|
|
|
GstClockTime timestamp, GstClockTime interval, guint n_values,
|
|
|
|
gdouble * values)
|
|
|
|
{
|
|
|
|
GstLFOControlSourcePrivate *priv = self->priv;
|
|
|
|
guint i;
|
|
|
|
GstClockTime ts = timestamp;
|
|
|
|
|
|
|
|
for (i = 0; i < n_values; i++) {
|
2012-01-01 14:16:06 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (self), ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2012-01-01 14:16:06 +00:00
|
|
|
*values =
|
|
|
|
_triangle_get (self, priv->amplitude, priv->offset, priv->timeshift,
|
|
|
|
priv->period, priv->frequency, ts);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
ts += interval;
|
|
|
|
values++;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct
|
|
|
|
{
|
|
|
|
GstControlSourceGetValue get;
|
|
|
|
GstControlSourceGetValueArray get_value_array;
|
|
|
|
} waveforms[] = {
|
|
|
|
{
|
|
|
|
(GstControlSourceGetValue) waveform_sine_get,
|
|
|
|
(GstControlSourceGetValueArray) waveform_sine_get_value_array}, {
|
|
|
|
(GstControlSourceGetValue) waveform_square_get,
|
|
|
|
(GstControlSourceGetValueArray) waveform_square_get_value_array}, {
|
|
|
|
(GstControlSourceGetValue) waveform_saw_get,
|
|
|
|
(GstControlSourceGetValueArray) waveform_saw_get_value_array}, {
|
|
|
|
(GstControlSourceGetValue) waveform_rsaw_get,
|
|
|
|
(GstControlSourceGetValueArray) waveform_rsaw_get_value_array}, {
|
|
|
|
(GstControlSourceGetValue) waveform_triangle_get,
|
|
|
|
(GstControlSourceGetValueArray) waveform_triangle_get_value_array}
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
};
|
|
|
|
|
2011-09-13 22:04:09 +00:00
|
|
|
static const guint num_waveforms = G_N_ELEMENTS (waveforms);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_WAVEFORM = 1,
|
|
|
|
PROP_FREQUENCY,
|
|
|
|
PROP_TIMESHIFT,
|
|
|
|
PROP_AMPLITUDE,
|
|
|
|
PROP_OFFSET
|
|
|
|
};
|
|
|
|
|
2011-11-04 10:34:11 +00:00
|
|
|
#define _do_init \
|
|
|
|
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "lfo control source", 0, "low frequency oscillator control source")
|
|
|
|
|
2012-04-12 12:59:52 +00:00
|
|
|
#define gst_lfo_control_source_parent_class parent_class
|
2011-11-04 10:34:11 +00:00
|
|
|
G_DEFINE_TYPE_WITH_CODE (GstLFOControlSource, gst_lfo_control_source,
|
2018-06-23 15:01:09 +00:00
|
|
|
GST_TYPE_CONTROL_SOURCE, G_ADD_PRIVATE (GstLFOControlSource) _do_init);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_reset (GstLFOControlSource * self)
|
|
|
|
{
|
|
|
|
GstControlSource *csource = GST_CONTROL_SOURCE (self);
|
|
|
|
|
|
|
|
csource->get_value = NULL;
|
|
|
|
csource->get_value_array = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_lfo_control_source_new:
|
|
|
|
*
|
|
|
|
* This returns a new, unbound #GstLFOControlSource.
|
|
|
|
*
|
2012-01-27 12:05:48 +00:00
|
|
|
* Returns: (transfer full): a new, unbound #GstLFOControlSource.
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*/
|
2012-01-31 11:20:41 +00:00
|
|
|
GstControlSource *
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
|
|
|
gst_lfo_control_source_new (void)
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
{
|
2017-05-15 11:32:48 +00:00
|
|
|
GstControlSource *csource = g_object_new (GST_TYPE_LFO_CONTROL_SOURCE, NULL);
|
|
|
|
|
|
|
|
/* Clear floating flag */
|
|
|
|
gst_object_ref_sink (csource);
|
|
|
|
|
|
|
|
return csource;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_lfo_control_source_set_waveform (GstLFOControlSource * self,
|
|
|
|
GstLFOWaveform waveform)
|
|
|
|
{
|
|
|
|
GstControlSource *csource = GST_CONTROL_SOURCE (self);
|
|
|
|
|
2011-09-13 22:04:09 +00:00
|
|
|
if (waveform >= num_waveforms || (int) waveform < 0) {
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
GST_WARNING ("waveform %d invalid or not implemented yet", waveform);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
csource->get_value = waveforms[waveform].get;
|
|
|
|
csource->get_value_array = waveforms[waveform].get_value_array;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
self->priv->waveform = waveform;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
return TRUE;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_init (GstLFOControlSource * self)
|
|
|
|
{
|
2018-06-23 15:01:09 +00:00
|
|
|
self->priv = gst_lfo_control_source_get_instance_private (self);
|
2011-12-22 22:48:30 +00:00
|
|
|
self->priv->waveform = gst_lfo_control_source_set_waveform (self,
|
|
|
|
GST_LFO_WAVEFORM_SINE);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
self->priv->frequency = 1.0;
|
2013-03-06 15:40:27 +00:00
|
|
|
self->priv->amplitude = 1.0;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
self->priv->period = GST_SECOND / self->priv->frequency;
|
|
|
|
self->priv->timeshift = 0;
|
|
|
|
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_init (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_finalize (GObject * obj)
|
|
|
|
{
|
|
|
|
GstLFOControlSource *self = GST_LFO_CONTROL_SOURCE (obj);
|
|
|
|
|
|
|
|
gst_lfo_control_source_reset (self);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_clear (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-04-12 12:59:52 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (obj);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
|
|
|
GstLFOControlSource *self = GST_LFO_CONTROL_SOURCE (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_WAVEFORM:
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2011-08-25 21:53:58 +00:00
|
|
|
gst_lfo_control_source_set_waveform (self,
|
|
|
|
(GstLFOWaveform) g_value_get_enum (value));
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
|
|
|
case PROP_FREQUENCY:{
|
|
|
|
gdouble frequency = g_value_get_double (value);
|
|
|
|
|
2013-03-07 08:12:59 +00:00
|
|
|
g_return_if_fail (((GstClockTime) (GST_SECOND / frequency)) != 0);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
self->priv->frequency = frequency;
|
|
|
|
self->priv->period = GST_SECOND / frequency;
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PROP_TIMESHIFT:
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
self->priv->timeshift = g_value_get_uint64 (value);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_AMPLITUDE:
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
self->priv->amplitude = g_value_get_double (value);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_OFFSET:
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_lock (&self->lock);
|
2011-12-22 22:48:30 +00:00
|
|
|
self->priv->offset = g_value_get_double (value);
|
2012-01-19 08:27:04 +00:00
|
|
|
g_mutex_unlock (&self->lock);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
|
|
|
GstLFOControlSource *self = GST_LFO_CONTROL_SOURCE (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_WAVEFORM:
|
|
|
|
g_value_set_enum (value, self->priv->waveform);
|
|
|
|
break;
|
|
|
|
case PROP_FREQUENCY:
|
|
|
|
g_value_set_double (value, self->priv->frequency);
|
|
|
|
break;
|
|
|
|
case PROP_TIMESHIFT:
|
|
|
|
g_value_set_uint64 (value, self->priv->timeshift);
|
|
|
|
break;
|
|
|
|
case PROP_AMPLITUDE:
|
2011-12-22 22:48:30 +00:00
|
|
|
g_value_set_double (value, self->priv->amplitude);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
|
|
|
case PROP_OFFSET:
|
2011-12-22 22:48:30 +00:00
|
|
|
g_value_set_double (value, self->priv->offset);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass)
|
|
|
|
{
|
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
|
|
|
gobject_class->finalize = gst_lfo_control_source_finalize;
|
|
|
|
gobject_class->set_property = gst_lfo_control_source_set_property;
|
|
|
|
gobject_class->get_property = gst_lfo_control_source_get_property;
|
|
|
|
|
|
|
|
/**
|
2012-06-20 02:55:02 +00:00
|
|
|
* GstLFOControlSource:waveform:
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* Specifies the waveform that should be used for this #GstLFOControlSource.
|
2011-12-22 22:48:30 +00:00
|
|
|
*/
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_WAVEFORM,
|
|
|
|
g_param_spec_enum ("waveform", "Waveform", "Waveform",
|
2008-03-22 14:56:17 +00:00
|
|
|
GST_TYPE_LFO_WAVEFORM, GST_LFO_WAVEFORM_SINE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/**
|
2012-06-20 02:55:02 +00:00
|
|
|
* GstLFOControlSource:frequency:
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* Specifies the frequency that should be used for the waveform
|
|
|
|
* of this #GstLFOControlSource. It should be large enough
|
|
|
|
* so that the period is longer than one nanosecond.
|
2011-12-22 22:48:30 +00:00
|
|
|
*/
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_FREQUENCY,
|
|
|
|
g_param_spec_double ("frequency", "Frequency",
|
2013-03-07 08:12:59 +00:00
|
|
|
"Frequency of the waveform", DBL_MIN, G_MAXDOUBLE, 1.0,
|
2012-01-01 14:16:06 +00:00
|
|
|
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/**
|
2012-06-20 02:55:02 +00:00
|
|
|
* GstLFOControlSource:timeshift:
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* Specifies the timeshift to the right that should be used for the waveform
|
|
|
|
* of this #GstLFOControlSource in nanoseconds.
|
|
|
|
*
|
|
|
|
* To get a n nanosecond shift to the left use
|
|
|
|
* "(GST_SECOND / frequency) - n".
|
|
|
|
*
|
2011-12-22 22:48:30 +00:00
|
|
|
*/
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_TIMESHIFT,
|
|
|
|
g_param_spec_uint64 ("timeshift", "Timeshift",
|
|
|
|
"Timeshift of the waveform to the right", 0, G_MAXUINT64, 0,
|
2012-01-01 14:16:06 +00:00
|
|
|
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/**
|
2012-06-20 02:55:02 +00:00
|
|
|
* GstLFOControlSource:amplitude:
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
|
|
|
* Specifies the amplitude for the waveform of this #GstLFOControlSource.
|
2011-12-22 22:48:30 +00:00
|
|
|
*/
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_AMPLITUDE,
|
2011-12-22 22:48:30 +00:00
|
|
|
g_param_spec_double ("amplitude", "Amplitude",
|
2012-01-01 14:16:06 +00:00
|
|
|
"Amplitude of the waveform", 0.0, 1.0, 1.0,
|
|
|
|
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/**
|
2012-06-20 02:55:02 +00:00
|
|
|
* GstLFOControlSource:offset:
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
*
|
2011-12-22 22:48:30 +00:00
|
|
|
* Specifies the value offset for the waveform of this #GstLFOControlSource.
|
|
|
|
*/
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_OFFSET,
|
2011-12-22 22:48:30 +00:00
|
|
|
g_param_spec_double ("offset", "Offset", "Offset of the waveform",
|
2012-01-01 14:16:06 +00:00
|
|
|
0.0, 1.0, 1.0,
|
|
|
|
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
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.
2007-08-03 15:47:17 +00:00
|
|
|
}
|