mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 11:32:08 +08:00
use native timestamps instead of time.Duration (#627)
this improves timestamp precision
This commit is contained in:
@@ -46,7 +46,7 @@ func main() {
|
||||
// called when a RTP packet arrives
|
||||
c.OnPacketRTPAny(func(medi *description.Media, forma format.Format, pkt *rtp.Packet) {
|
||||
// get the PTS timestamp of the packet, i.e. timestamp relative to the start of the session
|
||||
pts, ptsAvailable := c.PacketPTS(medi, pkt)
|
||||
pts, ptsAvailable := c.PacketPTS2(medi, pkt)
|
||||
log.Printf("PTS: available=%v, value=%v\n", ptsAvailable, pts)
|
||||
|
||||
// get the NTP timestamp of the packet, i.e. the absolute timestamp
|
||||
|
Reference in New Issue
Block a user