change signature of rtp encoders and decoders

This commit is contained in:
aler9
2022-03-20 11:30:04 +01:00
parent ba99421e74
commit e7aca99c73
13 changed files with 175 additions and 110 deletions

View File

@@ -30,7 +30,8 @@ func main() {
" ! h264parse config-interval=1 ! rtph264pay ! udpsink host=127.0.0.1 port=9000")
// get SPS and PPS
decoder := rtph264.NewDecoder()
decoder := &rtph264.Decoder{}
decoder.Init()
sps, pps, err := decoder.ReadSPSPPS(rtph264.PacketConnReader{pc})
if err != nil {
panic(err)