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 792782 - directsoundsink/src: Add support for a DeviceProvider
directsoundsink/src: Add support for a DeviceProvider
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-22 13:24 UTC by Sebastian Dröge (slomo)
Modified: 2018-01-26 05:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
directsoundsink: Add support for a DeviceProvider (14.69 KB, patch)
2018-01-22 13:24 UTC, Sebastian Dröge (slomo)
none Details | Review
directsoundsrc: Add support for a DeviceProvider (15.32 KB, patch)
2018-01-22 13:25 UTC, Sebastian Dröge (slomo)
none Details | Review
directsoundsink: Add support for a DeviceProvider (14.77 KB, patch)
2018-01-24 16:38 UTC, Sebastian Dröge (slomo)
none Details | Review
directsoundsrc: Add support for a DeviceProvider (15.35 KB, patch)
2018-01-24 16:38 UTC, Sebastian Dröge (slomo)
none Details | Review
directsoundsrc: Add support for a DeviceProvider (16.45 KB, patch)
2018-01-25 18:10 UTC, Sebastian Dröge (slomo)
none Details | Review
directsoundsrc: Add support for a DeviceProvider (16.08 KB, patch)
2018-01-25 18:16 UTC, Sebastian Dröge (slomo)
committed Details | Review
directsoundsink: Add support for a DeviceProvider (16.33 KB, patch)
2018-01-25 18:18 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2018-01-22 13:24:20 UTC
Should be self-explanatory
Comment 1 Sebastian Dröge (slomo) 2018-01-22 13:24:26 UTC
Created attachment 367215 [details] [review]
directsoundsink: Add support for a DeviceProvider
Comment 2 Sebastian Dröge (slomo) 2018-01-22 13:25:45 UTC
Created attachment 367216 [details] [review]
directsoundsrc: Add support for a DeviceProvider
Comment 3 Sebastian Dröge (slomo) 2018-01-24 16:38:00 UTC
Created attachment 367389 [details] [review]
directsoundsink: Add support for a DeviceProvider
Comment 4 Sebastian Dröge (slomo) 2018-01-24 16:38:51 UTC
Created attachment 367390 [details] [review]
directsoundsrc: Add support for a DeviceProvider
Comment 5 Nirbheek Chauhan 2018-01-25 15:10:01 UTC
Review of attachment 367389 [details] [review]:

LGTM, just a few minor comments.

::: sys/directsound/gstdirectsounddevice.c
@@ +103,3 @@
+      "audio/x-ac3, framed = (boolean) true;"
+      "audio/x-dts, framed = (boolean) true;");
+#endif

Maybe it makes sense to factor this out into gstdirectsoundsink.h as a string macro instead of duplicating it? Ditto for gstdirectsoundsrc.h.

@@ +124,3 @@
+  GST_INFO_OBJECT (probe_data->self, "sound device name: %s, %s (GUID %s)",
+      description, driver, guid_str);
+

GST_STR_NULL (guid_str) ?

@@ +140,3 @@
+      "device-class", "Audio/Sink", "properties", props, NULL);
+#endif
+

If you want to be fancy, you can #ifdef only "Audio/Source" and "Audio/Sink" ;)
Comment 6 Sebastian Dröge (slomo) 2018-01-25 18:10:40 UTC
Created attachment 367434 [details] [review]
directsoundsrc: Add support for a DeviceProvider
Comment 7 Sebastian Dröge (slomo) 2018-01-25 18:16:15 UTC
Created attachment 367435 [details] [review]
directsoundsrc: Add support for a DeviceProvider
Comment 8 Sebastian Dröge (slomo) 2018-01-25 18:18:39 UTC
Created attachment 367437 [details] [review]
directsoundsink: Add support for a DeviceProvider
Comment 9 Sebastian Dröge (slomo) 2018-01-25 18:19:48 UTC
(In reply to Nirbheek Chauhan from comment #5)

> @@ +140,3 @@
> +      "device-class", "Audio/Sink", "properties", props, NULL);
> +#endif
> +
> 
> If you want to be fancy, you can #ifdef only "Audio/Source" and "Audio/Sink"
> ;)

No, MSVC is usually unhappy about such things :)
Comment 10 Sebastian Dröge (slomo) 2018-01-25 18:28:31 UTC
Comment on attachment 367435 [details] [review]
directsoundsrc: Add support for a DeviceProvider

Attachment 367435 [details] pushed as b174a91 - directsoundsrc: Add support for a DeviceProvider
Comment 11 Sebastian Dröge (slomo) 2018-01-25 18:28:54 UTC
Attachment 367437 [details] pushed as b5364f9 - directsoundsink: Add support for a DeviceProvider
Comment 12 Nirbheek Chauhan 2018-01-26 05:23:18 UTC
(In reply to Sebastian Dröge (slomo) from comment #9)
> (In reply to Nirbheek Chauhan from comment #5)
> 
> > @@ +140,3 @@
> > +      "device-class", "Audio/Sink", "properties", props, NULL);
> > +#endif
> > +
> > 
> > If you want to be fancy, you can #ifdef only "Audio/Source" and "Audio/Sink"
> > ;)
> 
> No, MSVC is usually unhappy about such things :)

MSVC is only unhappy if you nest #ifdefs inside a macro definition (the pre-processor is not recursive). It doesn't mind #ifdef inside a function call.