On 09/09/2015 07:23 AM, [email protected] wrote:
Hi all,
     I use tee element for dual video output and my pipeline like this :

/ [ queue1 | v4l2sink1] branch 1

tee

\ [ queue2 | v4l2sink2] branch 2

Now I want to remove v4l2sink1 and add it to pipeline again. First,
//
....
blockpad = gst_element_get_static_pad(queue1,NULL);
gst_pad_add_probe (blockpad , 
(GstPadProbeType)GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM , pad_probe_cb, user_data, 
NULL);
gst_pad_remove_probe (blockpad , GST_PAD_PROBE_INFO_ID (info));
Is this last line in the source as well? Or was it pasted here by mistake?
Also, I'm assuming you want to get a pad with a name from queue1, like "sink"?

And then, in the callback pad_probe_cb() ,

sinkpad = gst_element_get_static_pad (v4l2sink1, "sink");
gst_pad_send_event (sinkpad, gst_event_new_eos ());
gst_pad_remove_probe (sinkpad, GST_PAD_PROBE_INFO_ID (info));
gst_element_set_state (v4l2sink1, GST_STATE_NULL);
gst_bin_remove (GST_BIN (pipeline),v4l2sink1);
So you leave the queue linked to the tee anyway? Any reason for that? Did you check with GST_DEBUG=2 to see if any warnings are shown?

Problems has occured that neither branch1 nor branch2 has no videos on screen with the pipeline is playing and the audio output is ok.

Is the video showing before the pad probes are added and the sinks removed or does it fail even without trying to remove the video sink?

It seems that the videostreams was block by adding a probe . At the same time , the branch2 seems receive block message too.
Pls tell me how to fix this problem .Any reply is appreciated .
It could happen that tee's pushing thread is blocking on a full queue on the side that you removed the sink. I'd recommend removing the whole branch altogether, and also releasing the tee's source pad for a cleaner pipeline. You can chose to keep the tee's source pad if you are going to link it again soon but removing it doesn't hurt anyway.


This is an interesting article on dynamic pipelines, reading it could help: https://coaxion.net/blog/2014/01/gstreamer-dynamic-pipelines/

Also, did you try looking at GST_DEBUG logs? It should help pinpointing the problem.

Regards,



_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev


--
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to