Skip to content
Snippets Groups Projects
Commit b5e083ec authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

tools: fix toggle video preview test in dringctrl.py

Refs #67717

Change-Id: I868cf9ccbe0dabebae3084acd8340f513bde2cdf
parent dd54b60b
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,8 @@ class DRingCtrl(Thread): ...@@ -107,6 +107,8 @@ class DRingCtrl(Thread):
DBUS_DEAMON_PATH+'/CallManager', introspect=False) DBUS_DEAMON_PATH+'/CallManager', introspect=False)
proxy_confmgr = bus.get_object(DBUS_DEAMON_OBJECT, proxy_confmgr = bus.get_object(DBUS_DEAMON_OBJECT,
DBUS_DEAMON_PATH+'/ConfigurationManager', introspect=False) DBUS_DEAMON_PATH+'/ConfigurationManager', introspect=False)
proxy_videomgr = bus.get_object(DBUS_DEAMON_OBJECT,
DBUS_DEAMON_PATH+'/VideoManager', introspect=False)
self.instance = dbus.Interface(proxy_instance, self.instance = dbus.Interface(proxy_instance,
DBUS_DEAMON_OBJECT+'.Instance') DBUS_DEAMON_OBJECT+'.Instance')
...@@ -114,6 +116,9 @@ class DRingCtrl(Thread): ...@@ -114,6 +116,9 @@ class DRingCtrl(Thread):
DBUS_DEAMON_OBJECT+'.CallManager') DBUS_DEAMON_OBJECT+'.CallManager')
self.configurationmanager = dbus.Interface(proxy_confmgr, self.configurationmanager = dbus.Interface(proxy_confmgr,
DBUS_DEAMON_OBJECT+'.ConfigurationManager') DBUS_DEAMON_OBJECT+'.ConfigurationManager')
if proxy_videomgr:
self.videomanager = dbus.Interface(proxy_videomgr,
DBUS_DEAMON_OBJECT+'.VideoManager')
except dbus.DBusException as e: except dbus.DBusException as e:
raise DRingCtrlDBusError("Unable to bind to dring DBus API") raise DRingCtrlDBusError("Unable to bind to dring DBus API")
......
...@@ -40,7 +40,6 @@ from gi.repository import GObject ...@@ -40,7 +40,6 @@ from gi.repository import GObject
from errors import * from errors import *
from controler import DRingCtrl from controler import DRingCtrl
from tester import DRingTester from tester import DRingTester
from toggle_video_preview import DRingToggleVideo
def printAccountDetails(account): def printAccountDetails(account):
details = ctrl.getAccountDetails(account) details = ctrl.getAccountDetails(account)
...@@ -183,7 +182,15 @@ if __name__ == "__main__": ...@@ -183,7 +182,15 @@ if __name__ == "__main__":
DRingTester().start(ctrl) DRingTester().start(ctrl)
if args.toggleVideo: if args.toggleVideo:
DRingToggleVideo().start() if not ctrl.videomanager:
print("Error: daemon without video support")
sys.exit(1)
import time
while True:
time.sleep(2)
ctrl.videomanager.startCamera()
time.sleep(2)
ctrl.videomanager.stopCamera()
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment