WIP - Attempt to add av1 support

For some reason Chrome doesn't detect the codec despite definitely
supporting AV1 decoding.  Nothing telling show up in console,
chrome://webrtc-internals/, or chrome://media-internals/.  Testing
via `docker-compose up`.
This commit is contained in:
Ethan Waldo
2023-01-15 10:26:22 -05:00
parent cfc6bd417f
commit da1eb21408
10 changed files with 164 additions and 19 deletions

View File

@ -27,6 +27,8 @@ func ParseStr(codecName string) (codec RTPCodec, ok bool) {
ok = true
switch strings.ToLower(codecName) {
case AV1().Name:
codec = AV1()
case VP8().Name:
codec = VP8()
case VP9().Name:
@ -62,6 +64,21 @@ func (codec RTPCodec) Register(engine *webrtc.MediaEngine) error {
}, codec.Type)
}
func AV1() RTPCodec {
return RTPCodec{
Name: "av1",
PayloadType: 100,
Type: webrtc.RTPCodecTypeVideo,
Capability: webrtc.RTPCodecCapability{
MimeType: webrtc.MimeTypeAV1,
ClockRate: 90000,
Channels: 0,
SDPFmtpLine: "",
RTCPFeedback: RTCPFeedback,
},
}
}
func VP8() RTPCodec {
return RTPCodec{
Name: "vp8",