After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732534 - Introspection and documentation issues for new 1.4 symbols
Introspection and documentation issues for new 1.4 symbols
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-01 06:43 UTC by Evan Nemerson
Modified: 2014-07-04 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Assorted minor introspection and documentation fixes. (12.79 KB, patch)
2014-07-01 06:43 UTC, Evan Nemerson
committed Details | Review

Description Evan Nemerson 2014-07-01 06:43:00 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.
Comment 1 Sebastian Dröge (slomo) 2014-07-01 07:05:47 UTC
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
Comment 2 Evan Nemerson 2014-07-01 07:13:26 UTC
(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.
Comment 3 Evan Nemerson 2014-07-01 07:16:24 UTC
FWIW I'm willing to write a patch for that last issue, just need to know what to do.
Comment 4 Sebastian Dröge (slomo) 2014-07-01 07:24:54 UTC
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.