Re: Bug in PAT generator

Arnaud de Bossoreille de Ribou <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
Hi Johann

On Tue, Sep 23, 2003, Johann Hanne wrote:
> You're right. I was mislead by the comment "header + CRC_32", actually it's
> "rest of header + CRC_32", and i was using the i_length field for copying the
> PSI section into a TS packet. Is there a better indicator for where the
> actual PSI data is (i'm using p_data), and how long it is (i'm now using
> i_length+3)?

Here the "header" means the PAT header (without the PSI header).

You can use p_payload_start and p_payload_end to know the length og the
PSI section without the PSI header.

> Furthermore my assumption that creating the PAT and copying it into a TS
> packet is all I have to do seems to be completely wrong, as VLC doesn't seem to
> like it. Also, the PAT-TS-packets coming from the satellites seem be somewhat
> different from what ISO/IEC 31818-1 says?? The section_syntax_indicator is
> set to 0, the reserved bits are set to 0 (the libdvbpsi PAT creator sets them
> to 1), the section_length field is always set to 0xb0 (176) and the
> section_number seems to be a per-transponder constant (I got 0xe9, 0xc7 and 0xc1)...?!
> Is there a extra spec for DVB PATs?

You have to forge TS packets with the section's data. VLS does in
src/dvbpsi.cpp. Look at C_DvbPsiTable::TsWrite (and TsReset...)

ISO/IEC 31818-1 says explicitly that reserved bits should be set to 1.
As far as I remember it also says that section_syntax_indicator should
be set to 1 for the PAT and PMT because they have version, validity, crc
and extra information.

DVB PAT and ISO/IEC 31818-1 PAT are exactly the same. The DVB
specification about PSI is just an "add-on".

Cheers,

-- 
Arnaud

-- 
This is the libdvbpsi-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.