Segmentation fault when removing src or sink from the pipeline using "gst_bin_remove()"

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

Segmentation fault when removing src or sink from the pipeline using "gst_bin_remove()"

333件の閲覧回数
dilna
Contributor II

Hi

we are trying to make a gstreamer application to switch between a compositor and single camera view. By switching between the pipelines in the program.

Each pipeline are prepared by factory making the gstreamer plugins like src(v4l2src), filter, sink(waylandsink) and linking them using gst_element_link_many function.

At the time of switching we are facing increase in file pointers(fd) corresponding to the gstreamer objects. We tried to handle it by removing the src and sink elements using the function shown below.
gst_bin_remove(GST_BIN (Compositor->pipeline), Compositor->src);
gst_bin_remove(GST_BIN (Compositor->pipeline), Compositor->sink);

And after removing these we will close the window and re open another for each view(that is new window for every switching closing the previous window)

But at that time we are facing random segmentation fault. When we tried to debug the same we found that the segmentation fault is caused by the gst_bus_set_sync_handler.

 

But if we are not trying to remove the src and sink the application will crash by hitting the fd limit. Can you suggest us a proper way to remove the src and sink from the pipeline.

 

Or can you suggest us the points to be noticed to properly handle the fd issue we are facing.

タグ(3)
0 件の賞賛
1 返信

328件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @dilna 

I hope you are doing well.

One can try the concept of Dynamically changing the pipeline.

Please refer the Link.

Thanks & Regards

Sanket Parekh

0 件の賞賛