MediaPlayer Application failed - g_value_set_object failed.
Tim-Philipp Müller
t.i.m at zen.co.uk
Mon Jan 7 02:29:35 PST 2013
On Mon, 2013-01-07 at 01:03 -0800, Harikumar wrote:
> I have another query regarding this. If I want to obtain the individual
> fields of the pgminfo structure from my media player application, do I need
> to install properties for each field ?
>
> For example :
> media player test application :
> my_notify_func(GObject *obj)
> {
> GObject *pgminfo;
> guint field1;
>
> g_object_get(obj, "pgminfo", &pgminfo, NULL); //This is now working.
> g_object_get(pgminfo, "field-1", &field1, NULL); // ???? Here do I need
> to install field-1 as a separate property
> }
That is entirely up to you and the context of your code (is it an
application? A API-stable library? An internal helper library? etc.).
There is no reason you have to use properties to get at the fields. You
can make the structure and the fields public and let code access them
directly (downside: you have no control over the access, thread-safety
might be an issue, etc.). Or you simply have pgm_info_get_foo() getter
functions.
Cheers
-Tim
More information about the gstreamer-devel
mailing list