mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Fix compile error
This commit is contained in:
@@ -743,9 +743,6 @@ int main() {
|
|||||||
mouse_controller = (MouseController *)device_controller_factory->Create(
|
mouse_controller = (MouseController *)device_controller_factory->Create(
|
||||||
DeviceControllerFactory::Device::Mouse);
|
DeviceControllerFactory::Device::Mouse);
|
||||||
mouse_controller->Init(screen_w, screen_h);
|
mouse_controller->Init(screen_w, screen_h);
|
||||||
|
|
||||||
screen_capture = new ScreenCaptureAvf();
|
|
||||||
|
|
||||||
last_frame_time_ = std::chrono::high_resolution_clock::now();
|
last_frame_time_ = std::chrono::high_resolution_clock::now();
|
||||||
screen_capture->Init(
|
screen_capture->Init(
|
||||||
rect, 60,
|
rect, 60,
|
||||||
@@ -756,11 +753,20 @@ int main() {
|
|||||||
auto tc = duration.count() * 1000;
|
auto tc = duration.count() * 1000;
|
||||||
|
|
||||||
if (tc >= 0) {
|
if (tc >= 0) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
BGRAToNV12FFmpeg(data, width, height,
|
||||||
|
(unsigned char *)nv12_buffer);
|
||||||
|
SendData(peer_server, DATA_TYPE::VIDEO, (const char *)nv12_buffer,
|
||||||
|
NV12_BUFFER_SIZE);
|
||||||
|
#else
|
||||||
SendData(peer_server, DATA_TYPE::VIDEO, (const char *)data,
|
SendData(peer_server, DATA_TYPE::VIDEO, (const char *)data,
|
||||||
NV12_BUFFER_SIZE);
|
NV12_BUFFER_SIZE);
|
||||||
last_frame_time_ = now_time;
|
last_frame_time_ = now_time;
|
||||||
|
#endif
|
||||||
|
last_frame_time_ = now_time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
screen_capture->Start();
|
screen_capture->Start();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user