constants.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
  2. // SPDX-License-Identifier: MIT
  3. package webrtc
  4. import "github.com/pion/dtls/v2"
  5. const (
  6. // Unknown defines default public constant to use for "enum" like struct
  7. // comparisons when no value was defined.
  8. Unknown = iota
  9. unknownStr = "unknown"
  10. // Equal to UDP MTU
  11. receiveMTU = 1460
  12. // simulcastProbeCount is the amount of RTP Packets
  13. // that handleUndeclaredSSRC will read and try to dispatch from
  14. // mid and rid values
  15. simulcastProbeCount = 10
  16. // simulcastMaxProbeRoutines is how many active routines can be used to probe
  17. // If the total amount of incoming SSRCes exceeds this new requests will be ignored
  18. simulcastMaxProbeRoutines = 25
  19. mediaSectionApplication = "application"
  20. sdpAttributeRid = "rid"
  21. sdpAttributeSimulcast = "simulcast"
  22. rtpOutboundMTU = 1200
  23. rtpPayloadTypeBitmask = 0x7F
  24. incomingUnhandledRTPSsrc = "Incoming unhandled RTP ssrc(%d), OnTrack will not be fired. %v"
  25. generatedCertificateOrigin = "WebRTC"
  26. sdesRepairRTPStreamIDURI = "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
  27. // AttributeRtxPayloadType is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream payload type
  28. AttributeRtxPayloadType = "rtx_payload_type"
  29. // AttributeRtxSsrc is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream SSRC
  30. AttributeRtxSsrc = "rtx_ssrc"
  31. // AttributeRtxSequenceNumber is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream sequence number
  32. AttributeRtxSequenceNumber = "rtx_sequence_number"
  33. )
  34. func defaultSrtpProtectionProfiles() []dtls.SRTPProtectionProfile {
  35. return []dtls.SRTPProtectionProfile{dtls.SRTP_AEAD_AES_256_GCM, dtls.SRTP_AEAD_AES_128_GCM, dtls.SRTP_AES128_CM_HMAC_SHA1_80}
  36. }