[Bug 657640] New: 0.11 gstreamer Introspection review

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Aug 29 10:22:06 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=657640
  GStreamer | gstreamer (core) | unspecified

           Summary: 0.11 gstreamer Introspection review
    Classification: Platform
           Product: GStreamer
           Version: unspecified
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: johan at gnome.org
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


This bug is for reviewing the 0.11 gstreamer api for introspection
usage. Other libraries in gstreamer/libs/gst wil be treated in other bugs.

I've attached a couple of patches that shouldn't be mostly trivial and
not requiring so much work/discussion.

For the remaining errors, as mentioned by g-ir-scanner running with --warn-all,
are:


gstminiobject.c:82: Warning: Gst: gst_mini_object_copy: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstminiobject.c:130: Warning: Gst: gst_mini_object_make_writable: return value:
Invalid non-constant return of bare structure or union; register as boxed type
or (skip)
gstminiobject.c:165: Warning: Gst: gst_mini_object_ref: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstminiobject.c:292: Warning: Gst: gst_mini_object_steal: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstminiobject.c:292: Warning: Gst: gst_mini_object_steal: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)

These one would require a GType for GstMiniObject so these functions can be
called.
However, since GstMiniObject is a GBoxed now, they'll appear as functions
instead of
parent methods, eg:

  gst.mini_object_copy(buffer), instead of buffer.copy()

gstmemory.c:372: Warning: Gst: gst_memory_ref: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmemory.c:449: Warning: Gst: gst_memory_map: return value: Missing (transfer)
annotation
gstmemory.c:492: Warning: Gst: gst_memory_copy: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmemory.c:513: Warning: Gst: gst_memory_share: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmemory.c:339: Warning: Gst: gst_memory_new_wrapped: argument free_func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstmemory.c:350: Warning: Gst: gst_memory_new_wrapped: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmemory.c:339: Warning: Gst: gst_memory_new_wrapped: argument free_func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstmemory.c:350: Warning: Gst: gst_memory_new_wrapped: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmemory.c:665: Warning: Gst: gst_allocator_alloc: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)

Same here, gstmemory requires a GType, probably a GBoxed to be able to be
usable.
Language bindings would also need some kind of api to access/manipulate the
memory,
perhaps something like:

  GByteArray * gst_memory_get_data (GstMemory *mem)

gstpad.c:1286: Warning: Gst: gst_pad_set_activate_function: argument activate:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:1307: Warning: Gst: gst_pad_set_activatepull_function: argument
activatepull: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:1327: Warning: Gst: gst_pad_set_activatepush_function: argument
activatepush: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:1346: Warning: Gst: gst_pad_set_chain_function: argument chain:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:1365: Warning: Gst: gst_pad_set_chain_list_function: argument
chainlist: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:1409: Warning: Gst: gst_pad_set_event_function: argument event:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:1548: Warning: Gst: gst_pad_set_link_function: argument link: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstpad.c:1575: Warning: Gst: gst_pad_set_unlink_function: argument unlink:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:1593: Warning: Gst: gst_pad_set_getcaps_function: argument getcaps:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:1629: Warning: Gst: gst_pad_set_acceptcaps_function: argument
acceptcaps: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:1650: Warning: Gst: gst_pad_set_fixatecaps_function: argument
fixatecaps: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:4761: Warning: Gst: gst_pad_start_task: argument func: Missing (scope)
annotation for callback without GDestroyNotify (valid: call, async)
gstpad.c:1528: Warning: Gst: gst_pad_set_iterate_internal_links_function:
argument iterintlink: Missing (scope) annotation for callback without
GDestroyNotify (valid: call, async)
gstpad.c:1445: Warning: Gst: gst_pad_set_query_type_function: argument
type_func: Missing (scope) annotation for callback without GDestroyNotify
(valid: call, async)
gstpad.c:1427: Warning: Gst: gst_pad_set_query_function: argument query:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstpad.c:3019: Warning: Gst: gst_pad_forward: argument forward: Missing (scope)
annotation for callback without GDestroyNotify (valid: call, async)

These ones require GDestroyNotify arguments. Wim said on irc that they are
needed for other reasons.
For language bindings a separate _full function would also suffice, but would
then require
Rename to: annotation, see one of the patches attached to this bug.

gstbuffer.c:1468: Warning: Gst: gst_buffer_get_meta: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstbuffer.c:1498: Warning: Gst: gst_buffer_add_meta: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstbuffer.c:1591: Warning: Gst: gst_buffer_iterate_meta: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument init_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument free_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument copy_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument transform_func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument init_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument free_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument copy_func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstmeta.h:110: Warning: Gst: gst_meta_register: argument transform_func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)

GstMeta also requires a GType. Accessors would be required for manipulating the
field values of the struct. Getters are not needed, but
since setters are needed they might as well be added for consistency.

gstbuffer.c:567: Warning: Gst: gst_buffer_new_wrapped_full: argument free_func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstbuffer.c:681: Warning: Gst: gst_buffer_peek_memory: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)

gstiterator.c:123: Warning: Gst: gst_iterator_new: argument copy: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstiterator.c:123: Warning: Gst: gst_iterator_new: argument next: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstiterator.c:123: Warning: Gst: gst_iterator_new: argument item: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstiterator.c:123: Warning: Gst: gst_iterator_new: argument resync: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstiterator.c:123: Warning: Gst: gst_iterator_new: argument free: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstiterator.c:221: Warning: Gst: gst_iterator_new_list: argument item: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)

GstIterator is already introspectable from a language binding point of view.
The ones above are related
to creating iterators, not sure if that's worth it. Could perhaps just be
skipped.

gstbus.c:645: Warning: Gst: gst_bus_set_sync_handler: argument func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstclock.c:593: Warning: Gst: gst_clock_id_wait_async: argument func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstindex.c:441: Warning: Gst: gst_index_set_filter: argument filter: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gstindex.c:483: Warning: Gst: gst_index_set_resolver: argument resolver:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstindex.c:944: Warning: Gst: gst_index_get_assoc_entry_full: argument func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstinfo.c:1055: Warning: Gst: gst_debug_add_log_function: argument func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gstinfo.c:1133: Warning: Gst: gst_debug_remove_log_function: argument func:
Missing (scope) annotation for callback without GDestroyNotify (valid: call,
async)
gsttaglist.c:431: Warning: Gst: gst_tag_register: argument func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)
gsttask.c:379: Warning: Gst: gst_task_create: argument func: Missing (scope)
annotation for callback without GDestroyNotify (valid: call, async)
gsttaskpool.c:223: Warning: Gst: gst_task_pool_push: argument func: Missing
(scope) annotation for callback without GDestroyNotify (valid: call, async)

Missing GDestroyNotifies or skip.

gstobject.c:264: Warning: Gst: gst_object_ref_sink: return value: Missing
(transfer) annotation

Should probably be skipped

gstatomicqueue.c:270: Warning: Gst: gst_atomic_queue_pop: return value: Missing
(transfer) annotation
gstatomicqueue.c:219: Warning: Gst: gst_atomic_queue_peek: return value:
Missing (transfer) annotation
gstatomicqueue.c:149: Warning: Gst: gst_atomic_queue_new: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gstbufferpool.c:862: Warning: Gst: gst_buffer_pool_acquire_buffer: argument
params: Unresolved type: 'GstBufferPoolParams*'
gsttrace.c:114: Warning: Gst: gst_trace_new: return value: Invalid non-constant
return of bare structure or union; register as boxed type or (skip)
gsttrace.c:446: Warning: Gst: gst_alloc_trace_get: return value: Invalid
non-constant return of bare structure or union; register as boxed type or
(skip)
gsttaskpool.c:232: Warning: Gst: gst_task_pool_push: return value: Missing
(transfer) annotation

These apis, don't look too useful, skip perhaps?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list