Restarting splitmuxsink fails
jakehedlund
jakehedlund at gmail.com
Fri Nov 9 18:21:04 UTC 2018
jakehedlund wrote
> ...
>
> The problem comes when I replace the mp4mux and filesink with splitmuxsink
> (splitmuxsink location="C:\\gstreamer\\recording\\record_test%02d.mp4"
> max-size-time=10000000000 max-size-bytes=10000000). The first time
> starting
> the recording it works as expected, and saves multiple files as it should.
> However, if I stop recording (send EOS to mux, set splitmuxsink state to
> Null, remove from pipeline), then restart recording later, the preview
> window freezes and/or the splitmuxsink does not record files properly.
>
> ...
>
> * When I remove the recording bin, I send an EOS, then unlink, then set
> the
> record bin state to Null, then remove it from the main pipeline (is this
> correct?).
> * To start/restart the recording, I add a padprobe, then in the callback
> re-add the record bin (same object as the one removed earlier - maybe this
> is wrong and should be recreated from scratch?)
For the record, I was able to solve this issue by recreating the
splitmuxsink at the start of every recording session (inside the idle probe
callback which does the tee branch request and linking to the Recording
Bin).
I solved the other issue of corrupted/incomplete/unplayable recordings by
waiting for the EOS signal to be emitted from my Recording Bin. This was
tricky to figure out due to lack of documentation regarding listening to Bin
and sink EOS messages in C#. For anyone interested, it requires acting on
Element messages sent in the pipeline (MessageType.Element enum).
(Inside HandleMessage(object o, MessageArgs args) event handler)
Thanks for reading,
Jake
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list