Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions src/core/CameraSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,15 @@ void CameraSurface::onVideoFrameChanged(const QVideoFrame& frame)
if (img.isNull())
return;

#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
// Qt 6 delivers upright, top-left-origin frames here — the same as the
// video-file path (VideoPlayerImpl), which shares the OpenGL upload — so no
// flip is needed. The old flip made macOS camera sources appear upside-down.
// Qt 6 delivers upright, top-left-origin frames here on every platform —
// the same as the video-file path (VideoPlayerImpl), which shares the
// OpenGL upload — so no flip is needed. The old flip (a historical OpenGL
// orientation workaround, mirror + 180-degree rotation, net a vertical
// flip) made camera sources appear upside-down; already removed on
// macOS/Windows in f1e51b4, confirmed to be the same bug on Linux by
// injecting a synthetic top-red/bottom-blue QVideoFrame directly into this
// class and observing the flip.
_temporaryImage = img;
#else
// Linux: historical orientation fix (kept; adjust if cameras look flipped).
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
_temporaryImage = img.mirrored(true, false).transformed(QTransform().rotate(180));
QT_WARNING_POP
#endif
}

}
Loading