<div dir="ltr"><div>I have the following pipeline:<br><br><span style class="">giosrc</span> location=my_remote_location ! <span style class="">wavparse</span> ! <span style class="">adpcmdec</span> ! <span style class="">audioconvert</span> ! <span style class="">audioresample</span> ! audio/x-raw,rate=8000,channels=1,format=S16LE ! <span style class="">wavenc</span> ! <span style class="">fdsink</span><br>
<br></div>I use the <span style class="">stdout</span> of the process that runs this pipeline to stream the <span style class="">PCM</span> audio to the client. But on the end of the streaming i always get the error:<br><div>
<div><br>ERROR: element fdsink0: detail: Could not perform seek on resource.<br>Debugging info: <span style class="">gstfdsink</span>.c(602): <span style class="">gst</span>_<span style class="">fd</span>_sink_event (): /<span style class="">GstPipeline</span>:pipeline0/<span style class="">GstFdSink</span>:fdsink0:<br>
Error while seeking on file descriptor 1: Illegal seek<br><br></div><div>Taking a look at debug info:<br><br>0:00:18.295838530  2112  0x9ee1fb0 DEBUG                 <span style class="">wavenc</span> <span style class="">gstwavenc</span>.c:230:<span style class="">gst</span>_<span style class="">wavenc</span>_push_header:<wavenc0> writing header with <span style class="">datasize</span>=2017980<br>
0:00:18.295857946  2112  0x9ee1fb0 DEBUG                 <span style class="">fdsink</span> <span style class="">gstfdsink</span>.c:552:<span style class="">gst</span>_<span style class="">fd</span>_sink_do_seek:<fdsink0> File descriptor 1 failed to seek to position 0<br>
0:00:18.295883299  2112  0x9ee1fb0 WARN                  <span style class="">fdsink</span> <span style class="">gstfdsink</span>.c:602:<span style class="">gst</span>_<span style class="">fd</span>_sink_event:<fdsink0> error: Error while seeking on file descriptor 1: Illegal seek<br>
ERROR: element fdsink0: detail: Could not perform seek on resource.<br>0:00:18.295918848  2112  0x9ee1fb0 WARN                  <span style class="">wavenc</span> <span style class="">gstwavenc</span>.c:239:<span style class="">gst</span>_<span style class="">wavenc</span>_push_header:<wavenc0> push header failed: flow <br>
</div><div><br></div><div>It seems to me that <span style class="">wavenc</span> is trying to seek to the beginning of the file to write the <span style class="">wav</span> header, but the <span style class="">stdout</span> file descriptor is not <span style class="">seekable</span>, the data has already been sent (and the wrong header is not a problem to me on this case).<br>
<br></div><div>Shouldn't <span style class="">fdsink</span> handle non <span style class="">seekable</span> file descriptors gracefully ? Something like refusing to handle the seek event if it is not <span style class="">seekable</span> ? It seems quite drastic to give an error on the pipeline.<br>
<br></div><div>Best regards,<br></div><div>Tiago Katcipis<br></div></div></div>