Skip to content

Commit

Permalink
dynamic proxy initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sr99622 committed Aug 30, 2024
1 parent 87b54f2 commit b208718
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion onvif-gui/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import avio
import liblivemedia

VERSION = "2.2.7"
VERSION = "2.2.8"

class TimerSignals(QObject):
timeoutPlayer = pyqtSignal(str)
Expand Down
10 changes: 6 additions & 4 deletions onvif-gui/gui/panels/options/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,19 @@ def __init__(self, mw):
lytMain.setRowStretch(1, 10)

def setProxyType(self, type):
self.proxyType = type
self.mw.settings.setValue(self.proxyTypeKey, type)

if type == ProxyType.SERVER:
self.mw.startProxyServer()

if not hasattr(self.mw, "cameraPanel"):
return

if len(self.mw.pm.players):
QMessageBox.information(self.mw, "Closing Streams", "All current streams will be closed")
self.mw.closeAllStreams()

self.proxyType = type
self.mw.settings.setValue(self.proxyTypeKey, type)

getProxyURI = None
if type != ProxyType.STAND_ALONE:
getProxyURI = self.mw.getProxyURI
Expand All @@ -112,7 +115,6 @@ def radStandAloneToggled(self, checked):
def radServerToggled(self, checked):
self.lblConnect.setEnabled(checked)
if checked:
self.mw.startProxyServer()
self.setProxyType(ProxyType.SERVER)
self.lblServer.setText(self.mw.proxy.getRootURI())
else:
Expand Down

0 comments on commit b208718

Please sign in to comment.