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">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>
------------------------------<u></u>------------<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-<u></u>snippets/snippet/Gapless%<u></u>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;<u></u>playbin2&quot;, &quot;player&quot;)<br>
        self.player.set_property(&quot;uri&quot;<u></u>, filename)<br>
        self.player.connect(&quot;about-to-<u></u>finish&quot;, self.about_to_finish)<br>
<br>
    def run(self):<br>
        self.player.set_state(gst.<u></u>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(&quot;file:///path/to/song.<u></u>ogg&quot;)<br>
    player.run()<br>
<br>
<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>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>