private void ReadDvbsChannels(string zip, string filename, ChannelList channels, out byte[] fileContent, int entrySize) { fileContent = ReadFileContent(zip, filename); if (fileContent == null) { return; } this.DataRoot.AddChannelList(channels); int count = fileContent.Length / entrySize; DataMapping mapping = dvbsMappings.GetMapping(entrySize); channels.MaxChannelNameLength = mapping.Settings.GetInt("lenName") / 2; mapping.SetDataPtr(fileContent, 0); for (int slotIndex = 0; slotIndex < count; slotIndex++) { SatChannel ci = new SatChannel(slotIndex, channels.SignalSource, mapping, this.DataRoot, c.SortedFavorites, this.serviceProviderNames); if (ci.InUse) { this.DataRoot.AddChannel(channels, ci); } mapping.BaseOffset += entrySize; } }
private void ReadAstraHdPlusChannels(string zip) { this.hdplusFileContent = ReadFileContent(zip, "map-AstraHDPlusD"); if (hdplusFileContent == null || c.hdplusChannelLength == 0) { return; } this.DataRoot.AddChannelList(this.hdplusChannels); int entrySize = c.hdplusChannelLength; int count = hdplusFileContent.Length / entrySize; DataMapping mapping = hdplusMappings.GetMapping(entrySize); mapping.SetDataPtr(hdplusFileContent, 0); for (int slotIndex = 0; slotIndex < count; slotIndex++) { SatChannel ci = new SatChannel(slotIndex, SignalSource.AstraHdPlus, mapping, this.DataRoot, c.SortedFavorites, this.serviceProviderNames); if (ci.InUse) { this.DataRoot.AddChannel(this.hdplusChannels, ci); } mapping.BaseOffset += entrySize; } }