mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix compile error on MacOSx
This commit is contained in:
@@ -42,9 +42,9 @@ int ScreenCapturerSck::Start() {
|
||||
|
||||
int ScreenCapturerSck::Stop() { return 0; }
|
||||
|
||||
int ScreenCapturerSck::Pause() { return 0; }
|
||||
int ScreenCapturerSck::Pause(int monitor_index) { return 0; }
|
||||
|
||||
int ScreenCapturerSck::Resume() { return 0; }
|
||||
int ScreenCapturerSck::Resume(int monitor_index) { return 0; }
|
||||
|
||||
void ScreenCapturerSck::OnFrame() {}
|
||||
|
||||
|
||||
@@ -27,9 +27,13 @@ class ScreenCapturerSck : public ScreenCapturer {
|
||||
virtual int Start() override;
|
||||
virtual int Stop() override;
|
||||
|
||||
int Pause();
|
||||
int Pause(int monitor_index) override;
|
||||
|
||||
int Resume();
|
||||
int Resume(int monitor_index) override;
|
||||
|
||||
int SwitchTo(int monitor_index) override { return 0; }
|
||||
|
||||
std::vector<DisplayInfo> GetDisplayInfoList() override { return {}; }
|
||||
|
||||
void OnFrame();
|
||||
|
||||
|
||||
@@ -56,6 +56,14 @@ public:
|
||||
|
||||
virtual int Stop() { return 0; }
|
||||
|
||||
virtual int Pause(int monitor_index) { return 0; }
|
||||
|
||||
virtual int Resume(int monitor_index) { return 0; }
|
||||
|
||||
virtual int SwitchTo(int monitor_index) { return 0; }
|
||||
|
||||
virtual std::vector<DisplayInfo> GetDisplayInfoList() { return {}; }
|
||||
|
||||
private:
|
||||
SckHelper *__strong helper_;
|
||||
SCStream *__strong stream_;
|
||||
@@ -246,7 +254,7 @@ void ScreenCapturerSckImpl::OnNewIOSurface(IOSurfaceRef io_surface,
|
||||
nv12_frame_ =
|
||||
static_cast<unsigned char *>(IOSurfaceGetBaseAddress(io_surface));
|
||||
|
||||
_on_data(nv12_frame_, width * height * 3 / 2, width, height);
|
||||
_on_data(nv12_frame_, width * height * 3 / 2, width, height, 0);
|
||||
|
||||
IOSurfaceUnlock(io_surface, kIOSurfaceLockReadOnly, &aseed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user