I often forget how this exactly works, so here a minimalist example, translated from the C example in gst-plguns-bad.
Please note that this currently only works in X11, since the XID is needed.
You can exchange the sinks and sources. For example videotestsrc and xvimagesink.
Working with the Clutter sink requires a litte more work.