Mailing List archive

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

[linux-dvb] Data returned by read() when doing PES filtering



Hi there. I've got a couple of questions on the data returned by read() 
when doing PES filtering, but I'm not 100% sure how it all works, so 
please excuse any mistakes.

I am reading from the /dev/../demux0 device not the /dev/../dvr0 device. I
read in the documentation that the data returned in these situations is in
different formats; demux0 returns section data and dvr0 returns PES data.  
I'm actually wanting PES data (so I can play it in mplayer) but I'm
reading from demux0, so I need to convert the data after reading it. This
is where I start to get a bit hazy.

I think all I need to do is read blocks of data from demux0, prepend each
block with a PES header, and write it to my output file. I tried doing
this by hand, and also using the mpegtools library. As an aside, I
couldn't find any documentation on the mpegtools library, so if anyone can 
point me at it I'd be very grateful.

Anyway, whichever implementation I use, the result is the same. The file 
is corrupted in some way, but not so much that mplayer doesn't touch it. 
It tries to play it, and you can make some sort of picture out, but it is 
badly corrupted; and mplayer eventually crashes because of it.

Does anybody know what I am doing wrong, or have suggestions of how best 
to do this? I have a suggestion for the DVB drivers: is it possible to add 
an ioctl option so that demux0 can return PES data or section data? Does 
this make sense, as I said I'm 100% sure about all this?

Thanks very much for any help,

James.



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



Home | Main Index | Thread Index