diff --git a/.gitignore b/.gitignore index 75c13a86ec0289065a07694d2e1928bfb84519a6..08d7b179754ea92b9f3e8ebea457e974a2e21c3d 100644 --- a/.gitignore +++ b/.gitignore @@ -104,6 +104,7 @@ tools/.vscode/ # Mac .DS_Store +build-macos* # Android /build-android-*/ diff --git a/contrib/.gitignore b/contrib/.gitignore index ed60462eac21835a69347e0cf45cee10d1071b2d..bcbe1829497e2b5ac357b21ef60fd22fff1773ca 100644 --- a/contrib/.gitignore +++ b/contrib/.gitignore @@ -5,3 +5,4 @@ x86_64-* arm* aarch64* i686* +apple* diff --git a/src/media/video/video_mixer.cpp b/src/media/video/video_mixer.cpp index 26629ecc33509b95c1aabe6d75f03240342a9558..33025aa39f65a97737937862a71f36bd61f41930 100644 --- a/src/media/video/video_mixer.cpp +++ b/src/media/video/video_mixer.cpp @@ -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