gst-device-monitor: Incorrect device information is printed to stdout, backslashes should not be added to quoted strings
I am on a Windows machine, running Gstreamer 1.18.4. I have 3 microphones on my PC. When I execute gst-device-monitor-1.0 Audio/Source
I correctly see 3 wasapi devices, (and 4 directsound devices).
Below is an excerpt of my console output (just showing 1 wasapi and 1 directsound device).
Device found:
name : Microphone (JOUNIVO JV801 )
class : Audio/Source
caps : audio/x-raw, format={ (string)S16LE, (string)S8 }, layout=interleaved, rate=[ 1, 2147483647 ], channels=[ 1, 2 ]
properties:
device.api = directsound
device.guid = "\{F2F757BE-CB31-4CB1-AE49-4883E1CD299A\}"
directsound.device.driver = "\{0.0.1.00000000\}.\{f2f757be-cb31-4cb1-ae49-4883e1cd299a\}"
directsound.device.description = "Microphone\ \(JOUNIVO\ JV801\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)"
gst-launch-1.0 directsoundsrc device="\{F2F757BE-CB31-4CB1-AE49-4883E1CD299A\}" ! ...
Device found:
name : Microphone (JOUNIVO JV801 )
class : Audio/Source
caps : audio/x-raw, format=F32LE, layout=interleaved, rate=48000, channels=1, channel-mask=0x0000000000000004
properties:
device.api = wasapi
device.strid = "\{0.0.1.00000000\}.\{f2f757be-cb31-4cb1-ae49-4883e1cd299a\}"
wasapi.device.description = "Microphone\ \(JOUNIVO\ JV801\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)"
gst-launch-1.0 wasapisrc device="\{0.0.1.00000000\}.\{f2f757be-cb31-4cb1-ae49-4883e1cd299a\}" ! ...
There is a problem with ALL of the quoted strings in the text above: The whitespaces and curly braces do not need to be escaped, they are already quoted.
For example, the command gst-launch-1.0 wasapisrc device= ...
only works if the backslashes are removed. So the text above is very misleading, and causes people to waste a bunch of time trying to figure out what string to pass to the device
property which is improperly documented to begin with (as described here).
If double-quotes are already there, the backslashes don't need to escaping anything except (1) backslashes and (2) double quotes.