Renaming to OutputUrlArgument

Former-commit-id: fc2802d5fb
This commit is contained in:
Malte Rosenbjerg 2021-03-15 23:04:59 +01:00
parent 8f5ebf4852
commit aec737bbc5
2 changed files with 9 additions and 9 deletions

View file

@ -4,15 +4,16 @@
namespace FFMpegCore.Arguments
{
/// <summary>
/// Represents output stream parameter
/// Represents outputting to url using supported protocols
/// See http://ffmpeg.org/ffmpeg-protocols.html
/// </summary>
public class OutputStreamArgument : IOutputArgument
public class OutputUrlArgument : IOutputArgument
{
public readonly string Stream;
public readonly string Url;
public OutputStreamArgument(string stream)
public OutputUrlArgument(string url)
{
Stream = stream;
Url = url;
}
public void Post() { }
@ -21,6 +22,6 @@ public void Post() { }
public void Pre() { }
public string Text => Stream;
public string Text => Url;
}
}

View file

@ -49,9 +49,8 @@ private FFMpegArguments WithInput(IInputArgument inputArgument, Action<FFMpegArg
}
public FFMpegArgumentProcessor OutputToFile(string file, bool overwrite = true, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputArgument(file, overwrite), addArguments);
public FFMpegArgumentProcessor OutputToFile(Uri uri, bool overwrite = true, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputArgument(uri.AbsolutePath, overwrite), addArguments);
public FFMpegArgumentProcessor OutputToStream(string uri, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputStreamArgument(uri), addArguments);
public FFMpegArgumentProcessor OutputToStream(Uri uri, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputStreamArgument(uri.ToString()), addArguments);
public FFMpegArgumentProcessor OutputToUrl(string uri, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputUrlArgument(uri), addArguments);
public FFMpegArgumentProcessor OutputToUrl(Uri uri, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputUrlArgument(uri.ToString()), addArguments);
public FFMpegArgumentProcessor OutputToPipe(IPipeSink reader, Action<FFMpegArgumentOptions>? addArguments = null) => ToProcessor(new OutputPipeArgument(reader), addArguments);
private FFMpegArgumentProcessor ToProcessor(IOutputArgument argument, Action<FFMpegArgumentOptions>? addArguments)