multistream: Add DRED duration CTL support #450
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.
Summary
Forward
OPUS_SET_DRED_DURATION_REQUESTandOPUS_GET_DRED_DURATION_REQUESTto all underlying encoders in the multistream encoder.
Motivation
Currently, applications using
libopusenc(Ogg Opus) or the multistream APIcannot enable DRED because the CTL requests are not forwarded to the internal
encoders. This patch fixes that gap.
Testing
Verified in an iOS application using
libopusenc->libopus1.5.2 with--enable-dred. After this patch,OPUS_SET_DRED_DURATION()returnsOPUS_OKinstead of
OPUS_UNIMPLEMENTED.This fix is particularly important for users of v1.5.2 who are already
using DRED with multistream/Ogg encoding.
Since jumping to v1.6 may be a larger commitment for some users, would
it be appropriate to consider a v1.5.3 patch release that includes this
fix? This would provide a safe upgrade path for users who want the bug
fix without adopting new features.
Related PR: This fix works in conjunction with xiph/libopusenc#38, which forwards the DRED CTL requests from the
ope_encoder_ctl()API to the multistream encoder.Together, these two PRs complete the DRED control path for applications encoding Ogg Opus files:
Without both fixes, users cannot enable DRED when encoding via the standard Ogg Opus workflow.