mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-28 04:51:54 +00:00
support max audio bit depth
This commit is contained in:
@@ -284,6 +284,29 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
}
|
||||
|
||||
public int? OutputAudioBitDepth
|
||||
{
|
||||
get
|
||||
{
|
||||
if (BaseRequest.Static || string.Equals(OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (AudioStream != null)
|
||||
{
|
||||
return AudioStream.BitDepth;
|
||||
}
|
||||
}
|
||||
|
||||
//else if (BaseRequest.AudioSampleRate.HasValue)
|
||||
//{
|
||||
// // Don't exceed what the encoder supports
|
||||
// // Seeing issues of attempting to encode to 88200
|
||||
// return Math.Min(44100, BaseRequest.AudioSampleRate.Value);
|
||||
//}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// </summary>
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
[ApiMember(Name = "AudioSampleRate", Description = "Optional. Specify a specific audio sample rate, e.g. 44100", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the audio bit rate.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user