Compare commits
2 Commits
a46e4ff556
...
90ac87770d
| Author | SHA1 | Date | |
|---|---|---|---|
| 90ac87770d | |||
|
|
7630775d55 |
@ -1,2 +1,3 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F5a_003Fcf76af61_003FFileInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue"><data><HostParameters type="LocalHostParameters" /><Argument type="StandaloneArgument"><Arguments IsNull="False"></Arguments><FileName IsNull="False"></FileName><WorkingDirectory IsNull="False"></WorkingDirectory><Scope><ProcessFilters /></Scope></Argument><Info type="TimelineInfo" /><CoreOptions type="CoreOptions"><CoreTempPath IsNull="False"></CoreTempPath><RemoteEndPoint IsNull="False"></RemoteEndPoint><AdditionalEnvironmentVariables /></CoreOptions><HostOptions type="HostOptions"><HostTempPath IsNull="False"></HostTempPath></HostOptions></data></s:String></wpf:ResourceDictionary>
|
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue"><data><HostParameters type="LocalHostParameters" /><Argument type="StandaloneArgument"><Arguments IsNull="False"></Arguments><FileName IsNull="False"></FileName><WorkingDirectory IsNull="False"></WorkingDirectory><Scope><ProcessFilters /></Scope></Argument><Info type="TimelineInfo" /><CoreOptions type="CoreOptions"><CoreTempPath IsNull="False"></CoreTempPath><RemoteEndPoint IsNull="False"></RemoteEndPoint><AdditionalEnvironmentVariables /></CoreOptions><HostOptions type="HostOptions"><HostTempPath IsNull="False"></HostTempPath></HostOptions></data></s:String></wpf:ResourceDictionary>
|
||||||
@ -13,7 +13,7 @@ using log4net;
|
|||||||
|
|
||||||
namespace skyscraper8.GSE
|
namespace skyscraper8.GSE
|
||||||
{
|
{
|
||||||
internal class BbframeDeencapsulator
|
internal class BbframeDeencapsulator : IBbframeDeencapsulator
|
||||||
{
|
{
|
||||||
private bool interruptedGseHem;
|
private bool interruptedGseHem;
|
||||||
private MemoryStream interruptedGseHemBuffer;
|
private MemoryStream interruptedGseHemBuffer;
|
||||||
|
|||||||
26
skyscraper8/GSE/BbframeDumper.cs
Normal file
26
skyscraper8/GSE/BbframeDumper.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
|
||||||
|
namespace skyscraper8.GSE;
|
||||||
|
|
||||||
|
public class BbframeDumper : IBbframeDeencapsulator, IDisposable
|
||||||
|
{
|
||||||
|
public BbframeDumper(FileInfo file)
|
||||||
|
{
|
||||||
|
file.Directory.EnsureExists();
|
||||||
|
ourStream = file.OpenWrite();
|
||||||
|
}
|
||||||
|
|
||||||
|
private FileStream ourStream;
|
||||||
|
|
||||||
|
public void PushPacket(byte[] bbframe)
|
||||||
|
{
|
||||||
|
ourStream.Write(bbframe, 0, bbframe.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
ourStream.Flush();
|
||||||
|
ourStream.Close();
|
||||||
|
ourStream.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
6
skyscraper8/GSE/IBbframeDeencapsulator.cs
Normal file
6
skyscraper8/GSE/IBbframeDeencapsulator.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace skyscraper8.GSE;
|
||||||
|
|
||||||
|
public interface IBbframeDeencapsulator
|
||||||
|
{
|
||||||
|
public void PushPacket(byte[] bbframe);
|
||||||
|
}
|
||||||
16
skyscraper8/GSE/NullGsEventHandler.cs
Normal file
16
skyscraper8/GSE/NullGsEventHandler.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using skyscraper5.Skyscraper;
|
||||||
|
|
||||||
|
namespace skyscraper8.GSE;
|
||||||
|
|
||||||
|
public class NullGsEventHandler : IGsEventHandler
|
||||||
|
{
|
||||||
|
public void OnIpDatagram(int pid, byte[] payload)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GsIpTrafficDetected()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
37
skyscraper8/GSE/Pts2Bbf.cs
Normal file
37
skyscraper8/GSE/Pts2Bbf.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using log4net;
|
||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper5.Skyscraper.Scraper;
|
||||||
|
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||||
|
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||||
|
|
||||||
|
namespace skyscraper8.GSE;
|
||||||
|
|
||||||
|
public class Pts2Bbf
|
||||||
|
{
|
||||||
|
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
|
||||||
|
|
||||||
|
public static void Run(FileInfo file)
|
||||||
|
{
|
||||||
|
if (!file.Exists)
|
||||||
|
{
|
||||||
|
logger.Error("File not found: " + file.FullName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string changeExtension = Path.ChangeExtension(file.FullName, ".sbbf");
|
||||||
|
BbframeDumper dumper = new BbframeDumper(new FileInfo(changeExtension));
|
||||||
|
|
||||||
|
FileStream fileStream = file.OpenRead();
|
||||||
|
|
||||||
|
TsContext mpeg2 = new TsContext();
|
||||||
|
mpeg2.RegisterPacketProcessor(0x010e, new Stid135BbFrameReader(new NullGsEventHandler(),dumper));
|
||||||
|
DataStorage dataStorage = new InMemoryScraperStorage();
|
||||||
|
ObjectStorage objectStorage = new NullObjectStorage();
|
||||||
|
SkyscraperContext skyscraper = new SkyscraperContext(mpeg2, dataStorage, objectStorage);
|
||||||
|
skyscraper.InitalizeFilterChain();
|
||||||
|
skyscraper.IngestFromStream(fileStream);
|
||||||
|
|
||||||
|
fileStream.Close();
|
||||||
|
logger.Info("Pts2Bbf finished");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,11 +12,15 @@ namespace skyscraper8.GSE
|
|||||||
internal class Stid135BbFrameReader : ITsPacketProcessor
|
internal class Stid135BbFrameReader : ITsPacketProcessor
|
||||||
{
|
{
|
||||||
private IGsEventHandler mpeEventHandler;
|
private IGsEventHandler mpeEventHandler;
|
||||||
private BbframeDeencapsulator deencapsulator;
|
private IBbframeDeencapsulator deencapsulator;
|
||||||
|
|
||||||
public Stid135BbFrameReader(IGsEventHandler mpeEventHandler)
|
public Stid135BbFrameReader(IGsEventHandler mpeEventHandler, IBbframeDeencapsulator deencapsulator = null)
|
||||||
{
|
{
|
||||||
|
if (deencapsulator == null)
|
||||||
|
deencapsulator = new BbframeDeencapsulator();
|
||||||
|
|
||||||
this.mpeEventHandler = mpeEventHandler;
|
this.mpeEventHandler = mpeEventHandler;
|
||||||
|
this.deencapsulator = deencapsulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
private long packetsRecovered;
|
private long packetsRecovered;
|
||||||
@ -33,18 +37,30 @@ namespace skyscraper8.GSE
|
|||||||
if (pid != 0x010e)
|
if (pid != 0x010e)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (outbuf == null)
|
||||||
|
outbuf = new MemoryStream();
|
||||||
|
|
||||||
if ((packets[8] & 0xff) == 0xb8)
|
if ((packets[8] & 0xff) == 0xb8)
|
||||||
|
{
|
||||||
|
if (outbuf.Length > 0)
|
||||||
|
{
|
||||||
|
byte[] completeBbframe = outbuf.ToArray();
|
||||||
|
deencapsulator.PushPacket(completeBbframe);
|
||||||
|
outbuf = new MemoryStream();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Start indicaator
|
||||||
|
outbuf.Write(packets, 8, packets[7]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outbuf.Write(packets, 9, packets[7] - 1);
|
||||||
|
}
|
||||||
|
/*if ((packets[8] & 0xff) == 0xb8)
|
||||||
{
|
{
|
||||||
if (outbuf != null)
|
if (outbuf != null)
|
||||||
{
|
{
|
||||||
byte[] chi = outbuf.ToArray();
|
byte[] chi = outbuf.ToArray();
|
||||||
if (deencapsulator == null)
|
|
||||||
{
|
|
||||||
deencapsulator = new BbframeDeencapsulator();
|
|
||||||
deencapsulator.MpeEventHandler = mpeEventHandler;
|
|
||||||
deencapsulator.PID = pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
deencapsulator.PushPacket(chi);
|
deencapsulator.PushPacket(chi);
|
||||||
}
|
}
|
||||||
outbuf = new MemoryStream();
|
outbuf = new MemoryStream();
|
||||||
@ -54,7 +70,7 @@ namespace skyscraper8.GSE
|
|||||||
{
|
{
|
||||||
if (outbuf != null)
|
if (outbuf != null)
|
||||||
outbuf.Write(packets, 9, packets[7] - 1);
|
outbuf.Write(packets, 9, packets[7] - 1);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
|
|||||||
using skyscraper5.Mpeg2.Descriptors;
|
using skyscraper5.Mpeg2.Descriptors;
|
||||||
using skyscraper5.Skyscraper.Scraper.StreamAutodetection;
|
using skyscraper5.Skyscraper.Scraper.StreamAutodetection;
|
||||||
using skyscraper8;
|
using skyscraper8;
|
||||||
|
using skyscraper8.GSE;
|
||||||
using skyscraper8.SatIp;
|
using skyscraper8.SatIp;
|
||||||
using skyscraper8.SatIp.RtspResponses;
|
using skyscraper8.SatIp.RtspResponses;
|
||||||
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
||||||
@ -306,6 +307,13 @@ namespace skyscraper5
|
|||||||
TogglePcapConfiguration(2);
|
TogglePcapConfiguration(2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args[0].ToLowerInvariant().Equals("pts2bbf"))
|
||||||
|
{
|
||||||
|
FileInfo fi = new FileInfo(args[1]);
|
||||||
|
Pts2Bbf.Run(fi);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Passing passing = new Passing();
|
/*Passing passing = new Passing();
|
||||||
|
|||||||
@ -299,11 +299,14 @@ namespace skyscraper5.Skyscraper.Scraper
|
|||||||
}
|
}
|
||||||
if (buffer[0] == 0x47 && buffer[1] == 0x41 && buffer[2] == 0x0e && (buffer[3] & 0x10) != 0 && buffer[4] == 0x00 && buffer[5] == 0x80 && buffer[6] == 0x00)
|
if (buffer[0] == 0x47 && buffer[1] == 0x41 && buffer[2] == 0x0e && (buffer[3] & 0x10) != 0 && buffer[4] == 0x00 && buffer[5] == 0x80 && buffer[6] == 0x00)
|
||||||
{
|
{
|
||||||
DvbContext.RegisterPacketProcessor(0x010e, new Stid135BbFrameReader(this));
|
if (!DvbContext.IsPidProcessorPresent(0x010e))
|
||||||
UiJunction?.SetGseMode();
|
{
|
||||||
LogEvent(SkyscraperContextEvent.SpecialTsMode, "STiD135 encapsulated GS detected.");
|
DvbContext.RegisterPacketProcessor(0x010e, new Stid135BbFrameReader(this));
|
||||||
SpecialTsType = 3;
|
UiJunction?.SetGseMode();
|
||||||
}
|
LogEvent(SkyscraperContextEvent.SpecialTsMode, "STiD135 encapsulated GS detected.");
|
||||||
|
SpecialTsType = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
firstPacketDone = true;
|
firstPacketDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user