update for removed property probe
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 21 Dec 2011 10:59:46 +0000 (11:59 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 21 Dec 2011 10:59:46 +0000 (11:59 +0100)
12 files changed:
ext/pulse/pulsemixer.c
ext/pulse/pulseprobe.h
ext/pulse/pulsesink.c
ext/pulse/pulsesrc.c
sys/v4l2/gstv4l2object.c
sys/v4l2/gstv4l2object.h
sys/v4l2/gstv4l2radio.c
sys/v4l2/gstv4l2sink.c
sys/v4l2/gstv4l2src.c
tests/examples/pulse/pulse.c
tests/examples/v4l2/Makefile.am
tests/examples/v4l2/probe.c [deleted file]

index 2a479cd..c14358b 100644 (file)
@@ -65,14 +65,12 @@ static GstStateChangeReturn gst_pulsemixer_change_state (GstElement * element,
     GstStateChange transition);
 
 GST_IMPLEMENT_PULSEMIXER_CTRL_METHODS (GstPulseMixer, gst_pulsemixer);
-GST_IMPLEMENT_PULSEPROBE_METHODS (GstPulseMixer, gst_pulsemixer);
 
 
 #define gst_pulsemixer_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstPulseMixer, gst_pulsemixer, GST_TYPE_ELEMENT,
-    G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER, gst_pulsemixer_mixer_interface_init);
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_pulsemixer_property_probe_interface_init));
+    G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER,
+        gst_pulsemixer_mixer_interface_init));
 
 static void
 gst_pulsemixer_class_init (GstPulseMixerClass * g_class)
index 28cdbb8..4fcff90 100644 (file)
@@ -28,7 +28,6 @@
 
 G_BEGIN_DECLS
 
-#include <gst/interfaces/propertyprobe.h>
 #include <pulse/pulseaudio.h>
 #include <pulse/thread-mainloop.h>
 
index 3bcd433..0a3718b 100644 (file)
@@ -1691,13 +1691,9 @@ static GstStaticPadTemplate pad_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (PULSE_SINK_TEMPLATE_CAPS));
 
-GST_IMPLEMENT_PULSEPROBE_METHODS (GstPulseSink, gst_pulsesink);
-
 #define gst_pulsesink_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstPulseSink, gst_pulsesink, GST_TYPE_AUDIO_BASE_SINK,
     gst_pulsesink_init_contexts ();
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_pulsesink_property_probe_interface_init);
     G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL)
     );
 
index 219fc60..09acced 100644 (file)
@@ -127,13 +127,10 @@ static GstStaticPadTemplate pad_template = GST_STATIC_PAD_TEMPLATE ("src",
 
 
 GST_IMPLEMENT_PULSEMIXER_CTRL_METHODS (GstPulseSrc, gst_pulsesrc);
-GST_IMPLEMENT_PULSEPROBE_METHODS (GstPulseSrc, gst_pulsesrc);
 
 #define gst_pulsesrc_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstPulseSrc, gst_pulsesrc, GST_TYPE_AUDIO_SRC,
     G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER, gst_pulsesrc_mixer_interface_init);
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_pulsesrc_property_probe_interface_init);
     G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL));
 
 static void
index 9d1e3ae..1f52bb6 100644 (file)
@@ -69,6 +69,7 @@ enum
   V4L2_STD_OBJECT_PROPS,
 };
 
+#if 0
 G_LOCK_DEFINE_STATIC (probe_lock);
 
 const GList *
@@ -290,6 +291,7 @@ gst_v4l2_probe_get_values (GstPropertyProbe * probe,
 
   return array;
 }
+#endif
 
 #define GST_TYPE_V4L2_DEVICE_FLAGS (gst_v4l2_device_get_type ())
 static GType
index 8134818..1b15627 100644 (file)
@@ -51,7 +51,6 @@
 #include <gst/base/gstpushsrc.h>
 
 #include <gst/video/video.h>
-#include <gst/interfaces/propertyprobe.h>
 
 typedef struct _GstV4l2Object GstV4l2Object;
 typedef struct _GstV4l2ObjectClassHelper GstV4l2ObjectClassHelper;
@@ -201,6 +200,7 @@ gboolean  gst_v4l2_object_open               (GstV4l2Object *v4l2object);
 gboolean  gst_v4l2_object_close              (GstV4l2Object *v4l2object);
 
 /* probing */
+#if 0
 const GList* gst_v4l2_probe_get_properties  (GstPropertyProbe * probe);
 
 void         gst_v4l2_probe_probe_property  (GstPropertyProbe * probe, guint prop_id,
@@ -212,6 +212,7 @@ gboolean     gst_v4l2_probe_needs_probe     (GstPropertyProbe * probe, guint pro
 GValueArray* gst_v4l2_probe_get_values      (GstPropertyProbe * probe, guint prop_id,
                                              const GParamSpec * pspec,
                                              GList ** klass_devices);
+#endif
 
 GstCaps*      gst_v4l2_object_probe_caps_for_format (GstV4l2Object *v4l2object, guint32 pixelformat,
                                              const GstStructure * template);
index d6f7c8f..bfae360 100644 (file)
@@ -251,7 +251,6 @@ gst_v4l2radio_set_unmute (GstV4l2Radio * radio)
   return gst_v4l2radio_set_mute_on (radio, FALSE);
 }
 
-GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2RadioClass, gst_v4l2radio);
 GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Radio, gst_v4l2radio);
 
 static void gst_v4l2radio_uri_handler_init (gpointer g_iface,
@@ -268,9 +267,7 @@ G_DEFINE_TYPE_WITH_CODE (GstV4l2Radio, gst_v4l2radio, GST_TYPE_ELEMENT,
     G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER,
         gst_v4l2radio_uri_handler_init);
     G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER,
-        gst_v4l2radio_tuner_interface_reinit);
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_v4l2radio_property_probe_interface_init));
+        gst_v4l2radio_tuner_interface_reinit));
 
 static void gst_v4l2radio_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
index e80f5b9..5e1e2d0 100644 (file)
@@ -87,7 +87,6 @@ enum
 };
 
 
-GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2SinkClass, gst_v4l2sink);
 GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink);
 GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Sink, gst_v4l2sink);
 #ifdef HAVE_XVIDEO
@@ -116,9 +115,7 @@ G_DEFINE_TYPE_WITH_CODE (GstV4l2Sink, gst_v4l2sink, GST_TYPE_VIDEO_SINK,
     G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
         gst_v4l2sink_color_balance_interface_init);
     G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION,
-        gst_v4l2sink_video_orientation_interface_init);
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_v4l2sink_property_probe_interface_init));
+        gst_v4l2sink_video_orientation_interface_init));
 
 
 static void gst_v4l2sink_dispose (GObject * object);
index e2464f5..d9bb060 100644 (file)
@@ -80,7 +80,6 @@ enum
   PROP_DECIMATE
 };
 
-GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2SrcClass, gst_v4l2src);
 GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Src, gst_v4l2src);
 GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Src, gst_v4l2src);
 #ifdef HAVE_XVIDEO
@@ -103,9 +102,7 @@ G_DEFINE_TYPE_WITH_CODE (GstV4l2Src, gst_v4l2src, GST_TYPE_PUSH_SRC,
     G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
         gst_v4l2src_color_balance_interface_init);
     G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION,
-        gst_v4l2src_video_orientation_interface_init);
-    G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
-        gst_v4l2src_property_probe_interface_init));
+        gst_v4l2src_video_orientation_interface_init));
 
 static void gst_v4l2src_dispose (GObject * object);
 static void gst_v4l2src_finalize (GstV4l2Src * v4l2src);
index 54c1a87..c823163 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <gst/gst.h>
 
+#if 0
 #include <gst/interfaces/propertyprobe.h>
 
 static void
@@ -57,14 +58,17 @@ test_element (const gchar * name)
   gst_element_set_state (element, GST_STATE_NULL);
   gst_object_unref (GST_OBJECT (element));
 }
+#endif
 
 int
 main (int argc, char *argv[])
 {
   gst_init (&argc, &argv);
 
+#if 0
   test_element ("pulsesink");
   test_element ("pulsesrc");
+#endif
 
   return 0;
 }
index 7db85d4..3f80c9e 100644 (file)
@@ -1,10 +1,5 @@
-noinst_PROGRAMS = probe camctrl
+noinst_PROGRAMS = camctrl
 
 camctrl_SOURCES = camctrl.c
 camctrl_CFLAGS  = $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
 camctrl_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS)
-
-probe_SOURCES = probe.c
-probe_CFLAGS  = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_LIBS)
-
diff --git a/tests/examples/v4l2/probe.c b/tests/examples/v4l2/probe.c
deleted file mode 100644 (file)
index 169288a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* GStreamer
- * Copyright (C) 2009 Filippo Argiolas <filippo.argiolas@gmail.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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <stdlib.h>
-#include <gst/gst.h>
-#include <gst/interfaces/propertyprobe.h>
-
-int
-main (int argc, char *argv[])
-{
-  GstElement *src, *sink;
-  GstElement *bin;
-  GstPropertyProbe *probe = NULL;
-  const GParamSpec *pspec = NULL;
-  GValueArray *array = NULL;
-  gint i, ret;
-  GValue *value;
-  const gchar *device;
-  gchar *name;
-  guint flags;
-
-  gst_init (&argc, &argv);
-
-  bin = gst_pipeline_new ("pipeline");
-  g_assert (bin);
-
-  src = gst_element_factory_make ("v4l2src", "v4l2_source");
-  g_assert (src);
-  sink = gst_element_factory_make ("fakesink", "fake_sink");
-  g_assert (sink);
-
-  /* add objects to the main pipeline */
-  gst_bin_add_many (GST_BIN (bin), src, sink, NULL);
-  /* link the elements */
-  gst_element_link_many (src, sink, NULL);
-
-  /* probe devices */
-  g_print ("Probing devices with propertyprobe...\n");
-  probe = GST_PROPERTY_PROBE (src);
-  pspec = gst_property_probe_get_property (probe, "device");
-  array = gst_property_probe_probe_and_get_values (probe, pspec);
-
-  if (!array) {
-    g_print ("No device found\n");
-    exit (1);
-  }
-
-  for (i = 0; i < array->n_values; i++) {
-    value = g_value_array_get_nth (array, i);
-    device = g_value_get_string (value);
-    g_print ("Device: %s\n", device);
-    g_object_set_property (G_OBJECT (src), "device", value);
-    gst_element_set_state (bin, GST_STATE_READY);
-    ret = gst_element_get_state (bin, NULL, NULL, 10 * GST_SECOND);
-    if (ret != GST_STATE_CHANGE_SUCCESS) {
-      g_print ("Couldn't set STATE_READY\n");
-      continue;
-    }
-    g_object_get (G_OBJECT (src), "device-name", &name, NULL);
-    g_print ("Name: %s\n", name);
-    g_free (name);
-    g_object_get (G_OBJECT (src), "flags", &flags, NULL);
-    g_print ("Flags: 0x%08X\n", flags);
-    gst_element_set_state (bin, GST_STATE_NULL);
-    g_print ("\n");
-  }
-
-  exit (0);
-}