Skip to content

Commit

Permalink
* fix many typos in comments ( i ran aspell against the code ).
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelCarpintero authored and AngelCarpintero committed Jan 21, 2006
1 parent c4355ba commit 09c436b
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.MacOSX
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The motion port to MacOSX is only working with network cameras.

Tested in lastest MacOSX
Tested in latest MacOSX

Packages needed :

Expand Down
6 changes: 3 additions & 3 deletions alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void alg_locate_center_size(struct images *imgs, int width, int height, struct c
if (centc) {
cent->minx = cent->x - xdist/centc*2;
cent->maxx = cent->x + xdist/centc*2;
/* Make the box a litle bigger in y direction to make sure the
/* Make the box a little bigger in y direction to make sure the
heads fit in so we multiply by 3 instead of 2 which seems to
to work well in practical */
cent->miny = cent->y - ydist/centc*3;
Expand Down Expand Up @@ -837,7 +837,7 @@ int alg_diff_standard (struct context *cnt, unsigned char *new)
}

/* Next, compare the multiplied absolute differences with the multiplied
* noise level (repeted as 4 words in mm7), resulting in a "motion flag"
* noise level (repeated as 4 words in mm7), resulting in a "motion flag"
* for each pixel.
*
* Since pcmpgtw performs signed comparisons, we have to subtract noise,
Expand Down Expand Up @@ -950,7 +950,7 @@ int alg_diff_standard (struct context *cnt, unsigned char *new)

if (smartmask_speed) {
if (curdiff > noise) {
/* increase smart_mask sesitivity every frame when motion
/* increase smart_mask sensitivity every frame when motion
is detected. (with speed=5, mask is increased by 1 every
second. To be able to increase by 5 every second (with
speed=10) we add 5 here. NOT related to the 5 at ratio-
Expand Down
14 changes: 7 additions & 7 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**
** conf.c
**
** I originaly wrote conf.c as part of the drpoxy package
** I originally wrote conf.c as part of the drpoxy package
** thanks to Matthew Pratt and others for their additions.
**
** Copyright 1999 Jeroen Vreeken ([email protected])
Expand Down Expand Up @@ -668,7 +668,7 @@ config_param config_params[] = {
},
{
"text_event",
"# This option defines the value of the speciel event conversion specifier %C\n"
"# This option defines the value of the special event conversion specifier %C\n"
"# You can use any conversion specifier in this option except %C. Date and time\n"
"# values are from the timestamp of the first image in the current event.\n"
"# Default: %Y%m%d%H%M%S\n"
Expand Down Expand Up @@ -846,7 +846,7 @@ config_param config_params[] = {
"############################################################\n\n"
"# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic)\n"
"# The generic type enables the definition of motion center and motion size to\n"
"# be used with the convertion specifiers for options like on_motion_detected",
"# be used with the conversion specifiers for options like on_motion_detected",
TRACK_OFFSET(type),
copy_int,
print_int
Expand Down Expand Up @@ -1539,7 +1539,7 @@ void malloc_strings (struct context * cnt)
***********************************************************************/

/* copy_bool assigns a config option to a new boolean value.
* The boolean is given as a string in str which is coverted to 0 or 1
* The boolean is given as a string in str which is converted to 0 or 1
* by the function. Values 1, yes and on are converted to 1 ignoring case.
* Any other value is converted to 0.
*/
Expand All @@ -1562,8 +1562,8 @@ static struct context **copy_bool (struct context **cnt, const char *str, int va
return cnt;
}

/* copy_int assigns a config option to a new interger value.
* The integer is given as a string in str which is coverted to integer by the function.
/* copy_int assigns a config option to a new integer value.
* The integer is given as a string in str which is converted to integer by the function.
*/
static struct context ** copy_int(struct context **cnt, const char *str, int val_ptr)
{
Expand Down Expand Up @@ -1620,7 +1620,7 @@ struct context **copy_string(struct context **cnt, const char *str, int val_ptr)
*
* from - pointer to the new string we want to copy
* to - the pointer to the current string (or pointing to NULL)
* If not NULL the memory it points to is fre'ed.
* If not NULL the memory it points to is free'd.
* function returns pointer to the new string which is in malloc'ed memory
* FIXME The strings that are malloc'ed with this function should be freed
* when the motion program is terminated normally instead of relying on the
Expand Down
2 changes: 1 addition & 1 deletion event.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void exec_command(struct context *cnt, char *command, char *filename, int
setsid();

/*
* Close any file descripter except console because we will
* Close any file descriptor except console because we will
* like to see error messages
*/
for (i = getdtablesize(); i > 2; --i)
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct ffmpeg {
AVStream *video_st;
AVCodecContext *c;

AVFrame *picture; /* contains default imaga pointers */
AVFrame *picture; /* contains default image pointers */
uint8_t *video_outbuf;
int video_outbuf_size;

Expand Down
4 changes: 2 additions & 2 deletions motion-dist.conf
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ text_right %Y-%m-%d\n%T-%q
# Text is placed in upper right corner
text_changes off

# This option defines the value of the speciel event conversion specifier %C
# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
Expand Down Expand Up @@ -406,7 +406,7 @@ control_html_output on

# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic)
# The generic type enables the definition of motion center and motion size to
# be used with the convertion specifiers for options like on_motion_detected
# be used with the conversion specifiers for options like on_motion_detected
track_type 0

# Enable auto tracking (default: off)
Expand Down
6 changes: 3 additions & 3 deletions motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@
* Location Purpose
*
* conf The values in conf reflect width and height set in the
* configuration file. These can be set via xmlrpc, but they are
* not used internally by Motion, so it won't break anything.
* These values are transferred to imgs in vid_start.
* configuration file. These can be set via http remote control,
* but they are not used internally by Motion, so it won't break
* anything. These values are transferred to imgs in vid_start.
*
* imgs The values in imgs are the actual output dimensions. Normally
* the output dimensions are the same as the capture dimensions,
Expand Down
2 changes: 1 addition & 1 deletion netcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* is accessed. The other type is one which supplies an mjpeg
* stream of data.
*
* For each of these cameras, the routinei taking care of the netcam
* For each of these cameras, the routine taking care of the netcam
* will start up a completely separate thread (which I call the "camera
* handler thread" within subsequent comments). For a streaming camera,
* this handler will receive the mjpeg stream of data from the camera,
Expand Down
8 changes: 4 additions & 4 deletions netcam.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/*
* We are aiming to get the gcc compilation of motion practically "warning
* free", when using all the possible warning switches. The following macro
* is to allow some function protypes to include parameters which, at the
* is to allow some function prototypes to include parameters which, at the
* moment, are not used, but either still "need to be declared", or else are
* planned to be used in the near future. Eventually this macro will go into
* motion.h, but that will be a little later.
Expand Down Expand Up @@ -120,7 +120,7 @@ typedef struct netcam_context {
pthread_mutex_t mutex; /* mutex used with conditional waits */

pthread_cond_t exiting; /* pthread condition structure to let
the camera-handler acknowlege that
the camera-handler acknowledge that
it's finished */

pthread_cond_t cap_cond; /* pthread condition structure to
Expand Down Expand Up @@ -172,7 +172,7 @@ typedef struct netcam_context {
int (*get_image)(netcam_context_ptr);
/* Function to fetch the image from
the netcam. It is initialised in
netcam_setup depending upon whetheer
netcam_setup depending upon whether
the picture source is from an http
server or from an ftp server */

Expand All @@ -199,7 +199,7 @@ typedef struct netcam_context {
data from the camera */

netcam_buff_ptr jpegbuf; /* This buffer is used for jpeg
decompresssion */
decompression */

int imgcnt; /* count for # of received jpegs */
int imgcnt_last; /* remember last count to check if a new
Expand Down
2 changes: 1 addition & 1 deletion netcam_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ int ftp_connect(netcam_context_ptr netcam) {
*
* ctxt pointer to an FTP context
*
* Returns -1 incase of error, 0 otherwise
* Returns -1 in case of error, 0 otherwise
*/

static int ftp_get_connection(ftp_context_pointer ctxt) {
Expand Down
4 changes: 2 additions & 2 deletions netcam_jpeg.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* netcam_jpeg.c
*
* Module for handling JPEG decompression fornetwork cameras.
* Module for handling JPEG decompression for network cameras.
*
* This code was inspired by the original module written by
* Jeroen Vreeken and enhanced by several Motion project
Expand Down Expand Up @@ -162,7 +162,7 @@ static void netcam_memory_src(j_decompress_ptr cinfo, char *data, int length)
* netcam_error_exit
*
* Routine to override the libjpeg error exit routine so
* that we can just thow away the bad frame and continue
* that we can just throw away the bad frame and continue
* with more data from the netcam.
*
* Parameters
Expand Down
10 changes: 5 additions & 5 deletions picture.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static GLOBAL(int) jpeg_mem_size(j_compress_ptr cinfo)
* Inputs:
* - image_size is the size of the input image buffer.
* - input_image is the image in YUV420P format.
* - width and height are the dimentions of the image
* - width and height are the dimensions of the image
* - quality is the jpeg encoding quality 0-100%
* Output:
* - dest_image is a pointer to the jpeg image buffer
Expand Down Expand Up @@ -155,7 +155,7 @@ static int put_jpeg_yuv420p_memory(unsigned char *dest_image, int image_size,
* Inputs:
* - image_size is the size of the input image buffer.
* - input_image is the image in grayscale format.
* - width and height are the dimentions of the image
* - width and height are the dimensions of the image
* - quality is the jpeg encoding quality 0-100%
* Output:
* - dest_image is a pointer to the jpeg image buffer
Expand Down Expand Up @@ -201,7 +201,7 @@ static int put_jpeg_grey_memory(unsigned char *dest_image, int image_size, unsig
* it to an already open file.
* Inputs:
* - image is the image in YUV420P format.
* - width and height are the dimentions of the image
* - width and height are the dimensions of the image
* - quality is the jpeg encoding quality 0-100%
* Output:
* - The jpeg is written directly to the file given by the file pointer fp
Expand Down Expand Up @@ -265,7 +265,7 @@ static void put_jpeg_yuv420p_file(FILE *fp, unsigned char *image, int width, int
* it to an already open file.
* Inputs:
* - image is the image in greyscale format.
* - width and height are the dimentions of the image
* - width and height are the dimensions of the image
* - quality is the jpeg encoding quality 0-100%
* Output:
* - The jpeg is written directly to the file given by the file pointer fp
Expand Down Expand Up @@ -307,7 +307,7 @@ static void put_jpeg_grey_file(FILE *picture, unsigned char *image, int width, i
* it to an already open file.
* Inputs:
* - image is the image in YUV420P format.
* - width and height are the dimentions of the image
* - width and height are the dimensions of the image
* Output:
* - The PPM is written directly to the file given by the file pointer fp
* Returns nothing
Expand Down
2 changes: 1 addition & 1 deletion rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ typedef unsigned TYPE_32BIT __uint32;
/**
* The code below is copied (with modification) from bits/byteswap.h. It provides
* a macro/function named rot__bswap_32 that swaps the bytes in a 32-bit integer,
* preferrably using the bswap assembler instruction if configure found support
* preferably using the bswap assembler instruction if configure found support
* for it.
*
* It would be neater to simply include byteswap.h and use the bswap_32 macro
Expand Down
10 changes: 5 additions & 5 deletions video.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void v4l_picture_controls(struct context *cnt, struct video_dev *viddev)
if (ioctl(dev, VIDIOCGPICT, &vid_pic)==-1)
motion_log(LOG_ERR, 1, "ioctl (VIDIOCGPICT)");
}
/* average is above window - turn down brigtness - go for the target */
/* average is above window - turn down brightness - go for the target */
if (avg > brightness_window_high) {
step = MIN2((avg - brightness_target)/5+1, viddev->brightness);
if (viddev->brightness > step+1) {
Expand All @@ -104,7 +104,7 @@ static void v4l_picture_controls(struct context *cnt, struct video_dev *viddev)
make_change = 1;
}
}
/* average is below window - turn up brigtness - go for the target */
/* average is below window - turn up brightness - go for the target */
if (avg < brightness_window_low) {
step = MIN2((brightness_target - avg)/5+1, 255 - viddev->brightness);
if (viddev->brightness < 255-step ) {
Expand Down Expand Up @@ -509,7 +509,7 @@ static int v4l_open_vidpipe(void)

fprintf(stderr,"\t%s", buffer);

/* Read explaination line */
/* Read explanation line */

if (!fgets(buffer, 255, vloopbacks)) {
motion_log(LOG_ERR, 1, "Unable to read vloopback explanation line");
Expand Down Expand Up @@ -720,7 +720,7 @@ void vid_cleanup(void)
* - Width and height are checked for valid value (multiple of 16)
* - Copy the config height and width to the imgs struct. Note that height and width are
* only copied to the from the conf struct to the imgs struct during program startup
* The width and height can no leter be changed via http remote control as this would
* The width and height can no later be changed via http remote control as this would
* require major re-memory allocations of all image buffers.
* - Setup basic V4L properties incl palette incl setting
* - Open the device
Expand All @@ -733,7 +733,7 @@ void vid_cleanup(void)
* viddevs The viddevs struct is "global" within the context of video.c
* and used in functions vid_*.
* vid_mutex Mutex needed to handle exclusive access to the viddevs struct when
* each thread adds a new video device durig startup calling vid_start
* each thread adds a new video device during startup calling vid_start
*
* Returns
* device number
Expand Down
6 changes: 3 additions & 3 deletions video_freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static unsigned char *v4l_start(struct context *cnt, struct video_dev *viddev, i
}
/*
if (ioctl(dev_bktr, METEORSACTPIXFMT, &pixelformat) < 0 ){
motion_log(LOG_ERR, 1, "set enconding method BSD_VIDFMT_I420");
motion_log(LOG_ERR, 1, "set encoding method BSD_VIDFMT_I420");
return(NULL);
}
Expand Down Expand Up @@ -734,7 +734,7 @@ static int v4l_next(struct video_dev *viddev,unsigned char *map, int width, int

if (viddev->capture_method == CAPTURE_CONTINOUS){
if (ioctl(dev_bktr, METEORCAPTUR, &continous) < 0) {
motion_log(LOG_ERR, 1, "Error capturing using continous method");
motion_log(LOG_ERR, 1, "Error capturing using continuous method");
sigprocmask (SIG_UNBLOCK, &old, NULL);
return (-1);
}
Expand Down Expand Up @@ -825,7 +825,7 @@ static void v4l_set_input(struct context *cnt, struct video_dev *viddev, unsigne
vid_init - Allocate viddev struct.
vid_start - Setup Device parameters ( device , channel , freq , contrast , hue , saturation , brightness ) and open it.
vid_next - Capture a frame and set input , contrast , hue , saturation and brighness if necesary.
vid_next - Capture a frame and set input , contrast , hue , saturation and brightness if necessary.
vid_close - close devices.
vid_cleanup - Free viddev struct.
Expand Down
8 changes: 4 additions & 4 deletions webcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@



/* This function sets up a TCP/IP socket for incomming requests. It is called only during
* initiatization of Motion from the function webcam_init
/* This function sets up a TCP/IP socket for incoming requests. It is called only during
* initialisation of Motion from the function webcam_init
* The function sets up a a socket on the port number given by _port_.
* If the parameter _local_ is not zero the socket is setup to only accept connects from localhost.
* Otherwise any client IP address is accepted. The function returns an integer representing the socket.
Expand Down Expand Up @@ -133,7 +133,7 @@ static void webcam_flush(struct webcam *list, int *stream_count, int lim)
client->tmpbuffer->size - client->filepos);

/* If any data has been written, update the
* data pointer and set the "workdone flag
* data pointer and set the workdone flag
*/
if (written>0) {
client->filepos+=written;
Expand Down Expand Up @@ -284,7 +284,7 @@ static int webcam_check_write(struct webcam *list)


/* This function is called from motion.c for each motion thread starting up.
* The function setup the incomming tcp socket that the clients connect to
* The function setup the incoming tcp socket that the clients connect to
* The function returns an integer representing the socket.
*/
int webcam_init(struct context *cnt)
Expand Down
6 changes: 3 additions & 3 deletions webhttpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ static int config(char *pointer, char *res, int length_uri, int thread, int clie
warningkill = sscanf(pointer,"%1024s", Value);
length_uri = length_uri - strlen(Value);
if ( (length_uri == 0) && (strlen(Value) > 0) ) {
/* FIXME need to asure that is a valid value */
/* FIXME need to assure that is a valid value */
url_decode(Value,strlen(Value));
conf_cmdparse(cnt + thread, config_params[i].param_name, Value);
if (cnt[0]->conf.control_html_output) {
Expand Down Expand Up @@ -593,7 +593,7 @@ static int config(char *pointer, char *res, int length_uri, int thread, int clie
length_uri = length_uri - 3;

if ((length_uri > 7) && (question == '?')) {
/* 8 -> query=param_name FIXME minimun length param_name */
/* 8 -> query=param_name FIXME minimum length param_name */
pointer++;
length_uri--;
warningkill = sscanf(pointer,"%256[a-z]%c", command, &question);
Expand Down Expand Up @@ -1985,7 +1985,7 @@ static int read_client(int client_socket, void *userdata, char *auth)
/* A valid auth request. Process it. */
}
} else {
// Resquest Authorithation
// Request Authorization
char response[1024]={'\0'};
snprintf (response, sizeof (response),request_auth_response_template, method);
warningkill = write (client_socket, response, strlen (response));
Expand Down

0 comments on commit 09c436b

Please sign in to comment.