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:
@@ -15,7 +15,8 @@ import (
|
||||
func (v View) SelectFFPath(
|
||||
currentPathFfmpeg string,
|
||||
currentPathFfprobe string,
|
||||
save func(ffmpegPath string, ffprobePath string) error,
|
||||
currentPathFfplay string,
|
||||
save func(ffmpegPath string, ffprobePath string, ffplayPath string) error,
|
||||
cancel func(),
|
||||
donwloadFFmpeg func(progressBar *widget.ProgressBar, progressMessage *canvas.Text) error,
|
||||
) {
|
||||
@@ -25,6 +26,7 @@ func (v View) SelectFFPath(
|
||||
|
||||
ffmpegPath, buttonFFmpeg, buttonFFmpegMessage := v.getButtonSelectFile(currentPathFfmpeg)
|
||||
ffprobePath, buttonFFprobe, buttonFFprobeMessage := v.getButtonSelectFile(currentPathFfprobe)
|
||||
ffplayPath, buttonFFplay, buttonFFplayMessage := v.getButtonSelectFile(currentPathFfplay)
|
||||
|
||||
link := widget.NewHyperlink("https://ffmpeg.org/download.html", &url.URL{
|
||||
Scheme: "https",
|
||||
@@ -58,6 +60,15 @@ func (v View) SelectFFPath(
|
||||
{
|
||||
Widget: container.NewHScroll(buttonFFprobeMessage),
|
||||
},
|
||||
{
|
||||
Text: v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||
MessageID: "pathToFfplay",
|
||||
}),
|
||||
Widget: buttonFFplay,
|
||||
},
|
||||
{
|
||||
Widget: container.NewHScroll(buttonFFplayMessage),
|
||||
},
|
||||
{
|
||||
Widget: errorMessage,
|
||||
},
|
||||
@@ -66,7 +77,7 @@ func (v View) SelectFFPath(
|
||||
MessageID: "save",
|
||||
}),
|
||||
OnSubmit: func() {
|
||||
err := save(*ffmpegPath, *ffprobePath)
|
||||
err := save(*ffmpegPath, *ffprobePath, *ffplayPath)
|
||||
if err != nil {
|
||||
errorMessage.Text = err.Error()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user