Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: apps/test/video.c not working with new driver?
Johannes Stezenbach wrote:
> Benjamin Reichardt wrote:
> > I used the apps/test/video.c
>
> ...
>
> > . With the old
> > driver this was working fine.
>
> ...
>
> > What else could be the reason? Hav the semantics of /dev/video0
> > changed and apps/test/video still uses the old way of accessing
> > it? What am I missing?
>
> It's not a bug, it's a feature. video.c should be changed to keep
> the /dev/video device open. If the program dies, video DMA should
> be stopped.
Tank you very much.
Searching for "it's a feature", I now found the mails in which Holger
explained this, too . Yesterday I only remembered the first mail
(http://www.linuxtv.org/mailinglists/linux-dvb/2003/01-2003/msg00494.html)
and did not connect "frontend" with /dev/video. Therefore I thougth I
could exclude this possible error since the "frontend" was still
running - there was data on DVB-video-out. In the second mail Holger
explained that also only parts of a DVB device can be powered down
(http://www.linuxtv.org/mailinglists/linux-dvb/2003/01-2003/msg00500.html).
Unfortunately, I did not remember that message.
>
> If you don't like that, you can comment out the following line
> from av7110.c:
> .close = dvb_close
I just inserted a "getchar();" before apps/test/video.c closes
/dev/video, so now the program waits until the user presses a key
before closing /dev/video. This change even works when I invoke
apps/test/video from within a shell skript invoked by /etc/inittab.
In that case, there is, of course, no user who can press a key - but
when my DVB computer is running, I usually want to watch DVB, too
(and I could explicitly kill the video process).
Small diff against linuxtv-dvb-1.0.0-pre2 appended. Probably
unnecessary, since there are not too many "close(fd);" calls to
choose from ;-)
Regards,
Benjamin
diff -ru linuxtv-dvb-1.0.0-pre2/apps/test/video.c linuxtv-dvb-1.0.0-pre2-videopatch/apps/test/video.c
--- linuxtv-dvb-1.0.0-pre2/apps/test/video.c 2002-10-14 10:24:30.000000000 +0200
+++ linuxtv-dvb-1.0.0-pre2-videopatch/apps/test/video.c 2003-03-26 00:13:11.000000000 +0100
@@ -153,6 +153,7 @@
return -7;
}
+ getchar();
close (fd);
return 0;
Home |
Main Index |
Thread Index