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 132935 - setting pipeline -> NULL -> PLAYING doesn't restart stream
setting pipeline -> NULL -> PLAYING doesn't restart stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.7.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-30 04:49 UTC by Allison Karlitskaya (desrt)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allison Karlitskaya (desrt) 2004-01-30 04:49:52 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.
Comment 1 Benjamin Otte (Company) 2004-02-05 00:16:25 UTC
fixed in cvs HEAD