Re: [gst-devel] Gstreamer with C++

José Alburquerque wrote:
Eric Jonas wrote:
[continuing on gtkmm-list] Do you anticipate it being possible to use elements written in c++ from
gstreamer pipelines in other languages (C, python, etc) ? I imagine the
dealing with the complexity of C++ name mangling, lifecycle complexity,
and ABI would make this difficult.

Yes I think this is right; I don't think it's possible to write GStreamer plugins in c++. The GstPlugin <> API explains (in the description) that a GstPluginDesc <> called "gst_plugin_desc" must be exported by the developer and then write the necessary plugin code. We would have to find a way to use a slot in the GstPluginDesc for the GstPluginInitFunc <> (a pointer to a plugin init function) and I'm not sure how we would go about this (partly because to start with we would need for the GstPluginInitFunc type to have an additional gpointer* parameter). Also, as you say, the gstreamermm library initialization and lifecycle of objects is something that we would most probably have to pay attention to. I've been thinking about all this a bit since you asked, and presently this doesn't seem possible, though I may think about it a bit more and make a definite determination later (God willing). Right now, I'd suggest not to plan on writing c++ plugins until this is made definite. Does this help?

I need to refine this answer:

There are two ways to register new GStreamer plugins: 1) The way I described above which to me looks more and more less likely to be possible with gstreamermm and 2) registering a plugin specific to an application "statically" (which means that the plugin is not "shipped as a separate module file" according to the GstPlugin docs). In the C API, the gst_plugin_register_static() <> function is used to register plugin elements that have been written in an application. These plugins are available outside the application to others (I think regardless of which language they employ to use the plugin) as long as the application is "active" (I would think). If this gst_plugin_register_static() function can be successfully wrapped in gstreamerrmm I think what you're asking about may be possible in this way. I'll be working on wrapping this function and we should know fairly quickly (a release or two) if this can become a possibility with gstreamermm.

José Alburquerque

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