func (u *UseSRTP) Marshal() ([]byte, error) {
	out := make([]byte, useSRTPHeaderSize)
	binary.BigEndian.PutUint16(out, uint16(u.TypeValue()))
	binary.BigEndian.PutUint16(out[2:], uint16(2+(len(u.ProtectionProfiles)*2)+   1))
	binary.BigEndian.PutUint16(out[4:], uint16(len(u.ProtectionProfiles)*2))
	for _, v := range u.ProtectionProfiles {
		out = append(out, []byte{0x00, 0x00}...)
		binary.BigEndian.PutUint16(out[len(out)-2:], uint16(v))
	}
	out = append(out, 0x00)  
	return out, nil
}
Marshal encodes the extension
package extension
import "encoding/binary"
const (
	useSRTPHeaderSize = 6
)
type UseSRTP struct {
	ProtectionProfiles []SRTPProtectionProfile
}
func (u UseSRTP) TypeValue() TypeValue {
	return UseSRTPTypeValue
}