GNOME Bugzilla – Bug 657603
Add _get_type() functions for GstMiniObject
Last modified: 2011-10-10 11:54:20 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.
Created attachment 195063 [details] [review] Add _get_type() functions for GstMiniObject
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
I get the same testsuite failure without the patch, so it's clearly not relevant for this bug, sorry for the noise.
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?
(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?
(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
Looks great to me. Closing this bug. You might want to rename the macro to GST_DEFINE_MINI_OBJECT_TYPE for consistency.