proxy: Set SOURCE flag on the source and SINK flag on the sink

So that they are properly recognized as such.
This commit is contained in:
Sebastian Dröge 2019-05-21 16:03:21 +03:00 committed by Sebastian Dröge
parent 7820109b88
commit 70b08bdbfa
2 changed files with 6 additions and 0 deletions

View file

@ -97,6 +97,8 @@ gst_proxy_sink_init (GstProxySink * self)
gst_pad_set_query_function (self->sinkpad,
GST_DEBUG_FUNCPTR (gst_proxy_sink_sink_query));
gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);
GST_OBJECT_FLAG_SET (self, GST_ELEMENT_FLAG_SINK);
}
static GstStateChangeReturn

View file

@ -226,6 +226,10 @@ gst_proxy_src_init (GstProxySrc * self)
sinkpad = gst_element_get_static_pad (self->queue, "sink");
gst_pad_link (self->internal_srcpad, sinkpad);
gst_object_unref (sinkpad);
gst_bin_set_suppressed_flags (GST_BIN (self),
GST_ELEMENT_FLAG_SOURCE | GST_ELEMENT_FLAG_SINK);
GST_OBJECT_FLAG_SET (self, GST_ELEMENT_FLAG_SOURCE);
}
static void