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 575568 - [resindvd] no sound when playing a DVD with LPCM audio track
[resindvd] no sound when playing a DVD with LPCM audio track
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.x
Other Linux
: Normal normal
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 592176 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-16 15:23 UTC by Sebastien Bacher
Modified: 2009-10-25 17:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
debug log for some seconds and ctrl-C (591.31 KB, application/x-gzip)
2009-03-16 16:47 UTC, Sebastien Bacher
  Details
non-ac3-audio-codecs.diff (28.48 KB, patch)
2009-09-29 14:55 UTC, Sebastian Dröge (slomo)
committed Details | Review
new debug log (351.51 KB, application/x-gzip)
2009-10-13 18:23 UTC, Sebastien Bacher
  Details
resindvd: Fix decoder pad template to allow LPCM (1.90 KB, patch)
2009-10-14 10:08 UTC, Jan Schmidt
committed Details | Review
resindvd: Re-send audio stream select on re-configuration (1.66 KB, patch)
2009-10-16 00:15 UTC, Jan Schmidt
committed Details | Review
autoconvert: Use gst_pad_peer_accept_caps instead of gst_pad_set_caps. (1.68 KB, patch)
2009-10-16 00:29 UTC, Jan Schmidt
committed Details | Review
autoconvert: Cache incoming new segment events and push to children. (3.78 KB, patch)
2009-10-25 17:33 UTC, Jan Schmidt
rejected Details | Review

Description Sebastien Bacher 2009-03-16 15:23:03 UTC
Using the current tarballs on jaunty I've a DVD where the video is played correctly but which has no sound in totem-gstreamer; totem-xine plays the video and the sound correctly
Comment 1 Jan Schmidt 2009-03-16 15:32:36 UTC
Which DVD?

Can you get me a log from GST_DEBUG=resin*:5,rsn*:5 ?

I assume you do have a52dec installed....
Comment 2 Sebastien Bacher 2009-03-16 16:36:22 UTC
the disc is "la caravane des enfoirées saison 2007 disc 2", I've a52dec installed and sound works fine on other discs
Comment 3 Sebastien Bacher 2009-03-16 16:47:14 UTC
Created attachment 130761 [details]
debug log for some seconds and ctrl-C
Comment 4 Sebastien Bacher 2009-03-16 16:49:14 UTC
I've to add a short log since bugzilla will not accept files over 1megabyte
Comment 5 Jan Schmidt 2009-03-17 21:52:09 UTC
It looks like this is because the DVD is a music concert, with an LPCM (uncompressed audio) track. ResinDVD currently only supports AC3 audio tracks, but doesn't completely manage to ignore the unsupported track.
Comment 6 Sebastian Dröge (slomo) 2009-05-26 13:28:38 UTC
Sebastien, could you try the patch from bug #582779 ? It's not perfect yet (you will need to do some seeking before anything is played) but if it works with that patch the problem is found ;)
Comment 7 Sebastien Bacher 2009-05-26 15:31:35 UTC
I'm at UDS right now but will do that next week when I've access to the dvd
Comment 8 Philip Withnall 2009-08-18 14:33:03 UTC
*** Bug 592176 has been marked as a duplicate of this bug. ***
Comment 9 Sebastian Dröge (slomo) 2009-09-29 14:55:33 UTC
Created attachment 144271 [details] [review]
non-ac3-audio-codecs.diff

Combined patch from GIT HEAD. With these changes everything should work in theory (if the required decoders are installed)
Comment 10 Sebastian Dröge (slomo) 2009-10-10 10:45:40 UTC
Sebastien, could you test the patch? :)
Comment 11 Sebastien Bacher 2009-10-13 15:26:52 UTC
the change don't seem to make a difference
Comment 12 Sebastian Dröge (slomo) 2009-10-13 17:39:20 UTC
(In reply to comment #11)
> the change don't seem to make a difference

Thanks for testing, could you provide a debug log with GST_DEBUG=rsn*:5,resin*:5 ?
Comment 13 Sebastien Bacher 2009-10-13 18:23:20 UTC
Created attachment 145370 [details]
new debug log
Comment 14 Sebastian Dröge (slomo) 2009-10-14 04:43:09 UTC
From the debug log it looks like it's handling the audio correctly. Are you sure this is not the pulseaudio-lowers-volume-after-every-track bug?
Comment 15 Jan Schmidt 2009-10-14 09:25:27 UTC
(In reply to comment #14)
> From the debug log it looks like it's handling the audio correctly. Are you
> sure this is not the pulseaudio-lowers-volume-after-every-track bug?

No it doesn't:

resindvdbin.c:727:demux_pad_added:<source> New pad: <dvddemux:audio_a0>
0:00:05.387766818  6035 0xb510e068 DEBUG      resindvd elements resindvdbin.c:742:demux_pad_added:<source> Pad <dvddemux:audio_a0> has caps: audio/x-private1-lpcm
0:00:05.392389263  6035 0xb510e068 DEBUG      resindvd elements resindvdbin.c:763:demux_pad_added:<source> Ignoring unusable pad w/ caps audio/x-private1-lpcm
0:00:05.392440387  6035 0xb510e068 DEBUG      resindvd elements resindvdbin.c:769:demux_pad_added:<source> Don't know how to handle pad. Ignoring

From earlier in the log, it looks like the auddec component does correctly find the LPCM decoder, and exports those caps, but that can_sink_caps() for some reason returns FALSE, causing resindvdbin to ignore the pad.
Comment 16 Jan Schmidt 2009-10-14 09:57:47 UTC
and can_sink_caps() doesn't think autoconvert can accept LPCM, because autoconvert decides that it can't, because of the downstream source caps:

0:00:12.360537159 25827 0xb5b58570 LOG              autoconvert gstautoconvert.c:1125:gst_auto_convert_sink_getcaps:<autoconvert0> Factory dvdlpcmdec does not accept src caps audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ], endianness=(int)1234, width=(int)64; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ], endianness=(int)1234, width=(int)32; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ], endianness=(int)1234, width=(int)32, depth=(int)32, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 11 ], endianness=(int)1234, width=(int)32, depth=(int)32, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ], endianness=(int)1234, width=(int)32, depth=(int)32, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 11 ], endianness=(int)1234, width=(int)24, depth=(int)24, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 11 ], endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 11 ], endianness=(int)1234, width=(int)8, depth=(int)8, signed=(boolean)true; audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ], endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true

dvdlpcmdec wants to be able to generate some strange depths, like 20 bit depth in a 24-bit width, and the audio_src_template pad template on the rsndec doesn't allow them.
Comment 17 Jan Schmidt 2009-10-14 10:08:11 UTC
Created attachment 145406 [details] [review]
resindvd: Fix decoder pad template to allow LPCM

The pad template in the new switching decoder is too restrictive,
preventing the LPCM decoder from being selected.
Comment 18 Jan Schmidt 2009-10-14 10:09:33 UTC
This patch makes the LPCM decoder be selected. I still get no audio on the disc I am testing on though - something in the stream selection and mapping I suspect. Needs more investigating.
Comment 19 Sebastian Dröge (slomo) 2009-10-14 10:33:05 UTC
Oops... that patch is definitely correct, yes. If it doesn't fix this particular case it would still be nice if we could get it into the next pre-release :)
Comment 20 Jan Schmidt 2009-10-15 21:56:34 UTC
Pushed:

commit cb2d8b984dc18f1a9c2876d54a057f3590e1f292
Author: Jan Schmidt <thaytan@noraisin.net>
Date:   Wed Oct 14 11:06:46 2009 +0100

    resindvd: Fix decoder pad template to allow LPCM
    
    The pad template in the new switching decoder is too restrictive,
    preventing the LPCM decoder from being selected.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=575568
Comment 21 Jan Schmidt 2009-10-16 00:15:20 UTC
Created attachment 145563 [details] [review]
resindvd: Re-send audio stream select on re-configuration

it makes playback stop with a not-negotiated error, because autoconvert
doesn't seem to reconfigure on the fly as I think it's supposed to.

resindvd: Re-send audio stream select on re-configuration

When the layout of the audio streams changes, re-send the current
audio stream selection event, in order to trigger switching to the
new stream properly.
Comment 22 Jan Schmidt 2009-10-16 00:29:10 UTC
Created attachment 145565 [details] [review]
autoconvert: Use gst_pad_peer_accept_caps instead of gst_pad_set_caps.

it is supposed to:

autoconvert: Use gst_pad_peer_accept_caps instead of gst_pad_set_caps.

gst_pad_set_caps on the internal source pad always succeeds, because
caps propagate to the peer with buffers, not immediately. Using
gst_pad_peer_accept_caps properly checks whether the actual
sub-element can accept caps when they change.
Comment 23 Sebastian Dröge (slomo) 2009-10-16 05:16:39 UTC
Review of attachment 145565 [details] [review]:

This patch is correct of course (and what Olivier intented), is the other one still necessary?
Comment 24 Jan Schmidt 2009-10-16 07:38:37 UTC
both patches are needed. Also, git-bz seems to have screwed up the descriptions for the patches, but never mind.
Comment 25 Jan Schmidt 2009-10-16 11:22:44 UTC
Both patches will be in the 0.10.14.4 pre-release shortly. With those in place, I can switch to non-AC3 tracks, although it sometimes requires triggering a small seek afterward because segments are not processed correctly when replugging the audio decoder.
Comment 26 Jan Schmidt 2009-10-25 17:33:53 UTC
Created attachment 146217 [details] [review]
autoconvert: Cache incoming new segment events and push to children.

Cache incoming new-segment info.

When installing a child element, inform it of the current segment info.
Comment 27 Jan Schmidt 2009-10-25 17:35:10 UTC
oops, wrong bug.
Comment 28 Jan Schmidt 2009-10-25 17:39:34 UTC
This should be basically working with Friday's 0.10.16 release of gst-plugins-bad.