finished DVB-C and DVB-S2 implementation of Philips BIN format with Repair / channellib/*Table and s2channellib/*.dat format

This commit is contained in:
Horst Beham
2020-08-10 11:27:05 +02:00
parent bfc12eae66
commit df5d8770be
9 changed files with 444 additions and 137 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.IO;
using System.Linq;
using ChanSort.Api;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Test.Loader.PhilipsBin
{
[TestClass]
public class PhilipsChannellibTest
{
[TestMethod]
public void TestFiles1()
{
var baseDir = Path.GetDirectoryName(this.GetType().Assembly.Location);
var baseFile = Path.Combine(baseDir, "TestFiles1\\Repair\\ChannelList\\chanLst.bin");
var plugin = new ChanSort.Loader.PhilipsBin.SerializerPlugin();
var loader = plugin.CreateSerializer(baseFile);
loader.Load();
var list = loader.DataRoot.GetChannelList(SignalSource.DvbC);
Assert.AreEqual(179, list.Channels.Count);
Assert.AreEqual(179, list.Channels.Count(ch => !ch.IsDeleted));
var ch0 = list.Channels.FirstOrDefault(ch => ch.RecordIndex == 0);
Assert.AreEqual(41, ch0.OldProgramNr);
Assert.AreEqual("Passion HD", ch0.Name);
Assert.IsFalse(ch0.Lock);
Assert.AreEqual((Favorites)0, ch0.Favorites);
Assert.AreEqual(810, ch0.FreqInMhz);
Assert.AreEqual(9999, ch0.OriginalNetworkId);
Assert.AreEqual(461, ch0.TransportStreamId);
Assert.AreEqual(46102, ch0.ServiceId);
Assert.AreEqual(6900, ch0.SymbolRate);
}
}
}

View File

@@ -69,172 +69,173 @@
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="PhilipsChannellibTest.cs" />
<Compile Include="PhilipsS2channellibTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="TestFiles1\Repair\ChannelList\chanLst.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\AntennaAnalogTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\AntennaDigSrvTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\AntennaDigTSTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\AntennaFrqMapTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\AntennaPresetTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\CableAnalogTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\CableDigSrvTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\CableDigTSTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\CableFrqMapTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\channellib\CablePresetTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\adk_user_pref.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\adk_user_pref_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\db_file_info.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\db_file_info_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\favorite.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\favorite_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\lnb.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\lnb_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\satellite.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\satellite_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\service.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\service_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\tuneinfo.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\tuneinfo_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\user_pref.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles1\Repair\ChannelList\s2channellib\user_pref_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\chanLst.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\AntennaAnalogTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\AntennaDigSrvTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\AntennaDigTSTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\AntennaFrqMapTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\AntennaPresetTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\CableAnalogTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\CableDigSrvTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\CableDigTSTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\CableFrqMapTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\channellib\CablePresetTable">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\adk_user_pref.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\adk_user_pref_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\db_file_info.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\db_file_info_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\favorite.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\favorite_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\lnb.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\lnb_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\satellite.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\satellite_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\service.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\service_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\tuneinfo.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\tuneinfo_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\user_pref.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="TestFiles2\Repair\ChannelList\s2channellib\user_pref_backup.dat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>