Hi, I am using pyglet with wxPython to display videos. I used the file experimental/wxtest.py as a basis.
All pyglet calls are done from the wxWidgets main thread, so scheduling is a bit special. Basically, I have a wxWidgets timer that calls pyglet.clock.tick(True), and re-schedules according to the return value of pyglet.clock.get_sleep_time(True). This works well. However, I would like to avoid re-painting the window with every timer run. So what I'd like to have is an event handler in Player that fires when the texture has been updated. This could be implemented quite easily (if my limited understanding of the pyglet internals is right) by returning True from Source._update_texture() if the texture has been updated, and false otherwise. This value could then be used in Player.dispatch_events() to fire (or possibly schedule, if decoding is done in advance) the event. Does this make sense? Would it be generally useful or is this limited to use cases where pyglet has to interact with other GUI libraries? As this is my first post here, I would like to thank the author and the contributors for this excellent piece of work! -- Remy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
