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 301848 - Gstreamer fails to run pipelines into alsasink
Gstreamer fails to run pipelines into alsasink
Status: RESOLVED DUPLICATE of bug 301785
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.8
Other All
: Normal major
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-24 23:49 UTC by David Lorang
Modified: 2005-06-09 16:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Level 3 debug log (7.69 KB, text/plain)
2005-05-04 03:27 UTC, David Lorang
Details

Description David Lorang 2005-04-24 23:49:35 UTC
Please describe the problem:
After installing alsa and the alsasink plug-in.  Gstreamer does not want to run
the pipeline.  The command "gst-launch-0.8 sinesrc ! alsasink" gives the message:
ERROR: pipeline doesn't want to play. 
Linux distribution is Debian, testing.  
Gstreamer-0.8 is installed from the distributinon as is alsa 1.0.8-7

Steps to reproduce:
1. Install alsa-modules and alsa-base
2. Install gstreamer0.8 including gstreamer0.8-alsa
3. type: gst-launch sinesrc ! alsasink 
4. OR: attempt to play an audio using rhythmbox

Actual results:
gstreamer0.8: (See description)
Trying to play rhythmbox gives error popup:  "Internal GStreamer error:
negotiation problem.  File a bug."

Expected results:
Should hear tone from gst-launch command.
Music should play from rhythmbox.

Does this happen every time?
Yes

Other information:
Other non-gstreamer apps seem to work OK.  For example, totem plays audios just
fine.  I suspect it has something to do with alsasink not successfully opening
the the audio or pcm device or some such.
Comment 1 Ronald Bultje 2005-04-25 08:24:20 UTC
Try "gst-launch sinesrc ! audioconvert ! audioscale ! alsasink", that's what RB
uses too. What gst-plugins version?
Comment 2 David Lorang 2005-04-26 01:35:43 UTC
Tried "gst-launch sinesrc ! audioconvert ! audioscale ! alsasink" and that did not  
help.  Got the same "ERROR: pipeline doesn't want to play" message.

All of the plugins are verson 0.8.8-2 except for gstreamer0.8-tools which is
0.8.9-2.  Also, libgstreamer0.8-0 is version 0.8.9-2.
Comment 3 Luca Ognibene 2005-04-26 09:06:57 UTC
Are you using the right device?
Try 
... ! alsasink device="hw:0" or
... ! alsasink device="hw:1" or so.. (also device="default")
Comment 4 David Lorang 2005-05-04 02:48:54 UTC
Hard to know what the right device is.  Is it /dev/audio? /dev/pcm0p? /dev/dsp 
I expect it already knows and tries to use the default device. 
I did do a gst-inspect on alsasink and it returned information like 
alsasink was there, but don't know how to identify the sound card device.

I tried entering as described: ... ! alsasink device="hw:0" also hw:1 and 
default.  None worked.

Another bit of information: The "sound card" for this machine is the intel-8x0
(AC97) codec.  (No plug-in sound card.)
Comment 5 David Lorang 2005-05-04 02:52:32 UTC
Some more info: Have installed gstreamer-oss and osssink runs OK.
Comment 6 David Lorang 2005-05-04 03:27:43 UTC
Created attachment 45999 [details]
Level 3 debug log
Comment 7 David Lorang 2005-05-04 03:30:06 UTC
Here is a debug log attachment.
This part is interesting:
WARN  (0x804ff10 - 309771:35:20.535745000)            alsa( 3570)
gstalsa.c(1701):gst_alsa_probe_hw_params:<alsasink0>
"snd_pcm_hw_params_set_period_size_near (this->handle, hw_params, &period_size, 0)":
Invalid argument
INFO  (0x804ff10 - 309771:35:20.565509000)        GST_CAPS( 3570)
gstpad.c(1350):gst_pad_link_call_link_functions:<alsasink0:sink> pad doesn't
accept caps audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1
INFO  (0x804ff10 - 309771:35:20.566008000)      GST_STATES( 3570)
gstelement.c(3015):gst_element_change_state:<sinesrc0> failed state change,
could not negotiate pads
Comment 8 buggirl2002 2005-06-02 04:52:32 UTC
I'm having a simalar problem (allthough I can play the sinewave), with the same
snd_intel8x0 card.

when trying to play an mp3 (using the directions in the documentation)

gst-launch filesrc location=/media/My.mp3 ! spider ! alsasink

RUNNING pipeline ...
ERROR: from element /pipeline0/spider0/mad0: Internal GStreamer error: pad
problem.  File a bug.
Additional debug info:
gstpad.c(2562): gst_pad_set_explicit_caps: /pipeline0/spider0/mad0:
failed to negotiate (try_set_caps with "audio/x-raw-int, endianness=(int)1234,
signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100,
channels=(int)2" returned REFUSED)
ERROR: from element /pipeline0/spider0/mad0: Internal GStreamer error:
negotiation problem.  File a bug.
Additional debug info:
gstmad.c(1199): gst_mad_check_caps_reset: /pipeline0/spider0/mad0:
Failed to negotiate 44100 Hz, 2 channels
Execution ended after 46 iterations (sum 1069233000 ns, average 23244195 ns, min
45000 ns, max 459900000 ns).

anyother valid sink works for me.

I added this to my modprobe.conf
options snd-intel8x0 ac97_clock=44100
to make sure the clock rate was supported.


Comment 9 Ronald Bultje 2005-06-09 16:11:03 UTC
For your pipeline, add audioconvert/audioscale:

gst-launch filesrc location=my.mp3 ! spider ! audioconvert ! audioscale ! alsasink

*** This bug has been marked as a duplicate of 301785 ***