From 332e58df6c6e1c817c4d05f66f2d8a74f27c8afc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20Test=C3=A9?= Date: Wed, 9 Mar 2016 16:28:57 +0100 Subject: [PATCH] Adding camera input selection (has to be connected to gstconf.py) Renaming the project Libre-Streamer --> ABYSS (ABYSS Broadcast Your Stream Successfully) --- stream_2016/gstconf.py | 8 ++++---- stream_2016/libre-streamer.py | 27 ++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/stream_2016/gstconf.py b/stream_2016/gstconf.py index fd8dc3e..fa9a63f 100755 --- a/stream_2016/gstconf.py +++ b/stream_2016/gstconf.py @@ -1,19 +1,19 @@ #!/usr/bin/env python3.4 -# This file is part of Libre-Streamer. +# This file is part of ABYSS. # -# Libre-Streamer is free software: you can redistribute it and/or modify +# ABYSS is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# Libre-Streamer is distributed in the hope that it will be useful, +# ABYSS is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Libre-Streamer. If not, see . +# along with ABYSS. If not, see . # # Copyright (c) 2016 David Testé diff --git a/stream_2016/libre-streamer.py b/stream_2016/libre-streamer.py index 1eb5c4a..f48e230 100755 --- a/stream_2016/libre-streamer.py +++ b/stream_2016/libre-streamer.py @@ -1,19 +1,19 @@ #!/usr/bin/env python3.4 -# This file is part of Libre-Streamer. +# This file is part of ABYSS. # -# Libre-Streamer is free software: you can redistribute it and/or modify +# ABYSS is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# Libre-Streamer is distributed in the hope that it will be useful, +# ABYSS is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Libre-Streamer. If not, see . +# along with ABYSS. If not, see . # # Copyright (c) 2016 David Testé @@ -65,7 +65,15 @@ from gi.repository import GObject import gstconf +# Based on 2016 FSF's ELPHEL camera configuration +IP_1 = '192.168.48.2' +IP_2 = '192.168.48.3' +IP_3 = '192.168.48.4' +CAM1_IP1 = 'CAM_1: ' + IP_1 +CAM2_IP2 = 'CAM_1: ' + IP_2 +CAM3_IP3 = 'CAM_1: ' + IP_3 ENTRYFIELD_TEXT = 'Please fill both entry\nfield to stop streaming.' + formatted_date = strftime('%Y_%m_%d', localtime()) metadata = {'speaker_name':'NC', 'session_title':'NC', @@ -80,7 +88,7 @@ class Streamgui(object): # Create the GUI self.win = Gtk.Window() - self.win.set_title("Libre-Streamer") + self.win.set_title("ABYSS") self.win.connect("delete_event", lambda w,e: Gtk.main_quit()) ## self.win.fullscreen() @@ -89,6 +97,7 @@ class Streamgui(object): vbox_entries = Gtk.VBox(False, 0) vbox_streaminfo = Gtk.VBox(False, 0) vbox_cpuinfo = Gtk.VBox(False, 0) + vbox_rbuttongrp = Gtk.VBox(False, 0) hbox = Gtk.HBox(False, 30) hbox_videoaudio = Gtk.HBox(False, 0) hbox_time = Gtk.HBox(False, 0) @@ -127,6 +136,10 @@ class Streamgui(object): self.cpuload_label = Gtk.Label('CPU load: ') self.cpuload_value = Gtk.Label('NC') + self.cam1_rbutton = Gtk.RadioButton(None, label=CAM1_IP1) + self.cam2_rbutton = Gtk.RadioButton(self.cam1_rbutton, label=CAM2_IP2) + self.cam3_rbutton = Gtk.RadioButton(self.cam1_rbutton, label=CAM3_IP3) + self.entryfield_info = Gtk.MessageDialog(buttons=Gtk.ButtonsType.CLOSE, text=ENTRYFIELD_TEXT,) ##messagetype=Gtk.MessageType.WARNING, @@ -145,11 +158,15 @@ class Streamgui(object): hbox_time.pack_start(self.streamtime_label, False, False, 0) hbox_time.pack_start(self.streamtime_value, False, False, 0) vbox_streaminfo.pack_start(hbox_time, False, True, 0) + vbox_rbuttongrp.pack_start(self.cam1_rbutton, False, False, 0) + vbox_rbuttongrp.pack_start(self.cam2_rbutton, False, False, 0) + vbox_rbuttongrp.pack_start(self.cam3_rbutton, False, False, 0) hbox.pack_start(vbox_labels, False, False, 0) hbox.pack_start(vbox_entries, False, False, 0) hbox.pack_start(vbox_streaminfo, False, False, 0) hbox.pack_start(self.cpuload_label, False, False, 0) hbox.pack_start(self.cpuload_value, False, False, 0) + hbox.pack_start(vbox_rbuttongrp, False, False, 0) vbox.pack_start(hbox_videoaudio, True, True, 0) vbox.pack_start(hbox, False, True, 0) -- 2.25.1