summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4l2/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2/log.c')
-rw-r--r--v4l2-apps/libv4l/libv4l2/log.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/log.c b/v4l2-apps/libv4l/libv4l2/log.c
index c29086ff4..86d71b64e 100644
--- a/v4l2-apps/libv4l/libv4l2/log.c
+++ b/v4l2-apps/libv4l/libv4l2/log.c
@@ -1,5 +1,7 @@
/*
-# (C) 2008 Hans de Goede <j.w.r.degoede@hhs.nl>
+# (C) 2008 Elmar Kleijn <elmar_kleijn@hotmail.com>
+# (C) 2008 Sjoerd Piepenbrink <need4weed@gmail.com>
+# (C) 2008 Hans de Goede <hdegoede@redhat.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@@ -20,12 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <linux/ioctl.h>
-/* These headers are not needed by us, but by linux/videodev2.h,
- which is broken on some systems and doesn't include them itself :( */
-#include <sys/time.h>
-#include <asm/types.h>
-/* end broken header workaround includes */
+#include "../libv4lconvert/libv4lsyscall-priv.h"
#include <linux/videodev2.h>
#include "libv4l2.h"
#include "libv4l2-priv.h"
@@ -161,7 +158,7 @@ void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
struct v4l2_frmsizeenum *frmsize = arg;
int pixfmt = frmsize->pixel_format;
- fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c",
+ fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c\n",
frmsize->index,
pixfmt & 0xff,
(pixfmt >> 8) & 0xff,
@@ -169,12 +166,12 @@ void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
pixfmt >> 24);
switch (frmsize->type) {
case V4L2_FRMSIZE_TYPE_DISCRETE:
- fprintf(v4l2_log_file, " %ux%u\n", frmsize->discrete.width,
+ fprintf(v4l2_log_file, " %ux%u\n", frmsize->discrete.width,
frmsize->discrete.height);
break;
case V4L2_FRMSIZE_TYPE_CONTINUOUS:
case V4L2_FRMSIZE_TYPE_STEPWISE:
- fprintf(v4l2_log_file, " %ux%u -> %ux%u\n",
+ fprintf(v4l2_log_file, " %ux%u -> %ux%u\n",
frmsize->stepwise.min_width, frmsize->stepwise.min_height,
frmsize->stepwise.max_width, frmsize->stepwise.max_height);
break;
@@ -186,7 +183,7 @@ void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
struct v4l2_frmivalenum *frmival = arg;
int pixfmt = frmival->pixel_format;
- fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c %ux%u: ",
+ fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c %ux%u:\n",
frmival->index,
pixfmt & 0xff,
(pixfmt >> 8) & 0xff,
@@ -196,12 +193,12 @@ void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
frmival->height);
switch (frmival->type) {
case V4L2_FRMIVAL_TYPE_DISCRETE:
- fprintf(v4l2_log_file, "%u/%u\n", frmival->discrete.numerator,
+ fprintf(v4l2_log_file, " %u/%u\n", frmival->discrete.numerator,
frmival->discrete.denominator);
break;
case V4L2_FRMIVAL_TYPE_CONTINUOUS:
case V4L2_FRMIVAL_TYPE_STEPWISE:
- fprintf(v4l2_log_file, "%u/%u -> %u/%u\n",
+ fprintf(v4l2_log_file, " %u/%u -> %u/%u\n",
frmival->stepwise.min.numerator,
frmival->stepwise.min.denominator,
frmival->stepwise.max.numerator,