How to save file from filesink in dynamic pipeline
Dimitrios Katsaros
patcherwork at gmail.com
Mon Apr 10 07:37:02 UTC 2017
What you can do is add a buffer probe to the sink pad of the queue hen you
intend to disconnect once you signal stopping a file. On the next buffer
recieved you trigger the eos event and then do the pipeline cleanup. If you
need to reset the elements for a new recording you can put them to NULL
state and then back to ready/paused/playing. NULL state will ensure that
the EOS flag gets reset and any resources connected with the pipeline (like
the recorded file) are released. Remeber to change the location parameter
on the filesink before setting the pipeline to a higher state than NULL!
Dimitrios
On Mon, Apr 10, 2017 at 6:05 AM, Edgar Thier <
edgar.thier at theimagingsource.com> wrote:
> Hi,
> I am trying to save a videofile while also displaying a livestream.
> To do this I attach the filesink part of my pipeline, once I get the
> signal to start recording.
>
> The complete pipeline looks like this:
>
> srcbin -> capsfilter -> tee -> videoconvert -> queue -> appsink
> \
> -> queue -> videoconvert ->
> mpeg2enc -> filesink
>
> The problem I now have is that the filesink seems to require an EOS event
> in order to
> correctly store the file. My attempts at disconnecting and stopping the
> filesink branch
> have only resulted in files with the size 0.
>
> What is the correct way to disconnect the branch and correctly save the
> file?
>
> Regards,
>
> Edgar
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170410/d41a3957/attachment.html>
More information about the gstreamer-devel
mailing list