Frist commit
This commit is contained in:
commit
7682dcdcf8
51
lib.py
Normal file
51
lib.py
Normal file
@ -0,0 +1,51 @@
|
||||
import sys
|
||||
|
||||
MEDIAPLAYER = "vlc"
|
||||
|
||||
def mainMenu():
|
||||
|
||||
print("(S)tream")
|
||||
print("(W)atch")
|
||||
print("(Q)uit")
|
||||
print()
|
||||
x = input ("s/w/q: ").strip().lower()
|
||||
|
||||
if x in ("s","w","q"):
|
||||
return x
|
||||
else:
|
||||
return 1
|
||||
|
||||
def quitLKStream():
|
||||
#gracefully shut stuff down
|
||||
#Close holesail
|
||||
#Close MEDIAPLAYER
|
||||
#Close mediamtx
|
||||
sys.exit()
|
||||
|
||||
def startLKStream():
|
||||
#start mediamtx server
|
||||
#start holesail with randomized key
|
||||
#start ffmpeg streaming to mediamtx
|
||||
#For the moment, we won't be doing that but using OBS
|
||||
|
||||
print("TODO: Start Streaming")
|
||||
return "Fake Key" #return holesail key
|
||||
|
||||
def mainMenuHandling(x):
|
||||
if x == 'q':
|
||||
quitLKStream()
|
||||
|
||||
elif x == 's':
|
||||
holesailKey = startLKStream()
|
||||
return holesailKey
|
||||
|
||||
elif x == 'w':
|
||||
#Ask for holesail key
|
||||
#Connect to holesail (subprocess?)
|
||||
#Connect to stream with MEDIAPLAYER(subprocess?)
|
||||
# Use a default stream location if streaming with FFMPEG, with OBS it's the default plus stream key
|
||||
print("TODO Watch Stream")
|
||||
return 0
|
||||
else:
|
||||
print("invalid option x was: ", x)
|
||||
return 1
|
Loading…
x
Reference in New Issue
Block a user