mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-13 01:34:14 +01:00
693acabac4
* Move PosterWithAudio to FFMpegCore
* Reduce windows only tests
* Update Directory.Build.props
* Create .editorconfig
* More cleanup
* Enable implicit usings
* Remove unused method
* Apply dotnet format
* Fix unused variable in AudioGateArgument
* Fix boolean conditions in AudioGateArgument
* Merge boolean conditions into pattern
* Use target-typed new
* Add linting to CI
* Add CUDA to HardwareAccelerationDevice enum
* Increase timeout for Video_Join_Image_Sequence
* Adjust Video_Join_Image_Sequence timeout
* Fix expected seconds in Video_Join_Image_Sequence
* Increase timeout for Video_TranscodeToMemory due to macos agents
Former-commit-id: f9f7161686
24 lines
871 B
C#
24 lines
871 B
C#
namespace FFMpegCore.Enums
|
|
{
|
|
public static class FileExtension
|
|
{
|
|
public static string Extension(this Codec type)
|
|
{
|
|
return type.Name switch
|
|
{
|
|
"libx264" => Mp4,
|
|
"libxvpx" => WebM,
|
|
"libxtheora" => Ogv,
|
|
"mpegts" => Ts,
|
|
"png" => Png,
|
|
_ => throw new Exception("The extension for this video type is not defined.")
|
|
};
|
|
}
|
|
public static readonly string Mp4 = VideoType.Mp4.Extension;
|
|
public static readonly string Ts = VideoType.MpegTs.Extension;
|
|
public static readonly string Ogv = VideoType.Ogv.Extension;
|
|
public static readonly string WebM = VideoType.WebM.Extension;
|
|
public static readonly string Png = ".png";
|
|
public static readonly string Mp3 = ".mp3";
|
|
}
|
|
}
|