Source File
media.go
Belonging Package
github.com/pion/webrtc/v4/pkg/media
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MIT// Package media provides media writer and filterspackage mediaimport ()// A Sample contains encoded media and timing information.type Sample struct {Data []byteTimestamp time.TimeDuration time.DurationPacketTimestamp uint32PrevDroppedPackets uint16Metadata interface{}// RTP headers of RTP packets forming this Sample. (Optional)// Useful for accessing RTP extensions associated to the Sample.RTPHeaders []*rtp.Header}// Writer defines an interface to handle// the creation of media files.type Writer interface {// Add the content of an RTP packet to the mediaWriteRTP(packet *rtp.Packet) error// Close the media// Note: Close implementation must be idempotentClose() error}
![]() |
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. |