Conversation
ac8efc4 to
df60a10
Compare
wkozyra95
commented
Mar 12, 2026
| } | ||
| let selected = Select::new("Select input:", input_names).prompt()?; | ||
|
|
||
| let actions = vec!["Pause", "Unpause"]; |
Member
Author
There was a problem hiding this comment.
I know that this should be an enum, but this will need rework regardless if we add some more options
4895f95 to
382f088
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an API endpoint to pause/unpause an input (primarily intended for MP4) and wires it through the pipeline into the core audio/video queues by applying a pause-driven PTS offset.
Changes:
- Add
/api/input/{input_id}/updatewithUpdateInputRequest { pause?: boolean }and register it in OpenAPI generation. - Implement pause/unpause in
smelter-corequeues via a sharedPauseStatethat offsets PTS after unpausing. - Extend the integration-test demo CLI to call the new update-input endpoint.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/src/bin/generate_from_types.rs | Registers the new route handler for OpenAPI generation. |
| tools/schemas/openapi_specification.json | Adds the new endpoint and UpdateInputRequest schema. |
| src/routes/update_input.rs | New Axum handler + request type for updating (pausing) an input. |
| src/routes.rs | Wires the new /:id/update route under /api/input. |
| smelter-core/src/queue/video_queue.rs | Adds pause handling for video (freeze last frame + PTS offset on enqueue). |
| smelter-core/src/queue/audio_queue.rs | Adds pause handling for audio (skip output while paused + PTS offset on enqueue). |
| smelter-core/src/queue/utils.rs | Introduces PauseState utility for pause tracking and accumulated PTS offset. |
| smelter-core/src/queue.rs | Adds Queue::{pause_input, unpause_input} entry points. |
| smelter-core/src/pipeline/instance.rs | Adds Pipeline::update_input that delegates pause/unpause to the queue. |
| integration-tests/examples/demo/smelter_state.rs | Adds demo CLI workflow to pause/unpause inputs via the API. |
| integration-tests/examples/demo/main.rs | Adds “Update input” action to the demo menu. |
| .claude/skills/api-change/SKILL.md | Updates the API-change checklist to include route registration in OpenAPI paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
382f088 to
a225f55
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
wkazmierczak
approved these changes
Mar 13, 2026
JBRS307
approved these changes
Mar 16, 2026
8556b01 to
7bef108
Compare
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.
Intended primarily for mp4 input. It might lead to weird behaviors with other inputs, especially if they have any type of adaptive buffer