static gboolean cb_have_data (GstPad *pad, GstBuffer *buffer, gpointer u_data) { GstBuffer *buf; g_print("Have data\n"); buf = gst_buffer_copy (buffer); GstPadBufferAllocFunction (pad2, buf-> offset, buf->size, buf->caps, buf); gst_pad_remove_data_probe (pad, (guint) cb_id); gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (imagebin)), my_bus_callback, NULL); gst_element_set_state (imagebin, GST_STATE_PLAYING); return TRUE; }