mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
Merge remote-tracking branch 'upstream/master' into NetworkPR2
This commit is contained in:
@@ -158,7 +158,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="userId">The user's Id.</param>
|
||||
/// <param name="config">The request containing the new user configuration.</param>
|
||||
void UpdateConfiguration(Guid userId, UserConfiguration config);
|
||||
/// <returns>A task representing the update.</returns>
|
||||
Task UpdateConfigurationAsync(Guid userId, UserConfiguration config);
|
||||
|
||||
/// <summary>
|
||||
/// This method updates the user's policy.
|
||||
@@ -167,12 +168,14 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="userId">The user's Id.</param>
|
||||
/// <param name="policy">The request containing the new user policy.</param>
|
||||
void UpdatePolicy(Guid userId, UserPolicy policy);
|
||||
/// <returns>A task representing the update.</returns>
|
||||
Task UpdatePolicyAsync(Guid userId, UserPolicy policy);
|
||||
|
||||
/// <summary>
|
||||
/// Clears the user's profile image.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
void ClearProfileImage(User user);
|
||||
/// <returns>A task representing the clearing of the profile image.</returns>
|
||||
Task ClearProfileImageAsync(User user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1380,24 +1380,40 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
public int? GetAudioBitrateParam(BaseEncodingJobOptions request, MediaStream audioStream)
|
||||
{
|
||||
if (audioStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (request.AudioBitRate.HasValue)
|
||||
{
|
||||
// Don't encode any higher than this
|
||||
return Math.Min(384000, request.AudioBitRate.Value);
|
||||
}
|
||||
|
||||
return null;
|
||||
// Empty bitrate area is not allow on iOS
|
||||
// Default audio bitrate to 128K if it is not being requested
|
||||
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
||||
return 128000;
|
||||
}
|
||||
|
||||
public int? GetAudioBitrateParam(int? audioBitRate, MediaStream audioStream)
|
||||
{
|
||||
if (audioStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (audioBitRate.HasValue)
|
||||
{
|
||||
// Don't encode any higher than this
|
||||
return Math.Min(384000, audioBitRate.Value);
|
||||
}
|
||||
|
||||
return null;
|
||||
// Empty bitrate area is not allow on iOS
|
||||
// Default audio bitrate to 128K if it is not being requested
|
||||
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
||||
return 128000;
|
||||
}
|
||||
|
||||
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions, bool isHls)
|
||||
|
||||
Reference in New Issue
Block a user