Exemplo n.º 1
0
 def _queue_frame_data_locked(self, is_key, seq, pts, data):
     message = pb2.ClientBound()
     if is_key:
         message.stream_data.frame_data.type = pb2.FrameData.KEY
     else:
         message.stream_data.frame_data.type = pb2.FrameData.DELTA
     message.stream_data.frame_data.seq = seq
     message.stream_data.frame_data.pts = pts
     message.stream_data.frame_data.data = data
     return self._queue_message_locked(message)
Exemplo n.º 2
0
 def __init__(self):
     self._message = pb2.ClientBound()
     self._message.stream_data.inference_data.SetInParent()
Exemplo n.º 3
0
 def _queue_codec_data_locked(self, resolution, data):
     message = pb2.ClientBound()
     message.stream_data.codec_data.width = resolution[0]
     message.stream_data.codec_data.height = resolution[1]
     message.stream_data.codec_data.data = data
     return self._queue_message_locked(message)
Exemplo n.º 4
0
 def _queue_overlay(self, svg):
     message = pb2.ClientBound(timestamp_us=int(time.monotonic() * 1000000))
     message.overlay.svg = svg
     return self._queue_message(message)
Exemplo n.º 5
0
 def _queue_video(self, data):
     message = pb2.ClientBound(timestamp_us=int(time.monotonic() * 1000000))
     message.video.data = data
     return self._queue_message(message)
Exemplo n.º 6
0
 def _queue_stop(self):
     message = pb2.ClientBound(timestamp_us=int(time.monotonic() * 1000000))
     message.timestamp_us = int(time.monotonic() * 1000000)
     message.stop.SetInParent()
     return self._queue_message(message, replace_last=True)
Exemplo n.º 7
0
 def _queue_start(self, resolution):
     message = pb2.ClientBound(timestamp_us=int(time.monotonic() * 1000000))
     message.start.width, message.start.height = resolution
     return self._queue_message(message)