toxav kill fixed
This commit is contained in:
parent
6e07d3e3d4
commit
ee994973db
3 changed files with 7 additions and 4 deletions
|
@ -107,7 +107,7 @@ class App:
|
||||||
self._tray.hide()
|
self._tray.hide()
|
||||||
self._save_profile()
|
self._save_profile()
|
||||||
self._settings.close()
|
self._settings.close()
|
||||||
self._calls_manager.set_toxav(None)
|
self._kill_toxav()
|
||||||
del self._tox
|
del self._tox
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -319,7 +319,7 @@ class App:
|
||||||
self._stop_threads(False)
|
self._stop_threads(False)
|
||||||
data = self._tox.get_savedata()
|
data = self._tox.get_savedata()
|
||||||
self._save_profile(data)
|
self._save_profile(data)
|
||||||
self._calls_manager.set_toxav(None)
|
self._kill_toxav()
|
||||||
del self._tox
|
del self._tox
|
||||||
# create new tox instance
|
# create new tox instance
|
||||||
self._tox = self._create_tox(data)
|
self._tox = self._create_tox(data)
|
||||||
|
@ -411,3 +411,7 @@ class App:
|
||||||
def _init_profile(self):
|
def _init_profile(self):
|
||||||
if not self._profile.has_avatar():
|
if not self._profile.has_avatar():
|
||||||
self._profile.reset_avatar(self._settings['identicons'])
|
self._profile.reset_avatar(self._settings['identicons'])
|
||||||
|
|
||||||
|
def _kill_toxav(self):
|
||||||
|
self._calls_manager.set_toxav(None)
|
||||||
|
self._tox.AV.kill()
|
||||||
|
|
|
@ -121,7 +121,6 @@ class Tox:
|
||||||
self.AV = ToxAV(self._tox_pointer)
|
self.AV = ToxAV(self._tox_pointer)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
del self.AV
|
|
||||||
Tox.libtoxcore.tox_kill(self._tox_pointer)
|
Tox.libtoxcore.tox_kill(self._tox_pointer)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ToxAV:
|
||||||
self.video_receive_frame_cb = None
|
self.video_receive_frame_cb = None
|
||||||
self.call_cb = None
|
self.call_cb = None
|
||||||
|
|
||||||
def __del__(self):
|
def kill(self):
|
||||||
"""
|
"""
|
||||||
Releases all resources associated with the A/V session.
|
Releases all resources associated with the A/V session.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue