Explorar el Código

Merge branch 'master' of https://github.com/SmallChi/JT1078

tags/v1.1.0
SmallChi(Koike) hace 5 años
padre
commit
d55ba2d214
Se han modificado 3 ficheros con 31 adiciones y 6 borrados
  1. BIN
      doc/ISOIEC 13818-1.pdf
  2. +30
    -1
      src/JT1078.Hls.Test/TS_Package_Test.cs
  3. +1
    -5
      src/JT1078.Hls.Test/TS_SDT_Package_Test.cs

BIN
doc/ISOIEC 13818-1.pdf Ver fichero


+ 30
- 1
src/JT1078.Hls.Test/TS_Package_Test.cs Ver fichero

@@ -161,6 +161,35 @@ namespace JT1078.Hls.Test
fileStream?.Close();
fileStream?.Dispose();
}
}
}
[Fact]
public void PTSTest()
{
//pts
//31 00 09 08 97

long ptsvalue = 132171;
var str = Convert.ToString(ptsvalue, 2).PadLeft(40, '0');
str = str.Insert(str.Length, "1");
str = str.Insert(str.Length - 16, "1");
str = str.Insert(str.Length - 32, "1");
str = str.Insert(str.Length - 36, "0011");
str = str.Substring(str.Length - 40, 40);
var pts = Convert.ToInt64(str, 2);
}
[Fact]
public void DTSTest1()
{
//dts
//11 00 07 D8 61
long value = 126000;
var str = Convert.ToString(value, 2).PadLeft(40, '0');
str = str.Insert(str.Length, "1");
str = str.Insert(str.Length - 16, "1");
str = str.Insert(str.Length - 32, "1");
str = str.Insert(str.Length - 36, "0001");
str = str.Substring(str.Length - 40, 40);
var dts = Convert.ToInt64(str, 2);
}
}
}

+ 1
- 5
src/JT1078.Hls.Test/TS_SDT_Package_Test.cs Ver fichero

@@ -51,11 +51,7 @@ namespace JT1078.Hls.Test
Assert.Equal("47 40 11 10 00 42 F0 25 00 01 C1 00 00 FF 01 FF 00 01 FC 80 14 48 12 01 06 46 46 6D 70 65 67 09 53 65 72 76 69 63 65 30 31 77 7C 43 CA FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF".Replace(" ", ""), patData);

}

[Fact]
public void Test() {
byte a = 0x01;
var b = (ushort)(a << 15);
}
}
}

Cargando…
Cancelar
Guardar