> > The patch is wrong.
>
> The patch fixes the unsafe way vivi is doing multiple opens right now
> and I am uninterested in spending anymore time trying to fix up vivi
> right now. If you could fix vivi up that would be great.
If the issue is specific to to vivi, that's ok. I'm just wandering if the
changesets would break a driver for a real device.
Unfortunately, I couldn't test your patch on a real hardware. The hardware I use
here to test PCI boards is currently broken[1].
> > 2) you can see a program with an userspace app and record the
> > stream with another app. Both xawtv and xdtv do this, when you
> > ask for record: They call mencoder, asking it to read from
> > /dev/video0. This way, you'll have the tv app reading, using
> > mmap() or overlay methods, while mencoder is calling read() to
> > receive the stream.
>
> Yes, I know. But, vivi has no permission control mechanism right now
> for differentiating between streaming file handles and control ones.
What the other drivers do is to implement a small code for this lock. You may
take a look on res_get(), for example, on cx88.
Btw, we had this lock on past versions of vivi, but this were removed on this
changeset:
changeset: 6275:cba23263534b
user: bphilips@xxxxxxx <bphilips@xxxxxxx>
date: Thu Sep 27 20:55:17 2007 -0300
files: linux/drivers/media/video/vivi.c
description:
V4L: vivi.c remove the "resource" locking
The "resource" locking in vivi isn't needed since
streamon/streamoff/read_stream do mutual exclusion using
q->reading/q->streaming.
Maybe we can just revert this changeset.
> > Yet, vivi should allow multiple open to allow "panel" applications, to
> > be compliant with V4L2 API.
>
> Yes, but someone needs to add the code to support this in vivi. And
> until someone does vivi can only support one open at a time without
> crashing.
This is a small regression, but I think it is OK for now.
[1] I tried to fix it during the weekend, without success. The Ethernet
interface is not working fine - most of the time, it doesn't send packets.
Also, with 2 PCI's inside, only one is working fine. If I plug 3 PCI devices,
all devices work badly. I tried to replace the power supply, but the troubles
still continue. I think I'll need to start saving some money to buy a newer
hardware :(
Cheers,
Mauro
_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer
[Linux Media]
[Older V4L]
[Linux DVB]
[Video Disk Recorder]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Util Linux NG]
[Xfree86]
[Free Photo Albums]
[Fedora Users]
[Fedora Women]
[ALSA Users]
[ALSA Devel]
[SSH]
[Linux USB]
 |
 |
-->