bump mediamtx-rpicamera to v2.6.0 (#5780)

This commit is contained in:
bluenviron-bot
2026-05-18 22:27:17 +02:00
committed by GitHub
parent c05c14d9af
commit eda7957a44
4 changed files with 11 additions and 35 deletions
@@ -14,7 +14,6 @@ import (
"sync"
"syscall"
"time"
"unsafe"
"github.com/bluenviron/mediacommon/v2/pkg/codecs/h264"
)
@@ -31,17 +30,6 @@ var (
dumpPath = ""
)
func ntpTime() syscall.Timespec {
var t syscall.Timespec
syscall.Syscall(syscall.SYS_CLOCK_GETTIME, 0, uintptr(unsafe.Pointer(&t)), 0)
return t
}
func monotonicTime() syscall.Timespec {
var t syscall.Timespec
syscall.Syscall(syscall.SYS_CLOCK_GETTIME, 1, uintptr(unsafe.Pointer(&t)), 0)
return t
}
func multiplyAndDivide(v, m, d int64) int64 {
secs := v / d
@@ -345,42 +333,30 @@ outer:
case 'd':
dts := int64(buf[8])<<56 | int64(buf[7])<<48 | int64(buf[6])<<40 | int64(buf[5])<<32 |
int64(buf[4])<<24 | int64(buf[3])<<16 | int64(buf[2])<<8 | int64(buf[1])
ntpUs := int64(buf[16])<<56 | int64(buf[15])<<48 | int64(buf[14])<<40 | int64(buf[13])<<32 |
int64(buf[12])<<24 | int64(buf[11])<<16 | int64(buf[10])<<8 | int64(buf[9])
var nalus h264.AnnexB
err = nalus.Unmarshal(buf[9:])
err = nalus.Unmarshal(buf[17:])
if err != nil {
return err
}
unixNTP := ntpTime()
unixMono := monotonicTime()
// subtract from NTP the delay from now to the moment the frame was taken
ntp := time.Unix(int64(unixNTP.Sec), int64(unixNTP.Nsec))
deltaT := time.Duration(unixMono.Nano()-dts*1e3) * time.Nanosecond
ntp = ntp.Add(-deltaT)
c.onData(
multiplyAndDivide(dts, 90000, 1e6),
ntp,
time.Unix(ntpUs/1e6, (ntpUs%1e6)*1000),
nalus)
case 's':
dts := int64(buf[8])<<56 | int64(buf[7])<<48 | int64(buf[6])<<40 | int64(buf[5])<<32 |
int64(buf[4])<<24 | int64(buf[3])<<16 | int64(buf[2])<<8 | int64(buf[1])
unixNTP := ntpTime()
unixMono := monotonicTime()
// subtract from NTP the delay from now to the moment the frame was taken
ntp := time.Unix(int64(unixNTP.Sec), int64(unixNTP.Nsec))
deltaT := time.Duration(unixMono.Nano()-dts*1e3) * time.Nanosecond
ntp = ntp.Add(-deltaT)
ntpUs := int64(buf[16])<<56 | int64(buf[15])<<48 | int64(buf[14])<<40 | int64(buf[13])<<32 |
int64(buf[12])<<24 | int64(buf[11])<<16 | int64(buf[10])<<8 | int64(buf[9])
c.onDataSecondary(
multiplyAndDivide(dts, 90000, 1e6),
ntp,
buf[9:])
time.Unix(ntpUs/1e6, (ntpUs%1e6)*1000),
buf[17:])
default:
return fmt.Errorf("unexpected data from pipe: '0x%.2x'", buf[0])
@@ -1 +1 @@
ef57fc22e19efc17d86c279aa4ae9aa72b8fcc4ab8707fea363609c1e39ed62c
4d9f7785e225af4c84d54dc36a5e44fc255188e3a2db291ccf7fa3093adc549d
@@ -1 +1 @@
2a8c7232110e411176dbc0fe5af30b56226869753aa6147564b9ca7cf3bc784d
8448f91064c9d659aa28dd22141ab4b82918d5990a8c3939cebcb2013a58f346
@@ -1 +1 @@
v2.5.7
v2.6.0