Source File
transportccextension.go
Belonging Package
github.com/pion/rtp
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage rtpimport ()const (// transport-wide sequence.transportCCExtensionSize = 2)// TransportCCExtension is a extension payload format in// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01// 0 1 2 3// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+// | 0xBE | 0xDE | length=1 |// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+// | ID | L=1 |transport-wide sequence number | zero padding |// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+// .type TransportCCExtension struct {TransportSequence uint16}// Marshal serializes the members to buffer.func ( TransportCCExtension) () ([]byte, error) {:= make([]byte, transportCCExtensionSize)binary.BigEndian.PutUint16([0:2], .TransportSequence)return , nil}// Unmarshal parses the passed byte slice and stores the result in the members.func ( *TransportCCExtension) ( []byte) error {if len() < transportCCExtensionSize {return errTooSmall}.TransportSequence = binary.BigEndian.Uint16([0:2])return nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |