add MP4A-LATM decoder and encoder (#299)

This commit is contained in:
Alessandro Ros
2023-06-01 20:07:47 +02:00
committed by GitHub
parent 84048960b4
commit 80cf861ec7
87 changed files with 1795 additions and 699 deletions

View File

@@ -47,7 +47,7 @@ type Encoder struct {
}
// Init initializes the encoder.
func (e *Encoder) Init() {
func (e *Encoder) Init() error {
if e.SSRC == nil {
v := randUint32()
e.SSRC = &v
@@ -66,6 +66,7 @@ func (e *Encoder) Init() {
e.sequenceNumber = *e.InitialSequenceNumber
e.timeEncoder = rtptime.NewEncoder(90000, *e.InitialTimestamp)
return nil
}
// Encode encodes OBUs into RTP packets.