aboutsummaryrefslogtreecommitdiffstats
path: root/console
diff options
context:
space:
mode:
Diffstat (limited to 'console')
-rw-r--r--console/record.c4
-rw-r--r--console/showqt.c7
-rw-r--r--console/v4l-info.c41
3 files changed, 29 insertions, 23 deletions
diff --git a/console/record.c b/console/record.c
index c5a686b..5638fc6 100644
--- a/console/record.c
+++ b/console/record.c
@@ -54,7 +54,7 @@ sound_open(int rate)
int frag,afmt,channels,trigger,srate;
if (-1 == (sound_fd = open(audio_dev, O_RDONLY))) {
- fprintf(stderr,"open %s: %s",audio_dev,strerror(errno));
+ fprintf(stderr,"open %s: %s\n",audio_dev,strerror(errno));
exit(1);
}
@@ -192,7 +192,7 @@ mixer_open(char *filename, char *device)
int i, devmask;
if (-1 == (mix = open(filename,O_RDONLY))) {
- fprintf(stderr,"open %s: %s",filename,strerror(errno));
+ fprintf(stderr,"open %s: %s\n",filename,strerror(errno));
exit(1);
}
if (-1 == ioctl(mix,MIXER_READ(SOUND_MIXER_DEVMASK),&devmask)) {
diff --git a/console/showqt.c b/console/showqt.c
index e721bf5..12a9d18 100644
--- a/console/showqt.c
+++ b/console/showqt.c
@@ -11,6 +11,11 @@
#include <inttypes.h>
#include <time.h>
+#ifndef PRId64
+# define PRId64 "lld"
+# define PRIx64 "llx"
+#endif
+
#if BYTE_ORDER == LITTLE_ENDIAN
# define SWAP2(x) (((x>>8) & 0x00ff) |\
((x<<8) & 0xff00))
@@ -568,7 +573,7 @@ static int handle_classic_atom(int fh, off_t pos, off_t size, int depth)
off = 8;
}
printf("0x%08" PRIx64 " 0x%08" PRIx64 " %*s%s\n",
- pos,asize,depth,"",strfcc(a.type));
+ (int64_t)pos,(int64_t)asize,depth,"",strfcc(a.type));
switch (a.type) {
case a_dinf:
case a_edts:
diff --git a/console/v4l-info.c b/console/v4l-info.c
index 299e63f..0f184b2 100644
--- a/console/v4l-info.c
+++ b/console/v4l-info.c
@@ -7,6 +7,7 @@
#include <inttypes.h>
#include <ctype.h>
+#include <sys/time.h>
#include <sys/ioctl.h>
#include "videodev.h"
@@ -35,7 +36,7 @@ static int dump_v4l(int fd, int tab)
if (-1 == ioctl(fd,VIDIOCGCAP,&capability))
return -1;
printf(" VIDIOCGCAP\n");
- print_struct(stderr,desc_video_capability,&capability,"",tab);
+ print_struct(stdout,desc_video_capability,&capability,"",tab);
printf("\n");
printf("channels\n");
@@ -47,7 +48,7 @@ static int dump_v4l(int fd, int tab)
continue;
}
printf(" VIDIOCGCHAN(%d)\n",i);
- print_struct(stderr,desc_video_channel,&channel,"",tab);
+ print_struct(stdout,desc_video_channel,&channel,"",tab);
}
printf("\n");
@@ -57,7 +58,7 @@ static int dump_v4l(int fd, int tab)
perror("ioctl VIDIOCGTUNER");
} else {
printf(" VIDIOCGTUNER\n");
- print_struct(stderr,desc_video_tuner,&tuner,"",tab);
+ print_struct(stdout,desc_video_tuner,&tuner,"",tab);
}
printf("\n");
@@ -67,7 +68,7 @@ static int dump_v4l(int fd, int tab)
perror("ioctl VIDIOCGAUDIO");
} else {
printf(" VIDIOCGAUDIO\n");
- print_struct(stderr,desc_video_audio,&audio,"",tab);
+ print_struct(stdout,desc_video_audio,&audio,"",tab);
}
printf("\n");
@@ -77,7 +78,7 @@ static int dump_v4l(int fd, int tab)
perror("ioctl VIDIOCGPICT");
} else {
printf(" VIDIOCGPICT\n");
- print_struct(stderr,desc_video_picture,&picture,"",tab);
+ print_struct(stdout,desc_video_picture,&picture,"",tab);
}
printf("\n");
@@ -87,7 +88,7 @@ static int dump_v4l(int fd, int tab)
perror("ioctl VIDIOCGFBUF");
} else {
printf(" VIDIOCGFBUF\n");
- print_struct(stderr,desc_video_buffer,&buffer,"",tab);
+ print_struct(stdout,desc_video_buffer,&buffer,"",tab);
}
printf("\n");
@@ -97,7 +98,7 @@ static int dump_v4l(int fd, int tab)
perror("ioctl VIDIOCGWIN");
} else {
printf(" VIDIOCGWIN\n");
- print_struct(stderr,desc_video_window,&window,"",tab);
+ print_struct(stdout,desc_video_window,&window,"",tab);
}
printf("\n");
@@ -124,7 +125,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_QUERYCAP,&capability))
return -1;
printf(" VIDIOC_QUERYCAP\n");
- print_struct(stderr,desc_v4l2_capability,&capability,"",tab);
+ print_struct(stdout,desc_v4l2_capability,&capability,"",tab);
printf("\n");
printf("standards\n");
@@ -134,7 +135,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_ENUMSTD,&standard))
break;
printf(" VIDIOC_ENUMSTD(%d)\n",i);
- print_struct(stderr,desc_v4l2_standard,&standard,"",tab);
+ print_struct(stdout,desc_v4l2_standard,&standard,"",tab);
}
printf("\n");
@@ -145,7 +146,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_ENUMINPUT,&input))
break;
printf(" VIDIOC_ENUMINPUT(%d)\n",i);
- print_struct(stderr,desc_v4l2_input,&input,"",tab);
+ print_struct(stdout,desc_v4l2_input,&input,"",tab);
}
printf("\n");
@@ -157,7 +158,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_G_TUNER,&tuner))
break;
printf(" VIDIOC_G_TUNER(%d)\n",i);
- print_struct(stderr,desc_v4l2_tuner,&tuner,"",tab);
+ print_struct(stdout,desc_v4l2_tuner,&tuner,"",tab);
}
printf("\n");
}
@@ -171,7 +172,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_ENUM_FMT,&fmtdesc))
break;
printf(" VIDIOC_ENUM_FMT(%d,VIDEO_CAPTURE)\n",i);
- print_struct(stderr,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
+ print_struct(stdout,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
}
memset(&format,0,sizeof(format));
format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -179,7 +180,7 @@ static int dump_v4l2(int fd, int tab)
perror("VIDIOC_G_FMT(VIDEO_CAPTURE)");
} else {
printf(" VIDIOC_G_FMT(VIDEO_CAPTURE)\n");
- print_struct(stderr,desc_v4l2_format,&format,"",tab);
+ print_struct(stdout,desc_v4l2_format,&format,"",tab);
}
printf("\n");
}
@@ -193,7 +194,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_ENUM_FMT,&fmtdesc))
break;
printf(" VIDIOC_ENUM_FMT(%d,VIDEO_OVERLAY)\n",i);
- print_struct(stderr,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
+ print_struct(stdout,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
}
memset(&format,0,sizeof(format));
format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
@@ -201,14 +202,14 @@ static int dump_v4l2(int fd, int tab)
perror("VIDIOC_G_FMT(VIDEO_OVERLAY)");
} else {
printf(" VIDIOC_G_FMT(VIDEO_OVERLAY)\n");
- print_struct(stderr,desc_v4l2_format,&format,"",tab);
+ print_struct(stdout,desc_v4l2_format,&format,"",tab);
}
memset(&fbuf,0,sizeof(fbuf));
if (-1 == ioctl(fd,VIDIOC_G_FBUF,&fbuf)) {
perror("VIDIOC_G_FBUF");
} else {
printf(" VIDIOC_G_FBUF\n");
- print_struct(stderr,desc_v4l2_framebuffer,&fbuf,"",tab);
+ print_struct(stdout,desc_v4l2_framebuffer,&fbuf,"",tab);
}
printf("\n");
}
@@ -222,7 +223,7 @@ static int dump_v4l2(int fd, int tab)
if (-1 == ioctl(fd,VIDIOC_ENUM_FMT,&fmtdesc))
break;
printf(" VIDIOC_ENUM_FMT(%d,VBI_CAPTURE)\n",i);
- print_struct(stderr,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
+ print_struct(stdout,desc_v4l2_fmtdesc,&fmtdesc,"",tab);
}
memset(&format,0,sizeof(format));
format.type = V4L2_BUF_TYPE_VBI_CAPTURE;
@@ -230,7 +231,7 @@ static int dump_v4l2(int fd, int tab)
perror("VIDIOC_G_FMT(VBI_CAPTURE)");
} else {
printf(" VIDIOC_G_FMT(VBI_CAPTURE)\n");
- print_struct(stderr,desc_v4l2_format,&format,"",tab);
+ print_struct(stdout,desc_v4l2_format,&format,"",tab);
}
printf("\n");
}
@@ -244,7 +245,7 @@ static int dump_v4l2(int fd, int tab)
if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
continue;
printf(" VIDIOC_QUERYCTRL(BASE+%d)\n",i);
- print_struct(stderr,desc_v4l2_queryctrl,&qctrl,"",tab);
+ print_struct(stdout,desc_v4l2_queryctrl,&qctrl,"",tab);
}
for (i = 0;; i++) {
memset(&qctrl,0,sizeof(qctrl));
@@ -254,7 +255,7 @@ static int dump_v4l2(int fd, int tab)
if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
continue;
printf(" VIDIOC_QUERYCTRL(PRIVATE_BASE+%d)\n",i);
- print_struct(stderr,desc_v4l2_queryctrl,&qctrl,"",tab);
+ print_struct(stdout,desc_v4l2_queryctrl,&qctrl,"",tab);
}
return 0;
}

Privacy Policy