device-monitor: fix device listing without --follow
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 30 Sep 2019 14:11:18 +0000 (16:11 +0200)
committerMathieu Duponchelle <mduponchelle1@gmail.com>
Mon, 30 Sep 2019 18:54:12 +0000 (18:54 +0000)
commit0e1da383a7bb9083184779cced152c0a57442b14
tree4a5f7d72e1529e9750e13f7d0e895d9945f91ed3
parent606ab04cd69db53ea68b53808b9d8904a42c7127
device-monitor: fix device listing without --follow

In !427, I removed the call to get_devices in order to always
print added devices from the bus handler, however this requires
the main loop to run until all pending messages have been consumed.

This commit achieves this by always running the main loop, and
simply adding an idle source to quit it in the non --follow case.
tools/gst-device-monitor.c