=========ijkplayer設(shè)置
//可以打開(kāi)h265硬解;
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-hevc", 1);
=========IJKFFOptions 注釋
//開(kāi)啟硬件解碼
[options setPlayerOptionIntValue:1 forKey:@"videotoolbox"];
// 幀速率(fps) (可以改帘睦,確認(rèn)非標(biāo)準(zhǔn)楨率會(huì)導(dǎo)致音畫(huà)不同步,所以只能設(shè)定為15或者29.97)
[options setPlayerOptionIntValue:29.97 forKey:@"r"];
// 設(shè)置音量大小诡延,256為標(biāo)準(zhǔn)音量古胆。(要設(shè)置成兩倍音量時(shí)則輸入512筛璧,依此類推)
[options setPlayerOptionIntValue:512 forKey:@"vol"];
// 最大fps
[options setPlayerOptionIntValue:30 forKey:@"max-fps"];
// 跳幀開(kāi)關(guān)
[options setPlayerOptionIntValue:0 forKey:@"framedrop"];
// 指定最大寬度
[options setPlayerOptionIntValue:960 forKey:@"videotoolbox-max-frame-width"];
// 自動(dòng)轉(zhuǎn)屏開(kāi)關(guān)
[options setFormatOptionIntValue:0 forKey:@"auto_convert"];
// 重連次數(shù)
[options setFormatOptionIntValue:1 forKey:@"reconnect"];
// 超時(shí)時(shí)間夭谤,timeout參數(shù)只對(duì)http設(shè)置有效巫糙,若果你用rtmp設(shè)置timeout,ijkplayer內(nèi)部會(huì)忽略timeout參數(shù)参淹。rtmp的timeout參數(shù)含義和http的不一樣浙值。
[options setFormatOptionIntValue:30 * 1000 * 1000 forKey:@"timeout"];