Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Question regarding PES/Section filters..



Hi All

I'm moving some code accross from a PACE box (VxWorks based) to linux with a 
DVB card. I have some questions involving PES/Section filters.  I then read 
the data from these filters, and send it elsewhere.  It continues to sit 
there reading whatever data is coming from the demux device, and sending it 
on.

Firstly, the correct way to do this is first open a demux device in blocking 
mode, set the PES filter via DMX_SET_PES_FILTER., and then do a 
"read(Filter->fd,buf,sizeof(buf));" to read the data from the demux device.

It needs to be pointed out that on the PACE STB, I am use to setting up a 
call-back, which will occur whenever a full PES or Section is received.  I 
can easily then send this one.

The API documentation tells me that when returning data via a READ command, 
the driver attempts to return a full PES packet, or Section.  This is good, 
but it doesn't *always* return a full packet, nor are the headers always at 
th begining of the packet of data). IE if the buffer is the right/wrong size, 
I could get 50bytes of a 75 byte PES packet in the first packet of Data, then 
the other  25 bytes in the begining of the next packet of data, then the 
first 25 bytes of the next PES packets halfway through the packet of data 
(does that makes sense?). 

The problem is that my client (elsewhere), when it recieves a packet of data, 
*always* expects the start of the packet to be the header, and it to be a 
full packet (either PES or Section).

Hopefully no-one has fallen asleep yet (often background helps).  So, my 
questions are:

i) Is it possible to get the Driver/DVB card to *always* return a full 
PES/Section (IE Wait until full section/header has arrived, then return the 
data)?  Or at least  the header is always at the start of the data returned?

ii) If not, what suggestions do you have regarding setting up my own code to 
return full PES/Section packets?

thanks for your time, and help

Mike


--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index