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 674921 - [0.10] alsasink: use the iec958 payloader to support non-payloaded input streams
[0.10] alsasink: use the iec958 payloader to support non-payloaded input streams
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal blocker
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-27 08:25 UTC by Andoni Morales
Modified: 2013-04-20 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
alsa: support non iec958 payloaded streams (6.98 KB, patch)
2012-04-27 08:25 UTC, Andoni Morales
needs-work Details | Review
alsasink: use the iec958 payloader tu support non-payloaded input streams (6.98 KB, patch)
2012-05-02 15:48 UTC, Andoni Morales
committed Details | Review
dbg.log.xz (609.91 KB, application/x-xz)
2012-05-15 16:46 UTC, Tim-Philipp Müller
  Details
alsasink: only check for spdif support in the selected device (4.46 KB, patch)
2012-05-15 17:39 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2012-04-27 08:25:17 UTC
Created attachment 212933 [details] [review]
alsa: support non iec958 payloaded streams

Make use internally of the iec958 payloader to support non-payloaded input streams.

The patch is not tested properly as I don't have the proper hardware for it.
Comment 1 Sebastian Dröge (slomo) 2012-04-30 07:54:29 UTC
Review of attachment 212933 [details] [review]:

::: ext/alsa/gstalsasink.c
@@ +356,3 @@
+    ret = gst_caps_can_intersect (pad_caps, caps);
+    gst_caps_unref (pad_caps);
+  }

You should check if if can_intersect() returned FALSE, and if it did don't do any of the checks below.
Comment 2 Andoni Morales 2012-05-02 15:48:58 UTC
Created attachment 213305 [details] [review]
alsasink: use the iec958 payloader tu support non-payloaded input streams
Comment 3 Sebastian Dröge (slomo) 2012-05-07 11:33:35 UTC
commit c6409806c144ee5070f8d623093dcb3b894ed3d5
Author: Andoni Morales Alastruey <ylatuya@gmail.com>
Date:   Fri Apr 27 10:19:15 2012 +0200

    alsasink: use the iec958 payloader to support non-payloaded input streams
Comment 4 Tim-Philipp Müller 2012-05-14 17:32:29 UTC
This breaks playback of

  gst-launch-0.10 playbin2 uri=http://www.sofrito.co.uk/Music/Soweto_Disco_Promo/Oh_yeh_Soweto_excerpt.mp3

for me on my laptop. I just get noise.
Comment 5 Tim-Philipp Müller 2012-05-15 16:46:28 UTC
Created attachment 214134 [details]
dbg.log.xz
Comment 6 Andoni Morales 2012-05-15 17:39:19 UTC
Created attachment 214137 [details] [review]
alsasink: only check for spdif support in the selected device

The first issue is that in prepare, it was checking for "spec->format == GST_IEC958" instead of "alsa->iec958" and that's why the payloaded stream was pushed to the PCM device instead of the iec958 one.

But with this fix, if the device supports digital output the sink will always negotiate inside playbin an encoded format (ac-3, dts or mp3 instead of the raw decoded one) and therefore always using the iec958 device which I don't think that's what we want.
So I have also changed the probe function to use the device passed in the 'device' property, this way only when device=iec958 is set the pass-through caps will be added to the supported caps.

I'm not sure if explained my self correctly and even if it's the correct solution :)
Comment 7 Andoni Morales 2012-05-15 17:39:47 UTC
Oh, and like I said before I don't have the correct hardware to test it :(
Comment 8 Tim-Philipp Müller 2012-05-16 08:09:33 UTC
Thanks for the patch. It fixes the issue with the noise and PCM output, but I'm not sure if it's fully right yet. Can't test the SPDIF bits properly before the weekend though.
Comment 9 Sebastian Dröge (slomo) 2012-05-16 08:31:23 UTC
Isn't it possible to just use the "default" device if none is selected and somehow detect if that can do iec958 or not?
Comment 10 Tim-Philipp Müller 2012-05-18 09:44:06 UTC
Another thing: alsasink now doesn't handle "audio/x-iec958" any longer, which means things will break for people who were using that (e.g. with ac3iec958). Was that removed on purpose?
Comment 11 Sebastian Dröge (slomo) 2012-05-18 10:01:31 UTC
Comment on attachment 214137 [details] [review]
alsasink: only check for spdif support in the selected device

commit 2434f2932bd02b627f4498534531c218ead1d102
Author: Andoni Morales Alastruey <ylatuya@gmail.com>
Date:   Tue May 15 19:21:15 2012 +0200

    alsasink: check for spdif support only in the current device
Comment 12 Andoni Morales 2012-05-18 10:53:07 UTC
(In reply to comment #10)
> Another thing: alsasink now doesn't handle "audio/x-iec958" any longer, which
> means things will break for people who were using that (e.g. with ac3iec958).
> Was that removed on purpose?

To me that's something that should be kept for backwards compatibility but Sebastian suggested removing it here https://bugzilla.gnome.org/show_bug.cgi?id=674865
Comment 13 Tim-Philipp Müller 2012-09-23 18:36:08 UTC
> > Another thing: alsasink now doesn't handle "audio/x-iec958" any longer, which
> > means things will break for people who were using that (e.g. with ac3iec958).
> > Was that removed on purpose?
> 
> To me that's something that should be kept for backwards compatibility but
> Sebastian suggested removing it here
> https://bugzilla.gnome.org/show_bug.cgi?id=674865

Can't really do that unless the functionality was completely broken before (but I don't think that's the case here.)
Comment 14 Tim-Philipp Müller 2013-04-20 21:47:55 UTC
If I wasn't too lazy I would be reverting these in 0.10 now.

But I am, and there's not probably not going to be another 0.10 release, so let's just close this.