Creating a Rust binding for MPEG-TS

Sebastian Dröge sebastian at centricular.com
Tue May 8 07:13:22 UTC 2018


Hi Russel,

On Mon, 2018-05-07 at 19:02 +0100, Russel Winder wrote:
> Hi,
> 
> I am progressing trying to create a Rust binding for MPEG-TS, D has one so
> Rust should as well. I seem to have a skeleton which is beginning to look
> half-way reasonable. However, for some synbols I am getting a fail in gir. For
> example:
> 
> thread 'main' panicked at 'Missing memory management functions for GstMpegts.DVBServiceListItem', src/codegen/record.rs:61:9

That's because it has no copy/free or ref/unref function. You'd need to
manually bind this one, i.e. add it to the manual section in the toml
file and write some code for it.

> Commenting out from the Gir_GstMpegts.toml file all the symbols that cause
> this problem creates a reasonable set of files in gstreamer-mpegts/auto so the
> skeleton seems not broken.

You start by white-listing types one-by-one as needed and then make
sure for each that something reasonable is generated. Don't start with
everything at once as manual changes will be needed.

> Anyone any ideas why gir might be panicing at that point before I go digging
> starting from no knowledge?
> 
> Another problem fr some other symbols is:
> 
> WARN 2018-05-07T17:51:00Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_ca_identifier has unsupported outs
> 
> Again before I go digging from a position of zero knowledge does anyone have
> any hints or advice to help speed things up for me?

GArray out parameters are not supported yet by gir and would have to be
added. Related https://github.com/gtk-rs/gir/issues/594

Features are only added to gir when someone actually needs them.


In general, the gtk-rs gitter chat would be a better place to discuss
issues with the gir code generator.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180508/4e2b7aa8/attachment.sig>


More information about the gstreamer-devel mailing list