WIP: mpegts: Generate the Rust-side of the MPEG-TS library given the newly introduced boxed types
With the boxed types added to the MPEG-TS library in gst-plugins-bad, the Rust bindings need updating. The gstreamer-sys side has been updated, this WIP MR is about the gstreamer-rs side.
Currently there seem to be some issues with gir such that the generated code will not compile.
|> gir -c Gir_GstMpegts.toml -d gir-files -o gstreamer-mpegts/
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_ca_identifier has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_content has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_frequency_list has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_multilingual_component has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_multilingual_network_name has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_multilingual_service_name has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_parental_rating has unsupported outs
WARN 2018-11-09T11:41:13Z: libgir::analysis::functions: Function gst_mpegts_descriptor_parse_dvb_service_list has unsupported outs
and on compilation:
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/descriptor.rs:44:128
|
44 | let ret = from_glib(ffi::gst_mpegts_descriptor_parse_ca(self.to_glib_none_mut().0, &mut ca_system_id, &mut ca_pid, &mut private_data, &mut private_data_size));
| ^^^^^^^^^^^^^^^^^
| |
| types differ in mutability
| help: consider removing the borrow: `private_data`
|
= note: expected type `*mut *const u8`
found type `&mut *mut _`
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/descriptor.rs:201:27
|
201 | if ret { Some(stuffing_bytes) } else { None }
| ^^^^^^^^^^^^^^ expected u8, found *-ptr
|
= note: expected type `u8`
found type `*mut u8`
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/section.rs:139:14
|
139 | (ret, output_size)
| ^^^ expected u8, found *-ptr
|
= note: expected type `u8`
found type `*mut u8`
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/section.rs:150:61
|
150 | from_glib_full(ffi::gst_mpegts_section_from_nit(nit.to_glib_full()))
| ^^^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected type `*mut ffi::GstMpegtsNIT`
found type `*const ffi::GstMpegtsNIT`
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/section.rs:161:61
|
161 | from_glib_full(ffi::gst_mpegts_section_from_pmt(pmt.to_glib_full(), pid))
| ^^^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected type `*mut ffi::GstMpegtsPMT`
found type `*const ffi::GstMpegtsPMT`
error[E0308]: mismatched types
--> gstreamer-mpegts/src/auto/section.rs:168:61
|
168 | from_glib_full(ffi::gst_mpegts_section_from_sdt(sdt.to_glib_full()))
| ^^^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected type `*mut ffi::GstMpegtsSDT`
found type `*const ffi::GstMpegtsSDT`
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `gstreamer-mpegts`.