https://datatracker.ietf.org/doc/html/rfc3640#section-3.2.1
(rtpItem *LIRTP)
| 67 | |
| 68 | // https://datatracker.ietf.org/doc/html/rfc3640#section-3.2.1 |
| 69 | func (aac *AAC) WriteRTPFrame(rtpItem *LIRTP) { |
| 70 | aac.Value.RTP.Push(rtpItem) |
| 71 | frame := &rtpItem.Value |
| 72 | au, err := aac.AACDecoder.Decode(frame.Packet) |
| 73 | if err != nil { |
| 74 | aac.Error("decode error", zap.Error(err)) |
| 75 | return |
| 76 | } |
| 77 | if len(au) > 0 { |
| 78 | if aac.SampleRate != 90000 { |
| 79 | aac.generateTimestamp(uint32(uint64(frame.Timestamp) * 90000 / uint64(aac.SampleRate))) |
| 80 | } |
| 81 | aac.AppendAuBytes(au...) |
| 82 | aac.Flush() |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func (aac *AAC) WriteSequenceHead(sh []byte) error { |
| 87 | aac.Media.WriteSequenceHead(sh) |
nothing calls this directly
no test coverage detected