add more separate hw decoding toggles

This commit is contained in:
nyanmisaka 2020-04-09 00:35:54 +08:00
parent e90d2fcbfd
commit 02baff1fe0
5 changed files with 27 additions and 18 deletions

View File

@ -258,12 +258,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
html += "</div>";
html += "</div>";
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
html += '<div class="sessionTranscodingFramerate">' + session.TranscodingInfo.Framerate + " fps</div>";
} else {
html += '<div class="sessionTranscodingFramerate"></div>';
}
html += '<div class="sessionNowPlayingDetails">';
var nowPlayingName = DashboardPage.getNowPlayingName(session);
html += '<div class="sessionNowPlayingInfo" data-imgsrc="' + nowPlayingName.image + '">';
@ -398,9 +392,9 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
} else if (displayPlayMethod === "Transcode") {
html += globalize.translate("Transcoding");
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
html += " (" + session.TranscodingInfo.Framerate + " fps)";
}
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
html += " (" + session.TranscodingInfo.Framerate + " fps)";
}
showTranscodingInfo = true;
} else if (displayPlayMethod === "DirectPlay") {

View File

@ -5,6 +5,7 @@ define(["jQuery", "loading", "globalize", "dom", "libraryMenu"], function ($, lo
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function (c) {
c.checked = -1 !== (config.HardwareDecodingCodecs || []).indexOf(c.getAttribute("data-codec"));
});
page.querySelector("#chkDecodingColorDepth10").checked = config.EnableDecodingColorDepth10;
page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding;
$("#selectVideoDecoder", page).val(config.HardwareAccelerationType);
$("#selectThreadCount", page).val(config.EncodingThreadCount);
@ -67,6 +68,7 @@ define(["jQuery", "loading", "globalize", "dom", "libraryMenu"], function ($, lo
}), function (c) {
return c.getAttribute("data-codec");
});
config.EnableDecodingColorDepth10 = form.querySelector("#chkDecodingColorDepth10").checked;
config.EnableHardwareEncoding = form.querySelector("#chkHardwareEncoding").checked;
ApiClient.updateNamedConfiguration("encoding", config).then(function () {
updateEncoder(form);

View File

@ -35,36 +35,44 @@
<h3 class="checkboxListLabel">${LabelEnableHardwareDecodingFor}</h3>
<div class="checkboxList">
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="h264" data-types="qsv,nvenc,omx,mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="h264" data-types="amf,qsv,nvenc,vaapi,omx,mediacodec" />
<span>H264</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="hevc" data-types="qsv,nvenc,mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="hevc" data-types="amf,qsv,nvenc,vaapi,mediacodec" />
<span>HEVC</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="mpeg2video" data-types="qsv,nvenc,omx,mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="mpeg2video" data-types="amf,qsv,nvenc,vaapi,omx,mediacodec" />
<span>MPEG2</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="mpeg4" data-types="nvenc,mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="mpeg4" data-types="amf,nvenc,omx,mediacodec" />
<span>MPEG4</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vc1" data-types="qsv,nvenc" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vc1" data-types="amf,qsv,nvenc,vaapi,omx" />
<span>VC1</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vp8" data-types="mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vp8" data-types="qsv,nvenc,vaapi,mediacodec" />
<span>VP8</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vp9" data-types="mediacodec" />
<input type="checkbox" is="emby-checkbox" class="chkDecodeCodec" data-codec="vp9" data-types="amf,qsv,nvenc,vaapi,mediacodec" />
<span>VP9</span>
</label>
</div>
</div>
<div class="checkboxListContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkDecodingColorDepth10" />
<span>${EnableDecodingColorDepth10}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnableDecodingColorDepth10Help}</div>
</div>
<div class="checkboxListContainer">
<div class="checkboxList">
<label>
@ -169,3 +177,4 @@
</div>
</div>
</div>

View File

@ -1496,5 +1496,7 @@
"EveryXMinutes": "Every {0} minutes",
"EveryHour": "Every hour",
"EveryXHours": "Every {0} hours",
"OnApplicationStartup": "On application startup"
"OnApplicationStartup": "On application startup",
"EnableDecodingColorDepth10": "Enable 10-Bit hardware decoding",
"EnableDecodingColorDepth10Help" : "Enable 10-Bit hardware decoding on supported hardware. Only works for HEVC and VP9 formats. Turn this off if you experience playback issues."
}

View File

@ -1502,5 +1502,7 @@
"YadifBob": "Yadif Bob",
"Yadif": "Yadif",
"LabelDeinterlaceMethod": "反交错方法:",
"DeinterlaceMethodHelp": "选择对隔行扫描内容进行转码时所用的反交错方法。"
"DeinterlaceMethodHelp": "选择对隔行扫描内容进行转码时所用的反交错方法。",
"EnableDecodingColorDepth10": "启用 10-Bit 硬件解码",
"EnableDecodingColorDepth10Help" : "在支持的硬件上启用 10-Bit 硬件解码。仅对 HEVC 和 VP9 格式起作用。如果你遇到了播放问题,请关闭这个选项。"
}