Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] reading from demux
Hello,
my device is skystar 2.6c (stv0299 + skystar2), kernel version is
vanilla 2.6.9.
I want to setup demux devices for pid filtering and non-blocking reads
but I don't succeed.
The setup sequence is:
1. fd = open ("/dev/dvb/adapter0/demux0", O_RDWR);
2. ioctl (fd, DMX_SET_PES_FILTER, ¶ms);
where params is set as following
params.pid = pid;
params.input = DMX_IN_FRONTEND;
params.output = DMX_OUT_TAP;
params.pes_type = DMX_PES_OTHER;
params.flags = DMX_IMMEDIATE_START;
3. fcntl (fd, F_SETFL, fcntl (fd, F_GETFL) | O_NONBLOCK);
Then I am polling with select() for data to read and subsequently read a
multiple of 188 bytes.
The result of the read call is not clear to me:
a) If I request video data, I always get an overflow.
b) If I request at least 188 bytes of audio, I frequently get no
multiple of 188 bytes.
c) If I request less then 188 bytes of audio, I always get an overflow.
Why does this happen? I would have thought that the demux device always
provides data in multiples of 188 bytes because that is how the device
works. If that were not the case why can't I read less than 188 bytes?
Is the setup sequence not correct?
Regards
Stephan
Home |
Main Index |
Thread Index