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 130682 - [alsasink] fails to negotiate with audio decoders
[alsasink] fails to negotiate with audio decoders
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.7.5
Other Linux
: High major
: 0.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-06 12:19 UTC by James "Doc" Livingston
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output log from gst-launch with alsa debug info (33.91 KB, text/plain)
2004-03-12 00:43 UTC, James "Doc" Livingston
Details
Log from gst-lauch with alsa debug info (21.06 KB, application/octet-stream)
2004-05-17 05:36 UTC, James "Doc" Livingston
Details

Description James "Doc" Livingston 2004-01-06 12:19:25 UTC
I recently upgraded to GStreamer 0.7.3, and at the same time finally got
around to switching my default audio sink from osssink (using ALSA's
emulation os OSS) to alsasink, but it didn't work. When trying to use
alsasink for audio output it cannot negotaite with whichever audio decoder
is used.

As an  example, if I run "filesrc location=/path/to/music.ogg ! vorbisfile
! alsasink" it fails, reporting "ERROR: /pipeline0/vorbisfile0: negotiation
failed on pad vorbisfile0:src". The same error occurs if I try to play a
mp3  with mad as the decoder. However some other audio sources seem to
work, such as "sinesrc ! alsasink".

I haven't had a chance to do anything much with GStreamer yet, but from
what I know of the basics it is probably a problem with the sink
negotiating the data stream it wants. If anyone wants I can attach the
output of gst-inspect for alsasink and osssink, or run more test with
various pipelines to try to find what exactly is causing this.
Comment 1 Benjamin Otte (Company) 2004-01-08 00:27:20 UTC
What you describe is the correct behaviour if the soundcard in use
doesn't do stereo. So this leads to the question:
What's your soundcard?

And could you try using alsasink device=plughw:0 and see if that works?
Or if that doesn't work audioconvert ! alsasink ?
Comment 2 James "Doc" Livingston 2004-01-08 08:04:13 UTC
I've got a Vibra 128 (which uses the ensoniq 1371 drivers), so it does
stereo. I just noticed that when retypeing the bug report (the power
failed the first time) I forgot one paragraph. The alsa sink works
under 0.6.3 and using osssink still works (using ALSAs emulation).

Using "alsasink device=plughw:0" gives the same error as before and
using  "gst-launch-0.7 filesrc location="/path/to/music.mp3" ! mad !
audioconvert ! alsasink" reports "ERROR: /pipeline0/audioconvert0:
AudioConvert: could not set caps on pad src".
Comment 3 Luis Villa 2004-02-26 20:20:09 UTC
Urk. Marking high because of the regression.
Comment 4 James "Doc" Livingston 2004-02-27 06:42:16 UTC
Updated to 0.7.4 a while back, but this still doesn't work.

Going straight to alsasink, with device=plughw:0 and using
audioconvert report the following (depending on the codec used) :-


ERROR: from element /pipeline0/vorbisfile0: Internal GStreamer error:
pad problem.  File a bug.
Additional debug info:
gstpad.c(2260): gst_pad_set_explicit_caps: /pipeline0/vorbisfile0:
failed to negotiate (try_set_caps returned REFUSED)

or

ERROR: from element /pipeline0/mad0: Internal GStreamer error: pad
problem.  File a bug.
Additional debug info:
gstpad.c(2260): gst_pad_set_explicit_caps: /pipeline0/mad0:
failed to negotiate (try_set_caps returned REFUSED)
 
(process:18284): GStreamer-WARNING **: push on peer of pad
filesrc0:src but peer is not active


If will probably update to 0.7.5 soon, and will check again then, but
if there are any more tests that would help, just let me know.
Comment 5 Benjamin Otte (Company) 2004-03-04 13:58:42 UTC
Hm, someone get me such a soundcard so I can test that :/

Could you run a test again with --gst-debug=alsa*:5 and attach the 
log it does here?
Comment 6 James "Doc" Livingston 2004-03-12 00:43:10 UTC
Created attachment 25551 [details]
Output log from gst-launch with alsa debug info
Comment 7 James "Doc" Livingston 2004-03-12 00:44:14 UTC
Updated to 0.7.5 and ran 'gst-launch-0.7 filesrc
location="/path/to/music.ogg" ! vorbisfile ! audioconvert ! alsasink
device=plughw:0 --gst-debug=alsa*:5'

Resulting log atatched
Comment 8 Ronald Bultje 2004-04-29 01:20:01 UTC
Your log crashes galeon, interesting. Can you try with audioscale between
alsasink and audioconvert?
Comment 9 Ronald Bultje 2004-05-16 20:57:11 UTC
Re-ping. I've tested on any crappy soundcard (even those USB ones) that I can
think of, and *any* pipeline works as long as audioscale and audioconvert are in
between the decoder (or spider) and alsasink. Please update/confirm.
Comment 10 James "Doc" Livingston 2004-05-17 05:36:29 UTC
Created attachment 27769 [details]
Log from gst-lauch with alsa debug info

Upgraded to gstreamer 0.8.1 and this still has issues.	Also I upgraded my
motherboard recently and the same problem occurs with the onboard Via VT82xx
chipset.

Log atatched from run of 'gst-launch filesrc location=/path/to/file.ogg !
spider ! audioconvert ! audioscale ! alsasink device=plughw:0
--gst-debug=alsa*:5 &> ~/gst-alsa-log'
Comment 11 Ronald Bultje 2004-10-01 10:58:04 UTC
WARN  ^[[00m           alsa^[[00m(^[[333m 4904^[[00m)
^[[00mgstalsa.c(1202):gst_alsa_probe_hw_params:<alsasink0>^[[00m
"snd_pcm_hw_params_set_period_size_near (this->handle, hw_params, &period_size,
0)": Invalid argument
ERROR: pipeline doesn't want to play.

In other words, format detection is doing something wrong. Can you try a few of
the following for me?

gst-launch filesrc location=$file ! spider ! audioconvert ! audioscale ! $X !
alsasink

For $X, fill in a few of the following:

audio/x-raw-int,width=16,depth=16
audio/x-raw-int,rate=48000
audio/x-raw-itn,width=16,depth=16,rate=48000

Thanks.
Comment 12 James "Doc" Livingston 2004-10-01 12:23:55 UTC
I've gone up to 0.8.5 (plugins 0.8.4) now, and it now works. The original source
! spider ! alsasink plays fine. As I haven't upgraded alsa or anything else
related in the mean time, I guess it probably got fixed by someone along the way.

Thanks.