After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748681 - directsoundsrc: device-name doesn't accept windows given names if there are special characters in
directsoundsrc: device-name doesn't accept windows given names if there are s...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-30 06:42 UTC by Thomas Roos
Modified: 2018-11-03 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Roos 2015-04-30 06:42:09 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)"
Comment 1 Tim-Philipp Müller 2015-04-30 08:55:42 UTC
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.
Comment 2 Dustin Spicuzza 2017-04-30 20:54:17 UTC
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.
Comment 3 Peter 2018-06-06 06:46:03 UTC
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 ! ...
Comment 4 Sebastian Dröge (slomo) 2018-06-06 08:43:25 UTC
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?
Comment 5 Tim-Philipp Müller 2018-06-06 08:57:45 UTC
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.
Comment 6 GStreamer system administrator 2018-11-03 13:34:47 UTC
-- 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.