Mailing List archive

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

[linux-dvb] Re: Reading in 188 byte chunks?



On Thu, Nov 25, 2004 at 08:57:26PM +0100, Josef Wolf wrote:
> On Thu, Nov 25, 2004 at 07:51:26PM +0100, Johannes Stezenbach wrote:
> 
> > > The API-documentation says that reading from /dev/dvb/adapterX/dvrY is to
> > Where exactly do the docs say that? Because if they are wrong and
> > must be corrected.
> 
> That would be good news to me.  Seems that I am just mis-reading it.
> I refer to http://www.linuxtv.org/download/dvb/linux-dvb-api-1.0.0.pdf,
> section 3.2.3, where the read() call to the dvr device is described:
> 
>   When returning section data the driver always tries to return a
>   complete single section (even though buf would provide buffer space
>            ^^^^^^
>   for more data).
> 
> Hmm, now that I have re-read it several times with the context of
> your answer in my mind, it seems to me that my mis-understanding has
> to do with "section data" vs "PES data".  Seems that PES (set with
> DMX_SET_PES_FILTER) has 188-byte-blocks while sections (set with
> DMX_SET_FILTER) have 4096-byte-blocks.  Unfortunately, the API doc
> don't say much abot the various stream/packet types/lengths.  Where
> can I find more information about this topic?

188 byte is the lenght of a TS packet. PES packets have variable
length, as do sections. Section data is normally low-bandwidth,
so the API does the right thing to simplify section handling.
For PES we don't support a packet interface at all, instead
we output a payload-only byte stream (i.e. TS header and adaptation
field stripped); applications must search for PES start code
themselves.

For high-bandwidth section data the API might be a bottleneck.

For more info read the MPEG-2 spec. See
http://212.227.36.83/linuxtv/wiki/index.php/MPEG2_Standard

Johannes




Home | Main Index | Thread Index