feat(tracker): let callers choose the video decode config - #9
Open
almogtavor wants to merge 1 commit into
Open
Conversation
AsyncMultiModalTracker always fetched clips with VideoFetchConfig::default(), so callers had no way to reach the min_frames, max_frames and sample_fps knobs that MediaConnector::fetch_video already accepts. Carry a VideoFetchConfig on the tracker and add with_video_config() to override it. Default behaviour is unchanged. Closes smg-project#8.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8.
AsyncMultiModalTrackeralways fetched clips withVideoFetchConfig::default(), so callers had no way to reach themin_frames,max_framesandsample_fpsknobs thatMediaConnector::fetch_videoalready accepts.The tracker now carries a
VideoFetchConfig, withwith_video_config()to override it.new()keeps usingVideoFetchConfig::default(), so existing callers are unaffected.VideoFetchConfigisCopy, so the value is simply moved into each spawned fetch task, with no extra allocation or locking.Motivation is vLLM's Rust frontend, which exposes a per-request
media_io_kwargsfield whose video keys map onto these exact fields (vllm-project/vllm#44280). It cannot honor them today because the tracker discards the config.Happy to add the same shape for audio if you want it, though that needs
fetch_audioto accept a config first.Test
cargo test --lib, 254 passed. Two new cases cover the default and the override.cargo clippy --all-targetsis clean andcargo fmtapplied.AI assistance was used for this change.