summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2017-02-17 16:09:53 +0530
committerArun Raghavan <arun@arunraghavan.net>2017-02-23 00:36:57 +0530
commit20d8b04f11ec258bbc552a6dfb3bde2d343d3dfb (patch)
tree37ffc4ae89c3c4bab45e90c0a739c15e8f5be031
parentfb2e63c468321a1691e06c5aad22df7559e1bd54 (diff)
downloadgstreamer-plugins-bad-20d8b04f11ec258bbc552a6dfb3bde2d343d3dfb.tar.gz
bluez: Chain up to basesrc query instead of override pad query function
Overriding the pad query function completely overrides all the default query handling implemented in basesrc, including caps etc. The correct thing to do is just override the basesrc query vfunc and then chain up for the queries we don't handle.
-rw-r--r--sys/bluez/gstavdtpsrc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/bluez/gstavdtpsrc.c b/sys/bluez/gstavdtpsrc.c
index 1c68e4536..6ca6320be 100644
--- a/sys/bluez/gstavdtpsrc.c
+++ b/sys/bluez/gstavdtpsrc.c
@@ -68,8 +68,7 @@ static void gst_avdtp_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static GstCaps *gst_avdtp_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter);
-static gboolean gst_avdtp_src_query (GstPad * pad, GstObject * parent,
- GstQuery * query);
+static gboolean gst_avdtp_src_query (GstBaseSrc * bsrc, GstQuery * query);
static gboolean gst_avdtp_src_start (GstBaseSrc * bsrc);
static gboolean gst_avdtp_src_stop (GstBaseSrc * bsrc);
static GstFlowReturn gst_avdtp_src_create (GstBaseSrc * bsrc, guint64 offset,
@@ -96,6 +95,7 @@ gst_avdtp_src_class_init (GstAvdtpSrcClass * klass)
basesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_avdtp_src_unlock);
basesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_avdtp_src_unlock_stop);
basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_avdtp_src_getcaps);
+ basesrc_class->query = GST_DEBUG_FUNCPTR (gst_avdtp_src_query);
g_object_class_install_property (gobject_class, PROP_TRANSPORT,
g_param_spec_string ("transport",
@@ -124,9 +124,6 @@ gst_avdtp_src_init (GstAvdtpSrc * avdtpsrc)
gst_base_src_set_format (GST_BASE_SRC (avdtpsrc), GST_FORMAT_TIME);
gst_base_src_set_live (GST_BASE_SRC (avdtpsrc), TRUE);
gst_base_src_set_do_timestamp (GST_BASE_SRC (avdtpsrc), TRUE);
-
- gst_pad_set_query_function (GST_BASE_SRC_PAD (avdtpsrc),
- GST_DEBUG_FUNCPTR (gst_avdtp_src_query));
}
static void
@@ -177,9 +174,9 @@ gst_avdtp_src_set_property (GObject * object, guint prop_id,
}
static gboolean
-gst_avdtp_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_avdtp_src_query (GstBaseSrc * bsrc, GstQuery * query)
{
- GstAvdtpSrc *avdtpsrc = GST_AVDTP_SRC (gst_pad_get_parent_element (pad));
+ GstAvdtpSrc *avdtpsrc = GST_AVDTP_SRC (bsrc);
gboolean ret = FALSE;
switch (GST_QUERY_TYPE (query)) {
@@ -199,7 +196,7 @@ gst_avdtp_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
default:
- ret = gst_pad_query_default (pad, parent, query);
+ ret = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
}
return ret;