aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs54
1 files changed, 17 insertions, 37 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
index dacd6dea6..30e2ac42f 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
@@ -1,3 +1,5 @@
+#nullable disable
+
#pragma warning disable CS1591
using System;
@@ -9,7 +11,6 @@ using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.IO;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Session;
@@ -273,6 +274,16 @@ namespace MediaBrowser.Controller.MediaEncoding
public int? GetRequestedAudioChannels(string codec)
{
+ if (!string.IsNullOrEmpty(codec))
+ {
+ var value = BaseRequest.GetOption(codec, "audiochannels");
+ if (!string.IsNullOrEmpty(value)
+ && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
+ {
+ return result;
+ }
+ }
+
if (BaseRequest.MaxAudioChannels.HasValue)
{
return BaseRequest.MaxAudioChannels;
@@ -288,16 +299,6 @@ namespace MediaBrowser.Controller.MediaEncoding
return BaseRequest.TranscodingMaxAudioChannels;
}
- if (!string.IsNullOrEmpty(codec))
- {
- var value = BaseRequest.GetOption(codec, "audiochannels");
- if (!string.IsNullOrEmpty(value)
- && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
- {
- return result;
- }
- }
-
return null;
}
@@ -429,7 +430,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream.
+ /// Gets the target video level.
/// </summary>
public double? TargetVideoLevel
{
@@ -452,7 +453,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream.
+ /// Gets the target video bit depth.
/// </summary>
public int? TargetVideoBitDepth
{
@@ -487,7 +488,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream.
+ /// Gets the target framerate.
/// </summary>
public float? TargetFramerate
{
@@ -519,7 +520,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream.
+ /// Gets the target packet length.
/// </summary>
public int? TargetPacketLength
{
@@ -535,7 +536,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream.
+ /// Gets the target video profile.
/// </summary>
public string TargetVideoProfile
{
@@ -699,25 +700,4 @@ namespace MediaBrowser.Controller.MediaEncoding
Progress.Report(percentComplete.Value);
}
}
-
- /// <summary>
- /// Enum TranscodingJobType.
- /// </summary>
- public enum TranscodingJobType
- {
- /// <summary>
- /// The progressive.
- /// </summary>
- Progressive,
-
- /// <summary>
- /// The HLS.
- /// </summary>
- Hls,
-
- /// <summary>
- /// The dash.
- /// </summary>
- Dash
- }
}