【发布时间】:2014-11-24 18:38:04
【问题描述】:
我在我的程序中使用 GStreamer 1.0 来播放文件中的视频。我想将其输出到 Gdk.Pixbuf 以将其添加到 Image 以显示它。但我不知道如何正确使用它。
这是我试图做的,但它不会编译:
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;
如果可能的话,你能建议我如何正确地做到这一点吗?或者我如何在不使用 Gdk.Pixbuf 的情况下以另一种方式做到这一点?我只是不知道该怎么办。
【问题讨论】: