Added some NIP Metadata parsing.

This commit is contained in:
feyris-tan 2025-06-21 20:57:07 +02:00
parent c4a4887a81
commit 7590c7c5bc
36 changed files with 2738 additions and 68 deletions

View File

@ -0,0 +1,394 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
[System.Xml.Serialization.XmlRootAttribute("NetworkInformationFile", Namespace="urn:dvb:metadata:nativeip:2023", IsNullable=false)]
public partial class NetworkInformationFileType {
private System.DateTime versionUpdateField;
private NetworkInformationFileTypeNIFType nIFTypeField;
private BroadcastNetworkType actualBroadcastNetworkField;
private BroadcastNetworkType[] otherBroadcastNetworkField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public NetworkInformationFileTypeNIFType NIFType {
get {
return this.nIFTypeField;
}
set {
this.nIFTypeField = value;
}
}
/// <remarks/>
public BroadcastNetworkType ActualBroadcastNetwork {
get {
return this.actualBroadcastNetworkField;
}
set {
this.actualBroadcastNetworkField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("OtherBroadcastNetwork")]
public BroadcastNetworkType[] OtherBroadcastNetwork {
get {
return this.otherBroadcastNetworkField;
}
set {
this.otherBroadcastNetworkField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum NetworkInformationFileTypeNIFType {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Physical Network")]
PhysicalNetwork,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Commercial Operator")]
CommercialOperator,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class BroadcastNetworkType {
private BroadcastNetworkTypeNetworkType networkTypeField;
private string networkNameField;
private string nIPNetworkProviderNameField;
private SatellitePositionType satellitePositionField;
private ushort nIPNetworkIDField;
private NIPStreamType[] nIPStreamField;
/// <remarks/>
public BroadcastNetworkTypeNetworkType NetworkType {
get {
return this.networkTypeField;
}
set {
this.networkTypeField = value;
}
}
/// <remarks/>
public string NetworkName {
get {
return this.networkNameField;
}
set {
this.networkNameField = value;
}
}
/// <remarks/>
public string NIPNetworkProviderName {
get {
return this.nIPNetworkProviderNameField;
}
set {
this.nIPNetworkProviderNameField = value;
}
}
/// <remarks/>
public SatellitePositionType SatellitePosition {
get {
return this.satellitePositionField;
}
set {
this.satellitePositionField = value;
}
}
/// <remarks/>
public ushort NIPNetworkID {
get {
return this.nIPNetworkIDField;
}
set {
this.nIPNetworkIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("NIPStream")]
public NIPStreamType[] NIPStream {
get {
return this.nIPStreamField;
}
set {
this.nIPStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum BroadcastNetworkTypeNetworkType {
/// <remarks/>
Satellite,
/// <remarks/>
Terrestrial,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class SatellitePositionType {
private double orbitalPositionField;
private SatellitePositionTypeWest_East_flag west_East_flagField;
/// <remarks/>
public double OrbitalPosition {
get {
return this.orbitalPositionField;
}
set {
this.orbitalPositionField = value;
}
}
/// <remarks/>
public SatellitePositionTypeWest_East_flag West_East_flag {
get {
return this.west_East_flagField;
}
set {
this.west_East_flagField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum SatellitePositionTypeWest_East_flag {
/// <remarks/>
West,
/// <remarks/>
East,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class NIPStreamType {
private NIPStreamTypeLinkLayerFormat linkLayerFormatField;
private string nIPStreamProviderNameField;
private string nIPCarrierIDField;
private string nIPLinkIDField;
private ushort nIPServiceIDField;
private NIPStreamTypeBootstrapStream bootstrapStreamField;
/// <remarks/>
public NIPStreamTypeLinkLayerFormat LinkLayerFormat {
get {
return this.linkLayerFormatField;
}
set {
this.linkLayerFormatField = value;
}
}
/// <remarks/>
public string NIPStreamProviderName {
get {
return this.nIPStreamProviderNameField;
}
set {
this.nIPStreamProviderNameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="positiveInteger")]
public string NIPCarrierID {
get {
return this.nIPCarrierIDField;
}
set {
this.nIPCarrierIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string NIPLinkID {
get {
return this.nIPLinkIDField;
}
set {
this.nIPLinkIDField = value;
}
}
/// <remarks/>
public ushort NIPServiceID {
get {
return this.nIPServiceIDField;
}
set {
this.nIPServiceIDField = value;
}
}
/// <remarks/>
public NIPStreamTypeBootstrapStream BootstrapStream {
get {
return this.bootstrapStreamField;
}
set {
this.bootstrapStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum NIPStreamTypeLinkLayerFormat {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("GSE-Lite")]
GSELite,
/// <remarks/>
TS,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class NIPStreamTypeBootstrapStream {
private NIPStreamTypeBootstrapStreamBootstrapType bootstrapTypeField;
private NIPStreamTypeBootstrapStreamStatus statusField;
/// <remarks/>
public NIPStreamTypeBootstrapStreamBootstrapType BootstrapType {
get {
return this.bootstrapTypeField;
}
set {
this.bootstrapTypeField = value;
}
}
/// <remarks/>
public NIPStreamTypeBootstrapStreamStatus Status {
get {
return this.statusField;
}
set {
this.statusField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum NIPStreamTypeBootstrapStreamBootstrapType {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Physical Network")]
PhysicalNetwork,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Commercial Operator")]
CommercialOperator,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum NIPStreamTypeBootstrapStreamStatus {
/// <remarks/>
Active,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Not Active")]
NotActive,
/// <remarks/>
Deprecated,
}
}

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:dvb:metadata:nativeip:2023" targetNamespace="urn:dvb:metadata:nativeip:2023" elementFormDefault="qualified">
<xs:element name="NetworkInformationFile" type="ns:NetworkInformationFileType"/>
<xs:complexType name="NetworkInformationFileType">
<xs:sequence>
<xs:element name="VersionUpdate" type="xs:dateTime"/>
<xs:element name="NIFType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Physical Network"/>
<xs:enumeration value="Commercial Operator"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ActualBroadcastNetwork" type="ns:BroadcastNetworkType"/>
<xs:element name="OtherBroadcastNetwork" type="ns:BroadcastNetworkType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BroadcastNetworkType">
<xs:sequence>
<xs:element name="NetworkType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Satellite"/>
<xs:enumeration value="Terrestrial"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NetworkName" type="xs:string"/>
<xs:element name="NIPNetworkProviderName" type="xs:string"/>
<xs:element name="SatellitePosition" type="ns:SatellitePositionType" minOccurs="0"/>
<xs:element name="NIPNetworkID">
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65280"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPStream" type="ns:NIPStreamType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SatellitePositionType">
<xs:sequence>
<xs:element name="OrbitalPosition" type="xs:double"/>
<xs:element name="West_East_flag">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="West"/>
<xs:enumeration value="East"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NIPStreamType">
<xs:sequence>
<xs:element name="LinkLayerFormat">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="GSE-Lite"/>
<xs:enumeration value="TS"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPStreamProviderName" type="xs:string"/>
<xs:element name="NIPCarrierID">
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPLinkID">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPServiceID">
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BootstrapStream" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="BootstrapType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Physical Network"/>
<xs:enumeration value="Commercial Operator"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Active"/>
<xs:enumeration value="Not Active"/>
<xs:enumeration value="Deprecated"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1,3 @@
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes NetworkInformationFile.xsd /namespace:skyscraper8.DvbNip
pause

View File

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
[System.Xml.Serialization.XmlRootAttribute("PrivateDataSignallingManifest", Namespace="urn:dvb:metadata:nativeip:2023", IsNullable=false)]
public partial class PrivateDataSignallingManifestType {
private System.DateTime versionUpdateField;
private PrivateDataProviderType[] privateDataProviderField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("PrivateDataProvider")]
public PrivateDataProviderType[] PrivateDataProvider {
get {
return this.privateDataProviderField;
}
set {
this.privateDataProviderField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class PrivateDataProviderType {
private PrivateDataSessionType[] privateDataSessionField;
private byte[] privateDataProviderIDField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("PrivateDataSession")]
public PrivateDataSessionType[] PrivateDataSession {
get {
return this.privateDataSessionField;
}
set {
this.privateDataSessionField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute(DataType="hexBinary")]
public byte[] privateDataProviderID {
get {
return this.privateDataProviderIDField;
}
set {
this.privateDataProviderIDField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class PrivateDataSessionType {
private System.DateTime versionUpdateField;
private bool versionUpdateFieldSpecified;
private string[] tagRefField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool VersionUpdateSpecified {
get {
return this.versionUpdateFieldSpecified;
}
set {
this.versionUpdateFieldSpecified = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("TagRef", DataType="anyURI")]
public string[] TagRef {
get {
return this.tagRefField;
}
set {
this.tagRefField = value;
}
}
}
}

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:dvb:metadata:nativeip:2023" xmlns="urn:dvb:metadata:nativeip:2023" elementFormDefault="qualified">
<xs:element name="PrivateDataSignallingManifest" type="PrivateDataSignallingManifestType" />
<xs:complexType name="PrivateDataSignallingManifestType">
<xs:sequence>
<xs:element name="VersionUpdate" type="xs:dateTime" />
<xs:element name="PrivateDataProvider" type="PrivateDataProviderType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="PrivateDataProviderType">
<xs:sequence>
<xs:element name="PrivateDataSession" type="PrivateDataSessionType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="privateDataProviderID" type="PrivateDataSpecID" use="required" />
</xs:complexType>
<xs:simpleType name="PrivateDataSpecID">
<xs:restriction base="xs:hexBinary">
<xs:length value="4" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PrivateDataSessionType">
<xs:sequence>
<xs:element name="VersionUpdate" type="xs:dateTime" minOccurs="0" />
<!-- element should start with upper-case -->
<!-- Tags should be rename to TagRef to clearly indicate that this is a ref to a tag of the Bootstrap MGC -->
<xs:element name="TagRef" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1 @@
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes PrivateDataSignalling.xsd /namespace:skyscraper8.DvbNip

View File

@ -0,0 +1,235 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
[System.Xml.Serialization.XmlRootAttribute("ServiceInformationFile", Namespace="urn:dvb:metadata:nativeip:2023", IsNullable=false)]
public partial class ServiceInformationFileType {
private System.DateTime versionUpdateField;
private string nIPNetworkProviderNameField;
private BroadcastMediaStreamType[] broadcastMediaStreamField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public string NIPNetworkProviderName {
get {
return this.nIPNetworkProviderNameField;
}
set {
this.nIPNetworkProviderNameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("BroadcastMediaStream")]
public BroadcastMediaStreamType[] BroadcastMediaStream {
get {
return this.broadcastMediaStreamField;
}
set {
this.broadcastMediaStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class BroadcastMediaStreamType {
private ushort nIPNetworkIDField;
private string nIPCarrierIDField;
private string nIPLinkIDField;
private ushort nIPServiceIDField;
private BroadcastMediaStreamTypeBroadcastMedia broadcastMediaField;
/// <remarks/>
public ushort NIPNetworkID {
get {
return this.nIPNetworkIDField;
}
set {
this.nIPNetworkIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="positiveInteger")]
public string NIPCarrierID {
get {
return this.nIPCarrierIDField;
}
set {
this.nIPCarrierIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string NIPLinkID {
get {
return this.nIPLinkIDField;
}
set {
this.nIPLinkIDField = value;
}
}
/// <remarks/>
public ushort NIPServiceID {
get {
return this.nIPServiceIDField;
}
set {
this.nIPServiceIDField = value;
}
}
/// <remarks/>
public BroadcastMediaStreamTypeBroadcastMedia BroadcastMedia {
get {
return this.broadcastMediaField;
}
set {
this.broadcastMediaField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class BroadcastMediaStreamTypeBroadcastMedia {
private string[] uRIField;
private InteractiveApplicationsType[] interactiveApplicationsField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("URI")]
public string[] URI {
get {
return this.uRIField;
}
set {
this.uRIField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("InteractiveApplications")]
public InteractiveApplicationsType[] InteractiveApplications {
get {
return this.interactiveApplicationsField;
}
set {
this.interactiveApplicationsField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
public partial class InteractiveApplicationsType {
private InteractiveApplicationsTypeApplicationType applicationTypeField;
private string applicationIDField;
private string applicationURIField;
/// <remarks/>
public InteractiveApplicationsTypeApplicationType ApplicationType {
get {
return this.applicationTypeField;
}
set {
this.applicationTypeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string ApplicationID {
get {
return this.applicationIDField;
}
set {
this.applicationIDField = value;
}
}
/// <remarks/>
public string ApplicationURI {
get {
return this.applicationURIField;
}
set {
this.applicationURIField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2023")]
public enum InteractiveApplicationsTypeApplicationType {
/// <remarks/>
HbbTV,
/// <remarks/>
MHP,
/// <remarks/>
MHEG5,
/// <remarks/>
Proprietary,
}
}

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:dvb:metadata:nativeip:2023" xmlns:mpeg7="urn:tva:mpeg7:2008" targetNamespace="urn:dvb:metadata:nativeip:2023" elementFormDefault="qualified">
<xs:import namespace="urn:tva:mpeg7:2008" schemaLocation="tva_mpeg7.xsd"/>
<xs:element name="ServiceInformationFile" type="ns:ServiceInformationFileType"/>
<xs:complexType name="ServiceInformationFileType">
<xs:sequence>
<xs:element name="VersionUpdate" type="xs:dateTime"/>
<xs:element name="NIPNetworkProviderName" type="xs:string" />
<xs:element name="BroadcastMediaStream" type="ns:BroadcastMediaStreamType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BroadcastMediaStreamType">
<xs:sequence>
<xs:element name="NIPNetworkID">
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="65280"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPCarrierID">
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPLinkID">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIPServiceID">
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BroadcastMedia">
<xs:complexType>
<xs:sequence>
<xs:element name="URI" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="InteractiveApplications" type="ns:InteractiveApplicationsType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InteractiveApplicationsType">
<xs:sequence>
<xs:element name="ApplicationType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="HbbTV"/>
<xs:enumeration value="MHP"/>
<xs:enumeration value="MHEG5"/>
<xs:enumeration value="Proprietary"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ApplicationID" type="xs:integer" />
<xs:element name="ApplicationURI" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1,3 @@
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes ServiceInformationFile.xsd /namespace:skyscraper8.DvbNip
pause

View File

@ -0,0 +1,127 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2023")]
[System.Xml.Serialization.XmlRootAttribute("TimeOffsetFile", Namespace="urn:dvb:metadata:nativeip:2023", IsNullable=false)]
public partial class TimeOffsetFileType {
private System.DateTime versionUpdateField;
private string country_codeField;
private string country_region_IdField;
private bool local_time_offset_polarityField;
private string local_time_offset_valueField;
private System.DateTime time_of_changeField;
private bool time_of_changeFieldSpecified;
private string next_time_offset_valueField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public string country_code {
get {
return this.country_codeField;
}
set {
this.country_codeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string country_region_Id {
get {
return this.country_region_IdField;
}
set {
this.country_region_IdField = value;
}
}
/// <remarks/>
public bool local_time_offset_polarity {
get {
return this.local_time_offset_polarityField;
}
set {
this.local_time_offset_polarityField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string local_time_offset_value {
get {
return this.local_time_offset_valueField;
}
set {
this.local_time_offset_valueField = value;
}
}
/// <remarks/>
public System.DateTime time_of_change {
get {
return this.time_of_changeField;
}
set {
this.time_of_changeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool time_of_changeSpecified {
get {
return this.time_of_changeFieldSpecified;
}
set {
this.time_of_changeFieldSpecified = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string next_time_offset_value {
get {
return this.next_time_offset_valueField;
}
set {
this.next_time_offset_valueField = value;
}
}
}
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:dvb:metadata:nativeip:2023" targetNamespace="urn:dvb:metadata:nativeip:2023" elementFormDefault="qualified">
<xs:element name="TimeOffsetFile" type="ns:TimeOffsetFileType"/>
<xs:complexType name="TimeOffsetFileType">
<xs:sequence>
<xs:element name="VersionUpdate" type="xs:dateTime"/>
<xs:element name="country_code">
<xs:simpleType>
<xs:restriction base= "xs:string">
<xs:pattern value="[A-Z][A-Z][A-Z]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="country_region_Id" minOccurs="0">
<xs:simpleType>
<xs:restriction base= "xs:nonNegativeInteger" >
<xs:minInclusive value="0"/>
<xs:maxInclusive value="63" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="local_time_offset_polarity" type="xs:boolean"/>
<xs:element name="local_time_offset_value">
<xs:simpleType>
<xs:restriction base= "xs:nonNegativeInteger">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="43119"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="time_of_change" type="xs:dateTime" minOccurs="0"/>
<xs:element name="next_time_offset_value" type="xs:nonNegativeInteger" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -0,0 +1,3 @@
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\xsd.exe" /classes TimeOffsetFile.xsd /namespace:skyscraper8.DvbNip
pause

View File

@ -47,6 +47,7 @@ namespace skyscraper8.DvbI
DvbIDataStorage dataStorage = (DvbIDataStorage)context.DataStorage;
long sourceHash = context.GetSourceHash();
if (dataStorage.TestForDvbiServiceListEntryPoints(sourceHash))
{
DateTime lastChecked = dataStorage.GetLastDvbiServiceListEntryPointUpdateDate(sourceHash);

View File

@ -2,9 +2,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using static skyscraper5.src.InteractionChannel.Model.Rmt;
namespace skyscraper8.DvbI
{
@ -15,11 +17,16 @@ namespace skyscraper8.DvbI
private static XmlSerializer serviceListEntryPointSerializer;
public static ServiceListEntryPoints UnpackServiceListEntryPoints(byte[] buffer)
{
MemoryStream slepStream = new MemoryStream(buffer, false);
return UnpackServiceListEntryPoints(slepStream);
}
public static ServiceListEntryPoints UnpackServiceListEntryPoints(Stream slepStream)
{
if (serviceListEntryPointSerializer == null)
serviceListEntryPointSerializer = new XmlSerializer(typeof(ServiceListEntryPoints));
MemoryStream slepStream = new MemoryStream(buffer, false);
object slepWrapped = serviceListEntryPointSerializer.Deserialize(slepStream);
ServiceListEntryPoints serviceListEntryPoint = (ServiceListEntryPoints)slepWrapped;
return serviceListEntryPoint;
@ -226,5 +233,36 @@ namespace skyscraper8.DvbI
}
return null;
}
public static long GetSourceHash(ServiceListEntryPointSource source, ushort originalNetworkId, ushort transportStreamId, int pid)
{
long result = (int)source;
switch (source)
{
case ServiceListEntryPointSource.TransportStream:
case ServiceListEntryPointSource.DvbNip:
result <<= 4;
result += originalNetworkId;
result <<= 16;
result += transportStreamId;
result <<= 16;
result += pid;
return result;
default:
throw new NotImplementedException(source.ToString());
}
}
public static ServiceListEntryPoints UnpackServiceListEntryPoints(string rawSlepString)
{
if (serviceListEntryPointSerializer == null)
serviceListEntryPointSerializer = new XmlSerializer(typeof(ServiceListEntryPoints));
StringReader stringReader = new StringReader(rawSlepString);
object slepWrapped = serviceListEntryPointSerializer.Deserialize(stringReader);
ServiceListEntryPoints serviceListEntryPoint = (ServiceListEntryPoints)slepWrapped;
return serviceListEntryPoint;
}
}
}

View File

@ -226,7 +226,7 @@ namespace moe.yo3explorer.skyscraper8.DVBI.Model {
private string contentTypeField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Namespace="urn:dvb:metadata:servicediscovery-types:2023")]
//[System.Xml.Serialization.XmlElementAttribute(Namespace="urn:dvb:metadata:servicediscovery-types:2023")]
public string URI {
get {
return this.uRIField;

View File

@ -8,6 +8,7 @@ namespace skyscraper8.DvbI
{
internal enum ServiceListEntryPointSource
{
TransportStream
TransportStream,
DvbNip
}
}

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using moe.yo3explorer.skyscraper8.DVBI.Model;
namespace skyscraper8.DvbNip
{
@ -13,5 +14,14 @@ namespace skyscraper8.DvbNip
void FluteFileDownloadProgress(NipActualCarrierInformation currentCarrierInformation, ulong destinationTsi, ulong destinationToi, double progress, FileType fileAssociation);
void OnMulticastGatewayConfiguration(NipActualCarrierInformation currentCarrierInformation, MulticastGatewayConfigurationType multicastGatewayConfiguration);
void OnNipCarrierDetected(NipActualCarrierInformation currentCarrierInformation);
bool IsFileNeeded(string announcedFileContentLocation);
void OnPrivateDataSignallingManifest(NipActualCarrierInformation currentCarrierInformation, PrivateDataSignallingManifestType privateDataSignallingManifest);
void OnServiceListEntryPoints(NipActualCarrierInformation currentCarrierInformation,
ServiceListEntryPoints serviceListEntryPoints, DateTime currentTime, DvbNipServiceListNotifier dvbNipReceiver);
void OnServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId, ServiceListType serviceList);
void OnTimeOffsetFile(NipActualCarrierInformation currentCarrierInformation, TimeOffsetFileType timeOffsetFile);
void OnNetworkInformationFile(NipActualCarrierInformation currentCarrierInformation, NetworkInformationFileType networkInformationFile);
void OnServiceInformationFile(NipActualCarrierInformation currentCarrierInformation, ServiceInformationFileType serviceInformationFile);
}
}

View File

@ -10,11 +10,13 @@ using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using moe.yo3explorer.skyscraper8.DVBI.Model;
using skyscraper8.DvbI;
namespace skyscraper8.DvbNip
{
[SkyscraperPlugin]
internal class DvbNipReceiver : ISkyscraperMpePlugin
internal class DvbNipReceiver : ISkyscraperMpePlugin, DvbNipServiceListNotifier
{
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
@ -62,6 +64,10 @@ namespace skyscraper8.DvbNip
}
UserDatagram udpPacket = new UserDatagram(ipv4Packet);
LctFrame lctFrame = new LctFrame(udpPacket.Payload);
if (lctFrame.LctHeader.TimeExtenstion != null)
{
this.currentTime = lctFrame.LctHeader.TimeExtenstion.Sct;
}
if (flutes == null)
flutes = new Dictionary<Tuple<IPAddress, ushort, ulong, ulong>, FluteListener>();
@ -108,19 +114,26 @@ namespace skyscraper8.DvbNip
{
return;
}
if (fluteListener.FileAssociation.ContentLocation.Equals("urn:dvb:metadata:cs:MulticastTransportObjectTypeCS:2021:gateway-configuration"))
if (fluteListener.FileAssociation.ContentLocation.StartsWith("urn:dvb:"))
{
if(CurrentCarrierInformation != null)
{
MulticastGatewayConfigurationType multicastGatewayConfiguration = DvbNipUtilities.UnpackMulticastGatewayConfiguration(fluteListener.ToStream());
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration);
fluteListener.Disabled = true;
}
HandleMetadata(fluteListener);
fluteListener.Disabled = true;
return;
}
if (CurrentCarrierInformation != null)
{
if (serviceListUrls != null)
{
if (serviceListUrls.ContainsKey(fluteListener.FileAssociation.ContentLocation))
{
string serviceListId = serviceListUrls[fluteListener.FileAssociation.ContentLocation];
Stream serviceListStream = fluteListener.ToStream();
byte[] serviceListByteArray = new byte[serviceListStream.Length];
ServiceListType serviceList = DvbIUtils.UnpackServiceList(serviceListByteArray);
EventHandler.OnServiceList(CurrentCarrierInformation, serviceListId, serviceList);
}
}
EventHandler?.FluteFileArrival(CurrentCarrierInformation, fluteListener);
fluteListener.Disabled = true;
}
@ -140,6 +153,54 @@ namespace skyscraper8.DvbNip
}
}
private DateTime? currentTime;
private bool HandleMetadata(FluteListener fluteListener)
{
switch (fluteListener.FileAssociation.ContentLocation)
{
case "urn:dvb:metadata:cs:MulticastTransportObjectTypeCS:2021:gateway-configuration":
MulticastGatewayConfigurationType multicastGatewayConfiguration = DvbNipUtilities.UnpackMulticastGatewayConfiguration(fluteListener.ToStream());
EventHandler?.OnMulticastGatewayConfiguration(CurrentCarrierInformation, multicastGatewayConfiguration);
return true;
case "urn:dvb:metadata:nativeip:PrivateDataSignalling":
PrivateDataSignallingManifestType privateDataSignallingManifest = DvbNipUtilities.UnpackPrivateDataSignallingManifest(fluteListener.ToStream());
EventHandler?.OnPrivateDataSignallingManifest(CurrentCarrierInformation, privateDataSignallingManifest);
return true;
case "urn:dvb:metadata:nativeip:dvb-i-slep":
if (currentTime.HasValue)
{
Stream rawSlepStream = fluteListener.ToStream();
byte[] rawSlepBytes = new byte[rawSlepStream.Length];
rawSlepStream.Read(rawSlepBytes, 0, (int)rawSlepStream.Length);
string rawSlepString = Encoding.UTF8.GetString(rawSlepBytes);
rawSlepString = rawSlepString.Replace("<dvbi-types:", "<");
rawSlepString = rawSlepString.Replace("</dvbi-types:", "</");
ServiceListEntryPoints serviceListEntryPoints = DvbIUtils.UnpackServiceListEntryPoints(rawSlepString);
EventHandler?.OnServiceListEntryPoints(CurrentCarrierInformation, serviceListEntryPoints, currentTime.Value, this);
return true;
}
else
{
return false;
}
break;
case "urn:dvb:metadata:nativeip:TimeOffsetFile":
TimeOffsetFileType timeOffsetFile = DvbNipUtilities.UnpackTimeOffsetFile(fluteListener.ToStream());
EventHandler?.OnTimeOffsetFile(CurrentCarrierInformation, timeOffsetFile);
return true;
case "urn:dvb:metadata:nativeip:NetworkInformationFile":
NetworkInformationFileType networkInformationFile = DvbNipUtilities.UnpackNetworkInformationFile(fluteListener.ToStream());
EventHandler?.OnNetworkInformationFile(CurrentCarrierInformation, networkInformationFile);
return true;
case "urn:dvb:metadata:nativeip:ServiceInformationFile":
ServiceInformationFileType serviceInformationFile = DvbNipUtilities.UnpackServiceInformationFile(fluteListener.ToStream());
EventHandler?.OnServiceInformationFile(CurrentCarrierInformation, serviceInformationFile);
return true;
default:
throw new NotImplementedException(fluteListener.FileAssociation.ContentLocation);
}
}
private void TryPruneCache()
{
DateTime now = DateTime.Now;
@ -158,7 +219,12 @@ namespace skyscraper8.DvbNip
flutes.Remove(staleListener.Key);
}
int nowItems = flutes.Count;
logger.DebugFormat(String.Format("Removed {0} stale segments from FLUTE cache. Cache slimmed from {1} to {2} items.", staleListeners.Count, prevItems, nowItems));
if (staleListeners.Count > 10)
{
logger.DebugFormat(String.Format(
"Removed {0} stale segments from FLUTE cache. Cache slimmed from {1} to {2} items.",
staleListeners.Count, prevItems, nowItems));
}
}
}
@ -170,6 +236,14 @@ namespace skyscraper8.DvbNip
if (string.IsNullOrEmpty(announcedFile.TOI))
continue;
bool needed = EventHandler.IsFileNeeded(announcedFile.ContentLocation);
if (serviceListUrls != null)
{
if (serviceListUrls.ContainsKey(announcedFile.ContentLocation))
{
needed = true;
}
}
ulong targetToi = ulong.Parse(announcedFile.TOI);
Tuple<IPAddress, ushort, ulong, ulong> fluteCoordinate = new Tuple<IPAddress, ushort, ulong, ulong>(sourceListener.DestinationAddress, sourceListener.DestinationPort, sourceListener.DestinationTsi, targetToi);
if (flutes.ContainsKey(fluteCoordinate))
@ -180,6 +254,9 @@ namespace skyscraper8.DvbNip
listener.FileAssociation = announcedFile;
result = true;
}
if (!needed)
listener.Disabled = true;
}
else
{
@ -187,27 +264,9 @@ namespace skyscraper8.DvbNip
listener.FileAssociation = announcedFile;
flutes.Add(fluteCoordinate, listener);
result = true;
if (!needed)
listener.Disabled = true;
}
/*FluteListener? targetListener = flutes.Find(x =>
x.DestinationAddress.Equals(sourceListener.DestinationAddress) &&
x.DestinationPort == sourceListener.DestinationPort &&
x.DestinationTsi == sourceListener.DestinationTsi &&
x.DestinationToi == targetToi);
if (targetListener != null)
{
if (targetListener.FileAssociation != null)
{
targetListener.FileAssociation = announcedFile;
result = true;
}
}
else
{
targetListener = new FluteListener(sourceListener.DestinationAddress, sourceListener.DestinationPort, sourceListener.DestinationTsi, targetToi);
targetListener.FileAssociation = announcedFile;
flutes.Add(targetListener);
result = true;
}*/
}
return result;
@ -230,5 +289,33 @@ namespace skyscraper8.DvbNip
public NipActualCarrierInformation CurrentCarrierInformation { get; private set; }
public IDvbNipEventHandler EventHandler { get; private set; }
private Dictionary<string,string> serviceListUrls;
public void AddServiceListUrl(string url, string id)
{
if (serviceListUrls == null)
serviceListUrls = new Dictionary<string, string>();
if (!serviceListUrls.ContainsKey(url))
{
serviceListUrls.Add(url, id);
KeyValuePair<Tuple<IPAddress, ushort, ulong, ulong>, FluteListener> keyValuePair = flutes
.Where(x => x.Value.FileAssociation != null)
.Where(x => x.Value.FileAssociation.ContentLocation.Equals(url))
.FirstOrDefault();
if (keyValuePair.Key != null)
{
flutes.Remove(keyValuePair.Key);
}
}
}
private long sourceHash;
public void SetSourceHash(long sourceHash)
{
this.sourceHash = sourceHash;
}
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper8.DvbNip
{
public interface DvbNipServiceListNotifier
{
void AddServiceListUrl(string url, string id);
void SetSourceHash(long sourceHash);
}
}

View File

@ -57,5 +57,58 @@ namespace skyscraper8.DvbNip
{
return IsContinuousFileType(Path.GetExtension(filteType.ContentLocation));
}
private static XmlSerializer privateDataSignallingManifestXmlSerializer;
public static PrivateDataSignallingManifestType UnpackPrivateDataSignallingManifest(Stream toStream)
{
if (privateDataSignallingManifestXmlSerializer == null)
{
privateDataSignallingManifestXmlSerializer = new XmlSerializer(typeof(PrivateDataSignallingManifestType));
}
object v = privateDataSignallingManifestXmlSerializer.Deserialize(toStream);
PrivateDataSignallingManifestType result = (PrivateDataSignallingManifestType)v;
return result;
}
private static XmlSerializer timeOffsetFileXmlSerializer;
public static TimeOffsetFileType UnpackTimeOffsetFile(Stream toStream)
{
if (timeOffsetFileXmlSerializer == null)
{
timeOffsetFileXmlSerializer = new XmlSerializer(typeof(TimeOffsetFileType));
}
object v = timeOffsetFileXmlSerializer.Deserialize(toStream);
TimeOffsetFileType result = (TimeOffsetFileType)v;
return result;
}
private static XmlSerializer networkInformationFileXmlSerializer;
public static NetworkInformationFileType UnpackNetworkInformationFile(Stream toStream)
{
if (networkInformationFileXmlSerializer == null)
{
networkInformationFileXmlSerializer = new XmlSerializer(typeof(NetworkInformationFileType));
}
object v = networkInformationFileXmlSerializer.Deserialize(toStream);
NetworkInformationFileType result = (NetworkInformationFileType)v;
return result;
}
private static XmlSerializer serviceInformationFileXmlSerializer;
public static ServiceInformationFileType UnpackServiceInformationFile(Stream toStream)
{
if (serviceInformationFileXmlSerializer == null)
{
serviceInformationFileXmlSerializer = new XmlSerializer(typeof(ServiceInformationFileType));
}
object v = serviceInformationFileXmlSerializer.Deserialize(toStream);
ServiceInformationFileType result = (ServiceInformationFileType)v;
return result;
}
}
}

View File

@ -26,5 +26,23 @@ namespace skyscraper8.DvbNip
public ushort NipLinkId { get; }
public ushort NipServiceId { get; }
public string NipStreamProviderName { get; }
protected bool Equals(NipActualCarrierInformation other)
{
return NipNetworkId == other.NipNetworkId && NipCarrierId == other.NipCarrierId && NipLinkId == other.NipLinkId && NipServiceId == other.NipServiceId;
}
public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((NipActualCarrierInformation)obj);
}
public override int GetHashCode()
{
return HashCode.Combine(NipNetworkId, NipCarrierId, NipLinkId, NipServiceId);
}
}
}

View File

@ -0,0 +1,394 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
[System.Xml.Serialization.XmlRootAttribute("NetworkInformationFile", Namespace="urn:dvb:metadata:nativeip:2024", IsNullable=false)]
public partial class NetworkInformationFileType {
private System.DateTime versionUpdateField;
private NetworkInformationFileTypeNIFType nIFTypeField;
private BroadcastNetworkType actualBroadcastNetworkField;
private BroadcastNetworkType[] otherBroadcastNetworkField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public NetworkInformationFileTypeNIFType NIFType {
get {
return this.nIFTypeField;
}
set {
this.nIFTypeField = value;
}
}
/// <remarks/>
public BroadcastNetworkType ActualBroadcastNetwork {
get {
return this.actualBroadcastNetworkField;
}
set {
this.actualBroadcastNetworkField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("OtherBroadcastNetwork")]
public BroadcastNetworkType[] OtherBroadcastNetwork {
get {
return this.otherBroadcastNetworkField;
}
set {
this.otherBroadcastNetworkField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum NetworkInformationFileTypeNIFType {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Physical Network")]
PhysicalNetwork,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Commercial Operator")]
CommercialOperator,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class BroadcastNetworkType {
private BroadcastNetworkTypeNetworkType networkTypeField;
private string networkNameField;
private string nIPNetworkProviderNameField;
private SatellitePositionType satellitePositionField;
private ushort nIPNetworkIDField;
private NIPStreamType[] nIPStreamField;
/// <remarks/>
public BroadcastNetworkTypeNetworkType NetworkType {
get {
return this.networkTypeField;
}
set {
this.networkTypeField = value;
}
}
/// <remarks/>
public string NetworkName {
get {
return this.networkNameField;
}
set {
this.networkNameField = value;
}
}
/// <remarks/>
public string NIPNetworkProviderName {
get {
return this.nIPNetworkProviderNameField;
}
set {
this.nIPNetworkProviderNameField = value;
}
}
/// <remarks/>
public SatellitePositionType SatellitePosition {
get {
return this.satellitePositionField;
}
set {
this.satellitePositionField = value;
}
}
/// <remarks/>
public ushort NIPNetworkID {
get {
return this.nIPNetworkIDField;
}
set {
this.nIPNetworkIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("NIPStream")]
public NIPStreamType[] NIPStream {
get {
return this.nIPStreamField;
}
set {
this.nIPStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum BroadcastNetworkTypeNetworkType {
/// <remarks/>
Satellite,
/// <remarks/>
Terrestrial,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class SatellitePositionType {
private double orbitalPositionField;
private SatellitePositionTypeWest_East_flag west_East_flagField;
/// <remarks/>
public double OrbitalPosition {
get {
return this.orbitalPositionField;
}
set {
this.orbitalPositionField = value;
}
}
/// <remarks/>
public SatellitePositionTypeWest_East_flag West_East_flag {
get {
return this.west_East_flagField;
}
set {
this.west_East_flagField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum SatellitePositionTypeWest_East_flag {
/// <remarks/>
West,
/// <remarks/>
East,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class NIPStreamType {
private NIPStreamTypeLinkLayerFormat linkLayerFormatField;
private string nIPStreamProviderNameField;
private string nIPCarrierIDField;
private string nIPLinkIDField;
private ushort nIPServiceIDField;
private NIPStreamTypeBootstrapStream bootstrapStreamField;
/// <remarks/>
public NIPStreamTypeLinkLayerFormat LinkLayerFormat {
get {
return this.linkLayerFormatField;
}
set {
this.linkLayerFormatField = value;
}
}
/// <remarks/>
public string NIPStreamProviderName {
get {
return this.nIPStreamProviderNameField;
}
set {
this.nIPStreamProviderNameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="positiveInteger")]
public string NIPCarrierID {
get {
return this.nIPCarrierIDField;
}
set {
this.nIPCarrierIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string NIPLinkID {
get {
return this.nIPLinkIDField;
}
set {
this.nIPLinkIDField = value;
}
}
/// <remarks/>
public ushort NIPServiceID {
get {
return this.nIPServiceIDField;
}
set {
this.nIPServiceIDField = value;
}
}
/// <remarks/>
public NIPStreamTypeBootstrapStream BootstrapStream {
get {
return this.bootstrapStreamField;
}
set {
this.bootstrapStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum NIPStreamTypeLinkLayerFormat {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("GSE-Lite")]
GSELite,
/// <remarks/>
TS,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class NIPStreamTypeBootstrapStream {
private NIPStreamTypeBootstrapStreamBootstrapType bootstrapTypeField;
private NIPStreamTypeBootstrapStreamStatus statusField;
/// <remarks/>
public NIPStreamTypeBootstrapStreamBootstrapType BootstrapType {
get {
return this.bootstrapTypeField;
}
set {
this.bootstrapTypeField = value;
}
}
/// <remarks/>
public NIPStreamTypeBootstrapStreamStatus Status {
get {
return this.statusField;
}
set {
this.statusField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum NIPStreamTypeBootstrapStreamBootstrapType {
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Physical Network")]
PhysicalNetwork,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Commercial Operator")]
CommercialOperator,
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum NIPStreamTypeBootstrapStreamStatus {
/// <remarks/>
Active,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("Not Active")]
NotActive,
/// <remarks/>
Deprecated,
}
}

View File

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
[System.Xml.Serialization.XmlRootAttribute("PrivateDataSignallingManifest", Namespace="urn:dvb:metadata:nativeip:2024", IsNullable=false)]
public partial class PrivateDataSignallingManifestType {
private System.DateTime versionUpdateField;
private PrivateDataProviderType[] privateDataProviderField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("PrivateDataProvider")]
public PrivateDataProviderType[] PrivateDataProvider {
get {
return this.privateDataProviderField;
}
set {
this.privateDataProviderField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class PrivateDataProviderType {
private PrivateDataSessionType[] privateDataSessionField;
private byte[] privateDataProviderIDField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("PrivateDataSession")]
public PrivateDataSessionType[] PrivateDataSession {
get {
return this.privateDataSessionField;
}
set {
this.privateDataSessionField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute(DataType="hexBinary")]
public byte[] privateDataProviderID {
get {
return this.privateDataProviderIDField;
}
set {
this.privateDataProviderIDField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class PrivateDataSessionType {
private System.DateTime versionUpdateField;
private bool versionUpdateFieldSpecified;
private string[] tagRefField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool VersionUpdateSpecified {
get {
return this.versionUpdateFieldSpecified;
}
set {
this.versionUpdateFieldSpecified = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("TagRef", DataType="anyURI")]
public string[] TagRef {
get {
return this.tagRefField;
}
set {
this.tagRefField = value;
}
}
}
}

View File

@ -0,0 +1,235 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
[System.Xml.Serialization.XmlRootAttribute("ServiceInformationFile", Namespace="urn:dvb:metadata:nativeip:2024", IsNullable=false)]
public partial class ServiceInformationFileType {
private System.DateTime versionUpdateField;
private string nIPNetworkProviderNameField;
private BroadcastMediaStreamType[] broadcastMediaStreamField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public string NIPNetworkProviderName {
get {
return this.nIPNetworkProviderNameField;
}
set {
this.nIPNetworkProviderNameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("BroadcastMediaStream")]
public BroadcastMediaStreamType[] BroadcastMediaStream {
get {
return this.broadcastMediaStreamField;
}
set {
this.broadcastMediaStreamField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class BroadcastMediaStreamType {
private ushort nIPNetworkIDField;
private string nIPCarrierIDField;
private string nIPLinkIDField;
private ushort nIPServiceIDField;
private BroadcastMediaStreamTypeBroadcastMedia broadcastMediaField;
/// <remarks/>
public ushort NIPNetworkID {
get {
return this.nIPNetworkIDField;
}
set {
this.nIPNetworkIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="positiveInteger")]
public string NIPCarrierID {
get {
return this.nIPCarrierIDField;
}
set {
this.nIPCarrierIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string NIPLinkID {
get {
return this.nIPLinkIDField;
}
set {
this.nIPLinkIDField = value;
}
}
/// <remarks/>
public ushort NIPServiceID {
get {
return this.nIPServiceIDField;
}
set {
this.nIPServiceIDField = value;
}
}
/// <remarks/>
public BroadcastMediaStreamTypeBroadcastMedia BroadcastMedia {
get {
return this.broadcastMediaField;
}
set {
this.broadcastMediaField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class BroadcastMediaStreamTypeBroadcastMedia {
private string[] uRIField;
private InteractiveApplicationsType[] interactiveApplicationsField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("URI")]
public string[] URI {
get {
return this.uRIField;
}
set {
this.uRIField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("InteractiveApplications")]
public InteractiveApplicationsType[] InteractiveApplications {
get {
return this.interactiveApplicationsField;
}
set {
this.interactiveApplicationsField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
public partial class InteractiveApplicationsType {
private InteractiveApplicationsTypeApplicationType applicationTypeField;
private string applicationIDField;
private string applicationURIField;
/// <remarks/>
public InteractiveApplicationsTypeApplicationType ApplicationType {
get {
return this.applicationTypeField;
}
set {
this.applicationTypeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string ApplicationID {
get {
return this.applicationIDField;
}
set {
this.applicationIDField = value;
}
}
/// <remarks/>
public string ApplicationURI {
get {
return this.applicationURIField;
}
set {
this.applicationURIField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:dvb:metadata:nativeip:2024")]
public enum InteractiveApplicationsTypeApplicationType {
/// <remarks/>
HbbTV,
/// <remarks/>
MHP,
/// <remarks/>
MHEG5,
/// <remarks/>
Proprietary,
}
}

View File

@ -0,0 +1,127 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by xsd, Version=4.8.9037.0.
//
namespace skyscraper8.DvbNip {
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.9037.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:dvb:metadata:nativeip:2024")]
[System.Xml.Serialization.XmlRootAttribute("TimeOffsetFile", Namespace="urn:dvb:metadata:nativeip:2024", IsNullable=false)]
public partial class TimeOffsetFileType {
private System.DateTime versionUpdateField;
private string country_codeField;
private string country_region_IdField;
private bool local_time_offset_polarityField;
private string local_time_offset_valueField;
private System.DateTime time_of_changeField;
private bool time_of_changeFieldSpecified;
private string next_time_offset_valueField;
/// <remarks/>
public System.DateTime VersionUpdate {
get {
return this.versionUpdateField;
}
set {
this.versionUpdateField = value;
}
}
/// <remarks/>
public string country_code {
get {
return this.country_codeField;
}
set {
this.country_codeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string country_region_Id {
get {
return this.country_region_IdField;
}
set {
this.country_region_IdField = value;
}
}
/// <remarks/>
public bool local_time_offset_polarity {
get {
return this.local_time_offset_polarityField;
}
set {
this.local_time_offset_polarityField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string local_time_offset_value {
get {
return this.local_time_offset_valueField;
}
set {
this.local_time_offset_valueField = value;
}
}
/// <remarks/>
public System.DateTime time_of_change {
get {
return this.time_of_changeField;
}
set {
this.time_of_changeField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool time_of_changeSpecified {
get {
return this.time_of_changeFieldSpecified;
}
set {
this.time_of_changeFieldSpecified = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")]
public string next_time_offset_value {
get {
return this.next_time_offset_valueField;
}
set {
this.next_time_offset_valueField = value;
}
}
}
}

View File

@ -227,9 +227,13 @@ namespace skyscraper8.Ietf.FLUTE
set
{
_fileAssocitation = value;
if (_fileAssocitation.ContentLengthSpecified)
if (transferLength == 0)
{
if (transferLength == 0)
if (_fileAssocitation.TransferLengthSpecified)
{
transferLength = (long)_fileAssocitation.TransferLength;
}
else if (_fileAssocitation.ContentLengthSpecified)
{
transferLength = (long)_fileAssocitation.ContentLength;
}

View File

@ -12,5 +12,20 @@ namespace skyscraper5.Skyscraper
return _comparer.Compare(a, b) == 0;
}
//geklaut aus yo3explorers CD-I Treiber
public static void FlipEndian(this byte[] data)
{
if (data.Length % 2 == 1)
throw new InvalidDataException(); //Überprüfe: Ist das überhaupt eine Zahl ?
byte temp;
for (int i = 0; i < (data.Length / 2); i++)
{
temp = data[i];
data[i] = data[data.Length - i - 1];
data[data.Length - i - 1] = temp;
}
}
}
}

View File

@ -1,4 +1,5 @@
using log4net;
using moe.yo3explorer.skyscraper8.DVBI.Model;
using skyscraper5.Abertis;
using skyscraper5.Docsis;
using skyscraper5.Docsis.MacManagement;
@ -38,6 +39,7 @@ using skyscraper5.Skyscraper.Plugins;
using skyscraper5.Skyscraper.Scraper.FrameGrabber;
using skyscraper5.Skyscraper.Scraper.Storage;
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
using skyscraper5.Skyscraper.Scraper.Storage.Split;
using skyscraper5.Skyscraper.Scraper.Storage.Utilities;
using skyscraper5.Skyscraper.Scraper.StreamAutodetection;
using skyscraper5.Skyscraper.Scraper.Utils;
@ -2450,21 +2452,18 @@ namespace skyscraper5.Skyscraper.Scraper
public void FluteFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
{
string filename = DvbNipUtilities.MakeFilename(listener.FileAssociation.ContentLocation);
FileInfo fileInfo = new FileInfo(filename);
if (!fileInfo.Exists)
{
string extension = Path.GetExtension(fileInfo.Name).ToLowerInvariant();
if (!DvbNipUtilities.IsContinuousFileType(extension))
LogEvent(SkyscraperContextEvent.FluteFileArrival, listener.FileAssociation.ContentLocation);
fileInfo.Directory.EnsureExists();
listener.WriteToFile(fileInfo.FullName);
}
string extension = Path.GetExtension(listener.FileAssociation.ContentLocation).ToLowerInvariant();
if (!DvbNipUtilities.IsContinuousFileType(extension))
LogEvent(SkyscraperContextEvent.FluteFileArrival, listener.FileAssociation.ContentLocation);
ScraperStorage.DvbNipFileArrival(carrier, listener);
}
public void OnMulticastGatewayConfiguration(NipActualCarrierInformation carrier, MulticastGatewayConfigurationType multicastGatewayConfiguration)
{
if (multicastGatewayConfiguration.MulticastSession == null)
return;
throw new NotImplementedException();
}
public void OnNipCarrierDetected(NipActualCarrierInformation currentCarrierInformation)
@ -2472,6 +2471,128 @@ namespace skyscraper5.Skyscraper.Scraper
LogEvent(SkyscraperContextEvent.NipCarrierDetected, String.Format("{0}", currentCarrierInformation.NipStreamProviderName));
}
public bool IsFileNeeded(string announcedFileContentLocation)
{
if (announcedFileContentLocation.StartsWith("urn:dvb"))
return true;
return !ScraperStorage.DvbNipTestForFile(announcedFileContentLocation);
}
public void OnPrivateDataSignallingManifest(NipActualCarrierInformation currentCarrierInformation, PrivateDataSignallingManifestType privateDataSignallingManifest)
{
foreach (PrivateDataProviderType privateDataProvider in privateDataSignallingManifest.PrivateDataProvider)
{
privateDataProvider.privateDataProviderID.FlipEndian();
uint privateDataSpecifier = BitConverter.ToUInt32(privateDataProvider.privateDataProviderID);
List<string> privateDataSessions = privateDataProvider.PrivateDataSession.SelectMany(x => x.TagRef).ToList();
bool added = ScraperStorage.DvbNipPrivateDataSpecifier(currentCarrierInformation, privateDataSignallingManifest.VersionUpdate, privateDataSpecifier, privateDataSessions);
if (added)
{
LogEvent(SkyscraperContextEvent.NipPrivateDataSpecifier, String.Format("{0} -> {1}", currentCarrierInformation.NipStreamProviderName, privateDataSpecifier));
}
}
}
public void OnServiceListEntryPoints(NipActualCarrierInformation currentCarrierInformation, ServiceListEntryPoints serviceListEntryPoints, DateTime dvbNipTime, DvbNipServiceListNotifier serviceListNotifier)
{
long sourceHash = DvbIUtils.GetSourceHash(ServiceListEntryPointSource.DvbNip, currentCarrierInformation.NipNetworkId, currentCarrierInformation.NipCarrierId, currentCarrierInformation.NipLinkId);
serviceListNotifier.SetSourceHash(sourceHash);
DvbIDataStorage dataStorage = ScraperStorage;
if (dataStorage.TestForDvbiServiceListEntryPoints(sourceHash))
{
DateTime lastChecked = dataStorage.GetLastDvbiServiceListEntryPointUpdateDate(sourceHash);
TimeSpan sinceLastChecked = dvbNipTime - lastChecked;
if (sinceLastChecked.TotalDays < 1.0)
return;
}
else
{
logger.InfoFormat("New DVB-I Service List Entry Point: {0}", currentCarrierInformation.NipStreamProviderName);
dataStorage.InsertDvbiServiceListEntryPoint(sourceHash);
}
IEnumerable<DvbiServiceList> enumerable = DvbIUtils.FlattenServiceListEntryPoints(serviceListEntryPoints);
foreach (DvbiServiceList serviceList in enumerable)
{
DateTime serviceListLastChecked;
if (dataStorage.TestForDvbiServiceList(serviceList.Id))
{
serviceListLastChecked = dataStorage.GetDvbiServiceListLastUpdateDate(serviceList.Id);
}
else
{
logger.InfoFormat("New DVB-I Service List: {0}", serviceList.Name);
dataStorage.InsertDvbiServiceList(serviceList);
dataStorage.AddDvbiServiceListToServiceListEntryPoint(serviceList, sourceHash);
serviceListLastChecked = new DateTime(1970, 1, 1);
}
TimeSpan sinceLastServiceListCheck = dvbNipTime - serviceListLastChecked;
if (sinceLastServiceListCheck.TotalDays < 1.0)
continue;
serviceListNotifier.AddServiceListUrl(serviceList.URI, serviceList.Id);
/*if (vfs.FileExists(serviceList.URI))
{
byte[] serviceListBytes = vfs.GetFile(serviceList.URI);
ServiceListType serviceListData = DvbIUtils.UnpackServiceList(serviceListBytes);
HandleServiceList(serviceListData, dataStorage, serviceList.Id);
dataStorage.UpdateDvbiServiceListLastCheckedDate(serviceList.Id, context.CurrentTime);
}*/
}
dataStorage.UpdateDvbiServiceListEntryPointUpdateDate(sourceHash, dvbNipTime);
}
public void OnServiceList(NipActualCarrierInformation currentCarrierInformation, string serviceListId,
ServiceListType serviceList)
{
throw new NotImplementedException();
}
public void OnTimeOffsetFile(NipActualCarrierInformation currentCarrierInformation, TimeOffsetFileType timeOffsetFile)
{
if (timeOffsetFile.time_of_change != DateTime.MinValue)
{
throw new NotImplementedException();
}
}
public void OnNetworkInformationFile(NipActualCarrierInformation currentCarrierInformation, NetworkInformationFileType networkInformationFile)
{
List<BroadcastNetworkType> broadcastNetworks = new List<BroadcastNetworkType>();
if (networkInformationFile.ActualBroadcastNetwork != null)
broadcastNetworks.Add(networkInformationFile.ActualBroadcastNetwork);
if (networkInformationFile.OtherBroadcastNetwork != null)
broadcastNetworks.AddRange(networkInformationFile.OtherBroadcastNetwork);
foreach (BroadcastNetworkType network in broadcastNetworks)
{
if (!ScraperStorage.DvbNipTestForNetwork(network))
{
LogEvent(SkyscraperContextEvent.DvbNipNetwork, network.NetworkName);
ScraperStorage.DvbNipInsertNetwork(network);
}
}
}
public void OnServiceInformationFile(NipActualCarrierInformation currentCarrierInformation, ServiceInformationFileType serviceInformationFile)
{
foreach (BroadcastMediaStreamType broadcastMediaStreamType in serviceInformationFile.BroadcastMediaStream)
{
if (!ScraperStorage.DvbNipTestForService(broadcastMediaStreamType))
{
string id = String.Format("{0},{1},{2},{3}", broadcastMediaStreamType.NIPNetworkID,
broadcastMediaStreamType.NIPCarrierID, broadcastMediaStreamType.NIPLinkID,
broadcastMediaStreamType.NIPServiceID);
LogEvent(SkyscraperContextEvent.DvbNipService, id);
ScraperStorage.DvbNipInsertService(broadcastMediaStreamType);
}
}
}
public void FluteFileDownloadProgress(NipActualCarrierInformation currentCarrierInformation, ulong destinationTsi, ulong destinationToi, double progress, FileType filetype)
{
if (filetype != null)

View File

@ -75,6 +75,9 @@
SgtService,
FluteFileArrival,
NipCarrierDetected,
FluteFileProgress
}
FluteFileProgress,
NipPrivateDataSpecifier,
DvbNipNetwork,
DvbNipService
}
}

View File

@ -34,6 +34,8 @@ using skyscraper5.src.Skyscraper.Scraper.Dns;
using skyscraper5.src.Skyscraper.Scraper.Storage.InMemory;
using skyscraper5.Teletext;
using skyscraper8.DvbI;
using skyscraper8.DvbNip;
using skyscraper8.Ietf.FLUTE;
using skyscraper8.Ses;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
@ -1429,6 +1431,54 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Filesystem
throw new NotImplementedException();
}
public bool DvbNipTestForFile(string announcedFileContentLocation)
{
string saneFilename = DvbNipUtilities.MakeFilename(announcedFileContentLocation);
FileInfo fi = new FileInfo(saneFilename);
return fi.Exists;
}
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
{
string filename = DvbNipUtilities.MakeFilename(listener.FileAssociation.ContentLocation);
FileInfo fi = new FileInfo(filename);
fi.Directory.EnsureExists();
FileStream outStream = fi.OpenWrite();
Stream inStream = listener.ToStream();
inStream.CopyTo(outStream);
outStream.Flush(true);
outStream.Close();
outStream.Dispose();
inStream.Close();
inStream.Dispose();
}
public bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate,
uint privateDataSpecifier, List<string> privateDataSessions)
{
throw new NotImplementedException();
}
public bool DvbNipTestForNetwork(BroadcastNetworkType network)
{
throw new NotImplementedException();
}
public void DvbNipInsertNetwork(BroadcastNetworkType network)
{
throw new NotImplementedException();
}
public bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType)
{
throw new NotImplementedException();
}
public void DvbNipInsertService(BroadcastMediaStreamType broadcastMediaStreamType)
{
throw new NotImplementedException();
}
public DateTime GetLastDvbiServiceListEntryPointUpdateDate(long sourceHash)
{
throw new NotImplementedException();

View File

@ -29,6 +29,8 @@ using skyscraper5.src.Skyscraper.FrequencyListGenerator;
using skyscraper5.src.Skyscraper.Scraper.Dns;
using skyscraper5.Teletext;
using skyscraper8.DvbI;
using skyscraper8.DvbNip;
using skyscraper8.Ietf.FLUTE;
using skyscraper8.Ses;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
@ -181,5 +183,12 @@ namespace skyscraper5.Skyscraper.Scraper.Storage
void InsertSgtList(SgtList list);
bool TestForSgtService(SgtService child);
void InsertSgtService(SgtService child);
}
bool DvbNipTestForFile(string announcedFileContentLocation);
void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener);
bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions);
bool DvbNipTestForNetwork(BroadcastNetworkType network);
void DvbNipInsertNetwork(BroadcastNetworkType network);
bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType);
void DvbNipInsertService(BroadcastMediaStreamType broadcastMediaStreamType);
}
}

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using skyscraper5.Docsis.MacManagement;
using skyscraper5.Docsis.MacManagement;
using skyscraper5.DsmCc.Descriptors;
using skyscraper5.Dvb.DataBroadcasting.IntModel;
using skyscraper5.Dvb.DataBroadcasting.SkyscraperVfs;
@ -32,9 +26,17 @@ using skyscraper5.src.Skyscraper.Scraper.Dns;
using skyscraper5.src.Skyscraper.Scraper.Storage.InMemory;
using skyscraper5.Teletext;
using skyscraper8.DvbI;
using skyscraper8.DvbNip;
using skyscraper8.Ses;
using skyscraper8.Ses.Descriptors;
using skyscraper8.Skyscraper.Scraper.Storage.InMemory.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using skyscraper8.Ietf.FLUTE;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
@ -1292,6 +1294,157 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory
sgtServices.Add(child);
}
public bool DvbNipTestForFile(string announcedFileContentLocation)
{
string saneFilename = DvbNipUtilities.MakeFilename(announcedFileContentLocation);
FileInfo fi = new FileInfo(saneFilename);
return fi.Exists;
}
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
{
string filename = DvbNipUtilities.MakeFilename(listener.FileAssociation.ContentLocation);
FileInfo fi = new FileInfo(filename);
fi.Directory.EnsureExists();
FileStream outStream = fi.OpenWrite();
Stream inStream = listener.ToStream();
inStream.CopyTo(outStream);
outStream.Flush(true);
outStream.Close();
outStream.Dispose();
inStream.Close();
inStream.Dispose();
}
private class NipPds
{
public class NipSubPds
{
public DateTime VersionUpdate { get; set; }
public List<string> PrivateDataSessions { get; set; }
public NipSubPds(DateTime versionUpdate, List<string> privateDataSessions)
{
VersionUpdate = versionUpdate;
PrivateDataSessions = privateDataSessions;
}
}
public Dictionary<uint, NipSubPds> subs;
}
private Dictionary<NipActualCarrierInformation, NipPds> _nipPrivateDataSpecifiers;
public bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions)
{
if (_nipPrivateDataSpecifiers == null)
_nipPrivateDataSpecifiers = new Dictionary<NipActualCarrierInformation, NipPds>();
if (_nipPrivateDataSpecifiers.ContainsKey(currentCarrierInformation))
{
NipPds oldPds = _nipPrivateDataSpecifiers[currentCarrierInformation];
if (oldPds.subs.ContainsKey(privateDataSpecifier))
{
NipPds.NipSubPds oldPdsSub = oldPds.subs[privateDataSpecifier];
if (oldPdsSub.VersionUpdate < versionUpdate)
{
oldPdsSub.VersionUpdate = versionUpdate;
oldPdsSub.PrivateDataSessions = privateDataSessions;
return true;
}
else
{
return false;
}
}
else
{
oldPds.subs.Add(privateDataSpecifier, new NipPds.NipSubPds(versionUpdate, privateDataSessions));
return true;
}
}
else
{
NipPds newPds = new NipPds();
newPds.subs = new Dictionary<uint, NipPds.NipSubPds>();
newPds.subs.Add(privateDataSpecifier, new NipPds.NipSubPds(versionUpdate, privateDataSessions));
return true;
}
}
private BroadcastNetworkType[] nipBroadcastNetworkTypes;
public bool DvbNipTestForNetwork(BroadcastNetworkType network)
{
if (nipBroadcastNetworkTypes == null)
return false;
return nipBroadcastNetworkTypes[network.NIPNetworkID] != null;
}
public void DvbNipInsertNetwork(BroadcastNetworkType network)
{
if (nipBroadcastNetworkTypes == null)
nipBroadcastNetworkTypes = new BroadcastNetworkType[ushort.MaxValue];
nipBroadcastNetworkTypes[network.NIPNetworkID] = network;
}
private class NipServiceCoordinate
{
public NipServiceCoordinate(BroadcastMediaStreamType bmst)
{
this.NetworkId = bmst.NIPNetworkID;
this.CarrierId = Convert.ToInt32(bmst.NIPCarrierID);
this.LinkId = Convert.ToInt32(bmst.NIPLinkID);
this.ServiceId = bmst.NIPServiceID;
}
public ushort ServiceId { get; set; }
public int LinkId { get; set; }
public int CarrierId { get; set; }
public ushort NetworkId { get; set; }
protected bool Equals(NipServiceCoordinate other)
{
return ServiceId == other.ServiceId && LinkId == other.LinkId && CarrierId == other.CarrierId && NetworkId == other.NetworkId;
}
public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((NipServiceCoordinate)obj);
}
public override int GetHashCode()
{
return HashCode.Combine(ServiceId, LinkId, CarrierId, NetworkId);
}
}
private Dictionary<NipServiceCoordinate, BroadcastMediaStreamType> _dvbNipServices;
public bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType)
{
if (_dvbNipServices == null)
return false;
NipServiceCoordinate coords = new NipServiceCoordinate(broadcastMediaStreamType);
return _dvbNipServices.ContainsKey(coords);
}
public void DvbNipInsertService(BroadcastMediaStreamType broadcastMediaStreamType)
{
if (_dvbNipServices == null)
_dvbNipServices = new Dictionary<NipServiceCoordinate, BroadcastMediaStreamType>();
NipServiceCoordinate coords = new NipServiceCoordinate(broadcastMediaStreamType);
_dvbNipServices.Add(coords, broadcastMediaStreamType);
}
public void InsertDvbiServiceListEntryPoint(long sourceHash)
{
if (_dvbiServiceListEntryPointsCoordinates == null)

View File

@ -6,6 +6,8 @@ using System.Text;
using System.Threading.Tasks;
using skyscraper5.Dvb.DataBroadcasting.SkyscraperVfs;
using skyscraper5.Teletext;
using skyscraper8.DvbNip;
using skyscraper8.Ietf.FLUTE;
namespace skyscraper5.Skyscraper.Scraper.Storage.Split
{
@ -21,5 +23,12 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Split
object[] GetPluginConnector();
void Ping();
bool DvbNipTestForFile(string announcedFileContentLocation);
void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener);
bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions);
bool DvbNipTestForNetwork(BroadcastNetworkType network);
void DvbNipInsertNetwork(BroadcastNetworkType network);
bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType);
void DvbNipInsertService(BroadcastMediaStreamType broadcastMediaStreamType);
}
}

View File

@ -29,6 +29,8 @@ using skyscraper5.src.Skyscraper.FrequencyListGenerator;
using skyscraper5.src.Skyscraper.Scraper.Dns;
using skyscraper5.Teletext;
using skyscraper8.DvbI;
using skyscraper8.DvbNip;
using skyscraper8.Ietf.FLUTE;
using skyscraper8.Ses;
using Platform = skyscraper5.Dvb.SystemSoftwareUpdate.Model.Platform;
@ -889,6 +891,48 @@ namespace skyscraper5.Skyscraper.Scraper.Storage.Split
dataStorage.InsertSgtService(child);
}
[DebuggerStepThrough]
public bool DvbNipTestForFile(string announcedFileContentLocation)
{
return objectStorage.DvbNipTestForFile(announcedFileContentLocation);
}
[DebuggerStepThrough]
public void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener)
{
objectStorage.DvbNipFileArrival(carrier, listener);
}
[DebuggerStepThrough]
public bool DvbNipPrivateDataSpecifier(NipActualCarrierInformation currentCarrierInformation, DateTime versionUpdate, uint privateDataSpecifier, List<string> privateDataSessions)
{
return objectStorage.DvbNipPrivateDataSpecifier(currentCarrierInformation, versionUpdate, privateDataSpecifier, privateDataSessions);
}
[DebuggerStepThrough]
public bool DvbNipTestForNetwork(BroadcastNetworkType network)
{
return objectStorage.DvbNipTestForNetwork(network);
}
[DebuggerStepThrough]
public void DvbNipInsertNetwork(BroadcastNetworkType network)
{
objectStorage.DvbNipInsertNetwork(network);
}
[DebuggerStepThrough]
public bool DvbNipTestForService(BroadcastMediaStreamType broadcastMediaStreamType)
{
return objectStorage.DvbNipTestForService(broadcastMediaStreamType);
}
[DebuggerStepThrough]
public void DvbNipInsertService(BroadcastMediaStreamType broadcastMediaStreamType)
{
objectStorage.DvbNipInsertService(broadcastMediaStreamType);
}
[DebuggerStepThrough]
public void InsertDvbiServiceListEntryPoint(long sourceHash)
{

View File

@ -19,20 +19,7 @@ namespace skyscraper8.yo3explorer
public long GetSourceHash()
{
long result = (int)Source;
switch (Source)
{
case ServiceListEntryPointSource.TransportStream:
result <<= 4;
result += OriginalNetworkId.Value;
result <<= 16;
result += TransportStreamId.Value;
result <<= 16;
result += PID;
return result;
default:
throw new NotImplementedException(Source.ToString());
}
return DvbIUtils.GetSourceHash(Source, (ushort)OriginalNetworkId.Value, (ushort)TransportStreamId.Value, PID);
}
internal string ToHumanReadableSourceString()