After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773698 - Wavparse cannot play file which appends on the fly.
Wavparse cannot play file which appends on the fly.
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.8.3
Other Linux
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-30 14:32 UTC by EduardS
Modified: 2018-11-03 15:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description EduardS 2016-10-30 14:32:08 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
Comment 1 Sebastian Dröge (slomo) 2016-10-31 12:16:13 UTC
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).
Comment 2 GStreamer system administrator 2018-11-03 15:13:33 UTC
-- 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.