GNOME Bugzilla – Bug 748681
directsoundsrc: device-name doesn't accept windows given names if there are special characters in
Last modified: 2018-11-03 13:34:47 UTC
device-name doesn't accept windows given names if there are special characters in - eg. german "(High Definition Audio-Gerät)". But works if you change the naming in windows registry, which is only possible for testing purposes. May an device-ID (GUID) based solution is needed!? $ GST_DEBUG=3,directsoundsrc:5 gst-launch-1.0.exe directsoundsrc buffer-time=10000 device-name="mic (High Definition Audio-Gerät)" ! directsoundsink buffer-time=200000 0:00:00.043914339 3444 02D27260 WARN audioresample gstaudioresample.c:1537:plugin_init: Orc disabled, can't benchmark int vs. float resampler 0:00:00.048490103 3444 02D27260 WARN GST_PERFORMANCE gstaudioresample.c:1540:plugin_init: orc disabled, no benchmarking done 0:00:00.064831675 3444 02D27260 DEBUG directsoundsrc gstdirectsoundsrc.c:164:gst_directsound_src_class_init: initializing directsoundsrc class 0:00:00.139332696 3444 02D27260 DEBUG directsoundsrc gstdirectsoundsrc.c:259:gst_directsound_src_init:<GstDirectSoundSrc@00513220> initializing directsoundsrc 0:00:00.144179343 3444 02D27260 ERROR GST_PIPELINE grammar.y:453:gst_parse_element_set: could not set property "device-name" in element "directsoundsrc0" to "mic (High Definition Audio-Gerät)" 0:00:00.148407097 3444 02D27260 DEBUG directsoundsrc gstdirectsoundsrc.c:202:gst_directsound_src_getcaps:<directsoundsrc0> get caps 0:00:00.151341707 3444 02D27260 DEBUG directsoundsrc gstdirectsoundsrc.c:202:gst_directsound_src_getcaps:<directsoundsrc0> get caps [Invalid UTF-8] WARNING: erroneous pipeline: could not set property "device-name" in element "directsoundsrc0" to "mic (High Definition Audio-Ger\xe4t)"
The best thing would be to implement GstDeviceProvider support. The reason this doesn't work is that your locale is ISO-8859-15 and the string is not converted from locale to utf-8.
IIRC, the device-name only accepts GUIDs, so you can't give it a real name anyways, so this bug is invalid. You can use DirectSoundEnumerate to find the needed GUID. GstDeviceProvider support would be nice though.
Same here. On german windwos directsoundsrc don't work! There is no GUID for this Device, so i can't connect them over GUID Device found: name : Primärer Soundaufnahmetreiber class : Audio/Source caps : audio/x-raw, format=(string){ S16LE, S8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]; properties: device.api = directsound device.guid = "\(NULL\)" directsound.device.driver = "" directsound.device.description = "Prim\303\244rer\ Soundaufnahmetreiber" gst-launch-1.0 directsoundsrc ! ...
Some conversion from locale encoding to UTF8 and back is needed here, we shouldn't expose non-UTF8 strings via properties, etc. g_locale_from_utf8() and g_locale_to_utf8() would be the relevant functions and we use them in various places already, but apparently not everywhere. Does someone want to make a patch for this?
On a side note, our focus is more on the wasapi elements these days, so you may want to check if it works there or not. There's also GstDeviceMonitor support these days I believe, although that might not help you from gst-launch.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/246.