MCPcopy Create free account
hub / github.com/pion/rtp / GetExtension

Method GetExtension

packet.go:424–434  ·  view source on GitHub ↗

GetExtension returns an RTP header extension

(id uint8)

Source from the content-addressed store, hash-verified

422
423// GetExtension returns an RTP header extension
424func (h *Header) GetExtension(id uint8) []byte {
425 if !h.Extension {
426 return nil
427 }
428 for _, extension := range h.Extensions {
429 if extension.id == id {
430 return extension.payload
431 }
432 }
433 return nil
434}
435
436// DelExtension Removes an RTP Header extension
437func (h *Header) DelExtension(id uint8) error {

Calls

no outgoing calls