Some checks failed
REUSE Compliance Check / lint (push) Failing after 0s
Browser E2E / Test (push) Failing after 3s
Test / test (1.24) (push) Failing after 0s
Test / test-i386 (1.25) (push) Failing after 0s
Test / test-i386 (1.24) (push) Failing after 0s
Test / test-windows (1.25) (push) Failing after 0s
Test / test-windows (1.24) (push) Failing after 0s
Test / test (1.25) (push) Failing after 0s
Examples Tests / Test (push) Failing after 3s
Test / test-macos (1.25) (push) Failing after 0s
Test / test-macos (1.24) (push) Failing after 0s
Go mod tidy / tidy (push) Failing after 0s
Test / test-wasm (push) Failing after 0s
CodeQL / analyze (push) Failing after 1s
Fuzz / fuzz (push) Failing after 0s
43 lines
840 B
Go
43 lines
840 B
Go
// SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package fmtp
|
|
|
|
type vp9FMTP struct {
|
|
parameters map[string]string
|
|
}
|
|
|
|
func (h *vp9FMTP) MimeType() string {
|
|
return "video/vp9"
|
|
}
|
|
|
|
func (h *vp9FMTP) Match(b FMTP) bool {
|
|
c, ok := b.(*vp9FMTP)
|
|
if !ok {
|
|
return false
|
|
}
|
|
|
|
// RTP Payload Format for VP9 Video - draft-ietf-payload-vp9-16
|
|
// https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16
|
|
// If no profile-id is present, Profile 0 MUST be inferred
|
|
hProfileID, ok := h.parameters["profile-id"]
|
|
if !ok {
|
|
hProfileID = "0"
|
|
}
|
|
cProfileID, ok := c.parameters["profile-id"]
|
|
if !ok {
|
|
cProfileID = "0"
|
|
}
|
|
if hProfileID != cProfileID {
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
func (h *vp9FMTP) Parameter(key string) (string, bool) {
|
|
v, ok := h.parameters[key]
|
|
|
|
return v, ok
|
|
}
|