diff options
| author | nyanmisaka <nst799610810@gmail.com> | 2020-11-08 01:39:32 +0800 |
|---|---|---|
| committer | nyanmisaka <nst799610810@gmail.com> | 2020-11-08 01:39:32 +0800 |
| commit | 85965741f57e709133fbaf5ba59ed45bbd3b5d26 (patch) | |
| tree | 0a979bb7e3c8e714951b6f1bb17a7c67b2b3d7c1 /Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs | |
| parent | 8c5e0ddae01253092faf1903da3edca064511b72 (diff) | |
add initial support for HEVC over FMP4-HLS
Diffstat (limited to 'Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs b/Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs index 95f1906ef..3d7a9d9a0 100644 --- a/Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs +++ b/Jellyfin.Api/Helpers/HlsCodecStringHelpers.cs @@ -85,20 +85,21 @@ namespace Jellyfin.Api.Helpers // The h265 syntax is a bit of a mystery at the time this comment was written. // This is what I've found through various sources: // FORMAT: [codecTag].[profile].[constraint?].L[level * 30].[UNKNOWN] - StringBuilder result = new StringBuilder("hev1", 16); + StringBuilder result = new StringBuilder("hvc1", 16); - if (string.Equals(profile, "main10", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(profile, "main10", StringComparison.OrdinalIgnoreCase) + || string.Equals(profile, "main 10", StringComparison.OrdinalIgnoreCase)) { - result.Append(".2.6"); + result.Append(".2.4"); } else { // Default to main if profile is invalid - result.Append(".1.6"); + result.Append(".1.4"); } result.Append(".L") - .Append(level * 3) + .Append(level) .Append(".B0"); return result.ToString(); @@ -121,5 +122,23 @@ namespace Jellyfin.Api.Helpers { return "mp4a.a6"; } + + /// <summary> + /// Gets an FLAC codec string. + /// </summary> + /// <returns>FLAC codec string.</returns> + public static string GetFLACString() + { + return "fLaC"; + } + + /// <summary> + /// Gets an ALAC codec string. + /// </summary> + /// <returns>ALAC codec string.</returns> + public static string GetALACString() + { + return "alac"; + } } } |
