Source File
opus_packet.go
Belonging Package
github.com/pion/rtp/codecs
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage codecs// OpusPayloader payloads Opus packets.type OpusPayloader struct{}// Payload fragments an Opus packet across one or more byte arrays.func ( *OpusPayloader) ( uint16, []byte) [][]byte {if == nil {return [][]byte{}}:= make([]byte, len())copy(, )return [][]byte{}}// OpusPacket represents the Opus header that is stored in the payload of an RTP Packet.type OpusPacket struct {Payload []byteaudioDepacketizer}// Unmarshal parses the passed byte slice and stores the result in the OpusPacket this method is called upon.func ( *OpusPacket) ( []byte) ([]byte, error) {if == nil {return nil, errNilPacket} else if len() == 0 {return nil, errShortPacket}.Payload =return , nil}// OpusPartitionHeadChecker checks Opus partition head.//// Deprecated: replaced by OpusPacket.IsPartitionHead().type OpusPartitionHeadChecker struct{}// IsPartitionHead checks whether if this is a head of the Opus partition.//// Deprecated: replaced by OpusPacket.IsPartitionHead().func (*OpusPartitionHeadChecker) ( []byte) bool {return (&OpusPacket{}).IsPartitionHead()}
![]() |
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. |