diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index 1148c8621..0dcb30033 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -27,6 +27,7 @@ once_cell = "1.0" [dev-dependencies] futures-util = { version = "0.3", features = ["sink"] } futures-executor = "0.3" +gir-format-check = "0.1" [features] default = [] diff --git a/gstreamer-app/Gir.toml b/gstreamer-app/Gir.toml index c97ec5b00..a3576dfc4 100644 --- a/gstreamer-app/Gir.toml +++ b/gstreamer-app/Gir.toml @@ -22,13 +22,33 @@ generate = [ manual = [ "GObject.Object", - "Gst.Object", "Gst.Element", - "Gst.URIHandler", "Gst.Format", "Gst.MiniObject", + "Gst.Object", + "Gst.URIHandler", ] +[[object]] +name = "Gst.Buffer" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.BufferList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.ClockTime" +status = "manual" +conversion_type = "Option" + [[object]] name = "Gst.FlowReturn" status = "manual" @@ -38,6 +58,16 @@ must_use = true ok_type = "gst::FlowSuccess" err_type = "gst::FlowError" +[[object]] +name = "Gst.Sample" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" + [[object]] name = "GstApp.AppSink" status = "generate" @@ -209,33 +239,3 @@ final_type = true [[object.function.parameter]] name = "caps" nullable = true - -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Caps" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Buffer" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.BufferList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Sample" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" diff --git a/gstreamer-app/tests/check_gir.rs b/gstreamer-app/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-app/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 23ad25175..f61dc3cb9 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -26,6 +26,7 @@ once_cell = "1.0" [dev-dependencies] itertools = "0.10" +gir-format-check = "0.1" [features] default = [] diff --git a/gstreamer-audio/Gir.toml b/gstreamer-audio/Gir.toml index 29556ff69..f6507086d 100644 --- a/gstreamer-audio/Gir.toml +++ b/gstreamer-audio/Gir.toml @@ -17,17 +17,17 @@ external_libraries = [ ] generate = [ + "GstAudio.AudioBaseSrc", + "GstAudio.AudioChannelPosition", "GstAudio.AudioDitherMethod", - "GstAudio.AudioNoiseShapingMethod", - "GstAudio.AudioResamplerMethod", "GstAudio.AudioFormatFlags", "GstAudio.AudioLayout", - "GstAudio.AudioChannelPosition", - "GstAudio.StreamVolume", - "GstAudio.StreamVolumeFormat", + "GstAudio.AudioNoiseShapingMethod", + "GstAudio.AudioResamplerMethod", "GstAudio.AudioSink", "GstAudio.AudioSrc", - "GstAudio.AudioBaseSrc", + "GstAudio.StreamVolume", + "GstAudio.StreamVolumeFormat", ] manual = [ @@ -39,37 +39,37 @@ manual = [ "Gst.Format", "Gst.TagList", "Gst.TagMergeMode", - "GstBase.BaseSink", - "GstBase.BaseSrc", "GstAudio.AudioClippingMeta", "GstAudio.AudioFormatInfo", "GstAudio.AudioInfo", "GstAudio.AudioLevelMeta", "GstAudio.AudioMeta", "GstAudio.AudioRingBufferSpec", + "GstBase.BaseSink", + "GstBase.BaseSrc", ] -[[object]] -name = "Gst.Object" -# For renaming the trait... -status = "manual" -trait_name = "GstObjectExt" - -[[object]] -name = "Gst.Caps" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" ref_mode = "ref" +[[object]] +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" + [[object]] name = "Gst.ClockTime" status = "manual" conversion_type = "Option" +[[object]] +name = "Gst.Object" +# For renaming the trait... +status = "manual" +trait_name = "GstObjectExt" + [[object]] name = "GstAudio.AudioBaseSink" status = "generate" @@ -105,154 +105,6 @@ status = "manual" # Readable and writable variant dealing with mutability rename = "from_buffer_readable" -[[object]] -name = "GstAudio.AudioFormat" -status = "generate" - - [[object.derive]] - name = "Debug, Eq, PartialEq, Hash" - - [[object.member]] - name = "s16" - # Platform dependant - manual = true - - [[object.member]] - name = "u16" - # Platform dependant - manual = true - - [[object.member]] - name = "s24_32" - # Platform dependant - manual = true - - [[object.member]] - name = "u24_32" - # Platform dependant - manual = true - - [[object.member]] - name = "s32" - # Platform dependant - manual = true - - [[object.member]] - name = "u32" - # Platform dependant - manual = true - - [[object.member]] - name = "s24" - # Platform dependant - manual = true - - [[object.member]] - name = "u24" - # Platform dependant - manual = true - - [[object.member]] - name = "s20" - # Platform dependant - manual = true - - [[object.member]] - name = "u20" - # Platform dependant - manual = true - - [[object.member]] - name = "s18" - # Platform dependant - manual = true - - [[object.member]] - name = "u18" - # Platform dependant - manual = true - - [[object.member]] - name = "f32" - # Platform dependant - manual = true - - [[object.member]] - name = "f64" - # Platform dependant - manual = true - - [[object.function]] - name = "to_string" - # This has an Unknown field that may return NULL or "UNKNOWN" - manual = true - [object.function.return] - nullable = false - - [[object.function]] - name = "fill_silence" - # Function does not belong in AudioFormat but AudioFormatInfo. - # Manual implementation is available, and glib argument conversion - # is broken. - manual = true - - [[object.function]] - name = "get_info" - # Result is not nullable, function does effectively the same - # as AudioFormatInfo::from_format() - ignore = true - - [[object.function]] - name = "build_integer" - # Use custom AudioEndianness enum - manual = true - -[[object]] -name = "GstAudio.AudioStreamAlign" -status = "generate" - - [[object.function]] - name = "process" - # bool does not signal error - manual = true - - [[object.function]] - pattern = "get_.*" - [[object.function.parameter]] - name = "align" - const = true - - [[object.function]] - name = "new" - [[object.function.parameter]] - name = "alignment_threshold" - mandatory = true - [[object.function.parameter]] - name = "discont_wait" - mandatory = true - - [[object.function]] - name = "get_alignment_threshold" - [object.function.return] - mandatory = true - - [[object.function]] - name = "get_discont_wait" - [object.function.return] - mandatory = true - - [[object.function]] - name = "set_alignment_threshold" - [[object.function.parameter]] - name = "alignment_threshold" - mandatory = true - - [[object.function]] - name = "set_discont_wait" - [[object.function.parameter]] - name = "discont_wait" - mandatory = true - [[object]] name = "GstAudio.AudioDecoder" status = "generate" @@ -380,6 +232,122 @@ manual_traits = ["AudioEncoderExtManual"] [object.function.return] nullable_return_is_error = "Failed to allocate output buffer" +[[object]] +name = "GstAudio.AudioFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "GstAudio.AudioFormat" +status = "generate" + + [[object.derive]] + name = "Debug, Eq, PartialEq, Hash" + + [[object.member]] + name = "s16" + # Platform dependant + manual = true + + [[object.member]] + name = "u16" + # Platform dependant + manual = true + + [[object.member]] + name = "s24_32" + # Platform dependant + manual = true + + [[object.member]] + name = "u24_32" + # Platform dependant + manual = true + + [[object.member]] + name = "s32" + # Platform dependant + manual = true + + [[object.member]] + name = "u32" + # Platform dependant + manual = true + + [[object.member]] + name = "s24" + # Platform dependant + manual = true + + [[object.member]] + name = "u24" + # Platform dependant + manual = true + + [[object.member]] + name = "s20" + # Platform dependant + manual = true + + [[object.member]] + name = "u20" + # Platform dependant + manual = true + + [[object.member]] + name = "s18" + # Platform dependant + manual = true + + [[object.member]] + name = "u18" + # Platform dependant + manual = true + + [[object.member]] + name = "f32" + # Platform dependant + manual = true + + [[object.member]] + name = "f64" + # Platform dependant + manual = true + + [[object.function]] + name = "to_string" + # This has an Unknown field that may return NULL or "UNKNOWN" + manual = true + [object.function.return] + nullable = false + + [[object.function]] + name = "fill_silence" + # Function does not belong in AudioFormat but AudioFormatInfo. + # Manual implementation is available, and glib argument conversion + # is broken. + manual = true + + [[object.function]] + name = "get_info" + # Result is not nullable, function does effectively the same + # as AudioFormatInfo::from_format() + ignore = true + + [[object.function]] + name = "build_integer" + # Use custom AudioEndianness enum + manual = true + +[[object]] +name = "GstAudio.AudioPackFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + [[object]] name = "GstAudio.AudioRingBufferFormatType" status = "generate" @@ -397,15 +365,47 @@ status = "generate" version = "1.12" [[object]] -name = "GstAudio.AudioFlags" +name = "GstAudio.AudioStreamAlign" status = "generate" - [[object.member]] - name = "none" - ignore = true -[[object]] -name = "GstAudio.AudioPackFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true + [[object.function]] + name = "process" + # bool does not signal error + manual = true + + [[object.function]] + pattern = "get_.*" + [[object.function.parameter]] + name = "align" + const = true + + [[object.function]] + name = "new" + [[object.function.parameter]] + name = "alignment_threshold" + mandatory = true + [[object.function.parameter]] + name = "discont_wait" + mandatory = true + + [[object.function]] + name = "get_alignment_threshold" + [object.function.return] + mandatory = true + + [[object.function]] + name = "get_discont_wait" + [object.function.return] + mandatory = true + + [[object.function]] + name = "set_alignment_threshold" + [[object.function.parameter]] + name = "alignment_threshold" + mandatory = true + + [[object.function]] + name = "set_discont_wait" + [[object.function.parameter]] + name = "discont_wait" + mandatory = true diff --git a/gstreamer-audio/tests/check_gir.rs b/gstreamer-audio/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-audio/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index f66db195c..c4d78d818 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -21,6 +21,9 @@ ffi = { package = "gstreamer-base-sys", path = "sys", features = ["v1_8"] } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-base/Gir.toml b/gstreamer-base/Gir.toml index 57807e98c..e4126d30e 100644 --- a/gstreamer-base/Gir.toml +++ b/gstreamer-base/Gir.toml @@ -17,8 +17,8 @@ external_libraries = [ ] generate = [ - "GstBase.PushSrc", "GstBase.AggregatorStartTimeSelection", + "GstBase.PushSrc", ] manual = [ @@ -43,6 +43,21 @@ manual = [ "GstBase.BaseParseFrame", ] +[[object]] +name = "Gst.Buffer" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.BufferList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" + [[object]] name = "Gst.ClockReturn" status = "manual" @@ -52,6 +67,11 @@ must_use = true ok_type = "gst::ClockSuccess" err_type = "gst::ClockError" +[[object]] +name = "Gst.ClockTime" +status = "manual" +conversion_type = "Option" + [[object]] name = "Gst.FlowReturn" status = "manual" @@ -61,6 +81,59 @@ must_use = true ok_type = "gst::FlowSuccess" err_type = "gst::FlowError" +[[object]] +name = "Gst.Sample" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.TagList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "GstBase.*" +status = "generate" + # We'll opt-in for constants at a later time + [[object.constant]] + pattern = ".+" + ignore = true + + [[object.function]] + name = "type_find_helper_for_data" + # broken return value + ignore = true + + [[object.function]] + name = "type_find_helper_for_data_with_extension" + # broken return value + ignore = true + + [[object.function]] + name = "type_find_helper_for_buffer" + # broken return value + ignore = true + + [[object.function]] + name = "type_find_helper_for_buffer_with_extension" + # broken return value + ignore = true + + [[object.function]] + name = "type_find_helper" + [object.function.return] + nullable_return_is_error = "Could not find type" + + [[object.function]] + name = "type_find_helper_for_extension" + [object.function.return] + nullable_return_is_error = "Could not find type" + [[object]] name = "GstBase.Adapter" status = "generate" @@ -107,11 +180,106 @@ concurrency = "send-unique" manual = true [[object]] -name = "GstBase.FlowCombiner" -# Manual because ref/unref functions were added much later -status = "manual" -final_type = true -concurrency = "none" +name = "GstBase.Aggregator" +status = "generate" +manual_traits = ["AggregatorExtManual"] + + [[object.function]] + name = "update_segment" + # Takes FormattedValue as argument + manual = true + + [[object.function]] + name = "get_allocator" + manual = true + + [[object.function]] + name = "finish_buffer" + # Takes ownership + manual = true + + [[object.function]] + name = "finish_buffer_list" + # Takes ownership + manual = true + + [[object.function]] + name = "selected_samples" + # Info parameter + manual = true + + [[object.function]] + name = "set_latency" + [[object.function.parameter]] + name = "min_latency" + mandatory = true + + [[object.property]] + name = "latency" + version = "1.14" + + [[object.property]] + name = "start-time-selection" + version = "1.18" + + [[object.property]] + name = "min-upstream-latency" + # clock time instead of u64 + manual = true + + [[object.signal]] + name = "samples-selected" + # StructureRef instead of Structure + manual = true + +[[object]] +name = "GstBase.AggregatorPad" +status = "generate" +manual_traits = ["AggregatorPadExtManual"] + +[[object]] +name = "GstBase.BaseParse" +status = "generate" +manual_traits = ["BaseParseExtManual"] + [[object.function]] + name = "add_index_entry" + [[object.function.parameter]] + name = "ts" + mandatory = true + + [[object.function]] + name = "finish_frame" + manual = true + + [[object.function]] + name = "set_duration" + manual = true + + [[object.function]] + name = "set_latency" + [[object.function.parameter]] + name = "min_latency" + mandatory = true + + [[object.function]] + name = "convert_default" + manual = true + + [[object.function]] + name = "set_frame_rate" + manual = true + + # Didn't bind gst_base_parse_frame_{new,init} so not needed + [[object.function]] + name = "push_frame" + ignore = true + +[[object]] +name = "GstBase.BaseParseFrameFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true [[object]] name = "GstBase.BaseSink" @@ -250,176 +418,8 @@ manual_traits = ["BaseTransformExtManual"] ignore = true [[object]] -name = "GstBase.Aggregator" -status = "generate" -manual_traits = ["AggregatorExtManual"] - - [[object.function]] - name = "update_segment" - # Takes FormattedValue as argument - manual = true - - [[object.function]] - name = "get_allocator" - manual = true - - [[object.function]] - name = "finish_buffer" - # Takes ownership - manual = true - - [[object.function]] - name = "finish_buffer_list" - # Takes ownership - manual = true - - [[object.function]] - name = "selected_samples" - # Info parameter - manual = true - - [[object.function]] - name = "set_latency" - [[object.function.parameter]] - name = "min_latency" - mandatory = true - - [[object.property]] - name = "latency" - version = "1.14" - - [[object.property]] - name = "start-time-selection" - version = "1.18" - - [[object.property]] - name = "min-upstream-latency" - # clock time instead of u64 - manual = true - - [[object.signal]] - name = "samples-selected" - # StructureRef instead of Structure - manual = true - -[[object]] -name = "GstBase.AggregatorPad" -status = "generate" -manual_traits = ["AggregatorPadExtManual"] - -[[object]] -name = "GstBase.*" -status = "generate" - # We'll opt-in for constants at a later time - [[object.constant]] - pattern = ".+" - ignore = true - - [[object.function]] - name = "type_find_helper_for_data" - # broken return value - ignore = true - - [[object.function]] - name = "type_find_helper_for_data_with_extension" - # broken return value - ignore = true - - [[object.function]] - name = "type_find_helper_for_buffer" - # broken return value - ignore = true - - [[object.function]] - name = "type_find_helper_for_buffer_with_extension" - # broken return value - ignore = true - - [[object.function]] - name = "type_find_helper" - [object.function.return] - nullable_return_is_error = "Could not find type" - - [[object.function]] - name = "type_find_helper_for_extension" - [object.function.return] - nullable_return_is_error = "Could not find type" - -[[object]] -name = "Gst.Structure" +name = "GstBase.FlowCombiner" +# Manual because ref/unref functions were added much later status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Caps" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Buffer" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.BufferList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Sample" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" - -[[object]] -name = "Gst.TagList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "GstBase.BaseParse" -status = "generate" -manual_traits = ["BaseParseExtManual"] - [[object.function]] - name = "add_index_entry" - [[object.function.parameter]] - name = "ts" - mandatory = true - - [[object.function]] - name = "finish_frame" - manual = true - - [[object.function]] - name = "set_duration" - manual = true - - [[object.function]] - name = "set_latency" - [[object.function.parameter]] - name = "min_latency" - mandatory = true - - [[object.function]] - name = "convert_default" - manual = true - - [[object.function]] - name = "set_frame_rate" - manual = true - - # Didn't bind gst_base_parse_frame_{new,init} so not needed - [[object.function]] - name = "push_frame" - ignore = true - -[[object]] -name = "GstBase.BaseParseFrameFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true +final_type = true +concurrency = "none" diff --git a/gstreamer-base/tests/check_gir.rs b/gstreamer-base/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-base/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-check/Cargo.toml b/gstreamer-check/Cargo.toml index b31b40f96..c948fd0cc 100644 --- a/gstreamer-check/Cargo.toml +++ b/gstreamer-check/Cargo.toml @@ -19,6 +19,9 @@ ffi = { package = "gstreamer-check-sys", path = "sys", features = ["v1_8"] } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-check/Gir.toml b/gstreamer-check/Gir.toml index 42dcf1b92..c72307d88 100644 --- a/gstreamer-check/Gir.toml +++ b/gstreamer-check/Gir.toml @@ -62,6 +62,18 @@ name = "Gst.ClockTime" status = "manual" conversion_type = "Option" +[[object]] +name = "GstCheck.Harness" +status = "manual" + + [[object.function]] + name = "new_with_element" + rename = "with_element" + + [[object.function]] + name = "new_with_padnames" + rename = "with_padnames" + [[object]] name = "GstCheck.TestClock" status = "generate" @@ -107,15 +119,3 @@ final_type = true [[object.function]] name = "timed_wait_for_multiple_pending_ids" manual = true - -[[object]] -name = "GstCheck.Harness" -status = "manual" - - [[object.function]] - name = "new_with_element" - rename = "with_element" - - [[object.function]] - name = "new_with_padnames" - rename = "with_padnames" diff --git a/gstreamer-check/tests/check_gir.rs b/gstreamer-check/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-check/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-controller/Cargo.toml b/gstreamer-controller/Cargo.toml index 9f6944f83..14b71078d 100644 --- a/gstreamer-controller/Cargo.toml +++ b/gstreamer-controller/Cargo.toml @@ -20,6 +20,9 @@ ffi = { package = "gstreamer-controller-sys", path = "sys", features = ["v1_8"] glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-controller/Gir.toml b/gstreamer-controller/Gir.toml index f1e6d386f..5fd36da29 100644 --- a/gstreamer-controller/Gir.toml +++ b/gstreamer-controller/Gir.toml @@ -18,19 +18,19 @@ external_libraries = [ generate = [ "GstController.ARGBControlBinding", "GstController.DirectControlBinding", - "GstController.InterpolationControlSource", - "GstController.LFOControlSource", - "GstController.TriggerControlSource", - "GstController.DirectControlBindingConvertValue", "GstController.DirectControlBindingConvertGValue", - "GstController.LFOWaveform", + "GstController.DirectControlBindingConvertValue", + "GstController.InterpolationControlSource", "GstController.InterpolationMode", + "GstController.LFOControlSource", + "GstController.LFOWaveform", + "GstController.TriggerControlSource", ] manual = [ - "Gst.Object", "Gst.ControlBinding", "Gst.ControlSource", + "Gst.Object", "GstController.ControlPoint", ] @@ -39,6 +39,10 @@ name = "Gst.ClockTime" status = "manual" conversion_type = "Option" +[[object]] +name = "GstController.ProxyControlBinding" +status = "generate" +version = "1.12" [[object]] name = "GstController.TimedValueControlSource" @@ -55,8 +59,3 @@ status = "generate" [[object.function.parameter]] name = "timestamp" mandatory = true - -[[object]] -name = "GstController.ProxyControlBinding" -status = "generate" -version = "1.12" diff --git a/gstreamer-controller/tests/check_gir.rs b/gstreamer-controller/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-controller/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-editing-services/Cargo.toml b/gstreamer-editing-services/Cargo.toml index c0256e609..db49d1666 100644 --- a/gstreamer-editing-services/Cargo.toml +++ b/gstreamer-editing-services/Cargo.toml @@ -23,6 +23,9 @@ gst = { package = "gstreamer", path = "../gstreamer" } gst-base = { package = "gstreamer-base", path = "../gstreamer-base" } gst-pbutils = { package = "gstreamer-pbutils", path = "../gstreamer-pbutils" } +[dev-dependencies] +gir-format-check = "0.1" + [features] v1_10 = ["gst/v1_10", "gst-base/v1_10", "gst-pbutils/v1_10", "ffi/v1_10"] v1_12 = ["gst/v1_12", "gst-base/v1_12", "gst-pbutils/v1_12", "ffi/v1_12", "v1_10"] diff --git a/gstreamer-editing-services/Gir.toml b/gstreamer-editing-services/Gir.toml index 3081a3ef5..10f8a05d7 100644 --- a/gstreamer-editing-services/Gir.toml +++ b/gstreamer-editing-services/Gir.toml @@ -9,138 +9,110 @@ single_version_file = true generate_display_trait = false external_libraries = [ + "Gio", "GLib", "GObject", - "Gio", "Gst", "GstPbutils", ] manual = [ + "Gio.AsyncReadyCallback", + "Gio.Cancellable", "GLib.Date", "GLib.DateTime", "GLib.Error", "GLib.Source", "GLib.Type", - "Gio.Cancellable", - "Gio.AsyncReadyCallback", "GObject.Object", "GObject.Value", - "Gst.DateTime", + "Gst.Bin", "Gst.ChildProxy", "Gst.ControlBinding", "Gst.ControlSource", "Gst.CoreError", + "Gst.DateTime", "Gst.Element", "Gst.ElementFactory", "Gst.EventType", - "Gst.Bin", "Gst.Pad", "Gst.Pipeline", "Gst.Segment", "Gst.State", "Gst.StaticCaps", "Gst.StaticPadTemplate", - "GstPbutils.EncodingProfile", "GstPbutils.DiscovererInfo", "GstPbutils.DiscovererStreamInfo", + "GstPbutils.EncodingProfile", ] generate = [ - "GES.PipelineFlags", - "GES.FrameNumber", - "GES.Group", - "GES.UriClipAsset", - "GES.UriSourceAsset", - "GES.OperationClip", - "GES.TransitionClip", - "GES.BaseTransitionClip", - "GES.VideoStandardTransitionType", - "GES.Source", + "GES.AssetLoadingReturn", "GES.AudioSource", "GES.AudioTestSource", "GES.AudioTrack", "GES.AudioTransition", - "GES.Operation", - "GES.Transition", "GES.AudioUriSource", "GES.BaseEffectClip", - "GES.Formatter", + "GES.BaseTransitionClip", "GES.BaseXmlFormatter", "GES.ChildrenControlMode", "GES.ClipAsset", - "GES.TrackElementAsset", "GES.EffectAsset", "GES.EffectClip", + "GES.Error", "GES.ExtractableCheckId", - "GES.VideoUriSource", - "GES.VideoSource", + "GES.Formatter", + "GES.FrameNumber", + "GES.Group", "GES.ImageSource", - "GES.MultiFileSource", - "GES.OverlayClip", + "GES.Marker", + "GES.MarkerFlags", + "GES.MarkerList", "GES.MetaContainer", "GES.MetaFlag", - "GES.Marker", - "GES.MarkerList", - "GES.MarkerFlags", + "GES.MultiFileSource", + "GES.Operation", + "GES.OperationClip", + "GES.OverlayClip", + "GES.PipelineFlags", + "GES.Source", "GES.SourceClip", "GES.SourceClipAsset", "GES.TestClip", + "GES.TextHAlign", + "GES.TextOverlay", + "GES.TextOverlayClip", + "GES.TextVAlign", + "GES.TitleClip", + "GES.TitleSource", + "GES.TrackElementAsset", + "GES.Transition", + "GES.TransitionClip", + "GES.UriClipAsset", + "GES.UriSourceAsset", + "GES.VideoSource", + "GES.VideoStandardTransitionType", "GES.VideoTestPattern", "GES.VideoTestSource", "GES.VideoTrack", "GES.VideoTransition", + "GES.VideoUriSource", "GES.XmlFormatter", - "GES.TextHAlign", - "GES.TextVAlign", - "GES.TextOverlay", - "GES.TextOverlayClip", - "GES.TitleClip", - "GES.TitleSource", - "GES.AssetLoadingReturn", - "GES.Error", ] [[object]] -name = "Gst.Object" -# For renaming the trait... -status = "manual" -trait_name = "GstObjectExt" - -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Caps" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Buffer" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.BufferList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Sample" -status = "manual" -ref_mode = "ref" +name = "GES.Asset" +status = "generate" + [[object.function]] + name = "set_proxy" + [object.function.return] + bool_return_is_error = "Failed to set proxy" [[object.function]] - name = "get_caps" - # Function moved to SampleRef - ignore = true - -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" + name = "unproxy" + [object.function.return] + bool_return_is_error = "Failed to unproxy asset" [[object]] name = "GES.BaseEffect" @@ -151,20 +123,37 @@ status = "generate" ignore = true [[object]] -name = "GES.Effect" +name = "GES.Clip" status = "generate" [[object.function]] - name = "new" + name = "get_duration_limit" [object.function.return] - nullable_return_is_error = "Failed to create effect from description" + mandatory = true -[[object]] -name = "GES.UriClip" -status = "generate" [[object.function]] - name = "new" + name = "move_to_layer" [object.function.return] - nullable_return_is_error = "Failed to create Uri clip from Uri" + bool_return_is_error = "Failed to move clip to specified layer" + + [[object.function]] + name = "set_top_effect_index" + [object.function.return] + bool_return_is_error = "Failed to move effect" + + [[object.function]] + name = "set_top_effect_priority" + [object.function.return] + bool_return_is_error = "Failed to the set top effect priority" + + [[object.function]] + name = "add_asset" + [object.function.return] + nullable_return_is_error = "Failed to add asset" + + [[object.function]] + name = "split" + [object.function.return] + nullable_return_is_error = "Failed to split clip" [[object]] name = "GES.CommandLineFormatter" @@ -178,6 +167,117 @@ status = "generate" [object.function.return] nullable = false +[[object]] +name = "GES.Container" +status = "generate" +trait_name = "GESContainerExt" + [[object.function]] + name = "add" + [object.function.return] + bool_return_is_error = "Failed to add element" + + [[object.function]] + name = "remove" + [object.function.return] + bool_return_is_error = "Failed to remove element" + + [[object.function]] + name = "edit" + [object.function.return] + bool_return_is_error = "Failed to edit container" + +[[object]] +name = "GES.Edge" +status = "generate" + [[object.function]] + name = "name" + [object.function.return] + nullable = false + +[[object]] +name = "GES.EditMode" +status = "generate" + [[object.function]] + name = "name" + [object.function.return] + nullable = false + +[[object]] +name = "GES.Effect" +status = "generate" + [[object.function]] + name = "new" + [object.function.return] + nullable_return_is_error = "Failed to create effect from description" + +[[object]] +name = "GES.Extractable" +status = "generate" + [[object.function]] + name = "set_asset" + [object.function.return] + bool_return_is_error = "Failed to set asset" + +[[object]] +name = "GES.Layer" +status = "generate" + [[object.function]] + name = "add_clip" + [object.function.return] + bool_return_is_error = "Failed to add clip" + + [[object.function]] + name = "get_duration" + [object.function.return] + mandatory = true + + [[object.function]] + name = "remove_clip" + [object.function.return] + bool_return_is_error = "Failed to remove clip" + + [[object.function]] + name = "add_asset" + [object.function.return] + nullable_return_is_error = "Failed to add asset" + +[[object]] +name = "GES.Pipeline" +status = "generate" +trait_name = "GESPipelineExt" + [[object.function]] + name = "set_render_settings" + [object.function.return] + bool_return_is_error = "Failed to set render settings" + + [[object.function]] + name = "set_mode" + [object.function.return] + bool_return_is_error = "Failed to set mode" + + [[object.function]] + name = "save_thumbnail" + [object.function.return] + bool_return_is_error = "Failed to save thumbnail" + + [[object.function]] + name = "set_timeline" + [object.function.return] + bool_return_is_error = "Failed to set timeline" + +[[object]] +name = "GES.Project" +status = "generate" + [[object.function]] + name = "add_encoding_profile" + [object.function.return] + bool_return_is_error = "Failed to add profile" + + [[object.function]] + name = "remove_asset" + [object.function.return] + bool_return_is_error = "Failed to remove asset" + [[object]] name = "GES.Timeline" status = "generate" @@ -239,169 +339,6 @@ status = "generate" name = "snapping_distance" mandatory = true -[[object]] -name = "GES.Container" -status = "generate" -trait_name = "GESContainerExt" - [[object.function]] - name = "add" - [object.function.return] - bool_return_is_error = "Failed to add element" - - [[object.function]] - name = "remove" - [object.function.return] - bool_return_is_error = "Failed to remove element" - - [[object.function]] - name = "edit" - [object.function.return] - bool_return_is_error = "Failed to edit container" - -[[object]] -name = "GES.Pipeline" -status = "generate" -trait_name = "GESPipelineExt" - [[object.function]] - name = "set_render_settings" - [object.function.return] - bool_return_is_error = "Failed to set render settings" - - [[object.function]] - name = "set_mode" - [object.function.return] - bool_return_is_error = "Failed to set mode" - - [[object.function]] - name = "save_thumbnail" - [object.function.return] - bool_return_is_error = "Failed to save thumbnail" - - [[object.function]] - name = "set_timeline" - [object.function.return] - bool_return_is_error = "Failed to set timeline" - -[[object]] -name = "GES.Track" -status = "generate" -trait_name = "GESTrackExt" - [[object.function]] - name = "add_element" - [object.function.return] - bool_return_is_error = "Failed to add element" - - [[object.function]] - name = "remove_element" - [object.function.return] - bool_return_is_error = "Failed to remove element" - -[[object]] -name = "GES.Asset" -status = "generate" - [[object.function]] - name = "set_proxy" - [object.function.return] - bool_return_is_error = "Failed to set proxy" - - [[object.function]] - name = "unproxy" - [object.function.return] - bool_return_is_error = "Failed to unproxy asset" - -[[object]] -name = "GES.Clip" -status = "generate" - [[object.function]] - name = "get_duration_limit" - [object.function.return] - mandatory = true - - [[object.function]] - name = "move_to_layer" - [object.function.return] - bool_return_is_error = "Failed to move clip to specified layer" - - [[object.function]] - name = "set_top_effect_index" - [object.function.return] - bool_return_is_error = "Failed to move effect" - - [[object.function]] - name = "set_top_effect_priority" - [object.function.return] - bool_return_is_error = "Failed to the set top effect priority" - - [[object.function]] - name = "add_asset" - [object.function.return] - nullable_return_is_error = "Failed to add asset" - - [[object.function]] - name = "split" - [object.function.return] - nullable_return_is_error = "Failed to split clip" - -[[object]] -name = "GES.Extractable" -status = "generate" - [[object.function]] - name = "set_asset" - [object.function.return] - bool_return_is_error = "Failed to set asset" - -[[object]] -name = "GES.Edge" -status = "generate" - [[object.function]] - name = "name" - [object.function.return] - nullable = false - -[[object]] -name = "GES.EditMode" -status = "generate" - [[object.function]] - name = "name" - [object.function.return] - nullable = false - -[[object]] -name = "GES.Layer" -status = "generate" - [[object.function]] - name = "add_clip" - [object.function.return] - bool_return_is_error = "Failed to add clip" - - [[object.function]] - name = "get_duration" - [object.function.return] - mandatory = true - - [[object.function]] - name = "remove_clip" - [object.function.return] - bool_return_is_error = "Failed to remove clip" - - [[object.function]] - name = "add_asset" - [object.function.return] - nullable_return_is_error = "Failed to add asset" - -[[object]] -name = "GES.Project" -status = "generate" - [[object.function]] - name = "add_encoding_profile" - [object.function.return] - bool_return_is_error = "Failed to add profile" - - [[object.function]] - name = "remove_asset" - [object.function.return] - bool_return_is_error = "Failed to remove asset" - [[object]] name = "GES.TimelineElement" status = "generate" @@ -506,6 +443,20 @@ manual_traits = ["TimelineElementExtManual"] [object.function.return] nullable_return_is_error = "Failed to copy timeline element" +[[object]] +name = "GES.Track" +status = "generate" +trait_name = "GESTrackExt" + [[object.function]] + name = "add_element" + [object.function.return] + bool_return_is_error = "Failed to add element" + + [[object.function]] + name = "remove_element" + [object.function.return] + bool_return_is_error = "Failed to remove element" + [[object]] name = "GES.TrackElement" status = "generate" @@ -526,3 +477,52 @@ status = "generate" name = "name" [object.function.return] nullable = false + +[[object]] +name = "GES.UriClip" +status = "generate" + [[object.function]] + name = "new" + [object.function.return] + nullable_return_is_error = "Failed to create Uri clip from Uri" + +[[object]] +name = "Gst.Buffer" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.BufferList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.ClockTime" +status = "manual" +conversion_type = "Option" + +[[object]] +name = "Gst.Object" +# For renaming the trait... +status = "manual" +trait_name = "GstObjectExt" + +[[object]] +name = "Gst.Sample" +status = "manual" +ref_mode = "ref" + + [[object.function]] + name = "get_caps" + # Function moved to SampleRef + ignore = true + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" diff --git a/gstreamer-editing-services/tests/check_gir.rs b/gstreamer-editing-services/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-editing-services/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index ac0249be7..f4865f503 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -28,6 +28,9 @@ gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_14"] } gst-base = { package = "gstreamer-base", path = "../gstreamer-base", features = ["v1_14"] } gst-video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_14"] } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] dox = ["v1_20", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox"] diff --git a/gstreamer-gl/Gir.toml b/gstreamer-gl/Gir.toml index ac77acdcf..e4c1fa481 100644 --- a/gstreamer-gl/Gir.toml +++ b/gstreamer-gl/Gir.toml @@ -18,31 +18,21 @@ external_libraries = [ ] generate = [ - # Enums + "GstGL.GLBaseFilter", + "GstGL.GLBaseMemoryAllocator", + "GstGL.GLBaseSrc", "GstGL.GLConfigCaveat", + "GstGL.GLConfigSurfaceType", + "GstGL.GLContextError", "GstGL.GLFormat", + "GstGL.GLMemoryAllocator", "GstGL.GLQueryType", + "GstGL.GLSLError", "GstGL.GLSLVersion", "GstGL.GLStereoDownmix", "GstGL.GLTextureTarget", "GstGL.GLUploadReturn", - # Flags - "GstGL.GLConfigSurfaceType", - # Enums Errors - #"GstGL.GLBaseMemoryError", - "GstGL.GLContextError", - "GstGL.GLSLError", "GstGL.GLWindowError", - # Records - #"GstGL.GLRenderbufferAllocationParams", - # Objects - #"GstGL.GLBufferPool", - "GstGL.GLBaseFilter", - "GstGL.GLBaseMemoryAllocator", - "GstGL.GLBaseSrc", - "GstGL.GLMemoryAllocator", - #"GstGL.GLMemoryPBOAllocator", - #"GstGL.GLRenderbufferAllocator", ] manual = [ @@ -71,11 +61,6 @@ manual = [ "GstVideo.VideoOverlay", ] -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" @@ -91,15 +76,70 @@ name = "Gst.Query" status = "manual" ref_mode = "ref" +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "GstGL.GLAllocationParams" +status = "generate" + + [[object.function]] + name = "free_data" + # Function should only be called by subclasses from + # an overridden `free` vfunc. + ignore = true + + [[object.function]] + name = "copy_data" + [[object.function.parameter]] + name = "src" + const = true + +[[object]] +name = "GstGL.GLAPI" +status = "generate" + [[object.member]] + name = "none" + ignore = true + [[object.member]] + name = "any" + ignore = true + + [[object.function]] + name = "to_string" + [object.function.return] + nullable = false + [[object]] name = "GstGL.GLBuffer" status = "manual" ref_mode = "ref" [[object]] -name = "GstGL.GLQuery" -status = "manual" -ref_mode = "ref" +name = "GstGL.GLColorConvert" +status = "generate" +final_type = true + [[object.function]] + name = "set_caps" + [object.function.return] + bool_return_is_error = "Failed to set caps" + + [[object.function]] + name = "decide_allocation" + # correct mutability + ignore = true + + [[object.function]] + name = "fixate_caps" + # correct reference ownership + ignore = true + + [[object.function]] + name = "perform" + # transfer gst::Buffer not reference + ignore = true [[object]] name = "GstGL.GLContext" @@ -203,82 +243,49 @@ status = "generate" nullable_return_is_error = "Failed to create window" [[object]] -name = "GstGL.GLWindow" +name = "GstGL.GLDisplayType" status = "generate" - - [[object.function]] - name = "get_window_handle" - # return native handle + [[object.member]] + name = "none" ignore = true - - [[object.function]] - name = "send_message" - # callback - ignore = true - - [[object.function]] - name = "send_message_async" - # callback - ignore = true - - [[object.function]] - name = "set_close_callback" - # callback - ignore = true - - [[object.function]] - name = "set_draw_callback" - # callback - ignore = true - - [[object.function]] - name = "set_render_rectangle" - [object.function.return] - bool_return_is_error = "Failed to set the specified region" - - [[object.function]] - name = "set_resize_callback" - # callback - ignore = true - - [[object.function]] - name = "set_window_handle" - # handle - ignore = true - - [[object.function]] - name = "get_display" - # handle - ignore = true - - [[object.function]] - name = "error_quark" - # bad error domian definition in gir + [[object.member]] + name = "any" ignore = true [[object]] -name = "GstGL.GLColorConvert" +name = "GstGL.GLFilter" status = "generate" -final_type = true + [[object.function]] - name = "set_caps" + name = "add_rgba_pad_templates" + # Automatically called if + # GLFilterImpl::ADD_RGBA_PAD_TEMPLATES is true + ignore = true + + [[object.function]] + pattern = "render_to_target\\w*" + [[object.function.parameter]] + pattern = "input|output" + const = true + + [[object.function]] + name = "render_to_target" [object.function.return] - bool_return_is_error = "Failed to set caps" + bool_return_is_error = "`func` returned `false`" [[object.function]] - name = "decide_allocation" - # correct mutability - ignore = true + name = "filter_texture" + [object.function.return] + bool_return_is_error = "Failed to transform texture" + +[[object]] +name = "GstGL.GLFramebuffer" +status = "generate" [[object.function]] - name = "fixate_caps" - # correct reference ownership - ignore = true - - [[object.function]] - name = "perform" - # transfer gst::Buffer not reference - ignore = true + name = "attach" + # attachment_point parameter unchecked + unsafe = true [[object]] name = "GstGL.GLOverlayCompositor" @@ -295,14 +302,24 @@ final_type = true version = "1.16" [[object]] -name = "GstGL.GLSLStage" +name = "GstGL.GLPlatform" status = "generate" -final_type = true + [[object.member]] + name = "none" + ignore = true + [[object.member]] + name = "any" + ignore = true [[object.function]] - name = "set_strings" + name = "to_string" [object.function.return] - bool_return_is_error = "Failed to attach stage to set strings" + nullable = false + +[[object]] +name = "GstGL.GLQuery" +status = "manual" +ref_mode = "ref" [[object]] name = "GstGL.GLShader" @@ -364,6 +381,26 @@ final_type = true # array with size ignore = true +[[object]] +name = "GstGL.GLSLProfile" +status = "generate" + [[object.member]] + name = "none" + ignore = true + [[object.member]] + name = "any" + ignore = true + +[[object]] +name = "GstGL.GLSLStage" +status = "generate" +final_type = true + + [[object.function]] + name = "set_strings" + [object.function.return] + bool_return_is_error = "Failed to attach stage to set strings" + [[object]] name = "GstGL.GLUpload" status = "generate" @@ -389,6 +426,22 @@ final_type = true [object.function.return] nullable = false +[[object]] +name = "GstGL.GLVideoAllocationParams" +status = "generate" + + [[object.function]] + name = "free_data" + # Function should only be called by subclasses from + # an overridden `free` vfunc. + ignore = true + + [[object.function]] + name = "copy_data" + [[object.function.parameter]] + name = "src_vid" + const = true + [[object]] name = "GstGL.GLViewConvert" status = "generate" @@ -420,119 +473,55 @@ final_type = true ignore = true [[object]] -name = "GstGL.GLDisplayType" +name = "GstGL.GLWindow" status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "any" - ignore = true -[[object]] -name = "GstGL.GLAPI" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "any" + [[object.function]] + name = "get_window_handle" + # return native handle ignore = true [[object.function]] - name = "to_string" + name = "send_message" + # callback + ignore = true + + [[object.function]] + name = "send_message_async" + # callback + ignore = true + + [[object.function]] + name = "set_close_callback" + # callback + ignore = true + + [[object.function]] + name = "set_draw_callback" + # callback + ignore = true + + [[object.function]] + name = "set_render_rectangle" [object.function.return] - nullable = false + bool_return_is_error = "Failed to set the specified region" -[[object]] -name = "GstGL.GLPlatform" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "any" + [[object.function]] + name = "set_resize_callback" + # callback ignore = true [[object.function]] - name = "to_string" - [object.function.return] - nullable = false - -[[object]] -name = "GstGL.GLSLProfile" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "any" - ignore = true - -[[object]] -name = "GstGL.GLAllocationParams" -status = "generate" - - [[object.function]] - name = "free_data" - # Function should only be called by subclasses from - # an overridden `free` vfunc. + name = "set_window_handle" + # handle ignore = true [[object.function]] - name = "copy_data" - [[object.function.parameter]] - name = "src" - const = true - -[[object]] -name = "GstGL.GLVideoAllocationParams" -status = "generate" - - [[object.function]] - name = "free_data" - # Function should only be called by subclasses from - # an overridden `free` vfunc. + name = "get_display" + # handle ignore = true [[object.function]] - name = "copy_data" - [[object.function.parameter]] - name = "src_vid" - const = true - -[[object]] -name = "GstGL.GLFramebuffer" -status = "generate" - - [[object.function]] - name = "attach" - # attachment_point parameter unchecked - unsafe = true - -[[object]] -name = "GstGL.GLFilter" -status = "generate" - - [[object.function]] - name = "add_rgba_pad_templates" - # Automatically called if - # GLFilterImpl::ADD_RGBA_PAD_TEMPLATES is true + name = "error_quark" + # bad error domian definition in gir ignore = true - - [[object.function]] - pattern = "render_to_target\\w*" - [[object.function.parameter]] - pattern = "input|output" - const = true - - [[object.function]] - name = "render_to_target" - [object.function.return] - bool_return_is_error = "`func` returned `false`" - - [[object.function]] - name = "filter_texture" - [object.function.return] - bool_return_is_error = "Failed to transform texture" - diff --git a/gstreamer-gl/egl/Cargo.toml b/gstreamer-gl/egl/Cargo.toml index 268bf1382..dbdfdc21c 100644 --- a/gstreamer-gl/egl/Cargo.toml +++ b/gstreamer-gl/egl/Cargo.toml @@ -24,6 +24,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } gst-gl = { package = "gstreamer-gl", path = "../" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] diff --git a/gstreamer-gl/egl/Gir.toml b/gstreamer-gl/egl/Gir.toml index c54d897ac..e83e276ea 100644 --- a/gstreamer-gl/egl/Gir.toml +++ b/gstreamer-gl/egl/Gir.toml @@ -14,8 +14,8 @@ external_libraries = [ "GObject", "Gst", "GstBase", - "GstVideo", "GstGL", + "GstVideo", ] generate = [ @@ -26,17 +26,12 @@ manual = [ "GLib.Error", "GLib.Thread", "GObject.Object", - "Gst.Object", "Gst.FlowReturn", + "Gst.Object", "Gst.PadDirection", "GstGL.GLDisplay", ] -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" @@ -51,3 +46,9 @@ ref_mode = "ref" name = "Gst.Query" status = "manual" ref_mode = "ref" + + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" diff --git a/gstreamer-gl/tests/check_gir.rs b/gstreamer-gl/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-gl/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-gl/wayland/Cargo.toml b/gstreamer-gl/wayland/Cargo.toml index 2245b615c..4bfecc335 100644 --- a/gstreamer-gl/wayland/Cargo.toml +++ b/gstreamer-gl/wayland/Cargo.toml @@ -24,6 +24,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } gst-gl = { package = "gstreamer-gl", path = "../" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] diff --git a/gstreamer-gl/wayland/Gir.toml b/gstreamer-gl/wayland/Gir.toml index 41bf0a2f3..bb7acd39d 100644 --- a/gstreamer-gl/wayland/Gir.toml +++ b/gstreamer-gl/wayland/Gir.toml @@ -14,8 +14,8 @@ external_libraries = [ "GObject", "Gst", "GstBase", - "GstVideo", "GstGL", + "GstVideo", ] generate = [ @@ -26,17 +26,12 @@ manual = [ "GLib.Error", "GLib.Thread", "GObject.Object", - "Gst.Object", "Gst.FlowReturn", + "Gst.Object", "Gst.PadDirection", "GstGL.GLDisplay", ] -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" @@ -51,3 +46,8 @@ ref_mode = "ref" name = "Gst.Query" status = "manual" ref_mode = "ref" + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" diff --git a/gstreamer-gl/x11/Cargo.toml b/gstreamer-gl/x11/Cargo.toml index 6bbee559c..211ba8a3f 100644 --- a/gstreamer-gl/x11/Cargo.toml +++ b/gstreamer-gl/x11/Cargo.toml @@ -24,6 +24,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } gst-gl = { package = "gstreamer-gl", path = "../" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] diff --git a/gstreamer-gl/x11/Gir.toml b/gstreamer-gl/x11/Gir.toml index 048fac6ac..1a43bca9f 100644 --- a/gstreamer-gl/x11/Gir.toml +++ b/gstreamer-gl/x11/Gir.toml @@ -14,8 +14,8 @@ external_libraries = [ "GObject", "Gst", "GstBase", - "GstVideo", "GstGL", + "GstVideo", ] generate = [ @@ -26,17 +26,12 @@ manual = [ "GLib.Error", "GLib.Thread", "GObject.Object", - "Gst.Object", "Gst.FlowReturn", + "Gst.Object", "Gst.PadDirection", "GstGL.GLDisplay", ] -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" @@ -51,3 +46,8 @@ ref_mode = "ref" name = "Gst.Query" status = "manual" ref_mode = "ref" + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" diff --git a/gstreamer-mpegts/tests/check_gir.rs b/gstreamer-mpegts/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-mpegts/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-net/Cargo.toml b/gstreamer-net/Cargo.toml index c6de1be76..9d84cb056 100644 --- a/gstreamer-net/Cargo.toml +++ b/gstreamer-net/Cargo.toml @@ -19,6 +19,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gio = { git = "https://github.com/gtk-rs/gtk-rs-core" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-net/Gir.toml b/gstreamer-net/Gir.toml index 1246fa5ed..8da8b5986 100644 --- a/gstreamer-net/Gir.toml +++ b/gstreamer-net/Gir.toml @@ -11,10 +11,10 @@ generate_display_trait = false trust_return_value_nullability = true external_libraries = [ + "Gio", "GLib", "GObject", "Gst", - "Gio", ] generate = [ @@ -34,26 +34,6 @@ name = "Gst.ClockTime" status = "manual" conversion_type = "Option" -[[object]] -name = "GstNet.NtpClock" -status = "generate" -final_type = true - - [[object.function]] - name = "new" - # Floating reference handling - manual = true - -[[object]] -name = "GstNet.PtpClock" -status = "generate" -final_type = true - - [[object.function]] - name = "new" - # Floating reference handling - manual = true - [[object]] name = "GstNet.NetClientClock" status = "generate" @@ -73,3 +53,23 @@ final_type = true name = "new" # Floating reference handling manual = true + +[[object]] +name = "GstNet.NtpClock" +status = "generate" +final_type = true + + [[object.function]] + name = "new" + # Floating reference handling + manual = true + +[[object]] +name = "GstNet.PtpClock" +status = "generate" +final_type = true + + [[object.function]] + name = "new" + # Floating reference handling + manual = true diff --git a/gstreamer-net/tests/check_gir.rs b/gstreamer-net/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-net/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-pbutils/Cargo.toml b/gstreamer-pbutils/Cargo.toml index be2e7a83f..a1e6c43cf 100644 --- a/gstreamer-pbutils/Cargo.toml +++ b/gstreamer-pbutils/Cargo.toml @@ -21,6 +21,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } thiserror = "1.0" +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-pbutils/Gir.toml b/gstreamer-pbutils/Gir.toml index 676c678d3..47d4e4607 100644 --- a/gstreamer-pbutils/Gir.toml +++ b/gstreamer-pbutils/Gir.toml @@ -35,7 +35,7 @@ manual = [ ] [[object]] -name = "Gst.Toc" +name = "Gst.Buffer" status = "manual" ref_mode = "ref" @@ -45,14 +45,9 @@ status = "manual" ref_mode = "ref" [[object]] -name = "Gst.Message" +name = "Gst.ClockTime" status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Buffer" -status = "manual" -ref_mode = "ref" +conversion_type = "Option" [[object]] name = "Gst.Event" @@ -60,7 +55,7 @@ status = "manual" ref_mode = "ref" [[object]] -name = "Gst.TagList" +name = "Gst.Message" status = "manual" ref_mode = "ref" @@ -70,203 +65,15 @@ status = "manual" ref_mode = "ref" [[object]] -name = "Gst.ClockTime" +name = "Gst.TagList" status = "manual" -conversion_type = "Option" +ref_mode = "ref" + [[object]] -name = "GstPbutils.Discoverer" -status = "generate" -final_type = true - - [[object.function]] - name = "discover_uri_async" - [object.function.return] - bool_return_is_error = "Failed to add URI to list of discovers" - - [[object.function]] - name = "new" - [[object.function.parameter]] - name = "timeout" - mandatory = true - - # Manually implemented to use ClockTime - [[object.property]] - name = "timeout" - manual = true - - [[object.property]] - name = "use-cache" - version = "1.16" - -[[object]] -name = "GstPbutils.DiscovererInfo" -status = "generate" - - [[object.function]] - name = "copy" - [object.function.return] - nullable = false - - [[object.function]] - name = "to_variant" - [object.function.return] - nullable_return_is_error = "Failed to serialize DiscovererInfo to Variant" - - [[object.function]] - name = "from_variant" - [object.function.return] - nullable_return_is_error = "Failed to deserialize DiscovererInfo from Variant" - -[[object]] -name = "GstPbutils.DiscovererStreamInfo" -status = "generate" -final_type = false - - # Not useful - [[object.function]] - name = "list_free" - ignore = true - - [[object.function]] - name = "get_stream_type_nick" - [object.function.return] - nullable = false - -[[object]] -name = "GstPbutils.DiscovererAudioInfo" -status = "generate" -final_type = true - -[[object]] -name = "GstPbutils.DiscovererVideoInfo" -status = "generate" -final_type = true - - # Implement manually to expose as gst::Fraction - [[object.function]] - name = "get_framerate_num" - manual = true - [[object.function]] - name = "get_framerate_denom" - manual = true - [[object.function]] - name = "get_par_num" - manual = true - [[object.function]] - name = "get_par_denom" - manual = true - -[[object]] -name = "GstPbutils.DiscovererSubtitleInfo" -status = "generate" -final_type = true - -[[object]] -name = "GstPbutils.DiscovererContainerInfo" -status = "generate" -final_type = true - -[[object]] -name = "GstPbutils.EncodingProfile" -status = "generate" - - # Ignore all setters, making it immutable. A builder will be provided. - [[object.function]] - name = "new" - manual = true - [[object.function]] - pattern = "set_.*" - manual = true - - [[object.function]] - pattern = "get_restriction" - manual = true - - [[object.function]] - name = "copy" - [object.function.return] - nullable = false - - [[object.function]] - name = "get_input_caps" - [object.function.return] - nullable = false - - [[object.function]] - name = "get_format" - [object.function.return] - nullable = false - - [[object.property]] - name = "restriction-caps" - # encodingprofile is immutable after constructed - ignore = true - - [[object.function]] - name = "from_discoverer" - [object.function.return] - nullable_return_is_error = "Failed to create EncodingProfile from DiscovererInfo" - -[[object]] -name = "GstPbutils.EncodingContainerProfile" -status = "generate" - - # Make it immutable, only able to be constructed for a builder - [[object.function]] - name = "new" - manual = true - - [[object.function]] - name = "add_profile" - manual = true - -[[object]] -name = "GstPbutils.EncodingTarget" -status = "generate" - - [[object.function]] - name = "add_profile" - # can be provided on constructor and we better - # consider this immutable - ignore = true - - [[object.function]] - name = "get_category" - [object.function.return] - nullable = false - [[object.function]] - name = "get_description" - [object.function.return] - nullable = false - [[object.function]] - name = "get_name" - [object.function.return] - nullable = false - -[[object]] -name = "GstPbutils.EncodingAudioProfile" -status = "generate" -final_type = true - # Ignore all setters, making it immutable. A builder will be provided. - [[object.function]] - name = "new" - manual = true - [[object.function]] - pattern = "set_.*" - manual = true - -[[object]] -name = "GstPbutils.EncodingVideoProfile" -status = "generate" -final_type = true - # Ignore all setters, making it immutable. A builder will be provided. - [[object.function]] - name = "new" - manual = true - [[object.function]] - pattern = "set_.*" - manual = true +name = "Gst.Toc" +status = "manual" +ref_mode = "ref" [[object]] name = "GstPbutils.*" @@ -346,6 +153,60 @@ status = "generate" name = "plugins_base_version" assertion = "skip" +[[object]] +name = "GstPbutils.Discoverer" +status = "generate" +final_type = true + + [[object.function]] + name = "discover_uri_async" + [object.function.return] + bool_return_is_error = "Failed to add URI to list of discovers" + + [[object.function]] + name = "new" + [[object.function.parameter]] + name = "timeout" + mandatory = true + + # Manually implemented to use ClockTime + [[object.property]] + name = "timeout" + manual = true + + [[object.property]] + name = "use-cache" + version = "1.16" + +[[object]] +name = "GstPbutils.DiscovererAudioInfo" +status = "generate" +final_type = true + +[[object]] +name = "GstPbutils.DiscovererContainerInfo" +status = "generate" +final_type = true + +[[object]] +name = "GstPbutils.DiscovererInfo" +status = "generate" + + [[object.function]] + name = "copy" + [object.function.return] + nullable = false + + [[object.function]] + name = "to_variant" + [object.function.return] + nullable_return_is_error = "Failed to serialize DiscovererInfo to Variant" + + [[object.function]] + name = "from_variant" + [object.function.return] + nullable_return_is_error = "Failed to deserialize DiscovererInfo from Variant" + [[object]] name = "GstPbutils.DiscovererSerializeFlags" status = "generate" @@ -355,3 +216,143 @@ status = "generate" [[object.member]] name = "all" ignore = true + +[[object]] +name = "GstPbutils.DiscovererStreamInfo" +status = "generate" +final_type = false + + # Not useful + [[object.function]] + name = "list_free" + ignore = true + + [[object.function]] + name = "get_stream_type_nick" + [object.function.return] + nullable = false + +[[object]] +name = "GstPbutils.DiscovererSubtitleInfo" +status = "generate" +final_type = true + +[[object]] +name = "GstPbutils.DiscovererVideoInfo" +status = "generate" +final_type = true + + # Implement manually to expose as gst::Fraction + [[object.function]] + name = "get_framerate_num" + manual = true + [[object.function]] + name = "get_framerate_denom" + manual = true + [[object.function]] + name = "get_par_num" + manual = true + [[object.function]] + name = "get_par_denom" + manual = true + +[[object]] +name = "GstPbutils.EncodingAudioProfile" +status = "generate" +final_type = true + # Ignore all setters, making it immutable. A builder will be provided. + [[object.function]] + name = "new" + manual = true + [[object.function]] + pattern = "set_.*" + manual = true + +[[object]] +name = "GstPbutils.EncodingContainerProfile" +status = "generate" + + # Make it immutable, only able to be constructed for a builder + [[object.function]] + name = "new" + manual = true + + [[object.function]] + name = "add_profile" + manual = true + +[[object]] +name = "GstPbutils.EncodingProfile" +status = "generate" + + # Ignore all setters, making it immutable. A builder will be provided. + [[object.function]] + name = "new" + manual = true + [[object.function]] + pattern = "set_.*" + manual = true + + [[object.function]] + pattern = "get_restriction" + manual = true + + [[object.function]] + name = "copy" + [object.function.return] + nullable = false + + [[object.function]] + name = "get_input_caps" + [object.function.return] + nullable = false + + [[object.function]] + name = "get_format" + [object.function.return] + nullable = false + + [[object.property]] + name = "restriction-caps" + # encodingprofile is immutable after constructed + ignore = true + + [[object.function]] + name = "from_discoverer" + [object.function.return] + nullable_return_is_error = "Failed to create EncodingProfile from DiscovererInfo" + +[[object]] +name = "GstPbutils.EncodingTarget" +status = "generate" + + [[object.function]] + name = "add_profile" + # can be provided on constructor and we better + # consider this immutable + ignore = true + + [[object.function]] + name = "get_category" + [object.function.return] + nullable = false + [[object.function]] + name = "get_description" + [object.function.return] + nullable = false + [[object.function]] + name = "get_name" + [object.function.return] + nullable = false + +[[object]] +name = "GstPbutils.EncodingVideoProfile" +status = "generate" +final_type = true + # Ignore all setters, making it immutable. A builder will be provided. + [[object.function]] + name = "new" + manual = true + [[object.function]] + pattern = "set_.*" + manual = true diff --git a/gstreamer-pbutils/tests/check_gir.rs b/gstreamer-pbutils/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-pbutils/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index b6dabeee7..3c4d2ec20 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -22,6 +22,9 @@ gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_12"] } gst-video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_12"] } once_cell = "1.0" +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_14 = ["gst/v1_14", "gst-video/v1_14", "ffi/v1_14"] diff --git a/gstreamer-player/Gir.toml b/gstreamer-player/Gir.toml index bb631b27a..2e33b7262 100644 --- a/gstreamer-player/Gir.toml +++ b/gstreamer-player/Gir.toml @@ -32,8 +32,8 @@ manual = [ "GLib.Error", "GLib.MainContext", "GObject.Object", - "Gst.Object", "Gst.Element", + "Gst.Object", "GstVideo.VideoMultiviewFlags", "GstVideo.VideoMultiviewFramePacking", ] @@ -44,21 +44,25 @@ status = "manual" ref_mode = "ref" [[object]] -name = "Gst.TagList" +name = "Gst.ClockTime" status = "manual" -ref_mode = "ref" +conversion_type = "Option" [[object]] name = "Gst.Sample" status = "manual" ref_mode = "ref" - [[object]] name = "Gst.Structure" status = "manual" ref_mode = "ref" +[[object]] +name = "Gst.TagList" +status = "manual" +ref_mode = "ref" + [[object]] name = "GstPlayer.Player" status = "generate" @@ -181,6 +185,21 @@ name = "GstPlayer.PlayerAudioInfo" status = "generate" final_type = true +[[object]] +name = "GstPlayer.PlayerGMainContextSignalDispatcher" +status = "generate" +final_type = true + + [[object.function]] + name = "new" + # Wrong return value + ignore = true + +[[object]] +name = "GstPlayer.PlayerSubtitleInfo" +status = "generate" +final_type = true + [[object]] name = "GstPlayer.PlayerVideoInfo" status = "generate" @@ -196,11 +215,6 @@ final_type = true # Fraction manual = true -[[object]] -name = "GstPlayer.PlayerSubtitleInfo" -status = "generate" -final_type = true - [[object]] name = "GstPlayer.PlayerVideoOverlayVideoRenderer" status = "generate" @@ -223,18 +237,3 @@ final_type = true [[object.function]] name = "set_window_handle" manual = true - -[[object]] -name = "GstPlayer.PlayerGMainContextSignalDispatcher" -status = "generate" -final_type = true - - [[object.function]] - name = "new" - # Wrong return value - ignore = true - -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" diff --git a/gstreamer-player/tests/check_gir.rs b/gstreamer-player/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-player/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-rtp/Cargo.toml b/gstreamer-rtp/Cargo.toml index 3b8cfbf02..fca8eab22 100644 --- a/gstreamer-rtp/Cargo.toml +++ b/gstreamer-rtp/Cargo.toml @@ -20,6 +20,9 @@ ffi = { package = "gstreamer-rtp-sys", path = "sys", features = ["v1_8"] } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "ffi/v1_10"] diff --git a/gstreamer-rtp/Gir.toml b/gstreamer-rtp/Gir.toml index 4e45ac89e..aa86c42a1 100644 --- a/gstreamer-rtp/Gir.toml +++ b/gstreamer-rtp/Gir.toml @@ -63,6 +63,20 @@ status = "manual" # Readable and writable variant dealing with mutability rename = "from_buffer_readable" +[[object]] +name = "GstRtp.RTPBufferFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "GstRtp.RTPBufferMapFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + [[object]] name = "GstRtp.RTPHeaderExtension" status = "generate" @@ -91,17 +105,3 @@ manual_traits = ["RTPHeaderExtensionExtManual"] name = "get_sdp_caps_field_name" [object.function.return] nullable = false - -[[object]] -name = "GstRtp.RTPBufferFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "GstRtp.RTPBufferMapFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true diff --git a/gstreamer-rtp/tests/check_gir.rs b/gstreamer-rtp/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-rtp/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index ec0da3388..aa39e8a3f 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -25,6 +25,9 @@ gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp" } gst-rtsp = { package = "gstreamer-rtsp", path = "../gstreamer-rtsp" } gst-net = { package = "gstreamer-net", path = "../gstreamer-net" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "gst-sdp/v1_10", "gst-rtsp/v1_10", "gst-net/v1_10", "ffi/v1_10"] diff --git a/gstreamer-rtsp-server/Gir.toml b/gstreamer-rtsp-server/Gir.toml index ca4aa9415..07ad9cfdf 100644 --- a/gstreamer-rtsp-server/Gir.toml +++ b/gstreamer-rtsp-server/Gir.toml @@ -10,9 +10,9 @@ single_version_file = true generate_display_trait = false external_libraries = [ + "Gio", "GLib", "GObject", - "Gio", "Gst", "GstNet", "GstRtsp", @@ -21,6 +21,7 @@ external_libraries = [ generate = [ "GstRtspServer.RTSPAddressPoolResult", + "GstRtspServer.RTSPFilterResult", "GstRtspServer.RTSPMediaFactoryURI", "GstRtspServer.RTSPMediaStatus", "GstRtspServer.RTSPPublishClockMode", @@ -28,10 +29,17 @@ generate = [ "GstRtspServer.RTSPThreadPool", "GstRtspServer.RTSPThreadType", "GstRtspServer.RTSPTransportMode", - "GstRtspServer.RTSPFilterResult" ] manual = [ + "Gio.Cancellable", + "Gio.Socket", + "Gio.SocketFamily", + "Gio.TlsAuthenticationMode", + "Gio.TlsCertificate", + "Gio.TlsCertificateFlags", + "Gio.TlsConnection", + "Gio.TlsDatabase", "GLib.Error", "GLib.IOCondition", "GLib.MainContext", @@ -39,20 +47,12 @@ manual = [ "GLib.Source", "GLib.ThreadPool", "GObject.Object", - "Gio.TlsCertificateFlags", - "Gio.TlsCertificate", - "Gio.TlsDatabase", - "Gio.TlsConnection", - "Gio.TlsAuthenticationMode", - "Gio.Socket", - "Gio.Cancellable", - "Gio.SocketFamily", - "Gst.Element", - "Gst.State", - "Gst.Clock", - "Gst.Pipeline", - "Gst.Pad", "Gst.Bin", + "Gst.Clock", + "Gst.Element", + "Gst.Pad", + "Gst.Pipeline", + "Gst.State", "GstNet.NetTimeProvider", "GstRtsp.RTSPAuthMethod", "GstRtsp.RTSPLowerTrans", @@ -63,31 +63,6 @@ manual = [ "GstRtsp.RTSPUrl", ] -[[object]] -name = "Gst.FlowReturn" -status = "manual" -must_use = true - [object.conversion_type] - variant = "Result" - ok_type = "gst::FlowSuccess" - err_type = "gst::FlowError" - -[[object]] -name = "Gst.Object" -# For renaming the trait... -status = "manual" -trait_name = "GstObjectExt" - -[[object]] -name = "Gst.Message" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - [[object]] name = "Gst.Buffer" status = "manual" @@ -98,110 +73,35 @@ name = "Gst.Caps" status = "manual" ref_mode = "ref" -[[object]] -name = "GstRtspServer.RTSPContext" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "GstRtspServer.RTSPToken" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "GstRtspServer.RTSPThread" -status = "manual" -ref_mode = "ref" - - [[object.function]] - name = "stop" - # Moved to RTSPThreadRef - ignore = true - [[object]] name = "Gst.ClockTime" status = "manual" conversion_type = "Option" [[object]] -name = "GstRtspServer.RTSPServer" -status = "generate" -manual_traits = ["RTSPServerExtManual"] - - [[object.function]] - name = "attach" - manual = true - - [[object.function]] - name = "io_func" - [object.function.return] - bool_return_is_error = "Failed to connect the source" - - [[object.function]] - name = "transfer_connection" - [object.function.return] - bool_return_is_error = "Failed to transfer to the connection" +name = "Gst.FlowReturn" +status = "manual" +must_use = true + [object.conversion_type] + variant = "Result" + ok_type = "gst::FlowSuccess" + err_type = "gst::FlowError" [[object]] -name = "GstRtspServer.RTSPClient" -status = "generate" -manual_traits = ["RTSPClientExtManual"] - - [[object.function]] - name = "attach" - manual = true - - [[object.function]] - name = "set_send_func" - # user_data takes raw pointer - ignore = true +name = "Gst.Message" +status = "manual" +ref_mode = "ref" [[object]] -name = "GstRtspServer.RTSPStream" -status = "generate" +name = "Gst.Object" +# For renaming the trait... +status = "manual" +trait_name = "GstObjectExt" - [[object.function]] - name = "query_position" - ignore = true - - [[object.function]] - name = "query_stop" - ignore = true - - [[object.function]] - name = "add_transport" - [object.function.return] - bool_return_is_error = "Failed to add transport" - - [[object.function]] - name = "remove_transport" - [object.function.return] - bool_return_is_error = "Failed to remove transport" - - [[object.function]] - name = "join_bin" - [object.function.return] - bool_return_is_error = "Failed to join bin" - - [[object.function]] - name = "leave_bin" - [object.function.return] - bool_return_is_error = "Failed to leave bin" - - [[object.function]] - name = "set_blocked" - [object.function.return] - bool_return_is_error = "Failed to block/unblock the dataflow" - - [[object.function]] - name = "unblock_linked" - [object.function.return] - bool_return_is_error = "Failed to unblock the dataflow" - - [[object.function]] - name = "update_crypto" - [object.function.return] - bool_return_is_error = "Failed to update crypto" +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" [[object]] name = "GstRtspServer.RTSPAddress" @@ -209,24 +109,11 @@ status = "generate" concurrency = "send" [[object]] -name = "GstRtspServer.RTSPStreamTransport" +name = "GstRtspServer.RTSPAddressFlags" status = "generate" -concurrency = "none" - - [[object.function]] - name = "send_rtcp" - [object.function.return] - bool_return_is_error = "Failed to send rtcp" - - [[object.function]] - name = "send_rtp" - [object.function.return] - bool_return_is_error = "Failed to send rtp" - - [[object.function]] - name = "set_active" - [object.function.return] - bool_return_is_error = "Failed to set active" + [[object.member]] + name = "none" + ignore = true [[object]] name = "GstRtspServer.RTSPAddressPool" @@ -247,6 +134,50 @@ manual_traits = ["RTSPAddressPoolExtManual"] name = "reserve_address" manual = true +[[object]] +name="GstRtspServer.RTSPAuth" +status="generate" +manual_traits = ["RTSPAuthExtManual"] + + [[object.function]] + name = "check" + [object.function.return] + bool_return_is_error = "Check failed" + + [[object.function]] + name = "connect_accept_certificate" + # Use Result<(), LoggableError> + manual = true + + [[object.function]] + name = "make_basic" + [object.function.return] + nullable = false + + [[object.function]] + name = "set_default_token" + # gir forgets mut + manual = true + +[[object]] +name = "GstRtspServer.RTSPClient" +status = "generate" +manual_traits = ["RTSPClientExtManual"] + + [[object.function]] + name = "attach" + manual = true + + [[object.function]] + name = "set_send_func" + # user_data takes raw pointer + ignore = true + +[[object]] +name = "GstRtspServer.RTSPContext" +status = "manual" +ref_mode = "ref" + [[object]] name = "GstRtspServer.RTSPMedia" status = "generate" @@ -296,6 +227,43 @@ manual_traits = ["RTSPMediaFactoryExtManual"] [object.function.return] nullable_return_is_error = "Failed to create media element" + +[[object]] +name="GstRtspServer.RTSPMountPoints" +status="generate" + [[object.function]] + name = "make_path" + [object.function.return] + nullable_return_is_error = "Failed to make path" + + +[[object]] +name = "GstRtspServer.RTSPServer" +status = "generate" +manual_traits = ["RTSPServerExtManual"] + + [[object.function]] + name = "attach" + manual = true + + [[object.function]] + name = "io_func" + [object.function.return] + bool_return_is_error = "Failed to connect the source" + + [[object.function]] + name = "transfer_connection" + [object.function.return] + bool_return_is_error = "Failed to transfer to the connection" + +[[object]] +name="GstRtspServer.RTSPSession" +status="generate" + [[object.function]] + name = "manage_media" + [object.function.return] + nullable_return_is_error = "Failed to manage media" + [[object]] name = "GstRtspServer.RTSPSessionMedia" status = "generate" @@ -326,49 +294,83 @@ manual_traits = ["RTSPSessionPoolExtManual"] nullable_return_is_error = "Failed to create session pool" [[object]] -name="GstRtspServer.RTSPAuth" -status="generate" -manual_traits = ["RTSPAuthExtManual"] - - [[object.function]] - name = "check" - [object.function.return] - bool_return_is_error = "Check failed" - - [[object.function]] - name = "connect_accept_certificate" - # Use Result<(), LoggableError> - manual = true - - [[object.function]] - name = "make_basic" - [object.function.return] - nullable = false - - [[object.function]] - name = "set_default_token" - # gir forgets mut - manual = true - -[[object]] -name="GstRtspServer.RTSPMountPoints" -status="generate" - [[object.function]] - name = "make_path" - [object.function.return] - nullable_return_is_error = "Failed to make path" - -[[object]] -name="GstRtspServer.RTSPSession" -status="generate" - [[object.function]] - name = "manage_media" - [object.function.return] - nullable_return_is_error = "Failed to manage media" - -[[object]] -name = "GstRtspServer.RTSPAddressFlags" +name = "GstRtspServer.RTSPStream" status = "generate" - [[object.member]] - name = "none" + + [[object.function]] + name = "query_position" ignore = true + + [[object.function]] + name = "query_stop" + ignore = true + + [[object.function]] + name = "add_transport" + [object.function.return] + bool_return_is_error = "Failed to add transport" + + [[object.function]] + name = "remove_transport" + [object.function.return] + bool_return_is_error = "Failed to remove transport" + + [[object.function]] + name = "join_bin" + [object.function.return] + bool_return_is_error = "Failed to join bin" + + [[object.function]] + name = "leave_bin" + [object.function.return] + bool_return_is_error = "Failed to leave bin" + + [[object.function]] + name = "set_blocked" + [object.function.return] + bool_return_is_error = "Failed to block/unblock the dataflow" + + [[object.function]] + name = "unblock_linked" + [object.function.return] + bool_return_is_error = "Failed to unblock the dataflow" + + [[object.function]] + name = "update_crypto" + [object.function.return] + bool_return_is_error = "Failed to update crypto" + +[[object]] +name = "GstRtspServer.RTSPStreamTransport" +status = "generate" +concurrency = "none" + + [[object.function]] + name = "send_rtcp" + [object.function.return] + bool_return_is_error = "Failed to send rtcp" + + [[object.function]] + name = "send_rtp" + [object.function.return] + bool_return_is_error = "Failed to send rtp" + + [[object.function]] + name = "set_active" + [object.function.return] + bool_return_is_error = "Failed to set active" + +[[object]] +name = "GstRtspServer.RTSPThread" +status = "manual" +ref_mode = "ref" + + [[object.function]] + name = "stop" + # Moved to RTSPThreadRef + ignore = true + +[[object]] +name = "GstRtspServer.RTSPToken" +status = "manual" +ref_mode = "ref" diff --git a/gstreamer-rtsp-server/tests/check_gir.rs b/gstreamer-rtsp-server/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-rtsp-server/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-rtsp/Cargo.toml b/gstreamer-rtsp/Cargo.toml index c57e3d5ee..05e5ac202 100644 --- a/gstreamer-rtsp/Cargo.toml +++ b/gstreamer-rtsp/Cargo.toml @@ -21,6 +21,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_10 = ["gst/v1_10", "gst-sdp/v1_10", "ffi/v1_10"] diff --git a/gstreamer-rtsp/Gir.toml b/gstreamer-rtsp/Gir.toml index 9fbcf480b..e8764dfde 100644 --- a/gstreamer-rtsp/Gir.toml +++ b/gstreamer-rtsp/Gir.toml @@ -10,9 +10,9 @@ single_version_file = true generate_display_trait = false external_libraries = [ + "Gio", "GLib", "GObject", - "Gio", "GstSdp" ] @@ -34,18 +34,9 @@ manual = [ ] [[object]] -name = "GstRtsp.RTSPUrl" -status = "generate" -concurrency = "send" - - [[object.function]] - name = "get_port" - ignore = true - -[[object]] -name = "GstRtsp.RTSPAuthParam" -status = "generate" -concurrency = "send" +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" [[object]] name = "Gst.ClockTime" @@ -53,14 +44,14 @@ status = "manual" conversion_type = "Option" [[object]] -name = "Gst.Caps" +name = "Gst.Structure" status = "manual" ref_mode = "ref" [[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" +name = "GstRtsp.RTSPAuthParam" +status = "generate" +concurrency = "send" [[object]] name = "GstRtsp.RTSPLowerTrans" @@ -89,3 +80,12 @@ status = "generate" [[object.member]] name = "unknown" ignore = true + +[[object]] +name = "GstRtsp.RTSPUrl" +status = "generate" +concurrency = "send" + + [[object.function]] + name = "get_port" + ignore = true diff --git a/gstreamer-rtsp/tests/check_gir.rs b/gstreamer-rtsp/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-rtsp/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-sdp/Cargo.toml b/gstreamer-sdp/Cargo.toml index b94718e29..b50b674f4 100644 --- a/gstreamer-sdp/Cargo.toml +++ b/gstreamer-sdp/Cargo.toml @@ -18,6 +18,9 @@ ffi = { package = "gstreamer-sdp-sys", path = "sys", features = ["v1_8"] } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] v1_8_1 = ["ffi/v1_8_1"] diff --git a/gstreamer-sdp/tests/check_gir.rs b/gstreamer-sdp/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-sdp/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-tag/tests/check_gir.rs b/gstreamer-tag/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-tag/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index dbfe9ec07..61454c651 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -27,6 +27,7 @@ fragile = "1" [dev-dependencies] itertools = "0.10" +gir-format-check = "0.1" [features] default = [] diff --git a/gstreamer-video/Gir.toml b/gstreamer-video/Gir.toml index 24e9ba12a..ecba6bff8 100644 --- a/gstreamer-video/Gir.toml +++ b/gstreamer-video/Gir.toml @@ -65,8 +65,8 @@ manual = [ "GstBase.BaseTransform", "GstVideo.VideoCodecFrame", "GstVideo.VideoCodecState", - "GstVideo.VideoColorRange", "GstVideo.VideoColorimetry", + "GstVideo.VideoColorRange", "GstVideo.VideoFormatInfo", "GstVideo.VideoInfo", "GstVideo.VideoMeta", @@ -74,64 +74,78 @@ manual = [ "GstVideo.VideoTimeCodeInterval", ] -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" - [[object]] name = "Gst.Caps" status = "manual" ref_mode = "ref" [[object]] -name = "GstVideo.VideoFrame" +name = "Gst.ClockTime" status = "manual" - - [[object.function]] - name = "map" - # Readable and writable variant dealing with mutability - rename = "from_buffer_readable" +conversion_type = "Option" [[object]] -name = "GstVideo.VideoOrientation" +name = "GstVideo.VideoBufferFlags" status = "generate" - [[object.function]] - name = "set_hcenter" - [object.function.return] - bool_return_is_error = "Failed to set horizontal centering" - [[object.function]] - name = "set_hflip" - [object.function.return] - bool_return_is_error = "Failed to set horizontal flipping" - [[object.function]] - name = "set_vcenter" - [object.function.return] - bool_return_is_error = "Failed to set vertical centering" - [[object.function]] - name = "set_vflip" - [object.function.return] - bool_return_is_error = "Failed to set vertical flipping" + [[object.member]] + name = "top_field" + version = "1.16" + [[object.member]] + name = "bottom_field" + version = "1.16" + [[object.member]] + name = "marker" + version = "1.18" + [[object.member]] + name = "last" + ignore = true [[object]] -name = "GstVideo.VideoOverlay" +name = "GstVideo.VideoChromaSite" status = "generate" -manual_traits = ["VideoOverlayExtManual"] - - [[object.function]] - name = "set_property" - # Only for implementors of GstVideoOverlay + [[object.member]] + name = "unknown" ignore = true [[object.function]] - name = "set_window_handle" - # Pointer argument + name = "to_string" + # Manual function for < v1_20: manual = true - - [[object.function]] - name = "set_render_rectangle" + # Always generate the trait, without version constraint: + version = "1.8" [object.function.return] - bool_return_is_error = "Failed to set render rectangle" + nullable = false + +[[object]] +name = "GstVideo.VideoCodecFrameFlags" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.20" + +[[object]] +name = "GstVideo.VideoColorMatrix" +status = "generate" + [[object.function]] + name = "get_Kr_Kb" + # Function and parameter name capitalization is wrong + ignore = true + +[[object]] +name = "GstVideo.VideoColorPrimaries" +status = "generate" + [[object.member]] + name = "smptest428" + version = "1.16" + [[object.member]] + name = "smpterp431" + version = "1.16" + [[object.member]] + name = "smpteeg432" + version = "1.16" + [[object.member]] + name = "ebu3213" + version = "1.16" [[object]] name = "GstVideo.VideoDecoder" @@ -295,6 +309,24 @@ manual_traits = ["VideoEncoderExtManual"] [object.function.return] nullable_return_is_error = "Failed to allocate output buffer" +[[object]] +name = "GstVideo.VideoFieldOrder" +status = "generate" + + [[object.function]] + name = "to_string" + # This has an Unknown field that may return NULL or "UNKNOWN" + manual = true + [object.function.return] + nullable = false + +[[object]] +name = "GstVideo.VideoFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + [[object]] name = "GstVideo.VideoFormat" status = "generate" @@ -465,33 +497,13 @@ status = "generate" manual = true [[object]] -name = "GstVideo.VideoSink" -status = "generate" +name = "GstVideo.VideoFrame" +status = "manual" [[object.function]] - name = "center_rect" - # Implemented in video_rectangle - manual = true - -[[object]] -name = "GstVideo.VideoOverlayFormatFlags" -status = "generate" - [[object.function]] - name = "get_type" - version = "1.16" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "GstVideo.VideoTimeCodeFlags" -status = "generate" - [[object.function]] - name = "get_type" - version = "1.18" - [[object.member]] - name = "none" - ignore = true + name = "map" + # Readable and writable variant dealing with mutability + rename = "from_buffer_readable" [[object]] name = "GstVideo.VideoFrameFlags" @@ -502,28 +514,8 @@ status = "generate" [[object.member]] name = "bottom_field" version = "1.16" - -[[object]] -name = "GstVideo.VideoCodecFrameFlags" -status = "generate" - [[object.function]] - name = "get_type" - version = "1.20" - -[[object]] -name = "GstVideo.VideoBufferFlags" -status = "generate" [[object.member]] - name = "top_field" - version = "1.16" - [[object.member]] - name = "bottom_field" - version = "1.16" - [[object.member]] - name = "marker" - version = "1.18" - [[object.member]] - name = "last" + name = "none" ignore = true [[object]] @@ -538,36 +530,6 @@ status = "generate" [object.function.return] nullable = false -[[object]] -name = "GstVideo.VideoChromaSite" -status = "generate" - [[object.member]] - name = "unknown" - ignore = true - - [[object.function]] - name = "to_string" - # Manual function for < v1_20: - manual = true - # Always generate the trait, without version constraint: - version = "1.8" - [object.function.return] - nullable = false - -[[object]] -name = "GstVideo.VideoFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "GstVideo.VideoFrameFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object]] name = "GstVideo.VideoMultiviewFlags" status = "generate" @@ -575,6 +537,56 @@ status = "generate" name = "none" ignore = true +[[object]] +name = "GstVideo.VideoOrientation" +status = "generate" + [[object.function]] + name = "set_hcenter" + [object.function.return] + bool_return_is_error = "Failed to set horizontal centering" + [[object.function]] + name = "set_hflip" + [object.function.return] + bool_return_is_error = "Failed to set horizontal flipping" + [[object.function]] + name = "set_vcenter" + [object.function.return] + bool_return_is_error = "Failed to set vertical centering" + [[object.function]] + name = "set_vflip" + [object.function.return] + bool_return_is_error = "Failed to set vertical flipping" + +[[object]] +name = "GstVideo.VideoOverlay" +status = "generate" +manual_traits = ["VideoOverlayExtManual"] + + [[object.function]] + name = "set_property" + # Only for implementors of GstVideoOverlay + ignore = true + + [[object.function]] + name = "set_window_handle" + # Pointer argument + manual = true + + [[object.function]] + name = "set_render_rectangle" + [object.function.return] + bool_return_is_error = "Failed to set render rectangle" + +[[object]] +name = "GstVideo.VideoOverlayFormatFlags" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.16" + [[object.member]] + name = "none" + ignore = true + [[object]] name = "GstVideo.VideoPackFlags" status = "generate" @@ -582,6 +594,25 @@ status = "generate" name = "none" ignore = true +[[object]] +name = "GstVideo.VideoSink" +status = "generate" + + [[object.function]] + name = "center_rect" + # Implemented in video_rectangle + manual = true + +[[object]] +name = "GstVideo.VideoTimeCodeFlags" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.18" + [[object.member]] + name = "none" + ignore = true + [[object]] name = "GstVideo.VideoTransferFunction" status = "generate" @@ -594,38 +625,3 @@ status = "generate" [[object.member]] name = "arib_std_b67" version = "1.18" - -[[object]] -name = "GstVideo.VideoColorPrimaries" -status = "generate" - [[object.member]] - name = "smptest428" - version = "1.16" - [[object.member]] - name = "smpterp431" - version = "1.16" - [[object.member]] - name = "smpteeg432" - version = "1.16" - [[object.member]] - name = "ebu3213" - version = "1.16" - -[[object]] -name = "GstVideo.VideoFieldOrder" -status = "generate" - - [[object.function]] - name = "to_string" - # This has an Unknown field that may return NULL or "UNKNOWN" - manual = true - [object.function.return] - nullable = false - -[[object]] -name = "GstVideo.VideoColorMatrix" -status = "generate" - [[object.function]] - name = "get_Kr_Kb" - # Function and parameter name capitalization is wrong - ignore = true diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index 8211ebb3a..6e78f8c74 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -479,8 +479,12 @@ bitflags! { const MULTIPLE_VIEW = ffi::GST_VIDEO_FRAME_FLAG_MULTIPLE_VIEW as u32; #[doc(alias = "GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE")] const FIRST_IN_BUNDLE = ffi::GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE as u32; + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(alias = "GST_VIDEO_FRAME_FLAG_TOP_FIELD")] const TOP_FIELD = ffi::GST_VIDEO_FRAME_FLAG_TOP_FIELD as u32; + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(alias = "GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD")] const BOTTOM_FIELD = ffi::GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD as u32; } diff --git a/gstreamer-video/tests/check_gir.rs b/gstreamer-video/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-video/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer-webrtc/Cargo.toml b/gstreamer-webrtc/Cargo.toml index 0c2510a9e..2172ad781 100644 --- a/gstreamer-webrtc/Cargo.toml +++ b/gstreamer-webrtc/Cargo.toml @@ -20,6 +20,9 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_14"] } gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp", features = ["v1_14"] } +[dev-dependencies] +gir-format-check = "0.1" + [features] default = [] dox = ["v1_20", "ffi/dox", "glib/dox", "gst/dox", "gst-sdp/dox"] diff --git a/gstreamer-webrtc/Gir.toml b/gstreamer-webrtc/Gir.toml index 28c548c56..eb2ae778b 100644 --- a/gstreamer-webrtc/Gir.toml +++ b/gstreamer-webrtc/Gir.toml @@ -45,6 +45,16 @@ manual = [ "GstSdp.SDPMessage", ] +[[object]] +name = "GstWebRTC.WebRTCDataChannel" +status = "generate" +final_type = true + + [[object.function]] + name = "on_error" + # takes ownership of SDP message + manual = true + [[object]] name = "GstWebRTC.WebRTCDTLSTransport" status = "generate" @@ -71,24 +81,9 @@ status = "generate" final_type = true [[object]] -name = "GstWebRTC.WebRTCSessionDescription" +name = "GstWebRTC.WebRTCSCTPTransport" status = "generate" -final_type = true - - [[object.function]] - name = "new" - # takes ownership of SDP message - ignore = true - -[[object]] -name = "GstWebRTC.WebRTCDataChannel" -status = "generate" -final_type = true - - [[object.function]] - name = "on_error" - # takes ownership of SDP message - manual = true +version = "1.20" [[object]] name = "GstWebRTC.WebRTCSDPType" @@ -100,6 +95,11 @@ status = "generate" nullable = false [[object]] -name = "GstWebRTC.WebRTCSCTPTransport" +name = "GstWebRTC.WebRTCSessionDescription" status = "generate" -version = "1.20" +final_type = true + + [[object.function]] + name = "new" + # takes ownership of SDP message + ignore = true diff --git a/gstreamer-webrtc/tests/check_gir.rs b/gstreamer-webrtc/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer-webrtc/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +} diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index a2841253f..ee1503f3e 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -38,6 +38,7 @@ fragile = "1" ron = "0.7" serde_json = "1.0" futures-executor = "0.3.1" +gir-format-check = "0.1" [features] default = [] diff --git a/gstreamer/Gir.toml b/gstreamer/Gir.toml index 4ad129e9e..49170846a 100644 --- a/gstreamer/Gir.toml +++ b/gstreamer/Gir.toml @@ -73,1744 +73,6 @@ manual = [ "Gst.TypeFind", ] -[[object]] -name = "Gst.Allocator" -status = "generate" - - [[object.function]] - name = "alloc" - [object.function.return] - nullable_return_is_error = "Failed to allocate memory" - [[object.function.parameter]] - name = "params" - const = true - -[[object]] -name = "Gst.Bin" -status = "generate" -trait_name = "GstBinExt" - [[object.signal]] - name = "do-latency" - # Use Result<(), glib::BoolError> - manual = true - - [[object.function]] - name = "add_many" - # Implemented by repeatedly calling add() - manual = true - [[object.function]] - name = "remove_many" - # Implemented by repeatedly calling remove() - manual = true - - [[object.function]] - name = "iterate_all_by_element_factory_name" - manual = true - [[object.function]] - name = "iterate_all_by_interface" - manual = true - [[object.function]] - name = "iterate_elements" - manual = true - [[object.function]] - name = "iterate_recurse" - manual = true - [[object.function]] - name = "iterate_sinks" - manual = true - [[object.function]] - name = "iterate_sorted" - manual = true - [[object.function]] - name = "iterate_sources" - manual = true - - [[object.function]] - name = "add" - [object.function.return] - bool_return_is_error = "Failed to add element" - - [[object.function]] - name = "remove" - [object.function.return] - bool_return_is_error = "Failed to remove element" - - [[object.function]] - name = "recalculate_latency" - [object.function.return] - bool_return_is_error = "Failed to recalculate latency" - - [[object.function]] - name = "sync_children_states" - [object.function.return] - bool_return_is_error = "Failed to sync children states" - -[[object]] -name = "Gst.BinFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.Bus" -status = "generate" -final_type = true - [[object.function]] - name = "set_sync_handler" - # Into> makes this hard to use - manual = true - - [[object.function]] - name = "add_signal_watch_full" - # Priority - manual = true - - [[object.function]] - name = "timed_pop_filtered" - # Uses enum as flags - manual = true - [[object.function]] - name = "pop_filtered" - # Uses enum as flags - manual = true - [[object.function]] - name = "poll" - # Uses enum as flags - manual = true - - [[object.function]] - name = "create_watch" - # More convenient manual implementation - manual = true - - [[object.function]] - name = "add_watch" - # More specific trait bounds possible for the closure - manual = true - - [[object.function]] - name = "add_watch_full" - # More specific trait bounds possible for the closure - manual = true - - [[object.function]] - name = "remove_watch" - [object.function.return] - bool_return_is_error = "Bus has no event source" - - [[object.signal]] - name = "message" - concurrency = "send" - - [[object.function]] - name = "post" - [object.function.return] - bool_return_is_error = "Failed to post message" - -[[object]] -name = "Gst.BufferFlags" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.BufferCopyFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.BufferPoolAcquireFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.ChildProxy" -status = "generate" -manual_traits = ["ChildProxyExtManual"] - [[object.function]] - name = "get_property" - rename = "child_property" - manual = true - [[object.function]] - name = "set_property" - rename = "set_child_property" - manual = true - [[object.function]] - name = "lookup" - manual = true - -[[object]] -name = "Gst.ClockTime" -status = "manual" -conversion_type = "Option" - -[[object]] -name = "Gst.ClockFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.ElementFactoryListType" -status = "manual" -conversion_type = "scalar" - -[[object]] -name = "Gst.Format" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - [[object.function]] - name = "register" - # Needs manual work - ignore = true - -[[object]] -name = "Gst.Memory" -status = "manual" - - [[object.function]] - name = "map" - # Readable and writable variant dealing with mutability - # Non-into variants available under MemoryRef - rename = "into_mapped_memory_readable" - - [[object.function]] - name = "unmap" - ignore = true - -[[object]] -name = "Gst.PadDirection" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.PadPresence" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.SeekFlags" -status = "generate" - [[object.member]] - name = "trickmode_forward_predicted" - version = "1.18" - [[object.member]] - name = "instant_rate_change" - version = "1.18" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.SegmentFlags" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.member]] - name = "trickmode_forward_predicted" - version = "1.18" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.StackTraceFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.StreamFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.TagSetter" -status = "generate" -manual_traits = ["TagSetterExtManual"] - [[object.function]] - name = "add_tag_value" - manual = true - - [[object.function]] - name = "add_tags" - # Takes a raw pointer - ignore = true - -[[object]] -name = "Gst.TocScope" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.TocEntryType" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.TocLoopType" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.Rank" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug" - -[[object]] -name = "Gst.TypeFindProbability" -status = "generate" - [[object.derive]] - name = "Debug" - -[[object]] -name = "Gst.EventType" -status = "generate" - [[object.derive]] - name = "Debug, PartialEq, Eq, Hash" - [[object.member]] - name = "select_streams" - version = "1.10" - [[object.member]] - name = "stream_collection" - version = "1.10" - [[object.member]] - name = "stream_group_done" - version = "1.10" - [[object.member]] - name = "instant_rate_change" - version = "1.18" - [[object.member]] - name = "instant_rate_sync_time" - version = "1.18" - -[[object]] -name = "Gst.Structure" -status = "manual" -ref_mode = "ref" - # Functions moved to `StructureRef` - [[object.function]] - name = "set" - ignore = true - [[object.function]] - name = "set_value" - ignore = true - [[object.function]] - name = "get_value" - ignore = true - - [[object.function]] - name = "id_get_value" - rename = "value_by_quark" - ignore = true - [[object.function]] - name = "take_value" - rename = "set_value" - ignore = true - [[object.function]] - name = "id_take_value" - rename = "set_value_by_quark" - ignore = true - [[object.function]] - name = "get_name" - rename = "name" - ignore = true - [[object.function]] - name = "get_name_id" - rename = "name_quark" - ignore = true - [[object.function]] - name = "set_name" - ignore = true - - [[object.function]] - name = "has_field" - ignore = true - [[object.function]] - name = "has_field_with_typed" - rename = "has_field_with_type" - ignore = true - [[object.function]] - name = "id_has_field" - rename = "has_field_by_quark" - ignore = true - [[object.function]] - name = "id_has_field_typed" - rename = "has_field_with_type_by_quark" - ignore = true - [[object.function]] - name = "remove_field" - ignore = true - [[object.function]] - name = "remove_fields" - # Repeatedly call remove_field() - ignore = true - [[object.function]] - name = "remove_all_fields" - ignore = true - [[object.function]] - name = "get_nth_field_name" - ignore = true - [[object.function]] - name = "n_fields" - ignore = true - [[object.function]] - name = "can_intersect" - ignore = true - [[object.function]] - name = "intersect" - ignore = true - [[object.function]] - name = "is_subset" - ignore = true - - [[object.function]] - name = "fixate" - ignore=true - [[object.function]] - name = "fixate_field" - ignore=true - [[object.function]] - name = "fixate_field_boolean" - ignore=true - [[object.function]] - name = "fixate_field_string" - ignore=true - [[object.function]] - name = "fixate_field_nearest_double" - ignore=true - [[object.function]] - name = "fixate_field_nearest_fraction" - ignore=true - [[object.function]] - name = "fixate_field_nearest_int" - ignore=true - - # Not implemented - [[object.function]] - name = "set_parent_refcount" - ignore = true - -[[object]] -name = "Gst.ParseContext" -status = "manual" -ref_mode = "ref-mut" - -[[object]] -name = "Gst.ParseFlags" -status = "generate" - [[object.member]] - name = "place_in_bin" - version = "1.10" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.PipelineFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.PluginDependencyFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - -[[object]] -name = "Gst.Caps" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Buffer" -status = "manual" -ref_mode = "ref" - - [[object.function]] - name = "map" - # Readable and writable variant dealing with mutability - # Non-into variants available under BufferRef - rename = "into_mapped_buffer_readable" - - [[object.function]] - name = "unmap" - ignore = true - -[[object]] -name = "Gst.BufferList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Sample" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Message" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Event" -status = "manual" -ref_mode = "ref" - - [[object.function]] - name = "new_caps" - # Moved to CapsBuilder::new() - ignore = true - - [[object.function]] - name = "new_qos" - # Moved to QosBuilder::new() - ignore = true - - [[object.function]] - name = "new_seek" - # Moved to SeekBuilder::new() - ignore = true - - [[object.function]] - name = "parse_stream" - # Moved to StreamStart::stream() - ignore = true - - [[object.function]] - name = "parse_stream_start" - # Moved to StreamStart::stream_id() - ignore = true - -[[object]] -name = "Gst.TagList" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.TagScope" -status = "generate" - [[object.derive]] - name = "serde::Serialize, serde::Deserialize" - cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - -[[object]] -name = "Gst.Query" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Context" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Toc" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.TocEntry" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.Pipeline" -status = "generate" - [[object.function]] - name = "get_delay" - [object.function.return] - mandatory = true - - [[object.function]] - name = "set_delay" - [[object.function.parameter]] - name = "delay" - mandatory = true - -[[object]] -name = "Gst.Promise" -status = "manual" -ref_mode = "ref" - -[[object]] -name = "Gst.ClockID" -status = "manual" - - [[object.function]] - name = "compare_func" - rename = "compare_by_time" - -[[object]] -name = "Gst.Clock" -status = "generate" -manual_traits = ["ClockExtManual"] - [[object.function]] - name = "adjust_with_calibration" - # Associated function - manual = true - [[object.function]] - name = "unadjust_with_calibration" - # Associated function - manual = true - - [[object.function]] - name = "new_periodic_id" - manual = true - [[object.function]] - name = "periodic_id_reinit" - manual = true - [[object.function]] - name = "new_single_shot_id" - manual = true - [[object.function]] - name = "single_shot_id_reinit" - manual = true - - [[object.function]] - name = "add_observation" - [[object.function.parameter]] - name = "slave" - mandatory = true - [[object.function.parameter]] - name = "master" - mandatory = true - - [[object.function]] - name = "add_observation_unapplied" - [[object.function.parameter]] - name = "slave" - mandatory = true - [[object.function.parameter]] - name = "master" - mandatory = true - [[object.function.parameter]] - name = "internal" - mandatory = true - [[object.function.parameter]] - name = "external" - mandatory = true - [[object.function.parameter]] - name = "rate_num" - mandatory = true - [[object.function.parameter]] - name = "rate_denom" - mandatory = true - - [[object.function]] - name = "adjust_unlocked" - [[object.function.parameter]] - name = "internal" - mandatory = true - - [[object.function]] - name = "get_calibration" - [[object.function.parameter]] - name = "internal" - mandatory = true - [[object.function.parameter]] - name = "external" - mandatory = true - [[object.function.parameter]] - name = "rate_num" - mandatory = true - [[object.function.parameter]] - name = "rate_denom" - mandatory = true - - [[object.function]] - name = "get_internal_time" - [object.function.return] - mandatory = true - - [[object.function]] - name = "get_resolution" - [object.function.return] - mandatory = true - - [[object.function]] - name = "set_calibration" - [[object.function.parameter]] - name = "internal" - mandatory = true - [[object.function.parameter]] - name = "external" - mandatory = true - [[object.function.parameter]] - name = "rate_num" - mandatory = true - [[object.function.parameter]] - name = "rate_denom" - mandatory = true - - [[object.function]] - name = "set_master" - [object.function.return] - bool_return_is_error = "Failed to set master clock" - - [[object.function]] - name = "set_resolution" - [[object.function.parameter]] - name = "resolution" - mandatory = true - [object.function.return] - mandatory = true - - [[object.function]] - name = "unadjust_unlocked" - [[object.function.parameter]] - name = "external" - mandatory = true - - [[object.function]] - name = "wait_for_sync" - [object.function.return] - bool_return_is_error = "Timed out waiting for sync" - -[[object]] -name = "Gst.ClockType" -status = "generate" - [[object.member]] - name = "tai" - version = "1.18" - -[[object]] -name = "Gst.ElementFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.MemoryFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.Element" -status = "generate" -manual_traits = ["ElementExtManual"] - - # Manual implementation provides associated functions on `Element`, - # but gir considers these methods on `ElementExtManual` in the docs. - [[object.function]] - name = "link_many" - ignore = true - [[object.function]] - name = "unlink_many" - ignore = true - [[object.function]] - name = "register" - ignore = true - - [[object.function]] - name = "call_async" - # more specific closure type possible - manual = true - - [[object.function]] - name = "set_base_time" - [[object.function.parameter]] - name = "time" - mandatory = true - - [[object.function]] - name = "get_current_running_time" - # manual implementation also works for earlier versions - manual = true - - [[object.function]] - name = "get_current_clock_time" - # manual implementation also works for earlier versions - manual = true - - [[object.function]] - name = "get_request_pad" - # rename to more explicit name and avoid conflict with `request_pad` - rename = "request_pad_simple" - # Renamed version is not deprecated - manual = true - - [[object.function]] - name = "request_pad_simple" - # see above - manual = true - - [[object.function]] - name = "post_message" - # takes ownership of message - manual = true - - [[object.function]] - name = "add_pad" - [object.function.return] - bool_return_is_error = "Failed to add pad" - - [[object.function]] - name = "remove_pad" - [object.function.return] - bool_return_is_error = "Failed to remove pad" - - [[object.function]] - name = "link" - [object.function.return] - bool_return_is_error = "Failed to link elements" - - [[object.function]] - name = "link_filtered" - [[object.function.parameter]] - name = "filter" - # Can use `link` instead - nullable = false - [object.function.return] - bool_return_is_error = "Failed to link elements" - - [[object.function]] - name = "link_pads" - [object.function.return] - bool_return_is_error = "Failed to link pads" - - [[object.function]] - name = "link_pads_filtered" - [[object.function.parameter]] - name = "filter" - # Can use `link` instead - nullable = false - [object.function.return] - bool_return_is_error = "Failed to link pads" - - [[object.function]] - name = "link_pads_full" - [object.function.return] - bool_return_is_error = "Failed to link pads" - - [[object.function]] - name = "set_clock" - [object.function.return] - bool_return_is_error = "Failed to set clock" - - [[object.function]] - name = "sync_state_with_parent" - [object.function.return] - bool_return_is_error = "Failed to sync state with parent" - - [[object.function]] - name = "query" - # correct mutability - manual = true - - [[object.function]] - name = "send_event" - # Pass by value - manual = true - - [[object.function]] - name = "get_context_unlocked" - # Unsafe - ignore = true - - [[object.function]] - name = "add_property_deep_notify_watch" - # ulong - manual = true - - [[object.function]] - name = "add_property_notify_watch" - # ulong - manual = true - - [[object.function]] - name = "remove_property_notify_watch" - # ulong - manual = true - - [[object.function]] - name = "query_duration" - # formatted value - manual = true - - [[object.function]] - name = "query_position" - # formatted value - manual = true - - [[object.function]] - name = "query_convert" - # formatted value - manual = true - - [[object.function]] - name = "seek" - # formatted value - manual = true - - [[object.function]] - name = "seek_simple" - # formatted value - manual = true - - [[object.function]] - name = "state_change_return_get_name" - # Wrong place - ignore = true - - [[object.function]] - name = "state_get_name" - # Wrong place - ignore = true - - [[object.function]] - name = "get_metadata" - # better manual function - manual = true - - [[object.function]] - name = "get_pad_template" - # better manual function - manual = true - - [[object.function]] - name = "get_pad_template_list" - # better manual function - manual = true - - # Limited subset of `MessageType`, - # see `ElementMessageType`. - [[object.function]] - name = "message_full" - manual = true - [[object.function]] - name = "message_full_with_details" - manual = true - - # Return iterators - [[object.function]] - name = "iterate_pads" - manual = true - [[object.function]] - name = "iterate_sink_pads" - manual = true - [[object.function]] - name = "iterate_src_pads" - manual = true - -[[object]] -name = "Gst.ElementFactory" -status = "generate" -final_type = true - [[object.function]] - name = "create" - [object.function.return] - nullable_return_is_error = "Failed to create element from factory" - - [[object.function]] - name = "make" - [object.function.return] - nullable_return_is_error = "Failed to create element from factory name" - - [[object.function]] - name = "create_full" - # varargs - ignore = true - - [[object.function]] - name = "create_valist" - # varargs - ignore = true - - [[object.function]] - name = "create_with_properties" - # separate name/value arrays need to be merged - manual = true - - [[object.function]] - name = "make_full" - # varargs - ignore = true - - [[object.function]] - name = "make_valist" - # varargs - ignore = true - - [[object.function]] - name = "make_with_properties" - # separate name/value arrays need to be merged - manual = true - - [[object.function]] - name = "get_static_pad_templates" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "list_is_type" - rename = "has_type" - # Renamed flags type - manual = true - - [[object.function]] - name = "list_filter" - # can_{sink,src}_{all,any}_caps() around an iterator is the same - ignore = true - - [[object.function]] - name = "list_get_elements" - rename = "factories_with_type" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "get_metadata" - # Use str as return type - manual = true - -[[object]] -name = "Gst.TypeFindFactory" -status = "generate" -final_type = true - - [[object.function]] - name = "call_function" - # Set up native functions in `TypeFind`, calling into trait argument - manual = true - - [[object.function]] - name = "get_list" - rename = "factories" - # Use glib::List as return type - manual = true - -[[object]] -name = "Gst.DeviceProviderFactory" -status = "generate" -final_type = true - [[object.function]] - name = "list_get_device_providers" - rename = "factories" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "get_metadata" - # Use str as return type - manual = true - -[[object]] -name = "Gst.DeviceProvider" -status = "generate" -manual_traits = ["DeviceProviderExtManual"] - [[object.function]] - name = "start" - [object.function.return] - bool_return_is_error = "Failed to start" - - [[object.function]] - name = "register" - manual = true - - [[object.function]] - name = "get_metadata" - # better manual function - manual = true - - [[object.function]] - name = "get_devices" - # Use glib::List as return type - manual = true - -[[object]] -name = "Gst.DeviceMonitor" -status = "generate" -manual_traits = ["DeviceMonitorExtManual"] - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - - [[object.function]] - name = "add_filter" - # Return Option - manual = true - - [[object.function]] - name = "start" - [object.function.return] - bool_return_is_error = "Failed to start" - - [[object.function]] - name = "remove_filter" - # Use DeviceMonitorFilterId and return Result<(), glib::BoolError> - manual = true - - [[object.function]] - name = "get_devices" - # Use glib::List as return type - manual = true - -[[object]] -name = "Gst.Device" -status = "generate" - [[object.function]] - name = "reconfigure_element" - [object.function.return] - bool_return_is_error = "Failed to reconfigure the element to use this device" - - [[object.function]] - name = "create_element" - [object.function.return] - nullable_return_is_error = "Failed to create element for device" - -[[object]] -name = "Gst.Object" -# For renaming the trait... -status = "generate" -trait_name = "GstObjectExt" - [[object.function]] - name = "set_name" - # Don't allow changing the name at random times - ignore = true - - [[object.property]] - name = "name" - # There are accessor functions for this - ignore = true - - [[object.function]] - name = "ref_sink" - # Takes a raw pointer - ignore = true - - [[object.function]] - name = "get_name" - [object.function.return] - # Nullable state only occurs during instance init and finalize - # which cannot be observed from Rust - nullable = false - - [[object.function]] - name = "set_parent" - [object.function.return] - bool_return_is_error = "Failed to set parent object" - - [[object.function]] - name = "sync_values" - [[object.function.parameter]] - name = "timestamp" - mandatory = true - [object.function.return] - bool_return_is_error = "Failed to sync values" - - [[object.function]] - name = "value" - [[object.function.parameter]] - name = "timestamp" - mandatory = true - - [[object.function]] - name = "get_g_value_array" - ignore = true - - [[object.function]] - name = "add_control_binding" - [object.function.return] - bool_return_is_error = "Failed to add control binding" - -[[object]] -name = "Gst.ObjectFlags" -status = "generate" - [[object.member]] - name = "may_be_leaked" - version = "1.10" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.PadFlags" -status = "generate" - [[object.member]] - name = "last" - ignore = true - -[[object]] -name = "Gst.PadLinkCheck" -status = "generate" - [[object.member]] - name = "nothing" - ignore = true - -[[object]] -name = "Gst.PadProbeType" -status = "generate" - [[object.member]] - name = "invalid" - ignore = true - -[[object]] -name = "Gst.Pad" -status = "generate" -manual_traits = ["PadExtManual"] - [[object.function]] - name = "link_maybe_ghosting" - [object.function.return] - bool_return_is_error = "Failed to link pads, possibly ghosting" - - [[object.function]] - name = "link_maybe_ghosting_full" - [object.function.return] - bool_return_is_error = "Failed to link pads, possibly ghosting" - - [[object.function]] - name = "unlink" - [object.function.return] - bool_return_is_error = "Failed to unlink pad" - - [[object.function]] - name = "pause_task" - [object.function.return] - bool_return_is_error = "Failed to pause pad task" - - [[object.function]] - name = "stop_task" - [object.function.return] - bool_return_is_error = "Failed to stop pad task" - - [[object.function]] - name = "set_active" - [object.function.return] - bool_return_is_error = "Failed to activate pad" - - [[object.function]] - name = "activate_mode" - [object.function.return] - bool_return_is_error = "Failed to activate mode pad" - - [[object.function]] - name = "remove_probe" - # Don't use a ulong - manual = true - - [[object.function]] - name = "chain" - # Move buffer - manual = true - - [[object.function]] - name = "push" - # Move buffer - manual = true - - [[object.function]] - name = "chain_list" - # Move buffer - manual = true - - [[object.function]] - name = "push_list" - # Move buffer - manual = true - - [[object.function]] - name = "pull_range" - # Buffer can be NULL - manual = true - - [[object.function]] - name = "get_range" - # Buffer can be NULL - manual = true - - [[object.function]] - name = "get_last_flow_return" - # Use Result - rename = "last_flow_result" - - [[object.function]] - name = "query" - # Correct mutability - manual = true - - [[object.function]] - name = "peer_query" - # Correct mutability - manual = true - - [[object.function]] - name = "query_default" - # Correct mutability - manual = true - - [[object.function]] - name = "proxy_query_caps" - # Correct mutability - manual = true - - [[object.function]] - name = "proxy_query_accept_caps" - # Correct mutability - manual = true - - [[object.function]] - name = "event_default" - # Pass by value - manual = true - - [[object.function]] - name = "push_event" - # Pass by value - manual = true - - [[object.function]] - name = "send_event" - # Pass by value - manual = true - - [[object.function]] - name = "new" - # Also has builder() - manual = true - - [[object.function]] - name = "new_from_template" - # Also has builder_with_template() - rename = "from_template" - manual = true - - [[object.function]] - name = "new_from_static_template" - # Also has builder_with_static_template() - rename = "from_static_template" - manual = true - - [[object.function]] - name = "query_duration" - # formatted value - manual = true - - [[object.function]] - name = "query_position" - # formatted value - manual = true - - [[object.function]] - name = "query_convert" - # formatted value - manual = true - - [[object.function]] - name = "peer_query_duration" - # formatted value - manual = true - - [[object.function]] - name = "peer_query_position" - # formatted value - manual = true - - [[object.function]] - name = "peer_query_convert" - # formatted value - manual = true - - [[object.function]] - name = "link_get_name" - # Wrong place - manual = true - - [[object.function]] - pattern = "set_.*_function_full" - # More specific closure trait bounds possible - manual = true - - [[object.function]] - name = "start_task" - # More specific closure trait bounds possible - manual = true - - [[object.function]] - name = "sticky_events_foreach" - # Complex closure argument handling - manual = true - - [[object.function]] - name = "get_sticky_event" - # More convenient API - manual = true - - [[object.function]] - name = "add_probe" - # Complex closure argument handling - manual = true - - [[object.property]] - name = "template" - # Has a proper getter - ignore = true - -[[object]] -name = "Gst.PadTemplate" -status = "generate" -final_type = true - [[object.function]] - name = "new" - [object.function.return] - nullable_return_is_error = "Failed to create pad template" - - [[object.function]] - name = "new_with_gtype" - [object.function.return] - nullable_return_is_error = "Failed to create pad template" - - [[object.function]] - name = "new_from_static_pad_template_with_gtype" - # static pad template manual - manual = true - -[[object]] -name = "Gst.GhostPad" -status = "generate" - [[object.function]] - name = "set_target" - [object.function.return] - bool_return_is_error = "Failed to set target" - - [[object.function]] - name = "new" - rename = "with_target" - manual = true - - [[object.function]] - name = "new_no_target" - rename = "new" - manual = true - - [[object.function]] - name = "new_from_template" - rename = "from_template_with_target" - manual = true - - [[object.function]] - name = "new_no_target_from_template" - rename = "from_template" - manual = true - - [[object.function]] - name = "construct" - ignore = true - - [[object.function]] - name = "activate_mode_default" - # wrong instance type - manual = true - - [[object.function]] - name = "internal_activate_mode_default" - # wrong instance type - manual = true - -[[object]] -name = "Gst.ProxyPad" -status = "generate" -manual_traits = ["ProxyPadExtManual"] - - [[object.function]] - name = "chain_default" - # Buffer move - manual = true - - [[object.function]] - name = "chain_list_default" - # Buffer move - manual = true - - [[object.function]] - name = "getrange_default" - # Buffer move - manual = true - -[[object]] -name = "Gst.Stream" -status = "generate" -final_type = true - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - - [[object.property]] - name = "caps" - version = "1.10" - - [[object.property]] - name = "stream-flags" - version = "1.10" - - [[object.property]] - name = "stream-id" - version = "1.10" - - [[object.property]] - name = "stream-type" - version = "1.10" - - [[object.property]] - name = "tags" - version = "1.10" - -[[object]] -name = "Gst.StreamCollection" -status = "generate" -final_type = true - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - - [[object.function]] - name = "add_stream" - # Ignore return value which is always `true` - manual = true - - [[object.property]] - name = "upstream-id" - version = "1.10" - generate = ["get"] - -[[object]] -name = "Gst.Plugin" -status = "generate" -final_type = true - - [[object.function]] - pattern = "register_static.*" - # Needs manual implementation - ignore = true - - [[object.function]] - name = "list_free" - # useless and unsafe - ignore = true - - [[object.function]] - name = "set_cache_data" - # pass by value - manual = true - - [[object.function]] - name = "get_cache_data" - # structure ref - manual = true - - [[object.function]] - name = "load" - [object.function.return] - nullable_return_is_error = "Failed to load plugin" - - [[object.function]] - name = "load_by_name" - [object.function.return] - nullable_return_is_error = "Failed to load plugin" - -[[object]] -name = "Gst.PluginFeature" -status = "generate" -manual_traits = ["PluginFeatureExtManual"] - [[object.function]] - pattern = "list_.*" - ignore = true - - [[object.function]] - name = "rank_compare_func" - ignore = true - - [[object.function]] - name = "get_rank" - manual = true - - [[object.function]] - name = "set_rank" - manual = true - - [[object.function]] - name = "load" - manual = true - -[[object]] -name = "Gst.Registry" -status = "generate" -final_type = true - - [[object.function]] - pattern = "fork_.*" - ignore = true - - [[object.function]] - name = "add_feature" - [object.function.return] - bool_return_is_error = "Failed to add feature" - - [[object.function]] - name = "add_plugin" - [object.function.return] - bool_return_is_error = "Failed to add plugin" - - [[object.function]] - name = "feature_filter" - rename = "features_filtered" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "get_feature_list" - rename = "features" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "get_feature_list_by_plugin" - rename = "features_by_plugin" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "get_plugin_list" - rename = "plugins" - # Use glib::List as return type - manual = true - - [[object.function]] - name = "plugin_filter" - rename = "plugins_filtered" - # Use glib::List as return type - manual = true - -[[object]] -name = "Gst.BufferPool" -status = "generate" -manual_traits = ["BufferPoolExtManual"] - [[object.function]] - pattern = "config_.*" - # A different type - ignore = true - - [[object.function]] - name = "get_config" - # A different type - manual = true - - [[object.function]] - name = "set_config" - # Takes ownership - manual = true - - [[object.function]] - name = "acquire_buffer" - # Params and return value - manual = true - - [[object.function]] - name = "release_buffer" - # Takes ownership - manual = true - - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - - [[object.function]] - name = "set_active" - [object.function.return] - bool_return_is_error = "Failed to activate buffer pool" - -[[object]] -name = "Gst.Preset" -status = "generate" - - [[object.function]] - name = "set_app_dir" - [object.function.return] - bool_return_is_error = "Failed to set app preset directory" - - [[object.function]] - name = "delete_preset" - [object.function.return] - bool_return_is_error = "Failed to delete preset" - - [[object.function]] - name = "load_preset" - [object.function.return] - bool_return_is_error = "Failed to load preset" - - [[object.function]] - name = "save_preset" - [object.function.return] - bool_return_is_error = "Failed to save preset" - - [[object.function]] - name = "rename_preset" - [object.function.return] - bool_return_is_error = "Failed to rename preset" - - [[object.function]] - name = "set_meta" - [object.function.return] - bool_return_is_error = "Failed to set preset meta" - [[object]] name = "Gst.*" status = "generate" @@ -2131,50 +393,388 @@ status = "generate" manual = true [[object]] -name = "Gst.State" +name = "Gst.Allocator" +status = "generate" + + [[object.function]] + name = "alloc" + [object.function.return] + nullable_return_is_error = "Failed to allocate memory" + [[object.function.parameter]] + name = "params" + const = true + +[[object]] +name = "Gst.Bin" +status = "generate" +trait_name = "GstBinExt" + [[object.signal]] + name = "do-latency" + # Use Result<(), glib::BoolError> + manual = true + + [[object.function]] + name = "add_many" + # Implemented by repeatedly calling add() + manual = true + [[object.function]] + name = "remove_many" + # Implemented by repeatedly calling remove() + manual = true + + [[object.function]] + name = "iterate_all_by_element_factory_name" + manual = true + [[object.function]] + name = "iterate_all_by_interface" + manual = true + [[object.function]] + name = "iterate_elements" + manual = true + [[object.function]] + name = "iterate_recurse" + manual = true + [[object.function]] + name = "iterate_sinks" + manual = true + [[object.function]] + name = "iterate_sorted" + manual = true + [[object.function]] + name = "iterate_sources" + manual = true + + [[object.function]] + name = "add" + [object.function.return] + bool_return_is_error = "Failed to add element" + + [[object.function]] + name = "remove" + [object.function.return] + bool_return_is_error = "Failed to remove element" + + [[object.function]] + name = "recalculate_latency" + [object.function.return] + bool_return_is_error = "Failed to recalculate latency" + + [[object.function]] + name = "sync_children_states" + [object.function.return] + bool_return_is_error = "Failed to sync children states" + +[[object]] +name = "Gst.BinFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Buffer" +status = "manual" +ref_mode = "ref" + + [[object.function]] + name = "map" + # Readable and writable variant dealing with mutability + # Non-into variants available under BufferRef + rename = "into_mapped_buffer_readable" + + [[object.function]] + name = "unmap" + ignore = true + +[[object]] +name = "Gst.BufferCopyFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.BufferFlags" status = "generate" [[object.derive]] name = "serde::Serialize, serde::Deserialize" cfg_condition = "feature = \"ser_de\"" - [[object.derive]] - name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + + [[object.member]] + name = "last" + ignore = true [[object]] -name = "Gst.StateChange" +name = "Gst.BufferList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.BufferPool" status = "generate" +manual_traits = ["BufferPoolExtManual"] [[object.function]] - name = "get_name" - # Manual function for < v1_14: + pattern = "config_.*" + # A different type + ignore = true + + [[object.function]] + name = "get_config" + # A different type manual = true - # Always generate the trait, without version constraint: - version = "1.8" + + [[object.function]] + name = "set_config" + # Takes ownership + manual = true + + [[object.function]] + name = "acquire_buffer" + # Params and return value + manual = true + + [[object.function]] + name = "release_buffer" + # Takes ownership + manual = true + + [[object.function]] + name = "new" + # Work-around for 1.14 switch from transfer-floating to transfer-full + manual = true + + [[object.function]] + name = "set_active" + [object.function.return] + bool_return_is_error = "Failed to activate buffer pool" [[object]] -name = "Gst.StateChangeReturn" +name = "Gst.BufferPoolAcquireFlags" status = "generate" -must_use = true - [object.conversion_type] - variant = "Result" - ok_type = "StateChangeSuccess" - err_type = "StateChangeError" + [[object.member]] + name = "none" + ignore = true + [[object.member]] + name = "last" + ignore = true [[object]] -name = "Gst.FlowReturn" +name = "Gst.Bus" status = "generate" -must_use = true - [object.conversion_type] - variant = "Result" - ok_type = "FlowSuccess" - err_type = "FlowError" +final_type = true + [[object.function]] + name = "set_sync_handler" + # Into> makes this hard to use + manual = true + + [[object.function]] + name = "add_signal_watch_full" + # Priority + manual = true + + [[object.function]] + name = "timed_pop_filtered" + # Uses enum as flags + manual = true + [[object.function]] + name = "pop_filtered" + # Uses enum as flags + manual = true + [[object.function]] + name = "poll" + # Uses enum as flags + manual = true + + [[object.function]] + name = "create_watch" + # More convenient manual implementation + manual = true + + [[object.function]] + name = "add_watch" + # More specific trait bounds possible for the closure + manual = true + + [[object.function]] + name = "add_watch_full" + # More specific trait bounds possible for the closure + manual = true + + [[object.function]] + name = "remove_watch" + [object.function.return] + bool_return_is_error = "Bus has no event source" + + [[object.signal]] + name = "message" + concurrency = "send" + + [[object.function]] + name = "post" + [object.function.return] + bool_return_is_error = "Failed to post message" [[object]] -name = "Gst.PadLinkReturn" +name = "Gst.Caps" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.ChildProxy" status = "generate" -must_use = true - [object.conversion_type] - variant = "Result" - ok_type = "PadLinkSuccess" - err_type = "PadLinkError" +manual_traits = ["ChildProxyExtManual"] + [[object.function]] + name = "get_property" + rename = "child_property" + manual = true + [[object.function]] + name = "set_property" + rename = "set_child_property" + manual = true + [[object.function]] + name = "lookup" + manual = true + +[[object]] +name = "Gst.Clock" +status = "generate" +manual_traits = ["ClockExtManual"] + [[object.function]] + name = "adjust_with_calibration" + # Associated function + manual = true + [[object.function]] + name = "unadjust_with_calibration" + # Associated function + manual = true + + [[object.function]] + name = "new_periodic_id" + manual = true + [[object.function]] + name = "periodic_id_reinit" + manual = true + [[object.function]] + name = "new_single_shot_id" + manual = true + [[object.function]] + name = "single_shot_id_reinit" + manual = true + + [[object.function]] + name = "add_observation" + [[object.function.parameter]] + name = "slave" + mandatory = true + [[object.function.parameter]] + name = "master" + mandatory = true + + [[object.function]] + name = "add_observation_unapplied" + [[object.function.parameter]] + name = "slave" + mandatory = true + [[object.function.parameter]] + name = "master" + mandatory = true + [[object.function.parameter]] + name = "internal" + mandatory = true + [[object.function.parameter]] + name = "external" + mandatory = true + [[object.function.parameter]] + name = "rate_num" + mandatory = true + [[object.function.parameter]] + name = "rate_denom" + mandatory = true + + [[object.function]] + name = "adjust_unlocked" + [[object.function.parameter]] + name = "internal" + mandatory = true + + [[object.function]] + name = "get_calibration" + [[object.function.parameter]] + name = "internal" + mandatory = true + [[object.function.parameter]] + name = "external" + mandatory = true + [[object.function.parameter]] + name = "rate_num" + mandatory = true + [[object.function.parameter]] + name = "rate_denom" + mandatory = true + + [[object.function]] + name = "get_internal_time" + [object.function.return] + mandatory = true + + [[object.function]] + name = "get_resolution" + [object.function.return] + mandatory = true + + [[object.function]] + name = "set_calibration" + [[object.function.parameter]] + name = "internal" + mandatory = true + [[object.function.parameter]] + name = "external" + mandatory = true + [[object.function.parameter]] + name = "rate_num" + mandatory = true + [[object.function.parameter]] + name = "rate_denom" + mandatory = true + + [[object.function]] + name = "set_master" + [object.function.return] + bool_return_is_error = "Failed to set master clock" + + [[object.function]] + name = "set_resolution" + [[object.function.parameter]] + name = "resolution" + mandatory = true + [object.function.return] + mandatory = true + + [[object.function]] + name = "unadjust_unlocked" + [[object.function.parameter]] + name = "external" + mandatory = true + + [[object.function]] + name = "wait_for_sync" + [object.function.return] + bool_return_is_error = "Timed out waiting for sync" + +[[object]] +name = "Gst.ClockFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.ClockID" +status = "manual" + + [[object.function]] + name = "compare_func" + rename = "compare_by_time" [[object]] name = "Gst.ClockReturn" @@ -2185,6 +785,60 @@ must_use = true ok_type = "ClockSuccess" err_type = "ClockError" +[[object]] +name = "Gst.ClockTime" +status = "manual" +conversion_type = "Option" + +[[object]] +name = "Gst.ClockType" +status = "generate" + [[object.member]] + name = "tai" + version = "1.18" + +[[object]] +name = "Gst.Context" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.ControlBinding" +status = "generate" +manual_traits = ["ControlBindingExtManual"] +generate_builder = true + [[object.function]] + name = "get_g_value_array" + manual = true + + [[object.function]] + name = "get_value" + [[object.function.parameter]] + name = "timestamp" + mandatory = true + + [[object.function]] + name = "sync_values" + [[object.function.parameter]] + name = "timestamp" + mandatory = true + +[[object]] +name = "Gst.ControlSource" +status = "generate" +manual_traits = ["ControlSourceExtManual"] +generate_builder = true + [[object.function]] + name = "control_source_get_value" + rename = "value" + [[object.function.parameter]] + name = "timestamp" + mandatory = true + + [[object.function]] + name = "control_source_get_value_array" + manual = true + [[object]] name = "Gst.DateTime" status = "generate" @@ -2303,41 +957,1375 @@ status = "generate" nullable_return_is_error = "Can't create DateTime from UNIX epoch" [[object]] -name = "Gst.ControlSource" +name = "Gst.Device" status = "generate" -manual_traits = ["ControlSourceExtManual"] -generate_builder = true [[object.function]] - name = "control_source_get_value" - rename = "value" - [[object.function.parameter]] - name = "timestamp" - mandatory = true + name = "reconfigure_element" + [object.function.return] + bool_return_is_error = "Failed to reconfigure the element to use this device" [[object.function]] - name = "control_source_get_value_array" + name = "create_element" + [object.function.return] + nullable_return_is_error = "Failed to create element for device" + +[[object]] +name = "Gst.DeviceMonitor" +status = "generate" +manual_traits = ["DeviceMonitorExtManual"] + [[object.function]] + name = "new" + # Work-around for 1.14 switch from transfer-floating to transfer-full + manual = true + + [[object.function]] + name = "add_filter" + # Return Option + manual = true + + [[object.function]] + name = "start" + [object.function.return] + bool_return_is_error = "Failed to start" + + [[object.function]] + name = "remove_filter" + # Use DeviceMonitorFilterId and return Result<(), glib::BoolError> + manual = true + + [[object.function]] + name = "get_devices" + # Use glib::List as return type manual = true [[object]] -name = "Gst.ControlBinding" +name = "Gst.DeviceProvider" status = "generate" -manual_traits = ["ControlBindingExtManual"] -generate_builder = true +manual_traits = ["DeviceProviderExtManual"] [[object.function]] - name = "get_g_value_array" + name = "start" + [object.function.return] + bool_return_is_error = "Failed to start" + + [[object.function]] + name = "register" manual = true [[object.function]] - name = "get_value" + name = "get_metadata" + # better manual function + manual = true + + [[object.function]] + name = "get_devices" + # Use glib::List as return type + manual = true + +[[object]] +name = "Gst.DeviceProviderFactory" +status = "generate" +final_type = true + [[object.function]] + name = "list_get_device_providers" + rename = "factories" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "get_metadata" + # Use str as return type + manual = true + +[[object]] +name = "Gst.Element" +status = "generate" +manual_traits = ["ElementExtManual"] + + # Manual implementation provides associated functions on `Element`, + # but gir considers these methods on `ElementExtManual` in the docs. + [[object.function]] + name = "link_many" + ignore = true + [[object.function]] + name = "unlink_many" + ignore = true + [[object.function]] + name = "register" + ignore = true + + [[object.function]] + name = "call_async" + # more specific closure type possible + manual = true + + [[object.function]] + name = "set_base_time" [[object.function.parameter]] - name = "timestamp" + name = "time" mandatory = true + [[object.function]] + name = "get_current_running_time" + # manual implementation also works for earlier versions + manual = true + + [[object.function]] + name = "get_current_clock_time" + # manual implementation also works for earlier versions + manual = true + + [[object.function]] + name = "get_request_pad" + # rename to more explicit name and avoid conflict with `request_pad` + rename = "request_pad_simple" + # Renamed version is not deprecated + manual = true + + [[object.function]] + name = "request_pad_simple" + # see above + manual = true + + [[object.function]] + name = "post_message" + # takes ownership of message + manual = true + + [[object.function]] + name = "add_pad" + [object.function.return] + bool_return_is_error = "Failed to add pad" + + [[object.function]] + name = "remove_pad" + [object.function.return] + bool_return_is_error = "Failed to remove pad" + + [[object.function]] + name = "link" + [object.function.return] + bool_return_is_error = "Failed to link elements" + + [[object.function]] + name = "link_filtered" + [[object.function.parameter]] + name = "filter" + # Can use `link` instead + nullable = false + [object.function.return] + bool_return_is_error = "Failed to link elements" + + [[object.function]] + name = "link_pads" + [object.function.return] + bool_return_is_error = "Failed to link pads" + + [[object.function]] + name = "link_pads_filtered" + [[object.function.parameter]] + name = "filter" + # Can use `link` instead + nullable = false + [object.function.return] + bool_return_is_error = "Failed to link pads" + + [[object.function]] + name = "link_pads_full" + [object.function.return] + bool_return_is_error = "Failed to link pads" + + [[object.function]] + name = "set_clock" + [object.function.return] + bool_return_is_error = "Failed to set clock" + + [[object.function]] + name = "sync_state_with_parent" + [object.function.return] + bool_return_is_error = "Failed to sync state with parent" + + [[object.function]] + name = "query" + # correct mutability + manual = true + + [[object.function]] + name = "send_event" + # Pass by value + manual = true + + [[object.function]] + name = "get_context_unlocked" + # Unsafe + ignore = true + + [[object.function]] + name = "add_property_deep_notify_watch" + # ulong + manual = true + + [[object.function]] + name = "add_property_notify_watch" + # ulong + manual = true + + [[object.function]] + name = "remove_property_notify_watch" + # ulong + manual = true + + [[object.function]] + name = "query_duration" + # formatted value + manual = true + + [[object.function]] + name = "query_position" + # formatted value + manual = true + + [[object.function]] + name = "query_convert" + # formatted value + manual = true + + [[object.function]] + name = "seek" + # formatted value + manual = true + + [[object.function]] + name = "seek_simple" + # formatted value + manual = true + + [[object.function]] + name = "state_change_return_get_name" + # Wrong place + ignore = true + + [[object.function]] + name = "state_get_name" + # Wrong place + ignore = true + + [[object.function]] + name = "get_metadata" + # better manual function + manual = true + + [[object.function]] + name = "get_pad_template" + # better manual function + manual = true + + [[object.function]] + name = "get_pad_template_list" + # better manual function + manual = true + + # Limited subset of `MessageType`, + # see `ElementMessageType`. + [[object.function]] + name = "message_full" + manual = true + [[object.function]] + name = "message_full_with_details" + manual = true + + # Return iterators + [[object.function]] + name = "iterate_pads" + manual = true + [[object.function]] + name = "iterate_sink_pads" + manual = true + [[object.function]] + name = "iterate_src_pads" + manual = true + +[[object]] +name = "Gst.ElementFactory" +status = "generate" +final_type = true + [[object.function]] + name = "create" + [object.function.return] + nullable_return_is_error = "Failed to create element from factory" + + [[object.function]] + name = "make" + [object.function.return] + nullable_return_is_error = "Failed to create element from factory name" + + [[object.function]] + name = "create_full" + # varargs + ignore = true + + [[object.function]] + name = "create_valist" + # varargs + ignore = true + + [[object.function]] + name = "create_with_properties" + # separate name/value arrays need to be merged + manual = true + + [[object.function]] + name = "make_full" + # varargs + ignore = true + + [[object.function]] + name = "make_valist" + # varargs + ignore = true + + [[object.function]] + name = "make_with_properties" + # separate name/value arrays need to be merged + manual = true + + [[object.function]] + name = "get_static_pad_templates" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "list_is_type" + rename = "has_type" + # Renamed flags type + manual = true + + [[object.function]] + name = "list_filter" + # can_{sink,src}_{all,any}_caps() around an iterator is the same + ignore = true + + [[object.function]] + name = "list_get_elements" + rename = "factories_with_type" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "get_metadata" + # Use str as return type + manual = true + +[[object]] +name = "Gst.ElementFactoryListType" +status = "manual" +conversion_type = "scalar" + +[[object]] +name = "Gst.ElementFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Event" +status = "manual" +ref_mode = "ref" + + [[object.function]] + name = "new_caps" + # Moved to CapsBuilder::new() + ignore = true + + [[object.function]] + name = "new_qos" + # Moved to QosBuilder::new() + ignore = true + + [[object.function]] + name = "new_seek" + # Moved to SeekBuilder::new() + ignore = true + + [[object.function]] + name = "parse_stream" + # Moved to StreamStart::stream() + ignore = true + + [[object.function]] + name = "parse_stream_start" + # Moved to StreamStart::stream_id() + ignore = true + +[[object]] +name = "Gst.EventType" +status = "generate" + [[object.derive]] + name = "Debug, PartialEq, Eq, Hash" + [[object.member]] + name = "select_streams" + version = "1.10" + [[object.member]] + name = "stream_collection" + version = "1.10" + [[object.member]] + name = "stream_group_done" + version = "1.10" + [[object.member]] + name = "instant_rate_change" + version = "1.18" + [[object.member]] + name = "instant_rate_sync_time" + version = "1.18" + +[[object]] +name = "Gst.FlowReturn" +status = "generate" +must_use = true + [object.conversion_type] + variant = "Result" + ok_type = "FlowSuccess" + err_type = "FlowError" + +[[object]] +name = "Gst.Format" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + [[object.function]] + name = "register" + # Needs manual work + ignore = true + +[[object]] +name = "Gst.GhostPad" +status = "generate" + [[object.function]] + name = "set_target" + [object.function.return] + bool_return_is_error = "Failed to set target" + + [[object.function]] + name = "new" + rename = "with_target" + manual = true + + [[object.function]] + name = "new_no_target" + rename = "new" + manual = true + + [[object.function]] + name = "new_from_template" + rename = "from_template_with_target" + manual = true + + [[object.function]] + name = "new_no_target_from_template" + rename = "from_template" + manual = true + + [[object.function]] + name = "construct" + ignore = true + + [[object.function]] + name = "activate_mode_default" + # wrong instance type + manual = true + + [[object.function]] + name = "internal_activate_mode_default" + # wrong instance type + manual = true + +[[object]] +name = "Gst.Memory" +status = "manual" + + [[object.function]] + name = "map" + # Readable and writable variant dealing with mutability + # Non-into variants available under MemoryRef + rename = "into_mapped_memory_readable" + + [[object.function]] + name = "unmap" + ignore = true + +[[object]] +name = "Gst.MemoryFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Message" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.MetaFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Object" +# For renaming the trait... +status = "generate" +trait_name = "GstObjectExt" + [[object.function]] + name = "set_name" + # Don't allow changing the name at random times + ignore = true + + [[object.property]] + name = "name" + # There are accessor functions for this + ignore = true + + [[object.function]] + name = "ref_sink" + # Takes a raw pointer + ignore = true + + [[object.function]] + name = "get_name" + [object.function.return] + # Nullable state only occurs during instance init and finalize + # which cannot be observed from Rust + nullable = false + + [[object.function]] + name = "set_parent" + [object.function.return] + bool_return_is_error = "Failed to set parent object" + [[object.function]] name = "sync_values" [[object.function.parameter]] name = "timestamp" mandatory = true + [object.function.return] + bool_return_is_error = "Failed to sync values" + + [[object.function]] + name = "value" + [[object.function.parameter]] + name = "timestamp" + mandatory = true + + [[object.function]] + name = "get_g_value_array" + ignore = true + + [[object.function]] + name = "add_control_binding" + [object.function.return] + bool_return_is_error = "Failed to add control binding" + +[[object]] +name = "Gst.ObjectFlags" +status = "generate" + [[object.member]] + name = "may_be_leaked" + version = "1.10" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Pad" +status = "generate" +manual_traits = ["PadExtManual"] + [[object.function]] + name = "link_maybe_ghosting" + [object.function.return] + bool_return_is_error = "Failed to link pads, possibly ghosting" + + [[object.function]] + name = "link_maybe_ghosting_full" + [object.function.return] + bool_return_is_error = "Failed to link pads, possibly ghosting" + + [[object.function]] + name = "unlink" + [object.function.return] + bool_return_is_error = "Failed to unlink pad" + + [[object.function]] + name = "pause_task" + [object.function.return] + bool_return_is_error = "Failed to pause pad task" + + [[object.function]] + name = "stop_task" + [object.function.return] + bool_return_is_error = "Failed to stop pad task" + + [[object.function]] + name = "set_active" + [object.function.return] + bool_return_is_error = "Failed to activate pad" + + [[object.function]] + name = "activate_mode" + [object.function.return] + bool_return_is_error = "Failed to activate mode pad" + + [[object.function]] + name = "remove_probe" + # Don't use a ulong + manual = true + + [[object.function]] + name = "chain" + # Move buffer + manual = true + + [[object.function]] + name = "push" + # Move buffer + manual = true + + [[object.function]] + name = "chain_list" + # Move buffer + manual = true + + [[object.function]] + name = "push_list" + # Move buffer + manual = true + + [[object.function]] + name = "pull_range" + # Buffer can be NULL + manual = true + + [[object.function]] + name = "get_range" + # Buffer can be NULL + manual = true + + [[object.function]] + name = "get_last_flow_return" + # Use Result + rename = "last_flow_result" + + [[object.function]] + name = "query" + # Correct mutability + manual = true + + [[object.function]] + name = "peer_query" + # Correct mutability + manual = true + + [[object.function]] + name = "query_default" + # Correct mutability + manual = true + + [[object.function]] + name = "proxy_query_caps" + # Correct mutability + manual = true + + [[object.function]] + name = "proxy_query_accept_caps" + # Correct mutability + manual = true + + [[object.function]] + name = "event_default" + # Pass by value + manual = true + + [[object.function]] + name = "push_event" + # Pass by value + manual = true + + [[object.function]] + name = "send_event" + # Pass by value + manual = true + + [[object.function]] + name = "new" + # Also has builder() + manual = true + + [[object.function]] + name = "new_from_template" + # Also has builder_with_template() + rename = "from_template" + manual = true + + [[object.function]] + name = "new_from_static_template" + # Also has builder_with_static_template() + rename = "from_static_template" + manual = true + + [[object.function]] + name = "query_duration" + # formatted value + manual = true + + [[object.function]] + name = "query_position" + # formatted value + manual = true + + [[object.function]] + name = "query_convert" + # formatted value + manual = true + + [[object.function]] + name = "peer_query_duration" + # formatted value + manual = true + + [[object.function]] + name = "peer_query_position" + # formatted value + manual = true + + [[object.function]] + name = "peer_query_convert" + # formatted value + manual = true + + [[object.function]] + name = "link_get_name" + # Wrong place + manual = true + + [[object.function]] + pattern = "set_.*_function_full" + # More specific closure trait bounds possible + manual = true + + [[object.function]] + name = "start_task" + # More specific closure trait bounds possible + manual = true + + [[object.function]] + name = "sticky_events_foreach" + # Complex closure argument handling + manual = true + + [[object.function]] + name = "get_sticky_event" + # More convenient API + manual = true + + [[object.function]] + name = "add_probe" + # Complex closure argument handling + manual = true + + [[object.property]] + name = "template" + # Has a proper getter + ignore = true + +[[object]] +name = "Gst.PadDirection" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.PadFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.PadLinkCheck" +status = "generate" + [[object.member]] + name = "nothing" + ignore = true + +[[object]] +name = "Gst.PadLinkReturn" +status = "generate" +must_use = true + [object.conversion_type] + variant = "Result" + ok_type = "PadLinkSuccess" + err_type = "PadLinkError" + +[[object]] +name = "Gst.PadPresence" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.PadProbeType" +status = "generate" + [[object.member]] + name = "invalid" + ignore = true + +[[object]] +name = "Gst.PadTemplate" +status = "generate" +final_type = true + [[object.function]] + name = "new" + [object.function.return] + nullable_return_is_error = "Failed to create pad template" + + [[object.function]] + name = "new_with_gtype" + [object.function.return] + nullable_return_is_error = "Failed to create pad template" + + [[object.function]] + name = "new_from_static_pad_template_with_gtype" + # static pad template manual + manual = true + +[[object]] +name = "Gst.ParseContext" +status = "manual" +ref_mode = "ref-mut" + +[[object]] +name = "Gst.ParseFlags" +status = "generate" + [[object.member]] + name = "place_in_bin" + version = "1.10" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.Pipeline" +status = "generate" + [[object.function]] + name = "get_delay" + [object.function.return] + mandatory = true + + [[object.function]] + name = "set_delay" + [[object.function.parameter]] + name = "delay" + mandatory = true + +[[object]] +name = "Gst.PipelineFlags" +status = "generate" + [[object.member]] + name = "last" + ignore = true + +[[object]] +name = "Gst.Plugin" +status = "generate" +final_type = true + + [[object.function]] + pattern = "register_static.*" + # Needs manual implementation + ignore = true + + [[object.function]] + name = "list_free" + # useless and unsafe + ignore = true + + [[object.function]] + name = "set_cache_data" + # pass by value + manual = true + + [[object.function]] + name = "get_cache_data" + # structure ref + manual = true + + [[object.function]] + name = "load" + [object.function.return] + nullable_return_is_error = "Failed to load plugin" + + [[object.function]] + name = "load_by_name" + [object.function.return] + nullable_return_is_error = "Failed to load plugin" + +[[object]] +name = "Gst.PluginDependencyFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.PluginFeature" +status = "generate" +manual_traits = ["PluginFeatureExtManual"] + [[object.function]] + pattern = "list_.*" + ignore = true + + [[object.function]] + name = "rank_compare_func" + ignore = true + + [[object.function]] + name = "get_rank" + manual = true + + [[object.function]] + name = "set_rank" + manual = true + + [[object.function]] + name = "load" + manual = true + +[[object]] +name = "Gst.Preset" +status = "generate" + + [[object.function]] + name = "set_app_dir" + [object.function.return] + bool_return_is_error = "Failed to set app preset directory" + + [[object.function]] + name = "delete_preset" + [object.function.return] + bool_return_is_error = "Failed to delete preset" + + [[object.function]] + name = "load_preset" + [object.function.return] + bool_return_is_error = "Failed to load preset" + + [[object.function]] + name = "save_preset" + [object.function.return] + bool_return_is_error = "Failed to save preset" + + [[object.function]] + name = "rename_preset" + [object.function.return] + bool_return_is_error = "Failed to rename preset" + + [[object.function]] + name = "set_meta" + [object.function.return] + bool_return_is_error = "Failed to set preset meta" + +[[object]] +name = "Gst.Promise" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.ProxyPad" +status = "generate" +manual_traits = ["ProxyPadExtManual"] + + [[object.function]] + name = "chain_default" + # Buffer move + manual = true + + [[object.function]] + name = "chain_list_default" + # Buffer move + manual = true + + [[object.function]] + name = "getrange_default" + # Buffer move + manual = true + +[[object]] +name = "Gst.Query" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.Rank" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug" + +[[object]] +name = "Gst.Registry" +status = "generate" +final_type = true + + [[object.function]] + pattern = "fork_.*" + ignore = true + + [[object.function]] + name = "add_feature" + [object.function.return] + bool_return_is_error = "Failed to add feature" + + [[object.function]] + name = "add_plugin" + [object.function.return] + bool_return_is_error = "Failed to add plugin" + + [[object.function]] + name = "feature_filter" + rename = "features_filtered" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "get_feature_list" + rename = "features" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "get_feature_list_by_plugin" + rename = "features_by_plugin" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "get_plugin_list" + rename = "plugins" + # Use glib::List as return type + manual = true + + [[object.function]] + name = "plugin_filter" + rename = "plugins_filtered" + # Use glib::List as return type + manual = true + +[[object]] +name = "Gst.Sample" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.SeekFlags" +status = "generate" + [[object.member]] + name = "trickmode_forward_predicted" + version = "1.18" + [[object.member]] + name = "instant_rate_change" + version = "1.18" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.SegmentFlags" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.member]] + name = "trickmode_forward_predicted" + version = "1.18" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.StackTraceFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.State" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.StateChange" +status = "generate" + [[object.function]] + name = "get_name" + # Manual function for < v1_14: + manual = true + # Always generate the trait, without version constraint: + version = "1.8" + +[[object]] +name = "Gst.StateChangeReturn" +status = "generate" +must_use = true + [object.conversion_type] + variant = "Result" + ok_type = "StateChangeSuccess" + err_type = "StateChangeError" + +[[object]] +name = "Gst.Stream" +status = "generate" +final_type = true + [[object.function]] + name = "new" + # Work-around for 1.14 switch from transfer-floating to transfer-full + manual = true + + [[object.property]] + name = "caps" + version = "1.10" + + [[object.property]] + name = "stream-flags" + version = "1.10" + + [[object.property]] + name = "stream-id" + version = "1.10" + + [[object.property]] + name = "stream-type" + version = "1.10" + + [[object.property]] + name = "tags" + version = "1.10" + +[[object]] +name = "Gst.StreamCollection" +status = "generate" +final_type = true + [[object.function]] + name = "new" + # Work-around for 1.14 switch from transfer-floating to transfer-full + manual = true + + [[object.function]] + name = "add_stream" + # Ignore return value which is always `true` + manual = true + + [[object.property]] + name = "upstream-id" + version = "1.10" + generate = ["get"] + +[[object]] +name = "Gst.StreamFlags" +status = "generate" + [[object.member]] + name = "none" + ignore = true + +[[object]] +name = "Gst.Structure" +status = "manual" +ref_mode = "ref" + # Functions moved to `StructureRef` + [[object.function]] + name = "set" + ignore = true + [[object.function]] + name = "set_value" + ignore = true + [[object.function]] + name = "get_value" + ignore = true + + [[object.function]] + name = "id_get_value" + rename = "value_by_quark" + ignore = true + [[object.function]] + name = "take_value" + rename = "set_value" + ignore = true + [[object.function]] + name = "id_take_value" + rename = "set_value_by_quark" + ignore = true + [[object.function]] + name = "get_name" + rename = "name" + ignore = true + [[object.function]] + name = "get_name_id" + rename = "name_quark" + ignore = true + [[object.function]] + name = "set_name" + ignore = true + + [[object.function]] + name = "has_field" + ignore = true + [[object.function]] + name = "has_field_with_typed" + rename = "has_field_with_type" + ignore = true + [[object.function]] + name = "id_has_field" + rename = "has_field_by_quark" + ignore = true + [[object.function]] + name = "id_has_field_typed" + rename = "has_field_with_type_by_quark" + ignore = true + [[object.function]] + name = "remove_field" + ignore = true + [[object.function]] + name = "remove_fields" + # Repeatedly call remove_field() + ignore = true + [[object.function]] + name = "remove_all_fields" + ignore = true + [[object.function]] + name = "get_nth_field_name" + ignore = true + [[object.function]] + name = "n_fields" + ignore = true + [[object.function]] + name = "can_intersect" + ignore = true + [[object.function]] + name = "intersect" + ignore = true + [[object.function]] + name = "is_subset" + ignore = true + + [[object.function]] + name = "fixate" + ignore=true + [[object.function]] + name = "fixate_field" + ignore=true + [[object.function]] + name = "fixate_field_boolean" + ignore=true + [[object.function]] + name = "fixate_field_string" + ignore=true + [[object.function]] + name = "fixate_field_nearest_double" + ignore=true + [[object.function]] + name = "fixate_field_nearest_fraction" + ignore=true + [[object.function]] + name = "fixate_field_nearest_int" + ignore=true + + # Not implemented + [[object.function]] + name = "set_parent_refcount" + ignore = true + +[[object]] +name = "Gst.TagList" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.TagScope" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.TagSetter" +status = "generate" +manual_traits = ["TagSetterExtManual"] + [[object.function]] + name = "add_tag_value" + manual = true + + [[object.function]] + name = "add_tags" + # Takes a raw pointer + ignore = true + +[[object]] +name = "Gst.Toc" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.TocEntry" +status = "manual" +ref_mode = "ref" + +[[object]] +name = "Gst.TocEntryType" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.TocLoopType" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" + +[[object]] +name = "Gst.TocScope" +status = "generate" + [[object.derive]] + name = "serde::Serialize, serde::Deserialize" + cfg_condition = "feature = \"ser_de\"" + [[object.derive]] + name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" [[object]] name = "Gst.Tracer" @@ -2357,6 +2345,28 @@ status = "generate" # Use glib::List as return type manual = true +[[object]] +name = "Gst.TypeFindFactory" +status = "generate" +final_type = true + + [[object.function]] + name = "call_function" + # Set up native functions in `TypeFind`, calling into trait argument + manual = true + + [[object.function]] + name = "get_list" + rename = "factories" + # Use glib::List as return type + manual = true + +[[object]] +name = "Gst.TypeFindProbability" +status = "generate" + [[object.derive]] + name = "Debug" + [[object]] name = "Gst.URIType" status = "generate" @@ -2365,14 +2375,3 @@ status = "generate" cfg_condition = "feature = \"ser_de\"" [[object.derive]] name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" - - -[[object]] -name = "Gst.MetaFlags" -status = "generate" - [[object.member]] - name = "none" - ignore = true - [[object.member]] - name = "last" - ignore = true diff --git a/gstreamer/tests/check_gir.rs b/gstreamer/tests/check_gir.rs new file mode 100644 index 000000000..b095c0444 --- /dev/null +++ b/gstreamer/tests/check_gir.rs @@ -0,0 +1,8 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +#[test] +fn check_gir_file() { + let res = gir_format_check::check_gir_file("Gir.toml"); + println!("{}", res); + assert_eq!(res.nb_errors, 0); +}