mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-18 21:29:09 +08:00
[test]
This commit is contained in:
@@ -22,9 +22,14 @@
|
|||||||
#include "display_info.h"
|
#include "display_info.h"
|
||||||
#include "rd_log.h"
|
#include "rd_log.h"
|
||||||
|
|
||||||
using namespace crossdesk;
|
|
||||||
class ScreenCapturerSckImpl;
|
class ScreenCapturerSckImpl;
|
||||||
|
|
||||||
|
namespace crossdesk {
|
||||||
|
std::unique_ptr<ScreenCapturer> ScreenCapturerSck::CreateScreenCapturerSck() {
|
||||||
|
return std::make_unique<ScreenCapturerSckImpl>();
|
||||||
|
}
|
||||||
|
} // namespace crossdesk
|
||||||
|
|
||||||
static const int kFullDesktopScreenId = -1;
|
static const int kFullDesktopScreenId = -1;
|
||||||
|
|
||||||
// The ScreenCaptureKit API was available in macOS 12.3, but full-screen capture
|
// The ScreenCaptureKit API was available in macOS 12.3, but full-screen capture
|
||||||
@@ -173,8 +178,6 @@ std::string GetDisplayName(CGDirectDisplayID display_id) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace crossdesk {
|
|
||||||
|
|
||||||
ScreenCapturerSckImpl::ScreenCapturerSckImpl() {
|
ScreenCapturerSckImpl::ScreenCapturerSckImpl() {
|
||||||
helper_ = [[SckHelper alloc] initWithCapturer:this];
|
helper_ = [[SckHelper alloc] initWithCapturer:this];
|
||||||
}
|
}
|
||||||
@@ -428,11 +431,6 @@ void ScreenCapturerSckImpl::StartOrReconfigureCapturer() {
|
|||||||
[SCShareableContent getShareableContentWithCompletionHandler:handler];
|
[SCShareableContent getShareableContentWithCompletionHandler:handler];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<ScreenCapturer> ScreenCapturerSck::CreateScreenCapturerSck() {
|
|
||||||
return std::make_unique<ScreenCapturerSckImpl>();
|
|
||||||
}
|
|
||||||
} // namespace crossdesk
|
|
||||||
|
|
||||||
@implementation SckHelper {
|
@implementation SckHelper {
|
||||||
// This lock is to prevent the capturer being destroyed while an instance
|
// This lock is to prevent the capturer being destroyed while an instance
|
||||||
// method is still running on another thread.
|
// method is still running on another thread.
|
||||||
|
|||||||
Reference in New Issue
Block a user