Commit 9230acdc authored by nextime's avatar nextime

Start config file integration for tkinter

parent 8853586d
...@@ -4,6 +4,7 @@ log_level = INFO ...@@ -4,6 +4,7 @@ log_level = INFO
[Web] [Web]
stream_url = https://192.168.42.1/HLS/record/Live.m3u8 stream_url = https://192.168.42.1/HLS/record/Live.m3u8
rtmp_url = rtmp://192.168.42.1/record/Live
port = 5000 port = 5000
[Commands] [Commands]
...@@ -21,8 +22,6 @@ open = smblur_clean ...@@ -21,8 +22,6 @@ open = smblur_clean
[Tkinter] [Tkinter]
window_title = SHM Cam Studio window_title = SHM Cam Studio
window_width = 300
window_height = 400
button_width = 20 button_width = 20
button_height = 2 button_height = 2
font_size = 12 font_size = 12
...@@ -201,16 +201,16 @@ class VideoPlayer: ...@@ -201,16 +201,16 @@ class VideoPlayer:
def create_tkinter_gui(): def create_tkinter_gui():
# Create the main window # Create the main window
window = tk.Tk() window = tk.Tk()
window.title("Streaming Control Panel") window.title(config.get("Tkinter", "window_title", fallback="SHM CamStudio"))
helv36 = tkFont.Font(family='Helvetica', size=13, weight='bold') helv36 = tkFont.Font(family='Helvetica', size=config.get("Tkinter", "font_size", fallback=12), weight='bold')
# Frame for the left side # Frame for the left side
fleft = tk.Frame(window) fleft = tk.Frame(window)
fleft.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) fleft.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
# URL of your HLS stream # URL of your RTMP stream
video_url = "rtmp://192.168.42.1/record/Live" video_url = config.get("General", "rtmp_url", fallback="rtmp://192.168.42.1/record/Live")
VideoPlayer(fleft, video_url) VideoPlayer(fleft, video_url)
# Frame for the right side # Frame for the right side
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment