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 657603 - Add _get_type() functions for GstMiniObject
Add _get_type() functions for GstMiniObject
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other All
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-29 11:14 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2011-10-10 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add _get_type() functions for GstMiniObject (8.51 KB, patch)
2011-08-29 11:14 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review

Description Johan (not receiving bugmail) Dahlin 2011-08-29 11:14:14 UTC
GstMiniObject were recently converted over to GBoxed,
but the gobject introspection scanner is not picking up the types
as boxed unless they have a public _get_type() function.

This patch adds get_type() functions for GstBuffer, GstBufferList,
GstCapsand GstEvent. GstMessage and GstQuery already had proper
get_type functions.

Passes all tests minus element/tee which is probably because I'm using
glib trunk.
Comment 1 Johan (not receiving bugmail) Dahlin 2011-08-29 11:14:17 UTC
Created attachment 195063 [details] [review]
Add _get_type() functions for GstMiniObject
Comment 2 Johan (not receiving bugmail) Dahlin 2011-08-29 11:17:57 UTC
Testsuite failure I got:

Running suite(s): tee

GThread-ERROR **: file gthread-posix.c: line 385 (g_thread_join_posix_impl): error 'Invalid argument' during 'pthread_join (*(pthread_t*)thread, &ignore)'

GThread-ERROR **: file gthread-posix.c: line 385 (g_thread_join_posix_impl): error 'Invalid argument' during 'pthread_join (*(pthread_t*)thread, &ignore)'
66%: Checks: 6, Failures: 0, Errors: 2
elements/tee.c:217:E:general:test_release_while_buffer_alloc:0: (after this point) Received signal 5 (Trace/breakpoint trap)
elements/tee.c:217:E:general:test_release_while_second_buffer_alloc:0: (after this point) Received signal 5 (Trace/breakpoint trap)
FAIL: elements/tee
Comment 3 Johan (not receiving bugmail) Dahlin 2011-08-29 11:29:34 UTC
I get the same testsuite failure without the patch, so it's clearly not relevant for this bug, sorry for the noise.
Comment 4 Wim Taymans 2011-08-29 13:48:33 UTC
I decided to go for the GST_DEFINE_MINI_OBJECT() macro to define the _get_type() functions and have _initialize function call the _get_type() and store the result in a public global variable.

Johan, does this work for you?
Comment 5 Johan (not receiving bugmail) Dahlin 2011-08-29 13:56:40 UTC
(In reply to comment #4)
> I decided to go for the GST_DEFINE_MINI_OBJECT() macro to define the
> _get_type() functions and have _initialize function call the _get_type() and
> store the result in a public global variable.
> 
> Johan, does this work for you?

Sure. The only thing the scanner needs is that the _get_type() functions are present and public.

Are you writing the macro or should I?
Comment 6 Wim Taymans 2011-08-29 14:01:39 UTC
(In reply to comment #5)
> (In reply to comment #4)
> 
> Are you writing the macro or should I?

I just commited some stuff to 0.11
Comment 7 Johan (not receiving bugmail) Dahlin 2011-08-29 14:38:39 UTC
Looks great to me. Closing this bug.

You might want to rename the macro to GST_DEFINE_MINI_OBJECT_TYPE for consistency.