Commit 15195dc2 authored by liyuanhong's avatar liyuanhong

添加了视频和音频日志开开关

parent 22430a59
......@@ -155,6 +155,12 @@ class CameraArea():
connectButton = wx.Button(ctrPanel, label="清空日志", pos=(5, 5))
self.frame.Bind(wx.EVT_BUTTON, lambda evt: self.clearLog(evt),
connectButton)
isVideoLogOpenCombox = wx.ComboBox(ctrPanel, pos=(90, 5), choices=['视频日志(关)', '视频日志(开)'], value="视频日志(关)", size=wx.Size(110, -1))
self.frame.Bind(wx.EVT_COMBOBOX, lambda evt: self.isVideoLogOpenChange(evt),
isVideoLogOpenCombox)
isAudioLogOpenCombox = wx.ComboBox(ctrPanel, pos=(210, 5), choices=['音频日志(关)', '音频日志(开)'], value="音频日志(关)",size=wx.Size(110, -1))
self.frame.Bind(wx.EVT_COMBOBOX, lambda evt: self.isAudioLogOpenChange(evt),
isAudioLogOpenCombox)
boxSizer_ctrArea = wx.BoxSizer(wx.VERTICAL)
boxSizer_ctrArea.Add(ctrText,2, flag=wx.EXPAND | wx.TOP ,border=10)
boxSizer_ctrArea.Add(ctrPanel,100, flag=wx.EXPAND | wx.ALL)
......@@ -459,4 +465,24 @@ class CameraArea():
m_command = ["ffplay", url]
subprocess.run(m_command)
####################################################
# 控制是否显示视频日志
###################################################
def isVideoLogOpenChange(self,evt):
val = evt.GetEventObject().GetValue()
if val == "视频日志(开)":
self.pushObj.setIsOpenVideoLog(1)
else:
self.pushObj.setIsOpenVideoLog(0)
####################################################
# 控制是否显示音频日志
###################################################
def isAudioLogOpenChange(self,evt):
val = evt.GetEventObject().GetValue()
if val == "音频日志(开)":
self.pushObj.setIsOpenAudioLog(1)
else:
self.pushObj.setIsOpenAudioLog(0)
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