GNOME Bugzilla – Bug 773698
Wavparse cannot play file which appends on the fly.
Last modified: 2018-11-03 15:13:33 UTC
Hi, We have have WAV file which is always appends new data. We want to read this file (which not finished when we start reading this file). The pipeline we use: gst-launch-1.0 filesrc location=./source_file.wav ! wavparse ! audioconvert ! audioresample ! lamemp3enc ! rtspclientsink tcp-timeout=3000000 location="rtsp://some_wowza_ip:1935/ClientVideo/00000000000038EA_AUDIO" latency=0 The problem is that wavparse takes the length of the source WAV file when it start reading the source WAV file. Since the length of the file when wavparse start reading is small, wavparse stops reading the file with EOS although there is still a lot of data to be read. We have tried to use the 'ignore-length=1' on wavparse but this make our pipeline stuck ( from log it stuck on rtp-bin of rtsp-client-sink). We have solved this problem using a workaround in wavparse: Setting: wav->datasize = G_MAXUINT64;// size64; on line 1336 wav->end_offset = G_MAXUINT64; on line 547 wav->datasize = G_MAXUINT64;// ((guint64) dataSizeHigh << 32) | dataSizeLow; on line 1073 This is a workaround, I guess the correct answer is to read the file size again from src pad (filesrc in our example) using function like 'gst_wavparse_stream_headers' if dataleft reaches zero just before 'goto found_eos' line 1975. Regards
Do you want to provide a patch for this? Generally yes, once we're at the end of the stream it would make sense to update the size again. If the "data" chunk had no size embedded (in which case we should only read that much at most).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/316.