adding blocking and non-blocking rtsp stream

This might fix the stream errors in issue #25
Also refactored the code a bit since we do not want to display a window from within the API (offload to the person implementing it).
This commit is contained in:
Alano
2020-12-04 22:27:50 +02:00
parent 25ce2cbb55
commit 5d03c62b39
5 changed files with 191 additions and 32 deletions

11
util.py Normal file
View File

@@ -0,0 +1,11 @@
from threading import Thread
def threaded(fn):
def wrapper(*args, **kwargs):
thread = Thread(target=fn, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()
return thread
return wrapper