[pulseaudio-discuss] GStreamer pulsesrc issue (with patch suggestion)

Erik Botö erik.boto at pelagicore.com
Wed Jun 15 04:09:54 PDT 2011


Hi,

The reason I'm sending this mail here is that the gst-pulse-plugins
are shipped in the ext/ dir in gst-plugins-good and I figured that it
might belong here.

I've run into a problem with using pulsesrc and findtype in gstreamer,
and found this bug which describes the same issue:
https://bugzilla.gnome.org/show_bug.cgi?id=634927.

If I patch my version of pulsesrc with the following patch it works ok
for me, but since I'm not that familiar with gstreamer I'm not sure if
I might be breaking some other use case. So I was wondering what your
thoughts on this is? And where should I be sending patch suggestions
on the gst-pulse stuff?

Cheers,
Erik Botö


--- gst-plugins-good0.10-0.10.28/ext/pulse/pulsesrc.c   2011-03-08
14:54:34.000000000 +0100
+++ gst-plugins-good0.10-0.10.28_fix/ext/pulse/pulsesrc.c
2011-06-15 08:32:10.216748002 +0200
@@ -69,6 +69,7 @@
 static void gst_pulsesrc_destroy_stream (GstPulseSrc * pulsesrc);
 static void gst_pulsesrc_destroy_context (GstPulseSrc * pulsesrc);

+static gboolean gst_pulse_src_check_get_range (GstBaseSrc * bsrc);
 static void gst_pulsesrc_set_property (GObject * object, guint prop_id,
    const GValue * value, GParamSpec * pspec);
 static void gst_pulsesrc_get_property (GObject * object, guint prop_id,
@@ -221,6 +222,12 @@

  gstbasesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_pulsesrc_negotiate);

+  /* Override the check_get_range from GstBaseSrc in order to avoid
+     that the src gets activated in pull mode which causes a deadlock
+     when typefinding, see https://bugzilla.gnome.org/show_bug.cgi?id=634927 */
+  gstbasesrc_class->check_get_range =
+      GST_DEBUG_FUNCPTR (gst_pulse_src_check_get_range);
+
  gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_pulsesrc_open);
  gstaudiosrc_class->close = GST_DEBUG_FUNCPTR (gst_pulsesrc_close);
  gstaudiosrc_class->prepare = GST_DEBUG_FUNCPTR (gst_pulsesrc_prepare);
@@ -1309,3 +1316,10 @@

  return ret;
 }
+
+static gboolean
+gst_pulse_src_check_get_range (GstBaseSrc * bsrc)
+{
+  return FALSE;
+}
+


More information about the pulseaudio-discuss mailing list