From 19a05024c391ac4f34d684031a54a502fe91664d Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Sat, 15 Sep 2001 13:55:44 +0000 Subject: [PATCH] the beginnings of a linear interpolation dynamic parameter Original commit message from CVS: the beginnings of a linear interpolation dynamic parameter --- libs/control/gstdplinearinterp.c | 84 ++++++++++++++++++++++++++++++++++++++++ libs/control/gstdplinearinterp.h | 61 +++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 libs/control/gstdplinearinterp.c create mode 100644 libs/control/gstdplinearinterp.h diff --git a/libs/control/gstdplinearinterp.c b/libs/control/gstdplinearinterp.c new file mode 100644 index 0000000..cae255b --- /dev/null +++ b/libs/control/gstdplinearinterp.c @@ -0,0 +1,84 @@ +/* GStreamer + * Copyright (C) 2001 Steve Baker + * + * gstdplinearinterp.c: linear interpolation dynamic parameter + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstdplinearinterp.h" + + +static void gst_dp_linint_class_init (GstDParamClass *klass); +static void gst_dp_linint_base_class_init (GstDParamClass *klass); +static void gst_dp_linint_init (GstDParam *dp_linint); + +GType +gst_dp_linint_get_type(void) { + static GType dp_linint_type = 0; + + if (!dp_linint_type) { + static const GTypeInfo dp_linint_info = { + sizeof(GstDParamClass), + (GBaseInitFunc)gst_dp_linint_base_class_init, + NULL, + (GClassInitFunc)gst_dp_linint_class_init, + NULL, + NULL, + sizeof(GstDParam), + 0, + (GInstanceInitFunc)gst_dp_linint_init, + }; + dp_linint_type = g_type_register_static(GST_TYPE_DPARAM, "GstDParamLinInterp", &dp_linint_info, 0); + } + return dp_linint_type; +} + +static void +gst_dp_linint_base_class_init (GstDParamClass *klass) +{ + +} + +static void +gst_dp_linint_class_init (GstDParamClass *klass) +{ + +} + +static void +gst_dp_linint_init (GstDParam *dp_linint) +{ + g_return_if_fail (dp_linint != NULL); +} + +/** + * gst_dp_linint_new: + * @type: the type that this dp_linint will store + * + * Returns: a new instance of GstDParam + */ +GstDParam* +gst_dp_linint_new (GType type) +{ + GstDParam *dparam; + GstDParamLinInterp *dp_linint; + + dp_linint = g_object_new (gst_dp_linint_get_type (), NULL); + dparam = GST_DPARAM(dp_linint); + + return dparam; +} diff --git a/libs/control/gstdplinearinterp.h b/libs/control/gstdplinearinterp.h new file mode 100644 index 0000000..73f43f9 --- /dev/null +++ b/libs/control/gstdplinearinterp.h @@ -0,0 +1,61 @@ +/* GStreamer + * Copyright (C) 2001 Steve Baker + * + * gstdplinearinterp.h: linear interpolation dynamic parameter + * + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_DP_LININT_H__ +#define __GST_DP_LININT_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GST_TYPE_DP_LININT (gst_dp_linint_get_type ()) +#define GST_DP_LININT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DP_LININT,GstDParamLinInterp)) +#define GST_DP_LININT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DP_LININT,GstDParamLinInterp)) +#define GST_IS_DP_LININT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DP_LININT)) +#define GST_IS_DP_LININT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DP_LININT)) + +typedef struct _GstDParamLinInterp GstDParamLinInterp; +typedef struct _GstDParamLinInterpClass GstDParamLinInterpClass; + +struct _GstDParamLinInterp { + GstDParam dparam; + +}; + +struct _GstDParamLinInterpClass { + GstDParamClass parent_class; + + /* signal callbacks */ +}; + +GType gst_dp_linint_get_type (void); +GstDParam* gst_dp_linint_new (GType type); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GST_DP_LININT_H__ */ -- 2.7.4