GNOME Bugzilla – Bug 132935
setting pipeline -> NULL -> PLAYING doesn't restart stream
Last modified: 2004-12-22 21:47:04 UTC
I have this code in a program that uses CVS HEAD gstreamer (from an hour ago): gst_element_set_state( gst->pipeline, GST_STATE_NULL ); gst_bin_remove( GST_BIN( gst->pipeline ), gst->decoder ); gst->decoder = gst_element_factory_make( "spider", "decoder" ); gst_bin_add( GST_BIN( gst->pipeline ), gst->decoder ); gst_element_link_many( gst->src, gst->decoder, gst->sink, NULL ); g_object_set( G_OBJECT( gst->src ), "location", uri, NULL ); gst_element_set_state( gst->pipeline, GST_STATE_PLAYING ); The idea is to reuse the src and sink elements of the pipeline to play another file. The decoder (spider) element has to be created fresh in the case that the file format has changed (otherwise it doesn't work). What's odd, though, is that when the pipeline goes back to the PLAYING state, it picks up where it left off. That is: if you 'switch' to the same song, there is a slight pause and no other effect. If you switch to a different song, then the song starts playing at the timepoint that you *stopped* playing the song before it.
fixed in cvs HEAD