From 7613c99e54a5fbf2e749ce902b940ff1e9382890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 21 Jun 2009 10:28:05 +0200 Subject: [PATCH] Set pipeline to null state in the end and use the real NeedData event of appsrc --- samples/AppSrc.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/AppSrc.cs b/samples/AppSrc.cs index 75f3619de7..7cdead9de5 100644 --- a/samples/AppSrc.cs +++ b/samples/AppSrc.cs @@ -18,7 +18,7 @@ public class AppSrcDemo { static MainLoop loop; static Gst.App.AppSrc appsrc; - static Pipeline pipeline; + static Pipeline pipeline; public static void Main (string[] args) { @@ -39,16 +39,17 @@ public class AppSrcDemo appsrc.Caps = Gst.Video.VideoUtil.FormatNewCaps(Gst.Video.VideoFormat.BGRA, 640, 480, 4, 1, 1, 1); // Connect the handlers - GLib.Signal.Lookup(appsrc, "need-data").AddDelegate(new EventHandler(PushAppData)); + appsrc.NeedData += PushAppData; pipeline.Bus.AddSignalWatch(); pipeline.Bus.Message += MessageHandler; // Run, loop, run! pipeline.SetState(State.Playing); loop.Run(); + pipeline.SetState(State.Null); } - static void PushAppData(object o, EventArgs e) + static void PushAppData(object o, Gst.App.NeedDataArgs args) { ulong mseconds = 0; if (appsrc.Clock != null)