profile.Quality = work.Quality.HasValue ? work.Quality.Value : 0;\r
profile.UseDisplayWidth = true;\r
profile.VideoBitrate = work.VideoBitrate.HasValue ? work.VideoBitrate.Value : 0;\r
-\r
- switch (work.VideoEncodeRateType)\r
- {\r
- case VideoEncodeRateMode.AverageBitrate:\r
- profile.VideoEncodeRateType = VideoEncodeRateType.AverageBitrate;\r
- break;\r
- case VideoEncodeRateMode.ConstantQuality:\r
- profile.VideoEncodeRateType = VideoEncodeRateType.ConstantQuality;\r
- break;\r
- }\r
+ profile.VideoEncodeRateType = work.VideoEncodeRateType;\r
\r
switch (work.VideoEncoder)\r
{\r
<Compile Include="Model\Encoding\OutputFormat.cs" />\r
<Compile Include="Model\Encoding\SubtitleTrack.cs" />\r
<Compile Include="Model\Encoding\VideoEncoder.cs" />\r
- <Compile Include="Model\Encoding\VideoEncodeRateMode.cs" />\r
<Compile Include="Model\General\UpdateCheckInformation.cs" />\r
<Compile Include="Model\General\UpdateCheckResult.cs" />\r
<Compile Include="Model\ModelBase.cs" />\r
/// <summary>\r
/// Gets or sets VideoEncodeRateType.\r
/// </summary>\r
- public VideoEncodeRateMode VideoEncodeRateType { get; set; }\r
+ public VideoEncodeRateType VideoEncodeRateType { get; set; }\r
\r
/// <summary>\r
/// Gets or sets the VideoEncoder\r
+++ /dev/null
-/* VideoEncoderRateMode.cs $\r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-\r
-namespace HandBrake.ApplicationServices.Model.Encoding\r
-{\r
- /// <summary>\r
- /// The Mode of Video Encoding. Bitrate, Filesize or Quality\r
- /// </summary>\r
- public enum VideoEncodeRateMode\r
- {\r
- TargetSize = 0,\r
- AverageBitrate,\r
- ConstantQuality\r
- }\r
-}\r
switch (qualityMode)\r
{\r
case "1": // Avg Bitrate\r
- parsed.VideoEncodeRateType = VideoEncodeRateMode.AverageBitrate;\r
+ parsed.VideoEncodeRateType = VideoEncodeRateType.AverageBitrate;\r
break;\r
case "2": // CQ\r
- parsed.VideoEncodeRateType = VideoEncodeRateMode.ConstantQuality;\r
+ parsed.VideoEncodeRateType = VideoEncodeRateType.ConstantQuality;\r
break;\r
}\r
#endregion\r
\r
switch (task.VideoEncodeRateType)\r
{\r
- case VideoEncodeRateMode.AverageBitrate:\r
+ case VideoEncodeRateType.AverageBitrate:\r
if (task.VideoBitrate.HasValue)\r
query += string.Format(" -b {0}", task.VideoBitrate.Value);\r
break;\r
- case VideoEncodeRateMode.ConstantQuality:\r
+ case VideoEncodeRateType.ConstantQuality:\r
double value;\r
switch (task.VideoEncoder)\r
{\r
\r
if (videoBitrate.Success)\r
{\r
- parsed.VideoEncodeRateType = VideoEncodeRateMode.AverageBitrate;\r
+ parsed.VideoEncodeRateType = VideoEncodeRateType.AverageBitrate;\r
parsed.VideoBitrate = int.Parse(videoBitrate.ToString().Replace("-b ", string.Empty));\r
}\r
\r