GetExtensionIDs returns an extension id array
()
| 405 | |
| 406 | // GetExtensionIDs returns an extension id array |
| 407 | func (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 |
| 424 | func (h *Header) GetExtension(id uint8) []byte { |
no outgoing calls