Closing a file with filesink

Lee Matthews lma at
Thu Jun 19 09:31:09 PDT 2014

I've got it working. I'd love to explain how, but I'm not entirely sure why it is now working now.  

----- Original Message -----
From: "Lee Matthews" <lma at>
To: "Discussion of the development of and with GStreamer" <gstreamer-devel at>
Sent: Thursday, 19 June, 2014 4:05:04 PM
Subject: Closing a file with filesink


I'm trying to close a file by sending an EOS to the pipeline and then setting the pipeline to a READY state. I send the eos, but I never receive on EOS event on the pipeline's bus, meaning that gst_bus_timed_pop_filtered blocks indefinitely.

My pipeline : souphttpsrc location=http://localhost:7921 ! matroskademux ! vp8dec ! videoconvert ! pngenc ! identity ! filesink location=


gst_element_send_event (pipeline_image, gst_event_new_eos ());
g_print("!!!!!Start EOS wait\n");
gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline_image), GST_CLOCK_TIME_NONE, GST_MESSAGE_EOS | GST_MESSAGE_ERROR);
g_print("!!!!!Stop EOS wait\n");
g_print("Setting state to ready\n");
if (gst_element_set_state (pipeline_image,  GST_STATE_READY) == GST_STATE_CHANGE_FAILURE) 
	g_print("Failed to set pipeline to READY\n");
	g_main_loop_quit (loop);


Can anyone please tell me what I'm doing wrong ?

gstreamer-devel mailing list
gstreamer-devel at

More information about the gstreamer-devel mailing list