Added error handling in case the stream-type autodetection goes wrong.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m40s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m40s
This commit is contained in:
parent
fb34d7d21c
commit
4bb26cef25
@ -515,5 +515,17 @@ namespace skyscraper5.Data
|
||||
byte[] bytes = GetObject(filename);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public bool TestForSisDsaci(int value1, int value2, ushort groupId, int versionNumber)
|
||||
{
|
||||
string filename = String.Format("DVB-SIS/{0}/{1}/Group{2}_Version{3}.xml");
|
||||
return FileExists(filename);
|
||||
}
|
||||
|
||||
public void StoreSisDsaci(int value1, int value2, ushort currentDsaGroupId, int versionNumber, Stream dsaci)
|
||||
{
|
||||
string filename = String.Format("DVB-SIS/{0}/{1}/Group{2}_Version{3}.xml");
|
||||
WriteObject(filename, dsaci);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +118,7 @@ public class GseWithRollingSyncByteReader : IMisHandler
|
||||
{
|
||||
byte[] gseDataBytes = fragments[gsePacket.FragmentId.Value].GetGseDataBytes();
|
||||
HandleAssembledFrame(fragments[gsePacket.FragmentId.Value].ProtocolType, gseDataBytes, fragments[gsePacket.FragmentId.Value].Label);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,15 @@ class MisHandlerProxy : IMisHandler
|
||||
state = 3;
|
||||
break;
|
||||
case 3:
|
||||
try
|
||||
{
|
||||
misHandler.PushFrame(bbHeader, readOnlySpan);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.ErrorFormat("An error occurred while handling a GS packet. This means that the stream type autodetection guessed wrong.");
|
||||
OnUnknownStreamFormat();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!unknownStateError)
|
||||
@ -147,12 +155,13 @@ class MisHandlerProxy : IMisHandler
|
||||
}
|
||||
}
|
||||
|
||||
logger.WarnFormat("MIS {0} has an unknown stream type. The IP packet detection algorithm from older skyscraper8 versions will be used. For further analysis, please consider submitting a sample of this stream.", Context.GetMisId());
|
||||
misHandler = new IPv4PacketBruteforce(Context);
|
||||
OnUnknownStreamFormat();
|
||||
return false;
|
||||
}
|
||||
|
||||
private void DrainQueue()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (waitingPackets.Count > 0)
|
||||
{
|
||||
@ -161,6 +170,19 @@ class MisHandlerProxy : IMisHandler
|
||||
}
|
||||
waitingPackets = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.ErrorFormat("While trying to handle the buffered GS packets, an error occurred. This means that the stream type autodetection guessed wrong.");
|
||||
OnUnknownStreamFormat();
|
||||
DrainQueue();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUnknownStreamFormat()
|
||||
{
|
||||
logger.WarnFormat("MIS {0} has an unknown stream type. The IP packet detection algorithm from older skyscraper8 versions will be used. For further analysis, please consider submitting a sample of this stream.", Context.GetMisId());
|
||||
misHandler = new IPv4PacketBruteforce(Context);
|
||||
}
|
||||
|
||||
private bool AnalyzeCrc32Values()
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"skyscraper8": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "\"C:\\Users\\Sascha Schiemann\\Downloads\\11476 H_GSE_(1)\\11476 V_GSE_.ts\"",
|
||||
"commandLineArgs": "\"F:\\utena\\0008W_Thor\\recap-max-sx8\\skyscraper_20251029_2110_0008W_10841_V_24497.ts\"",
|
||||
"remoteDebugEnabled": false
|
||||
},
|
||||
"Container (Dockerfile)": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user