After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141906 - hang on removing ximagesink from a pipeline
hang on removing ximagesink from a pipeline
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.2
Other Linux
: Normal normal
: 0.8.3
Assigned To: Julien MOUTTE
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-05 13:36 UTC by Zaheer Abbas Merali
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Zaheer Abbas Merali 2004-05-05 13:36:19 UTC
This function:

int stop_visualisation_substream(struct stream_details* sd)
{
	if (sd->sub_stream_status[3]) {
		
	#ifdef GST_06
	
	  	gst_pad_disconnect (gst_element_get_pad (sd->pe->color,"src"),
	#else
		gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sd->pe->vsink),0);
		gst_pad_disconnect (gst_element_get_pad (sd->pe->color,"src"),
	#endif
							gst_element_get_pad (sd->pe->vsink,"sink"));	
		gst_pad_disconnect (gst_element_get_pad (sd->pe->queue,"src"),
							gst_element_get_pad (sd->pe->color,"sink"));
		gst_pad_disconnect (gst_element_get_pad (sd->pe->vis,"src"),
							gst_element_get_pad (sd->pe->queue,"sink"));
		gst_pad_disconnect (gst_element_get_pad (sd->pe->s2m,"src"),
							gst_element_get_pad (sd->pe->vis,"sink"));
		gst_pad_disconnect(sd->pe->tee1_src3, 
							gst_element_get_pad (sd->pe->s2m, "sink"));
		gst_bin_remove (GST_BIN (sd->pe->vis_thread), sd->pe->queue);
	  	gst_bin_remove (GST_BIN (sd->pe->vis_thread), sd->pe->color);
	  	gst_bin_remove (GST_BIN (sd->pe->vis_thread), sd->pe->vsink);
	
	  	gst_bin_remove (GST_BIN (sd->pe->pipeline), sd->pe->s2m);
	  	gst_bin_remove (GST_BIN (sd->pe->pipeline), sd->pe->vis);
	
	  	gst_bin_remove (GST_BIN (sd->pe->pipeline), sd->pe->vis_thread);
	  
	  	gst_element_release_request_pad(sd->pe->tee, sd->pe->tee1_src3);
	 	sd->sub_stream_status[3]=0;
	 	return 0;
	
	}
	return -1;
}

That function hangs on gst_bin_remove (GST_BIN (sd->pe->vis_thread),
sd->pe->vsink);.  The pipeline state is PAUSED and vis_thread is a GstThread. 
Here is the last debug output:

DEBUG   GST_PARENTAGE(24432) gstbin.c(579):gst_bin_remove: [visthread]: trying
to remove child vsink
DEBUG  GST_SCHEDULING(24432) gstbin.c(360):gst_bin_unset_element_sched: removing
element "vsink" from its sched 0x81e4ac0
DEBUG       scheduler(24432)
gstoptimalscheduler.c(1761):gst_opt_scheduler_remove_element:<GstOptScheduler@0x81e4ac0>
removing element "vsink"
DEBUG   GST_PARENTAGE(24432)
gstelement.c(3210):gst_element_set_scheduler:<vsink> setting scheduler to (nil)
INFO    GST_PARENTAGE(24432) gstbin.c(544):gst_bin_remove_func:<visthread>
removed child "vsink"
DEBUG       scheduler(24432)
gstoptimalscheduler.c(1439):gst_opt_scheduler_state_transition: element
"visthread" state change 1025
INFO  GST_REFCOUNTING(24432) gstelement.c(2980):gst_element_dispose:<vsink> dispose
INFO       GST_STATES(24432) gstelement.c(2684):gst_element_set_state:<vsink>
setting state from PAUSED to NULL
DEBUG      GST_STATES(24432) gstelement.c(2703):gst_element_set_state:<vsink>
intermediate: setting state from PAUSED to READY
DEBUG        GST_CAPS(24432)
gstelement.c(2816):gst_element_clear_pad_caps:<vsink> clearing pad caps
Comment 1 Zaheer Abbas Merali 2004-05-05 14:31:36 UTC
This has the same issue in gstreamer 0.6.4 with xvideosink, it does not return
from gst_element_set_state.
Comment 2 Julien MOUTTE 2004-07-26 09:56:24 UTC
Could you please write a simple test case to demonstrate the issue ?
Comment 3 Zaheer Abbas Merali 2004-07-27 09:58:47 UTC
It seems to be fixed in CVS