gstreamermm: difficulties with hooking up GstTypeFindElement "have-type" signal

László Károlyi laszlo at karolyi.hu
Wed Dec 22 14:01:39 UTC 2021


Hey,

I'm not sure where to send my problem to, as I've tried #gstreamer on 
irc.gnome.org, then on irc.oftc.net where I had my nick registered but 
even then, I was unable to talk in the #gstreamer channel, which has the 
topic "Moved to OFTC: please join #gstreamer on irc.oftc.net", on 
irc.oftc.net. Weird.

Excuse me if I don't get everything right, but I'm not an advanced c++ 
programmer, I struggle to untangle stuff that I find, with more or less 
success so far.

So here's my situation: I'm writing a small icecast source in c++ with 
using gstreamermm, and out of curiosity I wanted to try the typefind 
plugin. It's got a "have-type" signal, which I hooked up according to 
its documentation from gstreamer, by inspecting the plugin:

   "have-type" :  void user_function (GstElement* object,
                                      guint arg0,
                                      GstCaps* arg1,
                                      gpointer user_data);

After having created the function with this signature, compilation fails 
with complaints that the signature is not the one requested from the 
connect() method. Having looked into 
https://gitlab.gnome.org/GNOME/gstreamermm/-/blob/master/examples/typefind/main.cc#L117-133, 
it seems that the function needs to have a completely different 
signature, which I don't understand why. (Also, as a side note, I have 
no idea what the compile flag GSTREAMERMM_DISABLE_DEPRECATED means, but 
the "deprecated" syntax seems way more easily understandable to me).

I started looking into the gstreamermm source, and the only thing I 
could find about the function signature that is requested for the 
"have-type" signal is here: 
https://gitlab.gnome.org/GNOME/gstreamermm/-/blob/master/gstreamer/src/gst_signals.defs#L1370-1380. 
Which still doesn't make much sense as it is pretty different compared 
to the one the gstreamer module uses.

Could someone please enlighten me as to how this is actually used, and 
why it's not used in the same way (as in function signature) as in 
gstreamermm?

-- 
Mit freundlichen Grüßen / Best Regards,
László Károlyi
https://linkedin.com/in/karolyi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x2DCAF25E55735BFE.asc
Type: application/pgp-keys
Size: 14465 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211222/32df4a13/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211222/32df4a13/attachment.sig>


More information about the gstreamer-devel mailing list