linking alsa to jack, from gst 0.10 to gst 1.0 : "Could not get/set settings from/on resource"

Thomas DEBESSE thomas.debesse at rcf.fr
Sat Dec 1 01:27:29 PST 2012


HI, with Gstreamer 0.10 I can add an alsa soundcard to a jack patchbay
with this pipeline :

gst-launch-0.10 alsasrc device=hw:0 ! audioconvert ! audioresample !
'audio/x-raw-float, rate=48000, channels=2' ! jackaudiosink connect=0

But when I port this pipeline to Gstreamer 1.0 it does'nt work, I
write the pipeline like this :

gst-launch-1.0 alsasrc device=hw:0 ! audioconvert ! audioresample !
'audio/x-raw, format=F32LE, rate=48000, channels=2' ! jackaudiosink
connect=0

I got this :

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
ERROR: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Could
not get/set settings from/on resource.
Additional debug info:
gstalsasrc.c(399): set_hwparams (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Sample format not available for recording: Invalid argument
Execution ended after 836442 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

The caps seem good, since gst-inspect said that :

gst-inspect-1.0 jackaudiosink | grep Capabilities -A 2
    Capabilities:
      audio/x-raw
                 format: F32LE
                 layout: interleaved
                   rate: [ 1, 2147483647 ]
               channels: [ 1, 2147483647 ]

I think it's because Gstreamer 0.10 "alsasrc" module only handles
x-raw-int format since Gstreamer 1.0 "alsasrc" module handles both
x-raw-int and x-raw-float, then Gstreamer 0.10 "alsasrc" module
attempts to record sound in x-raw-int format then convert it to
x-raw-float with "audioconvert", but Gstreamer 1.0 "alsasrc" module
attempts to record sound in x-raw-float (a format not supported by my
soundcard but supported by "alsasrc" module), and bypass
"audioconvert" because both "alsasrc" and "jackaudiosink" handle
x-raw-float. How can I force "alsasrc" to record in "x-raw-int" format
?

Is it a good idea or the problem is elsewhere ?

Thanks in advance

-- 
Thomas DEBESSE
RCF Méditerrannée


More information about the gstreamer-devel mailing list