Custom GstBaseSrc can not link to FakeSink Pipeline Error

adam at aeb.io adam at aeb.io
Wed Dec 14 23:28:51 UTC 2022


Hello,

I am writing a custom plugin that is extending GstBaseSrc class so it 
can read data off our system. I am using the generated template from 
gst-element-maker in gst-plugins-bad/tools as a starting point. No 
matter what I do, I can not get or our custom GstBaseSrc code to work 
with fakesink, decodebin, autovideosink, etc.

Removing all our custom implementation and sticking with a code 
generated by `gst-element-maker adamsrc basesrc` results same error we 
are seeing with our custom code and that error is at end of email.

   * Any idea on how to get our custom GstBaseSrc code to work?
   * Do I have to register some sort of signal / callback for our custom 
GstBaseSrc class?
   * Any idea why the code provided by gst-element-maker adamsrc basesrc 
doesn't work as is with a plugin?
     (the basesink worked just fine)

Thanks!
-Adam


$ GST_DEBUG=DEBUG gst-launch-1.0 -v adamsrc ! fakesink sync=false

... lines emitted ...

:00:00.013226485  4512 0x557584de9e00 INFO     GST_ELEMENT_FACTORY 
gstelementfactory.c:489:gst_element_factory_create_with_properties: 
creating element "pipeline"
0:00:00.013289400  4512 0x557584de9e00 INFO            GST_PIPELINE 
subprojects/gstreamer/gst/parse/grammar.y:683:gst_parse_perform_link: 
linking some pad of GstAdamSrc named adamsrc0 to some pad of GstFakeSink 
named fakesink0 (0/0) with caps "(NULL)"
0:00:00.013308491  4512 0x557584de9e00 INFO        GST_ELEMENT_PADS 
gstutils.c:1816:gst_element_link_pads_full: trying to link element 
adamsrc0:(any) to element fakesink0:(any)
0:00:00.013317025  4512 0x557584de9e00 INFO                GST_PADS 
gstutils.c:1079:gst_pad_check_link: trying to link adamsrc0:src and 
fakesink0:sink

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.061: 
gst_mini_object_ref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_unref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_ref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_pad_template_new: assertion 'caps != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_unref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE 
(templ)' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_object_unref: assertion 'object != NULL' failed
0:00:00.013433633  4512 0x557584de9e00 INFO        GST_ELEMENT_PADS 
gstutils.c:1270:gst_element_get_compatible_pad:<fakesink0> Could not 
find a compatible pad to link to adamsrc0:src
0:00:00.013440452  4512 0x557584de9e00 INFO                GST_PADS 
gstutils.c:1079:gst_pad_check_link: trying to link adamsrc0:src and 
fakesink0:sink

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_ref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_unref: assertion 'mini_object != NULL' failed
0:00:00.013483474  4512 0x557584de9e00 INFO        GST_ELEMENT_PADS 
gstelement.c:1016:gst_element_get_static_pad: found pad adamsrc0:src
0:00:00.013490451  4512 0x557584de9e00 INFO                GST_PADS 
gstutils.c:1632:prepare_link_maybe_ghosting: adamsrc0 and fakesink0 in 
same bin, no need for ghost pads
0:00:00.013499389  4512 0x557584de9e00 INFO                GST_PADS 
gstpad.c:2382:gst_pad_link_prepare: trying to link adamsrc0:src and 
fakesink0:sink

(gst-launch-1.0:4512): GStreamer-CRITICAL **: 15:16:36.062: 
gst_mini_object_ref: assertion 'mini_object != NULL' failed
0:00:00.013513230  4512 0x557584de9e00 INFO                GST_PADS 
gstpad.c:2439:gst_pad_link_prepare: caps are incompatible
0:00:00.013517920  4512 0x557584de9e00 INFO                GST_PADS 
gstpad.c:2532:gst_pad_link_full: link between adamsrc0:src and 
fakesink0:sink failed: no common format
0:00:00.013524298  4512 0x557584de9e00 INFO                 default 
gstutils.c:2206:gst_element_link_pads_filtered: Could not link pads: 
adamsrc0:(null) - fakesink0:(null)
0:00:00.013529492  4512 0x557584de9e00 ERROR           GST_PIPELINE 
subprojects/gstreamer/gst/parse/grammar.y:773:gst_parse_perform_link: 
could not link adamsrc0 to fakesink0
WARNING: erroneous pipeline: could not link adamsrc0 to fakesink0


More information about the gstreamer-devel mailing list