From f365f947113eb475b780e6af39c970b9b4c101d0 Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Wed, 25 Nov 2020 11:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7net5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnetcore.yml | 2 +- src/JT1078.FMp4.Test/JT1078.FMp4.Test.csproj | 16 +- src/JT1078.FMp4/JT1078.FMp4.csproj | 12 +- .../JT1078.Flv.Benchmark.csproj | 2 +- .../JT1078FlvEncoderContext.cs | 2 +- src/JT1078.Flv.Test/JT1078.Flv.Test.csproj | 6 +- src/JT1078.Flv/JT1078.Flv.csproj | 13 +- src/JT1078.Hls.Test/JT1078.Hls.Test.csproj | 8 +- src/JT1078.Hls/JT1078.Hls.csproj | 13 +- .../JT1078.Protocol.Benchmark.csproj | 2 +- .../JT1078FlvEncoderContext.cs | 2 +- .../JT1078SerializerContext.cs | 2 +- .../JT1078.Protocol.Test.csproj | 8 +- src/JT1078.Protocol/JT1078.Protocol.csproj | 5 +- src/JT1078.Protocol/JT1078.Protocol.xml | 313 ++++++++++++++++++ ...808.Protocol.Extensions.JT1078.Test.csproj | 8 +- .../JT808.Protocol.Extensions.JT1078.csproj | 12 +- ...809.Protocol.Extensions.JT1078.Test.csproj | 8 +- .../JT809.Protocol.Extensions.JT1078.csproj | 14 +- 19 files changed, 367 insertions(+), 81 deletions(-) create mode 100644 src/JT1078.Protocol/JT1078.Protocol.xml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 21f566e..da6d58c 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -12,7 +12,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@master with: - dotnet-version: 3.1.401 + dotnet-version: 5.0.100 - name: dotnet info run: dotnet --info - name: dotnet restore diff --git a/src/JT1078.FMp4.Test/JT1078.FMp4.Test.csproj b/src/JT1078.FMp4.Test/JT1078.FMp4.Test.csproj index dadd617..dfa449c 100644 --- a/src/JT1078.FMp4.Test/JT1078.FMp4.Test.csproj +++ b/src/JT1078.FMp4.Test/JT1078.FMp4.Test.csproj @@ -1,16 +1,22 @@ - netcoreapp3.1 + net5.0 false - - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/JT1078.FMp4/JT1078.FMp4.csproj b/src/JT1078.FMp4/JT1078.FMp4.csproj index 27aad09..dc6efad 100644 --- a/src/JT1078.FMp4/JT1078.FMp4.csproj +++ b/src/JT1078.FMp4/JT1078.FMp4.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1; + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -14,19 +14,13 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 1.0.0-preview1 + 1.1.0-preview1 false true LICENSE - - - JT1078.FMp4.xml - - JT1078.FMp4.xml - True @@ -34,7 +28,7 @@ - + diff --git a/src/JT1078.Flv.Benchmark/JT1078.Flv.Benchmark.csproj b/src/JT1078.Flv.Benchmark/JT1078.Flv.Benchmark.csproj index 8dd6b17..ece4708 100644 --- a/src/JT1078.Flv.Benchmark/JT1078.Flv.Benchmark.csproj +++ b/src/JT1078.Flv.Benchmark/JT1078.Flv.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net5.0 diff --git a/src/JT1078.Flv.Benchmark/JT1078FlvEncoderContext.cs b/src/JT1078.Flv.Benchmark/JT1078FlvEncoderContext.cs index 9d7db77..cdb1994 100644 --- a/src/JT1078.Flv.Benchmark/JT1078FlvEncoderContext.cs +++ b/src/JT1078.Flv.Benchmark/JT1078FlvEncoderContext.cs @@ -69,7 +69,7 @@ namespace JT1078.Flv.Benchmark { public JT1078FlvEncoderConfig() { - AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp31).WithPlatform(Platform.AnyCpu)); + AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp50).WithPlatform(Platform.AnyCpu)); } } } diff --git a/src/JT1078.Flv.Test/JT1078.Flv.Test.csproj b/src/JT1078.Flv.Test/JT1078.Flv.Test.csproj index 359c5c6..884e4f6 100644 --- a/src/JT1078.Flv.Test/JT1078.Flv.Test.csproj +++ b/src/JT1078.Flv.Test/JT1078.Flv.Test.csproj @@ -1,13 +1,13 @@  - netcoreapp3.1 + net5.0 - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/JT1078.Flv/JT1078.Flv.csproj b/src/JT1078.Flv/JT1078.Flv.csproj index 29daa32..cc1eec7 100644 --- a/src/JT1078.Flv/JT1078.Flv.csproj +++ b/src/JT1078.Flv/JT1078.Flv.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1; + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -14,17 +14,10 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 1.0.0-preview11 + 1.1.0 false true LICENSE - - - - JT1078.Flv.xml - - - JT1078.Flv.xml @@ -42,6 +35,6 @@ - + diff --git a/src/JT1078.Hls.Test/JT1078.Hls.Test.csproj b/src/JT1078.Hls.Test/JT1078.Hls.Test.csproj index 20684f6..612696a 100644 --- a/src/JT1078.Hls.Test/JT1078.Hls.Test.csproj +++ b/src/JT1078.Hls.Test/JT1078.Hls.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 false @@ -15,10 +15,10 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/JT1078.Hls/JT1078.Hls.csproj b/src/JT1078.Hls/JT1078.Hls.csproj index 015f9a4..631a3a3 100644 --- a/src/JT1078.Hls/JT1078.Hls.csproj +++ b/src/JT1078.Hls/JT1078.Hls.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1; + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -14,17 +14,10 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 1.0.0-preview2 + 1.1.0-preview1 false true LICENSE - - - - JT1078.Hls.xml - - - JT1078.Hls.xml @@ -42,6 +35,6 @@ - + diff --git a/src/JT1078.Protocol.Benchmark/JT1078.Protocol.Benchmark.csproj b/src/JT1078.Protocol.Benchmark/JT1078.Protocol.Benchmark.csproj index 25db222..2b04df4 100644 --- a/src/JT1078.Protocol.Benchmark/JT1078.Protocol.Benchmark.csproj +++ b/src/JT1078.Protocol.Benchmark/JT1078.Protocol.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net5.0 diff --git a/src/JT1078.Protocol.Benchmark/JT1078FlvEncoderContext.cs b/src/JT1078.Protocol.Benchmark/JT1078FlvEncoderContext.cs index acf356f..549acdd 100644 --- a/src/JT1078.Protocol.Benchmark/JT1078FlvEncoderContext.cs +++ b/src/JT1078.Protocol.Benchmark/JT1078FlvEncoderContext.cs @@ -78,7 +78,7 @@ namespace JT1078.Flv.Benchmark { public JT1078FlvEncoderConfig() { - AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp31).WithPlatform(Platform.AnyCpu)); + AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp50).WithPlatform(Platform.AnyCpu)); } } } diff --git a/src/JT1078.Protocol.Benchmark/JT1078SerializerContext.cs b/src/JT1078.Protocol.Benchmark/JT1078SerializerContext.cs index 22e245f..62dec06 100644 --- a/src/JT1078.Protocol.Benchmark/JT1078SerializerContext.cs +++ b/src/JT1078.Protocol.Benchmark/JT1078SerializerContext.cs @@ -58,7 +58,7 @@ namespace JT1078.Protocol.Benchmark { public JT1078SerializerConfig() { - AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp31).WithPlatform(Platform.AnyCpu)); + AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp50).WithPlatform(Platform.AnyCpu)); } } } diff --git a/src/JT1078.Protocol.Test/JT1078.Protocol.Test.csproj b/src/JT1078.Protocol.Test/JT1078.Protocol.Test.csproj index 67683f4..c0d7d3c 100644 --- a/src/JT1078.Protocol.Test/JT1078.Protocol.Test.csproj +++ b/src/JT1078.Protocol.Test/JT1078.Protocol.Test.csproj @@ -1,16 +1,16 @@  - netcoreapp3.1 + net5.0 false - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/JT1078.Protocol/JT1078.Protocol.csproj b/src/JT1078.Protocol/JT1078.Protocol.csproj index d2ab1c4..1114317 100644 --- a/src/JT1078.Protocol/JT1078.Protocol.csproj +++ b/src/JT1078.Protocol/JT1078.Protocol.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -14,10 +14,11 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 1.0.4-preview2 + 1.1.0 false true LICENSE + JT1078.Protocol.xml diff --git a/src/JT1078.Protocol/JT1078.Protocol.xml b/src/JT1078.Protocol/JT1078.Protocol.xml new file mode 100644 index 0000000..96d7779 --- /dev/null +++ b/src/JT1078.Protocol/JT1078.Protocol.xml @@ -0,0 +1,313 @@ + + + + JT1078.Protocol + + + + + 将adpcm转为pcm + + + + + + + + + 上一个采样数据,当index为0是该值应该为未压缩的原数据 + + + + + 保留数据(未使用) + + + + + 上一个block最后一个index,第一个block的index=0 + + + + + 添加wav头 + 仅用于测试pcm是否转成成功,因此没考虑性能,因为播放器可播——# + + pcm数据 + 采样率 + 位深 + + + + + + + + + + 音视频类型 + + + + + 分包处理标记 + + + + + + ref:"www.codeproject.com/tips/447938/high-performance-csharp-byte-array-to-hex-string-t" + + + + + 16进制字符串转16进制数组 + + + + + + + + + + + + + + + + + Expunge any "Emulation Prevention" bytes from a "Raw Byte Sequence Payload" + + 防止竞争插入0x03 + + + + + + + 终端设备SIM卡号 + BCD[6] + + + + + 逻辑通道号 + + + + + 数据类型 + + + + + 该帧与上一个关键帧之间的时间间隔,单位毫秒(ms), + 当数据类型为非视频帧时,则没有该字段 + + + + + 该帧与上一个帧之间的时间间隔,单位毫秒(ms), + 当数据类型为非视频帧时,则没有该字段 + + + + + 时间戳 + 标识此RTP数据包当前帧的相对时间,单位毫秒(ms)。 + 当数据类型为01000时,则没有该字段 + + + + + 数据体 + + + + + V - 2 - 固定为2 + P - 1 - 固定为0 + X - 1 - RTP头是否需要扩展位,固定为0 + CC - 4 - 固定为1 + + + + + + + 0-3 + 0-1 + 0-1 + 0-15 + + + + M - 1 - 标志位,确定是否是完整数据帧的边界 + PT - 7 - 负载类型 + + + + + + + 0-1 + 0-127 + + + + + + 0-1 + 0-127 + + + + M - 1 - 标志位,确定是否是完整数据帧的边界 + + + + + PT - 7 - 负载类型 + 用于说明RTP报文中有效载荷的类型,如GSM音频、JPEM图像等 + + + + + 数据类型 + 分包处理标记 + + + + + 数据类型 + + + + + 分包处理标记 + + + + + 帧头标识 + + + + + 帧头标识 + + + + + 帧头标识 + 固定为0x30 0x31 0x63 0x64 + + + + + V - 2 - 固定为2 + P - 1 - 固定为0 + X - 1 - RTP头是否需要扩展位,固定为0 + CC - 4 - 固定为1 + 01000001 + + + + + M - 1 - 标志位,确定是否是完整数据帧的边界 + PT - 7 - 负载类型 + + + + + 初始化为0,每发送一个RTP数据包,序列号加1 + + + + + 终端设备SIM卡号 + BCD[6] + + + + + 逻辑通道号 + + + + + 数据类型 + 0000:视频I帧 + 0001:视频P帧 + 0010:视频B帧 + 0011:音频帧 + 0100:透传数据 + + 0000:原子包,不可被拆分 + 0001:分包处理时的第一个包 + 0010:分包处理是的最后一个包 + 0011:分包处理时间的中间包 + + + + + 时间戳 + 标识此RTP数据包当前帧的相对时间,单位毫秒(ms)。 + 当数据类型为01000时,则没有该字段 + + + + + 该帧与上一个关键帧之间的时间间隔,单位毫秒(ms), + 当数据类型为非视频帧时,则没有该字段 + + + + + 该帧与上一个关键帧之间的时间间隔,单位毫秒(ms), + 当数据类型为非视频帧时,则没有该字段 + + + + + 后续数据体长度,不含此字段 + + + + + 数据体 + + + + + Exp-Golomb指数哥伦布编码 + + + + + Advance the ExpGolomb decoder past a scaling list.The scaling + list is optionally transmitted as part of a sequence parameter + set and is not relevant to transmuxing. + @param count { number} + the number of entries in this scaling list + @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1 + + + + + + 数字编码 大端模式、高位在前 + + + + + + 数字编码 大端模式、高位在前 + + + + + + diff --git a/src/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj b/src/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj index 69f5ecb..92876bc 100644 --- a/src/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj +++ b/src/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj @@ -1,13 +1,13 @@  - netcoreapp3.1 + net5.0 - - - + + + all diff --git a/src/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.csproj b/src/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.csproj index 472d453..6fc50c9 100644 --- a/src/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.csproj +++ b/src/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1; + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -15,20 +15,14 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 2.2.12 + 2.3.0 LICENSE - - - JT808.Protocol.Extensions.JT1078.xml - - JT808.Protocol.Extensions.JT1078.xml - - + diff --git a/src/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj b/src/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj index fe2f169..a8d2db8 100644 --- a/src/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj +++ b/src/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj @@ -1,14 +1,14 @@  - netcoreapp3.1 + net5.0 - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/JT809.Protocol.Extensions.JT1078/JT809.Protocol.Extensions.JT1078.csproj b/src/JT809.Protocol.Extensions.JT1078/JT809.Protocol.Extensions.JT1078.csproj index 9c2fb8b..21b7079 100644 --- a/src/JT809.Protocol.Extensions.JT1078/JT809.Protocol.Extensions.JT1078.csproj +++ b/src/JT809.Protocol.Extensions.JT1078/JT809.Protocol.Extensions.JT1078.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1; + netstandard2.0;netstandard2.1;net5.0; 8.0 Copyright 2019. SmallChi(Koike) @@ -15,16 +15,8 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE true - 2.1.4-preview4 + 2.2.0 LICENSE - 2.1.4.0 - - - - JT809.Protocol.Extensions.JT1078.xml - - - JT809.Protocol.Extensions.JT1078.xml @@ -36,7 +28,7 @@ - +