Added the ability to get the FFmpeg version.
This commit is contained in:
@@ -24,6 +24,7 @@ type UtilitiesContract interface {
|
||||
UtilityCheck() bool
|
||||
|
||||
GetFFmpeg() (FFmpegContract, error)
|
||||
GetFFmpegVersion() string
|
||||
GetFFmpegPath() string
|
||||
ChangeFFmpeg(path string) error
|
||||
|
||||
@@ -82,6 +83,19 @@ func (u *utilities) GetFFmpeg() (FFmpegContract, error) {
|
||||
return u.ffmpeg, nil
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFmpegVersion() string {
|
||||
ffmpegService, err := u.GetFFmpeg()
|
||||
if err != nil {
|
||||
return lang.L("errorFFmpegVersion")
|
||||
}
|
||||
|
||||
version, err := ffmpegService.GetFFmpegVersion()
|
||||
if err != nil {
|
||||
return lang.L("errorFFmpegVersion")
|
||||
}
|
||||
return version
|
||||
}
|
||||
|
||||
func (u *utilities) GetFFmpegPath() string {
|
||||
ffmpegService, err := u.GetFFmpeg()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user