minor video changes

This commit is contained in:
ingvar1995 2017-10-24 21:43:12 +03:00
parent 23b55522ba
commit a6633f1e77
2 changed files with 8 additions and 6 deletions

View file

@ -284,10 +284,10 @@ class AV:
try: try:
y, u, v = self.convert_bgr_to_yuv(frame) y, u, v = self.convert_bgr_to_yuv(frame)
self._toxav.video_send_frame(friend_num, width, height, y, u, v) self._toxav.video_send_frame(friend_num, width, height, y, u, v)
except Exception as e: except:
print(e) pass
except Exception as e: except:
print(e) pass
time.sleep(0.01) time.sleep(0.01)

View file

@ -72,6 +72,8 @@ class Profile(basecontact.BaseContact, Singleton):
friend = Friend(message_getter, i, name, status_message, item, tox_id) friend = Friend(message_getter, i, name, status_message, item, tox_id)
friend.set_alias(alias) friend.set_alias(alias)
self._contacts.append(friend) self._contacts.append(friend)
if len(self._contacts):
self.set_active(0)
self.filtration_and_sorting(self._sorting) self.filtration_and_sorting(self._sorting)
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------
@ -1241,7 +1243,7 @@ class Profile(basecontact.BaseContact, Singleton):
def incoming_call(self, audio, video, friend_number): 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']: if not Settings.get_instance().audio['enabled']:
return return