本文整理汇总了C#中Speed.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Speed.ToString方法的具体用法?C# Speed.ToString怎么用?C# Speed.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Speed
的用法示例。
在下文中一共展示了Speed.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToMP4
/// <summary>
/// Converts a source video to MP4 format.
/// </summary>
/// <param name="source">Source video file.</param>
/// <param name="output">Output video file.</param>
/// <param name="speed">Conversion speed preset.</param>
/// <param name="size">Output video size.</param>
/// <param name="multithread">Use multithreading for conversion.</param>
/// <returns>Success state.</returns>
public bool ToMP4(VideoInfo source, string output, Speed speed = Speed.SuperFast, VideoSize size = VideoSize.Original, bool multithread = false)
{
_probe.SetVideoInfo(ref source);
_totalVideoTime = source.Duration;
IsConverting = true;
string threadCount = multithread ?
Environment.ProcessorCount.ToString() : "1",
scale = FFMpegHelper.GetScale(size);
FFMpegHelper.ConversionExceptionCheck(source, output);
FFMpegHelper.ExtensionExceptionCheck(output, ".mp4");
string conversionArgs = string.Format("-i \"{0}\" -threads {1} {2} -b:v 2000k -vcodec libx264 -preset {3} -g 30 \"{4}\"", source.Path,
threadCount,
scale,
speed.ToString().ToLower(),
output);
return _RunProcess(conversionArgs);
}
示例2: LobbySpeed
public static void LobbySpeed(Speed speed)
{
if (speed.ToString() == "Normal")
{
PS3.SetMemory(0x173bb0, new byte[] { 0x38, 160, 0, 190 });
}
if (speed.ToString() == "Super")
{
PS3.SetMemory(0x173bb0, new byte[] { 0x38, 160, 7, 0 });
}
if (speed.ToString() == "Freeze")
{
byte[] buffer = new byte[4];
buffer[0] = 0x38;
buffer[1] = 160;
PS3.SetMemory(0x173bb0, buffer);
}
}