Hi List,
I am testing the new feature Device Monitor, and I have this small test:
static gboolean message_func(GstBus *bus, GstMessage *message, gpointer user_data) {
switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_DEVICE_ADDED: g_print("Device Added"); break; case GST_MESSAGE_DEVICE_REMOVED: g_print("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_device_monitor_start (monitor);
(..)
GMainLoop *loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (loop); /* Free resources */
gst_object_unref (bus); gst_device_monitor_stop (monitor);
gst_object_unref (monitor); The problem is that if a plug in a new camera, I never get the message GST_MESSAGE_DEVICE_ADDED.
I am using gstreamer Version 1.4.0 and I am working in Linux.
Am doing something wrong?
Thanks!!
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
Is it a USB Webcam? Are you running a generic desktop distribution (Fedora, Ubuntu, etc) or something strange? When you connect the camera, does a /dev/video<X> device appear? Check the return value of gst_device_monitor_start(). Olivier On Fri, 2015-07-10 at 16:35 +0200, Luis Garcia wrote: > Hi List, > I am testing the new feature Device Monitor, and I have this small > test: > > static gboolean message_func(GstBus *bus, GstMessage *message, > gpointer user_data) { > switch (GST_MESSAGE_TYPE (message)) { > case GST_MESSAGE_DEVICE_ADDED: > g_print("Device Added"); > break; > case GST_MESSAGE_DEVICE_REMOVED: > g_print("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_device_monitor_start (monitor); > (..) > GMainLoop *loop = g_main_loop_new (NULL, FALSE); > g_main_loop_run (loop); > /* Free resources */ > gst_object_unref (bus); > gst_device_monitor_stop (monitor); > gst_object_unref (monitor); > > The problem is that if a plug in a new camera, I never get the > message GST_MESSAGE_DEVICE_ADDED. > I am using gstreamer Version 1.4.0 and I am working in Linux. > > Am doing something wrong? > Thanks!! > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
It is a logitech camera, an USB Webcam.
I am running Suse Linux.
When I connect the camera it appears in /dev the new device, /dev/video0.
And I added :
if (!gst_device_monitor_start (monitor))
g_error ("Failed to start device monitor!"); to check if device monitor starts, and it starts without an error.
Greetings
Gesendet: Freitag, 10. Juli 2015 um 18:08 Uhr
Von: "Olivier Crête" <[hidden email]> An: [hidden email] Betreff: Re: GST_MESSAGE_DEVICE_ADDED never called Hi,
Is it a USB Webcam? Are you running a generic desktop distribution (Fedora, Ubuntu, etc) or something strange? When you connect the camera, does a /dev/video<X> device appear? Check the return value of gst_device_monitor_start(). Olivier -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello, Check system messages with dmesg to see if the kernel detects your camera. $ dmesg -wH ... You may also study how audio-recorder handles new and removed audio-input devices. Sometimes it takes upto 5 - 6 seconds before audio-recorder (or Gstreamer) reacts to new hw. Audio-recorder has also a refresh-button to reload the device list. Disconnected devices are handled immediately. Moma. On Fri, Jul 10, 2015 at 5:26 PM, Luis Garcia <[hidden email]> wrote:
Sent from my PC, laptop or phone with Ubuntu-Linux.
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Re-hi, I want to be more precise. It can take upto 10 - 15 seconds before audio-recorder (or gstreamer monitor) detects new hw. The device (like my USB webcam with mic) appears in the GUI but the delay feels like a bug. Moma On Fri, Jul 10, 2015 at 10:33 PM, Osmo Antero <[hidden email]> wrote:
Sent from my PC, laptop or phone with Ubuntu-Linux.
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Re-hi again, I can also see the long detection delay with gst-device-monitor-1.0 command. $ man gst-device-monitor-1.0 # In monitor mode $ gst-device-monitor-1.0 -f ... I am running Ubuntu 15.04 64bit. On Fri, Jul 10, 2015 at 10:43 PM, Osmo Antero <[hidden email]> wrote:
Sent from my PC, laptop or phone with Ubuntu-Linux.
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks for you answer!
Wenn I check if the kernel detects my camera with dmesg -wH, I see it detects the camera within a second, or less.
But using gstreamer in monitor mode,
$ gst-device-monitor-1.0 -f
gstreamer does not detect my camera. There is no delay detecting, it does not detect it.
I am running openSUSE 13.2. It is a problem from the OS?
Gesendet: Samstag, 11. Juli 2015 um 13:39 Uhr
Von: "Osmo Antero" <[hidden email]> An: "Discussion of the development of and with GStreamer" <[hidden email]> Betreff: Re: Re: GST_MESSAGE_DEVICE_ADDED never called Re-hi again,
I can also see the long detection delay with gst-device-monitor-1.0 command.
$ man gst-device-monitor-1.0
# In monitor mode
$ gst-device-monitor-1.0 -f
...
I am running Ubuntu 15.04 64bit.
On Fri, Jul 10, 2015 at 10:43 PM, Osmo Antero <osmoma@...> wrote:
Sent from my PC, laptop or phone with Ubuntu-Linux.
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |