Wavparse cannot play file which appends on the fly.
Submitted by EduardS
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:
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.