Jump to content

Format of channels.dat


UPollaehne

Recommended Posts

Hi,

 

in the ShortCutter_Source.zip I found a description of the channels.dat structure.

First tests with Java were successful to the point that there was one byte at the end which I do not know what to do.

 

So my question is: Is the field Encrypted of TChannel a Byte or a Word?

Link to comment

The following facts have to be considered when accessing the channels.dat:

 

- The Delphi Compiler does a 4-bytes-alignment for all DWord values. So if a value that occupies only one byte is followed by a DWord or Integer, there will be up to three unused bytes in between (e.g. after the first member "Tunertype", an enumerated type, that is coded as a byte, and the subsequent DWord Frequency).

 

Word values are aligned at 2-byte-boundaries respectively.

 

- The "Short String" type that is used in the structure consists of 1 length byte, followed by the characters. Thus String[25] occupies 26 bytes - the length byte and a maximum of 25 characters (some or all of them may be unused).

 

- The "Encrypted" member is a byte that contains the following information:

 

Bit 0 set: Channel is encrypted.

Bit 1 set: EPG is excluded from the "What's Now" tab.

Bit 2 set: Channel provides RDS (radio text).

 

I hope it helps...

Link to comment
I hope it helps...

Oh yes, this helps a lot. Many thanks.

I knew that Pascal strings start with a length byte but I was not aware of the padding bytes.

 

BTW:

  • An enumeration in Delphi depends on the MINENUMSIZE (default 1 Byte).
  • A DWord hast 2 Words.
  • A Word has 2 Bytes.
  • DWord and Word types are stored in Intel (Little Endian) order.

So, in the light of this new knowledge I have to count bytes... ;)

 

And additional thanks for the description of the "Encrypted" byte.

Edited by UPollaehne
Link to comment
An enumeration in Delphi is stored as DWord.

No. Depends on the MINENUMSIZE compiler directive. The default is 1 byte (used in DVBViewer), which means enumerations with up to 256 values are stored as a byte.

Link to comment
No. Depends on the MINENUMSIZE compiler directive. The default is 1 byte (used in DVBViewer), which means enumerations with up to 256 values are stored as a byte.

Thanks for the correction (I edited my posting). This clearly shows that I have to thoroughly look up the different types used in this structure. ;)

 

But the other statements hold true?

Link to comment

After getting around the Java-Does-Not-Have-Unsigned-Types issue I finally have a working reader but there remain some quirks:

 

There is an extra byte at the end of each channel definition.

 

There is a discrepancy between the FEC value stored in the channels.dat and the value exported to an INI file. While there is value 0 in the DAT file the exported INI contains -1. But reading the Channel ShortCutter source I do not know what a value of 0 does mean for FEC. ;)

 

The GE does not export NetworkID and SatModulation to INI files whereas the Pro does.

Link to comment
Guest Lars_MQ
NetworkID and SatModulation to INI files whereas the Pro does.

The NID more the ONID (OriginalNetworkID)(word value) will be important in the future. The SatModulation (byte) is for upcoming DVB-S2 cards. The NID is present in the channelsdat, the SatModulation is in one of the unused bytes, I'll have to lookup which one...

Link to comment
The NID more the ONID (OriginalNetworkID)(word value) will be important in the future. The SatModulation (byte) is for upcoming DVB-S2 cards. The NID is present in the channelsdat, the SatModulation is in one of the unused bytes, I'll have to lookup which one...

 

It would be really nice to know which one. Thanks in advance.

Link to comment

AVFormat:

 

Low Nibble = 0: MP2 audio stream

Low Nibble = 1: AC3 audio stream

 

High Nibble = 0: MPEG2 video stream

High Nibble = 1: H.264 video stream

 

Other values are reserved for additional audio/video formats.

Link to comment
  • 11 months later...

Hm, seems to be a little problematic:

For Premiere HD (which should be DVB-S2) I get SatModulation = 1, the same for Premiere 1 (which is normal DVB-S).

 

For Sat1HD and Pro7HD it works: SatModulation is 2.

 

Why does the value differ from these two DVB-S2 HDTV channels? Is the encryption a problem?

Normal viewing the Premiere HD channel in DVBViewer works, so an incorrect configured channel shouldn't be the problem.

Edited by xck3001
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...