GStreamer-sharp signals and events
Sebastian Dröge
sebastian.droege at collabora.co.uk
Mon Dec 5 02:00:44 PST 2011
On Mo, 2011-12-05 at 01:53 -0800, Ralph wrote:
> Ralph wrote
> >
> > I'm developing a C# WPF application using OSSBuild and gstreamersharp.
> > I have a problem listening to signals generated by playbin2.
> > This is what I do:
> >
> > In the constructor:
> > Gst.BasePlugins.PlayBin2 playBin = new Gst.BasePlugins.PlayBin2();
> > playBin.AboutToFinish += OnAboutToFinish;
> >
> > Somewhere else:
> > private void OnAboutToFinish(object o, Gst.GLib.SignalArgs args)
> > {
> > //supply the next file
> > playBin.Uri = nextFileName;
> > }
> >
> >
> > The problem is that even if OnAboutToFinish method contains no code, the
> > program crashes.
> > I found that in other languages (Python, for example) the event handler
> > always returns TRUE. Unfortunately setting args.RetVal to true causes the
> > following exception:
> >
> > Object reference not set to an instance of an object.
> > at Gst.GLib.Value.set_Val(Object value)
> > at Gst.DynamicSignal.OnMarshal(IntPtr closure, Value& retval, UInt32
> > argc, IntPtr argsPtr, IntPtr ihint, IntPtr data)
> >
> >
> > The same problem occurs if instead of using the .NET AboutToFinish event
> > of playbin2, I connect to about-to-finish signal using Connect method:
> > playBin.Connect("about-to-finish", OnAboutToFinish);
> >
> >
> > How should I handle playbin2 signals?
> >
>
>
> Does anyone have ANY idea why the program crashes when an event handler is
> attached to the event like AboutToFinish or VideoChanged? It is really
> stopping me now, after a few weeks of development I got stuck and I don't
> know what to do.
Hi,
please file a bug in bugzilla at http://bugzilla.gnome.org . If possible
please attach a small testcase for this bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111205/2d7671b9/attachment.pgp>
More information about the gstreamer-devel
mailing list