
linuxtv at nzbaxters
Feb 11, 2007, 1:26 PM
Post #11 of 11
(4774 views)
Permalink
|
|
Re: the application is not reading fast enough
[In reply to]
|
|
> On Thursday 18 January 2007 20:58, Martin Dauskardt wrote: >> ok, it seems as if it is not the pvrinput-plugin (which does only open > vbi0 for ioctls, without reading from it) but the teletext-plugin. >> >> The log with ivtvctl -D3: > > Based on the log and a peek at the code I can confirm this is a driver > bug. If the vbi device is open, but is never read from, then the driver > erroneously thinks that someone is reading from the vbi device. I'll > see if I can fix that today. > Martin, did this fix this "VBI stream buffers are full" problem for you?? I'm also running VDR/pvrinput (with the v4l2 IOCTL changes) [vdruser [at] medi pvrinput]$ diff -Naur device.c device.c.org --- device.c 2007-02-12 10:22:01.000000000 +1300 +++ device.c.org 2007-02-12 10:24:14.000000000 +1300 @@ -404,29 +404,29 @@ struct v4l2_ext_control ctrl; active = true; -// if (vbi_fd > 0) { -// -// ctrl.id = V4L2_CID_MPEG_STREAM_VBI_FMT; -// ctrl.value = V4L2_MPEG_STREAM_VBI_FMT_IVTV; -// -// ctrls.ctrl_class=V4L2_CTRL_CLASS_MPEG; -// ctrls.controls=&ctrl; -// ctrls.count=1; -// -// if (ioctl(vbi_fd, VIDIOC_S_EXT_CTRLS, &ctrls) != 0) { -// log(0, "Error setting vbi mode, %d:%s", errno, strerror(errno)); -// } -// else { -// log(3, "cPvrReadThread::Action: V4L2_CID_MPEG_STREAM_VBI_FMT successfully set."); -// } -// -// vbifmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; -// vbifmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B; -// if (ioctl(vbi_fd, VIDIOC_S_FMT, &vbifmt) < 0) { -// log(0, "Error setting vbi mode, %d:%s", errno, strerror(errno)); -// } -// } -// + if (vbi_fd > 0) { + + ctrl.id = V4L2_CID_MPEG_STREAM_VBI_FMT; + ctrl.value = V4L2_MPEG_STREAM_VBI_FMT_IVTV; + + ctrls.ctrl_class=V4L2_CTRL_CLASS_MPEG; + ctrls.controls=&ctrl; + ctrls.count=1; + + if (ioctl(vbi_fd, VIDIOC_S_EXT_CTRLS, &ctrls) != 0) { + log(0, "Error setting vbi mode, %d:%s", errno, strerror(errno)); + } + else { + log(3, "cPvrReadThread::Action: V4L2_CID_MPEG_STREAM_VBI_FMT successfully set."); + } + + vbifmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; + vbifmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B; + if (ioctl(vbi_fd, VIDIOC_S_FMT, &vbifmt) < 0) { + log(0, "Error setting vbi mode, %d:%s", errno, strerror(errno)); + } + } + while (active) { r = read(video_fd, buffer, BUFFSIZE); _______________________________________________ ivtv-devel mailing list ivtv-devel [at] ivtvdriver http://ivtvdriver.org/mailman/listinfo/ivtv-devel
|