Hi,
I’m struggling to understand why the negotiation fails on the following pipeline, which simply tries to get SBC audio from Bluetooth (avdtpsrc) and depayload and decode it. I’ve shortened it to the minimum exhibiting the issue, hence the fakesink:
gst-launch-1.0 -v avdtpsrc transport=/org/bluez/hci0/dev_38_78_62_D0_81_8A/fd2 ! rtpsbcdepay ! typefind ! sbcdec ! fakesink
The main outcome is a failure to negotiate, when the first buffer of sound tries to get through:
ERROR: from element /GstPipeline:pipeline0/GstAvdtpSrc:avdtpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3187): gst_base_src_loop (): /GstPipeline:pipeline0/GstAvdtpSrc:avdtpsrc0:
streaming stopped, reason not-negotiated (-4)
Note the output from -v
gives the following “converged” caps:
/GstPipeline:pipeline0/GstAvdtpSrc:avdtpsrc0.GstPad:src: caps = application/x-rtp, media=(string)audio, payload=(int)96, encoding-name=(string)SBC, clock-rate=(int)44100
/GstPipeline:pipeline0/GstRtpSbcDepay:rtpsbcdepay0: extensions = < >
/GstPipeline:pipeline0/GstRtpSbcDepay:rtpsbcdepay0.GstPad:src: caps = audio/x-sbc, rate=(int)44100
/GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/x-sbc, rate=(int)44100
/GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:sink: caps = audio/x-sbc, rate=(int)44100
/GstPipeline:pipeline0/GstRtpSbcDepay:rtpsbcdepay0.GstPad:sink: caps = application/x-rtp, media=(string)audio, payload=(int)96, encoding-name=(string)SBC, clock-rate=(int)44100
The typefind
shows an audio/x-sbc,rate=44100
which is expected.
The inspection of sbcdec
seems to indicate it should be happy with that, but it is not:
Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
audio/x-sbc
channels: [ 1, 2 ]
rate: { (int)16000, (int)32000, (int)44100, (int)48000 }
parsed: true
I noticed the extra channels
and parsed
properties, so I tried inserting a constraint:
... ! audio/x-sbc,rate=44100,channels=1,parsed=true ! ...
… to no avail
In terms of debugging techniques, I know of -v
to get (only) the successful negotiations. To see the more detailed process I also know of GST_CAPS
in GST_DEBUG
, but it seems to WARN
only on empty intersections, not on underspecified caps. Indeed I displayed the *.dot
and noticed that sbcdec
still had underspecified rate
and channels
, ignoring the constraint:
I would really appreciate if a kind soul could explain what the problem is, or suggest a better technique to analyze the failing negotiation
Thanks a lot in advance,
-Alex