From 086b25d40a8fc3606d70c32af7f6af178e2d804d Mon Sep 17 00:00:00 2001 From: Christian Schaller Date: Fri, 6 May 2005 11:41:28 +0000 Subject: remove gst-libs from gst-plugins module as it is in gst-plugins-base now Original commit message from CVS: remove gst-libs from gst-plugins module as it is in gst-plugins-base now --- gst-libs/gst/propertyprobe/Makefile.am | 9 - gst-libs/gst/propertyprobe/propertyprobe.c | 345 ------------------------ gst-libs/gst/propertyprobe/propertyprobe.h | 97 ------- gst-libs/gst/propertyprobe/propertyprobe.vcproj | 144 ---------- 4 files changed, 595 deletions(-) delete mode 100644 gst-libs/gst/propertyprobe/Makefile.am delete mode 100644 gst-libs/gst/propertyprobe/propertyprobe.c delete mode 100644 gst-libs/gst/propertyprobe/propertyprobe.h delete mode 100644 gst-libs/gst/propertyprobe/propertyprobe.vcproj (limited to 'gst-libs/gst/propertyprobe') diff --git a/gst-libs/gst/propertyprobe/Makefile.am b/gst-libs/gst/propertyprobe/Makefile.am deleted file mode 100644 index 65f2bf4c..00000000 --- a/gst-libs/gst/propertyprobe/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -noinst_LTLIBRARIES = libgstpropertyprobe.la - -libgstpropertyprobe_la_SOURCES = propertyprobe.c - -libgstpropertyprobeincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/propertyprobe -libgstpropertyprobeinclude_HEADERS = propertyprobe.h - -libgstpropertyprobe_la_CFLAGS = $(GST_CFLAGS) - diff --git a/gst-libs/gst/propertyprobe/propertyprobe.c b/gst-libs/gst/propertyprobe/propertyprobe.c deleted file mode 100644 index 730151e9..00000000 --- a/gst-libs/gst/propertyprobe/propertyprobe.c +++ /dev/null @@ -1,345 +0,0 @@ -/* GStreamer PropertyProbe - * Copyright (C) 2003 David Schleef - * - * property_probe.c: property_probe design virtual class function wrappers - * - * 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. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include "propertyprobe.h" - -enum -{ - SIGNAL_PROBE_NEEDED, - LAST_SIGNAL -}; - -static void gst_property_probe_iface_init (GstPropertyProbeInterface * iface); - -static guint gst_property_probe_signals[LAST_SIGNAL] = { 0 }; - -GType -gst_property_probe_get_type (void) -{ - static GType gst_property_probe_type = 0; - - if (!gst_property_probe_type) { - static const GTypeInfo gst_property_probe_info = { - sizeof (GstPropertyProbeInterface), - (GBaseInitFunc) gst_property_probe_iface_init, - NULL, - NULL, - NULL, - NULL, - 0, - 0, - NULL, - }; - - gst_property_probe_type = - g_type_register_static (G_TYPE_INTERFACE, - "GstPropertyProbe", &gst_property_probe_info, 0); - } - - return gst_property_probe_type; -} - -static void -gst_property_probe_iface_init (GstPropertyProbeInterface * iface) -{ - static gboolean initialized = FALSE; - - if (!initialized) { - gst_property_probe_signals[SIGNAL_PROBE_NEEDED] = - g_signal_new ("probe-needed", G_TYPE_FROM_CLASS (iface), - G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPropertyProbeInterface, - probe_needed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); - initialized = TRUE; - } - - /* default virtual functions */ - iface->get_properties = NULL; - iface->get_values = NULL; -} - -/** - * gst_property_probe_get_properties: - * @probe: the #GstPropertyProbe to get the properties for. - * - * Get a list of properties for which probing is supported. - * - * Returns the list of properties for which probing is supported - * by this element. - */ - -const GList * -gst_property_probe_get_properties (GstPropertyProbe * probe) -{ - GstPropertyProbeInterface *iface; - - g_return_val_if_fail (probe != NULL, NULL); - - iface = GST_PROPERTY_PROBE_GET_IFACE (probe); - - if (iface->get_properties) - return iface->get_properties (probe); - - return NULL; -} - -const GParamSpec * -gst_property_probe_get_property (GstPropertyProbe * probe, const gchar * name) -{ - const GList *pspecs = gst_property_probe_get_properties (probe); - - g_return_val_if_fail (probe != NULL, NULL); - g_return_val_if_fail (name != NULL, NULL); - - while (pspecs) { - const GParamSpec *pspec = pspecs->data; - - if (!strcmp (pspec->name, name)) - return pspec; - - pspecs = pspecs->next; - } - - return NULL; -} - -void -gst_property_probe_probe_property (GstPropertyProbe * probe, - const GParamSpec * pspec) -{ - GstPropertyProbeInterface *iface; - - g_return_if_fail (probe != NULL); - g_return_if_fail (pspec != NULL); - - iface = GST_PROPERTY_PROBE_GET_IFACE (probe); - - if (iface->probe_property) - iface->probe_property (probe, pspec->param_id, pspec); -} - -/** - * gst_property_probe_probe_property_name: - * @probe: the #GstPropertyProbe to check. - * @name: name of the property to return. - * - * Returns the #GParamSpec for the given property. It's similar to - * g_object_class_find_property (), except that this function only - * takes "probe'able" properties into account. - * - * Returns: the #GParamSpec that belongs to the given property. - */ - -void -gst_property_probe_probe_property_name (GstPropertyProbe * probe, - const gchar * name) -{ - const GParamSpec *pspec; - - g_return_if_fail (probe != NULL); - g_return_if_fail (name != NULL); - - pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name); - if (!pspec) { - g_warning ("No such property %s", name); - return; - } - - gst_property_probe_probe_property (probe, pspec); -} - -/** - * gst_property_probe_needs_probe: - * @probe: the #GstPropertyProbe object to which the given property belongs. - * @pspec: a #GParamSpec that identifies the property to check. - * - * Checks whether a property needs a probe. This might be because - * the property wasn't initialized before, or because host setup - * changed. This might be, for example, because a new device was - * added, and thus device probing needs to be refreshed to display - * the new device. - * - * Returns: TRUE if the property needs a new probe, FALSE if not. - */ - -gboolean -gst_property_probe_needs_probe (GstPropertyProbe * probe, - const GParamSpec * pspec) -{ - GstPropertyProbeInterface *iface; - - g_return_val_if_fail (probe != NULL, FALSE); - g_return_val_if_fail (pspec != NULL, FALSE); - - iface = GST_PROPERTY_PROBE_GET_IFACE (probe); - - if (iface->needs_probe) - return iface->needs_probe (probe, pspec->param_id, pspec); - - return FALSE; -} - -/** - * gst_property_probe_needs_probe_name: - * @probe: the #GstPropertyProbe object to which the given property belongs. - * @name: the name of the property to check. - * - * Same as gst_property_probe_needs_probe (). - * - * Returns: TRUE if the property needs a new probe, FALSE if not. - */ - -gboolean -gst_property_probe_needs_probe_name (GstPropertyProbe * probe, - const gchar * name) -{ - const GParamSpec *pspec; - - g_return_val_if_fail (probe != NULL, FALSE); - g_return_val_if_fail (name != NULL, FALSE); - - pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name); - if (!pspec) { - g_warning ("No such property %s", name); - return FALSE; - } - - return gst_property_probe_needs_probe (probe, pspec); -} - -/** - * gst_property_probe_get_values: - * @probe: the #GstPropertyProbe object. - * @pspec: the #GParamSpec property identifier. - * - * Gets the possible (probed) values for the given property, - * requires the property to have been probed before. - * - * Returns: A list of valid values for the given property. - */ - -GValueArray * -gst_property_probe_get_values (GstPropertyProbe * probe, - const GParamSpec * pspec) -{ - GstPropertyProbeInterface *iface; - - g_return_val_if_fail (probe != NULL, NULL); - g_return_val_if_fail (pspec != NULL, NULL); - - iface = GST_PROPERTY_PROBE_GET_IFACE (probe); - - if (iface->get_values) - return iface->get_values (probe, pspec->param_id, pspec); - - return NULL; -} - -/** - * gst_property_probe_get_values_name: - * @probe: the #GstPropertyProbe object. - * @name: the name of the property to get values for. - * - * Same as gst_property_probe_get_values (). - * - * Returns: A list of valid values for the given property. - */ - -GValueArray * -gst_property_probe_get_values_name (GstPropertyProbe * probe, - const gchar * name) -{ - const GParamSpec *pspec; - - g_return_val_if_fail (probe != NULL, NULL); - g_return_val_if_fail (name != NULL, NULL); - - pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name); - if (!pspec) { - g_warning ("No such property %s", name); - return NULL; - } - - return gst_property_probe_get_values (probe, pspec); -} - -/** - * gst_property_probe_probe_and_get_values: - * @probe: the #GstPropertyProbe object. - * @pspec: The #GParamSpec property identifier. - * - * Check whether the given property requires a new probe. If so, - * fo the probe. After that, retrieve a value list. Meant as a - * utility function that wraps the above functions. - * - * Return: the list of valid values for this property. - */ - -GValueArray * -gst_property_probe_probe_and_get_values (GstPropertyProbe * probe, - const GParamSpec * pspec) -{ - GstPropertyProbeInterface *iface; - - g_return_val_if_fail (probe != NULL, NULL); - g_return_val_if_fail (pspec != NULL, NULL); - - iface = GST_PROPERTY_PROBE_GET_IFACE (probe); - - if (gst_property_probe_needs_probe (probe, pspec)) - gst_property_probe_probe_property (probe, pspec); - - return gst_property_probe_get_values (probe, pspec); -} - -/** - * gst_property_probe_probe_and_get_values_name: - * @probe: the #GstPropertyProbe object. - * @name: the name of the property to get values for. - * - * Same as gst_property_probe_probe_and_get_values (). - * - * Return: the list of valid values for this property. - */ - -GValueArray * -gst_property_probe_probe_and_get_values_name (GstPropertyProbe * probe, - const gchar * name) -{ - const GParamSpec *pspec; - - g_return_val_if_fail (probe != NULL, NULL); - g_return_val_if_fail (name != NULL, NULL); - - pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name); - if (!pspec) { - g_warning ("No such property %s", name); - return NULL; - } - - return gst_property_probe_probe_and_get_values (probe, pspec); -} diff --git a/gst-libs/gst/propertyprobe/propertyprobe.h b/gst-libs/gst/propertyprobe/propertyprobe.h deleted file mode 100644 index 695aa4da..00000000 --- a/gst-libs/gst/propertyprobe/propertyprobe.h +++ /dev/null @@ -1,97 +0,0 @@ -/* GStreamer PropertyProbe - * Copyright (C) 2003 David A. Schleef - * - * property_probe.h: property_probe interface design - * - * 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_PROPERTY_PROBE_H__ -#define __GST_PROPERTY_PROBE_H__ - -#include - -G_BEGIN_DECLS - -#define GST_TYPE_PROPERTY_PROBE \ - (gst_property_probe_get_type ()) -#define GST_PROPERTY_PROBE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbe)) -#define GST_IS_PROPERTY_PROBE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PROPERTY_PROBE)) -#define GST_PROPERTY_PROBE_GET_IFACE(obj) \ - (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbeInterface)) - -typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */ - -typedef struct _GstPropertyProbeInterface { - GTypeInterface klass; - - /* signals */ - void (*probe_needed) (GstPropertyProbe *probe, - const GParamSpec *pspec); - - /* virtual functions */ - const GList * (*get_properties) (GstPropertyProbe *probe); - gboolean (*needs_probe) (GstPropertyProbe *probe, - guint prop_id, - const GParamSpec *pspec); - void (*probe_property) (GstPropertyProbe *probe, - guint prop_id, - const GParamSpec *pspec); - GValueArray * (*get_values) (GstPropertyProbe *probe, - guint prop_id, - const GParamSpec *pspec); - - gpointer _gst_reserved[GST_PADDING]; -} GstPropertyProbeInterface; - -GType gst_property_probe_get_type (void); - -/* virtual class function wrappers */ - -/* returns list of GParamSpecs */ -const GList * gst_property_probe_get_properties (GstPropertyProbe *probe); -const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe, - const gchar *name); - -/* probe one property */ -void gst_property_probe_probe_property (GstPropertyProbe *probe, - const GParamSpec *pspec); -void gst_property_probe_probe_property_name (GstPropertyProbe *probe, - const gchar *name); - -/* do we need a probe? */ -gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe, - const GParamSpec *pspec); -gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe, - const gchar *name); - -/* returns list of GValues */ -GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe, - const GParamSpec *pspec); -GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe, - const gchar *name); - -/* sugar */ -GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe, - const GParamSpec *pspec); -GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe, - const gchar *name); - -G_END_DECLS - -#endif /* __GST_PROPERTY_PROBE_H__ */ diff --git a/gst-libs/gst/propertyprobe/propertyprobe.vcproj b/gst-libs/gst/propertyprobe/propertyprobe.vcproj deleted file mode 100644 index ef167ef7..00000000 --- a/gst-libs/gst/propertyprobe/propertyprobe.vcproj +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1