forked from External/mediamtx
This commit is contained in:
parent
c314d77596
commit
2d17dff3b5
27 changed files with 727 additions and 487 deletions
|
|
@ -45,7 +45,11 @@ func newVP9(
|
|||
}
|
||||
|
||||
if allocateEncoder {
|
||||
t.encoder = forma.CreateEncoder()
|
||||
t.encoder = &rtpvp9.Encoder{
|
||||
PayloadMaxSize: t.udpMaxPayloadSize - 12,
|
||||
PayloadType: forma.PayloadTyp,
|
||||
}
|
||||
t.encoder.Init()
|
||||
}
|
||||
|
||||
return t, nil
|
||||
|
|
@ -88,11 +92,12 @@ func (t *formatProcessorVP9) Process(unit Unit, hasNonRTSPReaders bool) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// encode into RTP
|
||||
pkts, err := t.encoder.Encode(tunit.Frame, tunit.PTS)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tunit.RTPPackets = pkts
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue