UPollaehne Posted May 8, 2006 Share Posted May 8, 2006 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? Quote Link to comment
Griga Posted May 8, 2006 Share Posted May 8, 2006 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... Quote Link to comment
UPollaehne Posted May 8, 2006 Author Share Posted May 8, 2006 (edited) I hope it helps...<{POST_SNAPBACK}> 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 May 8, 2006 by UPollaehne Quote Link to comment
Griga Posted May 8, 2006 Share Posted May 8, 2006 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. Quote Link to comment
UPollaehne Posted May 8, 2006 Author Share Posted May 8, 2006 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.<{POST_SNAPBACK}> 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? Quote Link to comment
UPollaehne Posted May 10, 2006 Author Share Posted May 10, 2006 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. Quote Link to comment
Guest Lars_MQ Posted May 10, 2006 Share Posted May 10, 2006 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... Quote Link to comment
UPollaehne Posted May 10, 2006 Author Share Posted May 10, 2006 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...<{POST_SNAPBACK}> It would be really nice to know which one. Thanks in advance. Quote Link to comment
Guest Lars_MQ Posted May 10, 2006 Share Posted May 10, 2006 AVFormat: Byte; FEC: Byte; SatModulation: Byte; It's the byte after FEC Quote Link to comment
UPollaehne Posted May 10, 2006 Author Share Posted May 10, 2006 AVFormat: Byte; FEC: Byte; SatModulation: Byte; It's the byte after FEC <{POST_SNAPBACK}> Thanks, and this AVFormat is the AC3 marker? Quote Link to comment
Griga Posted May 10, 2006 Share Posted May 10, 2006 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. Quote Link to comment
xck3001 Posted April 28, 2007 Share Posted April 28, 2007 Is there a way to detect if a channel is DVB-S2 by COM? ITuner has no property "SatModulation" ... Quote Link to comment
xck3001 Posted April 28, 2007 Share Posted April 28, 2007 OK, seems like I can't access it directly with ITuner, but by GetChannelList()[i,10] it get's transmitted. And I'm using GetChannelList() anyway Quote Link to comment
xck3001 Posted April 28, 2007 Share Posted April 28, 2007 (edited) 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 April 28, 2007 by xck3001 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.