Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Getting the Frontend File Descriptor from a plugin.
Is there a recomended way to access the frontend of the cDvbDevice using
the plugin interface? I'm trying to make a Signal / Noise plugin, but the
only way I was able to access the frontend was if I patched the
dvbdevice.h with a getFrontend() function. Thats not very elegant :)
My current somewhat working, but very ugly code is here:
http://www.arseth.org/php/vdr-snr-0.0.1.tgz
And the patch to dvbdevice is:
diff -c vdr-1.1.20_clean/dvbdevice.c vdr-1.1.20/dvbdevice.c
*** vdr-1.1.20_clean/dvbdevice.c Sat Dec 14 11:52:13 2002
--- vdr-1.1.20/dvbdevice.c Fri Jan 17 21:42:05 2003
***************
*** 268,274 ****
// Devices that are present on all card types:
! int fd_frontend = DvbOpen(DEV_DVB_FRONTEND, n, O_RDWR | O_NONBLOCK);
// Devices that are only present on cards with decoders:
--- 268,274 ----
// Devices that are present on all card types:
! fd_frontend = DvbOpen(DEV_DVB_FRONTEND, n, O_RDWR | O_NONBLOCK);
// Devices that are only present on cards with decoders:
diff -c vdr-1.1.20_clean/dvbdevice.h vdr-1.1.20/dvbdevice.h
*** vdr-1.1.20_clean/dvbdevice.h Sun Dec 15 15:45:29 2002
--- vdr-1.1.20/dvbdevice.h Fri Jan 17 22:19:19 2003
***************
*** 38,43 ****
--- 38,44 ----
///< \return True if any devices are available.
private:
fe_type_t frontendType;
+ int fd_frontend;
int fd_osd, fd_audio, fd_video, fd_dvr;
int OsdDeviceHandle(void) const { return fd_osd; }
protected:
***************
*** 47,52 ****
--- 48,54 ----
virtual ~cDvbDevice();
virtual bool HasDecoder(void) const;
+ int getFrontend() {return fd_frontend;}
// OSD facilities
private:
Mvh. Are Årseth
| are@arseth.org | aaarseth@atmel.com | Tlf: 73 98 49 58 | Mob: 41 00 05 48
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index