feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -113,7 +113,7 @@ void CameraLinux::_add_device(const String &p_device_name) {
|
|||
int CameraLinux::_open_device(const String &p_device_name) {
|
||||
struct stat s;
|
||||
|
||||
if (stat(p_device_name.ascii(), &s) == -1) {
|
||||
if (stat(p_device_name.ascii().get_data(), &s) == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ int CameraLinux::_open_device(const String &p_device_name) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
return open(p_device_name.ascii(), O_RDWR | O_NONBLOCK, 0);
|
||||
return open(p_device_name.ascii().get_data(), O_RDWR | O_NONBLOCK, 0);
|
||||
}
|
||||
|
||||
// TODO any cheaper/cleaner way to check if file descriptor is invalid?
|
||||
|
|
@ -162,11 +162,25 @@ bool CameraLinux::_can_query_format(int p_file_descriptor, int p_type) {
|
|||
return ioctl(p_file_descriptor, VIDIOC_G_FMT, &format) != -1;
|
||||
}
|
||||
|
||||
CameraLinux::CameraLinux() {
|
||||
camera_thread.start(CameraLinux::camera_thread_func, this);
|
||||
inline void CameraLinux::set_monitoring_feeds(bool p_monitoring_feeds) {
|
||||
if (p_monitoring_feeds == monitoring_feeds) {
|
||||
return;
|
||||
}
|
||||
|
||||
CameraServer::set_monitoring_feeds(p_monitoring_feeds);
|
||||
if (p_monitoring_feeds) {
|
||||
camera_thread.start(CameraLinux::camera_thread_func, this);
|
||||
} else {
|
||||
exit_flag.set();
|
||||
if (camera_thread.is_started()) {
|
||||
camera_thread.wait_to_finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CameraLinux::~CameraLinux() {
|
||||
exit_flag.set();
|
||||
camera_thread.wait_to_finish();
|
||||
if (camera_thread.is_started()) {
|
||||
camera_thread.wait_to_finish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue