Re: Wrapping videoflip from gst-plugins-good in Gstreamermm



On Wed, 2009-03-04 at 18:59 +0100, Murray Cumming wrote: 
> On Wed, 2009-03-04 at 10:23 +0100, David King wrote:
> > I am attempting to write a Gtkmm/Gstreamermm application that
> > rotates/flips video. I see that in gstreamer, in the gst-plugins-good
> > plugin set, there is a videoflip element that enables me to do just
> > that. However, this element is not (yet?) wrapped in Gstreamermm, and it
> > appears that no other gst-plugins-good elements are wrapped either.
> > 
> > I don't understand C++ well enough yet to wrap the interface myself, and
> > wondered if there are any plans to wrap videoflip or other
> > gst-plugins-good elements?
> 
> Although it's nice to have real type-safe classes and methods for common
> plugins, I hope that plugins can be used even if they are not wrapped.
> Isn't it possible to just instantiate the plugin by name and then set
> the appropriate properties using some generic API?

Yes.  It's possible to use plug-ins even if they are not wrapped.  All
that is needed is to create the element using
Gst::ElementFactory::create_element() and supply the plug-in name as the
factory name (that's the way it's designed in GStreamer), in this case
"videoflip".  The properties can be set/gotten with the
{set,get}_property() methods which Gst::Element inherits from
Glib::Object.

The plug-ins used in the examples were initially used this way, but
recently I modified them to use the plug-ins directly.  I'll try to
modify one to show how to use plug-ins indirectly as before.  Connecting
to signals is not available when using plug-ins indirectly this way, but
the interfaces that they implement are available by using
Gst::ElementInterfaced<>.

If gstreamermm becomes stable with the present plug-ins, it may be
possible to wrap other plug-ins in gst-plugins-good if it is useful.

-- 
José Alburquerque
jaalburquerque cox net



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