From a6633f1e7792b05edf53dad23255e3ef6154f656 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 24 Oct 2017 21:43:12 +0300 Subject: [PATCH] minor video changes --- toxygen/calls.py | 10 +++++----- toxygen/profile.py | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/toxygen/calls.py b/toxygen/calls.py index 7b16e84..6477c03 100644 --- a/toxygen/calls.py +++ b/toxygen/calls.py @@ -284,12 +284,12 @@ class AV: try: y, u, v = self.convert_bgr_to_yuv(frame) self._toxav.video_send_frame(friend_num, width, height, y, u, v) - except Exception as e: - print(e) - except Exception as e: - print(e) + except: + pass + except: + pass - time.sleep(0.01) + time.sleep(0.01) def convert_bgr_to_yuv(self, frame): """ diff --git a/toxygen/profile.py b/toxygen/profile.py index e453059..204419a 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -72,6 +72,8 @@ class Profile(basecontact.BaseContact, Singleton): friend = Friend(message_getter, i, name, status_message, item, tox_id) friend.set_alias(alias) self._contacts.append(friend) + if len(self._contacts): + self.set_active(0) self.filtration_and_sorting(self._sorting) # ----------------------------------------------------------------------------------------------------------------- @@ -1241,7 +1243,7 @@ class Profile(basecontact.BaseContact, Singleton): def incoming_call(self, audio, video, friend_number): """ - Incoming call from friend. Only audio is supported now + Incoming call from friend. """ if not Settings.get_instance().audio['enabled']: return