--- motion-3.2.11-reference/motion.h 2008-09-22 00:20:58.000000000 +0100 +++ motion-3.2.11/motion.h 2008-12-04 11:42:14.000000000 +0000 @@ -144,6 +144,8 @@ #define DEF_MAXSTREAMS 10 /* Maximum number of webcam clients per camera */ #define DEF_MAXWEBQUEUE 10 /* Maximum number of webcam client in queue */ +#define FRIENDLY_NAME_MAX 20 /* Maximum length of friendly name string */ + #define DEF_TIMESTAMP "%Y-%m-%d\\n%T" #define DEF_EVENTSTAMP "%Y%m%d%H%M%S" @@ -336,6 +338,7 @@ int event_nr; int prev_event; int lightswitch_framecounter; + char name[FRIENDLY_NAME_MAX]; /* Friendly name of camera */ char text_event_string[PATH_MAX]; /* The text for conv. spec. %C - we assume PATH_MAX normally 4096 characters is fine */ int postcap; /* downcounter, frames left to to send post event */ --- motion-3.2.11-reference/motion.c 2008-12-03 10:25:05.000000000 +0000 +++ motion-3.2.11/motion.c 2008-12-04 14:48:49.000000000 +0000 @@ -2669,6 +2669,12 @@ sprintf(tempstr, "%d",(int)(unsigned long) pthread_getspecific(tls_key_threadnr)); break; + case 'e': // friendly name + if (cnt->name && cnt->name[0]) + snprintf(tempstr, FRIENDLY_NAME_MAX, "%s", cnt->name); + else + ++pos_userformat; + break; case 'C': // text_event if (cnt->text_event_string && cnt->text_event_string[0]) snprintf(tempstr, PATH_MAX, "%s", cnt->text_event_string); --- motion-3.2.11-reference/conf.h 2008-09-22 00:20:58.000000000 +0100 +++ motion-3.2.11/conf.h 2008-12-04 11:26:17.000000000 +0000 @@ -103,6 +103,7 @@ char *on_movie_end; char *on_camera_lost; const char *motionvidpipe; + const char *name; const char *netcam_url; const char *netcam_userpass; const char *netcam_http; --- motion-3.2.11-reference/conf.c 2008-09-22 00:20:58.000000000 +0100 +++ motion-3.2.11/conf.c 2008-12-04 11:24:15.000000000 +0000 @@ -128,6 +128,7 @@ on_movie_end: NULL, on_camera_lost: NULL, motionvidpipe: NULL, + name: "", netcam_url: NULL, netcam_userpass: NULL, netcam_http: "1.0", /* Choices: 1.0, 1.1, or keep_alive */ @@ -319,6 +320,15 @@ print_int }, { + "name", + "# Friendly name for the camera. Can be inserted onto the image using an conversion specifier.\n" + "# Must be a text string. Default: Not defined", + 0, + CONF_OFFSET(name), + copy_string, + print_string + }, + { "netcam_url", "# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// or file:///)\n" "# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined",