AW: Re: read live file
bernhard.graaf
bernhard.graaf at gmx.de
Mon May 12 13:13:07 PDT 2014
Thanks for your answer.
What I want to do is:
One pipeline is capturing a live source (e.g. Camera or dvb) and save the data into a file.
The second pipeline is reading this file. So it is not possible to use sockets, because I need to see the data from beginning of capturing, not from the moment of conecting.
Now I have tryed to use filesrc, but with no luck.
The pipeline is stop after a while. If I use vlc for playing, it works perfectly.
Then I try to capture a longer time to be shure that there are not some buffering issues, but with the same result. Filesrc stops the pipeline at the end of the lenght of the file filesrc open this. I have no more ideas for a solution.
Regards
Bernhard
<div>-------- Ursprüngliche Nachricht --------</div><div>Von: Tiago Katcipis <katcipis at inf.ufsc.br> </div><div>Datum:12.05.2014 14:26 (GMT+01:00) </div><div>An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org> </div><div>Betreff: Re: read live file </div><div>
</div>I don't know exactly what you mean with "live files", just as Sebastian pointed out, the first thing that came to my head was unix sockets.
I imagine that you are trying to do this because each pipeline is running on a different process, if this is the case maybe the shared memory plugins will do the trick to you:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-shmsrc.html
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-shmsink.html
On Mon, May 12, 2014 at 4:15 AM, Sebastian Dröge <sebastian at centricular.com> wrote:
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
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140512/cc007b33/attachment.html>
More information about the gstreamer-devel
mailing list