status-go/vendor/github.com/pion/rtp/depacketizer.go

21 lines
804 B
Go
Raw Normal View History

2024-06-05 20:10:03 +00:00
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT
2022-03-10 09:44:48 +00:00
package rtp
// Depacketizer depacketizes a RTP payload, removing any RTP specific data from the payload
type Depacketizer interface {
2024-06-05 20:10:03 +00:00
// Unmarshal parses the RTP payload and returns media.
// Metadata may be stored on the Depacketizer itself
2022-03-10 09:44:48 +00:00
Unmarshal(packet []byte) ([]byte, error)
2024-06-05 20:10:03 +00:00
2022-03-10 09:44:48 +00:00
// Checks if the packet is at the beginning of a partition. This
// should return false if the result could not be determined, in
// which case the caller will detect timestamp discontinuities.
IsPartitionHead(payload []byte) bool
2024-06-05 20:10:03 +00:00
2022-03-10 09:44:48 +00:00
// Checks if the packet is at the end of a partition. This should
// return false if the result could not be determined.
IsPartitionTail(marker bool, payload []byte) bool
}