[feat] do not capture cursor

This commit is contained in:
dijunkun
2024-09-03 17:00:57 +08:00
parent 1210a0b631
commit c1efe2f4ac
3 changed files with 5 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ int ScreenCapturerX11::Init(const RECORD_DESKTOP_RECT &rect, const int fps,
// grabbing frame rate // grabbing frame rate
av_dict_set(&options_, "framerate", "30", 0); av_dict_set(&options_, "framerate", "30", 0);
// show remote cursor
av_dict_set(&options_, "capture_cursor", "0", 0);
// Make the grabbed area follow the mouse // Make the grabbed area follow the mouse
// av_dict_set(&options_, "follow_mouse", "centered", 0); // av_dict_set(&options_, "follow_mouse", "centered", 0);
// Video frame size. The default is to capture the full screen // Video frame size. The default is to capture the full screen

View File

@@ -32,7 +32,7 @@ int ScreenCapturerAvf::Init(const RECORD_DESKTOP_RECT &rect, const int fps,
av_dict_set(&options_, "framerate", "60", 0); av_dict_set(&options_, "framerate", "60", 0);
av_dict_set(&options_, "pixel_format", "nv12", 0); av_dict_set(&options_, "pixel_format", "nv12", 0);
// show remote cursor // show remote cursor
av_dict_set(&options_, "capture_cursor", "1", 0); av_dict_set(&options_, "capture_cursor", "0", 0);
// Make the grabbed area follow the mouse // Make the grabbed area follow the mouse
// av_dict_set(&options_, "follow_mouse", "centered", 0); // av_dict_set(&options_, "follow_mouse", "centered", 0);
// Video frame size. The default is to capture the full screen // Video frame size. The default is to capture the full screen

View File

@@ -89,6 +89,8 @@ int WgcSessionImpl::Start() {
capture_session_.StartCapture(); capture_session_.StartCapture();
capture_session_.IsCursorCaptureEnabled(false);
error = 0; error = 0;
} catch (winrt::hresult_error) { } catch (winrt::hresult_error) {
std::cout << "AE_WGC_CREATE_CAPTURER_FAILED" << std::endl; std::cout << "AE_WGC_CREATE_CAPTURER_FAILED" << std::endl;