GstMeta GTypes - API vs implementation?

Neil C Smith neil at codelerity.com
Wed Oct 7 14:59:06 UTC 2020


On Tue, 6 Oct 2020 at 18:38, Mathieu Duponchelle
<mathieu at centricular.com> wrote:
> The impl vs. API GType situation is very confusing indeed, in my understanding
> that design was never used in practice, Wim could probably give more background
> about that I reckon.

Yes, definitely confusing!  Thanks for getting back to me.

> I know this doesn't directly answer your question, but we've recently merged a
> custom meta API that should be enough for 99% of the GstMeta use cases:

Saw that in the docs - looks interesting, and something that we'll
look to add support for.

> I would also recommend you take a look at how GstMeta was wrapped in rust,
> that might give you some more insight :)

Yes, I often refer to Rust and C# bindings, and looking to get more
aligned - at some point given time/resources we'll be moving to
auto-generation, and new additions tend to be made with that in mind.

So, with regard to Rust and Meta, the code eg. here seems to imply
that the MetaAPI type is 1-to-1 mapped to the implementation type by
MetaAPI::GstType?  My Rust-fu is limited still!

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/master/gstreamer/src/buffer.rs#L399
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/master/gstreamer-video/src/video_meta.rs#L222

That's a sort of pattern we could work with, as long as it's
guaranteed to hold in all cases?

Thanks,

Neil


-- 
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : Office 4 219 Kensington High Street,
Kensington, London, England, W8 6BD


More information about the gstreamer-devel mailing list