feat: add webrtc h265 support

This commit is contained in:
langhuihui
2025-05-15 19:16:40 +08:00
parent ecc3947016
commit bcc7defa97
7 changed files with 116 additions and 240 deletions

View File

@@ -475,7 +475,7 @@ func (r *Receiver) Receive() (err error) {
if r.lastAudioPacketTS == 0 {
r.lastAudioPacketTS = packet.Timestamp
r.audioTSCheckStart = now
r.Stream.Debug("check audio timestamp start", "firsttime", "timestamp", packet.Timestamp)
r.Stream.Debug("check audio timestamp start firsttime", "timestamp", packet.Timestamp)
} else if !r.useVideoTS {
r.Stream.Debug("debug audio timestamp", "current", packet.Timestamp, "last", r.lastAudioPacketTS, "duration", now.Sub(r.audioTSCheckStart))
// 如果3秒内时间戳没有变化切换到使用视频时间戳
@@ -493,7 +493,7 @@ func (r *Receiver) Receive() (err error) {
// 时间戳有变化,重置检查
r.lastAudioPacketTS = packet.Timestamp
r.audioTSCheckStart = now
r.Stream.Debug("check audio timestamp start", "reset audioTSCheckStart", "lastAudioPacketTS", r.lastAudioPacketTS)
r.Stream.Debug("reset audioTSCheckStart", "lastAudioPacketTS", r.lastAudioPacketTS)
}
}