mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-25 01:46:41 +08:00
[feat] display switch supported on MacOSx platform
This commit is contained in:
@@ -3,12 +3,7 @@
|
||||
#include "rd_log.h"
|
||||
|
||||
ScreenCapturerSck::ScreenCapturerSck() {}
|
||||
ScreenCapturerSck::~ScreenCapturerSck() {
|
||||
// if (inited_ && capture_thread_.joinable()) {
|
||||
// capture_thread_.join();
|
||||
// inited_ = false;
|
||||
// }
|
||||
}
|
||||
ScreenCapturerSck::~ScreenCapturerSck() {}
|
||||
|
||||
int ScreenCapturerSck::Init(const int fps, cb_desktop_data cb) {
|
||||
if (cb) {
|
||||
@@ -27,15 +22,7 @@ int ScreenCapturerSck::Init(const int fps, cb_desktop_data cb) {
|
||||
int ScreenCapturerSck::Destroy() { return 0; }
|
||||
|
||||
int ScreenCapturerSck::Start() {
|
||||
// if (running_) {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
// running_ = true;
|
||||
// capture_thread_ = std::thread([this]() {
|
||||
// while (running_) {
|
||||
// }
|
||||
// });
|
||||
screen_capturer_sck_impl_->Start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -46,6 +33,22 @@ int ScreenCapturerSck::Pause(int monitor_index) { return 0; }
|
||||
|
||||
int ScreenCapturerSck::Resume(int monitor_index) { return 0; }
|
||||
|
||||
int ScreenCapturerSck::SwitchTo(int monitor_index) {
|
||||
if (screen_capturer_sck_impl_) {
|
||||
return screen_capturer_sck_impl_->SwitchTo(monitor_index);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<DisplayInfo> ScreenCapturerSck::GetDisplayInfoList() {
|
||||
if (screen_capturer_sck_impl_) {
|
||||
return screen_capturer_sck_impl_->GetDisplayInfoList();
|
||||
}
|
||||
|
||||
return std::vector<DisplayInfo>();
|
||||
}
|
||||
|
||||
void ScreenCapturerSck::OnFrame() {}
|
||||
|
||||
void ScreenCapturerSck::CleanUp() {}
|
||||
Reference in New Issue
Block a user