support max audio bit depth

This commit is contained in:
Luke Pulverenti
2017-06-26 11:10:52 -04:00
parent c2c1451beb
commit a759b09577
14 changed files with 90 additions and 18 deletions

View File

@@ -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>