summaryrefslogtreecommitdiff
path: root/servers/camera/camera_feed.cpp
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2019-06-19 22:21:13 +1000
committerBastiaan Olij <mux213@gmail.com>2019-06-19 22:24:54 +1000
commit4ebedb5f11b389c79a28b63f377a922e24734ba6 (patch)
tree857ec9af9e6c7d6a97c0b313de78c68640a52cf7 /servers/camera/camera_feed.cpp
parent7fa941bfd8a1d81fc5c27c21635e60846efc52f4 (diff)
Made constants fully upper case in camera server
Diffstat (limited to 'servers/camera/camera_feed.cpp')
-rw-r--r--servers/camera/camera_feed.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/servers/camera/camera_feed.cpp b/servers/camera/camera_feed.cpp
index 31b8b2874f..094c83cd7c 100644
--- a/servers/camera/camera_feed.cpp
+++ b/servers/camera/camera_feed.cpp
@@ -60,8 +60,8 @@ void CameraFeed::_bind_methods() {
BIND_ENUM_CONSTANT(FEED_NOIMAGE);
BIND_ENUM_CONSTANT(FEED_RGB);
- BIND_ENUM_CONSTANT(FEED_YCbCr);
- BIND_ENUM_CONSTANT(FEED_YCbCr_Sep);
+ BIND_ENUM_CONSTANT(FEED_YCBCR);
+ BIND_ENUM_CONSTANT(FEED_YCBCR_SEP);
BIND_ENUM_CONSTANT(FEED_UNSPECIFIED);
BIND_ENUM_CONSTANT(FEED_FRONT);
@@ -145,7 +145,7 @@ CameraFeed::CameraFeed() {
// create a texture object
VisualServer *vs = VisualServer::get_singleton();
texture[CameraServer::FEED_Y_IMAGE] = vs->texture_create(); // also used for RGBA
- texture[CameraServer::FEED_CbCr_IMAGE] = vs->texture_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = vs->texture_create();
}
CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
@@ -162,14 +162,14 @@ CameraFeed::CameraFeed(String p_name, FeedPosition p_position) {
// create a texture object
VisualServer *vs = VisualServer::get_singleton();
texture[CameraServer::FEED_Y_IMAGE] = vs->texture_create(); // also used for RGBA
- texture[CameraServer::FEED_CbCr_IMAGE] = vs->texture_create();
+ texture[CameraServer::FEED_CBCR_IMAGE] = vs->texture_create();
}
CameraFeed::~CameraFeed() {
// Free our textures
VisualServer *vs = VisualServer::get_singleton();
vs->free(texture[CameraServer::FEED_Y_IMAGE]);
- vs->free(texture[CameraServer::FEED_CbCr_IMAGE]);
+ vs->free(texture[CameraServer::FEED_CBCR_IMAGE]);
}
void CameraFeed::set_RGB_img(Ref<Image> p_rgb_img) {
@@ -208,7 +208,7 @@ void CameraFeed::set_YCbCr_img(Ref<Image> p_ycbcr_img) {
}
vs->texture_set_data(texture[CameraServer::FEED_RGBA_IMAGE], p_ycbcr_img);
- datatype = CameraFeed::FEED_YCbCr;
+ datatype = CameraFeed::FEED_YCBCR;
}
}
@@ -233,12 +233,12 @@ void CameraFeed::set_YCbCr_imgs(Ref<Image> p_y_img, Ref<Image> p_cbcr_img) {
vs->texture_allocate(texture[CameraServer::FEED_Y_IMAGE], new_y_width, new_y_height, 0, Image::FORMAT_R8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
///@TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion
- vs->texture_allocate(texture[CameraServer::FEED_CbCr_IMAGE], new_cbcr_width, new_cbcr_height, 0, Image::FORMAT_RG8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
+ vs->texture_allocate(texture[CameraServer::FEED_CBCR_IMAGE], new_cbcr_width, new_cbcr_height, 0, Image::FORMAT_RG8, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_USED_FOR_STREAMING);
}
vs->texture_set_data(texture[CameraServer::FEED_Y_IMAGE], p_y_img);
- vs->texture_set_data(texture[CameraServer::FEED_CbCr_IMAGE], p_cbcr_img);
- datatype = CameraFeed::FEED_YCbCr_Sep;
+ vs->texture_set_data(texture[CameraServer::FEED_CBCR_IMAGE], p_cbcr_img);
+ datatype = CameraFeed::FEED_YCBCR_SEP;
}
}