mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
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:
@ -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",
|
||||
|
Reference in New Issue
Block a user