mirror of https://github.com/ErsatzTV/ErsatzTV.git
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.
22 lines
870 B
22 lines
870 B
using ErsatzTV.FFmpeg.Environment; |
|
|
|
namespace ErsatzTV.FFmpeg.Option; |
|
|
|
public class StreamSeekInputOption : IPipelineStep |
|
{ |
|
private readonly TimeSpan _start; |
|
|
|
public StreamSeekInputOption(TimeSpan start) |
|
{ |
|
_start = start; |
|
} |
|
|
|
public FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Unknown; |
|
public IList<EnvironmentVariable> EnvironmentVariables => Array.Empty<EnvironmentVariable>(); |
|
public IList<string> GlobalOptions => Array.Empty<string>(); |
|
public IList<string> InputOptions => |
|
_start == TimeSpan.Zero ? Array.Empty<string>() : new List<string> { "-ss", $"{_start:c}" }; |
|
public IList<string> FilterOptions => Array.Empty<string>(); |
|
public IList<string> OutputOptions => Array.Empty<string>(); |
|
public FrameState NextState(FrameState currentState) => currentState with { Start = _start }; |
|
}
|
|
|