Why GstAutoplugSelectResult is not export?

I found autoplug-select signal callback return a GstAutoplugSelectResult. But GstAutoplugSelectResult is not in “gst.h”. How can I use this signal?
After googling, I found a example using GstAutoplugSelectResult, It just redefine the GstAutoplugSelectResult. Is this the right thing to do?

Yes that’s the correct thing to do, or using the GEnumClass API but that’s more complicated.

Types from plugins are never exported, plugins don’t come with C headers.

Since the plugin should not introduce new type, why not just return int?

That’s what it basically is now: an integer with a limited range and you can check at runtime which values are allowed and what their meaning is.

But the specific enum type is not exported, so to use it, you have to define a new one by querying the docs, so why bother? It’s easier to just query the documentation.

You can also just use an integer in your code if you prefer that.