gstreamermm element wrapper-code generator
- From: "Milosz Derezynski" <internalerror gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: gstreamermm element wrapper-code generator
- Date: Thu, 3 Apr 2008 21:28:10 +0200
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
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]