Compare commits

...

2 Commits

Author SHA1 Message Date
mrbesen 85ca1675f8
disable ui when stream or recieve is running 2022-10-08 18:03:10 +02:00
mrbesen f2dc9dd7e4
add notr flags to some options 2022-10-08 18:02:53 +02:00
2 changed files with 26 additions and 15 deletions

View File

@ -114,6 +114,9 @@ class ScreenStreamerGUI(QtWidgets.QMainWindow):
def set_recieve_status(self, status: bool):
"""status = True - stream is running"""
self.ui.recieveBtn.setEnabled(True)
self.ui.listenAddr.setEnabled(not status)
self.ui.listenPort.setEnabled(not status)
self.ui.disableAudio.setEnabled(not status)
if status:
self.ui.recieveBtn.setText('Stop Recieve')
else:
@ -122,6 +125,11 @@ class ScreenStreamerGUI(QtWidgets.QMainWindow):
def set_stream_status(self, status: bool):
"""status = True - stream is running"""
self.ui.streamBtn.setEnabled(True)
self.ui.displaySelect.setEnabled(not status)
self.ui.videoCodec.setEnabled(not status)
self.ui.audioSource.setEnabled(not status)
self.ui.sendto.setEnabled(not status)
self.ui.streamPort.setEnabled(not status)
if status:
self.ui.streamBtn.setText('Stop Stream')
else:

View File

@ -46,12 +46,12 @@
<widget class="QComboBox" name="protocolSelect">
<item>
<property name="text">
<string>TCP</string>
<string notr="true">TCP</string>
</property>
</item>
<item>
<property name="text">
<string>UDP</string>
<string notr="true">UDP</string>
</property>
</item>
</widget>
@ -88,8 +88,11 @@
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="sendto">
<property name="text">
<string notr="true"/>
</property>
<property name="placeholderText">
<string>127.0.0.1</string>
<string notr="true">127.0.0.1</string>
</property>
</widget>
</item>
@ -143,51 +146,51 @@
<item row="2" column="1">
<widget class="QComboBox" name="videoCodec">
<property name="currentText">
<string>hevc_nvenc</string>
<string notr="true">h264_nvenc</string>
</property>
<item>
<property name="text">
<string>h264_nvenc</string>
<string notr="true">h264_nvenc</string>
</property>
</item>
<item>
<property name="text">
<string>libx264</string>
<string notr="true">libx264</string>
</property>
</item>
<item>
<property name="text">
<string>h264_vaapi</string>
<string notr="true">h264_vaapi</string>
</property>
</item>
<item>
<property name="text">
<string>hevc_nvenc</string>
<string notr="true">hevc_nvenc</string>
</property>
</item>
<item>
<property name="text">
<string>libx265</string>
<string notr="true">libx265</string>
</property>
</item>
<item>
<property name="text">
<string>hevc_vaapi</string>
<string notr="true">hevc_vaapi</string>
</property>
</item>
<item>
<property name="text">
<string>vp8_vaapi</string>
<string notr="true">vp8_vaapi</string>
</property>
</item>
<item>
<property name="text">
<string>vp9_vaapi</string>
<string notr="true">vp9_vaapi</string>
</property>
</item>
<item>
<property name="text">
<string>libvpx-vp9</string>
<string notr="true">libvpx-vp9</string>
</property>
</item>
</widget>
@ -211,10 +214,10 @@
<item row="1" column="1">
<widget class="QLineEdit" name="listenAddr">
<property name="text">
<string>0.0.0.0</string>
<string notr="true">0.0.0.0</string>
</property>
<property name="placeholderText">
<string>0.0.0.0</string>
<string notr="true">0.0.0.0</string>
</property>
</widget>
</item>