Add FFmpeg utilities configuration UI and automated downloading
Introduce a new UI for configuring FFmpeg, FFprobe, and FFplay paths with file selection and error handling. Add platform-specific logic for downloading and extracting FFmpeg binaries directly within the application, improving user experience.
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
package setting
|
||||
|
||||
func (s *setting) GetFFmpegPath() string {
|
||||
return s.fyneApp.Preferences().String("ffmpegPath")
|
||||
path := s.fyneApp.Preferences().String("ffmpegPath")
|
||||
if path == "" {
|
||||
return "ffmpeg"
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
func (s *setting) SetFFmpegPath(path string) {
|
||||
@@ -9,7 +14,12 @@ func (s *setting) SetFFmpegPath(path string) {
|
||||
}
|
||||
|
||||
func (s *setting) GetFFprobePath() string {
|
||||
return s.fyneApp.Preferences().String("ffprobePath")
|
||||
path := s.fyneApp.Preferences().String("ffprobePath")
|
||||
if path == "" {
|
||||
return "ffprobe"
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
func (s *setting) SetFFprobePath(path string) {
|
||||
@@ -17,7 +27,12 @@ func (s *setting) SetFFprobePath(path string) {
|
||||
}
|
||||
|
||||
func (s *setting) GetFFplayPath() string {
|
||||
return s.fyneApp.Preferences().String("ffplayPath")
|
||||
path := s.fyneApp.Preferences().String("ffplayPath")
|
||||
if path == "" {
|
||||
return "ffplay"
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
func (s *setting) SetFFplayPath(path string) {
|
||||
|
Reference in New Issue
Block a user