Gst.Bus.Connect never calls its signal handler.

Justin J. Kim justin.joy.9to5 at gmail.com
Mon Jan 8 10:06:01 UTC 2018


Hello,

I am not sure whether this is my environment problem or gstreamer-shap's
bug.
Although gstreamer-sharp provides some examples how to connect signal
handler to a Gst.Bus,
it only works when I added the handler to 'SyncMessage'.

I am using VS.Net 2017 on Windows 10.

More specifically, this is the case that signal handler works.


```
Element pipeline = (Pipeline) Parse.Launch ("uridecodebin name=uridecodebin
!  fakesink");

var bus = pipeline.Bus;
bus.AddSignalWatch();
bus.EnableSyncMessageEmission();
bus.SyncMessage += HandleBusMessage;

```

The below case is to use 'Bus.Connect', but the handler never be called.
However, if I create "uridecodebin", it always emits "source-setup" signal
so I can use "Connect".


```
Element pipeline = (Pipeline) Parse.Launch ("uridecodebin name=uridecodebin
! fakesink");

var bus = pipeline.Bus;
bus.AddSignalWatch();
// HandleStateChanged never be called.
bus.Connect("message::state-changed", HandleStateChanged);

uridecodebin = pipeline.GetByName("uridecodebin");
// SourceSetup is always called.
uridecodebin.Connect("source-setup", SourceSetup);
```

Am I missing something when calling "Connect"?

BR,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180108/37aac3c7/attachment.html>


More information about the gstreamer-devel mailing list