init commit

This commit is contained in:
ingvar1995 2016-08-05 18:34:38 +03:00
parent 19fb905554
commit d8dd16e865
3 changed files with 13 additions and 1 deletions

View File

@ -10,6 +10,9 @@ import wave
import settings
from util import curr_directory
# TODO: widget for video
# TODO: improve IncomingCallWidget
class IncomingCallWidget(widgets.CenteredWidget):
@ -56,7 +59,7 @@ class IncomingCallWidget(widgets.CenteredWidget):
self.call_type.setText(text)
pr = profile.Profile.get_instance()
self.accept_audio.clicked.connect(lambda: pr.accept_call(friend_number, True, False) or self.stop())
# self.accept_video.clicked.connect(lambda: pr.start_call(friend_number, True, True))
self.accept_video.clicked.connect(lambda: pr.accept_call(friend_number, True, True))
self.decline.clicked.connect(lambda: pr.stop_call(friend_number, False) or self.stop())
class SoundPlay(QtCore.QThread):

View File

@ -320,6 +320,13 @@ def callback_audio(toxav, friend_number, samples, audio_samples_per_channel, aud
audio_channels_count,
rate)
# -----------------------------------------------------------------------------------------------------------------
# Callbacks - video
# -----------------------------------------------------------------------------------------------------------------
def video_receive_frame(toxav, friend_number, width, height, y, u, v, ystride, ustride, vstride, user_data):
pass
# -----------------------------------------------------------------------------------------------------------------
# Callbacks - initialization
@ -353,6 +360,7 @@ def init_callbacks(tox, window, tray):
toxav.callback_call_state(call_state, 0)
toxav.callback_call(call, 0)
toxav.callback_audio_receive_frame(callback_audio, 0)
tox.callback_video_receive_frame(video_receive_frame, 0)
tox.callback_friend_lossless_packet(lossless_packet, 0)
tox.callback_friend_lossy_packet(lossy_packet, 0)

View File

@ -11,6 +11,7 @@ CALL_TYPE = {
'AUDIO': 1,
'VIDEO': 2
}
# TODO: rewrite (make class)
class AV: