Gir.toml: use TryFromGlib::Option for ClockTime

This commit is contained in:
François Laignel 2021-04-04 16:17:35 +02:00
parent dc763501ae
commit 532af96ef9
13 changed files with 428 additions and 23 deletions

View file

@ -217,4 +217,4 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"

View file

@ -27,7 +27,6 @@ generate = [
"GstAudio.StreamVolumeFormat",
"GstAudio.AudioSink",
"GstAudio.AudioSrc",
"GstAudio.AudioBaseSink",
"GstAudio.AudioBaseSrc",
]
@ -69,7 +68,33 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstAudio.AudioBaseSink"
status = "generate"
[[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.AudioBuffer"
@ -191,6 +216,43 @@ status = "generate"
# 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"
@ -204,10 +266,38 @@ manual_traits = ["AudioDecoderExtManual"]
name = "finish_subframe"
manual = true
[[object.function]]
name = "get_latency"
[[object.function.parameter]]
name = "min"
mandatory = true
[[object.function]]
name = "get_min_latency"
[object.function.return]
mandatory = true
[[object.function]]
name = "get_tolerance"
[object.function.return]
mandatory = true
[[object.function]]
name = "negotiate"
manual = true
[[object.function]]
name = "set_latency"
[[object.function.parameter]]
name = "min"
mandatory = true
[[object.function]]
name = "set_min_latency"
[[object.function.parameter]]
name = "num"
mandatory = true
[[object.function]]
name = "set_output_caps"
manual = true
@ -216,6 +306,12 @@ manual_traits = ["AudioDecoderExtManual"]
name = "set_output_format"
manual = true
[[object.function]]
name = "set_tolerance"
[[object.function.parameter]]
name = "tolerance"
mandatory = true
[[object.function]]
name = "get_allocator"
manual = true
@ -253,13 +349,32 @@ manual_traits = ["AudioEncoderExtManual"]
[[object.function]]
name = "get_latency"
manual = true
[[object.function.parameter]]
name = "min"
mandatory = true
[[object.function]]
name = "get_tolerance"
[object.function.return]
mandatory = true
[[object.function]]
name = "proxy_getcaps"
[object.function.return]
nullable = false
[[object.function]]
name = "set_latency"
[[object.function.parameter]]
name = "min"
mandatory = true
[[object.function]]
name = "set_tolerance"
[[object.function.parameter]]
name = "tolerance"
mandatory = true
[[object.function]]
name = "allocate_output_buffer"
[object.function.return]

View file

@ -118,6 +118,21 @@ name = "GstBase.BaseSink"
status = "generate"
manual_traits = ["BaseSinkExtManual"]
[[object.function]]
name = "get_latency"
[object.function.return]
mandatory = true
[[object.function]]
name = "get_processing_deadline"
[object.function.return]
mandatory = true
[[object.function]]
name = "get_render_delay"
[object.function.return]
mandatory = true
[[object.function]]
name = "query_latency"
# Use Result
@ -157,6 +172,24 @@ manual_traits = ["BaseSinkExtManual"]
name = "get_drop_out_of_segment"
rename = "drops_out_of_segment"
[[object.function]]
name = "set_processing_deadline"
[[object.function.parameter]]
name = "processing_deadline"
mandatory = true
[[object.function]]
name = "set_render_delay"
[[object.function.parameter]]
name = "delay"
mandatory = true
[[object.function]]
name = "wait_clock"
[[object.function.parameter]]
name = "time"
mandatory = true
[[object]]
name = "GstBase.BaseSrc"
status = "generate"
@ -195,6 +228,12 @@ manual_traits = ["BaseTransformExtManual"]
name = "get_allocator"
manual = true
[[object.function]]
name = "update_qos"
[[object.function.parameter]]
name = "timestamp"
mandatory = true
[[object.function]]
name = "update_src_caps"
[object.function.return]
@ -239,6 +278,12 @@ manual_traits = ["AggregatorExtManual"]
# Info parameter
manual = true
[[object.function]]
name = "set_latency"
[[object.function.parameter]]
name = "min_latency"
mandatory = true
[[object.property]]
name = "latency"
version = "1.14"
@ -328,7 +373,7 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "Gst.TagList"
@ -339,6 +384,12 @@ ref_mode = "ref"
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
@ -347,6 +398,12 @@ manual_traits = ["BaseParseExtManual"]
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

View file

@ -60,12 +60,29 @@ status = "manual"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstCheck.TestClock"
status = "generate"
final_type = true
[[object.function]]
name = "get_next_entry_time"
[object.function.return]
mandatory = true
[[object.function]]
name = "new_with_start_time"
[[object.function.parameter]]
name = "start_time"
mandatory = true
[[object.function]]
name = "set_time"
[[object.function.parameter]]
name = "new_time"
mandatory = true
[[object.function]]
name = "has_id"
manual = true

View file

@ -21,7 +21,6 @@ generate = [
"GstController.InterpolationControlSource",
"GstController.LFOControlSource",
"GstController.ProxyControlBinding",
"GstController.TimedValueControlSource",
"GstController.TriggerControlSource",
"GstController.DirectControlBindingConvertValue",
"GstController.DirectControlBindingConvertGValue",
@ -39,5 +38,21 @@ manual = [
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstController.TimedValueControlSource"
status = "generate"
[[object.function]]
name = "set"
[[object.function.parameter]]
name = "timestamp"
mandatory = true
[[object.function]]
name = "unset"
[[object.function.parameter]]
name = "timestamp"
mandatory = true

View file

@ -94,7 +94,7 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GES.BaseEffect"
@ -130,6 +130,17 @@ status = "generate"
[object.function.return]
nullable = false
[[object.function]]
name = "get_duration"
[object.function.return]
mandatory = true
[[object.function]]
name = "get_frame_at"
[[object.function.parameter]]
name = "timestamp"
mandatory = true
[[object.function]]
name = "load_from_uri"
[object.function.return]
@ -155,6 +166,12 @@ status = "generate"
[object.function.return]
bool_return_is_error = "Failed to move layer"
[[object.function]]
name = "paste_element"
[[object.function.parameter]]
name = "position"
mandatory = true
[[object.function]]
name = "remove_track"
[object.function.return]
@ -233,6 +250,11 @@ status = "generate"
[[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]
@ -290,6 +312,11 @@ status = "generate"
[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]
@ -317,26 +344,57 @@ status = "generate"
name = "GES.TimelineElement"
status = "generate"
manual_traits = ["TimelineElementExtManual"]
[[object.function]]
name = "get_duration"
[object.function.return]
mandatory = true
[[object.function]]
name = "paste"
[[object.function.parameter]]
name = "paste_position"
mandatory = true
[object.function.return]
nullable_return_is_error = "Failed to paste timeline element"
[[object.function]]
name = "ripple"
[[object.function.parameter]]
name = "start"
mandatory = true
[object.function.return]
bool_return_is_error = "Failed to ripple"
[[object.function]]
name = "ripple_end"
[[object.function.parameter]]
name = "end"
mandatory = true
[object.function.return]
bool_return_is_error = "Failed to ripple"
[[object.function]]
name = "roll_end"
[[object.function.parameter]]
name = "end"
mandatory = true
[object.function.return]
bool_return_is_error = "Failed to roll"
[[object.function]]
name = "roll_start"
[[object.function.parameter]]
name = "start"
mandatory = true
[object.function.return]
bool_return_is_error = "Failed to roll"
[[object.function]]
name = "set_inpoint"
[[object.function.parameter]]
name = "inpoint"
mandatory = true
[[object.function]]
name = "set_name"
[object.function.return]
@ -359,6 +417,9 @@ manual_traits = ["TimelineElementExtManual"]
[[object.function]]
name = "trim"
[[object.function.parameter]]
name = "start"
mandatory = true
[object.function.return]
bool_return_is_error = "Failed to trim"
@ -367,11 +428,6 @@ manual_traits = ["TimelineElementExtManual"]
[object.function.return]
nullable_return_is_error = "Failed to copy timeline element"
[[object.function]]
name = "paste"
[object.function.return]
nullable_return_is_error = "Failed to paste timeline element"
[[object]]
name = "GES.TrackElement"
status = "generate"

View file

@ -32,7 +32,7 @@ manual = [
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstNet.NtpClock"

View file

@ -71,7 +71,7 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstPbutils.Discoverer"
@ -83,6 +83,12 @@ final_type = true
[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"

View file

@ -90,6 +90,12 @@ final_type = true
[object.function.return]
nullable = false
[[object.function]]
name = "seek"
[[object.function.parameter]]
name = "position"
mandatory = true
[[object.function]]
name = "set_audio_track"
[object.function.return]
@ -256,4 +262,4 @@ final_type = true
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"

View file

@ -121,7 +121,7 @@ ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "GstRtspServer.RTSPServer"

View file

@ -51,7 +51,7 @@ version = "1.12"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "Gst.Caps"

View file

@ -75,7 +75,7 @@ manual = [
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "Gst.Caps"

View file

@ -254,7 +254,7 @@ manual_traits = ["ChildProxyExtManual"]
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
conversion_type = "Option"
[[object]]
name = "Gst.ClockFlags"
@ -646,6 +646,16 @@ 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"
@ -686,11 +696,101 @@ manual_traits = ["ClockExtManual"]
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]
@ -739,6 +839,12 @@ manual_traits = ["ElementExtManual"]
# 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
@ -1033,18 +1139,27 @@ trait_name = "GstObjectExt"
[[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"
@ -1841,6 +1956,9 @@ status = "generate"
name = "util_get_timestamp"
# can be called before gst_init()
assertion = "skip"
[object.function.return]
# always returns a value
mandatory = true
[[object.function]]
name = "version"
@ -2028,11 +2146,14 @@ 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.ControlBinding"
status = "generate"
@ -2041,3 +2162,15 @@ 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