Skip to content
Snippets Groups Projects
Commit dad5e42c authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Sébastien Blin
Browse files

swarmcalls: avoid grayscale video in macos

Change-Id: I5283d3a0459e031baa7eb0b1d481333aa683c79b
parent bbf8cca2
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,7 @@ tools/.vscode/ ...@@ -104,6 +104,7 @@ tools/.vscode/
# Mac # Mac
.DS_Store .DS_Store
build-macos*
# Android # Android
/build-android-*/ /build-android-*/
......
...@@ -5,3 +5,4 @@ x86_64-* ...@@ -5,3 +5,4 @@ x86_64-*
arm* arm*
aarch64* aarch64*
i686* i686*
apple*
...@@ -469,6 +469,15 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source, ...@@ -469,6 +469,15 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source,
} else { } else {
cell_width = width_ / zoom; cell_width = width_ / zoom;
cell_height = height_ / 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 (currentLayout_ == Layout::ONE_BIG_WITH_SMALL) {
if (index == 0) { if (index == 0) {
...@@ -487,6 +496,11 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source, ...@@ -487,6 +496,11 @@ VideoMixer::calc_position(std::unique_ptr<VideoMixerSource>& source,
cellW_off += (width_ - (n % zoom) * cell_width) / 2; cellW_off += (width_ - (n % zoom) * cell_width) / 2;
} }
cellH_off = (index / zoom) * cell_height; cellH_off = (index / zoom) * cell_height;
if (n == 1) {
// Centerize (cellwidth = width_ - 16)
cellW_off += 8;
cellH_off += 8;
}
} }
// Compute frame size/position // Compute frame size/position
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment