This commit is contained in:
sansen
2026-07-29 10:46:19 +08:00
parent 2c4dd55f11
commit 83f5bb8b30
14 changed files with 593 additions and 167 deletions
+10 -1
View File
@@ -3,6 +3,7 @@ package main
import (
"context"
"ffmpeg-gui/internal/ffmpeg"
"ffmpeg-gui/internal/gpu"
"ffmpeg-gui/internal/hwaccel"
"ffmpeg-gui/internal/media"
"ffmpeg-gui/internal/platform"
@@ -106,6 +107,14 @@ func (a *App) GetHardwareEncoders() ([]hwaccel.HWEncoder, error) {
return a.hwDetect.DetectEncoders()
}
// GetGPUInfo returns detected GPU models and their encoder capabilities.
func (a *App) GetGPUInfo() []gpu.GPUInfo {
if a.exec == nil {
return nil
}
return gpu.DetectGPUs(a.exec)
}
// GetAccelerators returns detected hardware acceleration methods.
func (a *App) GetAccelerators() ([]hwaccel.Accelerator, error) {
if a.hwDetect == nil {
@@ -200,7 +209,7 @@ func (a *App) SelectInputFile() (string, error) {
// SelectOutputFile opens a save file dialog.
func (a *App) SelectOutputFile(defaultName string) (string, error) {
return runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{
Title: "选择输出文件",
Title: "选择输出文件",
DefaultFilename: defaultName,
Filters: []runtime.FileFilter{
{DisplayName: "MP4 (*.mp4)", Pattern: "*.mp4"},