support G711 multiple channels and custom sample rates (#497)

This commit is contained in:
Alessandro Ros
2024-01-08 21:16:47 +01:00
committed by GitHub
parent f9eb8e573b
commit 63a81d0896
7 changed files with 197 additions and 49 deletions

View File

@@ -38,8 +38,13 @@ func main() {
// create a description that contains a G711 format
desc := &description.Session{
Medias: []*description.Media{{
Type: description.MediaTypeVideo,
Formats: []format.Format{&format.G711{}},
Type: description.MediaTypeVideo,
Formats: []format.Format{&format.G711{
PayloadTyp: 8,
MULaw: false,
SampleRate: 8000,
ChannelCount: 1,
}},
}},
}