summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rmd_cache_frame.c8
-rw-r--r--src/rmd_encode_audio_buffer.c2
-rw-r--r--src/rmd_frame.c2
-rw-r--r--src/rmd_init_encoder.c6
-rw-r--r--src/rmd_make_dummy_pointer.c8
-rw-r--r--src/rmd_math.h3
-rw-r--r--src/rmd_parseargs.c8
-rw-r--r--src/rmd_poll_events.c4
-rw-r--r--src/rmd_rescue.h3
-rw-r--r--src/rmd_shortcuts.c9
-rw-r--r--src/rmd_shortcuts.h10
-rw-r--r--src/rmd_specsfile.h7
-rw-r--r--src/rmd_types.h4
-rw-r--r--src/rmd_wm_is_compositing.c4
-rw-r--r--src/rmd_wm_is_compositing.h6
-rw-r--r--src/skeleton.c26
-rw-r--r--src/test-rectinsert.c8
17 files changed, 56 insertions, 62 deletions
diff --git a/src/rmd_cache_frame.c b/src/rmd_cache_frame.c
index fbec467..9629144 100644
--- a/src/rmd_cache_frame.c
+++ b/src/rmd_cache_frame.c
@@ -227,10 +227,10 @@ void *rmdCacheImageBuffer(ProgData *pdata)
total_bytes += nbytes;
{
- unsigned int bytes_per_pixel = pdata->specs.depth >= 24 ? 4 : 2;
- unsigned int pixels_per_frame = pdata->enc_data->yuv.y_width * pdata->enc_data->yuv.y_height;
-
- total_received_bytes = ((unsigned long long int)frameno) * bytes_per_pixel * pixels_per_frame;
+ unsigned int bytes_per_pixel = pdata->specs.depth >= 24 ? 4 : 2;
+ unsigned int pixels_per_frame = pdata->enc_data->yuv.y_width * pdata->enc_data->yuv.y_height;
+
+ total_received_bytes = ((unsigned long long int)frameno) * bytes_per_pixel * pixels_per_frame;
}
if (total_received_bytes) {
diff --git a/src/rmd_encode_audio_buffer.c b/src/rmd_encode_audio_buffer.c
index db4629f..feaadb1 100644
--- a/src/rmd_encode_audio_buffer.c
+++ b/src/rmd_encode_audio_buffer.c
@@ -167,7 +167,7 @@ void rmdSyncEncodeAudioBuffer(ProgData *pdata, signed char *buff)
vorbis_analysis(&pdata->enc_data->m_vo_block, NULL);
vorbis_bitrate_addblock(&pdata->enc_data->m_vo_block);
- while (vorbis_bitrate_flushpacket(&pdata->enc_data->m_vo_dsp, &pdata->enc_data->m_ogg_pckt2))
+ while (vorbis_bitrate_flushpacket(&pdata->enc_data->m_vo_dsp, &pdata->enc_data->m_ogg_pckt2))
ogg_stream_packetin(&pdata->enc_data->m_ogg_vs, &pdata->enc_data->m_ogg_pckt2);
}
pthread_mutex_unlock(&pdata->libogg_mutex);
diff --git a/src/rmd_frame.c b/src/rmd_frame.c
index 685ca12..d27d42d 100644
--- a/src/rmd_frame.c
+++ b/src/rmd_frame.c
@@ -39,7 +39,7 @@
void rmdDrawFrame( Display *dpy,
- int screen,
+ int screen,
Window win,
int width,
int height)
diff --git a/src/rmd_init_encoder.c b/src/rmd_init_encoder.c
index 122b8d9..59f97ae 100644
--- a/src/rmd_init_encoder.c
+++ b/src/rmd_init_encoder.c
@@ -103,7 +103,7 @@ void rmdInitEncoder(ProgData *pdata, EncData *enc_data_t, int buffer_ready)
char *new_name = malloc(fname_length + 5);
strcpy(new_name, fname);
strcat(new_name, ".ogv");
-
+
free(pdata->args.filename);
pdata->args.filename = new_name;
}
@@ -112,14 +112,14 @@ void rmdInitEncoder(ProgData *pdata, EncData *enc_data_t, int buffer_ready)
rmdIncrementalNaming(&(pdata)->args.filename);
fprintf(stderr, "Output file: %s\n", pdata->args.filename);
}
-
+
enc_data_t->fp = fopen((pdata)->args.filename, "w");
if (enc_data_t->fp == NULL) {
fprintf(stderr, "Cannot open file %s for writting!\n", (pdata)->args.filename);
exit(13);
}
- //each stream must have a unique
+ //each stream must have a unique
srand(time(NULL));
y0 = rand() + 1;
y1 = rand() + 1;
diff --git a/src/rmd_make_dummy_pointer.c b/src/rmd_make_dummy_pointer.c
index bd38ea6..8d5567c 100644
--- a/src/rmd_make_dummy_pointer.c
+++ b/src/rmd_make_dummy_pointer.c
@@ -79,13 +79,13 @@ unsigned char *rmdMakeDummyPointer( Display *display,
*npxl = ((wp[0] - 1) != bp[0]) ? wp[0] - 100 : wp[0] - 102;
for (i = 0; i < size; i++) {
for (k = 0; k < size; k++) {
- ret[(i * size + k) * 4 + __ABYTE] = (pmask[type][i][k] == 'w') ?
+ ret[(i * size + k) * 4 + __ABYTE] = (pmask[type][i][k] == 'w') ?
wp[0]:(pmask[type][i][k] == 'b') ? bp[0] : *npxl;
- ret[(i * size + k) * 4 + __RBYTE] = (pmask[type][i][k] == 'w') ?
+ ret[(i * size + k) * 4 + __RBYTE] = (pmask[type][i][k] == 'w') ?
wp[1]:(pmask[type][i][k] == 'b') ? bp[1] : *npxl;
- ret[(i * size + k) * 4 + __GBYTE] = (pmask[type][i][k] == 'w') ?
+ ret[(i * size + k) * 4 + __GBYTE] = (pmask[type][i][k] == 'w') ?
wp[2]:(pmask[type][i][k] == 'b') ? bp[2] : *npxl;
- ret[(i * size + k) * 4 + __BBYTE] = (pmask[type][i][k] == 'w') ?
+ ret[(i * size + k) * 4 + __BBYTE] = (pmask[type][i][k] == 'w') ?
wp[3]:(pmask[type][i][k] == 'b') ? bp[3] : *npxl;
}
}
diff --git a/src/rmd_math.h b/src/rmd_math.h
index 87c6166..14ec2f3 100644
--- a/src/rmd_math.h
+++ b/src/rmd_math.h
@@ -32,7 +32,7 @@
* problem, by behaving identically with roundf
* and being portable (floorf and ceilf, that are
* used in the implementation, are defined in C89)
- *
+ *
* \param val Number to be rounded
*
* \returns val rounded
@@ -41,4 +41,3 @@
double rmdRoundf( double val );
#endif
-
diff --git a/src/rmd_parseargs.c b/src/rmd_parseargs.c
index e4cfdd7..3c8cc12 100644
--- a/src/rmd_parseargs.c
+++ b/src/rmd_parseargs.c
@@ -379,7 +379,7 @@ boolean rmdParseArgs(int argc, char **argv, ProgArgs *arg_return)
fprintf(stderr,
"Warning, will ignore --use-jack flags, no libjack support in build.\n");
}
- }
+ }
default:
break;
@@ -415,11 +415,11 @@ boolean rmdParseArgs(int argc, char **argv, ProgArgs *arg_return)
case POPT_ERROR_NOARG:
fprintf(stderr, "Missing argument\n");
break;
-
+
case POPT_ERROR_BADNUMBER:
fprintf(stderr, "Bad number\n");
break;
-
+
default:
fprintf(stderr, "libpopt error: %d\n", arg_id);
break;
@@ -487,7 +487,7 @@ static boolean rmdValidateArguments(const ProgArgs *args)
return success;
}
-static void rmdPrintAndExit( poptContext con,
+static void rmdPrintAndExit( poptContext con,
enum poptCallbackReason reason,
const struct poptOption *opt,
const char *arg,
diff --git a/src/rmd_poll_events.c b/src/rmd_poll_events.c
index 6af8cc7..f429b5c 100644
--- a/src/rmd_poll_events.c
+++ b/src/rmd_poll_events.c
@@ -211,17 +211,15 @@ void rmdEventLoop(ProgData *pdata)
}
}
} else if (event.type == Expose) {
-
if (event.xexpose.count != 0)
continue;
else if (!pdata->args.noframe) {
rmdDrawFrame( pdata->dpy,
- pdata->specs.screen,
+ pdata->specs.screen,
pdata->shaped_w,
pdata->brwin.rrect.width,
pdata->brwin.rrect.height);
}
-
} else if (!pdata->args.full_shots) {
if (event.type == MapNotify ) {
XWindowAttributes attribs;
diff --git a/src/rmd_rescue.h b/src/rmd_rescue.h
index 2fbf2da..51e7bd4 100644
--- a/src/rmd_rescue.h
+++ b/src/rmd_rescue.h
@@ -28,7 +28,7 @@
#define RMD_RESCUE_H 1
/*
- * Rescue a previous recording, found in
+ * Rescue a previous recording, found in
* the given path.
*
* \param path Path to the cache folder.
@@ -38,5 +38,4 @@
*/
int rmdRescue(const char *path);
-
#endif
diff --git a/src/rmd_shortcuts.c b/src/rmd_shortcuts.c
index c0e1723..2dff6c1 100644
--- a/src/rmd_shortcuts.c
+++ b/src/rmd_shortcuts.c
@@ -31,7 +31,7 @@
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
-#include <X11/keysym.h>
+#include <X11/keysym.h>
#include <stdio.h>
#include <stdlib.h>
@@ -61,10 +61,10 @@ int rmdRegisterShortcut( Display *dpy,
modifier_mask = modifier_mask | Mod4Mask;
if (strstr(shortcut, "Mod5"))
modifier_mask = modifier_mask | Mod5Mask;
-
+
//we register the shortcut on the root
//window, which means on every keypress event,
- //so I think it's neccessary to have at least one
+ //so I think it's neccessary to have at least one
//modifier.
if (modifier_mask == 0)
return 1;
@@ -77,8 +77,7 @@ int rmdRegisterShortcut( Display *dpy,
} else
return 1;
-
- /* Key grabbing stuff taken from tilda who took it from yeahconsole
+ /* Key grabbing stuff taken from tilda who took it from yeahconsole
* who took it from evilwm */
{
diff --git a/src/rmd_shortcuts.h b/src/rmd_shortcuts.h
index a0dc2af..b898a8b 100644
--- a/src/rmd_shortcuts.h
+++ b/src/rmd_shortcuts.h
@@ -31,7 +31,7 @@
/*
- * Check a shortcut combination and if valid,
+ * Check a shortcut combination and if valid,
* register it, on the root window.
*
* \param dpy Connection to the X Server
@@ -40,12 +40,12 @@
*
* \param shortcut String represantation of the shortcut
*
- * \param HotKey Pre-allocated struct that is filled with the
- * modifiers and the keycode, for checks on incoming
+ * \param HotKey Pre-allocated struct that is filled with the
+ * modifiers and the keycode, for checks on incoming
* keypress events. Left untouched if the call fails.
*
- *
- * \returns 0 on Success, 1 on Failure.
+ *
+ * \returns 0 on Success, 1 on Failure.
*
*/
int rmdRegisterShortcut(Display *dpy,
diff --git a/src/rmd_specsfile.h b/src/rmd_specsfile.h
index 67cbd46..2c299ba 100644
--- a/src/rmd_specsfile.h
+++ b/src/rmd_specsfile.h
@@ -38,21 +38,20 @@
*
* \returns 0 on Success, 1 on failure
*
- */
+ */
int rmdWriteSpecsFile(ProgData *pdata);
-
/*
* Read the text file that holds the required
* capture attributes, in the cache directory.
*
- * \param pdata ProgData struct that will be fille
+ * \param pdata ProgData struct that will be filled
* with all program data
*
* \returns 0 on Success, 1 on failure
*
- */
+ */
int rmdReadSpecsFile(ProgData *pdata);
diff --git a/src/rmd_types.h b/src/rmd_types.h
index 0c859da..f70efac 100644
--- a/src/rmd_types.h
+++ b/src/rmd_types.h
@@ -87,7 +87,7 @@ typedef int boolean;
#define RMD_MAX_JACK_PORTS (100)
-// Forward declarations
+// Forward declarations
typedef struct _ProgData ProgData;
typedef struct _Image {
@@ -330,7 +330,7 @@ struct _ProgData {
/** Progam state vars */
boolean running; //1 while the program is capturing/paused/encoding
- boolean paused; //1 while the program is paused
+ boolean paused; //1 while the program is paused
boolean aborted; //1 if we should abort
boolean pause_state_changed; //1 if pause state changed
diff --git a/src/rmd_wm_is_compositing.c b/src/rmd_wm_is_compositing.c
index 95bc307..d6d5db4 100644
--- a/src/rmd_wm_is_compositing.c
+++ b/src/rmd_wm_is_compositing.c
@@ -42,14 +42,14 @@ boolean rmdWMIsCompositing(Display *dpy, int screen)
char buf[32];
char *window_manager=rmdWMCheck( dpy, RootWindow( dpy, screen ) );
- //If the wm name is queried successfully the wm is compliant (source
+ //If the wm name is queried successfully the wm is compliant (source
//http://standards.freedesktop.org/wm-spec/1.4/ar01s03.html#id2568282 )
//in which case we will also free() the allcoated string.
if (window_manager == NULL)
return FALSE;
else
- free(window_manager);
+ free(window_manager);
snprintf( buf, sizeof(buf), "_NET_WM_CM_S%d", screen);
atom = XInternAtom(dpy, buf, True);
diff --git a/src/rmd_wm_is_compositing.h b/src/rmd_wm_is_compositing.h
index 7f152ac..421d46b 100644
--- a/src/rmd_wm_is_compositing.h
+++ b/src/rmd_wm_is_compositing.h
@@ -37,12 +37,12 @@
*
* \param screen screen number/id that the window manager runs on
*
-* \returns TRUE if compositing, false otherwise or when
+* \returns TRUE if compositing, false otherwise or when
* the window manager doesn't support the required
-* freedesktop.org hints for the test to be done
+* freedesktop.org hints for the test to be done
* succesfully.
*/
-boolean rmdWMIsCompositing( Display *dpy, int screen) ;
+boolean rmdWMIsCompositing( Display *dpy, int screen);
#endif
diff --git a/src/skeleton.c b/src/skeleton.c
index 77567db..2a20ed8 100644
--- a/src/skeleton.c
+++ b/src/skeleton.c
@@ -5,7 +5,7 @@
/* This file depends on WORDS_BIGENDIAN being defined to 1 if the host
* processor stores words with the most significant byte first (like Motorola
- * and SPARC, unlike Intel and VAX).
+ * and SPARC, unlike Intel and VAX).
* On little endian systems, WORDS_BIGENDIAN should be undefined.
*
* When using GNU Autotools, the correct value will be written into config.h
@@ -21,9 +21,9 @@
#include "skeleton.h"
-#ifdef WIN32
+#ifdef WIN32
#define snprintf _snprintf
-#endif
+#endif
static unsigned short
_le_16 (unsigned short s)
@@ -80,7 +80,7 @@ _le_64 (ogg_int64_t l)
/* write an ogg_page to a file pointer */
int write_ogg_page_to_file(ogg_page *og, FILE *out) {
int written;
-
+
written = fwrite(og->header,1, og->header_len, out);
if (written > 0)
written += fwrite(og->body,1, og->body_len, out);
@@ -88,8 +88,8 @@ int write_ogg_page_to_file(ogg_page *og, FILE *out) {
return written;
}
-int add_message_header_field(fisbone_packet *fp,
- char *header_key,
+int add_message_header_field(fisbone_packet *fp,
+ char *header_key,
char *header_value) {
/* size of both key and value + ': ' + CRLF */
@@ -100,10 +100,10 @@ int add_message_header_field(fisbone_packet *fp,
int new_size = (fp->current_header_size + this_message_size+1) * sizeof(char);
fp->message_header_fields = _ogg_realloc(fp->message_header_fields, new_size);
}
- snprintf(fp->message_header_fields + fp->current_header_size,
- this_message_size+1,
- "%s: %s\r\n",
- header_key,
+ snprintf(fp->message_header_fields + fp->current_header_size,
+ this_message_size+1,
+ "%s: %s\r\n",
+ header_key,
header_value);
fp->current_header_size += this_message_size;
@@ -137,19 +137,19 @@ int ogg_from_fishead(fishead_packet *fp,ogg_packet *op) {
return 0;
}
-/* create a ogg_packet from a fisbone_packet structure.
+/* create a ogg_packet from a fisbone_packet structure.
* call this method after the fisbone_packet is filled and all message header fields are added
* by calling add_message_header_field method.
*/
int ogg_from_fisbone(fisbone_packet *fp,ogg_packet *op) {
-
+
int packet_size;
if (!fp || !op) return -1;
packet_size = FISBONE_SIZE + fp->current_header_size;
- memset (op, 0, sizeof (*op));
+ memset (op, 0, sizeof (*op));
op->packet = _ogg_calloc (packet_size, sizeof(unsigned char));
if (!op->packet) return -1;
diff --git a/src/test-rectinsert.c b/src/test-rectinsert.c
index 40c2ce3..92d7502 100644
--- a/src/test-rectinsert.c
+++ b/src/test-rectinsert.c
@@ -107,7 +107,7 @@ static void GetState(RectArea *root, boolean *state)
current = current->next;
}
}
-
+
static boolean rmdStatesEqual(boolean *a, boolean *b)
{
int x, y;
@@ -126,7 +126,7 @@ static boolean rmdStatesEqual(boolean *a, boolean *b)
static void rmdPrintState(boolean *state)
{
int x, y;
-
+
for (y = 0; y < STATE_HEIGHT; y++) {
printf(" ");
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
printf(" FAILURE!\n");
printf(" Current state:\n");
rmdPrintState(current_state);
-
+
printf(" Expected state:\n");
rmdPrintState(rectinsert_test_data[i].expected_state);
@@ -181,6 +181,6 @@ int main(int argc, char **argv)
printf("\n");
i++;
}
-
+
return result;
}
© All Rights Reserved