diff --git a/doc/motionplus_config.html b/doc/motionplus_config.html
index 03665964..70a80227 100644
--- a/doc/motionplus_config.html
+++ b/doc/motionplus_config.html
@@ -112,7 +112,7 @@
target_dir |
- | camera_name |
+ device_name |
device_id |
camera |
camera_dir |
@@ -619,7 +619,7 @@
| %$ |
- camera name |
+ device name |
%{fps} |
current frames per second |
%{host} |
@@ -697,10 +697,10 @@
- camera_name
+ device_name
- Values: String | Default: Not defined
- The camera name to be used in the format specifiers and web interface.
+ The device name to be used in the format specifiers and web interface.
diff --git a/man/motionplus.1 b/man/motionplus.1
index 330b6de4..457e41a3 100644
--- a/man/motionplus.1
+++ b/man/motionplus.1
@@ -154,7 +154,7 @@ Use this option to enable native language on the webcontrol and log message. Sp
.RE
.TP
-.B camera_name
+.B device_name
.RS
.nf
Values: User specified string
@@ -162,7 +162,7 @@ Default: Not Defined
Description:
.fi
.RS
-User specified string to describe the camera.
+User specified string to describe the device.
.RE
.RE
diff --git a/src/alg_sec.cpp b/src/alg_sec.cpp
index 29894156..15904f7c 100644
--- a/src/alg_sec.cpp
+++ b/src/alg_sec.cpp
@@ -669,12 +669,12 @@ void algsec_init(ctx_dev *cam)
cam->algsec_inuse = false;
#ifdef HAVE_OPENCV
- mythreadname_set("cv",cam->threadnr,cam->conf->camera_name.c_str());
+ mythreadname_set("cv",cam->threadnr,cam->conf->device_name.c_str());
cam->algsec = new ctx_algsec;
algsec_load_params(cam);
algsec_load_models(cam);
algsec_start_handler(cam);
- mythreadname_set("ml",cam->threadnr,cam->conf->camera_name.c_str());
+ mythreadname_set("ml",cam->threadnr,cam->conf->device_name.c_str());
#endif
}
diff --git a/src/conf.cpp b/src/conf.cpp
index db3f3aff..bb5bcd89 100644
--- a/src/conf.cpp
+++ b/src/conf.cpp
@@ -46,7 +46,7 @@ ctx_parm config_parms[] = {
{"log_type", PARM_TYP_LIST, PARM_CAT_00, WEBUI_LEVEL_LIMITED },
{"native_language", PARM_TYP_BOOL, PARM_CAT_00, WEBUI_LEVEL_LIMITED },
- {"camera_name", PARM_TYP_STRING, PARM_CAT_01, WEBUI_LEVEL_LIMITED },
+ {"device_name", PARM_TYP_STRING, PARM_CAT_01, WEBUI_LEVEL_LIMITED },
{"device_id", PARM_TYP_INT, PARM_CAT_01, WEBUI_LEVEL_LIMITED },
{"camera_tmo", PARM_TYP_INT, PARM_CAT_01, WEBUI_LEVEL_LIMITED },
{"target_dir", PARM_TYP_STRING, PARM_CAT_01, WEBUI_LEVEL_ADVANCED },
@@ -409,6 +409,13 @@ ctx_parm_depr config_parms_depr[] = {
"\"camera_id\" replaced with \"device_id\"",
"device_id"
},
+ {
+ "camera_name",
+ "0.0.1",
+ "\"camera_name\" replaced with \"device_name\"",
+ "device_name"
+ },
+
{ "","","",""}
};
@@ -577,17 +584,17 @@ static void conf_edit_camera(ctx_config *conf, std::string &parm, enum PARM_ACT
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera",_("camera"));
}
-static void conf_edit_camera_name(ctx_config *conf, std::string &parm, enum PARM_ACT pact)
+static void conf_edit_device_name(ctx_config *conf, std::string &parm, enum PARM_ACT pact)
{
if (pact == PARM_ACT_DFLT) {
- conf->camera_name= "";
+ conf->device_name= "";
} else if (pact == PARM_ACT_SET) {
- conf->camera_name = parm;
+ conf->device_name = parm;
} else if (pact == PARM_ACT_GET) {
- parm = conf->camera_name;
+ parm = conf->device_name;
}
return;
- MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera_name",_("camera_name"));
+ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","device_name",_("device_name"));
}
static void conf_edit_device_id(ctx_config *conf, std::string &parm, enum PARM_ACT pact)
@@ -2834,7 +2841,7 @@ static void conf_edit_cat01(ctx_config *conf, std::string parm_nm
{
if (parm_nm == "camera_dir") { conf_edit_camera_dir(conf, parm_val, pact);
} else if (parm_nm == "camera") { conf_edit_camera(conf, parm_val, pact);
- } else if (parm_nm == "camera_name") { conf_edit_camera_name(conf, parm_val, pact);
+ } else if (parm_nm == "device_name") { conf_edit_device_name(conf, parm_val, pact);
} else if (parm_nm == "device_id") { conf_edit_device_id(conf, parm_val, pact);
} else if (parm_nm == "camera_tmo") { conf_edit_camera_tmo(conf, parm_val, pact);
} else if (parm_nm == "target_dir") { conf_edit_target_dir(conf, parm_val, pact);
diff --git a/src/conf.hpp b/src/conf.hpp
index 46e7f4e6..ad011cbf 100644
--- a/src/conf.hpp
+++ b/src/conf.hpp
@@ -37,7 +37,7 @@
bool setup_mode;
bool native_language;
- std::string camera_name;
+ std::string device_name;
int device_id;
std::string camera_dir;
std::string target_dir;
diff --git a/src/motion_loop.cpp b/src/motion_loop.cpp
index 353ab43b..823cbb81 100644
--- a/src/motion_loop.cpp
+++ b/src/motion_loop.cpp
@@ -1429,7 +1429,7 @@ void *motion_loop(void *arg)
cam->motapp->threads_running++;
pthread_mutex_unlock(&cam->motapp->global_lock);
- mythreadname_set("ml",cam->threadnr,cam->conf->camera_name.c_str());
+ mythreadname_set("ml",cam->threadnr,cam->conf->device_name.c_str());
pthread_setspecific(tls_key_threadnr, (void *)((unsigned long)cam->threadnr));
cam->finish_dev = false;
diff --git a/src/motionplus.cpp b/src/motionplus.cpp
index 68062989..f51002da 100644
--- a/src/motionplus.cpp
+++ b/src/motionplus.cpp
@@ -656,7 +656,7 @@ static void motion_cam_delete(ctx_motapp *motapp)
cam = motapp->cam_list[motapp->cam_delete];
MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO, _("Stopping %s device_id %d")
- , cam->conf->camera_name.c_str(), cam->device_id);
+ , cam->conf->device_name.c_str(), cam->device_id);
cam->restart_dev = false;
cam->finish_dev = true;
diff --git a/src/netcam.cpp b/src/netcam.cpp
index af4158a9..ca09d789 100644
--- a/src/netcam.cpp
+++ b/src/netcam.cpp
@@ -1526,7 +1526,7 @@ static void netcam_set_parms (ctx_dev *cam, ctx_netcam *netcam )
,_("%s: Setting up camera."),netcam->cameratype);
netcam->status = NETCAM_NOTCONNECTED;
- cam->conf->camera_name.copy(netcam->camera_name,PATH_MAX);
+ cam->conf->device_name.copy(netcam->camera_name,PATH_MAX);
mycheck_passthrough(cam);
util_parms_add_default(netcam->params,"decoder","NULL");
netcam->img_recv =(netcam_buff_ptr) mymalloc(sizeof(netcam_buff));
diff --git a/src/util.cpp b/src/util.cpp
index 8c03f8d3..631b7a27 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -502,8 +502,8 @@ size_t mystrftime(ctx_dev *cam, char *s, size_t max, const char *userformat,
break;
case '$': // thread name
- if (cam->conf->camera_name != "") {
- cam->conf->camera_name.copy(tempstr, PATH_MAX);
+ if (cam->conf->device_name != "") {
+ cam->conf->device_name.copy(tempstr, PATH_MAX);
} else {
++pos_userformat;
}
diff --git a/src/webu_json.cpp b/src/webu_json.cpp
index 544f3dc2..fe6c15d2 100644
--- a/src/webu_json.cpp
+++ b/src/webu_json.cpp
@@ -191,10 +191,10 @@ static void webu_json_config_cam_list(ctx_webui *webui)
cam = webui->motapp->cam_list[indx_cam];
strid =std::to_string(cam->device_id);
webui->resp_page += ",\"" + std::to_string(indx_cam) + "\":";
- if (cam->conf->camera_name == "") {
+ if (cam->conf->device_name == "") {
webui->resp_page += "{\"name\": \"camera " + strid + "\"";
} else {
- webui->resp_page += "{\"name\": \"" + cam->conf->camera_name + "\"";
+ webui->resp_page += "{\"name\": \"" + cam->conf->device_name + "\"";
}
webui->resp_page += ",\"id\": " + strid;
webui->resp_page += ",\"url\": \"" + webui->hostfull + "/" + strid + "/\"} ";
@@ -377,7 +377,7 @@ static void webu_json_status_vars(ctx_webui *webui, int indx_cam)
webui->resp_page += "{";
- webui->resp_page += "\"name\":\"" + cam->conf->camera_name+"\"";
+ webui->resp_page += "\"name\":\"" + cam->conf->device_name+"\"";
webui->resp_page += ",\"id\":" + std::to_string(cam->device_id);
webui->resp_page += ",\"width\":" + std::to_string(cam->imgs.width);
webui->resp_page += ",\"height\":" + std::to_string(cam->imgs.height);