Added an option for parsing FLUTE-LCT Frames with ATSC3's peculiarities.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 1m16s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 1m16s
This commit is contained in:
parent
f5736fca13
commit
2e173d4156
@ -11,6 +11,7 @@ using skyscraper5.Skyscraper;
|
||||
using skyscraper5.Skyscraper.Plugins;
|
||||
using skyscraper5.Skyscraper.Scraper;
|
||||
using skyscraper8.Atsc.A331.Schema;
|
||||
using skyscraper8.Ietf.FLUTE;
|
||||
|
||||
namespace skyscraper8.Atsc.A331
|
||||
{
|
||||
@ -71,6 +72,8 @@ namespace skyscraper8.Atsc.A331
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LctFrame lctFrame = new LctFrame(udpPacket.Payload, true);
|
||||
}
|
||||
|
||||
private void HandleLls(LlsTable lls)
|
||||
|
||||
@ -53,7 +53,7 @@ namespace skyscraper8.DvbNip
|
||||
UserDatagram discoveryUdpPacket = new UserDatagram(ipv4Packet);
|
||||
if (discoveryUdpPacket.DestinationPort == 3937)
|
||||
{
|
||||
LctFrame discoveryLctFrame = new LctFrame(discoveryUdpPacket.Payload);
|
||||
LctFrame discoveryLctFrame = new LctFrame(discoveryUdpPacket.Payload, false);
|
||||
if (discoveryLctFrame == null)
|
||||
return;
|
||||
LctHeader lctHeader = discoveryLctFrame.LctHeader;
|
||||
@ -77,7 +77,7 @@ namespace skyscraper8.DvbNip
|
||||
}
|
||||
|
||||
UserDatagram udpPacket = new UserDatagram(ipv4Packet);
|
||||
LctFrame lctFrame = new LctFrame(udpPacket.Payload);
|
||||
LctFrame lctFrame = new LctFrame(udpPacket.Payload, false);
|
||||
if (lctFrame.LctHeader == null)
|
||||
{
|
||||
return;
|
||||
|
||||
@ -11,8 +11,10 @@ namespace skyscraper8.Ietf.FLUTE
|
||||
{
|
||||
internal class LctFrame
|
||||
{
|
||||
public LctFrame(byte[] buffer)
|
||||
public LctFrame(byte[] buffer, bool isAtsc3)
|
||||
{
|
||||
this.Atsc3Compliant = isAtsc3;
|
||||
|
||||
MemoryStream ms = new MemoryStream(buffer, false);
|
||||
byte byteA = ms.ReadUInt8();
|
||||
this.Version = (byteA & 0xf0) >> 4;
|
||||
@ -46,7 +48,17 @@ namespace skyscraper8.Ietf.FLUTE
|
||||
if (ms.GetAvailableBytes() < 4)
|
||||
return;
|
||||
|
||||
this.FecHeader = new FecHeader(ms);
|
||||
//TODO: This assumes to always be Code Point 0, like in DVB-NIP, but ATSC3 uses Code Point 8.
|
||||
//ATSC 3 sample: salvage strat1 "Z:\Persönliches\Satellitescommunity\Skyscraper Test Fixture\65.0W_11304.256_V_30000_(2026-05-17 09.44.02)_dump.ts"
|
||||
//DVB-NIP sample: "Z:\Persönliches\Satellitescommunity\Skyscraper Test Fixture\astra1_11141h_gse_nip.ts"
|
||||
if (!isAtsc3)
|
||||
{
|
||||
this.FecHeader = new FecHeader(ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Atsc3ObjectStartOffset = ms.ReadUInt32BE();
|
||||
}
|
||||
|
||||
long avails = ms.GetAvailableBytes();
|
||||
if (avails == 0)
|
||||
@ -60,6 +72,10 @@ namespace skyscraper8.Ietf.FLUTE
|
||||
}
|
||||
}
|
||||
|
||||
public uint? Atsc3ObjectStartOffset { get; set; }
|
||||
|
||||
public bool Atsc3Compliant { get; set; }
|
||||
|
||||
public int Version { get; }
|
||||
public int CongestionControlFlag { get; }
|
||||
public int ProtocolSpecificIndication { get; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user