Patches for Voile to display contents from DVB-NIP file deliveries.
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 8s
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 8s
This commit is contained in:
parent
b50eb3b5e6
commit
0e3c138a1e
@ -379,5 +379,13 @@ namespace skyscraper8.DvbNip
|
||||
{
|
||||
this.sourceHash = sourceHash;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
bootstrapped = false;
|
||||
fluteHits = 0;
|
||||
fluteMisses = 0;
|
||||
flutes = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -250,5 +250,6 @@ namespace skyscraper8.DvbNip
|
||||
listener.TrimmedLength = stream.Position;
|
||||
return listener;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
// This source code was auto-generated by xsd, Version=4.8.9037.0.
|
||||
//
|
||||
namespace skyscraper8.Ietf.FLUTE {
|
||||
using System.Xml.Serialization;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
@ -23,8 +24,9 @@ namespace skyscraper8.Ietf.FLUTE {
|
||||
[System.Xml.Serialization.XmlTypeAttribute(TypeName="FDT-InstanceType", Namespace="urn:IETF:metadata:2005:FLUTE:FDT")]
|
||||
[System.Xml.Serialization.XmlRootAttribute("FDT-Instance", Namespace="urn:IETF:metadata:2005:FLUTE:FDT", IsNullable=false)]
|
||||
public partial class FDTInstanceType {
|
||||
|
||||
private FileType[] fileField;
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
|
||||
private FileType[] fileField;
|
||||
|
||||
private uint schemaVersionField;
|
||||
|
||||
|
||||
@ -169,6 +169,18 @@ namespace skyscraper5.Skyscraper
|
||||
IniSection section = this[category];
|
||||
section[key] = value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public static void WriteIniValue(FileInfo outputIni, string category, string key, string value)
|
||||
{
|
||||
Ini ini;
|
||||
if (outputIni.Exists)
|
||||
ini = new Ini(outputIni.FullName);
|
||||
else
|
||||
ini = new Ini();
|
||||
|
||||
ini.WriteValue(category, key, value);
|
||||
ini.Export(outputIni);
|
||||
}
|
||||
}
|
||||
|
||||
public class IniSection : Dictionary<string,string>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using log4net;
|
||||
using skyscraper5.Skyscraper.IO;
|
||||
using skyscraper5.Skyscraper.Net.Pcap;
|
||||
using skyscraper5.Skyscraper.Plugins;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
@ -17,13 +18,31 @@ namespace skyscraper8.Skyscraper.Net.Pcap
|
||||
{
|
||||
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
|
||||
private PcapWriter[] pcapWriters;
|
||||
private DirectoryInfo outputDirectory;
|
||||
|
||||
|
||||
public void HandlePacket(int pid, byte[] payload)
|
||||
{
|
||||
if (pcapWriters == null)
|
||||
{
|
||||
pcapWriters = new PcapWriter[0x1fff];
|
||||
|
||||
PluginManager pluginManager = PluginManager.GetInstance();
|
||||
string outDirPath = pluginManager.Ini.ReadValue("pcapwriter", "outdir", null);
|
||||
if (!string.IsNullOrEmpty(outDirPath))
|
||||
{
|
||||
outputDirectory = new DirectoryInfo(outDirPath);
|
||||
if (!outputDirectory.Exists)
|
||||
outputDirectory.EnsureExists();
|
||||
}
|
||||
}
|
||||
if (pcapWriters[pid] == null)
|
||||
{
|
||||
string fname = String.Format("{0:X4},{1}.pcap", pid, DateTime.Now.Ticks);
|
||||
if (outputDirectory != null)
|
||||
{
|
||||
fname = Path.Combine(outputDirectory.FullName, fname);
|
||||
}
|
||||
logger.InfoFormat("Opening file for writing: {0}", fname);
|
||||
FileStream fs = File.OpenWrite(fname);
|
||||
pcapWriters[pid] = new PcapWriter(fs, TcpdumpNetworkType.RawIp);
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
using skyscraper5.Skyscraper;
|
||||
using skyscraper5.Skyscraper.Plugins;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace skyscraper8.Skyscraper.Plugins
|
||||
{
|
||||
public class ConfigureFromForeignApplication
|
||||
{
|
||||
private ConfigureFromForeignApplication()
|
||||
{
|
||||
pluginManager = PluginManager.GetInstance();
|
||||
}
|
||||
|
||||
private PluginManager pluginManager;
|
||||
|
||||
private static ConfigureFromForeignApplication instance;
|
||||
public static ConfigureFromForeignApplication GetInstance()
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new ConfigureFromForeignApplication();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void SaveConfig()
|
||||
{
|
||||
pluginManager.SaveConfiguration();
|
||||
}
|
||||
|
||||
public Ini Ini
|
||||
{
|
||||
get
|
||||
{
|
||||
return pluginManager.Ini;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,5 +10,6 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
bool CanHandlePacket(InternetHeader internetHeader, byte[] ipv4Packet);
|
||||
void HandlePacket(InternetHeader internetHeader, byte[] ipv4Packet);
|
||||
bool StopProcessingAfterThis();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ using skyscraper8.Skyscraper.Net.Pcap;
|
||||
using skyscraper8.Skyscraper.Plugins;
|
||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||
using skyscraper8.Skyscraper.Text;
|
||||
using skyscraper5.src.InteractionChannel.Model.Descriptors;
|
||||
|
||||
namespace skyscraper5.Skyscraper.Plugins
|
||||
{
|
||||
@ -31,7 +32,7 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
|
||||
private PluginManager()
|
||||
{
|
||||
_mpePlugins = new List<ISkyscraperMpePlugin>();
|
||||
_mpePluginTypes = new List<Type>();
|
||||
_gpsReceiverFactories = new Dictionary<int, IGpsReceiverFactory>();
|
||||
descriptorBannedTables = new Dictionary<string, bool[]>();
|
||||
descriptorMap = new Dictionary<string, ConstructorInfo[]>();
|
||||
@ -48,7 +49,32 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
|
||||
FileInfo skyscraperMainAssembly = GetSkyscraperMainAssembly();
|
||||
DirectoryInfo skyscraperHome = skyscraperMainAssembly.Directory;
|
||||
LoadIni(skyscraperHome);
|
||||
|
||||
if (skyscraperMainAssembly != null)
|
||||
{
|
||||
DirectoryInfo directory = skyscraperMainAssembly.Directory;
|
||||
logger.DebugFormat("Found skyscraper main assembly at: {0}", directory.FullName);
|
||||
FileInfo[] fileInfos = directory.GetFiles("skyscraper5.*.dll");
|
||||
foreach (FileInfo fileInfo in fileInfos)
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.Info(String.Format("Trying to load: {0}", fileInfo.Name));
|
||||
Assembly loadFile = Assembly.LoadFile(fileInfo.FullName);
|
||||
ScanAssembly(loadFile);
|
||||
logger.Debug(String.Format("Loaded {0}", fileInfo.Name));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.ErrorFormat("Failed to scan assembly {0}", fileInfo.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadIni(DirectoryInfo skyscraperHome)
|
||||
{
|
||||
iniFileInfo = new FileInfo(Path.Combine(skyscraperHome.FullName, iniFilename));
|
||||
if (iniFileInfo.Exists)
|
||||
{
|
||||
@ -61,7 +87,7 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
FileInfo pluginFileInfo = new FileInfo(valuePair.Value);
|
||||
if (!pluginFileInfo.Exists)
|
||||
continue;
|
||||
|
||||
|
||||
if (resolveDirectoryInfos == null)
|
||||
resolveDirectoryInfos = new HashSet<DirectoryInfo>();
|
||||
if (IsOnWindows())
|
||||
@ -84,28 +110,6 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
Debug.WriteLine(String.Format("{0} was not found. Create it using the UI!", iniFileInfo.FullName));
|
||||
Ini = new Ini();
|
||||
}
|
||||
|
||||
|
||||
if (skyscraperMainAssembly != null)
|
||||
{
|
||||
DirectoryInfo directory = skyscraperMainAssembly.Directory;
|
||||
logger.DebugFormat("Found skyscraper main assembly at: {0}", directory.FullName);
|
||||
FileInfo[] fileInfos = directory.GetFiles("skyscraper5.*.dll");
|
||||
foreach (FileInfo fileInfo in fileInfos)
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.Info(String.Format("Trying to load: {0}", fileInfo.Name));
|
||||
Assembly loadFile = Assembly.LoadFile(fileInfo.FullName);
|
||||
ScanAssembly(loadFile);
|
||||
logger.Debug(String.Format("Loaded {0}", fileInfo.Name));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.ErrorFormat("Failed to scan assembly {0}", fileInfo.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private FileInfo GetSkyscraperMainAssembly()
|
||||
@ -193,6 +197,14 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
return _instance;
|
||||
}
|
||||
|
||||
public static void NotifyIniUpdate(Ini newIni)
|
||||
{
|
||||
if (_instance == null)
|
||||
return;
|
||||
|
||||
_instance.Ini = newIni;
|
||||
}
|
||||
|
||||
private Type storageIdAttributeTyoe = typeof(StorageIdAttribute);
|
||||
private Type objectStorageFactoryType = typeof(ObjectStorageFactory);
|
||||
private Type dataStorageFactoryType = typeof(DataStorageFactory);
|
||||
@ -210,7 +222,7 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
private Type ipTrafficHandler = typeof(IpTrafficHandler);
|
||||
|
||||
private List<IDnsParser> _dnsParsers;
|
||||
private List<ISkyscraperMpePlugin> _mpePlugins;
|
||||
private List<Type> _mpePluginTypes;
|
||||
private Dictionary<int, IGpsReceiverFactory> _gpsReceiverFactories;
|
||||
private Dictionary<string, ConstructorInfo[]> descriptorMap;
|
||||
private Dictionary<string, bool[]> descriptorBannedTables;
|
||||
@ -252,8 +264,7 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
|
||||
if (type.IsAssignableTo(mpePluginType))
|
||||
{
|
||||
ISkyscraperMpePlugin mpePlugin = (ISkyscraperMpePlugin)Activator.CreateInstance(type);
|
||||
_mpePlugins.Add(mpePlugin);
|
||||
_mpePluginTypes.Add(type);
|
||||
continue;
|
||||
}
|
||||
else if (type.IsAssignableTo(gpsReceiverFactoryType))
|
||||
@ -338,7 +349,7 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
_mpePlugins.Sort(sorter);
|
||||
_mpePluginTypes.Sort(sorter);
|
||||
}
|
||||
|
||||
private void HandleIpTrafficHandler(Type type)
|
||||
@ -682,7 +693,15 @@ namespace skyscraper5.Skyscraper.Plugins
|
||||
|
||||
public ReadOnlyCollection<ISkyscraperMpePlugin> GetMpePlugins()
|
||||
{
|
||||
return _mpePlugins.AsReadOnly();
|
||||
List<ISkyscraperMpePlugin> result = new List<ISkyscraperMpePlugin>();
|
||||
foreach(Type t in _mpePluginTypes)
|
||||
{
|
||||
object? v = Activator.CreateInstance(t);
|
||||
ISkyscraperMpePlugin mpePlugin = v as ISkyscraperMpePlugin;
|
||||
if (mpePlugin != null)
|
||||
result.Add(mpePlugin);
|
||||
}
|
||||
return result.AsReadOnly();
|
||||
}
|
||||
|
||||
public ReadOnlyDictionary<int, IGpsReceiverFactory> GetGpsReceiverFactories()
|
||||
|
||||
@ -210,13 +210,14 @@ namespace skyscraper5.Skyscraper.Scraper
|
||||
void OnDvbNipCarrierDetected(NipActualCarrierInformation currentCarrierInformation);
|
||||
void OnDvbNipPrivateDataSignallingManifest(PrivateDataSignallingManifestType privateDataSignallingManifest);
|
||||
void OnDvbNipServiceListEntryPoints(NipActualCarrierInformation currentCarrierInformation, ServiceListEntryPoints serviceListEntryPoints, DateTime dvbNipTime);
|
||||
void OnDvbNipServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId1, string serviceListId2);
|
||||
void OnDvbNipServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId1, ServiceListType serviceListId2);
|
||||
void OnDvbNipTimeOffsetFile(NipActualCarrierInformation currentCarrierInformation, TimeOffsetFileType timeOffsetFile);
|
||||
void OnDvbNipNetworkInformationFile(NipActualCarrierInformation currentCarrierInformation, NetworkInformationFileType networkInformationFile);
|
||||
void DvbNipServiceInformation(NipActualCarrierInformation currentCarrierInformation, ServiceInformationFileType serviceInformationFile);
|
||||
void OnDvbNipFileAnnouncement(FDTInstanceType flute);
|
||||
void OnAstraSgtList(SgtList list);
|
||||
void OnAstraSgtService(SgtService child);
|
||||
void NotifyTransportStreamId(int tsid, int nid);
|
||||
|
||||
TaskQueue Tasks { get; set; }
|
||||
|
||||
|
||||
@ -1395,14 +1395,15 @@ namespace skyscraper5.Skyscraper.Scraper
|
||||
|
||||
public void NotifyFileArrival(VfsFile vfsFile)
|
||||
{
|
||||
UiJunction?.DsmCcVfs(vfsFile);
|
||||
|
||||
if (!CurrentTransportStreamId.HasValue)
|
||||
return;
|
||||
if (!CurrentNetworkId.HasValue)
|
||||
return;
|
||||
|
||||
if (ObjectStorage.ObjectCarouselFileArrival(vfsFile, CurrentTransportStreamId.Value, CurrentNetworkId.Value))
|
||||
UiJunction?.NotifyTransportStreamId(CurrentTransportStreamId.Value, CurrentNetworkId.Value);
|
||||
UiJunction?.DsmCcVfs(vfsFile);
|
||||
|
||||
if (ObjectStorage.ObjectCarouselFileArrival(vfsFile, CurrentTransportStreamId.Value, CurrentNetworkId.Value))
|
||||
{
|
||||
LogEvent(SkyscraperContextEvent.FileArrival, String.Format("PID {0:X4}, Path {1}", vfsFile.SourcePid, vfsFile.ToString()));
|
||||
}
|
||||
@ -2980,7 +2981,7 @@ namespace skyscraper5.Skyscraper.Scraper
|
||||
public void OnServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId,
|
||||
ServiceListType serviceList)
|
||||
{
|
||||
UiJunction?.OnDvbNipServiceList(currentCarrierInformation, serviceListId, serviceListId);
|
||||
UiJunction?.OnDvbNipServiceList(currentCarrierInformation, serviceListId, serviceList);
|
||||
|
||||
List<DvbIService> services = DvbIUtils.FlattenServiceList(serviceList).ToList();
|
||||
DvbIDataStorage dataStorage = DataStorage;
|
||||
|
||||
@ -1623,6 +1623,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
|
||||
public bool DvbNipTestForFile(string announcedFileContentLocation)
|
||||
{
|
||||
string saneFilename = DvbNipUtilities.MakeFilename(announcedFileContentLocation);
|
||||
saneFilename = Path.Combine(rootDirectory.FullName, "DVB-NIP-Content", saneFilename);
|
||||
FileInfo fi = new FileInfo(saneFilename);
|
||||
return fi.Exists;
|
||||
}
|
||||
@ -1630,6 +1631,7 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
|
||||
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
|
||||
{
|
||||
string filename = DvbNipUtilities.MakeFilename(listener.FileAssociation.ContentLocation);
|
||||
filename = Path.Combine(rootDirectory.FullName, "DVB-NIP-Content", filename);
|
||||
FileInfo fi = new FileInfo(filename);
|
||||
fi.Directory.EnsureExists();
|
||||
FileStream outStream = fi.OpenWrite();
|
||||
@ -2000,5 +2002,31 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
|
||||
fileStream.Flush();
|
||||
fileStream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public bool TestForObjectCarouselFileArrival(string file, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
if (file.StartsWith("\\"))
|
||||
file = file.Substring(1);
|
||||
string combine = Path.Combine(rootDirectory.FullName, "DSM-CC_Objects", networkId.ToString(), transportStreamId.ToString(), pid.ToString(), file);
|
||||
FileInfo fi = new FileInfo(combine);
|
||||
return fi.Exists;
|
||||
}
|
||||
|
||||
public byte[] GetObjectCarouselFileArrival(string file, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
if (file.StartsWith("\\"))
|
||||
file = file.Substring(1);
|
||||
string combine = Path.Combine(rootDirectory.FullName, "DSM-CC_Objects", networkId.ToString(), transportStreamId.ToString(), pid.ToString(), file);
|
||||
FileInfo fi = new FileInfo(combine);
|
||||
return File.ReadAllBytes(fi.FullName);
|
||||
}
|
||||
|
||||
public byte[] DvbNipGetFile(string path)
|
||||
{
|
||||
string saneFilename = DvbNipUtilities.MakeFilename(path);
|
||||
saneFilename = Path.Combine(rootDirectory.FullName, "DVB-NIP-Content", saneFilename);
|
||||
FileInfo fi = new FileInfo(saneFilename);
|
||||
return File.ReadAllBytes(fi.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,142 +1,142 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using skyscraper5.Dvb.DataBroadcasting.SkyscraperVfs;
|
||||
using skyscraper5.Dvb.Descriptors;
|
||||
using skyscraper8.DvbNip;
|
||||
using skyscraper8.Experimentals.NdsSsu;
|
||||
using skyscraper8.Ietf.FLUTE;
|
||||
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
||||
using skyscraper8.Skyscraper.Drawing;
|
||||
|
||||
namespace skyscraper8.Skyscraper.Scraper.Storage
|
||||
{
|
||||
public class NullObjectStorage : ObjectStorage
|
||||
{
|
||||
public bool ObjectCarouselFileArrival(VfsFile vfsFile, int transportStreamId, int networkId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid,
|
||||
ushort moduleModuleId, byte moduleModuleVersion, Stream result)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId,
|
||||
byte moduleVersion)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber,
|
||||
int mappingStreamElementaryPid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, ushort pid,
|
||||
byte[] imageData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void WaitForCompletion()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiSetVersion(int version)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public class NullToken
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public object[] GetPluginConnector()
|
||||
{
|
||||
return new object[1]
|
||||
{
|
||||
new NullToken()
|
||||
};
|
||||
}
|
||||
|
||||
public void Ping()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DvbNipTestForFile(string announcedFileContentLocation)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
|
||||
{
|
||||
}
|
||||
|
||||
public void StoreIqGraph(Guid jobGuid, long frequency, char polarity, IqChartData plot)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreRfSpectrum(Guid jobGuid, RfSpectrumData rfSpectrum)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteIqGraph(Guid selectedGuid, int frequencyItem1, SatelliteDeliverySystemDescriptor.PolarizationEnum frequencyItem2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteRfSpectrum(Guid selectedGuid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool OtvSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, ushort tableIdExtension,
|
||||
uint fileId, uint unknown1, uint length)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnOtvSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, Stream getStream,
|
||||
ushort tableIdExtension, uint fileId, uint unknown1, uint length)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnNdsSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension,
|
||||
NdsSsuDataMap dataMap)
|
||||
{
|
||||
dataMap.Dispose();
|
||||
}
|
||||
|
||||
public bool NdsSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool SsdpDeviceKnown(SsdpDevice ssdpDevice)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SsdpStoreMetadata(SsdpDevice ssdpDevice, byte[] ssdpMetadataByteArray)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public byte[] SsdpGetMetadata(SsdpDevice ssdpDevice)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using skyscraper5.Dvb.DataBroadcasting.SkyscraperVfs;
|
||||
using skyscraper5.Dvb.Descriptors;
|
||||
using skyscraper8.DvbNip;
|
||||
using skyscraper8.Experimentals.NdsSsu;
|
||||
using skyscraper8.Ietf.FLUTE;
|
||||
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
||||
using skyscraper8.Skyscraper.Drawing;
|
||||
|
||||
namespace skyscraper8.Skyscraper.Scraper.Storage
|
||||
{
|
||||
public class NullObjectStorage : ObjectStorage
|
||||
{
|
||||
public bool ObjectCarouselFileArrival(VfsFile vfsFile, int transportStreamId, int networkId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid,
|
||||
ushort moduleModuleId, byte moduleModuleVersion, Stream result)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId,
|
||||
byte moduleVersion)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber,
|
||||
int mappingStreamElementaryPid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, ushort pid,
|
||||
byte[] imageData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void WaitForCompletion()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UiSetVersion(int version)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public class NullToken
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public object[] GetPluginConnector()
|
||||
{
|
||||
return new object[1]
|
||||
{
|
||||
new NullToken()
|
||||
};
|
||||
}
|
||||
|
||||
public void Ping()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DvbNipTestForFile(string announcedFileContentLocation)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
|
||||
{
|
||||
}
|
||||
|
||||
public void StoreIqGraph(Guid jobGuid, long frequency, char polarity, IqChartData plot)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StoreRfSpectrum(Guid jobGuid, RfSpectrumData rfSpectrum)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteIqGraph(Guid selectedGuid, int frequencyItem1, SatelliteDeliverySystemDescriptor.PolarizationEnum frequencyItem2)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteRfSpectrum(Guid selectedGuid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool OtvSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, ushort tableIdExtension,
|
||||
uint fileId, uint unknown1, uint length)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnOtvSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, Stream getStream,
|
||||
ushort tableIdExtension, uint fileId, uint unknown1, uint length)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnNdsSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension,
|
||||
NdsSsuDataMap dataMap)
|
||||
{
|
||||
dataMap.Dispose();
|
||||
}
|
||||
|
||||
public bool NdsSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool SsdpDeviceKnown(SsdpDevice ssdpDevice)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SsdpStoreMetadata(SsdpDevice ssdpDevice, byte[] ssdpMetadataByteArray)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public byte[] SsdpGetMetadata(SsdpDevice ssdpDevice)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TestForSisDsaci(int value1, int value2, ushort groupId, int versionNumber)
|
||||
@ -148,5 +148,20 @@ namespace skyscraper8.Skyscraper.Scraper.Storage
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool TestForObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public byte[] GetObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public byte[] DvbNipGetFile(string path)
|
||||
{
|
||||
return new byte[0] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,9 @@ namespace skyscraper8.Skyscraper.Scraper.Storage
|
||||
public interface ObjectStorage : ISsdpCache
|
||||
{
|
||||
bool ObjectCarouselFileArrival(VfsFile vfsFile, int transportStreamId, int networkId);
|
||||
bool TestForObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId);
|
||||
byte[] GetObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId);
|
||||
|
||||
void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleModuleId, byte moduleModuleVersion, Stream result);
|
||||
bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId, byte moduleVersion);
|
||||
bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, int mappingStreamElementaryPid);
|
||||
@ -39,5 +42,6 @@ namespace skyscraper8.Skyscraper.Scraper.Storage
|
||||
bool NdsSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension);
|
||||
bool TestForSisDsaci(int value1, int value2, ushort groupId, int versionNumber);
|
||||
void StoreSisDsaci(int value1, int value2, ushort currentDsaGroupId, int versionNumber, Stream dsaci);
|
||||
}
|
||||
byte[] DvbNipGetFile(string path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,5 +210,23 @@ namespace skyscraper8.Skyscraper.Scraper.Storage.Tar
|
||||
string filename = String.Format("dvb-sis/{0}/{1}/Group{2}_Version{3}.xml", nid, tsid, currentDsaGroupId, versionNumber);
|
||||
tarArchive.WriteEntry(filename, dsaci);
|
||||
}
|
||||
|
||||
public bool TestForObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
string filename = string.Format("dsm-cc/objects/{0}/{1}/{2}/{3}", networkId, transportStreamId, pid, vfsFile.ToString());
|
||||
return tarArchive.HasEntry(filename);
|
||||
}
|
||||
|
||||
public byte[] GetObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId)
|
||||
{
|
||||
string filename = string.Format("dsm-cc/objects/{0}/{1}/{2}/{3}", networkId, transportStreamId, pid, vfsFile.ToString());
|
||||
return tarArchive.ReadEntry(filename);
|
||||
}
|
||||
|
||||
public byte[] DvbNipGetFile(string path)
|
||||
{
|
||||
string filename = "/nip/" + DvbNipUtilities.MakeFilename(path);
|
||||
return tarArchive.ReadEntry(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,22 +43,25 @@ namespace skyscraper8.Skyscraper.Scraper.Storage.Utilities
|
||||
|
||||
public ushort CarrierId { get; set; }
|
||||
|
||||
protected bool Equals(DatabaseKeyNipMulticastGatewayConfigurationTransportSession other)
|
||||
{
|
||||
return TSI == other.TSI && DestinationPort == other.DestinationPort && DestinationAddress.Equals(other.DestinationAddress) && SourceAddress.Equals(other.SourceAddress) && ServiceId == other.ServiceId && NetworkId == other.NetworkId && LinkId == other.LinkId && CarrierId == other.CarrierId;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((DatabaseKeyNipMulticastGatewayConfigurationTransportSession)obj);
|
||||
return obj is DatabaseKeyNipMulticastGatewayConfigurationTransportSession session &&
|
||||
TSI == session.TSI &&
|
||||
DestinationPort == session.DestinationPort &&
|
||||
EqualityComparer<IPAddress>.Default.Equals(DestinationAddress, session.DestinationAddress) &&
|
||||
EqualityComparer<IPAddress>.Default.Equals(SourceAddress, session.SourceAddress) &&
|
||||
ServiceId == session.ServiceId &&
|
||||
NetworkId == session.NetworkId &&
|
||||
LinkId == session.LinkId &&
|
||||
CarrierId == session.CarrierId;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(TSI, DestinationPort, DestinationAddress, SourceAddress, ServiceId, NetworkId, LinkId, CarrierId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user