Adding camera input selection (has to be connected to gstconf.py)
authorDavid Testé <soonum@gnu.org>
Wed, 9 Mar 2016 15:28:57 +0000 (16:28 +0100)
committerDavid Testé <soonum@gnu.org>
Wed, 9 Mar 2016 15:28:57 +0000 (16:28 +0100)
Renaming the project Libre-Streamer --> ABYSS
(ABYSS Broadcast Your Stream Successfully)

stream_2016/gstconf.py
stream_2016/libre-streamer.py

index fd8dc3e5c2df7da6a78e418733229ec4bc6381f8..fa9a63f64ebd366885503d078cfb72869e8d18dc 100755 (executable)
@@ -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 <http://www.gnu.org/licenses/>.
+# along with ABYSS.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Copyright (c) 2016 David Testé
 
index 1eb5c4a9b4ee76308432f8df9eb3b7b35dc12387..f48e23083dc54d68f3d15eafdeb73a9222448c18 100755 (executable)
@@ -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 <http://www.gnu.org/licenses/>.
+# along with ABYSS.  If not, see <http://www.gnu.org/licenses/>.
 #
 # 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)