aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-11-19 10:33:05 +0000
committerLuca Abeni <lucabe72@email.it>2007-11-19 10:33:05 +0000
commit952062909dee8c70ca3fa81ab8f237fb735cbc4f (patch)
tree1ea99915d5a1510ac60ce4c005a561d65fbd4071
parent086119b3f39cffad077f926732e952d28b428f98 (diff)
downloadffmpeg-952062909dee8c70ca3fa81ab8f237fb735cbc4f.tar.gz
Convert perror() in av_log() in bktr.c.
Currently untested; someone with the correct OS and hardware should test it and report if it works. Originally committed as revision 11060 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/bktr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/bktr.c b/libavformat/bktr.c
index 7bf51d797e..0ea8dfb02c 100644
--- a/libavformat/bktr.c
+++ b/libavformat/bktr.c
@@ -130,11 +130,11 @@ static int bktr_init(const char *video_device, int width, int height,
*tuner_fd = open("/dev/tuner0", O_RDONLY);
if (*tuner_fd < 0)
- perror("Warning: Tuner not opened, continuing");
+ av_log(NULL, AV_LOG_ERROR, "Warning. Tuner not opened, continuing: %s\n", strerror(errno));
*video_fd = open(video_device, O_RDONLY);
if (*video_fd < 0) {
- perror(video_device);
+ av_log(NULL, AV_LOG_ERROR, "%s: %s\n", video_device, strerror(errno));
return -1;
}
@@ -157,18 +157,18 @@ static int bktr_init(const char *video_device, int width, int height,
geo.oformat |= METEOR_GEO_EVEN_ONLY;
if (ioctl(*video_fd, METEORSETGEO, &geo) < 0) {
- perror("METEORSETGEO");
+ av_log(NULL, AV_LOG_ERROR, "METEORSETGEO: %s\n", strerror(errno));
return -1;
}
if (ioctl(*video_fd, BT848SFMT, &c) < 0) {
- perror("BT848SFMT");
+ av_log(NULL, AV_LOG_ERROR, "BT848SFMT: %s\n", strerror(errno));
return -1;
}
c = bktr_dev[idev];
if (ioctl(*video_fd, METEORSINPUT, &c) < 0) {
- perror("METEORSINPUT");
+ av_log(NULL, AV_LOG_ERROR, "METEORSINPUT: %s\n", strerror(errno));
return -1;
}
@@ -177,19 +177,19 @@ static int bktr_init(const char *video_device, int width, int height,
video_buf = (uint8_t *)mmap((caddr_t)0, video_buf_size,
PROT_READ, MAP_SHARED, *video_fd, (off_t)0);
if (video_buf == MAP_FAILED) {
- perror("mmap");
+ av_log(NULL, AV_LOG_ERROR, "mmap: %s\n", strerror(errno));
return -1;
}
if (frequency != 0.0) {
ioctl_frequency = (unsigned long)(frequency*16);
if (ioctl(*tuner_fd, TVTUNER_SETFREQ, &ioctl_frequency) < 0)
- perror("TVTUNER_SETFREQ");
+ av_log(NULL, AV_LOG_ERROR, "TVTUNER_SETFREQ: %s\n", strerror(errno));
}
c = AUDIO_UNMUTE;
if (ioctl(*tuner_fd, BT848_SAUDIO, &c) < 0)
- perror("TVTUNER_SAUDIO");
+ av_log(NULL, AV_LOG_ERROR, "TVTUNER_SAUDIO: %s\n", strerror(errno));
c = METEOR_CAP_CONTINOUS;
ioctl(*video_fd, METEORCAPTUR, &c);