MCPcopy Create free account
hub / github.com/aitjcize/Overlord / do_POST

Method do_POST

py/stream_camera.py:28–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26class ForwardToStdoutRequestHandler(http.server.BaseHTTPRequestHandler):
27
28 def do_POST(self):
29 size = self.server.size.split('x')
30 width = int(size[0])
31 height = int(size[1])
32
33 # Write jsmpeg header
34 sys.stdout.write('jsmp' + struct.pack('>2H', width, height))
35 sys.stdout.flush()
36
37 # Forward video stream to stdout
38 while True:
39 data = self.rfile.read(_BUFSIZ)
40 if len(data) == 0:
41 break
42 sys.stdout.write(data)
43 sys.stdout.flush()
44
45
46def StartCaptureProcess(args):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected