AW: Bus add watch not working properly for Device monitor
Thornton, Keith
keith.thornton at zeiss.com
Fri Jul 10 04:25:41 PDT 2015
If you are running under windows with a different message loop e.g. QT, you need to call gst_bus_set_sync_handler instead.
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Alicia Romero
Gesendet: Freitag, 10. Juli 2015 13:12
An: Discussion of the development of and with GStreamer
Betreff: Bus add watch not working properly for Device monitor
Hi List,
I add a watch to the bus of a device monitor:
gboolean message_func(GstBus *bus, GstMessage *message, gpointer user_data) {
GstDevice *device = NULL;
gchar *name = NULL;
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_DEVICE_ADDED:
[...]
break;
case GST_MESSAGE_DEVICE_REMOVED:
[...]
break;
default:
break;
}
return G_SOURCE_CONTINUE;
}
GstDeviceMonitor *monitor = gst_device_monitor_new();
GstBus *bus = gst_device_monitor_get_bus(monitor);
gst_bus_add_watch(bus, message_func, NULL);
gst_object_unref(bus);
But it is not working for me. I add a new video device, but it never enters message_func.
Any idea why is this happening?
Thanks!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150710/9b61035d/attachment.html>
More information about the gstreamer-devel
mailing list