Ghost pad for a source in pull mode

Tony Houghton h at realh.co.uk
Wed Sep 30 20:59:29 UTC 2020


I'm writing a manager element (derived from GstBin) that, at the moment,
contains only a source element, derived from GstBaseSrc and based heavily
on GstFileSrc. I've confirmed the source works in a playbin with
gst-launch, but I've run into a problem using it as the only child of my
bin. The bin is a GstUriHandler and creates the child src when a URI is
set. At that point it creates a ghost pad with the src's static pad as its
target, and adds the ghost to the bin. But I get this error:

(gjs:76527): GStreamer-CRITICAL **: 20:25:37.143: getrange on pad
source:ts_src but it was not activated in pull mode

"ts_src" is the name of the ghost pad.

According to the Different scheduling modes chapter of the plugin writer's
guide
<https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/scheduling.html?gi-language=c>
a
pad can support pull mode if it has a get_range function, so I tried adding
one to the ghost which calls gst_pad_get_range() on its target, but it
didn't make any difference.

The same page says push mode is the default and this can be changed by
overriding the activate function, but the API docs for
gst_pad_set_activate_function_full
<https://thiblahute.github.io/GStreamer-doc/libgstreamer-1.0/gstpad.html?gi-language=c#gst_pad_set_activate_function_full>
say: "Only makes sense to set on sink pads." So I don't think I can simply
override the ghost pad's activate function. The ghost pad has a proxy pad
in the reverse direction (a sink in this case), but that in turn has an
unexplained internal pad, so I'm getting lost down a rabbit hole.

Can anybody help? I feel like this should just work, so is it actually a
bug in ghost pads, or at least a known limitation?

-- 
TH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200930/c1de2791/attachment.htm>


More information about the gstreamer-devel mailing list