fix: keep OutputTrack quality even when input stream is updated#2078
fix: keep OutputTrack quality even when input stream is updated#2078
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates transcoder output-track initialization and update logic to better preserve output quality settings across input stream updates, while ensuring bypass tracks follow input changes.
Changes:
- Refactors
CreateOutputTrack(...)to apply config defaults directly (and centralizes skip-frames handling). - Splits decoded-frame-based output track updates into video/audio-specific paths and adds helper utilities (resolution alignment, skip-frames framerate adjustment).
- Updates bypass-mode output-track updates to refresh additional parameters from the (potentially updated) input track.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/projects/transcoder/transcoder_stream_internal.h |
Updates internal APIs and adds private helpers for decoded-frame updates and alignment/skip-frames handling. |
src/projects/transcoder/transcoder_stream_internal.cpp |
Implements refactored output-track creation/update logic, adds helpers, and extends profile serialization. |
src/projects/transcoder/transcoder_stream.cpp |
Adjusts bypass update call to pass the input track into the passthrough updater. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR adjusts how TranscoderStream/TranscoderStreamInternal initialize and update OutputTrack parameters so that, in encoding mode, the output keeps its initially-determined quality even if the input stream’s quality changes, while bypass mode continues to follow input changes.
Changes:
- Refactors output-track updates by splitting decoded-frame updates into video/audio helpers and expanding passthrough updates to also take the
input_track. - Simplifies output-track creation to apply config-provided defaults directly (and adds validation for unsupported codec types).
- Extends video profile serialization to include
ExtraOptions(via hash) so encoder/profile identity changes when extra options change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/projects/transcoder/transcoder_stream_internal.h |
Updates method signatures and adds helper/utility declarations used by the new update logic. |
src/projects/transcoder/transcoder_stream_internal.cpp |
Implements the new retention/update behavior, codec validation, skip-frame/framerate alignment helpers, and serialization change. |
src/projects/transcoder/transcoder_stream.cpp |
Updates call site to pass input_track into passthrough output-track updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@dimiden Please review again. :) |
|
LGTM |
Summary
Improved OutputTrack quality retention behavior when the source stream is updated, along with minor refactoring.
Key Changes
1. Default Parameter Handling
2. Output Track Initialization
3. Behavior on Input Stream Update
Encoding mode
Bypass mode