GStreamer Device Monitor Bug

Hello,

I’ve noticed that gst-device-monitor does not detect when a Source/Monitor device is removed or added. When I retrieve the list of currently available devices, the monitors are correctly listed. However, if a change occurs (e.g., a monitor is connected or disconnected), the GStreamer device monitor does not receive any event or message on the bus.

This appears to be a bug in the device monitoring functionality. It affects dynamic detection of display sources, which is critical in applications where monitors may be connected or disconnected at runtime.

Is this a known limitation or a bug in GstDeviceMonitor? If not, I’d like to report it properly.

Where can I submit this issue?

Thank you.

Are you using gst-device-monitor-1.0 -f ?

What’s the device you are connecting/disconnecting? What plugin/device provider handles it?

And what version of GStreamer are you testing this with?

Bugs can be reported in GitLab: Issues · GStreamer / gstreamer · GitLab

Hello,

I am using gst-device-monitor-1.0 -f on Windows with GStreamer 1.26.0. It works well for detecting dynamic device changes such as webcams and microphones — they are correctly detected when connected or disconnected.

However, display monitors (device class: Source/Monitor) are not detected dynamically. When I connect or disconnect a monitor, no event is emitted on the GStreamer bus. The only way to update the device list is to restart the monitor tool.

When I list the available devices manually, display monitors are correctly shown. My GStreamer setup uses the d3d11screencapturesrc and d3d12screencapturesrc APIs. Here is an example of a display device as reported:

Device found:
name : HP E27k G5
class : Source/Monitor
caps : video/x-raw(memory:D3D11Memory), format=BGRA, width=3840, height=2160, …
properties:
device.api = d3d11
device.name = \.\DISPLAY2
device.path = \?\DISPLAY#HPN389A#…
device.primary = false
device.type = displayport-external
device.hmonitor = 123669627

Thank you!

Ah, something for @seungha I suppose :slight_smile:

Looking at the D3D device provider, there is indeed no support for dynamic devices, it’s only a static listing. I guess it would need to be implemented.

Already fixed in d3d12screencapture: Add support for monitor add/remove in device provider (!9330) · Merge requests · GStreamer / gstreamer · GitLab (d3d12 only)

Note that as the maintainer of GstD3D11/12, I’m focusing development solely on D3D12, while D3D11 is mainly maintained for legacy compatibility. Contributions to GstD3D11 are still welcome, of course