Skip to content

Commit

Permalink
Added Exif feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sackmotion committed Feb 21, 2011
1 parent a6b6116 commit e002c0b
Show file tree
Hide file tree
Showing 9 changed files with 361 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Features
* Implemented new logging system
http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionLog (Angel Carpintero)
* Added a macro MOTION_LOG , no need to add __FUNCTION__ anymore. (Angel Carpintero)
* Added EXTIF feature for jpeg images , http://www.lavrsen.dk/foswiki/bin/view/Motion/ExifTaggingPatch (Wim Lewis)

Bugfixes
* Avoid segfault detecting strerror_r() version GNU or SUSv3. (Angel Carpintero)
Expand Down
11 changes: 11 additions & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ struct config conf_template = {
despeckle_filter: NULL,
area_detect: NULL,
minimum_motion_frames: 1,
exif_text: NULL,
pid_file: NULL,
log_file: NULL,
log_level: LEVEL_DEFAULT+10,
Expand Down Expand Up @@ -894,6 +895,16 @@ config_param config_params[] = {
print_bool
},
{
"exif_text",
"# Text to include in a JPEG EXIF comment\n"
"# May be any text, including conversion specifiers.\n"
"# The EXIF timestamp is included independent of this text.",
0,
CONF_OFFSET(exif_text),
copy_string,
print_string
},
{
"target_dir",
"\n############################################################\n"
"# Target Directories and filenames For Images And Films\n"
Expand Down
1 change: 1 addition & 0 deletions conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ struct config {
const char *despeckle_filter;
const char *area_detect;
int minimum_motion_frames;
const char *exif_text;
char *pid_file;
int argc;
char **argv;
Expand Down
5 changes: 5 additions & 0 deletions motion-dist.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ text_event %Y%m%d%H%M%S
text_double off


# Text to include in a JPEG EXIF comment
# May be any text, including conversion specifiers.
# The EXIF timestamp is included independent of this text.
;exif_text %i%J/%K%L

############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, movie_ and timelapse_filename
Expand Down
5 changes: 5 additions & 0 deletions motion.1
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ Values: 0 - 2147483647 / Default: 60
.br
Event Gap is the seconds of no motion detection that triggers the end of an event. An event is defined as a series of motion images taken within a short timeframe.
.TP
.B exif_text string
Values: Max 4095 characters / Default: Not defined
.br
Text to include in a JPEG EXIF comment , may be any text, including conversion specifiers. The EXIF timestamp is included independent of this text.
.TP
.B extpipe string
Values: Max 4095 characters / Default: Not defined
.br
Expand Down
2 changes: 1 addition & 1 deletion motion.c
Original file line number Diff line number Diff line change
Expand Up @@ -3110,7 +3110,7 @@ int myfclose(FILE* fh)
*
* Returns: number of bytes written to the string s
*/
size_t mystrftime(struct context *cnt, char *s, size_t max, const char *userformat,
size_t mystrftime(const struct context *cnt, char *s, size_t max, const char *userformat,
const struct tm *tm, const char *filename, int sqltype)
{
char formatstring[PATH_MAX] = "";
Expand Down
2 changes: 1 addition & 1 deletion motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,6 @@ void * mymalloc(size_t);
void * myrealloc(void *, size_t, const char *);
FILE * myfopen(const char *, const char *, size_t);
int myfclose(FILE *);
size_t mystrftime(struct context *, char *, size_t, const char *, const struct tm *, const char *, int);
size_t mystrftime(const struct context *, char *, size_t, const char *, const struct tm *, const char *, int);
int create_path(const char *);
#endif /* _INCLUDE_MOTION_H */
Loading

0 comments on commit e002c0b

Please sign in to comment.