Skip to content

Commit

Permalink
调整ijkplayer参数
Browse files Browse the repository at this point in the history
  • Loading branch information
neilyhe committed Feb 23, 2025
1 parent fc02beb commit 9c2eccc
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,18 +461,20 @@ class VideoTestActivity : VideoBaseActivity(), XP2PCallback, CoroutineScope by M
player.setOnInfoListener(this@VideoTestActivity)
player.let {
val url = urlPrefix + suffix
it.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "probesize", 50 * 1024)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "probesize", 25 * 1024)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "packet-buffering", 0)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "threads", 2)
// it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "max-buffer-size", 30*1024)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "start-on-prepared", 1)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "sync-av-start", 0)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "min-frames", 5)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "max-buffer-size", 512 * 1024)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1)
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-auto-rotate", 1)
it.setOption(
IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-handle-resolution-change", 1
)
it.setFrameSpeed(1.8f)
it.setFrameSpeed(1.5f)
it.setMaxPacketNum(2)
while (!::surface.isInitialized) {
delay(50)
L.e("delay for waiting surface.")
Expand Down

0 comments on commit 9c2eccc

Please sign in to comment.