Merge pull request #6258 from gnuyent/feat/hardware-encode-status
This commit is contained in:
commit
a29f702432
|
@ -212,3 +212,4 @@
|
||||||
- [Tim Hobbs](https://github.com/timhobbs)
|
- [Tim Hobbs](https://github.com/timhobbs)
|
||||||
- [SvenVandenbrande](https://github.com/SvenVandenbrande)
|
- [SvenVandenbrande](https://github.com/SvenVandenbrande)
|
||||||
- [olsh](https://github.com/olsh)
|
- [olsh](https://github.com/olsh)
|
||||||
|
- [gnuyent](https://github.com/gnuyent)
|
||||||
|
|
|
@ -444,6 +444,10 @@ namespace Jellyfin.Api.Helpers
|
||||||
{
|
{
|
||||||
var audioCodec = state.ActualOutputAudioCodec;
|
var audioCodec = state.ActualOutputAudioCodec;
|
||||||
var videoCodec = state.ActualOutputVideoCodec;
|
var videoCodec = state.ActualOutputVideoCodec;
|
||||||
|
var hardwareAccelerationTypeString = _serverConfigurationManager.GetEncodingOptions().HardwareAccelerationType;
|
||||||
|
HardwareEncodingType? hardwareAccelerationType = string.IsNullOrEmpty(hardwareAccelerationTypeString)
|
||||||
|
? null
|
||||||
|
: (HardwareEncodingType)Enum.Parse(typeof(HardwareEncodingType), hardwareAccelerationTypeString, true);
|
||||||
|
|
||||||
_sessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
_sessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
||||||
{
|
{
|
||||||
|
@ -458,6 +462,7 @@ namespace Jellyfin.Api.Helpers
|
||||||
AudioChannels = state.OutputAudioChannels,
|
AudioChannels = state.OutputAudioChannels,
|
||||||
IsAudioDirect = EncodingHelper.IsCopyCodec(state.OutputAudioCodec),
|
IsAudioDirect = EncodingHelper.IsCopyCodec(state.OutputAudioCodec),
|
||||||
IsVideoDirect = EncodingHelper.IsCopyCodec(state.OutputVideoCodec),
|
IsVideoDirect = EncodingHelper.IsCopyCodec(state.OutputVideoCodec),
|
||||||
|
HardwareAccelerationType = hardwareAccelerationType,
|
||||||
TranscodeReasons = state.TranscodeReasons
|
TranscodeReasons = state.TranscodeReasons
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
48
MediaBrowser.Model/Session/HardwareEncodingType.cs
Normal file
48
MediaBrowser.Model/Session/HardwareEncodingType.cs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
namespace MediaBrowser.Model.Session
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum HardwareEncodingType.
|
||||||
|
/// </summary>
|
||||||
|
public enum HardwareEncodingType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// AMD AMF
|
||||||
|
/// </summary>
|
||||||
|
AMF = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Intel Quick Sync Video
|
||||||
|
/// </summary>
|
||||||
|
QSV = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NVIDIA NVENC
|
||||||
|
/// </summary>
|
||||||
|
NVENC = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OpenMax OMX
|
||||||
|
/// </summary>
|
||||||
|
OMX = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Exynos V4L2 MFC
|
||||||
|
/// </summary>
|
||||||
|
V4L2M2M = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MediaCodec Android
|
||||||
|
/// </summary>
|
||||||
|
MediaCodec = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video Acceleration API (VAAPI)
|
||||||
|
/// </summary>
|
||||||
|
VAAPI = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video ToolBox
|
||||||
|
/// </summary>
|
||||||
|
VideoToolBox = 7
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,6 +34,8 @@ namespace MediaBrowser.Model.Session
|
||||||
|
|
||||||
public int? AudioChannels { get; set; }
|
public int? AudioChannels { get; set; }
|
||||||
|
|
||||||
|
public HardwareEncodingType? HardwareAccelerationType { get; set; }
|
||||||
|
|
||||||
public TranscodeReason[] TranscodeReasons { get; set; }
|
public TranscodeReason[] TranscodeReasons { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user