Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: svdr GRAB & NEWSTRUCT
Andreas Schultz wrote:
>
> Hi List,
>
> Just found a problem with the GrabImage() method and the NEWSTRUCT driver, it
> just don't work.
>
> Here is a small patch to fix the problem
>
> ===== dvbdevice.c 1.4 vs edited =====
> --- 1.4/dvbdevice.c Sun Sep 8 19:00:46 2002
> +++ edited/dvbdevice.c Thu Sep 12 20:05:50 2002
> @@ -200,7 +200,11 @@
>
> bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int
> SizeX, int SizeY)
> {
> - int videoDev = DvbOpen(DEV_VIDEO, CardIndex(), O_RDWR, true);
> + char buffer[PATH_MAX];
> + snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, CardIndex());
> + int videoDev = open(buffer, O_RDWR);
> + if (videoDev < 0)
> + LOG_ERROR_STR(buffer);
> if (videoDev >= 0) {
> int result = 0;
> struct video_mbuf mbuf;
Thanks. Thinking about it I see a general problem here: what if there is
already a device that occupies /dev/video0 (like, for instance, an MPEG
encoder card)? In that case the first DVB card would be linked to /dev/video1
instead of /dev/video0 (or is this a wrong assumption?).
Is there a way for the application to find out which /dev/videoN belongs to a
specific DVB card? Currently VDR just assumes that for instance the DVB card
accessible as /dev/ost/frontend0 (or /dev/dvb/adapter0 with the NEWSTRUCT driver)
also uses /dev/video0. But it would appear that that's not necessarily true.
What if a system has three DVB cards, the first and third one being "full featured",
while the second one is a "budget card". Apparently the two "full featured" cards
are connected to /dev/video0 and /dev/video1.
Can anybody (maybe one of the driver developers?) comment on this?
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
Home |
Main Index |
Thread Index