summaryrefslogtreecommitdiffstats
path: root/libvo/vo_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/vo_bl.c')
-rw-r--r--libvo/vo_bl.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c
index bacec3acbb..9e98130adb 100644
--- a/libvo/vo_bl.c
+++ b/libvo/vo_bl.c
@@ -53,7 +53,7 @@
#include "m_option.h"
#include "fastmemcpy.h"
-static const vo_info_t info =
+static const vo_info_t info =
{
"Blinkenlights driver: http://www.blinkenlights.de",
"bl",
@@ -140,7 +140,7 @@ static void bml_write_frame(bl_file_t *f, unsigned char *i, int duration) {
int j, k;
if( ! f->header_written )
{
- fprintf(f->fp,
+ fprintf(f->fp,
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<blm width=\"%d\" height=\"%d\" bits=\"%d\" channels=\"%d\">\n"
" <header>\n"
@@ -152,7 +152,7 @@ static void bml_write_frame(bl_file_t *f, unsigned char *i, int duration) {
fprintf(f->fp, " <frame duration=\"%d\">\n", duration);
for (j = 0; j < bl->height; j++) {
fprintf(f->fp, " <row>");
- for (k = 0; k < bl->width; k++)
+ for (k = 0; k < bl->width; k++)
fprintf(f->fp, "%02x", *(i + j * bl->width + k));
fprintf(f->fp, "</row>\n");
}
@@ -171,7 +171,7 @@ static int udp_init(bl_host_t *h) {
dest = gethostbyname(h->name);
if (!dest) {
- mp_msg(MSGT_VO, MSGL_ERR,
+ mp_msg(MSGT_VO, MSGL_ERR,
"unable to resolve host %s\n", h->name);
return 1;
}
@@ -185,12 +185,12 @@ static int udp_init(bl_host_t *h) {
h->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (h->fd < 0) {
- mp_msg(MSGT_VO, MSGL_ERR,
+ mp_msg(MSGT_VO, MSGL_ERR,
"couldn't create socket for %s\n", h->name);
return 1;
}
if (connect(h->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
- mp_msg(MSGT_VO, MSGL_ERR, "couldn't connect socket for %s\n",
+ mp_msg(MSGT_VO, MSGL_ERR, "couldn't connect socket for %s\n",
h->name);
close(h->fd);
return 1;
@@ -199,7 +199,7 @@ static int udp_init(bl_host_t *h) {
}
static void udp_send(bl_host_t *h) {
- if (send(h->fd, bl_packet, bl_size, 0) != bl_size)
+ if (send(h->fd, bl_packet, bl_size, 0) != bl_size)
mp_msg(MSGT_VO, MSGL_ERR, "unable to send to %s\n", h->name);
}
@@ -220,7 +220,7 @@ static bl_properties_t bls[NO_BLS] = {
&bml_init, &bml_write_frame, &bml_close,
&udp_init, &udp_send, &udp_close } };
-static int config(uint32_t width, uint32_t height, uint32_t d_width,
+static int config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
void * ptr;
@@ -268,11 +268,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (width > bl->width) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: width of movie too large %d > %d\n", width, bl->width);
return 1;
- }
+ }
if (height > bl->height) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: height of movie too large %d > %d\n", height, bl->height);
return 1;
- }
+ }
if (!image) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: image should be initialized, internal error\n");
return 1;
@@ -305,7 +305,7 @@ static int draw_frame(uint8_t * src[]) {
}
static int query_format(uint32_t format) {
- if (format == bl->img_format)
+ if (format == bl->img_format)
return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW;
return 0;
}
@@ -352,7 +352,7 @@ static int preinit(const char *arg) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: subdevice must be given, example: -vo bl:arcade:host=localhost:2323\n");
return 1;
}
-
+
bl_subdevice = malloc(strlen(arg) + 1);
if (!bl_subdevice) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n");
@@ -400,7 +400,7 @@ static int preinit(const char *arg) {
if (*q == '\0') end = 1;
*q = '\0';
bl_files[no_bl_files].name = p;
- mp_msg(MSGT_VO, MSGL_V, "blfile[%d]: %s\n",
+ mp_msg(MSGT_VO, MSGL_V, "blfile[%d]: %s\n",
no_bl_files, p);
no_bl_files++;
} else if (!strncmp(p, "host=", 5)) {
@@ -421,10 +421,10 @@ static int preinit(const char *arg) {
if (*q == '\0') end = 1;
*q = '\0';
bl_hosts[no_bl_hosts].name = p;
- bl_hosts[no_bl_hosts].port = 2323;
+ bl_hosts[no_bl_hosts].port = 2323;
}
- mp_msg(MSGT_VO, MSGL_V,
- "blhost[%d]: %s:%d\n",
+ mp_msg(MSGT_VO, MSGL_V,
+ "blhost[%d]: %s:%d\n",
no_bl_hosts, p,
bl_hosts[no_bl_hosts].port);
no_bl_hosts++;
@@ -447,7 +447,7 @@ static int preinit(const char *arg) {
image = ((unsigned char*)bl_packet + 12); /* pointer to image data */
tmp = malloc(3); /* space for a pixel only */
}
-
+
if (!bl_packet || !tmp) {
mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n");
return 1;
@@ -459,11 +459,11 @@ static int preinit(const char *arg) {
bl_packet->maxval = htons((1 << bl->bpc) - 1);
/* open all files */
- for (i = 0; i < no_bl_files; i++)
+ for (i = 0; i < no_bl_files; i++)
if (bl->init_file(&bl_files[i])) return 1;
/* open all sockets */
- for (i = 0; i < no_bl_hosts; i++)
+ for (i = 0; i < no_bl_hosts; i++)
if (bl->init_connection(&bl_hosts[i])) return 1;