snapshot of https://github.com/pion/webrtc.git (main, 2026-09-15; blobs > 131072B omitted)
Some checks failed
REUSE Compliance Check / lint (push) Failing after 0s
Browser E2E / Test (push) Failing after 3s
Test / test (1.24) (push) Failing after 0s
Test / test-i386 (1.25) (push) Failing after 0s
Test / test-i386 (1.24) (push) Failing after 0s
Test / test-windows (1.25) (push) Failing after 0s
Test / test-windows (1.24) (push) Failing after 0s
Test / test (1.25) (push) Failing after 0s
Examples Tests / Test (push) Failing after 3s
Test / test-macos (1.25) (push) Failing after 0s
Test / test-macos (1.24) (push) Failing after 0s
Go mod tidy / tidy (push) Failing after 0s
Test / test-wasm (push) Failing after 0s
CodeQL / analyze (push) Failing after 1s
Fuzz / fuzz (push) Failing after 0s
Some checks failed
REUSE Compliance Check / lint (push) Failing after 0s
Browser E2E / Test (push) Failing after 3s
Test / test (1.24) (push) Failing after 0s
Test / test-i386 (1.25) (push) Failing after 0s
Test / test-i386 (1.24) (push) Failing after 0s
Test / test-windows (1.25) (push) Failing after 0s
Test / test-windows (1.24) (push) Failing after 0s
Test / test (1.25) (push) Failing after 0s
Examples Tests / Test (push) Failing after 3s
Test / test-macos (1.25) (push) Failing after 0s
Test / test-macos (1.24) (push) Failing after 0s
Go mod tidy / tidy (push) Failing after 0s
Test / test-wasm (push) Failing after 0s
CodeQL / analyze (push) Failing after 1s
Fuzz / fuzz (push) Failing after 0s
This commit is contained in:
35
pkg/media/media.go
Normal file
35
pkg/media/media.go
Normal file
@@ -0,0 +1,35 @@
|
||||
// SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// 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
|
||||
Metadata any
|
||||
|
||||
// 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 media
|
||||
WriteRTP(packet *rtp.Packet) error
|
||||
// Close the media
|
||||
// Note: Close implementation must be idempotent
|
||||
Close() error
|
||||
}
|
||||
Reference in New Issue
Block a user