Skip to content

Commit

Permalink
feat(core): VideoConfig: set priority to 0 (realtime)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Dec 3, 2023
1 parent 62fe0a4 commit 795698e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import android.media.MediaCodecInfo.CodecProfileLevel.HEVCProfileMain
import android.media.MediaCodecInfo.CodecProfileLevel.VP9Profile0
import android.media.MediaCodecInfo.CodecProfileLevel.VP9Profile1
import android.media.MediaFormat
import android.media.MediaFormat.KEY_PRIORITY
import android.os.Build
import android.util.Size
import io.github.thibaultbee.streampack.internal.encoders.MediaCodecHelper
Expand Down Expand Up @@ -174,6 +175,10 @@ class VideoConfig(
}
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
format.setInteger(KEY_PRIORITY, 0) // Realtime hint
}

return format
}

Expand Down

0 comments on commit 795698e

Please sign in to comment.