Playing DSD files via gst-libav from a UPnP server does not work

Robert Tiemann rtie at gmx.de
Tue Jun 8 22:23:20 UTC 2021


Hi all,

I have trouble playing DSD files (.dsf) through gst-libav from a UPnP
server (with GStreamer and plugins all built from current master
branches, but same results with GStreamer 1.18.4 on Arch Linux). In
general, decoding and playing from files works fine, but as soon as
souphttpsrc gets involved, it stops working.

This pipeline works:

$ gst-launch-1.0\
     filesrc location='/tmp/TestAudio/Gloryland_DSD64.dsf' !\
     avdemux_dsf ! avdec_dsd_lsbf_planar !\
     audioconvert ! audioresample ! pulsesink

This very similar pipeline, however, does not work:

$ gst-launch-1.0\
     souphttpsrc location='http://192.168.69.2:9021/MediaItems/32.dsd' !\
     avdemux_dsf ! avdec_dsd_lsbf_planar !\
     audioconvert ! audioresample ! pulsesink

The URL points to the exact same file referred to in the first
pipeline, only it is served by minidlna. Downloading the file works,
so it's not a networking issue. Replacing the pipeline with playbin3
doesn't work either. Playing a FLAC file from the server with
avdemux_dsf and avdec_dsd_lsbf_planar replaced by flacparse and
flacdec for comparison, however, works as expected.

Output of the failing pipeline:
     Setting pipeline to PAUSED ...
     Pipeline is PREROLLING ...
     Got context from element 'souphttpsrc0': gst.soup.session=context,
session=(SoupSession)NULL, force=(boolean)false;
     ERROR: from element
/GstPipeline:pipeline0/avdemux_dsf:avdemux_dsf0: Internal data stream error.
     Additional debug info:

../../../../../../../opt/source/GStreamer/gst-libav/ext/libav/gstavdemux.c(1636):
gst_ffmpegdemux_loop (): /GstPipeline:pipeline0/avdemux_dsf:avdemux_dsf0:
     streaming stopped, reason error (-5)
     ERROR: pipeline doesn't want to preroll.
     Setting pipeline to NULL ...
     ERROR: from element /GstPipeline:pipeline0/GstPulseSink:pulsesink0:
The stream is in the wrong format.
     Additional debug info:

../../../../../../../opt/source/GStreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiobasesink.c(1115):
gst_audio_base_sink_wait_event ():
/GstPipeline:pipeline0/GstPulseSink:pulsesink0:
     Sink not negotiated before eos event.
     ERROR: pipeline doesn't want to preroll.
     Freeing pipeline ...

I tried to find out what's going on by generating .dot files for the
pipelines (GST_DEBUG_DUMP_DOT_DIR). For the failing pipeline, I can
see that the pads from souphttpsrc down to avdec_dsd_lsbf_planar seem
to be OK, but the pads from avdec_dsd_lsbf_planar to audioconvert and
further down are left unconfigured. I guess this is what the message
"Sink not negotiated before eos event." wanted to tell me.

I have also cranked up the debug levels via GST_DEBUG to further
investigate what exactly is happening. I have compared the logs for
the two pipelines with file source vs network source, and when playing
from filesrc, the pads in the pipeline are set to pull mode; when
playing from souphttpsrc, they are set to push mode. So that's one
obvious difference which might be relevant.

Both pipelines eventually hit gst_ffmpegdemux_loop() in
gst-libav/ext/libav/gstavdemux.c. When playing from filesrc, the line

     ret = stream_last_flow = gst_pad_push (srcpad, outbuf);

succeeds and the stream starts playing, but when playing from
souphttpsrc, gst_pad_push() returns GST_FLOW_ERROR (-5). Digging a bit
deeper, this is because the first call of check_sticky() in
gst_pad_push_data() in gstreamer/gst/gstpad.c fails.

Now I am stuck and don't know how to proceed. I think there might be
some piece of code missing which should configure the pads between
avdec_dsd_lsbf_planar and audioconvert, but I have no clue where this
code should be.

Can someone please help me with this? Thank you in advance!

Best regards,
Robert


More information about the gstreamer-devel mailing list