MCPcopy Create free account
hub / github.com/Monibuca/engine / WriteNalu

Method WriteNalu

track/video.go:94–104  ·  view source on GitHub ↗
(pts uint32, dts uint32, nalu []byte)

Source from the content-addressed store, hash-verified

92}
93
94func (vt *Video) WriteNalu(pts uint32, dts uint32, nalu []byte) {
95 if dts == 0 {
96 vt.generateTimestamp(pts)
97 } else {
98 vt.Value.PTS = time.Duration(pts)
99 vt.Value.DTS = time.Duration(dts)
100 }
101 vt.Value.BytesIn += len(nalu)
102 vt.WriteSliceBytes(nalu)
103 vt.Flush()
104}
105
106func (vt *Video) WriteAnnexB(pts uint32, dts uint32, frame []byte) {
107 if dts == 0 {

Callers

nothing calls this directly

Calls 3

generateTimestampMethod · 0.95
FlushMethod · 0.95
WriteSliceBytesMethod · 0.65

Tested by

no test coverage detected