Skip to content

Commit 7ae80af

Browse files
committed
Add a getter for trackFormatComparator in AdaptiveTrackSelection
1 parent 276d5ff commit 7ae80af

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

libraries/exoplayer/src/main/java/androidx/media3/exoplayer/trackselection/AdaptiveTrackSelection.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ public Factory setTrackFormatComparator(Comparator<Format> trackFormatComparator
245245
return this;
246246
}
247247

248+
/** Returns the comparator used to order formats in adaptive track selections. */
249+
protected final Comparator<Format> getTrackFormatComparator() {
250+
return trackFormatComparator;
251+
}
252+
248253
@Override
249254
public final @NullableType ExoTrackSelection[] createTrackSelections(
250255
@NullableType Definition[] definitions,
@@ -306,7 +311,7 @@ protected AdaptiveTrackSelection createAdaptiveTrackSelection(
306311
bufferedFractionToLiveEdgeForQualityIncrease,
307312
adaptationCheckpoints,
308313
clock,
309-
trackFormatComparator);
314+
getTrackFormatComparator());
310315
}
311316
}
312317

0 commit comments

Comments
 (0)