2 from . protocol
import *
9 self.
cond = threading.Condition()
26 while 0 < len(self.
queue)
and len(data) + len(self.
queue[0]) < size:
27 data = data + self.
queue[0]
32 self.log.debug(
'%s.read(size=%d) = %d' % (self.
name, size, len(data)))
35 def seek(self, offset, whence):
36 self.log.info(
'%s.seek(%d, %d)' % (str(self.
name), offset, whence))
40 if event
is self.drone.EVENT_CONNECTED:
41 self.log.info(
'%s.handle_event(CONNECTED)' % (self.
name))
42 elif event
is self.drone.EVENT_DISCONNECTED:
43 self.log.info(
'%s.handle_event(DISCONNECTED)' % (self.
name))
49 elif event
is self.drone.EVENT_VIDEO_DATA:
50 self.log.debug(
'%s.handle_event(VIDEO_DATA, size=%d)' % (self.
name, len(data)))
60 self.log.debug(
'%s.handle_event(VIDEO_DATA): ignore %d packets' %
66 self.queue.append(data[2:])
def __handle_event(self, event, sender, data)
def seek(self, offset, whence)
wait_first_packet_in_frame
def __init__(self, drone)