<p>Did you try firts to stop or set to ready the pipeline, then set the filename an play?</p>
<div class="gmail_quote">El 20/12/2011 18:05, &quot;Ralph Heinkel&quot; &lt;<a href="mailto:ralph.heinkel@web.de">ralph.heinkel@web.de</a>&gt; escribió:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Eduardo,<br>
    so according to your hint I changed the method to<br>
    <br>
       def about_to_finish(self, player):<br>
           player.set_property(&quot;uri&quot;, self.filename)<br>
           player.set_state(gst.STATE_PLAYING)<br>
    <br>
    but unfortunately this did not help, it still only plays the first
    song. I also tried to set the state first to STATE_NULL but then I
    got a lengthy error message that this is not allowed from within the
    event thread, and the whole thing went down with a segmentation
    fault.<br>
    <br>
    Ralph<br>
    <br>
    On <a href="tel:20.12.11%2021" value="+5620121121" target="_blank">20.12.11 21</a>:18, Eduardo Matus wrote:
    <blockquote type="cite">You have to set the pipeline state to playing again<br>
      <br>
      <div class="gmail_quote">On Tue, Dec 20, 2011 at 1:57 PM, Ralph
        Heinkel <span dir="ltr">&lt;<a href="mailto:ralph.heinkel@web.de" target="_blank">ralph.heinkel@web.de</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
          following code (&quot;stolen&quot; from eurion.net...) does not replay
          the same song (or any other song) set in about_to_finish()
          event callback method. The event method is entered (verified
          by temporarily added print statements), but the player just
          stops after playing the first song.<br>
          <br>
          I&#39;m using (opensuse 12.1) linux, gstreamer 0.10.35, gst-python
          0.10.22<br>
          <br>
          Am I missing anything? Any help would be appreciated.<br>
          <br>
          Thanks,<br>
          <br>
          Ralph<br>
          <br>
          ------------------------------------------<br>
          #!/usr/bin/python<br>
          # code from <a href="http://www.eurion.net/python-snippets/snippet/Gapless%20playback.html" target="_blank">http://www.eurion.net/python-snippets/snippet/Gapless%20playback.html</a><br>
          import pygst<br>
          pygst.require(&quot;0.10&quot;)<br>
          import gst, sys, gobject<br>
          <br>
          class Player:<br>
             def __init__(self, filename):<br>
                 self.filename = filename<br>
                 self.player = gst.element_factory_make(&quot;playbin2&quot;,
          &quot;player&quot;)<br>
                 self.player.set_property(&quot;uri&quot;, filename)<br>
                 self.player.connect(&quot;about-to-finish&quot;,
          self.about_to_finish)<br>
          <br>
             def run(self):<br>
                 self.player.set_state(gst.STATE_PLAYING)<br>
                 loop = gobject.MainLoop()<br>
                 loop.run()<br>
          <br>
             def about_to_finish(self, player):<br>
                 player.set_property(&quot;uri&quot;, self.filename)<br>
          <br>
          if __name__ == &quot;__main__&quot;:<br>
             gobject.threads_init()<br>
             player = Player(<a>&quot;file:///path/to/song.ogg&quot;</a>)<br>
             player.run()<br>
          <br>
          <br>
          _______________________________________________<br>
          gstreamer-devel mailing list<br>
          <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
          <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      Eduardo Matus Coquelet<br>
      Ingeniero Civil Informático y Telecomunicaciones.<br>
      Celular: 77113825<br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
  </div>

<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div>