// String name = Platform.isLinux() ? "xvimagesink" :
// Platform.isWindows() ? "d3dvideosink" :
// Platform.isMac() ? "osxvideosink" : null;
// videosink = (BaseSink)ElementFactory.make(name, "VideoComponent" + counter++);
autosink = (Bin)ElementFactory.make("autovideosink", "Sink4VideoComponent" + counter++);
autosink.connect(new ELEMENT_ADDED() {
public void elementAdded(Bin bin, Element element) {
if (element instanceof BaseSink) {
videosink = (BaseSink)element;
for (Map.Entry<String, Object> e : properties.entrySet())
videosink.set(e.getKey(), e.getValue());