Skip to content

Add Format.selectionPriority and parse from HLS SCORE#3236

Open
AndyWangLYN wants to merge 2 commits into
androidx:mainfrom
AndyWangLYN:heyuwang/hls-score-selection-priority
Open

Add Format.selectionPriority and parse from HLS SCORE#3236
AndyWangLYN wants to merge 2 commits into
androidx:mainfrom
AndyWangLYN:heyuwang/hls-score-selection-priority

Conversation

@AndyWangLYN
Copy link
Copy Markdown

@AndyWangLYN AndyWangLYN commented May 24, 2026

Summary

Adds Format.selectionPriority and populates it from the HLS SCORE attribute on EXT-X-STREAM-INF /
EXT-X-I-FRAME-STREAM-INF.

Extraction-only — no selection behavior changes. Apps that want ABR to honor the field can install a
Comparator<Format> via AdaptiveTrackSelection.Factory#setTrackFormatComparator (#3068).

DASH @selectionPriority parsing follows in a separate PR.

Spec

draft-pantos-hls-rfc8216bis-22 §4.4.6.2
(SCORE on EXT-X-STREAM-INF), §4.4.6.3 (inherits to EXT-X-I-FRAME-STREAM-INF), §6.3.1 (client behavior).

Notes for reviewers

  • setSelectionPriority doesn't validate inputs — matches Format Builder convention (grep -n "checkArgument" Format.java returns zero hits).
  • Field Javadoc mentions DASH for completeness; happy to defer that sentence to the DASH follow-up PR if preferred.

Test plan

  • ./gradlew :lib-common:test
  • ./gradlew :lib-exoplayer-hls:connectedAndroidTest
  • git diff -U0 main... | google-java-format-diff.py -p1 -i

@AndyWangLYN AndyWangLYN changed the title Common: add Format.selectionPriority and parse HLS SCORE Add Format.selectionPriority and parse HLS SCORE May 24, 2026
@AndyWangLYN AndyWangLYN marked this pull request as ready for review May 24, 2026 07:02
@AndyWangLYN AndyWangLYN changed the title Add Format.selectionPriority and parse HLS SCORE Add Format.selectionPriority and parse from HLS SCORE May 24, 2026
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.

1 participant