You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
731 B
25 lines
731 B
using System;
|
|
|
|
namespace MediaBrowser.Server.Implementations.Sync
|
|
{
|
|
public class SyncHelper
|
|
{
|
|
public static int? AdjustBitrate(int? profileBitrate, string quality)
|
|
{
|
|
if (profileBitrate.HasValue)
|
|
{
|
|
if (string.Equals(quality, "medium", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
profileBitrate = Convert.ToInt32(profileBitrate.Value * .75);
|
|
}
|
|
else if (string.Equals(quality, "low", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
profileBitrate = Convert.ToInt32(profileBitrate.Value*.5);
|
|
}
|
|
}
|
|
|
|
return profileBitrate;
|
|
}
|
|
}
|
|
}
|