Prepared ISDB Table parsing.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 48s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 48s
This commit is contained in:
parent
d4d1f8169d
commit
73aca11936
@ -44,6 +44,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F2e_003F1a14f40f_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F2e_003F1a14f40f_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9ea467e7c7b4671a214143293021e7ec337916b71125d896e17a0b7fc_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9ea467e7c7b4671a214143293021e7ec337916b71125d896e17a0b7fc_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThread_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1f03371654aa41ca984353e7e344e822b2e200_003F9e_003F4a40121f_003FThread_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThread_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2026_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1f03371654aa41ca984353e7e344e822b2e200_003F9e_003F4a40121f_003FThread_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2026_002E2_003Fresharper_002Dhost_003FSourcesCache_003F6780d13016c376c4491c5618b257d84da7eacf747ed2719783e775546b79b_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffb63d7b4f026464dbf9b2db60c7f76bc2ac00_003Fbd_003F4080deac_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffb63d7b4f026464dbf9b2db60c7f76bc2ac00_003Fbd_003F4080deac_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|||||||
@ -9,11 +9,13 @@ using skyscraper5.Dvb.Psi.Model;
|
|||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
using skyscraper5.Mpeg2.Descriptors;
|
using skyscraper5.Mpeg2.Descriptors;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
using skyscraper5.Skyscraper.Plugins;
|
using skyscraper5.Skyscraper.Plugins;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
class BatParser : IPsiProcessor
|
class BatParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public IBatEventHandler EventHandler { get; }
|
public IBatEventHandler EventHandler { get; }
|
||||||
|
|
||||||
@ -50,7 +52,7 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
int bouquetDescriptorsLength = (readUInt16Be & 0x0fff);
|
int bouquetDescriptorsLength = (readUInt16Be & 0x0fff);
|
||||||
|
|
||||||
byte[] bouquetDescriptorsData = ms.ReadBytes(bouquetDescriptorsLength);
|
byte[] bouquetDescriptorsData = ms.ReadBytes(bouquetDescriptorsLength);
|
||||||
IEnumerable<TsDescriptor> outerDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(bouquetDescriptorsData, "BAT");
|
IEnumerable<TsDescriptor> outerDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(bouquetDescriptorsData, GetTableType());
|
||||||
BatBouquet batBouquet = ParseOuterDescriptors(outerDescriptors,bouquetId);
|
BatBouquet batBouquet = ParseOuterDescriptors(outerDescriptors,bouquetId);
|
||||||
|
|
||||||
readUInt16Be = ms.ReadUInt16BE();
|
readUInt16Be = ms.ReadUInt16BE();
|
||||||
@ -80,7 +82,7 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
if (ms.GetAvailableBytes() < transportDescriptorsLength)
|
if (ms.GetAvailableBytes() < transportDescriptorsLength)
|
||||||
break;
|
break;
|
||||||
byte[] transportDescriptorsData = ms.ReadBytes(transportDescriptorsLength);
|
byte[] transportDescriptorsData = ms.ReadBytes(transportDescriptorsLength);
|
||||||
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(transportDescriptorsData, "BAT");
|
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(transportDescriptorsData, GetTableType());
|
||||||
BatTransportStream child = ParseInnerDescriptors(transportStreamId, originalNetworkId, descriptors);
|
BatTransportStream child = ParseInnerDescriptors(transportStreamId, originalNetworkId, descriptors);
|
||||||
//EventHandler.OnBatTransportStream(batBouquet, child);
|
//EventHandler.OnBatTransportStream(batBouquet, child);
|
||||||
yield return child;
|
yield return child;
|
||||||
@ -209,5 +211,23 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB BAT";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "BAT";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,12 +8,14 @@ using skyscraper5.Dvb.Psi.Model;
|
|||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
using skyscraper5.Mpeg2.Descriptors;
|
using skyscraper5.Mpeg2.Descriptors;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
using skyscraper5.Skyscraper.Plugins;
|
using skyscraper5.Skyscraper.Plugins;
|
||||||
using skyscraper8.Dvb.Descriptors.Extension;
|
using skyscraper8.Dvb.Descriptors.Extension;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
public class EitParser : IPsiProcessor
|
public class EitParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public EitParser(IEitEventHandler eventHandler)
|
public EitParser(IEitEventHandler eventHandler)
|
||||||
{
|
{
|
||||||
@ -120,7 +122,7 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
|
|
||||||
private void UnpackDescriptors(byte[] input, EitEvent output)
|
private void UnpackDescriptors(byte[] input, EitEvent output)
|
||||||
{
|
{
|
||||||
IEnumerable<TsDescriptor> dvbDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(input, "EIT");
|
IEnumerable<TsDescriptor> dvbDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(input, GetTableType());
|
||||||
foreach (TsDescriptor dvbDescriptor in dvbDescriptors)
|
foreach (TsDescriptor dvbDescriptor in dvbDescriptors)
|
||||||
{
|
{
|
||||||
string name = dvbDescriptor.GetType().Name;
|
string name = dvbDescriptor.GetType().Name;
|
||||||
@ -254,5 +256,23 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
DescriptorPluginEitHandlerAttribute handlerAttribute = (DescriptorPluginEitHandlerAttribute)customAttribute;
|
DescriptorPluginEitHandlerAttribute handlerAttribute = (DescriptorPluginEitHandlerAttribute)customAttribute;
|
||||||
handlerAttribute.Handler.HandleEit(output, unpacked);
|
handlerAttribute.Handler.HandleEit(output, unpacked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB EIT";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "EIT";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,10 +4,12 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
class Pid0x11Decoder : IPsiProcessor
|
class Pid0x11Decoder : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
|
|
||||||
public Pid0x11Decoder(IBatEventHandler batEventHandler, ISdtEventHandler sdtEventHandler)
|
public Pid0x11Decoder(IBatEventHandler batEventHandler, ISdtEventHandler sdtEventHandler)
|
||||||
@ -36,5 +38,11 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
SdtParser.SetStandard(standard);
|
||||||
|
BatParser.SetStandard(standard);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,10 +7,12 @@ using System.Threading.Tasks;
|
|||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
using skyscraper5.Dvb.Psi.Model;
|
using skyscraper5.Dvb.Psi.Model;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
class RstParser : IPsiProcessor
|
class RstParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public IRstEventHandler EventHandler { get; }
|
public IRstEventHandler EventHandler { get; }
|
||||||
|
|
||||||
@ -44,5 +46,23 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
EventHandler.NotifyRunningStatus(transportStreamId, originalNetworkId, serviceId, eventId, runningStatus);
|
EventHandler.NotifyRunningStatus(transportStreamId, originalNetworkId, serviceId, eventId, runningStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB RST";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "RST";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,10 +10,12 @@ using skyscraper5.Dvb.Psi.Model;
|
|||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
using skyscraper5.Mpeg2.Descriptors;
|
using skyscraper5.Mpeg2.Descriptors;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
class SdtParser : IPsiProcessor
|
class SdtParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public ISdtEventHandler EventHandler { get; }
|
public ISdtEventHandler EventHandler { get; }
|
||||||
|
|
||||||
@ -81,7 +83,7 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
SdtService child = new SdtService(serviceId, eitScheduleFlag, eitPresentFollowingFlag, runningStatus, freeCaMode);
|
SdtService child = new SdtService(serviceId, eitScheduleFlag, eitPresentFollowingFlag, runningStatus, freeCaMode);
|
||||||
|
|
||||||
byte[] descriptorsData = ms.ReadBytes(descriptorsLoopLength);
|
byte[] descriptorsData = ms.ReadBytes(descriptorsLoopLength);
|
||||||
IEnumerable<TsDescriptor> unpackDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(descriptorsData, "SDT");
|
IEnumerable<TsDescriptor> unpackDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(descriptorsData, GetTableType());
|
||||||
foreach (TsDescriptor dvbDescriptor in unpackDescriptors)
|
foreach (TsDescriptor dvbDescriptor in unpackDescriptors)
|
||||||
{
|
{
|
||||||
string name = dvbDescriptor.GetType().Name;
|
string name = dvbDescriptor.GetType().Name;
|
||||||
@ -212,5 +214,23 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
throw new NotImplementedException(name);
|
throw new NotImplementedException(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB SDT";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "SDT";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,10 +7,12 @@ using System.Threading.Tasks;
|
|||||||
using skyscraper5.Dvb.Descriptors;
|
using skyscraper5.Dvb.Descriptors;
|
||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Dvb.Psi
|
namespace skyscraper5.Dvb.Psi
|
||||||
{
|
{
|
||||||
public class TimetableParser : IPsiProcessor
|
public class TimetableParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public ITdtEventHandler TdtEventHandler { get; }
|
public ITdtEventHandler TdtEventHandler { get; }
|
||||||
public ITotEventHandler TotEventHandler { get; }
|
public ITotEventHandler TotEventHandler { get; }
|
||||||
@ -76,7 +78,7 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
LocalTimeOffsetDescriptor ltod = null;
|
LocalTimeOffsetDescriptor ltod = null;
|
||||||
|
|
||||||
byte[] descriptorsData = ms.ReadBytes(descriptorsLoopLength);
|
byte[] descriptorsData = ms.ReadBytes(descriptorsLoopLength);
|
||||||
IEnumerable<TsDescriptor> unpackDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(descriptorsData, "TOT");
|
IEnumerable<TsDescriptor> unpackDescriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(descriptorsData, GetTableType());
|
||||||
foreach (TsDescriptor dvbDescriptor in unpackDescriptors)
|
foreach (TsDescriptor dvbDescriptor in unpackDescriptors)
|
||||||
{
|
{
|
||||||
string name = dvbDescriptor.GetType().Name;
|
string name = dvbDescriptor.GetType().Name;
|
||||||
@ -98,5 +100,23 @@ namespace skyscraper5.Dvb.Psi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB TOT";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "TOT";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,20 @@
|
|||||||
|
using log4net;
|
||||||
|
using log4net.Repository.Hierarchy;
|
||||||
|
using skyscraper5.Dvb.Descriptors;
|
||||||
|
using skyscraper5.Dvb.Psi;
|
||||||
|
using skyscraper5.Dvb.Psi.Model;
|
||||||
using skyscraper5.Mpeg2;
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper5.Mpeg2.Descriptors;
|
||||||
using skyscraper5.Mpeg2.Psi;
|
using skyscraper5.Mpeg2.Psi;
|
||||||
|
using skyscraper5.Mpeg2.Psi.Model;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
using skyscraper5.Skyscraper.Scraper;
|
using skyscraper5.Skyscraper.Scraper;
|
||||||
|
using skyscraper8.Isdb.Psi;
|
||||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||||
|
|
||||||
namespace skyscraper8.Isdb;
|
namespace skyscraper8.Isdb;
|
||||||
|
|
||||||
public class Matenro : IPatEventHandler
|
public class Matenro : IPatEventHandler, ICatEventHandler, IPmtEventHandler, IBatEventHandler, ISdtEventHandler, IEitEventHandler, IRstEventHandler, ITdtEventHandler, ITotEventHandler
|
||||||
{
|
{
|
||||||
public TsContext DvbContext { get; }
|
public TsContext DvbContext { get; }
|
||||||
public DataStorage DataStorage { get; }
|
public DataStorage DataStorage { get; }
|
||||||
@ -13,6 +22,12 @@ public class Matenro : IPatEventHandler
|
|||||||
public ISkyscraperUiJunction UiJunction { get; }
|
public ISkyscraperUiJunction UiJunction { get; }
|
||||||
public Action<SkyscraperContextEvent, string> LogEvent { get; }
|
public Action<SkyscraperContextEvent, string> LogEvent { get; }
|
||||||
|
|
||||||
|
private ILog logger;
|
||||||
|
private ushort? _transportStreamId;
|
||||||
|
private ushort? _networkPid;
|
||||||
|
private LitParser _litParser;
|
||||||
|
private ErtParser _ertParser;
|
||||||
|
|
||||||
public Matenro(TsContext dvbContext, DataStorage dataStorage, ObjectStorage objectStorage, ISkyscraperUiJunction uiJunction, Action<SkyscraperContextEvent, string> logEvent)
|
public Matenro(TsContext dvbContext, DataStorage dataStorage, ObjectStorage objectStorage, ISkyscraperUiJunction uiJunction, Action<SkyscraperContextEvent, string> logEvent)
|
||||||
{
|
{
|
||||||
DvbContext = dvbContext;
|
DvbContext = dvbContext;
|
||||||
@ -21,20 +36,137 @@ public class Matenro : IPatEventHandler
|
|||||||
UiJunction = uiJunction;
|
UiJunction = uiJunction;
|
||||||
LogEvent = logEvent;
|
LogEvent = logEvent;
|
||||||
|
|
||||||
dvbContext.RegisterPacketProcessor(0, new PsiDecoder(0, new PatParser(this)));
|
logger = LogManager.GetLogger(this.GetType());
|
||||||
|
|
||||||
|
|
||||||
|
Pid0x11Decoder pid0X11Decoder = new Pid0x11Decoder(this, this);
|
||||||
|
pid0X11Decoder.SetStandard(STD_TYPE.STD_ISDBT);
|
||||||
|
|
||||||
|
EitParser eitParser = new EitParser(this);
|
||||||
|
eitParser.SetStandard(STD_TYPE.STD_ISDBT);
|
||||||
|
|
||||||
|
RstParser rstParser = new RstParser(this);
|
||||||
|
rstParser.SetStandard(STD_TYPE.STD_ISDBT);
|
||||||
|
|
||||||
|
TimetableParser tdtParser = new TimetableParser(this, this);
|
||||||
|
tdtParser.SetStandard(STD_TYPE.STD_ISDBT);
|
||||||
|
|
||||||
|
_litParser = new LitParser();
|
||||||
|
|
||||||
|
SdttParser sdttParser = new SdttParser();
|
||||||
|
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0000, new PsiDecoder(0x0000, new PatParser(this)));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0001, new PsiDecoder(0x0001, new CatParser(this)));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0011, new PsiDecoder(0x0011, pid0X11Decoder));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0012, new PsiDecoder(0x0012, eitParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0013, new PsiDecoder(0x0013, rstParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0014, new PsiDecoder(0x0014, tdtParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0017, new PsiDecoder(0x0017, new DctParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x001e, new PsiDecoder(0x001e, new DitParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x001f, new PsiDecoder(0x001f, new SitParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0020, new PsiDecoder(0x0020, _litParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0021, new PsiDecoder(0x0021, _ertParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0022, new PsiDecoder(0x0022, new PcatParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0023, new PsiDecoder(0x0023, sdttParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0024, new PsiDecoder(0x0024, new BitParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0025, new PsiDecoder(0x0025, new IsdbPid25Parser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0026, new PsiDecoder(0x0026, eitParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0027, new PsiDecoder(0x0027, eitParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0028, new PsiDecoder(0x0028, sdttParser));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x0029, new PsiDecoder(0x0029, new CdtParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x002d, new PsiDecoder(0x002d, new FragmentedTlvPacketParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x002e, new PsiDecoder(0x002e, new AmtParser()));
|
||||||
|
dvbContext.RegisterPacketProcessor(0x002f, new PsiDecoder(0x002f, new MultipleFrameHeaderInformationParser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NetworkPidFromPat(int networkPid)
|
public void NetworkPidFromPat(int networkPid)
|
||||||
|
{
|
||||||
|
if (_networkPid != null)
|
||||||
|
{
|
||||||
|
logger.InfoFormat("Network PID changed from {0} to {1}", this._networkPid.Value, networkPid);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._networkPid = _networkPid;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool[] pmtPidsAssociated;
|
||||||
|
|
||||||
|
public void ProgramMapPidFromPat(int pmtPid, ushort programNumber)
|
||||||
|
{
|
||||||
|
if (pmtPidsAssociated == null)
|
||||||
|
pmtPidsAssociated = new bool[0x2000];
|
||||||
|
|
||||||
|
if (pmtPidsAssociated[pmtPid] == false)
|
||||||
|
{
|
||||||
|
PmtParser pmtParser = new PmtParser(this);
|
||||||
|
pmtParser.SetStandard(STD_TYPE.STD_ISDBT);
|
||||||
|
DvbContext.RegisterPacketProcessor(pmtPid, new PsiDecoder(pmtPid, pmtParser));
|
||||||
|
logger.InfoFormat("PAT points to a PMT on PID 0x{0:X4}.", pmtPid);
|
||||||
|
pmtPidsAssociated[pmtPid] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSdtService(ushort transportStreamId, ushort originalNetworkId, SdtService sdtService)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProgramMapPidFromPat(int pmtPid, ushort programNumber)
|
public void SetNetworkId(ushort networkId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTransportStreamId(ushort transportStreamId)
|
public void SetTransportStreamId(ushort transportStreamId)
|
||||||
|
{
|
||||||
|
if (_transportStreamId != null)
|
||||||
|
{
|
||||||
|
logger.InfoFormat("TSID changed from {0} to {1}", this._transportStreamId.Value, transportStreamId);
|
||||||
|
}
|
||||||
|
_transportStreamId = transportStreamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetNetworkId(ushort networkId, bool forceOverwrite = false)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEitEvent(EitEvent eitEvent)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NotifyOfCaSystem(CaDescriptor caDescriptor, bool fromPmt = false)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PmtEvent(ProgramMapping result, int pmtPid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnBatBouquet(BatBouquet batBouquet)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnBatTransportStream(BatBouquet batBouquet, BatTransportStream child)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NotifyRunningStatus(uint transportStreamId, uint originalNetworkId, uint serviceId, uint eventId,
|
||||||
|
RunningStatus runningStatus)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnTdtTime(DateTime utcTime)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnTotTime(DateTime utcTime, LocalTimeOffsetDescriptor ltod)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
11
skyscraper8/Isdb/Psi/AmtParser.cs
Normal file
11
skyscraper8/Isdb/Psi/AmtParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class AmtParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/BitParser.cs
Normal file
11
skyscraper8/Isdb/Psi/BitParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class BitParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/CdtParser.cs
Normal file
11
skyscraper8/Isdb/Psi/CdtParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class CdtParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/DctParser.cs
Normal file
11
skyscraper8/Isdb/Psi/DctParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class DctParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/DitParser.cs
Normal file
11
skyscraper8/Isdb/Psi/DitParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class DitParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/ErtParser.cs
Normal file
11
skyscraper8/Isdb/Psi/ErtParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class ErtParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/FragmentedTlvPacketParser.cs
Normal file
11
skyscraper8/Isdb/Psi/FragmentedTlvPacketParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class FragmentedTlvPacketParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
12
skyscraper8/Isdb/Psi/IsdbPid25Parser.cs
Normal file
12
skyscraper8/Isdb/Psi/IsdbPid25Parser.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class IsdbPid25Parser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
//either NBIT or LDT
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/LitParser.cs
Normal file
11
skyscraper8/Isdb/Psi/LitParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class LitParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/MultipleFrameHeaderInformationParser.cs
Normal file
11
skyscraper8/Isdb/Psi/MultipleFrameHeaderInformationParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class MultipleFrameHeaderInformationParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/PcatParser.cs
Normal file
11
skyscraper8/Isdb/Psi/PcatParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class PcatParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/SdttParser.cs
Normal file
11
skyscraper8/Isdb/Psi/SdttParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class SdttParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
skyscraper8/Isdb/Psi/SitParser.cs
Normal file
11
skyscraper8/Isdb/Psi/SitParser.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Isdb.Psi;
|
||||||
|
|
||||||
|
public class SitParser : IPsiProcessor
|
||||||
|
{
|
||||||
|
public void GatherPsi(PsiSection section, int sourcePid)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,11 +11,13 @@ using skyscraper5.Mpeg2.Descriptors;
|
|||||||
using skyscraper5.Mpeg2.ExtensionDescriptors;
|
using skyscraper5.Mpeg2.ExtensionDescriptors;
|
||||||
using skyscraper5.Mpeg2.Psi.Model;
|
using skyscraper5.Mpeg2.Psi.Model;
|
||||||
using skyscraper5.Skyscraper.IO;
|
using skyscraper5.Skyscraper.IO;
|
||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
using skyscraper5.src.Mpeg2.Descriptors;
|
using skyscraper5.src.Mpeg2.Descriptors;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
namespace skyscraper5.Mpeg2.Psi
|
namespace skyscraper5.Mpeg2.Psi
|
||||||
{
|
{
|
||||||
class PmtParser : IPsiProcessor
|
class PmtParser : IPsiProcessor, IMultistandardTable
|
||||||
{
|
{
|
||||||
public IPmtEventHandler EventHandler { get; }
|
public IPmtEventHandler EventHandler { get; }
|
||||||
|
|
||||||
@ -98,7 +100,7 @@ namespace skyscraper5.Mpeg2.Psi
|
|||||||
|
|
||||||
private void ParseInnerDescriptors(ProgramMappingStream output, byte[] inputBuffer)
|
private void ParseInnerDescriptors(ProgramMappingStream output, byte[] inputBuffer)
|
||||||
{
|
{
|
||||||
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(inputBuffer, "PMT");
|
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(inputBuffer, GetTableType());
|
||||||
foreach (TsDescriptor dvbDescriptor in descriptors)
|
foreach (TsDescriptor dvbDescriptor in descriptors)
|
||||||
{
|
{
|
||||||
output.NumDescriptors++;
|
output.NumDescriptors++;
|
||||||
@ -406,7 +408,7 @@ namespace skyscraper5.Mpeg2.Psi
|
|||||||
|
|
||||||
private void ParseOuterDescriptors(ProgramMapping output, byte[] inputBuffer)
|
private void ParseOuterDescriptors(ProgramMapping output, byte[] inputBuffer)
|
||||||
{
|
{
|
||||||
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(inputBuffer, "PMT");
|
IEnumerable<TsDescriptor> descriptors = TsDescriptorUnpacker.GetInstance().UnpackDescriptors(inputBuffer, GetTableType());
|
||||||
foreach (TsDescriptor tsDescriptor in descriptors)
|
foreach (TsDescriptor tsDescriptor in descriptors)
|
||||||
{
|
{
|
||||||
string name = tsDescriptor.GetType().Name;
|
string name = tsDescriptor.GetType().Name;
|
||||||
@ -590,5 +592,23 @@ namespace skyscraper5.Mpeg2.Psi
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private STD_TYPE standard;
|
||||||
|
public void SetStandard(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTableType()
|
||||||
|
{
|
||||||
|
if (IMultistandardTable.IsIsdb(standard))
|
||||||
|
{
|
||||||
|
return "ISDB PMT";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "PMT";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
skyscraper8/Skyscraper/IMultistandardTable.cs
Normal file
36
skyscraper8/Skyscraper/IMultistandardTable.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
||||||
|
|
||||||
|
namespace skyscraper8.Skyscraper;
|
||||||
|
|
||||||
|
public interface IMultistandardTable
|
||||||
|
{
|
||||||
|
void SetStandard(STD_TYPE standard);
|
||||||
|
|
||||||
|
public static bool IsIsdb(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
switch (standard)
|
||||||
|
{
|
||||||
|
case STD_TYPE.STD_ISDBT:
|
||||||
|
case STD_TYPE.STD_ISDBS:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsDvb(STD_TYPE standard)
|
||||||
|
{
|
||||||
|
switch (standard)
|
||||||
|
{
|
||||||
|
case STD_TYPE.STD_DVBC:
|
||||||
|
case STD_TYPE.STD_DVBC2:
|
||||||
|
case STD_TYPE.STD_DVBS:
|
||||||
|
case STD_TYPE.STD_DVBS2:
|
||||||
|
case STD_TYPE.STD_DVBT:
|
||||||
|
case STD_TYPE.STD_DVBT2:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user