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 764298 - wasapi: does not work at all
wasapi: does not work at all
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.8.0
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-29 01:16 UTC by Kyrylo V. Polezhaiev
Modified: 2018-11-03 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-wasapisrc-Actually-return-caps.patch (750 bytes, patch)
2016-07-21 14:57 UTC, Morten M Neergaard
none Details | Review
0002-wasapisrc-Allow-choosing-format.patch (1.64 KB, patch)
2016-07-21 14:57 UTC, Morten M Neergaard
none Details | Review
0003-wasapisrc-Fix-functions-returning-FALSE-on-success.patch (1.00 KB, patch)
2016-07-21 14:58 UTC, Morten M Neergaard
none Details | Review
0004-wasapisrc-add-some-error-handling.patch (2.00 KB, patch)
2016-07-21 14:58 UTC, Morten M Neergaard
none Details | Review
0005-wasapisrc-Use-polling-rather-than-event-driven-I-O.patch (5.18 KB, patch)
2016-07-21 14:58 UTC, Morten M Neergaard
none Details | Review
0006-wasapisrc-Handle-reported-silence.patch (1.49 KB, patch)
2016-07-21 14:58 UTC, Morten M Neergaard
none Details | Review
0007-wasapisrc-Log-buffer-flags-in-a-useful-manner.patch (1.29 KB, patch)
2016-07-21 14:59 UTC, Morten M Neergaard
none Details | Review
0008-wasapisrc-Add-loopback-and-device-type-selection.patch (8.33 KB, patch)
2016-07-21 14:59 UTC, Morten M Neergaard
none Details | Review
0009-wasapisrc-update-example-to-show-typical-usage.patch (955 bytes, patch)
2016-07-21 14:59 UTC, Morten M Neergaard
none Details | Review

Description Kyrylo V. Polezhaiev 2016-03-29 01:16:56 UTC
gst-launch-1.0.exe -e wasapisrc ! wasapisink

Expected result: echo.
Actual result: pipeline starts. I can hear nothing.
Comment 1 Kyrylo V. Polezhaiev 2016-03-29 01:19:45 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=689691
Comment 2 Sebastian Dröge (slomo) 2016-03-29 07:25:14 UTC
There are various problems with the wasapi plugin, yes, starting with proper negotiation of the audio format.
Comment 3 Morten M Neergaard 2016-07-21 14:56:34 UTC
I have written a patchset. The plugin works again, but not without its quirks.

The largest remaining bug is that it hangs when stopping.

On the crack side of things, patch 5 adds a BYTE overflow[10240] that handles the odd read lengths requested at buffer wraparounds. If wasapi has 960 samples available, each 32-bit stereo, that's 7680 bytes. If the length passed to the read function is less than that, we put the remaining bytes in the overflow buffer, and write them out on the next pass. Especially the hardcode of 10240 is bad here, although by my arithmetics we should never see numbers above 7672 bytes here.

For now, the format is not negotiated, you have to specify a cap that your driver supports. E.g. wasapisrc loopback=true dev-type=multimedia ! audio/x-raw,format=S16LE,rate=48000,channels=1 might fail on a system with 44.1khz stereo output.
Comment 4 Morten M Neergaard 2016-07-21 14:57:24 UTC
Created attachment 331880 [details] [review]
0001-wasapisrc-Actually-return-caps.patch
Comment 5 Morten M Neergaard 2016-07-21 14:57:47 UTC
Created attachment 331881 [details] [review]
0002-wasapisrc-Allow-choosing-format.patch
Comment 6 Morten M Neergaard 2016-07-21 14:58:04 UTC
Created attachment 331882 [details] [review]
0003-wasapisrc-Fix-functions-returning-FALSE-on-success.patch
Comment 7 Morten M Neergaard 2016-07-21 14:58:19 UTC
Created attachment 331883 [details] [review]
0004-wasapisrc-add-some-error-handling.patch
Comment 8 Morten M Neergaard 2016-07-21 14:58:34 UTC
Created attachment 331884 [details] [review]
0005-wasapisrc-Use-polling-rather-than-event-driven-I-O.patch
Comment 9 Morten M Neergaard 2016-07-21 14:58:49 UTC
Created attachment 331885 [details] [review]
0006-wasapisrc-Handle-reported-silence.patch
Comment 10 Morten M Neergaard 2016-07-21 14:59:04 UTC
Created attachment 331886 [details] [review]
0007-wasapisrc-Log-buffer-flags-in-a-useful-manner.patch
Comment 11 Morten M Neergaard 2016-07-21 14:59:22 UTC
Created attachment 331887 [details] [review]
0008-wasapisrc-Add-loopback-and-device-type-selection.patch
Comment 12 Morten M Neergaard 2016-07-21 14:59:40 UTC
Created attachment 331888 [details] [review]
0009-wasapisrc-update-example-to-show-typical-usage.patch
Comment 13 Morten M Neergaard 2016-08-03 13:16:51 UTC
(In reply to Morten M Neergaard from comment #3)
> I have written a patchset. The plugin works again, but not without its
> quirks.
> 
> The largest remaining bug is that it hangs when stopping.

This was happening in my build from master, but isn't happening in my current build. Not sure why, but pressing ctrl+c now in a complete pipeline with screen capture + audio loopback capture quits promptly.
Comment 14 Nirbheek Chauhan 2018-01-31 10:29:41 UTC
Over the past couple of weeks I've pushed patches to the wasapi plugin that make it actually work. I've gone through your patches and almost everything in there is fixed in git now. The only thing remaining is handling silent buffers in wasapisrc.

See also: https://bugzilla.gnome.org/show_bug.cgi?id=792897

Could you please try the latest code in -bad and confirm this?
Comment 15 GStreamer system administrator 2018-11-03 13:48:15 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/363.