remove element dynamic pipelines

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

remove element dynamic pipelines

ソリューションへジャンプ
1,851件の閲覧回数
neohong
Contributor I

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));

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);

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

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 .

ラベル(4)
0 件の賞賛
返信
1 解決策
1,583件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

maybe your pipeline go to PAUSE state, I send the document for dynamic pipelines, hope helpful for you

Dynamically changing the pipeline


元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,584件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

maybe your pipeline go to PAUSE state, I send the document for dynamic pipelines, hope helpful for you

Dynamically changing the pipeline


0 件の賞賛
返信
1,583件の閲覧回数
neohong
Contributor I

Thanks for your reply .I have removed/added elements frome a pipeline successfully.

0 件の賞賛
返信