From 6f27d8e117ff4cfc636f028d252f39e947c6931b Mon Sep 17 00:00:00 2001 From: Ihor Ivlev Date: Mon, 18 Nov 2024 23:08:03 +0100 Subject: [PATCH] Increase UDP buffer size - attempting to fix microfreezes (#22) --- app/videonative/src/main/cpp/VideoPlayer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/videonative/src/main/cpp/VideoPlayer.h b/app/videonative/src/main/cpp/VideoPlayer.h index b8f466c..2b87844 100644 --- a/app/videonative/src/main/cpp/VideoPlayer.h +++ b/app/videonative/src/main/cpp/VideoPlayer.h @@ -56,9 +56,9 @@ class VideoPlayer { private: void onNewNALU(const NALU &nalu); - //Assumptions: Max bitrate: 40 MBit/s, Max time to buffer: 100ms - //5 MB should be plenty ! - static constexpr const size_t WANTED_UDP_RCVBUF_SIZE = 1024 * 1024 * 5; + //Assumptions: Max bitrate: 40 MBit/s, Max time to buffer: 500ms + //25 MB should be plenty ! + static constexpr const size_t WANTED_UDP_RCVBUF_SIZE = 1024 * 1024 * 25; // Retrieve settings from shared preferences enum SOURCE_TYPE_OPTIONS { UDP, FILE, ASSETS, VIA_FFMPEG_URL, EXTERNAL