Hi Tony,<div><br></div><div>Sorry for taking so long to respond to this one.</div><div><br></div><div>I had a similar problem in Colors! and solved it by adding a timer event while playback was running:</div><div><br></div>

<div><div>1350<span class="Apple-tab-span" style="white-space:pre">       </span>    def start_update_timer(self):</div><div>1351<span class="Apple-tab-span" style="white-space:pre">        </span>        if self.update_timer:</div><div>

1352<span class="Apple-tab-span" style="white-space:pre">     </span>            gobject.source_remove(self.update_timer)</div><div>1353<span class="Apple-tab-span" style="white-space:pre">     </span>            </div><div>1354<span class="Apple-tab-span" style="white-space:pre">     </span>        # The timer priority is chosen to be above PRIORITY_REDRAW (which is PRIORITY_HIGH_IDLE_20, but not defined in PyGTK).</div>

<div>1355<span class="Apple-tab-span" style="white-space:pre">  </span>        self.update_timer = gobject.timeout_add(1, self.update, priority=gobject.PRIORITY_HIGH_IDLE+30)</div><div><br></div></div><div>The update event would trigger a paint event and return True when playback was active, else return False if playback was done.  When playback was started again it would start the timer running again.  This starting and stopping prevents pegging the CPU all the time.</div>

<div><br></div><div>Anyway, this might help solve your problem by forcing the event loop to run, although it does sound like the root problem could be a different issue.</div><div><br></div><div>Best,</div><div>Wade<br><br>

<div class="gmail_quote">On Thu, Sep 3, 2009 at 12:02 PM, Tony Anderson <span dir="ltr"><<a href="mailto:tony@olenepal.org">tony@olenepal.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
I am always tempted to blame my code, but the same problem appeared<br>
in the Ambulant demo wrapper (player_pygtk.py) on Ubuntu. It appears only in the python wrapper (not the C++ version). The Ambulant team has opened a ticket. The problem appears to be an interaction between the gtk.main() event loop and the Ambulant redraw logic. Player_pygtk.py doesn't call gtk.main but instead uses a loop:<br>


<br>
while gtk.events_pending():<br>
   gtk.main_iteration()<br>
<br>
I think it is safe to rule out Sugar as a culprit, but not my building of the Ambulant package!<br>
<br>
Yours,<br><font color="#888888">
<br>
Tony</font><div><div></div><div class="h5"><br>
<br>
<br>
Tomeu Vizoso wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Sep 2, 2009 at 18:31, Tony Anderson<<a href="mailto:tony@olenepal.org" target="_blank">tony@olenepal.org</a>> wrote:<br>
  <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I posted version 1 of the Smile activity to <a href="http://activities.sugarlabs.org" target="_blank">activities.sugarlabs.org</a>. It<br>
matches the code posted on gitorious.<br>
<br>
The Smile activity implements the open source Ambulant SMIL3 player. It<br>
plays a variety of media types. More importantly it can play a complex<br>
multimedia presentation including text, images, audio, and video using a<br>
standard SMIL script.<br>
<br>
My goal is to use the Smile activity to play children's stories so that<br>
they can see the text highlighted karaoke-style while listening to the<br>
story's audio track and looking at background images.<br>
<br>
Similar to the Quiz and ShowNTell activities, the Smile activity plays a<br>
bundle with an extension '.smxo' and mime_type 'application/x-smile'<br>
which contains the controlling SMIL script and the associated media files.<br>
<br>
Version 1 has two serious problems. Video playback and multimedia<br>
playback does not redraw correctly (playback is advanced by moving the<br>
mouse!). In addition, it is possible to replay only be re-selecting the<br>
presentation. The pause and stop buttons do not work correctly.<br>
<br>
I hope that both of these problems will be resolved in version 2 by the<br>
end of September.<br>
    <br>
</blockquote>
<br>
Hi Tony,<br>
<br>
do you know if the cause for these problems in the Ambulant SMIL3<br>
player or in the activity code?<br>
<br>
Regards,<br>
<br>
Tomeu<br>
<br>
  <br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>