Re: gstreamermm element wrapper-code generator



Milosz Derezynski wrote:
Hey All,

So here is the first version of the promised element wrapper generator. It is directly based off gstreamer's CVS-as-of-today gst-inspect tool (http://linux.die.net/man/1/gst-inspect-0.10)

You can compile it with:

g++ -o wrapper wrapper.cc `pkg-config --libs --cflags gstreamermm-0.10 glibmm-2.4`

and run it similar to glib-genmarshal:

'wrapper --header <element name>' (e.g. "ximagesink") will output the header file and
'wrapper --body <element name>' the corresponding body file

What remains to be done (in both senses) is the include of the header into the body since the output so far happens to stdout, just open the body file and add the include of the generated header file (to
generate header/body file as files just use the shell redirect).

What works:

- Creates a class named after the given element
- Wraps all properties of a given GstElement as Glib::Object C++ properties


I'm open to this idea. I had not been able to grasp the aspect of generating code to deal with plugins better, but it does look promising.

What doesn't work (yet):

- Wrapping signals. This will be tough because there exists nothing in glibmm/gtkmm to semi-automatically wrap C signals like we can do with properties, hence we will need parts of gmmproc to do that for us; i have yet to figure out what a good way is, help very appreciated

What is bad:

- The way the wrapper class wraps the generic Gst::Element in question is probably very _bad_. I just don't really know how to do this, because Glib::wrap won't work: we would everytime pass just a simple plain GstObject* to wrap(), and wrap() wouldn't know how to differentiate then, so this is out of the question. Comments here very appreciated.

-- Milosz


------------------------------------------------------------------------

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


--
José Alburquerque
jaalburquerque cox net

The path to real wisdom begins with a deep loving respect for the ever living God (Prov. 1:7)



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