the beginnings of a linear interpolation dynamic parameter
authorSteve Baker <steve@stevebaker.org>
Sat, 15 Sep 2001 13:55:44 +0000 (13:55 +0000)
committerSteve Baker <steve@stevebaker.org>
Sat, 15 Sep 2001 13:55:44 +0000 (13:55 +0000)
Original commit message from CVS:
the beginnings of a linear interpolation dynamic parameter

libs/control/gstdplinearinterp.c [new file with mode: 0644]
libs/control/gstdplinearinterp.h [new file with mode: 0644]

diff --git a/libs/control/gstdplinearinterp.c b/libs/control/gstdplinearinterp.c
new file mode 100644 (file)
index 0000000..cae255b
--- /dev/null
@@ -0,0 +1,84 @@
+/* GStreamer
+ * Copyright (C) 2001 Steve Baker <stevebaker_org@yahoo.co.uk>
+ *
+ * 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 (file)
index 0000000..73f43f9
--- /dev/null
@@ -0,0 +1,61 @@
+/* GStreamer
+ * Copyright (C) 2001 Steve Baker <stevebaker_org@yahoo.co.uk>
+ *
+ * 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 <gst/gstobject.h>
+#include <gst/gstdparam.h>
+
+#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__ */