适配引擎修改

This commit is contained in:
langhuihui
2021-03-06 17:22:54 +08:00
parent 9bb5fa3719
commit 00052dabaa
3 changed files with 4 additions and 2 deletions

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/Monibuca/plugin-ts/v3
go 1.13 go 1.13
require ( require (
github.com/Monibuca/engine/v3 v3.0.0-alpha6 github.com/Monibuca/engine/v3 v3.0.0-alpha7
github.com/Monibuca/utils/v3 v3.0.0-alpha5 github.com/Monibuca/utils/v3 v3.0.0-alpha5
github.com/pion/rtp v1.6.2 // indirect github.com/pion/rtp v1.6.2 // indirect
) )

2
go.sum
View File

@@ -8,6 +8,8 @@ github.com/Monibuca/engine/v3 v3.0.0-alpha4 h1:kAStDd1p9tlSQeNyAAmb7vrPL2UCz7LFT
github.com/Monibuca/engine/v3 v3.0.0-alpha4/go.mod h1:V0/kfen6K5O/RLXHPsZj4DF/LboDZ0OqfeCfn35bWMo= github.com/Monibuca/engine/v3 v3.0.0-alpha4/go.mod h1:V0/kfen6K5O/RLXHPsZj4DF/LboDZ0OqfeCfn35bWMo=
github.com/Monibuca/engine/v3 v3.0.0-alpha6 h1:USZa+JDVJd13rb9wmX06ZxjRCrqYTAPe5wVD+0IODEE= github.com/Monibuca/engine/v3 v3.0.0-alpha6 h1:USZa+JDVJd13rb9wmX06ZxjRCrqYTAPe5wVD+0IODEE=
github.com/Monibuca/engine/v3 v3.0.0-alpha6/go.mod h1:V0/kfen6K5O/RLXHPsZj4DF/LboDZ0OqfeCfn35bWMo= github.com/Monibuca/engine/v3 v3.0.0-alpha6/go.mod h1:V0/kfen6K5O/RLXHPsZj4DF/LboDZ0OqfeCfn35bWMo=
github.com/Monibuca/engine/v3 v3.0.0-alpha7 h1:ohlsdFQCUS8i6eux+etFxLKo/IyQUgqlsNAgTIR9mDQ=
github.com/Monibuca/engine/v3 v3.0.0-alpha7/go.mod h1:eonu3UFn3W7NpHzSrACipxdAyOBCUwzlFUe1R7JjttE=
github.com/Monibuca/utils/v3 v3.0.0-alpha3 h1:n4Sq7mS1Iz8oBj2BcV4sXgKbZgix0fFLvjAfXYoiXl0= github.com/Monibuca/utils/v3 v3.0.0-alpha3 h1:n4Sq7mS1Iz8oBj2BcV4sXgKbZgix0fFLvjAfXYoiXl0=
github.com/Monibuca/utils/v3 v3.0.0-alpha3/go.mod h1:3xYmhQbgAZBHLyIMteUCd1va+1z/xnd72B585mCaT3c= github.com/Monibuca/utils/v3 v3.0.0-alpha3/go.mod h1:3xYmhQbgAZBHLyIMteUCd1va+1z/xnd72B585mCaT3c=
github.com/Monibuca/utils/v3 v3.0.0-alpha4 h1:pecYA89kWmtGOeY6R99d4T1epPJ1wc+jFrrJY13VD04= github.com/Monibuca/utils/v3 v3.0.0-alpha4 h1:pecYA89kWmtGOeY6R99d4T1epPJ1wc+jFrrJY13VD04=

View File

@@ -99,7 +99,7 @@ func (ts *TS) run() {
//将ADTS转换成ASC //将ADTS转换成ASC
at.SoundFormat = 10 at.SoundFormat = 10
at.SoundRate = codec.SamplingFrequencies[(payload[2]&0x3c)>>2] at.SoundRate = codec.SamplingFrequencies[(payload[2]&0x3c)>>2]
at.SoundType = ((payload[2] & 0x1) << 2) | ((payload[3] & 0xc0) >> 6) at.Channels = ((payload[2] & 0x1) << 2) | ((payload[3] & 0xc0) >> 6)
at.RtmpTag = codec.ADTSToAudioSpecificConfig(payload) at.RtmpTag = codec.ADTSToAudioSpecificConfig(payload)
at.Push(uint32(tsPesPkt.PesPkt.Header.Dts/90), payload[7:]) at.Push(uint32(tsPesPkt.PesPkt.Header.Dts/90), payload[7:])
ts.SetOriginAT(at) ts.SetOriginAT(at)