Skip to content

feat(tracker): let callers choose the video decode config - #9

Open
almogtavor wants to merge 1 commit into
smg-project:mainfrom
almogtavor:tracker-fetch-config
Open

feat(tracker): let callers choose the video decode config#9
almogtavor wants to merge 1 commit into
smg-project:mainfrom
almogtavor:tracker-fetch-config

Conversation

@almogtavor

Copy link
Copy Markdown

Closes #8.

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.

The tracker now carries a VideoFetchConfig, with with_video_config() to override it. new() keeps using VideoFetchConfig::default(), so existing callers are unaffected.

VideoFetchConfig is Copy, 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_kwargs field 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_audio to accept a config first.

Test

cargo test --lib, 254 passed. Two new cases cover the default and the override. cargo clippy --all-targets is clean and cargo fmt applied.

AI assistance was used for this change.

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.
@almogtavor

Copy link
Copy Markdown
Author

CC @BugenZhao @slin1237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AsyncMultiModalTracker always decodes video with VideoFetchConfig::default()

1 participant