GNOME Bugzilla – Bug 732534
Introspection and documentation issues for new 1.4 symbols
Last modified: 2014-07-04 12:57:22 UTC
Created attachment 279645 [details] [review] Assorted minor introspection and documentation fixes. I'm going to go through the new API added for 1.4, mainly looking for issues which could present issues for languages other than C, especially the annotations and documentation. gst_device_provider_factory_get_device_provider_type: Documents the return value of g_return_val_if_fail, which "should be considered to have undefined behaviour (a programmer error). The only correct solution to such an error is to change the module that is calling the current function, so that it avoids this incorrect call." (https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail). Furthermore, the value in question is 0, instead of G_TYPE_INVALID (could present issues for non-C langauges for which GType is not treated as an integer type). If factory->type could be invalid then this should be changed to G_TYPE_INVALID (actually, I think it should be changed regardless). Otherwise, the mention of the return value possibly being 0 should be removed from the documentation. For this patch, I assumed factory->type will never be G_TYPE_INVALID. gst_device_provider_factory_has_classesv, gst_device_provider_factory_has_classes, gst_device_has_classesv: s/klasses/classes/ in the documentation of the classes argument. gst_message_new_device_added: s/GstlDeviceManager/GstDeviceManager/ (note the "l" between "Gst" and "DeviceManager"). gst_structure_get_{int64,uint64}: It would probably be better to use the right type name in the description ("#gint64" instead of "int64", "#guint64" instead of "int64"). gst_buffer_pool_set_flushing: s/Enabled/Enable/ gst_device_provider_class_add_metadata: Missing Since: 1.4 gst_device_provider_class_add_static_metadata: @value should be (transfer full) gst_device_provider_class_set_static_metadata: @longname, @classification, @description, and @author should be (transfer full) gst_device_monitor_add_filter: @classes should be (allow-none) gst_query_set_uri_redirection_permanent: s/GST_QUERY_URI/%GST_QUERY_URI/ in @query gst_system_clock_set_default: s/gst_system_clock_obtain/gst_system_clock_obtain()/ gst_base_src_set_automatic_eos: s/basesrc/@src/ gst_collect_pads_src_event_default: s/collectpads/#GstCollectPads/, s/GstCollectPads/#GstCollectPads/ gst_test_clock_wait_for_multiple_pending_ids: s/NULL/%NULL/ gst_check_setup_src_pad_from_template, gst_check_setup_src_pad_by_name_from_template, gst_check_setup_sink_pad_from_template, gst_check_setup_sink_pad_by_name_from_template: Missing "Since: 1.4" Not addressed by this patch: gst_collect_pads_set_flush_function: No destroy notify. If the callback is invoked exactly once it should be marked as (scope async). Otherwise, it needs a GDestroyNotify, or it's not introspectable.
commit 5abc82e9f385f14be6dfab9873df7247d455b547 Author: Evan Nemerson <evan@nemerson.com> Date: Mon Jun 30 23:39:18 2014 -0700 introspection: Assorted minor introspection and documentation fixes https://bugzilla.gnome.org/show_bug.cgi?id=732534
(In reply to comment #0) > Not addressed by this patch: > > > gst_collect_pads_set_flush_function: > > No destroy notify. If the callback is invoked exactly once it should be marked > as (scope async). Otherwise, it needs a GDestroyNotify, or it's not > introspectable.
FWIW I'm willing to write a patch for that last issue, just need to know what to do.
For that one see bug #731301 :) Let's consider collectpads not introspectable, it will be deprecated and replaced very soon and the replacement is already in gst-plugins-bad.