dropped-frame tracke

This commit is contained in:
Dmitry Sergeev
2026-09-01 23:45:10 +03:00
parent 179768ca4a
commit a473c84b0e
11 changed files with 204 additions and 16 deletions
+11
View File
@@ -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