Add FFplay support to the application
Integrated FFplay functionality across the application. This includes support for setting up the FFplay path and invoking FFplay for media playback.
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
func getPathsToFF() []kernel.FFPathUtilities {
|
||||
return []kernel.FFPathUtilities{{"ffmpeg/bin/ffmpeg", "ffmpeg/bin/ffprobe"}, {"ffmpeg", "ffprobe"}}
|
||||
return []kernel.FFPathUtilities{{FFmpeg: "ffmpeg/bin/ffmpeg", FFprobe: "ffmpeg/bin/ffprobe", FFplay: "ffmpeg/bin/ffplay"}, {FFmpeg: "ffmpeg", FFprobe: "ffprobe", FFplay: "ffplay"}}
|
||||
}
|
||||
|
||||
func (h ConvertorHandler) downloadFFmpeg(progressBar *widget.ProgressBar, progressMessage *canvas.Text) (err error) {
|
||||
@@ -60,7 +60,11 @@ func (h ConvertorHandler) downloadFFmpeg(progressBar *widget.ProgressBar, progre
|
||||
progressMessage.Refresh()
|
||||
})
|
||||
|
||||
err = h.saveSettingFFPath("ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffmpeg", "ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffprobe")
|
||||
err = h.saveSettingFFPath(
|
||||
"ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffmpeg",
|
||||
"ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffprobe",
|
||||
"ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffplay",
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -217,6 +221,12 @@ func unTarXz(fileTar string, directory string, progressBar *widget.ProgressBar)
|
||||
return err
|
||||
}
|
||||
|
||||
ffplayPath := filepath.Join(directory, "ffmpeg-master-latest-linux64-gpl", "bin", "ffplay")
|
||||
err = os.Chmod(ffplayPath, 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user