read live file
Sebastian Dröge
sebastian at centricular.com
Mon May 12 00:15:02 PDT 2014
On So, 2014-05-11 at 21:09 +0200, Bernhard Graaf wrote:
> One short question:
>
>
>
> Do we have a module to work with a live file?
>
> I have to different pipelines. One pipeline to write into a file, one
> pipeline to read from the same.
>
> I have tried to use filesrc, fdsrc and playbin to read the file, but every
> module stops playing after a short time (the length of the file during
> opening).
>
> Or is there any trick in a C-Program to persuade the reading module to read
> forward (I've try to ignore EOS, but with the same result)?
filesrc is checking if the file size has changed when it reaches the
end, and will then read any newly added data. And then check again.
However this setup is never going to work reliable as there is no
synchronisation at all between the writing process and the reading
process. You'll most likely often get into the case where filesrc reads
over the end of the already written file and then goes to EOS, and only
then the writer adds some further data.
The real solution for this problem would be to either use pipe or socket
for the data transfer instead of going over the file system (and then
use fdsrc), or to properly integrate the writer into the GStreamer
pipeline with an appsrc or a custom source element instead of using a
file.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140512/d5182d23/attachment.sig>
More information about the gstreamer-devel
mailing list