FreeJ Development sketches/ideas/TODOs

Please sign your notes!

End Of Stream Callback example:

   1 import threading
   2 import freej
   3 
   4 class MyCall(freej.DumbCall):
   5   def __init__(self, *args):
   6     super(MyCall, self).__init__(*args)
   7 
   8   def callback(self):
   9     print "detected EOS from python"
  10 
  11 
  12 
  13 W = 400
  14 H = 300
  15 cx = freej.Context()
  16 cx.init(W,H,0,0)
  17 cx.clear_all = True
  18 
  19 th = threading.Thread(target = cx.start , name = "freej")
  20 th.start();
  21 
  22 v = freej.VideoLayer()
  23 v.init(cx)
  24 v.open('/home/film/video/yue/live/nothing/cubo.avi')
  25 v.start()
  26 v.active = True
  27 
  28 cx.add_layer(v)
  29 
  30 cb = MyCall()
  31 v.add_eos_call(cb)