mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@8004c7524f
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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...
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user