filesink - reset file size to 0 on active stream

classic Classic list List threaded Threaded
3 messages Options
arc
Reply | Threaded
Open this post in threaded view
|

filesink - reset file size to 0 on active stream

arc
I have a pipeline that implements an output selector to switch between a
filesink and a fakesink. When switching to back to the filesink I'd like to
start from a file size of zero instead of appending to the file. Is there
any way to do this? Currently I'm using the brute force method of file i/o
to open the file with the "wb" flag and then closing before switching back
to the filesink.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: filesink - reset file size to 0 on active stream

Nicolas Dufresne-5


Le jeu. 20 juin 2019 04 h 55, arc <[hidden email]> a écrit :
I have a pipeline that implements an output selector to switch between a
filesink and a fakesink. When switching to back to the filesink I'd like to
start from a file size of zero instead of appending to the file. Is there
any way to do this? Currently I'm using the brute force method of file i/o
to open the file with the "wb" flag and then closing before switching back
to the filesink.

Did you try to cycle the sink element through null state while switching ?




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
arc
Reply | Threaded
Open this post in threaded view
|

Re: filesink - reset file size to 0 on active stream

arc
Thanks for the reply.
Not sure if I implemented your suggestion correctly, but I tried setting the
filesink to the null state when the fakesink is selected, then setting the
filesink to the play state before the filesink is re-selected. I'm not
observing the file size being reset to 0 though.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel