-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #403 from slugger7/feat/cut-video
Sub video function
- Loading branch information
Showing
5 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace FFMpegCore.Arguments | ||
{ | ||
/// <summary> | ||
/// Represents seek parameter | ||
/// </summary> | ||
public class EndSeekArgument : IArgument | ||
{ | ||
public readonly TimeSpan? SeekTo; | ||
|
||
public EndSeekArgument(TimeSpan? seekTo) | ||
{ | ||
SeekTo = seekTo; | ||
} | ||
|
||
public string Text | ||
{ | ||
get | ||
{ | ||
if (SeekTo.HasValue) | ||
{ | ||
var hours = SeekTo.Value.Hours; | ||
if (SeekTo.Value.Days > 0) | ||
{ | ||
hours += SeekTo.Value.Days * 24; | ||
} | ||
|
||
return $"-to {hours.ToString("00")}:{SeekTo.Value.Minutes.ToString("00")}:{SeekTo.Value.Seconds.ToString("00")}.{SeekTo.Value.Milliseconds.ToString("000")}"; | ||
} | ||
else | ||
{ | ||
return string.Empty; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters