Added fixes to make the MPE packets from 117°W/4050 dumpable.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 49s

This commit is contained in:
feyris-tan 2026-06-26 23:28:00 +02:00
parent 0cddb3b085
commit 57c45c215e
10 changed files with 155 additions and 32 deletions

View File

@ -12,7 +12,7 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
{
[SkyscraperPlugin]
[TsDescriptor(0x13,"INT")]
internal class IpMacStreamLocationDescriptor : TsDescriptor
public class IpMacStreamLocationDescriptor : TsDescriptor
{
public IpMacStreamLocationDescriptor(byte[] buffer)
{
@ -22,6 +22,7 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
TransportStreamId = ms.ReadUInt16BE();
ServiceId = ms.ReadUInt16BE();
ComponentTag = ms.ReadUInt8();
Valid = true;
}
public byte ComponentTag { get; private set; }
@ -33,5 +34,21 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntDescriptors
public ushort OriginalNetworkId { 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);
}
}
}

View File

@ -27,14 +27,25 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
public override bool Equals(object? obj)
{
return obj is IpMacNotification notification &&
EqualityComparer<Platform>.Default.Equals(Platform, notification.Platform) &&
EqualityComparer<Target>.Default.Equals(Target, notification.Target);
if (obj == null)
return false;
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()
{
return HashCode.Combine(Platform, Target);
return HashCode.Combine(Platform.GetHashCode(), Target.GetHashCode(), Operational.GetHashCode());
}
}
}

View File

@ -1,4 +1,6 @@
using System;
using skyscraper5.Dvb.DataBroadcasting.IntDescriptors;
using skyscraper8.Skyscraper.Collections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -17,10 +19,37 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
public bool? TimeSlicing { get; set; }
//0x13 ip mac stream location descriptor
public byte? ComponentTag { get; set; }
public ushort? NetworkId { get; set; }
public ushort? OriginalNetworkId { get; set; }
public ushort? ServiceId { get; set; }
public ushort? TransportStreamId { get; set; }
public List<IpMacStreamLocationDescriptor> IpMacStreams { get; set; }
public override bool Equals(object? obj)
{
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();
}
}
}

View File

@ -30,13 +30,23 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
public override bool Equals(object? obj)
{
return obj is Platform platform &&
PlatformId == platform.PlatformId;
if (obj == null)
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()
{
return HashCode.Combine(PlatformId);
throw new NotImplementedException();
}
}
}

View File

@ -5,6 +5,7 @@ using System.Net;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.Net;
using skyscraper8.Skyscraper.Collections;
namespace skyscraper5.Dvb.DataBroadcasting.IntModel
{
@ -18,14 +19,21 @@ namespace skyscraper5.Dvb.DataBroadcasting.IntModel
public override bool Equals(object? obj)
{
return obj is Target target &&
EqualityComparer<List<CidrSubnet>>.Default.Equals(TargetIpSlashes, target.TargetIpSlashes) &&
AllReceivers == target.AllReceivers;
if (obj == null)
return false;
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()
{
return HashCode.Combine(TargetIpSlashes, AllReceivers);
throw new NotImplementedException();
}
public uint GenerateId()

View File

@ -130,10 +130,9 @@ namespace skyscraper5.Dvb.DataBroadcasting
foreach (TsDescriptor tsDescriptor in TsDescriptorUnpacker.GetInstance().UnpackDescriptors(input, "INT"))
{
string cName = tsDescriptor.GetType().Name;
switch (cName)
switch (tsDescriptor)
{
case nameof(TimeSliceFecIdentifierDescriptor):
TimeSliceFecIdentifierDescriptor tsfid = (TimeSliceFecIdentifierDescriptor)tsDescriptor;
case TimeSliceFecIdentifierDescriptor tsfid:
output.TimeSliceFrameSize = tsfid.FrameSize;
output.TimeSliceMaxAverageRate = tsfid.MaxAverageRate;
output.TimeSliceMaxBurstDuration = tsfid.MaxBurstDuration;
@ -141,15 +140,10 @@ namespace skyscraper5.Dvb.DataBroadcasting
output.TimeSliceFecId = tsfid.TimeSliceFecId;
output.TimeSlicing = tsfid.TimeSlicing;
break;
case nameof(IpMacStreamLocationDescriptor):
IpMacStreamLocationDescriptor ipmac = (IpMacStreamLocationDescriptor)tsDescriptor;
if (output.TransportStreamId.HasValue)
throw new NotImplementedException("multiple ip mac stram location descriptors");
output.ComponentTag = ipmac.ComponentTag;
output.NetworkId = ipmac.NetworkId;
output.OriginalNetworkId = ipmac.OriginalNetworkId;
output.ServiceId = ipmac.ServiceId;
output.TransportStreamId = ipmac.TransportStreamId;
case IpMacStreamLocationDescriptor imsld:
if (output.IpMacStreams == null)
output.IpMacStreams = new List<IpMacStreamLocationDescriptor>();
output.IpMacStreams.Add(imsld);
break;
default:
throw new NotImplementedException(cName);

View File

@ -2,7 +2,7 @@
"profiles": {
"skyscraper8": {
"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
},
"Container (Dockerfile)": {

View 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;
}
}
}

View File

@ -22,5 +22,24 @@ namespace skyscraper5.Skyscraper.Net
{
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);
}
}
}

View File

@ -593,7 +593,10 @@ namespace skyscraper5.Skyscraper.Plugins
{
ConstructorInfo constructorInfo = type.GetConstructor(new Type[] { typeof(byte[]) });
if (constructorInfo == null)
{
logger.ErrorFormat("Couldn't find a publicly accessible constructor in {0}. This is a bug, tell Fey.", type.Name);
return;
}
TsDescriptorAttribute unboxedAttribute = attribute as TsDescriptorAttribute;
foreach (string compatibleTable in unboxedAttribute.CompatibleTables)