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:
2025-05-19 22:49:09 +05:00
parent a831d56d93
commit 306383449a
17 changed files with 244 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ import (
)
type ViewContract interface {
About(ffmpegVersion string, ffprobeVersion string)
About(ffmpegVersion string, ffprobeVersion string, ffplayVersion string)
Gratitude()
}
@@ -60,7 +60,7 @@ func (v View) Gratitude() {
view.Show()
}
func (v View) About(ffmpegVersion string, ffprobeVersion string) {
func (v View) About(ffmpegVersion string, ffprobeVersion string, ffplayVersion string) {
view := v.app.GetAppFyne().NewWindow(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
MessageID: "about",
}))
@@ -134,6 +134,7 @@ func (v View) About(ffmpegVersion string, ffprobeVersion string) {
)),
v.getAboutFfmpeg(ffmpegVersion),
v.getAboutFfprobe(ffprobeVersion),
v.getAboutFfplay(ffplayVersion),
widget.NewCard(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
MessageID: "AlsoUsedProgram",
}), "", v.getOther()),
@@ -207,6 +208,36 @@ func (v View) getAboutFfprobe(version string) *fyne.Container {
)
}
func (v View) getAboutFfplay(version string) *fyne.Container {
programmName := canvas.NewText(" FFplay", colornames.Darkgreen)
programmName.TextStyle = fyne.TextStyle{Bold: true}
programmName.TextSize = 20
programmLink := widget.NewHyperlink(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
MessageID: "programmLink",
}), &url.URL{
Scheme: "https",
Host: "ffmpeg.org",
Path: "ffplay.html",
})
licenseLink := widget.NewHyperlink(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
MessageID: "licenseLink",
}), &url.URL{
Scheme: "https",
Host: "ffmpeg.org",
Path: "legal.html",
})
return container.NewVBox(
programmName,
widget.NewLabel(version),
widget.NewRichTextFromMarkdown("**FFmpeg** is a trademark of **[Fabrice Bellard](http://bellard.org/)**, originator of the **[FFmpeg](https://ffmpeg.org/about.html)** project."),
widget.NewRichTextFromMarkdown("This software uses libraries from the **FFmpeg** project under the **[LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)**."),
container.NewHBox(programmLink, licenseLink),
)
}
func (v View) getOther() *fyne.Container {
return container.NewVBox(
canvas.NewLine(colornames.Darkgreen),