test RTP timestamps

This commit is contained in:
KingKDot
2026-08-05 12:06:13 -05:00
parent c3bcc2cdcc
commit 49604b8b53
14 changed files with 430 additions and 68 deletions
@@ -187,8 +187,7 @@ func NowWebcam(ctx context.Context, env *rt.Env) error {
return nil
}
if outFormat == "h264" && webrtcpub.IsActive(webrtcpub.KindWebcam) {
dur := time.Second / time.Duration(frameFPS)
if werr := webrtcpub.WriteH264(webrtcpub.KindWebcam, frameBytes, dur); werr != nil {
if werr := webrtcpub.WriteH264(webrtcpub.KindWebcam, frameBytes, time.Now()); werr != nil {
log.Printf("webrtc: write webcam h264 failed: %v", werr)
}
return nil