* VIVI driver issue with xawtv resize in low resolution mode
@ 2009-03-27 21:57 dean
0 siblings, 0 replies; only message in thread
From: dean @ 2009-03-27 21:57 UTC (permalink / raw)
To: video4linux-list, Mauro Carvalho Chehab
xawtv and/or libv4l2 is unmapping the V4L2 buffers before stopping the
stream. This causes xawtv and/or libv4l2 to retry VIDIOC_STREAMOFF
multiple times before failing and the stream does not get restarted.
Tested on Ubuntu 8.10 with kernel upgraded to 2.6.29 and with
v4l-dvb-b1596c6517c9.
To reproduce (does not fail if running with XV extensions):
1) load vivi driver
2) xawtv -noxv -nodga -noxv-image -c /dev/video0 (where video0 is vivi
device, xawtv-3.95)
3) Resize the xawtv window.
4) Video output will stop and will not restart.
Should VIDIOC_STREAMOFF return -EINVAL if the stream is already off? Is
it ok to return 0 if the stream was turned off by an user application
unmapping the buffers before stopping the stream? In this example,
videobuf_vm_close in videobuf-vmalloc.c is called before
vidioc_streamoff in vivi.c. videobuf_vm_close stops streaming in
videobuf-vmalloc.c such that -EINVAL is returned on any subsequent
VIDIOC_STREAMOFF ioctls. xawtv will not resume streaming in this case.
This also affects other drivers using videobuf-vmalloc. A possible
workaround is the following(not an official patch) code below:
static int vidioc_streamoff(struct file *file, void *priv, enum
v4l2_buf_type i)
{
struct vivi_fh *fh = priv;
if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (i != fh->type)
return -EINVAL;
return videobuf_streamoff(&fh->vb_vidq);
}
to:
static int vidioc_streamoff(struct file *file, void *priv, enum
v4l2_buf_type i)
{
struct vivi_fh *fh = priv;
if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (i != fh->type)
return -EINVAL;
(void) videobuf_streamoff(&fh->vb_vidq);
return 0;
}
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-27 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 21:57 VIVI driver issue with xawtv resize in low resolution mode dean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox