title: How to output GStreamer video to Gdk.Pixbuf using Vala?
body: <p>I am using GStreamer 1.0 in my program to play video from file. And I want to output it to Gdk.Pixbuf to add it to Image to display it. But I can't figure out how to use it properly.</p>
  
  <p>Here is what I tried to do, but it won't compile:</p>
  
  <pre><code>this.pipeline = new Pipeline ("mypipeline");
  this.src = ElementFactory.make ("filesrc", "video");
  src.set("location", downloadFileName);
  this.sink = ElementFactory.make ("gdkpixbufsink", "sink");
  this.pipeline.add_many (this.src, this.sink);
  this.src.link (this.sink);
  
  this.pipeline.set_state (State.PLAYING);
  
  this.videoPixbuf = sink.get("last-pixbuf") as Gdk.Pixbuf;
  </code></pre>
  
  <p>Can you suggest me how to do it properly, if possible? Or how I can do it the other way, without using Gdk.Pixbuf? I just don't know what to do.</p>