On Thursday 18 January 2007 00:03, Martin Dauskardt wrote:
> >> 'encoder VBI'! Has nothing to do with the MPEG buffers, but all
> >> with the /dev/vbi0 device. Do you use /dev/vbi0 at all?
> >
> >yes, the pvrinput-plugin uses vbi (teletext).
>
> aha! I removed the vbi code in the pvrinput-plugin with an #if
> 0-loop:
>
> void cPvrReadThread::Action(void)
> {
>     unsigned char buffer[BUFFSIZE];
>     int r;
>     struct v4l2_format vbifmt;
>     struct v4l2_ext_controls ctrls;
>     struct v4l2_ext_control  ctrl;
>     active = true;
> #if 0
>     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));
>                 }
>         }
> #endif
>       while (active)
>       {
>               r = read(video_fd, buffer, BUFFSIZE);
>               if (r == -1)
>               {
>                       log(0, "Error reading from video device, %d:%s", errno,
> strerror(errno)); break;
>               }
>               if ((r > 0) && (Paused == 0))
>               {
>                       ParseProgramStream(buffer, r);
>               }
>       }
> }
>
>
> and now it works (of course without teletext)! no more dmesg-errors!
> Should I try to increase the enc vbi buffers, or is the vbi-stuff in
> trunk still in progress?

No, that should be OK. Question: are you ever reading from vbi_fd? Or 
just using ioctl? This might be a subtle driver bug: it is reading VBI 
data to embed into the MPEG stream, but it may think that you at the 
same time also try to read it from the vbi0 device. But that is only 
true when the vbi0 is actually read from at least once.

So if you actually read from vbi0, then that is the reason for these 
messages. If you don't read from vbi0, then it is a driver bug. 
Although I don't see why that would also lead to MPEG stream errors.

Regards,

        Hans

_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to