diff --git a/src/screen_capturer/linux/screen_capturer_x11.h b/src/screen_capturer/linux/screen_capturer_x11.h index fd9634e..bf5b137 100644 --- a/src/screen_capturer/linux/screen_capturer_x11.h +++ b/src/screen_capturer/linux/screen_capturer_x11.h @@ -52,7 +52,7 @@ class ScreenCapturerX11 : public ScreenCapturer { std::atomic running_{false}; std::atomic paused_{false}; std::atomic monitor_index_{0}; - int fps_ = 30; + int fps_ = 60; cb_desktop_data callback_; std::vector display_info_list_; diff --git a/src/screen_capturer/macosx/screen_capturer_sck_impl.mm b/src/screen_capturer/macosx/screen_capturer_sck_impl.mm index 15b1500..d050f4d 100644 --- a/src/screen_capturer/macosx/screen_capturer_sck_impl.mm +++ b/src/screen_capturer/macosx/screen_capturer_sck_impl.mm @@ -76,7 +76,7 @@ class API_AVAILABLE(macos(14.0)) ScreenCapturerSckImpl : public ScreenCapturer { unsigned char *nv12_frame_ = nullptr; int width_ = 0; int height_ = 0; - int fps_ = 30; + int fps_ = 60; public: // Called by SckHelper when shareable content is returned by ScreenCaptureKit. `content` will be diff --git a/src/screen_capturer/windows/screen_capturer_wgc.h b/src/screen_capturer/windows/screen_capturer_wgc.h index d70d1c3..73a5228 100644 --- a/src/screen_capturer/windows/screen_capturer_wgc.h +++ b/src/screen_capturer/windows/screen_capturer_wgc.h @@ -32,7 +32,7 @@ class ScreenCapturerWgc : public ScreenCapturer, int SwitchTo(int monitor_index); - void OnFrame(const WgcSession::wgc_session_frame &frame, int id); + void OnFrame(const WgcSession::wgc_session_frame& frame, int id); protected: void CleanUp(); @@ -57,12 +57,12 @@ class ScreenCapturerWgc : public ScreenCapturer, std::atomic_bool running_; std::atomic_bool inited_; - int fps_; + int fps_ = 60; cb_desktop_data on_data_ = nullptr; - unsigned char *nv12_frame_ = nullptr; - unsigned char *nv12_frame_scaled_ = nullptr; + unsigned char* nv12_frame_ = nullptr; + unsigned char* nv12_frame_scaled_ = nullptr; }; #endif \ No newline at end of file diff --git a/src/single_window/render.cpp b/src/single_window/render.cpp index 38b81dc..ae0594e 100644 --- a/src/single_window/render.cpp +++ b/src/single_window/render.cpp @@ -330,7 +330,7 @@ int Render::ScreenCapturerInit() { std::chrono::steady_clock::now().time_since_epoch()) .count(); auto duration = now_time - last_frame_time_; - if (duration >= 33) { + if (duration >= 16) { // ~60 FPS XVideoFrame frame; frame.data = (const char*)data; frame.size = size; diff --git a/thirdparty/minirtc b/thirdparty/minirtc index 239773b..32359c0 160000 --- a/thirdparty/minirtc +++ b/thirdparty/minirtc @@ -1 +1 @@ -Subproject commit 239773b87d47e4c4a2a26b98c4a96f0cb770a7d8 +Subproject commit 32359c08172876c37e616350b0f6ee225e297381