更新
This commit is contained in:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user