diff options
| author | Anton <anton@picapica.im> | 2026-10-03 20:33:04 +0400 |
|---|---|---|
| committer | Anton <anton@picapica.im> | 2026-10-03 20:33:04 +0400 |
| commit | 835b124bd871afecd88c1e5e9105e3af4d4c5b27 (patch) | |
| tree | 42ee00cb6f37472fe36c802530cdc9a288ba87bd /pica-client/audiovideocallcontroller.cpp | |
| parent | 76225a538e1e960eda9e31a34846f4bc62adef87 (diff) | |
| download | pica-pica-835b124bd871afecd88c1e5e9105e3af4d4c5b27.tar.gz pica-pica-835b124bd871afecd88c1e5e9105e3af4d4c5b27.zip | |
pica-client: callwindow layout, video resize
Diffstat (limited to 'pica-client/audiovideocallcontroller.cpp')
| -rw-r--r-- | pica-client/audiovideocallcontroller.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pica-client/audiovideocallcontroller.cpp b/pica-client/audiovideocallcontroller.cpp index 9b4ae4d..a6da3f5 100644 --- a/pica-client/audiovideocallcontroller.cpp +++ b/pica-client/audiovideocallcontroller.cpp @@ -374,6 +374,7 @@ void AudioVideoCallController::start_call(QByteArray peer_id) /* decoded frames arrive from remotevideo's thread, so this is a queued connection; it dies with the window, which is deleted on close */ connect(remotevideo, SIGNAL(frameReady(QImage)), callwindow, SLOT(showRemoteFrame(QImage))); + connect(callwindow, SIGNAL(video_area_changed(QSize)), this, SLOT(video_area_changed(QSize))); #ifdef HAVE_VAAPI connect(remotevideo, SIGNAL(hwFrameReady(AVFramePtr)), callwindow, SLOT(showRemoteHwFrame(AVFramePtr))); connect(callwindow, SIGNAL(video_rendering_failed()), this, SLOT(video_rendering_failed())); @@ -397,6 +398,7 @@ void AudioVideoCallController::call_from(QByteArray peer_id) connect(callwindow, SIGNAL(callwindow_closed(CallWindow*)), this, SLOT(callwindow_closed(CallWindow*))); /* see the same connections in start_call() */ connect(remotevideo, SIGNAL(frameReady(QImage)), callwindow, SLOT(showRemoteFrame(QImage))); + connect(callwindow, SIGNAL(video_area_changed(QSize)), this, SLOT(video_area_changed(QSize))); #ifdef HAVE_VAAPI connect(remotevideo, SIGNAL(hwFrameReady(AVFramePtr)), callwindow, SLOT(showRemoteHwFrame(AVFramePtr))); connect(callwindow, SIGNAL(video_rendering_failed()), this, SLOT(video_rendering_failed())); @@ -595,6 +597,13 @@ void AudioVideoCallController::incoming_video_packet(QByteArray peer_id, quint16 remotevideo->enqueueFrame(frame); } +void AudioVideoCallController::video_area_changed(QSize area) +{ + // Direct call rather than invokeMethod() - same reason as in + // incoming_video_packet(): remotevideo's thread is blocked inside Play(). + remotevideo->setDisplaySize(area); +} + #ifdef HAVE_VAAPI void AudioVideoCallController::video_rendering_failed() { |
