Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Help on use of DMX_OUT_TAP
jng_junk@greenmail.demon.co.uk wrote:
>
> int fd = open("/dev/dvb/adapter0/demux0", O_RDWR);
> if (fd == 0) return EIO;
0 is a valid value for fd.
> struct dmx_pes_filter_params pesFilterParams;
> pesFilterParams.pid = (uint16_t)pid;
> pesFilterParams.input = DMX_IN_FRONTEND;
> pesFilterParams.output = DMX_OUT_TAP;
> pesFilterParams.pes_type = DMX_PES_OTHER;
> pesFilterParams.flags = DMX_IMMEDIATE_START;
>
> int status;
> if ((status = ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams)) < 0) {
> close(fd);
> perror("Error:");
> return EIO;
> }
>
> I call the code above once for each separate file/pid. Then I read from
> each 'fd'. But I don't get the data stream I was expecting. I was
> expecting to be deluged with data, but instead I seem to receive data at a
> slow rate. Occasionally, read() even returns with an error corresponding
> to "buffer overflow", which also seems strange.
"buffer overflow" means you didn't read the data fast enough.
Otherwise your approach should work.
Johannes
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index