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

Method GetExtensionIDs

packet.go:407–421  ·  view source on GitHub ↗

GetExtensionIDs returns an extension id array

()

Source from the content-addressed store, hash-verified

405
406// GetExtensionIDs returns an extension id array
407func (h *Header) GetExtensionIDs() []uint8 {
408 if !h.Extension {
409 return nil
410 }
411
412 if len(h.Extensions) == 0 {
413 return nil
414 }
415
416 ids := make([]uint8, 0, len(h.Extensions))
417 for _, extension := range h.Extensions {
418 ids = append(ids, extension.id)
419 }
420 return ids
421}
422
423// GetExtension returns an RTP header extension
424func (h *Header) GetExtension(id uint8) []byte {

Calls

no outgoing calls