Added fixes to make the MPE packets from 117°W/4050 dumpable.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 49s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 49s
This commit is contained in:
parent
0cddb3b085
commit
57c45c215e
@ -12,7 +12,7 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
|
|||||||
{
|
{
|
||||||
[SkyscraperPlugin]
|
[SkyscraperPlugin]
|
||||||
[TsDescriptor(0x13,"INT")]
|
[TsDescriptor(0x13,"INT")]
|
||||||
internal class IpMacStreamLocationDescriptor : TsDescriptor
|
public class IpMacStreamLocationDescriptor : TsDescriptor
|
||||||
{
|
{
|
||||||
public IpMacStreamLocationDescriptor(byte[] buffer)
|
public IpMacStreamLocationDescriptor(byte[] buffer)
|
||||||
{
|
{
|
||||||
@ -22,6 +22,7 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
|
|||||||
TransportStreamId = ms.ReadUInt16BE();
|
TransportStreamId = ms.ReadUInt16BE();
|
||||||
ServiceId = ms.ReadUInt16BE();
|
ServiceId = ms.ReadUInt16BE();
|
||||||
ComponentTag = ms.ReadUInt8();
|
ComponentTag = ms.ReadUInt8();
|
||||||
|
Valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte ComponentTag { get; private set; }
|
public byte ComponentTag { get; private set; }
|
||||||
@ -33,5 +34,21 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
|
|||||||
public ushort OriginalNetworkId { get; private set; }
|
public ushort OriginalNetworkId { get; private set; }
|
||||||
|
|
||||||
public ushort NetworkId { get; private set; }
|
public ushort NetworkId { get; private set; }
|
||||||
|
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
return obj is IpMacStreamLocationDescriptor descriptor &&
|
||||||
|
Valid == descriptor.Valid &&
|
||||||
|
ComponentTag == descriptor.ComponentTag &&
|
||||||
|
ServiceId == descriptor.ServiceId &&
|
||||||
|
TransportStreamId == descriptor.TransportStreamId &&
|
||||||
|
OriginalNetworkId == descriptor.OriginalNetworkId &&
|
||||||
|
NetworkId == descriptor.NetworkId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(Valid, ComponentTag, ServiceId, TransportStreamId, OriginalNetworkId, NetworkId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,14 +27,25 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
|||||||
|
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
{
|
{
|
||||||
return obj is IpMacNotification notification &&
|
if (obj == null)
|
||||||
EqualityComparer<Platform>.Default.Equals(Platform, notification.Platform) &&
|
return false;
|
||||||
EqualityComparer<Target>.Default.Equals(Target, notification.Target);
|
IpMacNotification that = obj as IpMacNotification;
|
||||||
|
if (that == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!this.Platform.Equals(that.Platform))
|
||||||
|
return false;
|
||||||
|
if (!this.Target.Equals(that.Target))
|
||||||
|
return false;
|
||||||
|
if (!this.Operational.Equals(that.Operational))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return HashCode.Combine(Platform, Target);
|
return HashCode.Combine(Platform.GetHashCode(), Target.GetHashCode(), Operational.GetHashCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
using System;
|
using skyscraper5.Dvb.DataBroadcasting.IntDescriptors;
|
||||||
|
using skyscraper8.Skyscraper.Collections;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -17,10 +19,37 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
|||||||
public bool? TimeSlicing { get; set; }
|
public bool? TimeSlicing { get; set; }
|
||||||
|
|
||||||
//0x13 ip mac stream location descriptor
|
//0x13 ip mac stream location descriptor
|
||||||
public byte? ComponentTag { get; set; }
|
|
||||||
public ushort? NetworkId { get; set; }
|
public List<IpMacStreamLocationDescriptor> IpMacStreams { get; set; }
|
||||||
public ushort? OriginalNetworkId { get; set; }
|
|
||||||
public ushort? ServiceId { get; set; }
|
public override bool Equals(object? obj)
|
||||||
public ushort? TransportStreamId { get; set; }
|
{
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
Operational that = obj as Operational;
|
||||||
|
if (that == null)
|
||||||
|
return false;
|
||||||
|
if (this.TimeSliceFrameSize != that.TimeSliceFrameSize)
|
||||||
|
return false;
|
||||||
|
if (this.TimeSliceMaxAverageRate != that.TimeSliceMaxAverageRate)
|
||||||
|
return false;
|
||||||
|
if (this.TimeSliceMaxBurstDuration != that.TimeSliceMaxBurstDuration)
|
||||||
|
return false;
|
||||||
|
if (this.MpeFecAlgorithm != that.MpeFecAlgorithm)
|
||||||
|
return false;
|
||||||
|
if (this.TimeSliceFecId != that.TimeSliceFecId)
|
||||||
|
return false;
|
||||||
|
if (this.TimeSlicing != that.TimeSlicing)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return ListUtility.AreEqual(this.IpMacStreams, that.IpMacStreams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -30,13 +30,23 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
|||||||
|
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
{
|
{
|
||||||
return obj is Platform platform &&
|
if (obj == null)
|
||||||
PlatformId == platform.PlatformId;
|
return false;
|
||||||
|
Platform that = obj as Platform;
|
||||||
|
if (that == null)
|
||||||
|
return false;
|
||||||
|
if (this.PlatformId != that.PlatformId)
|
||||||
|
return false;
|
||||||
|
if (this.ProcessingOrder != that.ProcessingOrder)
|
||||||
|
return false;
|
||||||
|
if (this.ActionType != that.ActionType)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return HashCode.Combine(PlatformId);
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using System.Net;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using skyscraper5.Skyscraper.Net;
|
using skyscraper5.Skyscraper.Net;
|
||||||
|
using skyscraper8.Skyscraper.Collections;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
||||||
{
|
{
|
||||||
@ -18,14 +19,21 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
|
|||||||
|
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
{
|
{
|
||||||
return obj is Target target &&
|
if (obj == null)
|
||||||
EqualityComparer<List<CidrSubnet>>.Default.Equals(TargetIpSlashes, target.TargetIpSlashes) &&
|
return false;
|
||||||
AllReceivers == target.AllReceivers;
|
Target that = obj as Target;
|
||||||
|
if (that == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (this.AllReceivers != that.AllReceivers)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return ListUtility.AreEqual(this.TargetIpSlashes, that.TargetIpSlashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return HashCode.Combine(TargetIpSlashes, AllReceivers);
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GenerateId()
|
public uint GenerateId()
|
||||||
|
|||||||
@ -130,10 +130,9 @@ namespace skyscraper5.Dvb.DataBroadcasting
|
|||||||
foreach (TsDescriptor tsDescriptor in TsDescriptorUnpacker.GetInstance().UnpackDescriptors(input, "INT"))
|
foreach (TsDescriptor tsDescriptor in TsDescriptorUnpacker.GetInstance().UnpackDescriptors(input, "INT"))
|
||||||
{
|
{
|
||||||
string cName = tsDescriptor.GetType().Name;
|
string cName = tsDescriptor.GetType().Name;
|
||||||
switch (cName)
|
switch (tsDescriptor)
|
||||||
{
|
{
|
||||||
case nameof(TimeSliceFecIdentifierDescriptor):
|
case TimeSliceFecIdentifierDescriptor tsfid:
|
||||||
TimeSliceFecIdentifierDescriptor tsfid = (TimeSliceFecIdentifierDescriptor)tsDescriptor;
|
|
||||||
output.TimeSliceFrameSize = tsfid.FrameSize;
|
output.TimeSliceFrameSize = tsfid.FrameSize;
|
||||||
output.TimeSliceMaxAverageRate = tsfid.MaxAverageRate;
|
output.TimeSliceMaxAverageRate = tsfid.MaxAverageRate;
|
||||||
output.TimeSliceMaxBurstDuration = tsfid.MaxBurstDuration;
|
output.TimeSliceMaxBurstDuration = tsfid.MaxBurstDuration;
|
||||||
@ -141,15 +140,10 @@ namespace skyscraper5.Dvb.DataBroadcasting
|
|||||||
output.TimeSliceFecId = tsfid.TimeSliceFecId;
|
output.TimeSliceFecId = tsfid.TimeSliceFecId;
|
||||||
output.TimeSlicing = tsfid.TimeSlicing;
|
output.TimeSlicing = tsfid.TimeSlicing;
|
||||||
break;
|
break;
|
||||||
case nameof(IpMacStreamLocationDescriptor):
|
case IpMacStreamLocationDescriptor imsld:
|
||||||
IpMacStreamLocationDescriptor ipmac = (IpMacStreamLocationDescriptor)tsDescriptor;
|
if (output.IpMacStreams == null)
|
||||||
if (output.TransportStreamId.HasValue)
|
output.IpMacStreams = new List<IpMacStreamLocationDescriptor>();
|
||||||
throw new NotImplementedException("multiple ip mac stram location descriptors");
|
output.IpMacStreams.Add(imsld);
|
||||||
output.ComponentTag = ipmac.ComponentTag;
|
|
||||||
output.NetworkId = ipmac.NetworkId;
|
|
||||||
output.OriginalNetworkId = ipmac.OriginalNetworkId;
|
|
||||||
output.ServiceId = ipmac.ServiceId;
|
|
||||||
output.TransportStreamId = ipmac.TransportStreamId;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException(cName);
|
throw new NotImplementedException(cName);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"skyscraper8": {
|
"skyscraper8": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"commandLineArgs": "salvage strat1 \"Z:\\Persönliches\\Satellitescommunity\\Skyscraper Test Fixture\\65.0W_11304.256_V_30000_(2026-05-17 09.44.02)_dump.ts\"",
|
"commandLineArgs": "\"Z:\\Persönliches\\Satellitescommunity\\Skyscraper Test Fixture\\117W_4050_OTT.ts\"",
|
||||||
"remoteDebugEnabled": false
|
"remoteDebugEnabled": false
|
||||||
},
|
},
|
||||||
"Container (Dockerfile)": {
|
"Container (Dockerfile)": {
|
||||||
|
|||||||
32
skyscraper8/Skyscraper/Collections/ListUtility.cs
Normal file
32
skyscraper8/Skyscraper/Collections/ListUtility.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skyscraper8.Skyscraper.Collections
|
||||||
|
{
|
||||||
|
internal static class ListUtility
|
||||||
|
{
|
||||||
|
public static bool AreEqual<T>(List<T> dilly, List<T> dally)
|
||||||
|
{
|
||||||
|
if (dilly == null && dally == null)
|
||||||
|
return true;
|
||||||
|
if (dilly == null && dally != null)
|
||||||
|
return false;
|
||||||
|
if (dilly != null && dally == null)
|
||||||
|
return false;
|
||||||
|
if (dilly.Count != dally.Count)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for (int i = 0; i < dilly.Count; i++)
|
||||||
|
{
|
||||||
|
T l = dilly[i];
|
||||||
|
T r = dally[i];
|
||||||
|
if (!l.Equals(r))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -22,5 +22,24 @@ namespace skyscraper5.Skyscraper.Net
|
|||||||
{
|
{
|
||||||
return String.Format("{0}/{1}", IpAddress.ToString(), Length);
|
return String.Format("{0}/{1}", IpAddress.ToString(), Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
CidrSubnet that = obj as CidrSubnet;
|
||||||
|
if (that == null)
|
||||||
|
return false;
|
||||||
|
if (!this.IpAddress.Equals(that.IpAddress))
|
||||||
|
return false;
|
||||||
|
if (this.Length != that.Length)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(IpAddress.GetHashCode(), Length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -593,7 +593,10 @@ namespace skyscraper5.Skyscraper.Plugins
|
|||||||
{
|
{
|
||||||
ConstructorInfo constructorInfo = type.GetConstructor(new Type[] { typeof(byte[]) });
|
ConstructorInfo constructorInfo = type.GetConstructor(new Type[] { typeof(byte[]) });
|
||||||
if (constructorInfo == null)
|
if (constructorInfo == null)
|
||||||
|
{
|
||||||
|
logger.ErrorFormat("Couldn't find a publicly accessible constructor in {0}. This is a bug, tell Fey.", type.Name);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TsDescriptorAttribute unboxedAttribute = attribute as TsDescriptorAttribute;
|
TsDescriptorAttribute unboxedAttribute = attribute as TsDescriptorAttribute;
|
||||||
foreach (string compatibleTable in unboxedAttribute.CompatibleTables)
|
foreach (string compatibleTable in unboxedAttribute.CompatibleTables)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user