dropped-frame tracke
This commit is contained in:
@@ -2,6 +2,17 @@ package playback
|
||||
|
||||
import "context"
|
||||
|
||||
type videoSourceContextKey struct{}
|
||||
|
||||
func withVideoSource(ctx context.Context, source FeedConfig) context.Context {
|
||||
return context.WithValue(ctx, videoSourceContextKey{}, source)
|
||||
}
|
||||
|
||||
func videoSourceFromContext(ctx context.Context) FeedConfig {
|
||||
source, _ := ctx.Value(videoSourceContextKey{}).(FeedConfig)
|
||||
return source
|
||||
}
|
||||
|
||||
// VideoFrame contains metadata and borrowed source payload.
|
||||
//
|
||||
// Payload is valid only until the next VideoReader.ReadVideo call or until the
|
||||
|
||||
Reference in New Issue
Block a user