Remove multiprocessing

This commit is contained in:
jimmy 2022-07-23 04:08:20 +12:00
parent 56d4b8c371
commit a58f11ac0e
1 changed files with 4 additions and 11 deletions

View File

@ -45,7 +45,8 @@ class Video:
cv2.imshow("window", frame)
cv2.waitKey(int(delay))
if cv2.waitKey(int(delay)) == ord('q'):
break
# Break the loop
else:
@ -58,13 +59,5 @@ class Video:
if __name__ == "__main__":
video = Video(0, 0)
x = multiprocessing.Process(target = video.start, args=("slave/videos/sample-mp4-file.mp4",))
x.start()
time.sleep(2)
x.terminate()
time.sleep(1)
video = Video(4000, 0)
x = multiprocessing.Process(target = video.start, args=("slave/videos/sample-mp4-file.mp4",))
x.start()
time.sleep(1)
x.terminate()
video.start("slave/videos/sample-mp4-file.mp4")