Skip to content

Commit

Permalink
Add a way to not ignore performance points for resolution and frame r…
Browse files Browse the repository at this point in the history
…ate (#19)

In
androidx@3521ccd,
a fallback was added when there is no coverage for 720p 60 FPS. That
introduced performance issues on several device models that are now
dropping 15-40 frames / sec in Live playback (depending on the model).
That's because they used to stay at a lower resolution/framerate, and
are now trying to playback 720P 60 FPS, but they struggle to do so.
This PR will allow us to disable the fallback on the identified device
models. So they will revert to using the lower fps track.
  • Loading branch information
SylvainMorel authored May 13, 2024
1 parent 85b3690 commit d4e6225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public final class Util {
public static int timeSinceLastVideoRenderToLogErrorMs = 1000;
public static int audioVideoDeltaToLogErrorMs = 750;
public static boolean shouldIgnoreCodecFpsLimitForResolution = false; // MIREGO ADDED
public static boolean doNotIgnorePerformancePointsForResolutionAndFrameRate = false; // MIREGO ADDED
public static boolean useDifferentAudioSessionIdForTunneling = false; // MIREGO ADDED
public static int ntpTimeoutMs = 5000; // MIREGO ADDED

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ private static boolean shouldIgnorePerformancePoints() {
// The same check as below is tested in CTS and we should get reliable results from API 35.
return false;
}

// MIREGO added to select devices on which we do not want to ignore the performance points
if (Util.doNotIgnorePerformancePointsForResolutionAndFrameRate) {
return false;
}
try {
Format formatH264 = new Format.Builder().setSampleMimeType(MimeTypes.VIDEO_H264).build();
// Null check required to pass RequiresNonNull annotation on getDecoderInfosSoftMatch.
Expand Down

0 comments on commit d4e6225

Please sign in to comment.