|
@@ -196,12 +196,13 @@ void CameraFeed::set_rgb_image(const Ref<Image> &p_rgb_img) {
|
|
|
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_rgb_img);
|
|
|
RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
|
|
|
|
|
|
- emit_signal(SNAME("format_changed"));
|
|
|
+ emit_signal(format_changed_signal_name);
|
|
|
} else {
|
|
|
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_RGBA_IMAGE], p_rgb_img);
|
|
|
}
|
|
|
|
|
|
datatype = CameraFeed::FEED_RGB;
|
|
|
+ emit_signal(frame_changed_signal_name);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -219,12 +220,13 @@ void CameraFeed::set_ycbcr_image(const Ref<Image> &p_ycbcr_img) {
|
|
|
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_ycbcr_img);
|
|
|
RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_RGBA_IMAGE], new_texture);
|
|
|
|
|
|
- emit_signal(SNAME("format_changed"));
|
|
|
+ emit_signal(format_changed_signal_name);
|
|
|
} else {
|
|
|
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_RGBA_IMAGE], p_ycbcr_img);
|
|
|
}
|
|
|
|
|
|
datatype = CameraFeed::FEED_YCBCR;
|
|
|
+ emit_signal(frame_changed_signal_name);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -252,13 +254,14 @@ void CameraFeed::set_ycbcr_images(const Ref<Image> &p_y_img, const Ref<Image> &p
|
|
|
RenderingServer::get_singleton()->texture_replace(texture[CameraServer::FEED_CBCR_IMAGE], new_texture);
|
|
|
}
|
|
|
|
|
|
- emit_signal(SNAME("format_changed"));
|
|
|
+ emit_signal(format_changed_signal_name);
|
|
|
} else {
|
|
|
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_Y_IMAGE], p_y_img);
|
|
|
RenderingServer::get_singleton()->texture_2d_update(texture[CameraServer::FEED_CBCR_IMAGE], p_cbcr_img);
|
|
|
}
|
|
|
|
|
|
datatype = CameraFeed::FEED_YCBCR_SEP;
|
|
|
+ emit_signal(frame_changed_signal_name);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -273,6 +276,7 @@ void CameraFeed::set_external(int p_width, int p_height) {
|
|
|
}
|
|
|
|
|
|
datatype = CameraFeed::FEED_EXTERNAL;
|
|
|
+ emit_signal(frame_changed_signal_name);
|
|
|
}
|
|
|
|
|
|
bool CameraFeed::activate_feed() {
|