Advertisement
Guest User

rm sync while playing testcase

a guest
Jul 28th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import gobject
  2. import gst
  3.  
  4. gobject.threads_init()
  5.  
  6. for i in range(10000):
  7. pipe = gst.parse_launch("filesrc location=foo.wav ! filesink location=bar.wav")
  8. bus = pipe.get_bus()
  9. bus.set_sync_handler(lambda *x: gst.BUS_PASS)
  10. pipe.set_state(gst.STATE_PLAYING)
  11. bus.set_sync_handler(None)
  12. pipe.set_state(gst.STATE_NULL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement