/// <summary> /// Creates the process arguments. /// </summary> /// <returns></returns> public override string CreateProcessArguments() { var sb = new StringBuilder(base.CreateProcessArguments()); sb.Append($" -pf {CaptureProfile.ToString().ToLowerInvariant()}"); if (CaptureBitrate < 0) { sb.Append($" -b {CaptureBitrate.Clamp(0, 25000000).ToString(CI)}"); } if (CaptureFramerate >= 2) { sb.Append($" -fps {CaptureFramerate.Clamp(2, 30).ToString(CI)}"); } if (CaptureDisplayPreview) { if (CaptureDisplayPreviewEncoded) { sb.Append($" -e"); } } if (CaptureKeyframeRate > 0) { sb.Append($" -g {CaptureKeyframeRate.ToString(CI)}"); } if (CaptureQuantisation >= 0) { sb.Append($" -qp {CaptureQuantisation.Clamp(0, 40).ToString(CI)}"); } if (CaptureInterleaveHeaders) { sb.Append($" -ih"); } var commandArgs = sb.ToString(); $"{CommandName} {commandArgs}".Trace(Pi.LoggerSource); return(commandArgs); }
/// <inheritdoc /> public override string CreateProcessArguments() { var sb = new StringBuilder(base.CreateProcessArguments()); sb.Append($" -pf {CaptureProfile.ToString().ToLowerInvariant()}"); if (CaptureBitrate < 0) { sb.Append($" -b {CaptureBitrate.Clamp(0, 25000000).ToString(Ci)}"); } if (CaptureFramerate >= 2) { sb.Append($" -fps {CaptureFramerate.Clamp(2, 30).ToString(Ci)}"); } if (CaptureDisplayPreview && CaptureDisplayPreviewEncoded) { sb.Append(" -e"); } if (CaptureKeyframeRate > 0) { sb.Append($" -g {CaptureKeyframeRate.ToString(Ci)}"); } if (CaptureQuantisation >= 0) { sb.Append($" -qp {CaptureQuantisation.Clamp(0, 40).ToString(Ci)}"); } if (CaptureInterleaveHeaders) { sb.Append(" -ih"); } return(sb.ToString()); }
public void SetSelectedProfile(CaptureProfile captureProfile) { this.selectedProfile = captureProfile; }
public void SetSelectedProfile(CaptureProfile captureProfile) { // capture profile is global for the source this.selectedProfile = captureProfile; }