Hello,
I know how to unplug part of pipeline using: gst_pad_set_blocked_async thanks to this post:
http://lists.freedesktop.org/archives/gstreamer-devel/2010-November/029283.htmlSo I created two Bins: one fake [queue->fakesink] one recording [queue->h264parse->mp4mux->filesink].
Now I can easly unplug fake one and replace with recording. Video file increase size in bytes so i assume its recording.
Unfortunately I don't know, how to post EOS message when I unplug recording_bin
Part of code:
https://dl.dropbox.com/u/46679399/problem.cpp or
problem.cppI tryed:
1. block pad -> unlink recording_bin -> send EOS to recording_bin -> set recording_bin to STATE_NULL ->remove recording bin from pipeline -> unblock pad
RESULT unplayable stream
2. block pad -> unlink recording_bin -> send EOS to recording_bin -> remove recording bin from pipeline -> unblock pad
RESULT unplayable stream, no cleaning from recording bin elements
3. block pad -> unlink recording_bin -> send EOS to recording_bin -> set recording_bin to STATE_NULL -> -> unblock pad
RESULT unplayable stream
4. create recording_bin as GstPipeline -> attach bus_call to recording_bin pipeline
RESULT no EOS message found
5. attach bus_call to GstBin->child_bud
RESULT silent
I think, that when I disconnect bin from pipeline it is not clocked any more, so no messages are going threw bin. I have continous playback in background so I cant stop whole pipeline and initialize it from begining.
gstreamer version: 0.10 [as new as possible] compiled from sources on ubuntu 10.4 lucid for arm (freescale iMX53)
I need it really bad...
Thanks for help in advance.
Regards
Maciej Łaski