WriteRTPFrame 写入未反序列化的RTP包, 未排序的
(raw *LIRTP)
| 29 | |
| 30 | // WriteRTPFrame 写入未反序列化的RTP包, 未排序的 |
| 31 | func (av *Media) WriteRTP(raw *LIRTP) { |
| 32 | for frame := av.recorderRTP(raw); frame != nil; frame = av.nextRTPFrame() { |
| 33 | frame.Value.SSRC = av.SSRC |
| 34 | av.Value.BytesIn += len(frame.Value.Payload) + 12 |
| 35 | av.DropCount += int(av.lastSeq - av.lastSeq2 - 1) |
| 36 | if len(frame.Value.Payload) > 0 { |
| 37 | av.WriteRTPFrame(frame) |
| 38 | // av.Info("rtp", zap.Uint32("ts", (frame.Value.Timestamp)), zap.Int("len", len(frame.Value.Payload)), zap.Bool("marker", frame.Value.Marker), zap.Uint16("seq", frame.Value.SequenceNumber)) |
| 39 | } else { |
| 40 | av.Debug("rtp payload is empty", zap.Uint32("ts", (frame.Value.Timestamp)), zap.Any("ext", frame.Value.GetExtensionIDs()), zap.Uint16("seq", frame.Value.SequenceNumber)) |
| 41 | frame.Recycle() |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // https://www.cnblogs.com/moonwalk/p/15903760.html |
| 47 | // Packetize packetizes the payload of an RTP packet and returns one or more RTP packets |
nothing calls this directly
no test coverage detected