-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCDeviceProbe.cpp
More file actions
39 lines (31 loc) · 772 Bytes
/
SCDeviceProbe.cpp
File metadata and controls
39 lines (31 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <dlfcn.h>
#include <linux/dvb/ca.h>
#include <vdr/channels.h>
#include <vdr/ci.h>
#include <vdr/dvbdevice.h>
#include <vdr/dvbci.h>
#include <vdr/thread.h>
#include "SCDeviceProbe.h"
#include "SCDVBDevice.h"
SCDeviceProbe *SCDeviceProbe::probe=0;
void SCDeviceProbe::Install(void)
{
if(!probe) probe=new SCDeviceProbe;
}
void SCDeviceProbe::Remove(void)
{
if(probe!=0)
delete probe;
probe=0;
}
bool SCDeviceProbe::Probe(int Adapter, int Frontend)
{
isyslog("DVBAPI: SCDeviceProbe::Probe capturing device %d/%d",Adapter,Frontend);
new SCDVBDevice(Adapter,Frontend,SCDVBDevice::DvbOpen(DEV_DVB_CA,Adapter,Frontend,O_RDWR));
return true;
}