feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -31,7 +31,7 @@
///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimize code duplication!!!!
// If you fix something here, make sure you fix it there as well!
#include "camera_macos.h"
#import "camera_macos.h"
#include "servers/camera/camera_feed.h"
@ -195,6 +195,8 @@
// CameraFeedMacOS - Subclass for camera feeds in macOS
class CameraFeedMacOS : public CameraFeed {
GDSOFTCLASS(CameraFeedMacOS, CameraFeed);
private:
AVCaptureDevice *device;
MyCaptureSession *capture_session;
@ -206,8 +208,8 @@ public:
void set_device(AVCaptureDevice *p_device);
bool activate_feed();
void deactivate_feed();
bool activate_feed() override;
void deactivate_feed() override;
};
AVCaptureDevice *CameraFeedMacOS::get_device() const {
@ -359,10 +361,20 @@ void CameraMacOS::update_feeds() {
};
}
CameraMacOS::CameraMacOS() {
// Find available cameras we have at this time
update_feeds();
void CameraMacOS::set_monitoring_feeds(bool p_monitoring_feeds) {
if (p_monitoring_feeds == monitoring_feeds) {
return;
}
// should only have one of these....
device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
CameraServer::set_monitoring_feeds(p_monitoring_feeds);
if (p_monitoring_feeds) {
// Find available cameras we have at this time.
update_feeds();
// Get notified on feed changes.
device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
} else {
// Stop monitoring feed changes.
device_notifications = nil;
}
}