Re: [linux-dvb] How to create a filter which can filte a whole packet(188 byte with 0x47)

Christophe Thommeret <[email protected]>
Newsgroups gmane.linux.drivers.video-input-infrastructure,gmane.linux.drivers.dvb
Message-ID <[email protected]>
Le jeudi 5 novembre 2009 14:15:33, wdy9927 a écrit :
> it seems like the sec_filter and the pes_filter cann't do that.
> is there other ways?
> 

This should do what you want:

struct dmx_pes_filter_params pesFilterParams;
dmx_pes_type_t pestype = DMX_PES_OTHER;
int dmx = open("/dev/dvb/adapter0/demux0", O_RDWR | O_NONBLOCK );
pesFilterParams.pid = pid;
pesFilterParams.input = DMX_IN_FRONTEND;
pesFilterParams.output = DMX_OUT_TAP;
pesFilterParams.pes_type = pestype;
pesFilterParams.flags = DMX_IMMEDIATE_START;
ioctl( dmx, DMX_SET_PES_FILTER, &pesFilterParams);

-- 
Christophe Thommeret
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.