mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-26 19:51:14 +08:00
SizeLength、IndexLength、IndexDeltaLength
This commit is contained in:
@@ -127,7 +127,6 @@ func (p *RTSPPusher) Connect() error {
|
||||
func (p *RTSPPusher) Push() (err error) {
|
||||
var u *url.URL
|
||||
u, err = url.Parse(p.RemoteURL)
|
||||
defer p.Stop()
|
||||
// startTime := time.Now()
|
||||
// for len(p.tracks) < 2 {
|
||||
// if time.Sleep(time.Second); time.Since(startTime) > time.Second*10 {
|
||||
|
@@ -51,6 +51,8 @@ func (p *RTSPPublisher) SetTracks() error {
|
||||
case *format.MPEG4Audio:
|
||||
at := NewAAC(p.Stream, f.PayloadType(), uint32(f.Config.SampleRate))
|
||||
p.Tracks[track] = at
|
||||
at.IndexDeltaLength = f.IndexDeltaLength
|
||||
at.IndexLength = f.IndexLength
|
||||
at.SizeLength = f.SizeLength
|
||||
if f.Config.Type == mpeg4audio.ObjectTypeAACLC {
|
||||
at.Mode = 1
|
||||
|
@@ -63,9 +63,9 @@ func (s *RTSPSubscriber) OnEvent(event any) {
|
||||
SampleRate: int(v.SampleRate),
|
||||
ChannelCount: int(v.Channels),
|
||||
},
|
||||
SizeLength: 13,
|
||||
IndexLength: 3,
|
||||
IndexDeltaLength: 3,
|
||||
SizeLength: v.SizeLength,
|
||||
IndexLength: v.IndexLength,
|
||||
IndexDeltaLength: v.IndexDeltaLength,
|
||||
}},
|
||||
}
|
||||
s.audioTrack = audio
|
||||
|
Reference in New Issue
Block a user