本文整理汇总了Python中Stream.Stream.kill方法的典型用法代码示例。如果您正苦于以下问题:Python Stream.kill方法的具体用法?Python Stream.kill怎么用?Python Stream.kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stream.Stream
的用法示例。
在下文中一共展示了Stream.kill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: hasattr
# 需要导入模块: from Stream import Stream [as 别名]
# 或者: from Stream.Stream import kill [as 别名]
controller.vote(users = users,
emulator = emulator)
#Draw the controller on the capture_frame
controller.render(frame = controller_frame)
#Draw the stage
stage.render( stage_frame = stage_frame,
controller_frame = controller_frame,
keylog = emulator.keylog)
#Display the results
cv2.imshow('Stage_frame', stage_frame)
#Stream the results
if hasattr(config, 'STREAM'):
stream.init_stream_pipe()
stream.broadcast(stage_frame)
if cv2.waitKey(1) ==27:
exit(0)
except KeyboardInterrupt:
pass
else:
print("config.CONTROLLER.CAPTURE did not open\n")
# Clean up everything before leaving
stream.kill()
emulator.logfile.close()
cv2.destroyAllWindows()