summaryrefslogtreecommitdiff
path: root/vendor/github.com/pion/webrtc/v3/pkg/media/media.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/pion/webrtc/v3/pkg/media/media.go')
-rw-r--r--vendor/github.com/pion/webrtc/v3/pkg/media/media.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/pion/webrtc/v3/pkg/media/media.go b/vendor/github.com/pion/webrtc/v3/pkg/media/media.go
new file mode 100644
index 0000000..bcd7e33
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/pkg/media/media.go
@@ -0,0 +1,25 @@
+// 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
+}
+
+// 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
+}