mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
swarmcalls: avoid grayscale video in macos
Change-Id: I5283d3a0459e031baa7eb0b1d481333aa683c79b
This commit is contained in:

committed by
Sébastien Blin

parent
bbf8cca24f
commit
dad5e42cf8
1
.gitignore
vendored
1
.gitignore
vendored
@ -104,6 +104,7 @@ tools/.vscode/
|
||||
|
||||
# Mac
|
||||
.DS_Store
|
||||
build-macos*
|
||||
|
||||
# Android
|
||||
/build-android-*/
|
||||
|
1
contrib/.gitignore
vendored
1
contrib/.gitignore
vendored
@ -5,3 +5,4 @@ x86_64-*
|
||||
arm*
|
||||
aarch64*
|
||||
i686*
|
||||
apple*
|
||||
|
@ -469,6 +469,15 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source,
|
||||
} else {
|
||||
cell_width = width_ / zoom;
|
||||
cell_height = height_ / zoom;
|
||||
|
||||
if (n == 1) {
|
||||
// On some platforms (at least macOS/android) - Having one frame at the same
|
||||
// size of the mixer cause it to be grey.
|
||||
// Removing some pixels solve this. We use 16 because it's a multiple of 8
|
||||
// (value that we prefer for video management)
|
||||
cell_width -= 16;
|
||||
cell_height -= 16;
|
||||
}
|
||||
}
|
||||
if (currentLayout_ == Layout::ONE_BIG_WITH_SMALL) {
|
||||
if (index == 0) {
|
||||
@ -487,6 +496,11 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source,
|
||||
cellW_off += (width_ - (n % zoom) * cell_width) / 2;
|
||||
}
|
||||
cellH_off = (index / zoom) * cell_height;
|
||||
if (n == 1) {
|
||||
// Centerize (cellwidth = width_ - 16)
|
||||
cellW_off += 8;
|
||||
cellH_off += 8;
|
||||
}
|
||||
}
|
||||
|
||||
// Compute frame size/position
|
||||
|
Reference in New Issue
Block a user