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 309668 - hello gstreamer world example does not work
hello gstreamer world example does not work
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: documentation
0.8.11
Other Linux
: Normal normal
: 0.8.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-07 05:08 UTC by Patrick
Modified: 2005-10-21 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patrick 2005-07-07 05:08:51 UTC
Distribution/Version: Fedora Core 4

I copied the introductory example from the GStreamer Application Development
Manual for 0.8 series* and compiled it successfully. However, when I run it it
just runs and terminates immediately without playing anything.

I can play the ogg file in other GStreamer applications and my GStreamer setup
is setup to use an ALSA sink by default. The test button in gstreamer-properties
for this setup works fine.

I am using Fedora Core 4, with ALSA. pkg-config --modversion gstreamer-0.8 says
I am using 0.8.10.

*
http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/manual/html/chapter-helloworld.html
Comment 1 Ronald Bultje 2005-07-07 06:57:51 UTC
Do you have dmix turned on? You probably need conversion plugins
(http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/manual/html/section-checklist-conversion.html)
for it to work, some setups have those issues. They're omitted from the example
to make it look as simple as possible.

You can also test this on the commandline:
gst-launch-0.8 filesrc location=file.ogg ! oggdemux ! vorbisdec ! alsasink
vs.
gst-launch-0.8 filesrc location=file.ogg ! oggdemux ! vorbisdec ! audioconvert !
audioscale ! alsasink
Comment 2 Patrick 2005-07-08 00:09:53 UTC
gst-launch-0.8 filesrc location=test.ogg ! oggdemux ! vorbisdec ! alsasink
Fails with:
RUNNING pipeline ...
ERROR: from element /pipeline0/alsasink0: Could not get/set settings from/on
resource.
ERROR: from element /pipeline0/vorbisdec0: Internal GStreamer error: pad
problem.  File a bug.
Additional debug info:
gstpad.c(2562): gst_pad_set_explicit_caps: /pipeline0/vorbisdec0:
failed to negotiate (try_set_caps with "audio/x-raw-float, rate=(int)44100,
channels=(int)2, endianness=(int)1234, width=(int)32, buffer-frames=(int)0"
returned REFUSED)
Execution ended after 16 iterations (sum 145389000 ns, average 9086812 ns, min
16000 ns, max 144400000 ns).

gst-launch-0.8 filesrc location=test.ogg ! oggdemux ! vorbisdec ! audioconvert !
audioscale ! alsasink

Works as expected.

Am I correct in understanding that the problem here is that the audio is 44100
KHz but my ALSA setup is currently playing back at some other sampling rate? I'm
guess that the audioconvert and audioscale plugins take care of resampling the
audio appropriately.

I don't know if I have dmix on or not. I haven't tweaked the default Fedora Core
4 sound setup at all.
Comment 3 Ronald Bultje 2005-07-08 12:25:32 UTC
Yes to all, and dmix is indeed default in FC4. I'll add a note to the example.