This commit is contained in:
Spartan322
2024-10-30 05:22:24 -04:00
576 changed files with 17981 additions and 13290 deletions

View File

@@ -163,7 +163,7 @@ bool CameraLinux::_can_query_format(int p_file_descriptor, int p_type) {
CameraLinux::CameraLinux() {
camera_thread.start(CameraLinux::camera_thread_func, this);
};
}
CameraLinux::~CameraLinux() {
exit_flag.set();

View File

@@ -214,12 +214,12 @@ public:
AVCaptureDevice *CameraFeedMacOS::get_device() const {
return device;
};
}
CameraFeedMacOS::CameraFeedMacOS() {
device = nullptr;
capture_session = nullptr;
};
}
void CameraFeedMacOS::set_device(AVCaptureDevice *p_device) {
device = p_device;
@@ -233,7 +233,7 @@ void CameraFeedMacOS::set_device(AVCaptureDevice *p_device) {
} else if ([p_device position] == AVCaptureDevicePositionFront) {
position = CameraFeed::FEED_FRONT;
};
};
}
bool CameraFeedMacOS::activate_feed() {
if (capture_session) {
@@ -259,7 +259,7 @@ bool CameraFeedMacOS::activate_feed() {
};
return true;
};
}
void CameraFeedMacOS::deactivate_feed() {
// end camera capture if we have one
@@ -267,7 +267,7 @@ void CameraFeedMacOS::deactivate_feed() {
[capture_session cleanup];
capture_session = nullptr;
};
};
}
//////////////////////////////////////////////////////////////////////////
// MyDeviceNotifications - This is a little helper class gets notifications
@@ -353,7 +353,7 @@ void CameraMacOS::update_feeds() {
add_feed(newfeed);
};
};
};
}
CameraMacOS::CameraMacOS() {
// Find available cameras we have at this time
@@ -361,4 +361,4 @@ CameraMacOS::CameraMacOS() {
// should only have one of these....
device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
};
}

View File

@@ -66,13 +66,13 @@ CameraFeedWindows::~CameraFeedWindows() {
};
///@TODO free up anything used by this
};
}
bool CameraFeedWindows::activate_feed() {
///@TODO this should activate our camera and start the process of capturing frames
return true;
};
}
///@TODO we should probably have a callback method here that is being called by the
// camera API which provides frames and call back into the CameraServer to update our texture
@@ -93,4 +93,4 @@ CameraWindows::CameraWindows() {
add_active_cameras();
// need to add something that will react to devices being connected/removed...
};
}