Repository navigation
feat: map the remaining sender encoding parameters - #316
Merged
Merged
Conversation
RTCRtpEncodingParameters gains the encoding parameters WebRTC has and the Java API did not: rid for simulcast, scaleResolutionDownTo (with the new RTCResolutionRestriction), scalabilityMode and numTemporalLayers for SVC, bitratePriority and networkPriority, adaptivePtime for audio, and codec to send an encoding with a codec of its own. RTCRtpSendParameters gains degradationPreference, with the new RTCDegradationPreference. RTCRtpCodecCapability gains getScalabilityModes(), the modes a codec supports, which is what scalabilityMode accepts; unsupported modes make setParameters() fail. The priorities apply to the whole sender, and WebRTC accepts them on the first encoding only, which the Javadoc says. The media constraints guide covers the new parameters, with simulcast and scalability modes.
SendableMetatype
added a commit
to EduGeyser/webrtc-java
that referenced
this pull request
Oct 10, 2026
Brings in upstream 0.19.0 and the work after it: the FFmpeg-based webrtc-java-media module with its native extension API (devopvoid#291, devopvoid#292, devopvoid#299, devopvoid#300), encoded frame transforms (devopvoid#300), the remaining sender encoding parameters and RTCConfiguration fields (devopvoid#316, devopvoid#317), custom and hardware video codec factories (devopvoid#303, devopvoid#310 to devopvoid#315, devopvoid#318 to devopvoid#330), the log sink and 32-bit ARM stats fixes, and upstream's CI rework (devopvoid#294 to devopvoid#309). Fork-side adaptations: - The media module builds with Gradle, and only in the full variant: it needs audio and video. On Linux it links like the JNI library, since the Chromium sysroots no longer ship the static libgcc_eh.a. The sysroots carry stubs of glibc that no executable links against, so FFmpeg's configure links with lld and allows undefined symbols in shared libraries. - The data channels variant leaves out the new media sources, the codec factory setup and the hardware codec headers, and skips the new tests that need audio or video. - The module tests run on the module path with the test resources patched in, and the core tests open the internal package that NativeApi and NativeLoader are tested in. - The WebRTC checkout keeps this fork's sync, with upstream's checkout_instrumented_libraries setting. - CI builds all platforms from one reusable workflow, as upstream now does. The full variant also builds FFmpeg and tests the media module. The WebRTC and FFmpeg caches are saved as soon as their builds finish, and a release is prepared locally and pushed in one atomic push. - The Maven poms and upstream's Dependabot setup stay out, and the README is the fork's own; the rename script now leaves it alone.
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.
RTCRtpEncodingParametersandRTCRtpSendParametersgain the encoding parameters WebRTC has and the Java API didn't. This makes simulcast, SVC and degradation behavior controllable from Java.API
On
RTCRtpEncodingParameters:ridRTCRtpTransceiverInit.sendEncodingsscaleResolutionDownToRTCResolutionRestriction); takes precedence overscaleResolutionDownByscalabilityModeL1T3,L3T3_KEYnumTemporalLayersbitratePriority,networkPriorityadaptivePtimecodecOn
RTCRtpSendParameters:degradationPreference, with the newRTCDegradationPreferenceenum.On
RTCRtpCodecCapability:getScalabilityModes(), the modes a codec supports, i.e. whatscalabilityModeaccepts.Behavior, checked against WebRTC's source
bitratePriorityandnetworkPriorityapply to the whole sender. WebRTC accepts them on the first encoding only (PerSenderRtpEncodingParameterHasValue), and the Javadoc says so.rid: can't be changed after the transceiver is created;setParameters()throws.setParameters()throw (CheckScalabilityModeValues).BALANCEDis only a default behind a field trial.Testing
RTCRtpEncodingParametersTests(9 tests):rids, scales and priorities round-trip throughaddTransceiverridis rejectedscaleResolutionDownToanddegradationPreferenceround-tripadaptivePtimeround-trips on audioL1T3is applied and frames keep flowingL3T3is rejected for VP8, and VP8's capability listsL1T3but notL3T3codecround-tripsmvn -pl webrtc test: 193 tests pass.-Pjni-check: 193 tests pass, with noFATAL ERROR in native method.Docs
The media constraints guide (
docs/guide/media/constraints.md) has new sections on absolute resolution caps, degradation preference, simulcast, scalability modes and priorities.