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

Function PutPtsDts

util/convert.go:323–335  ·  view source on GitHub ↗
(v uint64)

Source from the content-addressed store, hash-verified

321}
322
323func PutPtsDts(v uint64) uint64 {
324 // 4 + 3 + 1 + 15 + 1 + 15 + 1
325 // 0011
326 // 0010 + PTS[30-32] + marker_bit + PTS[29-15] + marker_bit + PTS[14-0] + marker_bit
327 // 0x100010001
328 // 0001 0000 0000 0000 0001 0000 0000 0000 0001
329 // 3个 market_it
330 pts1 := (v >> 30) & 0x7 << 33
331 pts2 := (v >> 15) & 0x7fff << 17
332 pts3 := (v & 0x7fff) << 1
333
334 return pts1 | pts2 | pts3 | 0x100010001
335}
336
337func GetPCR(v uint64) uint64 {
338 // program_clock_reference_base(33) + Reserved(6) + program_clock_reference_extension(9)

Callers 1

WritePESHeaderFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected