diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-03 21:02:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-03 21:02:36 +0300 |
commit | 5323a782c4e8c42781f22ce2f488962a18f82554 (patch) | |
tree | f71537197b16f0f8fd0d6937f7120d018d220814 /include/gst/controller | |
parent | 50acf9d37183f86f6f623aad410003392b0af41f (diff) |
Jabber: initial version of Jingle support
Diffstat (limited to 'include/gst/controller')
-rw-r--r-- | include/gst/controller/controller-enumtypes.h | 26 | ||||
-rw-r--r-- | include/gst/controller/controller-prelude.h | 35 | ||||
-rw-r--r-- | include/gst/controller/controller.h | 35 | ||||
-rw-r--r-- | include/gst/controller/gstargbcontrolbinding.h | 103 | ||||
-rw-r--r-- | include/gst/controller/gstdirectcontrolbinding.h | 129 | ||||
-rw-r--r-- | include/gst/controller/gstinterpolationcontrolsource.h | 104 | ||||
-rw-r--r-- | include/gst/controller/gstlfocontrolsource.h | 102 | ||||
-rw-r--r-- | include/gst/controller/gstproxycontrolbinding.h | 85 | ||||
-rw-r--r-- | include/gst/controller/gsttimedvaluecontrolsource.h | 160 | ||||
-rw-r--r-- | include/gst/controller/gsttriggercontrolsource.h | 87 |
10 files changed, 866 insertions, 0 deletions
diff --git a/include/gst/controller/controller-enumtypes.h b/include/gst/controller/controller-enumtypes.h new file mode 100644 index 0000000000..be00d2490b --- /dev/null +++ b/include/gst/controller/controller-enumtypes.h @@ -0,0 +1,26 @@ + +/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ + +#pragma once + + #include <glib-object.h> + #include <gst/controller/controller-prelude.h> + + G_BEGIN_DECLS + +/* enumerations from "gstinterpolationcontrolsource.h" */ + +GST_CONTROLLER_API +GType gst_interpolation_mode_get_type (void); +#define GST_TYPE_INTERPOLATION_MODE (gst_interpolation_mode_get_type()) + +/* enumerations from "gstlfocontrolsource.h" */ + +GST_CONTROLLER_API +GType gst_lfo_waveform_get_type (void); +#define GST_TYPE_LFO_WAVEFORM (gst_lfo_waveform_get_type()) + +G_END_DECLS + +/* Generated data ends here */ + diff --git a/include/gst/controller/controller-prelude.h b/include/gst/controller/controller-prelude.h new file mode 100644 index 0000000000..cd7f0c9196 --- /dev/null +++ b/include/gst/controller/controller-prelude.h @@ -0,0 +1,35 @@ +/* GStreamer Controller Library + * Copyright (C) 2018 GStreamer developers + * + * controller-prelude.h: prelude include header for gst-controller library + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_CONTROLLER_PRELUDE_H__ +#define __GST_CONTROLLER_PRELUDE_H__ + +#include <gst/gst.h> + +#ifndef GST_CONTROLLER_API +#ifdef BUILDING_GST_CONTROLLER +#define GST_CONTROLLER_API GST_API_EXPORT /* from config.h */ +#else +#define GST_CONTROLLER_API GST_API_IMPORT +#endif +#endif + +#endif /* __GST_CONTROLLER_PRELUDE_H__ */ diff --git a/include/gst/controller/controller.h b/include/gst/controller/controller.h new file mode 100644 index 0000000000..79ae8ce6da --- /dev/null +++ b/include/gst/controller/controller.h @@ -0,0 +1,35 @@ +/* GStreamer + * Copyright (C) 2012 GStreamer developers + * + * gstcontroller.h: single include header for gst-controller library + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_CONTROLLER_H__ +#define __GST_CONTROLLER_H__ + +#include <gst/controller/controller-prelude.h> + +#include <gst/controller/gstargbcontrolbinding.h> +#include <gst/controller/gstdirectcontrolbinding.h> +#include <gst/controller/gstproxycontrolbinding.h> +#include <gst/controller/gsttimedvaluecontrolsource.h> +#include <gst/controller/gstinterpolationcontrolsource.h> +#include <gst/controller/gsttriggercontrolsource.h> +#include <gst/controller/gstlfocontrolsource.h> + +#endif /* __GST_CONTROLLER_H__ */ diff --git a/include/gst/controller/gstargbcontrolbinding.h b/include/gst/controller/gstargbcontrolbinding.h new file mode 100644 index 0000000000..3d1c8baacd --- /dev/null +++ b/include/gst/controller/gstargbcontrolbinding.h @@ -0,0 +1,103 @@ +/* GStreamer + * + * Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net> + * + * gstargbcontrolbinding.h: Attachment for multiple control sources to gargb + * properties + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_ARGB_CONTROL_BINDING_H__ +#define __GST_ARGB_CONTROL_BINDING_H__ + +#include <gst/gstconfig.h> + +#include <glib-object.h> + +#include <gst/gstcontrolsource.h> +#include <gst/controller/controller-prelude.h> + +G_BEGIN_DECLS + +#define GST_TYPE_ARGB_CONTROL_BINDING \ + (gst_argb_control_binding_get_type()) +#define GST_ARGB_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBinding)) +#define GST_ARGB_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBindingClass)) +#define GST_IS_ARGB_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ARGB_CONTROL_BINDING)) +#define GST_IS_ARGB_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARGB_CONTROL_BINDING)) +#define GST_ARGB_CONTROL_BINDING_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstARGBControlBindingClass)) + +typedef struct _GstARGBControlBinding GstARGBControlBinding; +typedef struct _GstARGBControlBindingClass GstARGBControlBindingClass; + +/** + * GstARGBControlBinding: + * @name: name of the property of this binding + * + * The instance structure of #GstARGBControlBinding. + */ +struct _GstARGBControlBinding { + GstControlBinding parent; + + /*< private >*/ + GstControlSource *cs_a; /* GstControlSources for this property */ + GstControlSource *cs_r; + GstControlSource *cs_g; + GstControlSource *cs_b; + + GValue cur_value; + guint32 last_value; + + gpointer _gst_reserved[GST_PADDING]; +}; + +/** + * GstARGBControlBindingClass: + * @parent_class: Parent class + * @convert: Class method to convert control-values + * + * The class structure of #GstARGBControlBinding. + */ + +struct _GstARGBControlBindingClass +{ + GstControlBindingClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_argb_control_binding_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GstControlBinding * gst_argb_control_binding_new (GstObject * object, const gchar * property_name, + GstControlSource * cs_a, GstControlSource * cs_r, + GstControlSource * cs_g, GstControlSource * cs_b); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstARGBControlBinding, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_ARGB_CONTROL_BINDING_H__ */ diff --git a/include/gst/controller/gstdirectcontrolbinding.h b/include/gst/controller/gstdirectcontrolbinding.h new file mode 100644 index 0000000000..549d1240ed --- /dev/null +++ b/include/gst/controller/gstdirectcontrolbinding.h @@ -0,0 +1,129 @@ +/* GStreamer + * + * Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net> + * + * gstdirectcontrolbinding.h: Direct attachment for control sources + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_DIRECT_CONTROL_BINDING_H__ +#define __GST_DIRECT_CONTROL_BINDING_H__ + +#include <gst/gstconfig.h> + +#include <glib-object.h> + +#include <gst/gstcontrolsource.h> +#include <gst/controller/controller-prelude.h> + +G_BEGIN_DECLS + +#define GST_TYPE_DIRECT_CONTROL_BINDING \ + (gst_direct_control_binding_get_type()) +#define GST_DIRECT_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECT_CONTROL_BINDING,GstDirectControlBinding)) +#define GST_DIRECT_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECT_CONTROL_BINDING,GstDirectControlBindingClass)) +#define GST_IS_DIRECT_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECT_CONTROL_BINDING)) +#define GST_IS_DIRECT_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECT_CONTROL_BINDING)) +#define GST_DIRECT_CONTROL_BINDING_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstDirectControlBindingClass)) + +typedef struct _GstDirectControlBinding GstDirectControlBinding; +typedef struct _GstDirectControlBindingClass GstDirectControlBindingClass; + +/** + * GstDirectControlBindingConvertValue: + * @self: the #GstDirectControlBinding instance + * @src_value: the value returned by the cotnrol source + * @dest_value: the target location + * + * Function to map a control-value to the target plain data type. + */ +typedef void (* GstDirectControlBindingConvertValue) (GstDirectControlBinding *self, gdouble src_value, gpointer dest_value); + +/** + * GstDirectControlBindingConvertGValue: + * @self: the #GstDirectControlBinding instance + * @src_value: the value returned by the cotnrol source + * @dest_value: the target GValue + * + * Function to map a control-value to the target GValue. + */ +typedef void (* GstDirectControlBindingConvertGValue) (GstDirectControlBinding *self, gdouble src_value, GValue *dest_value); + +/** + * GstDirectControlBinding: + * @name: name of the property of this binding + * + * The instance structure of #GstDirectControlBinding. + */ +struct _GstDirectControlBinding { + GstControlBinding parent; + + /*< private >*/ + GstControlSource *cs; /* GstControlSource for this property */ + GValue cur_value; + gdouble last_value; + gint byte_size; + + GstDirectControlBindingConvertValue convert_value; + GstDirectControlBindingConvertGValue convert_g_value; + + union { + gpointer _gst_reserved[GST_PADDING]; + struct { + gboolean want_absolute; + } abi; + } ABI; +}; + +/** + * GstDirectControlBindingClass: + * @parent_class: Parent class + * @convert: Class method to convert control-values + * + * The class structure of #GstDirectControlBinding. + */ + +struct _GstDirectControlBindingClass +{ + GstControlBindingClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_direct_control_binding_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GstControlBinding * gst_direct_control_binding_new (GstObject * object, const gchar * property_name, + GstControlSource * cs); +GST_CONTROLLER_API +GstControlBinding * gst_direct_control_binding_new_absolute (GstObject * object, const gchar * property_name, + GstControlSource * cs); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDirectControlBinding, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_DIRECT_CONTROL_BINDING_H__ */ diff --git a/include/gst/controller/gstinterpolationcontrolsource.h b/include/gst/controller/gstinterpolationcontrolsource.h new file mode 100644 index 0000000000..a3da267fb5 --- /dev/null +++ b/include/gst/controller/gstinterpolationcontrolsource.h @@ -0,0 +1,104 @@ +/* GStreamer + * + * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org> + * + * gstinterpolationcontrolsource.h: Control source that provides several + * interpolation methods + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_INTERPOLATION_CONTROL_SOURCE_H__ +#define __GST_INTERPOLATION_CONTROL_SOURCE_H__ + +#include <glib-object.h> +#include <gst/gst.h> + +#include <gst/controller/gsttimedvaluecontrolsource.h> +#include <gst/controller/controller-enumtypes.h> + +G_BEGIN_DECLS + +#define GST_TYPE_INTERPOLATION_CONTROL_SOURCE \ + (gst_interpolation_control_source_get_type ()) +#define GST_INTERPOLATION_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSource)) +#define GST_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass)) +#define GST_IS_INTERPOLATION_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE)) +#define GST_IS_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE)) +#define GST_INTERPOLATION_CONTROL_SOURCE_GET_CLASS(inst) \ + (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass)) + +typedef struct _GstInterpolationControlSource GstInterpolationControlSource; +typedef struct _GstInterpolationControlSourceClass GstInterpolationControlSourceClass; +typedef struct _GstInterpolationControlSourcePrivate GstInterpolationControlSourcePrivate; + +/** + * GstInterpolationMode: + * @GST_INTERPOLATION_MODE_NONE: steps-like interpolation, default + * @GST_INTERPOLATION_MODE_LINEAR: linear interpolation + * @GST_INTERPOLATION_MODE_CUBIC: cubic interpolation (natural), may overshoot + * the min or max values set by the control point, but is more 'curvy' + * @GST_INTERPOLATION_MODE_CUBIC_MONOTONIC: monotonic cubic interpolation, will not + * produce any values outside of the min-max range set by the control points + * (Since: 1.8) + * + * The various interpolation modes available. + */ +typedef enum +{ + GST_INTERPOLATION_MODE_NONE, + GST_INTERPOLATION_MODE_LINEAR, + GST_INTERPOLATION_MODE_CUBIC, + GST_INTERPOLATION_MODE_CUBIC_MONOTONIC, +} GstInterpolationMode; + +/** + * GstInterpolationControlSource: + * + * The instance structure of #GstControlSource. + */ +struct _GstInterpolationControlSource { + GstTimedValueControlSource parent; + + /*< private >*/ + GstInterpolationControlSourcePrivate *priv; + gpointer _gst_reserved[GST_PADDING]; +}; + +struct _GstInterpolationControlSourceClass { + GstTimedValueControlSourceClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_interpolation_control_source_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GstControlSource * gst_interpolation_control_source_new (void); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInterpolationControlSource, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_INTERPOLATION_CONTROL_SOURCE_H__ */ diff --git a/include/gst/controller/gstlfocontrolsource.h b/include/gst/controller/gstlfocontrolsource.h new file mode 100644 index 0000000000..cc09d492c0 --- /dev/null +++ b/include/gst/controller/gstlfocontrolsource.h @@ -0,0 +1,102 @@ +/* GStreamer + * + * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org> + * + * gstlfocontrolsource.h: 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_LFO_CONTROL_SOURCE_H__ +#define __GST_LFO_CONTROL_SOURCE_H__ + +#include <glib-object.h> +#include <gst/gst.h> +#include <gst/controller/controller-enumtypes.h> + +G_BEGIN_DECLS + +#define GST_TYPE_LFO_CONTROL_SOURCE \ + (gst_lfo_control_source_get_type ()) +#define GST_LFO_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSource)) +#define GST_LFO_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSourceClass)) +#define GST_IS_LFO_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_LFO_CONTROL_SOURCE)) +#define GST_IS_LFO_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_LFO_CONTROL_SOURCE)) +#define GST_LFO_CONTROL_SOURCE_GET_CLASS(inst) \ + (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_LFO_CONTROL_SOURCE, GstLFOControlSourceClass)) + +typedef struct _GstLFOControlSource GstLFOControlSource; +typedef struct _GstLFOControlSourceClass GstLFOControlSourceClass; +typedef struct _GstLFOControlSourcePrivate GstLFOControlSourcePrivate; + +/** + * GstLFOWaveform: + * @GST_LFO_WAVEFORM_SINE: sine waveform + * @GST_LFO_WAVEFORM_SQUARE: square waveform + * @GST_LFO_WAVEFORM_SAW: saw waveform + * @GST_LFO_WAVEFORM_REVERSE_SAW: reverse saw waveform + * @GST_LFO_WAVEFORM_TRIANGLE: triangle waveform + * + * The various waveform modes available. + */ +typedef enum +{ + GST_LFO_WAVEFORM_SINE, + GST_LFO_WAVEFORM_SQUARE, + GST_LFO_WAVEFORM_SAW, + GST_LFO_WAVEFORM_REVERSE_SAW, + GST_LFO_WAVEFORM_TRIANGLE +} GstLFOWaveform; + +/** + * GstLFOControlSource: + * + * The instance structure of #GstControlSource. + */ +struct _GstLFOControlSource { + GstControlSource parent; + + /* <private> */ + GstLFOControlSourcePrivate *priv; + GMutex lock; + gpointer _gst_reserved[GST_PADDING]; +}; + +struct _GstLFOControlSourceClass { + GstControlSourceClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_lfo_control_source_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GstControlSource *gst_lfo_control_source_new (void); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstLFOControlSource, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_LFO_CONTROL_SOURCE_H__ */ diff --git a/include/gst/controller/gstproxycontrolbinding.h b/include/gst/controller/gstproxycontrolbinding.h new file mode 100644 index 0000000000..42e8fd9ff7 --- /dev/null +++ b/include/gst/controller/gstproxycontrolbinding.h @@ -0,0 +1,85 @@ +/* + * GStreamer + * Copyright (C) 2016 Matthew Waters <matthew@centricular.com> + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_PROXY_CONTROL_BINDING_H__ +#define __GST_PROXY_CONTROL_BINDING_H__ + +#include <gst/gst.h> +#include <gst/controller/controller-prelude.h> + +G_BEGIN_DECLS + +#define GST_TYPE_PROXY_CONTROL_BINDING (gst_proxy_control_binding_get_type()) +#define GST_PROXY_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PROXY_CONTROL_BINDING,GstProxyControlBinding)) +#define GST_PROXY_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PROXY_CONTROL_BINDING,GstProxyControlBindingClass)) +#define GST_IS_PROXY_CONTROL_BINDING(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PROXY_CONTROL_BINDING)) +#define GST_IS_PROXY_CONTROL_BINDING_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PROXY_CONTROL_BINDING)) +#define GST_PROXY_CONTROL_BINDING_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstProxyControlBindingClass)) + +typedef struct _GstProxyControlBinding GstProxyControlBinding; +typedef struct _GstProxyControlBindingClass GstProxyControlBindingClass; + +/** + * GstProxyControlBinding: + * + * Opaque #GstProxyControlBinding struct + */ +struct _GstProxyControlBinding +{ + /* <private> */ + GstControlBinding parent; + + GWeakRef ref_object; + gchar *property_name; + + gpointer _padding[GST_PADDING]; +}; + +/** + * GstProxyControlBindingClass: + * + * Opaque #GstProxyControlBindingClass struct + */ +struct _GstProxyControlBindingClass +{ + /* <private> */ + GstControlBindingClass parent_class; + + gpointer _padding[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_proxy_control_binding_get_type (void); + +GST_CONTROLLER_API +GstControlBinding * gst_proxy_control_binding_new (GstObject * object, + const gchar * property_name, + GstObject * ref_object, + const gchar * ref_property_name); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstProxyControlBinding, gst_object_unref) +G_END_DECLS + +#endif /* __GST_PROXY_CONTROL_BINDING_H__ */ diff --git a/include/gst/controller/gsttimedvaluecontrolsource.h b/include/gst/controller/gsttimedvaluecontrolsource.h new file mode 100644 index 0000000000..2baa369a23 --- /dev/null +++ b/include/gst/controller/gsttimedvaluecontrolsource.h @@ -0,0 +1,160 @@ +/* GStreamer + * + * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org> + * 2011 Stefan Sauer <ensonic@users.sf.net> + * + * gsttimedvaluecontrolsource.h: Base class for timeed value based control + * sources + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_TIMED_VALUE_CONTROL_SOURCE_H__ +#define __GST_TIMED_VALUE_CONTROL_SOURCE_H__ + +#include <glib-object.h> +#include <gst/gst.h> +#include <gst/controller/controller-prelude.h> + +G_BEGIN_DECLS + +#define GST_TYPE_TIMED_VALUE_CONTROL_SOURCE \ + (gst_timed_value_control_source_get_type ()) +#define GST_TIMED_VALUE_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIMED_VALUE_CONTROL_SOURCE, GstTimedValueControlSource)) +#define GST_TIMED_VALUE_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_TIMED_VALUE_CONTROL_SOURCE, GstTimedValueControlSourceClass)) +#define GST_IS_TIMED_VALUE_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIMED_VALUE_CONTROL_SOURCE)) +#define GST_IS_TIMED_VALUE_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_TIMED_VALUE_CONTROL_SOURCE)) +#define GST_TIMED_VALUE_CONTROL_SOURCE_GET_CLASS(inst) \ + (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_TIMED_VALUE_CONTROL_SOURCE, GstTimedValueControlSourceClass)) + +typedef struct _GstTimedValueControlSource GstTimedValueControlSource; +typedef struct _GstTimedValueControlSourceClass GstTimedValueControlSourceClass; +typedef struct _GstTimedValueControlSourcePrivate GstTimedValueControlSourcePrivate; +typedef struct _GstControlPoint GstControlPoint; + +/** + * GstControlPoint: + * @timestamp: timestamp of the value change + * @value: the new value + * + * An internal structure for value+time and various temporary + * values used for interpolation. This "inherits" from + * GstTimedValue. + */ +struct _GstControlPoint +{ + /* fields from GstTimedValue. DO NOT CHANGE! */ + GstClockTime timestamp; + gdouble value; + + /*< private >*/ + + /* Caches for the interpolators */ + /* FIXME: we should not have this here already ... */ + union { + struct { /* 16 bytes */ + gdouble h; + gdouble z; + } cubic; + struct { /* 24 bytes */ + gdouble c1s, c2s, c3s; + } cubic_monotonic; + guint8 _gst_reserved[64]; + } cache; +}; + +GST_CONTROLLER_API +GType gst_control_point_get_type (void); + +/** + * GstTimedValueControlSource: + * + * The instance structure of #GstControlSource. + */ +struct _GstTimedValueControlSource { + GstControlSource parent; + + /*< protected >*/ + GMutex lock; + + GSequence *values; /* List of GstControlPoint */ + gint nvalues; /* Number of control points */ + gboolean valid_cache; + + /*< private >*/ + GstTimedValueControlSourcePrivate *priv; + gpointer _gst_reserved[GST_PADDING]; +}; + +struct _GstTimedValueControlSourceClass { + GstControlSourceClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +#define GST_TIMED_VALUE_CONTROL_SOURCE_LOCK(o) \ + g_mutex_lock(&((GstTimedValueControlSource *)o)->lock) +#define GST_TIMED_VALUE_CONTROL_SOURCE_UNLOCK(o) \ + g_mutex_unlock(&((GstTimedValueControlSource *)o)->lock) + +GST_CONTROLLER_API +GType gst_timed_value_control_source_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GSequenceIter * gst_timed_value_control_source_find_control_point_iter ( + GstTimedValueControlSource * self, + GstClockTime timestamp); +GST_CONTROLLER_API +gboolean gst_timed_value_control_source_set (GstTimedValueControlSource * self, + GstClockTime timestamp, + const gdouble value); +GST_CONTROLLER_API +gboolean gst_timed_value_control_source_set_from_list (GstTimedValueControlSource * self, + const GSList * timedvalues); +GST_CONTROLLER_API +gboolean gst_timed_value_control_source_unset (GstTimedValueControlSource * self, + GstClockTime timestamp); + +GST_CONTROLLER_API +void gst_timed_value_control_source_unset_all (GstTimedValueControlSource *self); + +GST_CONTROLLER_API +GList * gst_timed_value_control_source_get_all (GstTimedValueControlSource * self); + +GST_CONTROLLER_API +gint gst_timed_value_control_source_get_count (GstTimedValueControlSource * self); + +GST_CONTROLLER_API +void gst_timed_value_control_invalidate_cache (GstTimedValueControlSource * self); + +GST_CONTROLLER_API +void gst_control_point_free (GstControlPoint * cp); + +GST_CONTROLLER_API +GstControlPoint * gst_control_point_copy (GstControlPoint * cp); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTimedValueControlSource, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_TIMED_VALUE_CONTROL_SOURCE_H__ */ diff --git a/include/gst/controller/gsttriggercontrolsource.h b/include/gst/controller/gsttriggercontrolsource.h new file mode 100644 index 0000000000..431456b970 --- /dev/null +++ b/include/gst/controller/gsttriggercontrolsource.h @@ -0,0 +1,87 @@ +/* GStreamer + * + * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org> + * 2011 Stefan Sauer <ensonic@users.sf.net> + * + * gsttriggercontrolsource.h: Control source that provides some values at time- + * stamps + * + * 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 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef __GST_TRIGGER_CONTROL_SOURCE_H__ +#define __GST_TRIGGER_CONTROL_SOURCE_H__ + +#include <glib-object.h> +#include <gst/gst.h> + +#include <gst/controller/gsttimedvaluecontrolsource.h> + +G_BEGIN_DECLS + +#define GST_TYPE_TRIGGER_CONTROL_SOURCE \ + (gst_trigger_control_source_get_type ()) +#define GST_TRIGGER_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TRIGGER_CONTROL_SOURCE, GstTriggerControlSource)) +#define GST_TRIGGER_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_TRIGGER_CONTROL_SOURCE, GstTriggerControlSourceClass)) +#define GST_IS_TRIGGER_CONTROL_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TRIGGER_CONTROL_SOURCE)) +#define GST_IS_TRIGGER_CONTROL_SOURCE_CLASS(vtable) \ + (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_TRIGGER_CONTROL_SOURCE)) +#define GST_TRIGGER_CONTROL_SOURCE_GET_CLASS(inst) \ + (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_TRIGGER_CONTROL_SOURCE, GstTriggerControlSourceClass)) + +#define GST_TYPE_TRIGGER_WAVEFORM (gst_trigger_waveform_get_type ()) + +typedef struct _GstTriggerControlSource GstTriggerControlSource; +typedef struct _GstTriggerControlSourceClass GstTriggerControlSourceClass; +typedef struct _GstTriggerControlSourcePrivate GstTriggerControlSourcePrivate; + +/** + * GstTriggerControlSource: + * + * The instance structure of #GstControlSource. + */ +struct _GstTriggerControlSource { + GstTimedValueControlSource parent; + + /*< private >*/ + GstTriggerControlSourcePrivate *priv; + gpointer _gst_reserved[GST_PADDING]; +}; + +struct _GstTriggerControlSourceClass { + GstTimedValueControlSourceClass parent_class; + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; +}; + +GST_CONTROLLER_API +GType gst_trigger_control_source_get_type (void); + +/* Functions */ + +GST_CONTROLLER_API +GstControlSource *gst_trigger_control_source_new (void); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTriggerControlSource, gst_object_unref) + +G_END_DECLS + +#endif /* __GST_TRIGGER_CONTROL_SOURCE_H__ */ |