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:
35
menu/view.go
35
menu/view.go
@@ -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),
|
||||
|
Reference in New Issue
Block a user