Live video on the AT Protocol
at v0.9.9 18 lines 642 B view raw
1package replication 2 3import ( 4 "context" 5 6 "stream.place/streamplace/pkg/config" 7 "stream.place/streamplace/pkg/media" 8 "stream.place/streamplace/pkg/streamplace" 9) 10 11type Replicator interface { 12 // start the replicator, ending on context cancellation. if your replicator doesn't need to start anything, you can just block on <-ctx.Done() 13 Start(context.Context, *config.CLI) error 14 // hey, we have a new segment! send it to whoever 15 SendSegment(context.Context, *media.NewSegmentNotification) error 16 // populate this origin record with whatever fields are pertinent to your replicator 17 BuildOriginRecord(*streamplace.BroadcastOrigin) error 18}