Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6c5642830354740d045f453eb3e77e8.
2024-01-18 20:29:33 +00:00

28 lines
606 B
Go

// Package media provides media writer and filters
package media
import (
"time"
"github.com/pion/rtp"
)
// A Sample contains encoded media and timing information
type Sample struct {
Data []byte
Timestamp time.Time
Duration time.Duration
PacketTimestamp uint32
PrevDroppedPackets uint16
}
// Writer defines an interface to handle
// the creation of media files
type Writer interface {
// Add the content of an RTP packet to the media
WriteRTP(packet *rtp.Packet) error
// Close the media
// Note: Close implementation must be idempotent
Close() error
}