(self)
| 26 | class 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 | |
| 46 | def StartCaptureProcess(args): |
nothing calls this directly
no outgoing calls
no test coverage detected