VideoTools/vendor/fyne.io/fyne/v2/internal/metadata/save.go
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

37 lines
777 B
Go

package metadata
import (
"bytes"
"io"
"os"
"path/filepath"
"github.com/BurntSushi/toml"
)
// Save attempts to write a FyneApp metadata to the provided writer.
// If the encoding fails an error will be returned.
func Save(f *FyneApp, w io.Writer) error {
var buf bytes.Buffer
err := toml.NewEncoder(&buf).Encode(f)
if err != nil {
return err
}
_, err = w.Write(buf.Bytes())
return err
}
// SaveStandard attempts to save a FyneApp metadata to the `FyneApp.toml` file in the specified dir.
// If the file cannot be written or encoding fails an error will be returned.
func SaveStandard(f *FyneApp, dir string) error {
path := filepath.Join(dir, "FyneApp.toml")
w, err := os.Create(path)
if err != nil {
return err
}
defer w.Close()
return Save(f, w)
}