Re: Using _WRAP_CTOR() / _WRAP_CREATE() in gstreamermm



Murray Cumming wrote:
On Wed, 2008-02-27 at 08:24 -0500, José Alburquerque wrote:
Hi. I'm wondering: Would using _WRAP_CTOR() and _WRAP_CREATE() be ideal for classes such as Gst::Element? I'm running into some warnings I can't quite understand in relation to this after using these and then running tests/test-create-element:

[08:03][jose sweety:/usr/src/jhbuild-sources/gstreamermm/tests]$ ./test-create-element

(lt-test-create-element:15326): glibmm-WARNING **: Glib::ConstructParams::ConstructParams(): object class "gtkmm__GstElement" has no property named "factory"
Successfully created gst element 'gtkmm__gstelement0'.

_WRAP_CTOR() assumes that the *_new() parameter names are the same as
property names that the *_new() specifies to g_object_new(). When that
isn't true then you generally need to hand-code the constructor, with
the help of the _CONSTRUCT() macro in the .ccg file.

Sometimes you just need to use a different property name. But sometimes
the _new() function does extra weird stuff. But it should just call
g_object_new() or maybe call one or two other public functions. If it
does something that you can't sensibly reimplement in the C++
constructor then it's a bug in the C API.


Thanks.

-Jose


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]